﻿$(function () {

    // Stop nav items clicking through if they have child items
    $('#header-nav>li:has(ul)>a').bind('click', function () { return false; });

    var navConfig = {
        interval: 75,
        sensitivity: 5,
        over: function () {
            var li = $(this);
            li.addClass('selected')
            li.find('ul').show();
        },
        timeout: 150,
        out: function () {
            var li = $(this);
            li.removeClass('selected')
            li.find('ul').hide();
        }
    };

    $('#header-nav>li').hoverIntent(navConfig);

});
