function mainmenu() {
    $(" #nav ul ").css({ display: "none" }); // Opera Fix
    $(" #nav li").hover(function() {
        var sub = $(this).find('ul:first');
        sub.css({ visibility: "visible", display: "none" }).show(400);
        if ($(this)[0].parentNode.id == "nav")
            sub.css({ marginTop: 20 });
        else {
            sub.css({ marginTop: this.style.marginTop, marginLeft: 0 }); $(this).css({ borderBottom: "3px solid #90d7fc" });
        }

    }, function() {
        $(this).find('ul:first').css({ visibility: "hidden" });
        $(this).css({ borderBottom: "0px" });
    });
}



$(document).ready(function() {
    mainmenu();
});


//function mainmenu() {
//    $(" .h li").hover(function() {
//        var sub = $(this).find('ul:first');
//        sub.css({ visibility: "visible", display: "none" }).show(400);
//        if ($(this)[0].parentNode.id == "nav")
//            sub.css({ marginTop: 11 });
//        else
//            sub.css({ marginTop: this.style.marginTop, marginLeft: 12 });

//    }, function() {
//        $(this).find('ul:first').css({ visibility: "hidden" });
//    });
//}



//$(document).ready(function() {
//    mainmenu();
//});
