window.isiOS=!1;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){window.isiOS=!0} window.isiOSVersion='';if(window.isiOS){var version=(navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);if(version!==null){window.isiOSVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}} 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&&nowx){sliderContainer.style.transform='translate(-'+(totalSlides-1)*sliderWidth+'px, 0)'}}));if(typeof jQuery!=='undefined'){$(container).bind('displayChanged',function(){sliderContainer.style.width='100%';setTimeout(function(){sliderWidth=parseFloat(getComputedStyle(items[0],null).width.replace('px',''));sliderContainer.style.width=sliderWidth*totalSlides+'px';t958_checkSize(rec);t958_findVisibleCards(rec);t958_initPopup(rec)},300)})}else{container.addEventListener('displayChanged',function(){sliderContainer.style.width='100%';setTimeout(function(){sliderWidth=parseFloat(getComputedStyle(items[0],null).width.replace('px',''));sliderContainer.style.width=sliderWidth*totalSlides+'px';t958_checkSize(rec);t958_findVisibleCards(rec);t958_initPopup(rec)},300)})} rec.querySelector('.t958__next').addEventListener('click',function(){t958_slide(rec,'right')});rec.querySelector('.t958__previous').addEventListener('click',function(){t958_slide(rec,'left')});if(window.innerWidth>640){t958_findVisibleCards(rec)}else{t_onFuncLoad('Hammer',function(){t958_initSliderSwipe(rec)});for(var i=0;iwindowWidth){for(var i=0;i=totalSlides){position=0;container.setAttribute('data-slide-pos',position)}}else{container.setAttribute('data-slide-pos',--position);if(position<=-1){position=totalSlides-1;container.setAttribute('data-slide-pos',position)}} container.style.transform='translate(-'+sliderWidth*position+'px, 0)';container.style.transitionDuration='.3s';setTimeout(function(){t958_findVisibleCards(rec);if(isiOS){var activeIndex=container.getAttribute('data-slide-pos');if(activeIndex)activeIndex=parseInt(activeIndex,10);var activeSlide=typeof activeIndex==='number'?items[activeIndex]:null;if(activeSlide)t958__hideMobileSlides(activeSlide)}},350);if(window.lazy==='y'||allrecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}} function t958_findVisibleCards(rec){var cards=rec.querySelectorAll('.t958__card');var prevControl=rec.querySelector('.t958__previous');var nextControl=rec.querySelector('.t958__next');for(var i=0;i=0){card.classList.add('t958__card-left')}else if(cardLeftPos<=windowWidth&&cardRightPos>=windowWidth){card.classList.add('t958__card-right')}else if(cardLeftPos>=0&&cardRightPos<=windowWidth){card.classList.add('t958__card-visible')}} var leftCard=rec.querySelector('.t958__card-left');var rightCard=rec.querySelector('.t958__card-right');if(leftCard){var leftCardRect=leftCard.getBoundingClientRect().left;var leftCardWidth=parseFloat(getComputedStyle(leftCard,null).width.replace('px',''));var leftCardOffset=leftCardWidth-Math.abs(leftCardRect);if(leftCardOffset>=30){prevControl.style.width=leftCardOffset+'px'}else{prevControl.style.width=100+'px'}} if(rightCard){var rightCardRect=rightCard.getBoundingClientRect().left;var rightCardStyle=getComputedStyle(rightCard,null);var paddingLeft=parseInt(rightCardStyle.paddingLeft)||0;var paddingRight=parseInt(rightCardStyle.paddingRight)||0;var rightCardWidth=rightCard.clientWidth-(paddingLeft+paddingRight);var rightCardOffset=rightCardWidth-(rightCardRect+rightCardWidth-window.innerWidth);if(rightCardOffset>=30){nextControl.style.width=rightCardOffset+'px'}else{nextControl.style.width=100+'px'}}} function t958_initPopup(rec){if(rec.querySelector('.t958').classList.contains('t958_preview'))return;var fadeCards=rec.querySelectorAll('.t958__card_fade[data-review-block^="review"]');for(var i=0;iwindowHeight){popupContainer.classList.add('t-popup__container-static')}else{popupContainer.classList.remove('t-popup__container-static')}} function t958_showPopup(rec){var allrecords=document.getElementById('allrecords');var popup=rec.querySelector('.t-popup');var popupContainer=rec.querySelector('.t-popup__container');var popupClose=rec.querySelector('.t-popup__close');popup.style.display='block';setTimeout(function(){popupContainer.classList.add('t-popup__container-animated');popup.classList.add('t-popup_show');t958_checkPopupSize(rec);if(window.lazy==='y'||allrecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},50);if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed');popup.removeEventListener('mousedown',t958_mousedownEvent);popup.addEventListener('mousedown',t958_mousedownEvent);popupClose.removeEventListener('click',t958_closePopup);popupClose.addEventListener('click',t958_closePopup);document.removeEventListener('keydown',t958_keydownEvent);document.addEventListener('keydown',t958_keydownEvent)} function t958_mousedownEvent(event){var windowWidth=window.innerWidth;var maxScrollBarWidth=17;var windowWithoutScrollBar=windowWidth-maxScrollBarWidth;if(event.clientX>windowWithoutScrollBar)return;if(event.target==this)t958_closePopup()} function t958_keydownEvent(event){if(event.keyCode==27)t958_closePopup()} function t958_closePopup(){var popupShow=document.querySelector('.t-popup.t-popup_show');if(popupShow){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed');popupShow.classList.remove('t-popup_show');setTimeout(function(){var popups=document.querySelectorAll('.t-popup:not(.t-popup_show)');document.body.scrollTop=0;for(var i=0;i960?5:3;if(slides.length<=maxSlidesViewed*2)return;var activeSlideIndex=activeSlide.getAttribute('data-slide-index');activeSlideIndex=parseInt(activeSlideIndex,10);var activeIndexList=[activeSlideIndex];for(var i=1;i0){activeIndexList.push(activeSlideIndex-i)}else{activeIndexList.push(slides.length+1-i)}} var innactiveClass='t-slds__item-innactive';slides.forEach(function(slide){var isActiveIndexSlide=activeIndexList.some(function(index){return parseInt(slide.getAttribute('data-slide-index'),10)===index});isActiveIndexSlide?slide.classList.remove(innactiveClass):slide.classList.add(innactiveClass);slide.style.width=slideWidth&&!isActiveIndexSlide?slideWidth:''})} function t533_equalHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t533');if(!container)return;var rows=rec.querySelectorAll('.t533__row');var wrapTexts=rec.querySelectorAll('.t533__textwrapper');container.style.visibility='visible';for(var i=0;iheightBox)heightBox=elementHeight} for(var j=0;j=960&&element.offsetParent!==null){element.style.height=heightBox+'px'}else{element.style.height='auto'}}}}