(function (a) { function c() { var b = "WelcomeMessage"; var c = new Date(1e4, 0, 1, 0, 0, 0); var d = { path: "/", expires: c }; if (a("#CloseWelcomeOverlay").length > 0) { a("#CloseWelcomeOverlay").click(function () { a("#welcomeMessageOverlay").fadeOut(200); a("#welcomeMessageOverlayBoxWrapper").hide().empty(); a.cookie(b, "no", d); return false }) } if (a("#RedirectWelcomeOverlay").length > 0) { a("#RedirectWelcomeOverlay").click(function () { a.cookie(b, "yes", d) }) } } function b(b, c) { var d = ""; var e = "&"; e = e + a(c).serialize(); d = d + "&ajaxoperationame=" + b + e; a(".ajaxloading").show(); a("input#newslettersignupsubmit").hide(); a(".error").hide(); a.ajax({ type: "post", url: "/resources/ajax/AjaxOperations.aspx", data: d, dataType: "json", success: function (b) { if (b.IsValid) { a("#newsletterSignup").hide(); a(".ajaxsuccess").show(); var c = a("#your_country").val(); var d = a("#your_preferred_language").val(); pageTracker._trackEvent("NewsletterRegistration", "Submitted", c + " - " + d) } else { if (b.InvalidFieldsArray != null && b.InvalidFieldsArray.length > 0) { for (i = 0; i <= b.InvalidFieldsArray.length; i++) { if (b.InvalidFieldsArray[i] != null) { var e = "#msg_" + b.InvalidFieldsArray[i]; a(e).show() } } } a("input#newslettersignupsubmit").show() } a(".ajaxloading").hide() } }) } a(document).ready(function () { try { c(); a("input[type=checkbox].switch").makeSwitch() } catch (d) { } customScrollBar(); a("#newsletterSignup").live("submit.RED", function (a) { b("newslettersubscription", this); return false }) }); })(jQuery)
