$(document).ready(function () {
    $('#menu li').hover(function() {
        $(this).find('.sub:first').show();
    },
        function() {
           $(this).find('.sub').hide();
    });
});
