﻿$(document).ready(function() {
$("#search-field").click(function() {
    if ($(this).val() == $(this).attr('defaultValue')) $(this).val("");
});
// if the user enters nothing, this will restore default text
$("#search-field").blur(function() {
    if ($(this).val() == "") $(this).val($(this).attr('defaultValue'));
});


   
    $(".nav-item").hoverIntent({
        over: showMenu,
        timeout: 250,
        out: hideMenu
    });
   
});

    function showMenu() {
    
        $(this).addClass('active-nav');
        $(this).find('.subnav').slideDown();

    }
    function hideMenu() {

        $(this).removeClass('active-nav');
        $(this).find('.subnav').slideUp();

    }
