$(document).ready(function(){

	var lists = $("#tertiary .box ul:first");
	$(">li:has(ul li.location)",lists).addClass("initial");
	$("li:not(.location,.initial)>ul:visible",lists).hide();
	
	function showSubMenu(){
		$(this).siblings(":has(ul:visible)").find("ul:first").slideUp("normal");
		$("ul:hidden",this).slideDown("normal");
	}
	
	var config = {    
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		interval: 200, // number = milliseconds for onMouseOver polling interval    
		over: showSubMenu, // function = onMouseOver callback (REQUIRED)    
		timeout: 0, // number = milliseconds delay before onMouseOut    
		out: function(){return false;} // function = onMouseOut callback (REQUIRED)    
	};
	// $("li:has(ul)",lists).hoverIntent(config);
	$("li:has(ul)",lists).click(showSubMenu,function(){ return false; });

	
	$(".primary form li input, .primary form li select, .primary form li textarea").focus(function(){
		$(this).parents("li").addClass("active");
	}).blur(function(){
		$(this).parents("li").removeClass("active");
	});	

});
