﻿/*$(function () {
    if ($.browser.msie && $.browser.version < 7) return;

    $('#navigation li')
            .removeClass('highlight')
            .find('a')
            .append('<span class="hover" />').each(function () {
                var $span = $('> span.hover', this).css('opacity', 0);
                $(this).hover(function () {
                    // on hover
                    $span.stop().fadeTo(250, 1);
                }, function () {
                    // off hover
                    $span.stop().fadeTo(250, 0);
                });
            });
        });*/



$(document).ready(function () {
    var config = {
        sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
        interval: 100, // number = milliseconds for onMouseOver polling interval
        over: makeTall, // function = onMouseOver callback (REQUIRED)
        timeout: 400, // number = milliseconds delay before onMouseOut
        out: makeShort // function = onMouseOut callback (REQUIRED)
    };

    $('ul#navigation li').hoverIntent(config).hover(function () {
        $(this).addClass("subhover"); //On hover over, add class “subhover”
    }, function () { //On Hover Out
        $(this).removeClass("subhover"); //On hover out, remove class “subhover”
    });
});

    function makeTall() {
        $(this).find("ul.subnav").slideDown('normal').show();
    }

    function makeShort() {
        $(this).find("ul.subnav").slideUp('normal');
    }