var	JavaScriptSchoolID = 456,
	MenuArray = new Array(
		{pageid:126785,voffset:-4,hoffset:-30},
		{pageid:126786,voffset:-4,hoffset:-34},
		{pageid:126787,voffset:-4,hoffset:-34},
		{pageid:126788,voffset:-4,hoffset:-16},
		{pageid:126789,voffset:-4,hoffset:-20}
	);

$(document).ready(function(){
	
	//swap out school logo if needed and set up display of the left column nav (various footers and headers based on "loginBoxMode" and whether or not user/school nav exists)
	var logoSwap = true;
	switch(pdGlobal.loginBoxMode){
		case "Hidden": logoSwap = false; break;
		case "Collapsed":
			if($("#L_c5i0").children().length==0){ $("<div></div>").attr("id","psuedoLoginFooter").insertAfter("#L_c4i0"); }
			break;
		case "Expanded":
		default:
			if($("#L_c5i0").children().length==0){ $(".unftr").css({"background":"url(/ftpimages/456/podium/style760/images/uNavFoot.png) top left no-repeat","height":"30px"}); }
			break;
	}
	if(logoSwap || $("#L_c5i0").children().length>0){ $("#hpLink").css("background-image","url(/ftpimages/456/podium/style760/images/logo.png)"); }
	if($("#L_c4i0").length==0 && $("#L_c5i0").children().length>0){ $(".shdr").css({"background":"url(/ftpimages/456/podium/style760/images/sNavHeader_noLogin.png) top left no-repeat","height":"10px"}); }

	$("#nav").menu({ sid:JavaScriptSchoolID, settings:MenuArray, currentL1:pdGlobal.currentPages[0].id, showL3s:false });
});

/*Search Functions */
function submitSearch(){ __pdSiteSearch('Saint Marys Hall Search', document.getElementById("search").value); }
function SubmitOnEnter(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	if(charCode == "13" || charCode == "26"){ submitSearch(); return false; }
}