
willow.ready(function($){
	//emergency bulletin options
	//DATA TYPES
	//{type:"news",id:11111}
	//{type:"announcement",id:22222}
	//{type:"rss",url:"http://rss.news.yahoo.com/rss/topstories"}
	var bulletinOptions = {
		emButtonPosition: "right",
		emButton: true,
		data: [
			{type:"news",id:10693}
		]
	};
	//emergency bulletin
	$('#Form1').bulletin(bulletinOptions);
	
	//menu options
	var menuOptions = {
		direction:"down",
		showL3s:false,
		speed:0
	};
	//menu
	willow.getMenu("112860|112868|112895|113008|113026|113078|113105",function(data){
		$("#nav").menu(data.menu,menuOptions);
	});
	
	$("#non_flash_content").css("display","block");
		
		
	$.fn.cycle.defaults = { 
		timeout:       3000,  // milliseconds between slide transitions (0 to disable auto advance) 
		speed:         1000,  // speed of the transition (any valid fx speed value) 
		next:          null,  // id of element to use as click trigger for next slide 
		prev:          null,  // id of element to use as click trigger for previous slide 
		before:        null,  // transition callback (scope set to element to be shown) 
		after:         null,  // transition callback (scope set to element that was shown) 
		height:       'auto', // container height 
		sync:          1,     // true if in/out transitions should occur simultaneously 
		fit:           0,     // force slides to fit container 
		pause:         0,     // true to enable "pause on hover" 
		delay:         0,     // additional delay (in ms) for first transition (hint: can be negative) 
		slideExpr:     null  // expression for selecting slides (if something other than all children is required) 
	}; 
		$('#leftphoto').cycle();
			
	$.fn.cycle.defaults = { 
		timeout:       5000,  // milliseconds between slide transitions (0 to disable auto advance) 
		speed:         1000,  // speed of the transition (any valid fx speed value) 
		next:          null,  // id of element to use as click trigger for next slide 
		prev:          null,  // id of element to use as click trigger for previous slide 
		before:        null,  // transition callback (scope set to element to be shown) 
		after:         null,  // transition callback (scope set to element that was shown) 
		height:       'auto', // container height 
		sync:          1,     // true if in/out transitions should occur simultaneously 
		fit:           0,     // force slides to fit container 
		pause:         0,     // true to enable "pause on hover" 
		delay:         0,     // additional delay (in ms) for first transition (hint: can be negative) 
		slideExpr:     null  // expression for selecting slides (if something other than all children is required) 
	}; 
		$('#rightphoto').cycle();
			
	var link_options = {
		css_path:"/hp_quicklinks.css",
		linkid:10575
	};
	$('#quicklinks').createQuicklinks(link_options);
});
	
function submitSearch(){
	window.location = "/podium/default.aspx?t=52392&q="+document.getElementById("search").value+"&pt=Poly Prep School";
}
function SubmitOnEnter(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode
	if(charCode == "13" || charCode == "26"){
		submitSearch();
		return false;
	}
}
function clearDefault(search) {
	if (search.defaultValue==search.value) search.value = ""
}


