/*jQuery(document).ready(function($){							
	$("ul#nav li a").hover(function() { //When hover over #nav
			$(this).parent().addClass("active");
			$(this).parent().find("ul.subnav").slideDown(300).show(); //Drop down the subnav on hover
		$("ul.subnav").hover(function() { //Hover over .subnav						  
		}, function(){ //Hover out of .subnav
			$("ul.subnav").slideUp(400); //When the mouse hovers out .subnav, move it back up
			setTimeout(function(){$("ul.subnav").parent().removeClass("active");}, 400);
		});
	},function(){
			
		});
});*/

jQuery(document).ready(function($){
closetimer = 0;
	if($("#nav")) {
		$("#nav b").mouseover(function() {
		clearTimeout(closetimer);
			if(this.className.indexOf("active") != -1) {
				$(this).parent().next().slideUp(400);
				setTimeout(function(){$(this).removeClass("active");}, 400);
			}
			else {
				$("#nav ul:visible").slideUp(400);
				$("#nav b").removeClass();
				$(this).addClass("active");
				$(this).parent().next().slideDown(300);
			}
			return false;
		});
		$("#nav").mouseover(function() {
		clearTimeout(closetimer);
		});
		$("#nav").mouseout(function() {
			closetimer = window.setTimeout(function(){
			$("#nav ul:visible").slideUp(400);
			setTimeout(function(){$("#nav b").removeClass("active");}, 400);
			}, 500);
		});
	}
});

