$(document).ready(function() {
	$("li.menunav").hover(function() {
			var itemwidth = $(this).width(); /* Getting the LI width */
			$(this).prepend("<div class='hover'></div>"); /* Inserting a blank div into within li above the <a> tag*/
			$(this).find("div").fadeIn('1').css({ 'width' : itemwidth}); /* Using the itemwidth for the div to display properly*/
			$(this).find("ul.menunav").fadeIn('1').slideDown('1').css("display", "block");
	} , function() {
		$(this).find("div").slideUp('1').fadeOut('1');/* sliding up and fading out the hover div */
		$(this).find("div").remove();/* removing the <div> code from html at every mouseout event*/
		$(this).find("ul.menunav").fadeOut(); /* fading out the sub menu */
	});
	$("a.menunav").mouseover(function() {
	    $(this).css("color", "#ffffff");
	});
	$("a.menunav").mouseout(function() {
	    $(this).css("color", "#d8d8d8");
	});	    
});
