document.write("<style>#lNavPhoto img, #bannerArea { visibility:hidden; }</style>");
document.write("<style>#L1title, #L2title, #L3title { visibility:hidden; }</style>");

var bannerImage = "community", MenuArray = new Array(
		{pageid:121235,hoffset:0,voffset:-12,animate:"true"},
		{pageid:121236,hoffset:0,voffset:-8,animate:"true"},
		{pageid:121237,hoffset:0,voffset:-8,animate:"true"},
		{pageid:123143,hoffset:0,voffset:-8,animate:"true"},
		{pageid:121239,hoffset:0,voffset:-9,animate:"true"},
		{pageid:121240,hoffset:-65,voffset:-22,animate:"true"}
	);
	
$(document).ready(function(){
	$("body").bulletin({sid:416,gid:11389,emButton:true});
	//CSP sdb 071610 was $("<img>")
	//CSP sdb 071910 was $("img")
	if($("#lNavPhoto img").length==0){ $("<img>").attr("src","/images/defaultTaskPhoto.jpg").attr("width","248").appendTo("#lNavPhoto"); }
	$("#lNavPhoto img").css("visibility","visible");
	$("#lNavPhoto").height($("#lNavPhoto img").height());
	
	if(pdGlobal){
		switch(pdGlobal.currentPages[0].id){
			case 121235: bannerImage = "community"; break;
			case 121236: bannerImage = "admission"; break;
			case 121237: bannerImage = "program"; break;
			case 123143: bannerImage = "community"; break;
			case 121239: bannerImage = "giving"; break;
			case 121240: bannerImage = "contact"; break;
		}
		if(pdGlobal.currentPages[pdGlobal.currentPageLevel-1].type == "content"){
			switch(pdGlobal.currentPageLevel){
				default:
				case 3: $("h4#L3title").html(pdGlobal.currentPages[2].title).css("visibility","visible");
				case 2: $("h3#L2title").html(pdGlobal.currentPages[1].title).css("visibility","visible");
				case 1: $("h2#L1title").html(pdGlobal.currentPages[0].title).css("visibility","visible");
			}
		} else { $("h2#L1title").html("Community").css("visibility","visible"); }

	$(".banner").css({
		"background-image":"url(/ftpimages/416/podium/Style518/images/banner/"+bannerImage+".png)",
		"visibility":"visible"
	});

	initMenu("nav","down",MenuArray,pdGlobal.currentPages[0].id);
	$("#L2_121240 #menu-header").css("cursor","pointer").click(function(){ window.location = $("#nav_121240").attr("href"); });
	}
});


function submitSearch(){ window.location = "/podium/default.aspx?t=52392&q="+document.getElementById("search").value+"&pt=Georgetown Day School Search"; }
function SubmitOnEnter(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	if(charCode == "13" || charCode == "26"){ submitSearch(); return false; }
}