$(function() {

    $("#menu li").hover(
        function(){
            $(this).addClass("hover");
            $(this).children("ul").show();
        },
        function(){
            $(this).removeClass("hover");
            $(this).children("ul").hide();
        }
    );

});
