
$(document).ready(function()
{$('#deleteProject').click(showDeleteProjectDlg);$('#btnDeleteProjectFirst').click(showDeleteProjectFinalDlg);$('#btnCancelDelete').click(cancelDeleteProject);$('#btnDeleteProjectFinal').click(deleteProject);$('#btnCancelDeleteFinal').click(cancelDeleteProjectFinal);});function showDeleteProjectDlg()
{$('#deleteProjectDlg').slideUp('fast');$('#deleteProjectDlg').css({'top':$(this).position().top,'right':$(window).width()-($(this).parent().position().left+($(this).parent().outerWidth()))}).slideDown('fast',function(){});}
function showDeleteProjectFinalDlg()
{$('#deleteProjectDlg').slideUp('fast');$('#deleteProjectFinalDlg').slideUp('fast');$('#deleteProjectFinalDlg').insertAfter('#deleteProjectDlg');$('#deleteProjectFinalDlg').css({'top':$('#deleteProject').position().top,'right':$(window).width()-($('#deleteProject').parent().position().left+($('#deleteProject').parent().outerWidth()))}).slideDown('fast',function(){});}
function deleteProject()
{$('#deleteProjectFinalDlg').slideUp('fast');$('#deleteProject a').text('Deleting...');$('#deleteProjectFinalDlg').slideUp('fast',function()
{$('#deleteProject').effect('pulsate',{times:2},500,function()
{$('#deleteProject a').text('Deleted');});});var dSend={projectKey:projectKey};$.ajax({type:'POST',contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(dSend),url:_reposRoot+'/ProcessDefinition.asmx/DeleteProject',success:function(data){onDeleteProject();}});return false;}
function onDeleteProject()
{$('#deleteProject a').css('cursor','default');window.location.href=_reposRoot+'/Project/Plans';}
function cancelDeleteProject()
{$('#deleteProjectDlg').slideUp('fast');return false;}
function cancelDeleteProjectFinal()
{$('#deleteProjectFinalDlg').slideUp('fast');return false;}