
jQuery.fn.sfHover = function() {
	jQuery(this).hover(
		function() { jQuery(this).addClass("sfHover"); },
		function() { jQuery(this).removeClass("sfHover"); }
	)
	return this
}

$(document).ready(function()
{
	$('#nav li').sfHover();
	$("li:has(ul)").hover(function()
	{
		$(this).children("ul").css("display", "none");
		//$(this).children("ul").css("display", "block");
		var nodeSize = $(this).width();
		//$(this).children("ul").width(nodeSize);
		//$(this).children("ul").children("li").width(nodeSize-8);
		$(this).children("ul").width('auto');
		$(this).children("ul").children("li").width($(this).children("ul").width());
		$(this).children("ul").slideDown("normal");
	},
	function()
	{
		$(this).children("ul").css("display", "none");
		$(this).children("ul").slideUp("fast");
	});
	
	
})
