function launchWin(doc,name,w,h,s,t,m) {
    if(!s) { s = 0 };
    if(!t) { t = 0 };
    if(!m) { m = 0 };

    if (w > (screen.width - 50)){
        w = screen.width - 100;
        s = 1;
    }

    if (h > (screen.height - 150)){
        h = screen.height - 150;
        s = 1;
    }

    settings = "menubar=" + m + ",toolbar=" + t + ",scrollbars=" + s + ",location=0,status=0,resizeable=0,width=" + w + ",height=" + h;
    popupWin = window.open(doc,name,settings);
    popupWin.moveTo(((screen.width/2)-(w/2)),((screen.height/2)-(h/2)));
}


/** -----------------------------
 * ADD THIS CONFIGURATION
 ---------------------------- **/

$(function()
        {
            $('.custom_button, .hover_menu').mouseenter(function()
            {
                $('.hover_menu').fadeIn('fast');
                $('.custom_button').addClass('active');
                $(this).data('in', true);
                $('.hover_menu').data('hidden', false);
            }).mouseleave(function()
            {
                $(this).data('in', false);
                setTimeout(hideMenu, delay);
            });

            var delay = 400;
            function hideMenu()
            {
                if (!$('.custom_button').data('in') && !$('.hover_menu').data('in') && !$('.hover_menu').data('hidden'))
                {
                    $('.hover_menu').fadeOut('fast');
                    $('.custom_button').removeClass('active');
                    $('.hover_menu').data('hidden', true);
                }
            }
        });
