willow.fixPodiumNav();

willow.ready(function($) {
	var menuOptions = {
		direction:"down",
		showL3s:false,
		currentL1:pdGlobal.currentPages[0].id
	};

	willow.getMenu("141826|141827|141825|141832|141833|138783",function(data){
		$('#L1').menu(data.menu,menuOptions);

		if($(".sitemap").length > 0){
			$(".sitemap").sitemap(data);
			//uncomment this if you want to expand all by default$("#expand").click();
		}
	});
	
	$('#search').pdSearch({showButton:true, showButtonClass:'searchButton', showButtonText:''}); 
	$(".searchButton").css("margin","0");
	
	willow.pageTitles($(".ptl2")); 	
	
	if(pdGlobal.loginBoxMode == "Collapsed"){
		$("#lNavSep").css("background","url(/ftpimages/208/podium/style615/images/loginFooter.png) top left no-repeat").css("height","12px");
	}
	
	if(pdGlobal.currentPages[pdGlobal.currentPageLevel-1].id === 138778){
		$("#lInTblLCell").css("display","none");
		$("#lOutTbl").css("width","1005px");
		$("#lOutTblLCell").css("width","1005px");
		$("#bannerCenter").css("width","1005px");
		$("#banner").css("left","0").css("background-image","url(/ftpimages/208/podium/style615/images/homepageSchoolName.png)");
		$("#nav1").css("left","102px");
		$("#lInTbl").css("width","1005px");
		$("#footer address").css("margin-left","127px");
	}
	
	if($("#lOutTbl").height() + 70 < $(window).height()){
		var h = $(window).height() - $("#lOutTbl").height();
		$("#footerBackground").css("height",h);
	}
});	

willow.pageTitles = function($obj){
	if($obj.length > 0){
		$obj.flash({
			swf: '/flash/L2pagetitle.swf',
			width: $obj.width(),
			height: $obj.height(),
			id: "pageTitle-swf",
			params:{wmode:'transparent'},
			flashvars: {
				txt: $obj.html(),
				callback: "flash_pt_size",
				id: "pageTitle-swf"
			}
		});
	}
}
