$(document).ready(function(){
	//external link setup
	$("a[href^=http]").not("[href*="+document.domain+"]").each(function(){
		$(this).attr({
			href: "javascript:visit('" + $(this).attr('href') + "')"
		});
	});
	
	$("#categories ul")// Start with all ULs in the leftmenu list
	.not($("#categories .current").parents("ul")) 
	// Go back up the tree... All ULs the current one is in
	.not($("#categories .current").siblings("ul")) 
	// current link's UL siblings = item submenu (open the submenu)
	.css({display:"none"}); 
	// Hide menus not in the "current" branch of the tree
	$("#categories li:last").addClass("last");
	
	setTimeout(function() {
		$(".fadeout").fadeOut(2500);
	}, 5000);
});