﻿var tooltip_isOver = 0;
// startup code
$(document).ready(function() {
    //$('#username').focus();
    //checkMacRegCookie();
    /*
    * Add functionality to tooltips
    */
    $(".tooltip-trigger").hoverIntent({
        sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
        interval: 250, // number = milliseconds for onMouseOver polling interval    
        timeout: 250, // number = milliseconds delay before onMouseOut
        over: function() { // function = onMouseOver callback (REQUIRED)    
            $(this).next().show();
        },
        out: function() { // function = onMouseOut callback (REQUIRED)    
            if (tooltip_isOver == 0)
                $(this).next().hide();
        }
    });
    $(".tooltip-content").hover(
                function() { // function = onMouseOver callback (REQUIRED)    
                    tooltip_isOver = 1;
                },
                function() { // function = onMouseOut callback (REQUIRED)    
                    $(".tooltip-content").hide();
                    tooltip_isOver = 0;
                }
            );
    /*
    * Add functionality to login form
    */
    $("#utilityButtonLogin").click(
               function() {
                   $("#ctl00_MainContentPlaceHolder_utilityLogin").slideToggle();
               }
            );
    $("#utilityLoginClose").click(
               function() {
                   $("#ctl00_MainContentPlaceHolder_utilityLogin").slideToggle();
               }
            );
});           