$(document).ready(function(){
        
        var open = null;
        var close = null;
        
        $('#navigation > li.sub').hover(function () {
            if (this !== open) {
                $('#navigation ul.sub').hide();
            } else {
                close.stop(true, true);
            }
            
            open = this;
            
            $(this).find('ul.sub').slideDown(500);
        }, function (e) {
            close = $(this).find('ul.sub');
            $(this).find('ul.sub').stop(true, true).delay(1000).slideUp('fast');
        });
        
    });
