window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t142_checkSize(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t142__submit');if(!button)return;var buttonStyle=getComputedStyle(button,null);var buttonPaddingTop=parseInt(buttonStyle.paddingTop)||0;var buttonPaddingBottom=parseInt(buttonStyle.paddingBottom)||0;var buttonHeight=button.clientHeight-(buttonPaddingTop+buttonPaddingBottom)+5;var textHeight=button.scrollHeight;if(buttonHeight<textHeight){button.classList.add('t142__submit-overflowed')}}
function t939_init(recId){t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t604_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;t604_imageHeight(recid);t604_arrowWidth(recid);t604_show(recid);t604_hide(recid);window.addEventListener('resize',t_throttle(function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)});t604_arrowWidth(recid)}));if(typeof jQuery!=='undefined'){$(rec).find('.t604').bind('displayChanged',function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)});t604_arrowWidth(recid)})}else{var currentBlock=rec.querySelector('.t604');if(currentBlock){currentBlock.addEventListener('displayChanged',function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)});t604_arrowWidth(recid)})}}}
function t604_show(recid){var rec=document.getElementById('rec'+recid);var playBtns=rec.querySelectorAll('.t604__play');Array.prototype.forEach.call(playBtns,function(play){play.addEventListener('click',function(){var parent=play.parentElement;var videoBg=parent?parent.querySelector('.t-slds__bgimg'):null;if(videoBg)videoBg.style.opacity='0';var sliderVideo=play.getAttribute('data-slider-video-type');var url=play.getAttribute('data-slider-video-url');var nextEl=play.nextElementSibling;if(nextEl)nextEl.style.zIndex='3';var iframe;switch(sliderVideo){case 'youtube':iframe=document.createElement('iframe');iframe.classList.add('t604__iframe');iframe.width='100%';iframe.height='100%';iframe.src='https://www.youtube.com/embed/'+url+'?autoplay=1&enablejsapi=1';iframe.frameBorder='0';iframe.setAttribute('webkitallowfullscreen','');iframe.setAttribute('mozallowfullscreen','');iframe.setAttribute('allowfullscreen','');iframe.setAttribute('allow','autoplay');if(nextEl)nextEl.innerHTML='';if(nextEl)nextEl.appendChild(iframe);break;case 'vimeo':var idMatch=/vimeo[^/]*\/(\d+)\/?(\w*)\/?/i.exec(url);var id=idMatch?idMatch[1]:null;var hash=idMatch?'?h='+idMatch[2]:null;iframe=document.createElement('iframe');iframe.classList.add('t604__iframe');iframe.width='100%';iframe.height='100%';iframe.src='https://player.vimeo.com/video/'+id+hash+'?autoplay=1&amp;api=1';iframe.frameBorder='0';iframe.setAttribute('webkitallowfullscreen','');iframe.setAttribute('mozallowfullscreen','');iframe.setAttribute('allowfullscreen','');if(nextEl)nextEl.innerHTML='';if(nextEl)nextEl.appendChild(iframe);break}})})}
function t604_hide(recid){var rec=document.getElementById('rec'+recid);var frames=rec.querySelectorAll('.t604__frame');rec.addEventListener('updateSlider',function(){Array.prototype.forEach.call(frames,function(frame){frame.innerHTML='';frame.style.zIndex=''})})}
function t604_imageHeight(recid){var rec=document.getElementById('rec'+recid);var images=rec.querySelectorAll('.t604__separator');Array.prototype.forEach.call(images,function(image){var imgHeight=image.getAttribute('data-slider-image-height');var imgWidth=image.getAttribute('data-slider-image-width');var imgRatio=imgHeight/imgWidth;var imgPadding=imgRatio*100;image.style.paddingBottom=imgPadding+'%'})}
function t604_arrowWidth(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var arrows=rec.querySelectorAll('.t-slds__arrow_wrapper');var slide=rec.querySelector('.t-slds__wrapper');var slideWidth=slide?slide.offsetWidth:0;if(slide&&slideWidth===0){t_onFuncLoad('t_slds_SliderWidth',function(){setTimeout(function(){slideWidth=slide.offsetWidth;t604__updateArrowWidth(slideWidth,arrows)},300)})}else{t604__updateArrowWidth(slideWidth,arrows)}}
function t604__updateArrowWidth(slideWidth,arrows){var calcArrowWidth=window.innerWidth-slideWidth;var arrowWidth=window.innerWidth>960?(calcArrowWidth/2)+'px':'';if(arrowWidth!=='0px'&&arrowWidth!==''){Array.prototype.forEach.call(arrows,function(arrow){arrow.style.width=arrowWidth})}}
function t604__UpdateSliderArrowsHeight(recid){var sliderRec=document.getElementById('rec'+recid);if(!sliderRec)return;var activeItem=sliderRec.querySelector('.t-slds__item_active');if(activeItem){var separator=activeItem.querySelector('.t604__separator');var isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var offsetForVideoBtns=0;var isVideo=activeItem.querySelector('[data-slider-video-type]');if(isVideo&&isMobile)offsetForVideoBtns=40;var itemPaddingTop=parseInt(getComputedStyle(activeItem).paddingTop)||0;var itemPaddingBottom=parseInt(getComputedStyle(activeItem).paddingBottom)||0;var height=(itemPaddingTop+itemPaddingBottom)-offsetForVideoBtns;if(separator&&separator.hasAttribute('data-slider-image-height')&&activeItem.clientHeight===0){height=parseInt(separator.getAttribute('data-slider-image-height'))-height}else{height=activeItem.clientHeight-height}}
var arrowWrappers=sliderRec.querySelectorAll('.t-slds__arrow_wrapper');if(height&&arrowWrappers.length>0){Array.prototype.forEach.call(arrowWrappers,function(arrowWrapper){arrowWrapper.style.height=height+'px';var arrow=arrowWrapper.querySelector('.t-slds__arrow');if(arrow)arrow.style.marginTop=offsetForVideoBtns/2+'px'})}}