document.addEventListener("DOMContentLoaded",(event)=>{var allCheckBox=document.querySelectorAll(".acceptanceCheckBox");allCheckBox.forEach((elem)=>{elem.querySelector("input").addEventListener("click",(e)=>{console.log(elem.querySelector("input").checked);if(elem.querySelector("input").checked){elem.querySelector(".acceptanceCheckBoxLinks_outerBox").style.display="block";}else{elem.querySelector(".acceptanceCheckBoxLinks_outerBox").style.display="none";}});});});document.addEventListener("DOMContentLoaded",(event)=>{document.querySelectorAll('.abpi__contactUsForm').forEach(function(form){var subjectDropdown=form.querySelector('.subject select');subjectDropdown.onchange=ContactUsSubjectChange;form.querySelectorAll('.subject select option').forEach(function(dropdownItem){var dropdownItemSegments=dropdownItem.value.split('|');if(dropdownItemSegments&&dropdownItemSegments.length>1){dropdownItem.textContent=dropdownItemSegments[1];}});});});function ContactUsSubjectChange(event){var contactUsForm=this.closest('.abpi__contactUsForm');var actualsubject=contactUsForm.querySelector('.actualsubject .hidden');actualsubject.value=this.options[this.selectedIndex].text;var actualemail=contactUsForm.querySelector('.actualemail .hidden');actualemail.value=this.value.split('|')[0];}
document.addEventListener("DOMContentLoaded",(event)=>{var allContentBoxOnlyItemsInGrid=document.querySelectorAll('.customgridwrapper .row .column:nth-child(1) > div > .contentbox:nth-child(1)');if(allContentBoxOnlyItemsInGrid){allContentBoxOnlyItemsInGrid.forEach(function(firstColumnContentBox){var parentRow=firstColumnContentBox.closest(".row");if(parentRow){var allColumnData=parentRow.querySelectorAll('.column > div');if(allColumnData){var contentBoxExclusiveRow=false;for(var i=0;i<allColumnData.length;i++){var currentColumn=allColumnData[i];if(currentColumn.children.length==1&&currentColumn.children[0].classList.contains('contentbox')){contentBoxExclusiveRow=true;}
else{contentBoxExclusiveRow=false;break;}}
if(contentBoxExclusiveRow===true){parentRow.classList.add('row--fullheightcontent');}}}});}});document.addEventListener("DOMContentLoaded",(event)=>{checkCookie();});function checkCookie(){var hasCookieConsent=getCookie("cookiePopupAccepted");var cookieAccept=document.querySelector(".cookie-container__actions__accept");var cookieBanner=document.querySelector(".cookie-container");if(hasCookieConsent!=""){cookieBanner.classList.add("hidden");}else{cookieBanner.classList.remove("hidden");}
if(cookieAccept){cookieAccept.addEventListener("click",(e)=>{cookieBanner.classList.add("hidden");setCookie("cookiePopupAccepted","true",365);setCookie("cookieAnalyticsAccepted","true",365);e.preventDefault();});}}
function getCookie(cname){var name=cname+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1);}
if(c.indexOf(name)==0){return c.substring(name.length,c.length);}}
return"";}
function setCookie(cname,cvalue,exdays){var d=new Date();d.setTime(d.getTime()+exdays*24*60*60*1000);var expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";path=/";}
document.addEventListener("DOMContentLoaded",(event)=>{var allowAnalytics=document.getElementById('allowAnalytics');if(allowAnalytics){allowAnalytics.addEventListener('input',function(evt){document.querySelector('.cookiesettings__savebutton').classList.add('cookiesettings__savebutton--pulse');});}});var promoNavResizeTimer;var secondLevelNavResizeTimer;document.addEventListener("DOMContentLoaded",(event)=>{window.addEventListener('resize',function(event){clearTimeout(promoNavResizeTimer);promoNavResizeTimer=setTimeout(ResetPromoNavHeight,250);clearTimeout(secondLevelNavResizeTimer);secondLevelNavResizeTimer=setTimeout(ResetSecondLevelNavHeight,250);});var menuItems=document.getElementsByClassName("menu__item__area");var liList=document.querySelectorAll(".menu__item__mainnav__global > li");for(var x=0;x<menuItems.length;x++){if(liList[x].firstElementChild.tagName.toLowerCase()!='a'&&liList[x].firstElementChild.tagName.toLowerCase()!='div'){liList[x].classList.add('navArrowClose');}
menuItems[x].addEventListener("click",function(e){var parent=e.target.parentNode;var popoutNav=parent.parentNode
for(var i=0;i<liList.length;i++)
{if(liList[i].firstElementChild.tagName.toLowerCase()!='a'&&liList[i].firstElementChild.tagName.toLowerCase()!='div')
{if(popoutNav!=liList[i]){liList[i].classList.remove('firstLevelNavActive');liList[i].classList.remove('navArrowOpen');liList[i].classList.add('navArrowClose');ResetPromoNavHeight();}
else if(popoutNav.classList.contains('firstLevelNavActive')===true){popoutNav.classList.remove('firstLevelNavActive');popoutNav.classList.remove('navArrowOpen');popoutNav.classList.add('navArrowClose');ResetPromoNavHeight();}
else{popoutNav.classList.add('firstLevelNavActive');popoutNav.classList.remove('navArrowClose');popoutNav.classList.add('navArrowOpen');ResetPromoNavHeight();}}}});};document.getElementById("hamburger").onclick=function(e){var menuElement=document.querySelector(".menu__item");if(menuElement.classList.contains("active")&&menuElement.firstElementChild.nextElementSibling.classList.contains("active")){menuElement.classList.remove("active");e.target.src="/assets/images/burger-icon.svg";}else{menuElement.classList.add("active");e.target.src="/assets/images/menu-close-icon.svg";}
menuElement.nextElementSibling.firstElementChild.firstElementChild.src="/assets/images/search-dark-icon.svg";menuElement.firstElementChild.classList.remove("active");menuElement.firstElementChild.nextElementSibling.classList.add("active");menuElement.firstElementChild.nextElementSibling.classList.remove("non-active");};document.getElementById("search-btn").onclick=function(e){var menuElement=document.querySelector(".menu__item");if(menuElement.classList.contains("active")&&menuElement.firstElementChild.classList.contains("active")){menuElement.classList.remove("active");e.target.src="/assets/images/search-dark-icon.svg";e.currentTarget.setAttribute("aria-expanded",false);}else{menuElement.classList.add("active");e.target.src="/assets/images/menu-close-icon.svg";e.currentTarget.setAttribute("aria-expanded",true);}
menuElement.nextElementSibling.nextElementSibling.firstElementChild.firstElementChild.src="/assets/images/burger-icon.svg";menuElement.firstElementChild.classList.add("active");menuElement.firstElementChild.nextElementSibling.classList.remove("active");menuElement.firstElementChild.nextElementSibling.classList.add("non-active");};var firstLevelMenuElement=document.querySelectorAll(".menu__item__area");firstLevelMenuElement.forEach((elem)=>{elem.addEventListener("click",(e)=>{if(document.documentElement.clientWidth<992){var secondLevelItems=elem.nextElementSibling.firstElementChild.firstElementChild.nextElementSibling.nextElementSibling.children;if(secondLevelItems.length>0){if(elem.nextElementSibling){e.preventDefault();var count=elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container").length;if(count==1){const timeout=setTimeout(()=>{elem.nextElementSibling.classList.remove("SlideOut");elem.nextElementSibling.classList.add("SlideIn");elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container")[0].classList.remove("SlideOut");elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container")[0].classList.add("SlideIn");},100);elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container")[0].classList.add("active");elem.nextElementSibling.getElementsByClassName("menu__item__second-level-container__area")[0].classList.add("non-active");}else{const timeout=setTimeout(()=>{elem.nextElementSibling.classList.remove("SlideOut");elem.nextElementSibling.classList.add("SlideIn");},100);}
elem.nextElementSibling.firstElementChild.getElementsByClassName("menu__header")[0].firstElementChild.text=elem.firstElementChild.innerHTML;if(elem.href){elem.nextElementSibling.firstElementChild.getElementsByClassName("menu__header")[0].firstElementChild.href=elem.href;}
else{elem.nextElementSibling.firstElementChild.getElementsByClassName("menu__header")[0].firstElementChild.href="javascript:;";}
elem.nextElementSibling.classList.add("active");firstLevelMenuElement.forEach((elem)=>{elem.classList.add("non-active");});}}}});elem.addEventListener("keydown",function(e){if(e.keyCode===40){e.preventDefault();elem.setAttribute("aria-expanded",true);var mainNavChildren=Array.from(elem.parentElement.parentElement.children);mainNavChildren.forEach((elem)=>{if(elem.classList.contains("active"))
elem.classList.remove("active");});elem.parentElement.classList.add("active");}else if(e.keyCode===38||e.keyCode===27){e.preventDefault();if(elem.getAttribute("aria-expanded")=="true"){elem.setAttribute("aria-expanded",false);elem.parentElement.classList.remove("active");}}});elem.addEventListener("focusin",(event)=>{var mainNavChildren=Array.from(elem.parentElement.parentElement.children);mainNavChildren.forEach((elem)=>{if(elem.classList.contains("active")){elem.classList.remove("active");}
if(elem.firstElementChild.getAttribute("aria-expanded")=="true"){elem.firstElementChild.setAttribute("aria-expanded",false);}});});});var secondLevelMenuElement=document.querySelectorAll(".menu__item__second-level-container__area");secondLevelMenuElement.forEach((elem)=>{elem.addEventListener("click",(e)=>{if(document.documentElement.clientWidth<992){var thirdLevelItems=elem.nextElementSibling.firstElementChild.firstElementChild.children;if(thirdLevelItems.length>0){e.preventDefault();const timeout=setTimeout(()=>{elem.nextElementSibling.classList.remove("SlideOut");elem.nextElementSibling.classList.add("SlideIn");},100);elem.nextElementSibling.classList.add("active");secondLevelMenuElement.forEach((elem)=>{elem.classList.add("non-active");});elem.parentElement.parentElement.previousElementSibling.firstElementChild.text=elem.firstElementChild.innerHTML;if(elem.href){elem.parentElement.parentElement.previousElementSibling.firstElementChild.href=elem.href;}
else{elem.parentElement.parentElement.previousElementSibling.firstElementChild.href="javascript:;";}}}});elem.addEventListener("keydown",function(e){if(e.keyCode===27){e.preventDefault();if(elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.getAttribute("aria-expanded")=="true"){elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.setAttribute("aria-expanded",false);elem.parentElement.parentElement.parentElement.parentElement.parentElement.classList.remove("active");}}});});var thirdLevelMenuElement=document.querySelectorAll(".menu__item__third-level-container__area");thirdLevelMenuElement.forEach((elem)=>{elem.addEventListener("keydown",function(e){if(e.keyCode===27){e.preventDefault();if(elem.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.previousElementSibling.getAttribute("aria-expanded")=="true"){elem.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.previousElementSibling.setAttribute("aria-expanded",false);elem.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.remove("active");}}});});var backElement=document.querySelectorAll(".menu__back");backElement.forEach((elem)=>{var count=elem.nextElementSibling.nextElementSibling.getElementsByClassName("menu__item__third-level-container").length;elem.addEventListener("click",(e)=>{var secondLevel=elem.nextElementSibling.nextElementSibling.children;var isThirdLevel=false;for(var i=0;i<secondLevel.length;i++){isThirdLevel=secondLevel[i].getElementsByClassName("menu__item__third-level-container")[0].classList.contains("active");if(isThirdLevel==true)break;}
if(isThirdLevel){if(count==1){elem.parentElement.parentElement.classList.remove("SlideIn");elem.parentElement.parentElement.classList.add("SlideOut");const timeout=setTimeout(()=>{elem.parentElement.parentElement.classList.remove("active");firstLevelMenuElement.forEach((elem)=>{elem.classList.remove("non-active");});},400);}else{elem.nextElementSibling.nextElementSibling.getElementsByClassName("active")[0].classList.add("SlideOut");elem.nextElementSibling.nextElementSibling.getElementsByClassName("active")[0].classList.remove("SlideIn");const timeout=setTimeout(()=>{elem.nextElementSibling.nextElementSibling.getElementsByClassName("active")[0].classList.remove("active");secondLevelMenuElement.forEach((elem)=>{elem.classList.remove("non-active");});},400);elem.nextElementSibling.firstElementChild.text=elem.parentElement.parentElement.previousElementSibling.firstElementChild.innerHTML;if(elem.parentElement.parentElement.previousElementSibling.href){elem.nextElementSibling.firstElementChild.href=elem.parentElement.parentElement.previousElementSibling.href;}
else{elem.nextElementSibling.firstElementChild.href="javascript:;";}}}else{elem.parentElement.parentElement.classList.remove("SlideIn");elem.parentElement.parentElement.classList.add("SlideOut");const timeout=setTimeout(()=>{elem.parentElement.parentElement.classList.remove("active");firstLevelMenuElement.forEach((elem)=>{elem.classList.remove("non-active");});},400);}});});var firstLevelMenuNav=document.querySelectorAll(".menu__item__mainnav > ul > li");firstLevelMenuNav.forEach((elem)=>{elem.addEventListener("mouseover",(e)=>{if(document.documentElement.clientWidth>992){var secondLevelNavItems=elem.getElementsByClassName("menu__item__second-level-container__columns");if(!secondLevelNavItems[0].firstElementChild){secondLevelNavItems[0].parentElement.parentElement.classList.add("flyoutnonactive");secondLevelNavItems[0].parentElement.parentElement.previousElementSibling.classList.add("hovertriangle");}
SetSamePromoNavHeight(elem);SetSameSecondLevelNavHeight(elem);}})
elem.addEventListener("mouseout",(e)=>{if(document.documentElement.clientWidth>992){var secondLevelNavItems=elem.getElementsByClassName("menu__item__second-level-container__columns");if(!secondLevelNavItems[0].firstElementChild){secondLevelNavItems[0].parentElement.parentElement.classList.remove("flyoutnonactive");secondLevelNavItems[0].parentElement.parentElement.previousElementSibling.classList.remove("hovertriangle");}}})})
document.getElementById("skiplink").onclick=function(e){e.preventDefault();var mainContent=document.getElementById("maincontent");var focusable=mainContent.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');focusable[0].focus();};});var GlobalNavList=[];function SetSamePromoNavHeight(elem){var allPromos=Array.from(elem.getElementsByClassName('promoitem'));GlobalNavList.length=0;if(allPromos.length>0){allPromos.forEach((elem)=>{GlobalNavList.push(elem.clientHeight);});}
var maxHeight=Math.max.apply(null,GlobalNavList);if(allPromos.length>0){allPromos.forEach((elem)=>{elem.style.height=maxHeight+"px";});}}
function ResetPromoNavHeight(){var activeNavItem;var firstLevelnav=document.querySelectorAll('.menu__item__mainnav > ul > li');firstLevelnav.forEach((elem)=>{var navFlyout=elem.firstElementChild.nextElementSibling;if(navFlyout){if(window.getComputedStyle(navFlyout).display==="flex"){activeNavItem=navFlyout;}}});if(activeNavItem){var allPromos=activeNavItem.querySelectorAll('.promoitem');allPromos.forEach((elem)=>{elem.style.height=null;});setTimeout(SetSamePromoNavHeight(activeNavItem),150);}}
var GlobalSecondLevelNavList=[];function SetSameSecondLevelNavHeight(elem){var allSecondLevelNavs=Array.from(elem.getElementsByClassName('menu__item__second-level-container__area'));GlobalSecondLevelNavList.length=0;if(allSecondLevelNavs.length>0){allSecondLevelNavs.forEach((elem)=>{GlobalSecondLevelNavList.push(elem.clientHeight);});}
var maxHeight=Math.max.apply(null,GlobalSecondLevelNavList);if(allSecondLevelNavs.length>0){allSecondLevelNavs.forEach((elem)=>{elem.style.height=maxHeight+"px";});}}
function ResetSecondLevelNavHeight(){var activeNavItem;var firstLevelnav=document.querySelectorAll('.menu__item__mainnav > ul > li');firstLevelnav.forEach((elem)=>{var navFlyout=elem.firstElementChild.nextElementSibling;if(navFlyout){if(window.getComputedStyle(navFlyout).display==="flex"){activeNavItem=navFlyout;}}});if(activeNavItem){var allSecondLevelNavs=activeNavItem.querySelectorAll('.menu__item__second-level-container__area');allSecondLevelNavs.forEach((elem)=>{elem.style.height=null;});setTimeout(SetSameSecondLevelNavHeight(activeNavItem),150);}}
document.addEventListener("DOMContentLoaded",(event)=>{var localNavitems=document.querySelectorAll('.local-nav-container .sub-nav-container__items__item');localNavitems.forEach((elem)=>{elem.addEventListener('mouseover',showMoreInfo);elem.addEventListener('mouseout',hideMoreInfo);});var localNavFirstElement=document.querySelector(".sub-nav-container__items__item__title");if(localNavFirstElement){localNavFirstElement.addEventListener('click',(e)=>{e.preventDefault();if(document.documentElement.clientWidth<992){var items=Array.from(localNavFirstElement.parentElement.parentElement.children);if(localNavFirstElement.parentElement.parentElement.getElementsByClassName('active').length===localNavFirstElement.parentElement.parentElement.getElementsByClassName('sub-nav-container__items__item').length){items.forEach((elem)=>{elem.classList.remove('active');elem.classList.remove('borderbottom');})
localNavFirstElement.parentElement.classList.add('active');localNavFirstElement.firstElementChild.nextElementSibling.nextElementSibling.classList.remove('open');}
else{items.forEach((elem)=>{elem.classList.add('active');elem.classList.add('borderbottom');})
localNavFirstElement.firstElementChild.nextElementSibling.nextElementSibling.classList.add('open');}}});}});function showMoreInfo(e){if(document.getElementById('sub-nav__moreinfo__desc').innerHTML.length>0){document.querySelector('.sub-nav__moreinfo').classList.toggle('visibility-toggle');}}
function hideMoreInfo(e){if(document.getElementById('sub-nav__moreinfo__desc').innerHTML.length>0){document.querySelector('.sub-nav__moreinfo').classList.toggle('visibility-toggle');}}
function hover(description){document.getElementById('sub-nav__moreinfo__desc').innerHTML=description;}
var buttonContainer;document.addEventListener("DOMContentLoaded",(event)=>{var showGraphInstance=function(graphInstance,graphInstanceName){var allGraphContainer=Array.from(graphInstance.parentElement.children);allGraphContainer.forEach((elem)=>{elem.classList.remove('active');});if(graphInstance.dataset.graphName==graphInstanceName){graphInstance.classList.add('active');graphInstance.src=graphInstance.dataset.src;}};var multiGraphInstanceContainer=document.querySelectorAll("section.multiGraphInstanceContainer");multiGraphInstanceContainer.forEach((elem)=>{var currentGraph=elem;var parentContainer=elem.parentElement;parentContainer.firstElementChild.classList.add('active');elem.querySelectorAll("iframe").forEach((elem)=>{elem.src=elem.dataset.src;});parentContainer.classList.add('multiGraphInstanceParent');if(parentContainer.getElementsByClassName('multiGraphInstanceContainer').length>1)
{if(parentContainer.getElementsByClassName('multiGraphInstanceButtonContainer').length<1){buttonContainer=document.createElement("DIV");buttonContainer.className="multiGraphInstanceButtonContainer";parentContainer.appendChild(buttonContainer);}
var activateButton=document.createElement('a');activateButton.className="multiGraphInstanceButton";activateButton.href="#";activateButton.addEventListener("click",function(e){e.preventDefault();var allactivateButton=Array.from(e.target.parentElement.children);allactivateButton.forEach((elem)=>{elem.classList.remove('active');});e.target.classList.add("active");showGraphInstance(currentGraph,e.target.textContent);});var activateButtonLinkText=document.createTextNode(elem.dataset.graphName);activateButton.appendChild(activateButtonLinkText);activateButton.title=elem.dataset.graphName;buttonContainer.appendChild(activateButton);}});var multiGraphInstanceContainerParent=document.querySelectorAll(".multiGraphInstanceParent");multiGraphInstanceContainerParent.forEach((elem)=>{elem.getElementsByClassName("multiGraphInstanceButtonContainer")[0].firstElementChild.classList.add("active");});});document.addEventListener("DOMContentLoaded",(event)=>{var footerNavitem=document.querySelectorAll(".newsFooter__nav__items__item__title");footerNavitem.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();footerNavitem.forEach((elem)=>{elem.parentElement.classList.remove('active');});var footerNavContent=Array.from(document.querySelector(elem.getAttribute('href')).parentElement.children);footerNavContent.forEach((elem)=>{elem.classList.remove('active');});document.querySelector(elem.getAttribute('href')).classList.add('active');elem.parentElement.classList.add('active');});});});(function(){document.addEventListener("DOMContentLoaded",(event)=>{wowAnimation();});function percentageAnimation(box){var countDown=false;var startPoint;var endPoint;box.querySelectorAll('.count').forEach(function(item){var countTarget=parseInt(item.getAttribute('data-abpi-target'))||100;if(!countDown){startPoint=0;endPoint=countTarget;}
else{startPoint=countTarget;endPoint=0;}
animateValue(item,startPoint,endPoint,2000);});}
function animateValue(obj,start,end,duration){let startTimestamp=null;const step=(timestamp)=>{if(!startTimestamp)startTimestamp=timestamp;const progress=Math.min((timestamp-startTimestamp)/duration,1);obj.innerHTML=Math.floor(progress*(end-start)+start);if(progress<1){window.requestAnimationFrame(step);}};window.requestAnimationFrame(step);}
function wowAnimation(){var wow=new WOW({boxClass:'wow',animateClass:'animated',offset:0,mobile:true,live:true,callback:function(box){if(box.classList.contains("countanimation")){percentageAnimation(box);}},scrollContainer:null});wow.init();}})();var carouselQuoteResizeTimer;var carouselQuoteAutoSlideTimer;var CarouselQuoteList=[];document.addEventListener("DOMContentLoaded",(event)=>{var quoteCarousels=[];var slideIndex=[];var slideId=[];window.addEventListener('resize',function(event){clearTimeout(carouselQuoteResizeTimer);carouselQuoteResizeTimer=setTimeout(ResetCarouselQuoteHeight,250);});var getPreviousSibling=function(elem){var previousElement=elem.previousElementSibling;return previousElement;}
var getNextSibling=function(elem){var nextElement=elem.nextElementSibling;return nextElement;}
var blockquoteItems=document.querySelectorAll(".abpi__blockquote");blockquoteItems.forEach((elem)=>{var previousSibling=getPreviousSibling(elem);if(previousSibling==undefined||previousSibling.nodeName!="BLOCKQUOTE"){var nextSibling=getNextSibling(elem);if(nextSibling==undefined||nextSibling.nodeName=="BLOCKQUOTE"){var seriesOfQuotes=[elem];while(nextSibling&&nextSibling.nodeName=="BLOCKQUOTE")
{seriesOfQuotes.push(nextSibling);nextSibling=getNextSibling(nextSibling);}
if(seriesOfQuotes.length>1)
{var wrapper=document.createElement('div');wrapper.className="abpi__multipleblockquotes";seriesOfQuotes[0].parentNode.insertBefore(wrapper,seriesOfQuotes[0]);for(var i=0;i<seriesOfQuotes.length;i++){wrapper.appendChild(seriesOfQuotes[i]);}
quoteCarousels.push(wrapper);}}}});var createCarousel=function(){var CreatePrevNextButtons=function(blockquoteWrapper,i){var prevAnchor=document.createElement('a');prevAnchor.className="prevbtn";prevAnchor.addEventListener("click",function(){prevAnchorClickHandler(i);},false);var prevAnchorLinkText=document.createTextNode('\u2039');prevAnchor.appendChild(prevAnchorLinkText);prevAnchor.title="prev";blockquoteWrapper.appendChild(prevAnchor);var nextAnchor=document.createElement('a');nextAnchor.className="nextbtn";nextAnchor.addEventListener("click",function(){nextAnchorClickHandler(i);},false);var nextAnchorLinkText=document.createTextNode('\u203A');nextAnchor.appendChild(nextAnchorLinkText);nextAnchor.title="next";blockquoteWrapper.appendChild(nextAnchor);}
function prevAnchorClickHandler(i){clearInterval(carouselQuoteAutoSlideTimer);carouselQuoteAutoSlideTimer=setInterval(changeSlides,7000);showSlides(slideIndex[i]+=-1,i);}
function nextAnchorClickHandler(i){clearInterval(carouselQuoteAutoSlideTimer);carouselQuoteAutoSlideTimer=setInterval(changeSlides,7000);showSlides(slideIndex[i]+=1,i);}
var showSlides=function(n,no){var k;var quoteSlideElem=document.getElementsByClassName(slideId[no]);if(n>quoteSlideElem.length){slideIndex[no]=1}
if(n<1){slideIndex[no]=quoteSlideElem.length}
for(k=0;k<quoteSlideElem.length;k++){quoteSlideElem[k].style.display="none";}
quoteSlideElem[slideIndex[no]-1].style.display="block";}
var blockquoteWrapper=document.getElementsByClassName("abpi__multipleblockquotes");for(var i=0;i<blockquoteWrapper.length;i++)
{CreatePrevNextButtons(blockquoteWrapper[i],i);var currentblockquoteWrapper=blockquoteWrapper[i].querySelectorAll("blockquote");var blockquoteClass="blockquote-slide"+(i+1);slideId.push(blockquoteClass);slideIndex.push(1);for(var j=0;j<currentblockquoteWrapper.length;j++){currentblockquoteWrapper[j].className+=" fade "+blockquoteClass;}
SetQuoteCarouselHeight(blockquoteWrapper[i]);showSlides(1,i);}
var changeSlides=function(){for(var i=0;i<quoteCarousels.length;i++){var wrapper=quoteCarousels[i];var nextButton=wrapper.querySelector('a.nextbtn');if(nextButton){nextButton.click();}}}
var carouselQuoteAutoSlideTimer=setInterval(changeSlides,7000);}
createCarousel();});function SetQuoteCarouselHeight(elem){var allCarouselQuotes=Array.from(elem.querySelectorAll('blockquote'));CarouselQuoteList.length=0;if(allCarouselQuotes.length>0){allCarouselQuotes.forEach((elem)=>{elem.style.display="block";CarouselQuoteList.push(elem.clientHeight);elem.style.display="none";});}
var maxHeight=Math.max.apply(null,CarouselQuoteList);if(allCarouselQuotes.length>0){allCarouselQuotes[0].parentNode.style.height=maxHeight+"px";}}
function ResetCarouselQuoteHeight(){var allCarouselQuotes=Array.from(document.getElementsByClassName("abpi__multipleblockquotes"));allCarouselQuotes.forEach((elem)=>{elem.style.height=null;SetQuoteCarouselHeight(elem);});}
var stickyNavScrollTimer;var stickyNavResizeTimer;var stickyNavList=[];document.addEventListener("DOMContentLoaded",(event)=>{GetStickyNavList();window.onscroll=function(){clearTimeout(stickyNavScrollTimer);stickyNavScrollTimer=setTimeout(CheckStickyNavStatus,10);};window.onresize=function(){clearTimeout(stickyNavResizeTimer);stickyNavResizeTimer=setTimeout(GetStickyNavList,250);};if(window.location.hash){setTimeout(function(){var headerOffset=document.querySelector('header').offsetHeight;var elementPosition=document.scrollingElement.scrollTop;var offsetPosition=elementPosition-headerOffset;window.scrollTo({top:offsetPosition,});},1);}});function GetStickyNavList(){var allStickyNavs=document.querySelectorAll('.sticky-nav-container');stickyNavList.length=0;allStickyNavs.forEach((elem)=>{var sentinal=elem.previousElementSibling;stickyNavList.push(elem);});CheckStickyNavStatus();}
function CheckStickyNavStatus(){var stickyNavSet=false;for(var i=stickyNavList.length-1;i>-1;i--){var anchoringNavInstance=stickyNavList[i];if(stickyNavSet==false){var backtotop=anchoringNavInstance.getElementsByClassName("back-to-top__button");if(stickyNavList[i].offsetTop<window.pageYOffset){anchoringNavInstance.classList.add("sticky-nav");stickyNavSet=true;if(backtotop.length>0){backtotop[0].classList.add("back-to-top__button--sticky");}}
else{anchoringNavInstance.classList.remove("sticky-nav");if(backtotop.length>0){backtotop[0].classList.remove("back-to-top__button--sticky");}}}
else{anchoringNavInstance.classList.remove("sticky-nav");}}}
document.addEventListener("DOMContentLoaded",(event)=>{var videoTranscripts=document.querySelectorAll(".gridelement__videoTranscript");videoTranscripts.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(elem.classList.contains("VideoBlockopen")){elem.classList.remove("VideoBlockopen");}else{elem.classList.add("VideoBlockopen");}});});});(function(){document.addEventListener("DOMContentLoaded",(event)=>{wowAnimation();});const animateCSS=(element,animation,prefix='animate__')=>new Promise((resolve,reject)=>{const animationName=`${prefix}${animation}`;var node=null;if(typeof element==='string'||element instanceof String){node=document.querySelector(element);}
else{node=element;}
node.classList.add(`${prefix}animated`,animationName);function handleAnimationEnd(event){event.stopPropagation();node.classList.remove(`${prefix}animated`,animationName);resolve('Animation ended');}
node.addEventListener('animationend',handleAnimationEnd,{once:true});});function yearsAnimation(box){box.querySelector('.animatedyeartext').style.visibility='hidden';box.querySelectorAll('.checkboxes div').forEach(element=>{element.style.visibility='hidden';});;var year=box.querySelector('.sepanimatedyearlabel');if(year){animateCSS('.sepanimatedyearlabel','bounceInDown').then((message)=>{console.log(message);box.querySelector('.animatedyeartext').style.visibility='visible';animateCSS('.animatedyeartext','fadeIn').then((message)=>{box.querySelectorAll('.checkboxes div').forEach(element=>{animateCSS(element,'zoomIn');});;});});}
var firstlabel=box.querySelector('.sepanimatedyearlabel .firstlabel');if(firstlabel){console.log('found first');animateCSS(firstlabel,'bounce');}
var secondlabel=box.querySelector('.sepanimatedyearlabel .secondlabel');if(secondlabel){secondlabel.classList.add('animate__animated','animate__bounce');}
var thirdlabel=box.querySelector('.sepanimatedyearlabel .thirdlabel');if(thirdlabel){thirdlabel.classList.add('animate__animated','animate__bounce');}
var fourthLabel=box.querySelector('.sepanimatedyearlabel .fourthlabel');if(fourthLabel){fourthLabel.classList.add('animate__animated','animate__bounce');}}
function animateValue(obj,start,end,duration){let startTimestamp=null;const step=(timestamp)=>{if(!startTimestamp)startTimestamp=timestamp;const progress=Math.min((timestamp-startTimestamp)/duration,1);obj.innerHTML=Math.floor(progress*(end-start)+start);if(progress<1){window.requestAnimationFrame(step);}};window.requestAnimationFrame(step);}
function wowAnimation(){var wow=new WOW({boxClass:'wow',animateClass:'animated',offset:0,mobile:true,live:true,callback:function(box){if(box.classList.contains("yearanimation")){yearsAnimation(box);}},scrollContainer:null});wow.init();}})();document.addEventListener("DOMContentLoaded",(event)=>{var acc=document.querySelectorAll(".accordion__heading");acc.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(elem.parentElement.open){setTimeout(function(){elem.parentElement.open=false;},100);}
else{acc.forEach((elem)=>{if(elem.parentElement.open){elem.parentElement.open=false;}});}});});});document.addEventListener("DOMContentLoaded",(event)=>{var anchorNavArrowElement=document.querySelectorAll(".sub-nav-container__items__item__arrow");anchorNavArrowElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(document.documentElement.clientWidth<992){var items=Array.from(elem.parentElement.parentElement.children);if(elem.parentElement.parentElement.getElementsByClassName('active').length===elem.parentElement.parentElement.getElementsByClassName('sub-nav-container__items__item').length){items.forEach((elem)=>{elem.classList.remove('active');elem.classList.remove('borderbottom');})
elem.parentElement.classList.add('active');elem.classList.remove('open');}
else{items.forEach((elem)=>{elem.firstElementChild.nextElementSibling.classList.remove('arrow-active');elem.classList.add('active');elem.classList.add('borderbottom');})
items[0].firstElementChild.nextElementSibling.classList.add('arrow-active');elem.classList.add('open');}}});});var anchorNavElement=document.querySelectorAll(".anchoring-nav-container .sub-nav-container__items__item__title");anchorNavElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();if(document.documentElement.clientWidth<992){var items=Array.from(elem.parentElement.parentElement.children);items.forEach((elem)=>{elem.classList.remove('active');})
elem.parentElement.classList.add('active');var arrowItems=Array.from(elem.parentElement.parentElement.getElementsByClassName('arrow-active'));arrowItems.forEach((elem)=>{elem.classList.remove('arrow-active');})
elem.nextElementSibling.classList.add('arrow-active');elem.nextElementSibling.classList.remove('open');elem.parentElement.classList.remove('borderbottom');}
var StickyElementsHeight=CalculateStickyElementsHeight();const href=elem.getAttribute("href");var topOfElement=document.querySelector(href).offsetTop-StickyElementsHeight;window.scroll({top:topOfElement,behavior:"smooth"});});});var anchorNavElement=document.querySelector(".back-to-top__button");if(anchorNavElement){anchorNavElement.addEventListener('click',(e)=>{e.preventDefault();window.scrollTo({top:0,behavior:'smooth'});});}});function CalculateStickyElementsHeight(){var globalNavHeight=0;var anchoringNavHeight=0;var localNavHeight=0;var stickyElementsHeight=0;var offset=90;if(document.querySelectorAll('.anchoring-nav-container').length>0){anchoringNavHeight=document.querySelectorAll('.anchoring-nav-container')[0].offsetHeight*document.querySelectorAll('.anchoring-nav-container').length;}
if(document.querySelectorAll('.local-nav-container').length>0){localNavHeight=document.querySelectorAll('.local-nav-container')[0].offsetHeight*document.querySelectorAll('.local-nav-container').length;}
if(document.documentElement.clientWidth<992){stickyElementsHeight=anchoringNavHeight-offset;}
else{globalNavHeight=document.querySelector('header').offsetHeight;stickyElementsHeight=anchoringNavHeight+globalNavHeight-offset;}
return stickyElementsHeight;}
document.addEventListener("DOMContentLoaded",(event)=>{var paginationBtnElement=document.querySelectorAll(".pagination__btn");paginationBtnElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();var pageNo=elem.getAttribute("href").slice(1);var parentId=elem.closest(".abpi__pagination__parent").id;var paramName=parentId+"_"+"page";var paramValue=pageNo;var searchParams=new URLSearchParams(window.location.search);searchParams.set(paramName,paramValue);window.location.search=searchParams.toString();})})})
document.addEventListener("DOMContentLoaded",(event)=>{document.addEventListener('keydown',(event)=>{if(event.key==='Escape'){event.preventDefault()
document.querySelector('.hero__link--selected .hero__anchor').focus();document.querySelector('.hero__link--selected .hero__anchor').dispatchEvent(new Event('click'))
document.querySelectorAll('.hero__anchor').forEach(element=>{element.setAttribute('tabindex','0')})}});document.querySelectorAll(".hero_linkdetailclosebutton").forEach(element=>{element.setAttribute('tabindex','-1');})
document.querySelectorAll(".hero__linkdetailwrapper a").forEach(element=>{element.setAttribute('tabindex','-1');})
var heroAnchors=document.getElementsByClassName('hero__anchor');var closeButtons=document.getElementsByClassName('hero__linkdetailclosebutton');var otherCloseButtons=document.querySelectorAll(".hero__linkdetail button");var shownLinkDetailDivsClassName='hero__linkdetailwrapper--show';var selectedHeroLinksClassName='hero__link--selected';for(var i=0;i<heroAnchors.length;i++){heroAnchors[i].addEventListener('click',function(e){var current=this;document.querySelectorAll('.hero__anchor').forEach(element=>{element.setAttribute('tabindex','-1')})
current.setAttribute('tabindex','0')
document.querySelectorAll(current.getAttribute('href')+" a").forEach(element=>{element.setAttribute('tabindex','0')});document.querySelectorAll(current.getAttribute('href')+" a")[document.querySelectorAll(current.getAttribute('href')+" a").length-1].addEventListener('blur',function(event){document.querySelectorAll('.hero__anchor').forEach(element=>{element.setAttribute('tabindex','0')})
if(document.querySelector('.hero__link--selected').nextElementSibling!=null){document.querySelector('.hero__link--selected').nextElementSibling.querySelector('.hero__anchor').focus();}})
var shownLinkDetailDivs=document.getElementsByClassName(shownLinkDetailDivsClassName);var selectedHeroLinks=document.getElementsByClassName(selectedHeroLinksClassName);var id=this.hash.substring(1);var linkDetailDiv=document.getElementById(id);if(current.parentNode.classList.contains(selectedHeroLinksClassName)===false)
{for(var i=0;i<selectedHeroLinks.length;i++){selectedHeroLinks[i].classList.remove(selectedHeroLinksClassName);}
for(var i=0;i<shownLinkDetailDivs.length;i++){shownLinkDetailDivs[i].classList.remove(shownLinkDetailDivsClassName);}
current.parentNode.classList.add(selectedHeroLinksClassName);linkDetailDiv.classList.add(shownLinkDetailDivsClassName);}
else
{current.parentNode.classList.remove(selectedHeroLinksClassName);linkDetailDiv.classList.remove(shownLinkDetailDivsClassName)}
e.preventDefault();});heroAnchors[i].addEventListener('keydown',event=>{if(event.code==="Space"){event.preventDefault()
event.target.dispatchEvent(new Event('click'))}})}
var wireUpCloseButtons=function(e){var current=this;var divWithId;if(current.parentNode.classList.contains("hero__linkdetaillinksbox")){divWithId=current.parentNode.parentNode.parentNode;}
else{divWithId=current.parentNode.parentNode;}
divWithId.classList.remove(shownLinkDetailDivsClassName);var els=document.querySelectorAll("a[href='#"+divWithId.id+"']");els[0].parentNode.classList.remove(selectedHeroLinksClassName);e.preventDefault();};for(var i=0;i<closeButtons.length;i++){closeButtons[i].addEventListener('click',wireUpCloseButtons);}
for(var i=0;i<otherCloseButtons.length;i++){otherCloseButtons[i].addEventListener('click',wireUpCloseButtons);}});document.addEventListener("DOMContentLoaded",(event)=>{document.querySelectorAll('figcaption').forEach(element=>{let sqBrackets=element.textContent.match(/\[[^\]]*]/g);let uniqueSqBrackets=sqBrackets.filter((value,index)=>{return sqBrackets.indexOf(value)==index;});uniqueSqBrackets.forEach(item=>{element.textContent=element.textContent.replaceAll(item,item.sup())})
element.innerHTML=element.textContent});})
document.addEventListener("DOMContentLoaded",(event)=>{var popOutvideoTranscripts=document.querySelectorAll(".gridelement__video__inner__typescript");popOutvideoTranscripts.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(elem.classList.contains("popOutTranscriptopen")){elem.classList.remove("popOutTranscriptopen");}else{elem.classList.add("popOutTranscriptopen");}});});});document.addEventListener("DOMContentLoaded",(event)=>{var paginationBtnElement=document.querySelectorAll(".socialMediaResource__fiterButton");paginationBtnElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();var filterText=elem.text;var parentId=elem.closest(".abpi__pagination__parent").id;var paramName=parentId+"_"+"cat";var paramPage=parentId+"_"+"page";var paramValue=filterText;var searchParams=new URLSearchParams(window.location.search);searchParams.set(paramName,paramValue);searchParams.set(paramPage,1);window.location.search=searchParams.toString();})})});;
