﻿$(document).ready(function() {
    $("#nav-one ul").hide();
    $("#nav-one").show();
    //Hover functions
    var makeTall = function() {
        $(this).find('ul').slideDown('300');
        $(this).find('ul').parent('li:first').css('background-color', '#EEEEFF');
    }

    var makeShort = function() {
        $(this).find('ul').slideUp('300', function(){
            $(this).parent('li:first').css('background-color', 'transparent')
    });
    }

    //hoverIntent configuration object
    var config = {
        sensitivity: 7,
        interval: 100,
        over: makeTall,
        timeout: 500,
        out: makeShort
    };

    //Only the elements that have 'div get a submenu
    $('#nav-one > li').hoverIntent(config);
});
