/*!
 * Javascript for menu effects 
 * 
*/


$(window).load(function() 
{
  //Append a div with hover class to all the LI
	$('#nav-menu li').append('<div class="hover"><\/div>');

	$('#nav-menu li').hover(

		//Mouseover, fadeIn the hidden hover class	
		function() 
    {
			$(this).children('div').fadeIn('3000');	
		}, 

		//Mouseout, fadeOut the hover class
    function() 
    {
	    $(this).children('div').fadeOut('3000');	
    });


    // Delay the page load until header image is cached
    var img = new Image();

    // wrap our new image in jQuery, then:
    // once the image has loaded, execute this code
    $(img).load(function () 
    {
      // show the page
      $('#page-load').fadeIn(0, function() { if(jQuery.browser.msie) { this.style.removeAttribute('filter'); } });

    })
    
    .attr('src', 'images/header.jpg');

});
