document.write("<style>#bannerPhotoArea img { visibility:hidden; }</style>");

var	JavaScriptSchoolID = 414, photoGroupID = 30876, EM_ID=11200,
	MenuArray = new Array(
		{pageid:115472,hoffset:0,voffset:0,animate:"true"},
		{pageid:115473,hoffset:0,voffset:0,animate:"true"},
		{pageid:115474,hoffset:0,voffset:0,animate:"true"},
		{pageid:115475,hoffset:0,voffset:0,animate:"true"},
		{pageid:115477,hoffset:0,voffset:0,animate:"true"},
		{pageid:115478,hoffset:0,voffset:0,animate:"true"},
		{pageid:115479,hoffset:0,voffset:0,animate:"true"}
	);
	
	switch(pdGlobal.currentPages[0].id){
		case 115472: photoGroupID = 30876; break;
		case 115473: photoGroupID = 30877; break;
		case 115474: photoGroupID = 30878; break;
		case 115475: photoGroupID = 30879; break;
		case 115477: photoGroupID = 30880; break;
		case 115478: photoGroupID = 30881; break;
		default: break;
	}

$(document).ready(function(){
	$("body").bulletin({sid:JavaScriptSchoolID,gid:EM_ID,emButton:true});
	
	$('#search').pdSearch({useAutoComplete:true, showButton:true, showButtonClass:'searchButton',showButtonText:''}); 
	
	$(window).load(function(){ initMenu("nav","down",MenuArray,pdGlobal.currentPages[0].id); });
	
	var defaultBannerPhoto = $("#bannerPhotoArea").html();
	$("#bannerPhotoArea")
		.attr("pid",photoGroupID)
		.html("")
		.getPhotoAlbums({
			maxAlbums:1, maxItems:1, photosPerItem:1,
			hardPhotoWidth:732,
			callback2: function(){
				if($("#bannerPhotoArea img").length==0){ $("#bannerPhotoArea").html(defaultBannerPhoto); }
				$("#bannerPhotoArea img").css("visibility","visible");
			}
		});

	switch(pdGlobal.currentPageLevel){
		default:
		case 3: $("#L3title").html(pdGlobal.currentPages[2].title);
		case 2: $("#L2title").html(pdGlobal.currentPages[1].title);
		case 1: $("#L1title").html(((pdGlobal.currentPages[0].type=="content")?pdGlobal.currentPages[0].title:"Community")); break;
	}

});

//function submitSearch(){ window.location = "/podium/default.aspx?t=52392&q="+document.getElementById("search").value+"&pt=Moravian Academy School Search"; }
//function SubmitOnEnter(evt){
	//var charCode = (evt.which) ? evt.which : event.keyCode;
	//if(charCode == "13" || charCode == "26"){ submitSearch(); return false; }
//}

