'use strict';var aniCommon=aniCommon||{};"use strict"; (function(){(function(m){var n=void 0===m.firstLoad;m.firstLoad=!1;return n})(aniCommon)&&(aniCommon.utility=function(){return{delayCall:function(m,n){var q;return function(){clearTimeout(q);q=setTimeout(m,n)}},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(){function m(){setTimeout(function(){g={};$("[data-s-wdg]").addClass("s-wdgItem");$("[data-s-wdg*\x3d'#']").addClass("fadehiddenOffscreen");$("body").append("\x3cstyle\x3e.fadehiddenOffscreen {opacity:0;}\x3c/style\x3e");p=document.querySelectorAll(".s-wdgItem");var c=1,h=new window.IntersectionObserver(function(t,e){t.forEach(function(f){if(f.isIntersecting){if(!$(f.target).attr("data-s-wdg-toreset")&&$(f.target).hasClass("animate-position")){$(f.target).attr("data-s-wdg-toreset",c);g[c]= {};var w=$(f.target).offset().top,x=w+$(f.target).height(),b=getComputedStyle($(f.target)[0]).transform;"none"===b?k=b=0:(b=parseFloat(getComputedStyle($(f.target)[0]).transform.split(",")[5]),k=parseFloat(getComputedStyle($(f.target)[0]).transform.split(",")[4]));var y=parseInt($(f.target).attr("data-s-wdg"));y=$(window).height()*(-1*y/100)+b;g[c].top=w;g[c].bottom=x;g[c].originaltransform=b;g[c].originalleft=k;g[c].belowadjust=y;c++}-1l&&-100g[c].bottom&&$(this).css("transform","translate3d("+g[c].originalleft+"px,"+g[c].belowadjust+"px,0)")}$(this).removeClass("s-wdgToReset");$(this).removeClass("is-scrollTop");$(this).removeClass("is-scrollDown");$(this).removeClass("Aniscroll")}})}if(function(c){var h=void 0===c.firstLoad;c.firstLoad=!1;return h}(aniScroll)){var q,r,a,d,k,l,g,p,u={top:0, dead:0,bottom:0},v={top:0,dead:0,bottom:0};$(window).on("load scroll",function(){if(0<$(".s-wdgActive").length||0<$(".s-wdgToReset").length)q=void 0===r?$(window).scrollTop():r,r=$(window).scrollTop(),l=r-q,a=$(window).height(),d=a/3,u.top=$(window).scrollTop(),u.dead=$(window).scrollTop()+d,u.bottom=$(window).scrollTop()+180+d,v.top=$(window).scrollTop()+a-180-d,v.dead=$(window).scrollTop()+a-180,v.bottom=$(window).scrollTop()+a,n()});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={};m()},500));m()}})(); $(document).ready(function(){function m(a){$(".wdg-device-model").find(".m-ambient-video").is(":visible")&&$(".wdg-device-model").find("video").get(0).pause();$(".wdg-device-model").hide();$(".wdg-device-model .refresh-btn").hide();$(".wdg-device-spec-content .wdg-device-tile-expand").removeClass("active");var d=a.attr("data-video-src"),k=a.attr("data-paragraph-info"),l=a.attr("data-heading"),g=a.attr("data-dark-theme"),p=a.attr("data-dark-theme-replay");a.attr("data-popup");var u=a.attr("data-opened"), v=a.attr("data-close"),c=a.attr("data-dialog"),h=a.parent().find(".popup-image").find("img").attr("src"),t=a.attr("data-image-alt"),e=a.parents(".wdg-device-specs-flex").find(".wdg-device-category-content").length,f=0=x){b.find(".tile-modal").removeAttr("style");var y=a.parents().hasClass("lastTileOfContent")?a.parents(".wdg-device-spec-content").offset().top-a.parents(".wdg-device-specs-grid").offset().top-400:a.parents(".wdg-device-spec-content").offset().top-a.parents(".wdg-device-specs-grid").offset().top;b.css({left:0,right:"initial",top:y})}else b.removeAttr("style"),0!=a.parents(".wdg-device-category-content").index()%2?b.css({left:"initial",right:0}):b.css({left:0,right:"initial"}); b.removeAttr("class").addClass("wdg-device-model foldIn");b.find(".c-paragraph-2").html(k);b.find(".tile-modal").attr("aria-label",l+" "+u);b.find(".wdg-device-cross").removeClass("dark-theme");b.find(".wdg-device-cross").addClass(g);w.removeClass("dark-theme");w.addClass(p);b.find(".wdg-device-cross").attr("aria-label",v+" "+l+" "+c);d?(768<=x?(a=a.parents(".wdg-device-specs-flex").height()-f,3>e&&(a=2*a-70),e=b.find(".tile-modal"),e.removeAttr("style"),e.css({height:a,display:"flex","flex-direction":"column"}), h=e.find(".wdg-device-cross"),h.removeAttr("style"),h.css("align-self","flex-end")):(a=a.parents(".wdg-device-spec-content").outerHeight(),e=b.find(".tile-modal"),e.removeAttr("style"),e.css({"min-height":a})),b.find(".c-image").css("display","none"),b.find(".m-ambient-video").show(),h=b.find(".tilevideo"),h.attr("aria-label",k),h.find("source").remove(),k=document.createElement("source"),k.setAttribute("src",d),k.setAttribute("type","video/mp4"),h.append(k),h[0].load(),h[0].addEventListener("ended", function(){b.find(".refresh-btn").show()},!0)):(768<=x?(a=a.parents(".wdg-device-specs-flex").height()-f,3>e&&(a=2*a-70),e=b.find(".tile-modal"),e.removeAttr("style"),e.css({height:a})):(a=a.parents(".wdg-device-spec-content").outerHeight(),e=b.find(".tile-modal"),e.removeAttr("style"),e.css({"min-height":a})),b.find(".m-ambient-video").hide(),b.find(".c-image").css("display","block"),b.find(".c-image").attr("src",h),b.find(".c-image").attr("alt",t));b.show();b.find(".tile-modal .wdg-device-cross").focus()}} function n(a){if(r.matches&&767<$(window).outerWidth()){var d=a.find(".wdg-device-highlight-tile-content").height()+100;a.css("min-height",d)}else a.removeAttr("style")}function q(a,d){var k=!1;$(".wdg-device-model").each(function(g,p){$(p).is(":visible")&&(k=!0,$(p).parent().find(".m-ambient-video").is(":visible")&&$(p).parent().find("video").get(0).pause())});if(k){var l=!1;setTimeout(function(){a||$(document.activeElement).parents().each(function(g,p){"tile-modal"==p.className&&9==d&&(l=!0)}); l||($(".wdg-device-model").hide(),$(".wdg-device-specs-grid .wdg-device-tile-expand.active").focus())},0)}}var r=window.matchMedia("(prefers-reduced-motion: reduce)");navigator.userAgent.match(/Trident\/7.0/)?r.addListener("change",function(){$(".wdg-device-highlight-tile").each(function(a,d){a=$(d);n(a)})}):r.addEventListener("change",function(){$(".wdg-device-highlight-tile").each(function(a,d){a=$(d);n(a)})});$(".wdg-device-highlight-tile:not(.business-style) .wdg-device-spec-content").click(function(){var a= $(this).find(".wdg-device-tile-expand");m(a)});$(".wdg-device-spec-content .wdg-device-tile-expand").click(function(){var a=$(this);m(a)});$(window).scroll(function(){$(".wdg-device-highlight-tile-content").each(function(a,d){a=$(d);767<$(window).outerWidth()?(d=a.offset().top,$(window).scrollTop()+200>=d?a.removeClass("content-z-index"):a.hasClass("content-z-index")||a.addClass("content-z-index")):a.removeClass("content-z-index")})});$(".wdg-device-highlight-tile .wdg-device-model .focus-jump-close").focus(function(){$(this).parent().find(".tile-modal .wdg-device-cross").focus()}); $(".wdg-device-highlight-tile .wdg-device-highlight-tile-content .wdg-device-specs-grid .wdg-device-specs-flex .wdg-device-category-content .wdg-device-tile-expand,.wdg-device-highlight-tile .wdg-device-highlight-tile-content .wdg-device-specs-grid .wdg-device-specs-flex .wdg-device-category-content .c-paragraph-2,.wdg-device-highlight-tile .wdg-device-highlight-tile-content .wdg-device-specs-grid .wdg-device-specs-flex .wdg-device-category-content .c-heading-3,.wdg-device-highlight-tile .wdg-device-highlight-tile-content .wdg-device-specs-grid .wdg-device-specs-flex .wdg-device-category-content .c-call-to-action").focus(function(){$(this).parents(".wdg-device-specs-flex").find(".wdg-device-category-content").addClass("is-scrollDown")}); $(".wdg-device-model .wdg-device-cross").click(function(){$(this).parent().find(".m-ambient-video").is(":visible")&&$(this).parent().find("video").get(0).pause();var a=$(this).parents(".wdg-device-model");a.find(".refresh-btn").hide();a.addClass("foldout");setTimeout(function(){a.hide()},300);$(this).parents(".wdg-device-specs-grid").find(".wdg-device-tile-expand.active").focus()});$(".wdg-device-model .refresh-btn").click(function(){var a=$(this),d=a.parents(".wdg-device-model");a.parent().find("video").get(0).play(); a.hide();d.find(".wdg-device-cross").focus()});$(document).on("click",function(a){0<$(a.target).closest(".tile-modal").length||0<$(a.target).closest(".wdg-device-cross").length||$(a.target).hasClass("wdg-device-tile-expand")||$(a.target).hasClass("wdg-device-spec-content")||0<$(a.target).parents(".wdg-device-spec-content").length||q(!1,"")});$(".wdg-device-highlight-tile").each(function(a,d){a=$(d);n(a)});window.addEventListener("resize",aniCommon.utility.delayCall(function(){q(!0,"");$(".wdg-device-highlight-tile").each(function(a, d){a=$(d);n(a)})},500));$(document).on("keydown",function(a){9!==a.keyCode&&27!==a.keyCode||q(!1,a.keyCode)})});