function showSubmenu(){ $('ul', this).slideDown('fast'); }
function hideSubmenu(){ $('ul', this).slideUp('fast'); }

/*
function showSubmenu(){ $('ul', this).show(); }
function hideSubmenu(){ $('ul', this).hide(); }
*/

/*
function showSubmenu(){ $('ul', this).fadeIn('fast'); }
function hideSubmenu(){ $('ul', this).fadeOut('fast'); }
*/
jQuery(function(){
    var config = {    
         sensitivity: 4, // number = sensitivity threshold (must be 1 or higher)    
         interval: 20, // number = milliseconds for onMouseOver polling interval    
         over: showSubmenu, // function = onMouseOver callback (REQUIRED)    
         timeout: 200, // number = milliseconds delay before onMouseOut    
         out: hideSubmenu // function = onMouseOut callback (REQUIRED)    
    };
    $("#top-nav li").hoverIntent( config );

    /*
    $('#nav-item1').hover(
        function() {
            $("#topnavbg1").show();
            $("div.menu", this).css({'left':'-1px'});
        },
        function() {
            $("#topnavbg1").hide();
            $("div.menu", this).css({'left':'-999em'});
        }
    );
    $('#nav-item2').hover(
        function() {
            $("#topnavbg2").show();
            $("div.menu", this).css({'left':'-1px'});
        },
        function() {
            $("#topnavbg2").hide();
            $("div.menu", this).css({'left':'-999em'});
        }
    );
    $('#nav-item3').hover(
        function() {
            $("#topnavbg3").show();
            $("div.menu", this).css({'left':'-1px'});
        },
        function() {
            $("#topnavbg3").hide();
            $("div.menu", this).css({'left':'-999em'});
        }
    );
    $('#nav-item4').hover(
        function() {
            $("#topnavbg4").show();
            $("div.menu", this).css({'left':'-1px'});
        },
        function() {
            $("#topnavbg4").hide();
            $("div.menu", this).css({'left':'-999em'});
        }
    );
    $('#nav-item5').hover(
        function() {
            $("#topnavbg5").show();
            $("div.menu", this).css({'left':'-1px'});
        },
        function() {
            $("#topnavbg5").hide();
            $("div.menu", this).css({'left':'-999em'});
        }
    );
    $('#nav-item6').hover(
        function() {
            $("#topnavbg6").show();
            $("div.menu", this).css({'left':'-1px'});
        },
        function() {
            $("#topnavbg6").hide();
            $("div.menu", this).css({'left':'-999em'});
        }
    );
    */
});
