jQuery(document).ready(function() {
	jQuery("#nav ul").removeClass("nj");
/*
	$("#nav ul > li").hover(
		function () {
			$(this).addClass("hovering");
			//if ( $(this).hasClass("hovering") ){
				var dropdown_width = $(this).width();
				//var paddingright = $(this).css("padding-right");
				//var paddingleft = $(this).css("padding-left");
				$(this).find(".dropdown_menu").css("min-width",dropdown_width);
				$(this).find(".dropdown_menu").hide();
				//$(this).find(".dropdown_menu").queue("fx",[]);
				$(this).find(".dropdown_menu").slideDown("fast");
			//;}
		},
		//function () {

		//	 $(this).find(".dropdown_menu").hide();
			  
		//	 $(this).removeClass("hovering");
		function () {
			
			//if($(this).find(".current_page_item").length -= 0) {
			//	$(this).find(".dropdown_menu").hide();
				$(this).removeClass("hovering");
				
				if($(this).find(".current_page_item").length == 0){
					$(this).find(".dropdown_menu").hide();
				}
				
			//}
		});
		$(".current_page_item").parent().show();
*/

	jQuery("#nav > ul > li").hover(
		function(){
			wtf = jQuery(this);
			if(jQuery(this).find(".current_page_item").length == 0){
				jQuery(this).addClass("hovering");
				if(current_page.length != 0){
					current_page.attr("style","display:none");
				}
				jQuery(this).find(".dropdown_menu").slideDown("fast");
			}
		},
		function(){
			jQuery(this).find(".dropdown_menu").stop();
			jQuery(this).removeClass("hovering");
			jQuery(this).find(".dropdown_menu").attr("style","display:none");
			if(current_page.length != 0){
				current_page.show();
			}
		}
	);
	
	current_page = jQuery(".current_page_item").parent();
	if(current_page.length != 0){
		current_page.show();
		current_page.parent().addClass("current_page_parent");
	}
})