﻿
if (!$.browser.msie || $.browser.version >= 7) // not IE6
    $(".maFooter .maCenter").css({ opacity: 0.5 })
			                .hover(
				                function () { $(this).stop().animate({ opacity: 1 }, "fast"); },
				                function () { $(this).stop().animate({ opacity: 0.5 }, "fast"); }
			                )
			                    .find("input").mouseover(function () { // fix Firefox hover bug
			                        $(this).closest(".maCenter").stop().animate({ opacity: 1 }, "fast");
			                    });

var isCoupon;
$(".maLogin .js-login").click(function (e) {
    e.preventDefault();
    this.blur();
    $(this).closest(".maLogin").find(".maFormPanel:first").slideDown("fast");
    $(this).closest(".maLogin").find(".PanelConfirmation").slideUp("fast");

});
$(".maLogin .js-lostpassword").click(function (e) {
    e.preventDefault();
    this.blur();
    $(".PanelPassword").slideDown("fast");
    $(".maFormPanel").slideDown("fast");
    // $(this).closest(".maLogin").find(".PanelPassword").slideDown("fast");
});

$(".maLogin .js-close").click(function (e) {
    e.preventDefault();
    this.blur();
    $(this).closest(".maFormPanel").slideUp("fast");
});
$(".PanelConfirmation .js-close").click(function (e) {
    e.preventDefault();
    this.blur();
    $(".PanelConfirmation").slideUp("fast");
    $(this).closest(".maFormPanel").slideUp("fast");
});
// Used for Coupon Page for Tagging 
function InsertTaggingOnCoupon(isC) {
    isCoupon = isC;
}

$(document).ready(function () {
    if (document.getElementById('POPUP_LAYER') != null) {
        document.getElementById('POPUP_LAYER').setAttribute('pagename', pageName);
    }
});

var x = 0;
setInterval(function () { x = 0; }, 5000);

function insertTag() {
    if (x == 0) {
        if (isCoupon == '1' && taggingCouponEventEnabled == 'true')
            DefaultCouponEventHandler('ClosingLayer');
        else 
        {
            if (taggingEnabled == 'true')
            {
                var pageName = document.getElementById('POPUP_LAYER').getAttribute('pageName');
                TaggingHandler('Overlay-Closed', 'name:' + pageName);
            }
        }
        x++;
    }
}


