﻿$(document).ready(function () {
    $('#quick-search-ready').click(function () {
        $(this).toggle();
        $('#quick-search-enter').toggle()
    });
    $('.quick-search-text').focus(function () {
        $('#quick-search-enter').addClass('active');
    });

    $(".hover-menu").hoverIntent({
        sensitivity: 10, // number = sensitivity threshold (must be 1 or higher)
        interval: 50,   // number = milliseconds for onMouseOver polling interval
        over: show,     // function = onMouseOver callback (required)
        timeout: 300,   // number = milliseconds delay before onMouseOut
        out: hide       // function = onMouseOut callback (required)
    });

    $(".email-signup").click(function (e) {
        e.preventDefault();
        $("#EmailSignup").modal({
            close: true,
            opacity: 70,
            overlayCss: { backgroundColor: "#000" }
        });
    });
});

function show() {
    var menu = $(this);
    menu.children(".menu-action").fadeIn("fast");
}

function hide() {
    var menu = $(this);
    menu.children(".menu-action").fadeOut("fast");
}
