// JavaScript Document

$(document).ready(function(){
	$("ul.sf-menu").superfish({
		pathClass:  'active'
	});

	$("a.adminDelete").click( function() {
		var strURL = "";
		var strTitle = $(this).attr("title");
		var strType = $(this).attr("itemType");
		var intID = $(this).attr("itemID");
		
		if (strType == "Delete News or Event Item") {
			strURL = "news.php?adminFormAction=news-delete&id=" + intID;
		}
		else if (strType == "Delete Article") {
			strURL = "articles.php?adminFormAction=articles-delete&id=" + intID;
		}
		else if (strType == "Delete Workshop") {
			strURL = "workshops.php?adminFormAction=workshops-delete&id=" + intID;
		}
		else if (strType == "Delete Job Posting") {
			strURL = "careers-job-posting.php?adminFormAction=careers-job-delete&id=" + intID;
		}
		jConfirm('Are you sure you want to delete <strong>' + strTitle + '</strong>?', 'Confirm ' + strType, function(r) {
    		if (r) {
				window.location.href=strURL;
			}
		});
	});



});

