!function(n){"use strict";n.widget("ec.header",{options:{header:'[data-plugin="header"]',mobileNav:'[data-selector="mobile-nav"]',desktopNav:'[data-selector="desktop-nav"]',mobileSkin:'[data-selector="mobile-skin"]',manchette:'[data-plugin="manchette"]',skin:'[data-plugin="skin"]',overlay:!1},_create:function(){var n=this;n.element.addClass("has-plugin");n._setInterface();n._setEventListeners();n.options.overlay&&n._setOverlay()},_setInterface:function(){var i=this,t=n("body");n(i.options.mobileSkin).length>0?t.addClass("skin-active-mobile-v3"):0==n(".skin-wrapper.mobile-only").length&&t.addClass("no-mobile-skin");t.hasClass("skin-active-desktop")||t.addClass("no-desktop-skin")},_setEventListeners:function(){var t=this,i=null!=navigator.userAgent.match("iPhone")?"popstate":"pageshow";n(window).on(i,function(){t._clear()});n(t.options.skin).find("a").on("click",function(){t._clear()});n(t.options.desktopNav).find("a.js-navmenu-item").on("click",function(){t._clear()});n(t.options.manchette).find("a").on("click",function(){t._clear()});n(t.options.mobileNav).find('input[type="checkbox"]').on("change",function(){t._toggleMenuItem(n(t.options.mobileNav),n(this));t._setOverflow()});n(t.options.desktopNav).find('input[type="checkbox"]').on("change",function(){t._toggleMenuItem(n(t.options.desktopNav),n(this))});t._mobileScroll();n(document).mouseup(function(i){var r=n(t.options.desktopNav),u=n(t.options.mobileNav);r.is(i.target)||0!==r.has(i.target).length||u.is(i.target)||0!==u.has(i.target).length||t._clear()})},_setOverlay:function(){var i=this,t=i.element.find('[data-selector="header-overlay"]'),f=t.find("button"),e=t.find("a"),r=i.element.find("#pa-menu-dropdown-desktop-label"),u=i.element.find("#pa-menu-dropdown-mobile-label");f.on("click",function(){t.hide()});e.on("click touch",function(){t.hide();r.trigger("click");u.trigger("click")});r.on("click touch",function(){t.hide()});u.on("click touch",function(){t.hide()});n(window).scroll(function(){t.hide()})},_clear:function(){var t=this;n(t.options.header).find("label").removeClass("open");t.element.find('input[type="checkbox"]').prop("checked","")},_toggleMenuItem:function(n,t){var i=t.attr("id"),r=t.attr("id")+"-label";n.find("label:not(#"+r+")").removeClass("open");n.find('input[type="checkbox"]:not(#'+i+")").prop("checked","");n.find('label[for="'+i+'"]').toggleClass("open")},_setOverflow:function(){var t=n("html"),i=this;n(i.options.mobileNav).find('input[type="checkbox"]:checked').length>0?t.addClass("mobile-menu-active"):t.removeClass("mobile-menu-active")},_mobileScroll:function(){var i=this,r=0,t=!0,u=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i);n(window).scroll(function(){t&&!u&&(t=!1,setTimeout(function(){var u=n(this).scrollTop();u>r&&0!=u&&!n("body").hasClass("no-mobile-skin")?n(i.options.mobileNav).css({transform:"translateY(-70px)","will-change":"transform"}):n(i.options.mobileNav).css({transform:"none","will-change":"unset"});r=u;t=!0},300))})}})}(jQuery);!function(n){"use strict";n.widget("ec.manchette",{options:{theme:"manchette-primary"},_create:function(){this.element.addClass("has-plugin");var n=this;n._setInterface();n._setEventListeners()},_setInterface:function(){var t=this;t.element.addClass(t.options.theme);n(".masthead__marketing_manchette").addClass(t.options.theme);n(t.element).animate({opacity:1},200)},_setEventListeners:function(){var t=this;n(window).scroll(function(){n("body").hasClass("marketing-machette-active-desktop")&&t._toggleMachette()});n("#toggleMachetteBanner").on("click",function(){t._toggleMachette()})},_toggleMachette:function(){n("body").toggleClass("marketing-machette-active-desktop");n(".masthead__marketing_manchette").children().length>0&&(n(".masthead__marketing_manchette").toggleClass("hidden"),n(".masthead__bottom").toggleClass("manchette-active"))}})}(jQuery);!function(n){"use strict";n.widget("ec.skin",{options:{tinyBackground:"/Aline/MediaLibrary/skin/skin-v2-background.png",largeBackground:"/Aline/MediaLibrary/skin/skin-v2-expanded-background.jpg",backgroundColor:"#6d0011",theme:"skin-primary",expanded:!1},_create:function(){this.element.addClass("has-plugin");var n=this;n._setInterface();n._setEventListeners()},_setInterface:function(){var t=this;n("body").addClass("skin-active-desktop-v2");n("body").removeClass("no-desktop-skin");t.element.addClass(t.options.theme);t.options.expanded&&t._toggleDesktopSkin(n("#btn-skin-expand"));t._setBackground();n(t.element).animate({opacity:1},1e3)},_setEventListeners:function(){var t=this;n(window).scroll(function(){n("body").hasClass("skin-active-desktop-v2-expanded")&&t._toggleDesktopSkin(n("#btn-skin-expand"))});n("#btn-skin-expand").on("click",function(){t._toggleDesktopSkin(n(this))})},_toggleDesktopSkin:function(t){var i=this;n("body").toggleClass("skin-active-desktop-v2-expanded");n(t).children("span").toggleClass("hidden");i._setBackground()},_setBackground:function(){var t=this;n("body").hasClass("skin-active-desktop-v2-expanded")?t.element.attr("style","background-image: url("+t.options.largeBackground+"); background-color: "+t.options.backgroundColor):t.element.attr("style","background-image: url("+t.options.tinyBackground+"); background-color: "+t.options.backgroundColor)}})}(jQuery);window.EC=function(n,t){return t.ALine=t.ALine||{},t.ALine.WelcomePopup=t.ALine.WelcomePopup||{},t.ALine.WelcomePopup.triggerAjaxCall=function(){n('[data-plugin="header"]').find(".confirm-popup .js-forminteraction a").click()},t.ALine.WelcomePopup.validateWelcome=function(t,i){n('[data-selector="pa-welcome"]').append(i);n('[data-selector="welcome-popup"]').autohide()},t}(window.jQuery,window.EC||{});jQuery(function(){$(window).on("load",function(){$(".welcome-popup").find(".js-forminteraction a").click()});$('.masthead__mobile [data-selector="pa-welcome"]').on("click",".popup-close",function(n){n.stopPropagation();$('[data-plugin="header"]').find(".confirm-popup .js-forminteraction a").click();$(this).hasClass("open-menu")&&($(".masthead__mobile").find("#pa-menu-dropdown-mobile").prop("checked",!0),$(".masthead__mobile").find("#pa-menu-dropdown-mobile-label").addClass("open"));$(".pa-menu-popup").find('[data-selector="welcome-popup"]').remove()});$('.user-menu[data-selector="pa-welcome"]').on("click",".popup-close",function(n){n.stopPropagation();$('[data-plugin="header"]').find(".confirm-popup .js-forminteraction a").click();$(this).hasClass("open-menu")&&($('.user-menu[data-selector="pa-welcome"]').find("#pa-menu-dropdown-desktop").prop("checked",!0),$('.user-menu[data-selector="pa-welcome"]').find("#pa-menu-dropdown-desktop-label").addClass("open"));$(".pa-menu-popup").find('[data-selector="welcome-popup"]').remove()})});jQuery(function(){$(window).on("load",function(){$("#search-desktop-label").siblings("form").length===0&&$("#search-desktop-label").css("visibility","hidden")})});window.EC=function(n,t){return t.ALine=t.ALine||{},t.ALine.Authentication=t.ALine.Authentication||{},t.ALine.Authentication.handleMessage=function(t){var i,r,u,f;t&&t.originalEvent&&t.originalEvent.data&&(i=t.originalEvent.data,r=i.action?i.action:null,r&&(r==="redirect"||r==="ec.iframeAuthentication.redirect")?(window.console&&console!==undefined&&console.log!==undefined&&console.log("Redirect detected."),u=i.url?i.url:null,u&&u.length>3?window.location.replace(u):window.console&&console!==undefined&&console.log!==undefined&&console.log("Url was empty or invalid, could not redirect.")):r&&r==="ec.bean.resize"&&(window.console&&console!==undefined&&console.log!==undefined&&console.log("ec.bean.resize detected."),f=parseInt(i.height),self._iframe.height=f+"px",n('[data-selector="aline-pa-authentication-iframe"]').css("height",f+"px"),n("body.desktop header .pa-menu__dropdown.inbox-menu").css("height",f+"px")))},t.ALine.Authentication.Initialize=function(){n(window).on("message",n.proxy(t.ALine.Authentication.handleMessage,this))},n(document).ready(function(){t.ALine.Authentication.Initialize()}),t}(window.jQuery,window.EC||{})