'use strict';(function(a,d){d(a).ready(function(){var c={rootMargin:"0px",threshold:.1},f=new IntersectionObserver(b=>{b.forEach(e=>{var g=e.target;e.intersectionRatio>=c.threshold?g.classList.add("is-scrolled-in"):g.classList.remove("is-scrolled-in")})},c);a.querySelectorAll(".sustainability-content").forEach((b,e)=>{f.observe(b)});a.querySelectorAll(".sustainability-left").forEach((b,e)=>{f.observe(b)})})})(document,$); function videoSrc(){var a=document.querySelector(".sustainability");if(a&&(a=a.querySelector(".sustainabilityvideo"))&&!$(a).hasClass("sustainability-lazyload")){let d=a.getAttribute("desktop-src"),c=a.getAttribute("desktop-poster");console.log(c);let f=a.getAttribute("mobile-src"),b=a.getAttribute("mobile-poster");890>$(window).width()&&f&&b?(a.src=f,a.poster=b):d&&c&&(a.src=d,a.poster=c)}}var elementHeader=document.querySelector(".sustainabilityvideo"); $(document).on("click",".reduced-animation-toggle .c-toggle button",function(a){a="false"===$(this).attr("aria-checked")?!0:!1;elementHeader&&(a?(elementHeader.setAttribute("playsinline",!0),elementHeader.setAttribute("autoplay",!0)):(elementHeader.removeAttribute("playsinline"),elementHeader.removeAttribute("autoplay"),elementHeader.setAttribute("preload","none")))}); $(window).on("resize scroll",function(){elementHeader&&($("body").hasClass("animation-off")?(elementHeader.removeAttribute("playsinline"),elementHeader.removeAttribute("autoplay"),elementHeader.setAttribute("preload","none")):(elementHeader.setAttribute("playsinline",!0),elementHeader.setAttribute("autoplay",!0)))});videoSrc();window.addEventListener("resize",function(){$("body").hasClass("animation-off")||videoSrc()}); function addFootnotes(){document.querySelectorAll(".sustainability sup").forEach(a=>{0==a.children.length&&a.insertAdjacentHTML("afterbegin",'\x3cspan class\x3d"sr-text"\x3eFootnote\x3c/span\x3e')})}addFootnotes(); setTimeout(function(){var a=[].slice.call(document.querySelectorAll(".sustainability-lazyload"));if("IntersectionObserver"in window){var d=new window.IntersectionObserver(function(c,f){c.forEach(function(b){if(b.isIntersecting){var e=b.target.getAttribute("mobile-src"),g=b.target.getAttribute("mobile-poster"),h=b.target.getAttribute("desktop-src"),k=b.target.getAttribute("desktop-poster");890>=$(window).width()&&b.target.src!=e?(b.target.src=e,b.target.poster=g):890<$(window).width()&&b.target.src!= h&&(b.target.src=h,b.target.poster=k);b.target.load();b.target.classList.remove("sustainability-lazyload");d.unobserve(b.target)}})});a&&a.forEach(function(c){d.observe(c)})}},0);