'use strict';var aniCommon=aniCommon||{};"use strict"; (function(){(function(b){var d=void 0===b.firstLoad;b.firstLoad=!1;return d})(aniCommon)&&(aniCommon.utility=function(){return{delayCall:function(b,d){var a;return function(){clearTimeout(a);a=setTimeout(b,d)}},reducedAnimation:function(){aniCommon.isReducedAnimation=window.matchMedia("(prefers-reduced-motion)").matches;!0===aniCommon.isReducedAnimation?$("body").addClass("animation-off"):$("body").addClass("animation-on");return aniCommon.isReducedAnimation}}}(),aniCommon.isReducedAnimation=aniCommon.utility.reducedAnimation(), window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",()=>{aniCommon.isReducedAnimation=aniCommon.utility.reducedAnimation()}))})();var aniScroll=aniScroll||{};"use strict"; (function(){var b;function d(){setTimeout(function(){function e(f){k={threshold:.01,rootMargin:"0px 0px 0px 0px",root:null};""!==$(f).attr("data-threshold")&&null!==$(f).attr("data-threshold")&&void 0!==$(f).attr("data-threshold")&&(k.threshold=+$(f).attr("data-threshold"));(new window.IntersectionObserver(function(B,D){B.forEach(function(c){if(c.isIntersecting){if(!$(c.target).attr("data-s-wdg-toreset")&&$(c.target).hasClass("animate-position")){$(c.target).attr("data-s-wdg-toreset",h);g[h]={};var w= $(c.target).offset().top,C=w+$(c.target).height(),m=getComputedStyle($(c.target)[0]).transform;"none"===m?r=m=0:(m=parseFloat(getComputedStyle($(c.target)[0]).transform.split(",")[5]),r=parseFloat(getComputedStyle($(c.target)[0]).transform.split(",")[4]));var t=parseInt($(c.target).attr("data-s-wdg"));t=$(window).height()*(-1*t/100)+m;g[h].top=w;g[h].bottom=C;g[h].originaltransform=m;g[h].originalleft=r;g[h].belowadjust=t;h++}-1p&&-100g[e].bottom&&$(this).css("transform","translate3d("+g[e].originalleft+"px,"+g[e].belowadjust+"px,0)")}$(this).removeClass("s-wdgToReset");$(this).removeClass("is-scrollTop");$(this).removeClass("is-scrollDown"); $(this).removeClass("Aniscroll")}})}if(function(e){var h=void 0===e.firstLoad;e.firstLoad=!1;return h}(aniScroll)){var y,n,q,z,A,r,p,g,x;var u=b=void 0;u=b=0;var v=void 0;v=0;$(window).on("load scroll",function(){setTimeout(function(){a()},0)});$(document).on("keyup",function(e){a()});window.addEventListener("resize",aniCommon.utility.delayCall(function(){$(".s-wdgItem").removeAttr("style");$(".s-wdgItem").removeClass("s-wdgItem");$(".fadehiddenOffscreen").removeClass("fadehiddenOffscreen");$(".s-wdgActive").removeClass("s-wdgActive"); $(".s-wdgToReset").removeClass("s-wdgToReset");$("[data-s-wdg-toreset]").removeAttr("data-s-wdg-toreset");g={};d()},500));d()}})();var LSdesktopSrc,LSdesktopPoster,LSmobileSrc,LSmobilePoster,LSmobileWidth,mediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),islifeIE11=!!navigator.userAgent.match(/Trident\/7.0/);islifeIE11?mediaQuery.addListener("change",function(){lifestylevideo()}):mediaQuery.addEventListener("change",function(){lifestylevideo()});removeVideoButton(); var lifecontent=$(".wdg-lifestyle-video .lifestyle-video-content"),prevclass="dummyclass";function lifestylecheck(){prevclass=$("body").hasClass("animation-off")?"animation-off":"animation-on";lifestylevideo()}function lifestylevideo(){$(".wdg-lifestyle-video .lifestyle-video").each(function(b,d){b=$(d);videoreplacment(b,ContentPositioning)})}var lifestyleVideoTags=document.querySelectorAll(".lifestylevideoautoplay"); $(document).on("click",".reduced-animation-toggle .c-toggle button",function(b){const d="false"===$(this).attr("aria-checked")?!0:!1;lifestyleVideoTags.forEach(function(a){d?a.paused||a.pause():a.play()})});$(window).on("resize scroll",function(){lifestyleVideoTags.forEach(function(b){b&&$("body").hasClass("animation-off")&&(b.paused||b.pause())})});$(window).on("scroll",function(){$("body").hasClass(prevclass)||$("body").hasClass("animation-off")||lifestylecheck()}); $(".wdg-lifestyle-video .lifestyle-video").each(function(b,d){var a=$(d);setTimeout(function(){videoreplacment(a,ContentPositioning)},1E3)}); function videoreplacment(b,d){var a=b.find("video.lifestylevideoautoplay");b=b.parents(".wdg-lifestyle-video");var l=b.find(".lifestyle-video-content");LSdesktopSrc=a.attr("desktop-src");LSdesktopPoster=a.attr("desktop-poster");LSmobileSrc=a.attr("mobile-src");LSmobilePoster=a.attr("mobile-poster");LSmobileWidth=$(b).hasClass("card-style")?1083:1200;""!=LSmobileSrc&&""!=LSmobilePoster&&0LSmobileWidth&&$(this).attr("src")!=LSdesktopSrc&&lifeStyleChangeAmbientVideoSrc(LSdesktopSrc,LSdesktopPoster,a)});d(l)}window.addEventListener("resize",aniCommon.utility.delayCall(function(){$(".wdg-lifestyle-video .lifestyle-video").each(function(b,d){var a=$(d);setTimeout(function(){videoreplacment(a,ContentPositioning)},1E3)})},500)); function ContentPositioning(b){console.log("wdg - lifestyle - video");var d=b.parents(".wdg-lifestyle-video");if($("body").hasClass("animation-off"))b.removeAttr("style");else{var a=$(window).height();var l=600>$(window).width()?-(.25*a):-(1/3*a);d.hasClass("card-style")?b.css({transform:"translate3d(0,0,0)","padding-bottom":a}):b.css({transform:"translate3d(0,"+l+"px,0)","padding-bottom":-l})}} function lifeStyleChangeAmbientVideoSrc(b,d,a){a.attr("src","");a.attr("poster","");a.attr("src",b);a.attr("poster",d)}function removeVideoButton(){$(".lifestyle-video-content .video-label").hasClass("not-authored")&&$(".lifestyle-video-content .video-label .link-group a").removeClass(" c-call-to-action c-glyph glyph-play f-lightweight video-trigger")} document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".wdg-lifestyle-video").forEach(function(b){var d=b.querySelector("video"),a=b.querySelector(".videobutton");a.addEventListener("click",function(){d.paused?d.play():d.pause()});d.paused?(a.classList.add("glyph-play"),a.classList.remove("glyph-pause"),a.setAttribute("aria-label",a.getAttribute("data-play-title")),a.setAttribute("title",a.getAttribute("data-play-title"))):(a.classList.add("glyph-pause"),a.classList.remove("glyph-play"), a.setAttribute("aria-label",a.getAttribute("data-pause-title")),a.setAttribute("title",a.getAttribute("data-pause-title")));d.addEventListener("play",function(){a.classList.remove("glyph-play");a.classList.add("glyph-pause");a.setAttribute("aria-label",a.getAttribute("data-pause-title"));a.setAttribute("title",a.getAttribute("data-pause-title"))});d.addEventListener("pause",function(){a.classList.remove("glyph-pause");a.classList.add("glyph-play");a.setAttribute("aria-label",a.getAttribute("data-play-title")); a.setAttribute("title",a.getAttribute("data-play-title"))})})});