jQuery(document).ready(function () {
	
	/** ADMIN DROP-DOWN NAV MENU **/
	// http://anotherdan.com/9/simple-drop-down-menu-with-jquery
	$("#nav_admin ul > li:has(ul)").hover(function(e) {
												   	
		$("ul", this).show().fadeTo('fast',0.94);//.show().dropShadow({top: 2, left: 2, opacity: 0.4});
	}, function() {
		$("ul", this).fadeOut('fast',function () {$(this).hide();});//.removeShadow().hide();
	}).find("ul").css('opacity',0).hide();
	
	// JavaScript Document

	/** SITE DROP-DOWN NAV MENU **/
	// http://anotherdan.com/9/simple-drop-down-menu-with-jquery
	$("#nav_site ul > li").hover(function(e) {
		$("ul:first", this).each(function() {
			$(this).css("top", $(this).parent().position().top + /*$(e.target).height()*/ + 24);
			$(this).css("left", $(this).parent().position().left + 12 );
			$(this).show();
		});
	}, function() {
		$("ul:first", this).hide();
	});

	$("#nav_site ul li li").hover(function() {
		$("ul:first", this).each(function() {
			$(this).css("top", $(this).parent().position().top + 4);
			$(this).css("left", $(this).parent().position().left + $(this).parent().width() - 6 );
			$(this).show();
		});
	}, function() {
		$("ul:first", this).hide();
	});

	/** ADMIN MESSAGES **/
	// cool fade out on messages so they're not too distracting
	$("p.message").fadeTo(2000,0.3);
	
});