$("#menu ul li ul").hide();	
$(document).ready(function(){
	if($("#menu")) {
		$("#menu ul li ul").each(
			function() {
				wordcount=0;
				$(this).find("a").each(
					function(){
						if($(this).width() > wordcount){
							wordcount = $(this).width();
						}
					});
				//alert(wordcount);
				$(this).width(wordcount+5);
			} );
		$("#menu ul li ul").hide();
		var config = { sensitivity: 1, interval: 50, over: function(){$(this).find("ul").slideDown(250);}, timeout: 200, out: function(){$(this).find("ul").slideUp(250);} };
		$("#menu ul li").hoverIntent(config);
		$("#menu ul li ul li").click(function() { window.location=$(this).find("a").attr("href"); });
		$("#menu #sub ul li").click(function() { window.location=$(this).find("a").attr("href"); });
		
		$("#menu ul div").each(function() { $(this).css("visibility", "visible"); });
		$("#menu ul li ul").each(function() { $(this).css("visibility", "visible"); });
		
		if($("#content").height() < $("#contentwrapper").height()) $("#content").css("height",$("#contentwrapper").height());
		else $("#contentwrapper").css("height",$("#content").height());
		//if($("#sidebar-wrapper").height() < $("#contentwrapper").height()) $("#sidebar-wrapper").css("height",$("#contentwrapper").height());
		//else { $("#contentwrapper").css("height",$("#sidebar-wrapper").height()); $("#content").css("height",$("#sidebar-wrapper").height()); }
		
		if ($.browser.msie && $.browser.version.substr(0,1)<7) {
		} else {
			setTimeout('$("#tag_wrapper").css("background", "url(/wordpress/wp-content/themes/wishlist/images/footer_tag.png) no-repeat 80% 100%"); $("#tag_wrapper").animate({ backgroundPosition: "100% 100%"}, 1500);',1000);
		}
	}
});
