﻿function setupMenu() {
    $("#menubar ul ul").css({ display: "none" });
    $("#menubar ul li").hover(function() {
        $(this).find('ul:first').css({ display: "block", opacity: 0 }).stop().animate({ opacity: 1 }, 200); //Slides down when hover the UL
        $(this).children('a').addClass("hovered"); //Adds a hovered class, so you can see the menu path you are following
    }
, function() {
    $(this).find('ul:first').css({ display: "none" }); //Slides up on mouseleave
    $(this).children('a').removeClass("hovered"); //removes the hovered class.
});
} 
