window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
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&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t975_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var tildaCopy=document.getElementById('tildacopy');var menu=rec.querySelector('.t975');t_onFuncLoad('t_menu__highlightActiveLinks',function(){t_menu__highlightActiveLinks('.t975__list-item a')});if(menu)menu.classList.remove('t975__beforeready');t975_checkAnchorLinks(recid,'.t975__list-item a');var isIphone=t975_detectIphone();var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(menu&&menu.getAttribute('data-hidemenuonscroll')||isIphone){t975_handleScroll(menu,tildaCopy)}
if(tildaCopy&&scrollHeight>document.documentElement.clientHeight){t975_addCopyrightMargin(menu,tildaCopy);t975_handleScroll(menu,tildaCopy)}
window.addEventListener('resize',function(){t975_changeCopyrightMargin(menu,tildaCopy)})}
function t975_addCopyrightMargin(menu,tildaCopy){if(!tildaCopy||!menu)return;var paddingElement=document.createElement('div');paddingElement.style.backgroundColor='#000';paddingElement.style.height=menu.offsetHeight+'px';paddingElement.classList.add('t-tildalabel-padding');document.body.appendChild(paddingElement)}
function t975_changeCopyrightMargin(menu,tildaCopy){var paddingElement=document.querySelector('.t-tildalabel-padding');if(!paddingElement||!tildaCopy||!menu)return;paddingElement.style.height=menu.offsetHeight+'px'}
function t975_detectIphone(){var isIphone=/iPhone/.test(navigator.userAgent)&&!window.MSStream;var aspect=window.screen.width/window.screen.height;var iphoneAspect='0.462';if(isIphone&&aspect.toFixed(3)===iphoneAspect){return!0}}
function t975_checkAnchorLinks(recid,selector){var rec=document.getElementById('rec'+recid);var anchorSelector=selector+'[href*="#"]:not(.tooltipstered)';var navLinks=rec?rec.querySelectorAll(anchorSelector):[];if(navLinks.length){t_onFuncLoad('t_menu__updateActiveLinks',function(){t_menu__updateActiveLinks(navLinks,selector)})}}
function t975_handleScroll(menu){var lastScrollTop=0;var delta=5;var timerID;var diff;window.addEventListener('scroll',function(){var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var isClicked=menu?menu.getAttribute('data-clicked-link'):'';var currentScrollTop=window.pageYOffset;if(Math.abs(lastScrollTop-currentScrollTop)<=delta||window.pageYOffset<0||window.pageYOffset>scrollHeight-window.innerHeight){return}
if(menu&&menu.getAttribute('data-hidemenuonscroll')&&!isClicked){var menuHeight=menu.offsetHeight;var currentTransformValue=menu.style.transform;if(currentScrollTop>lastScrollTop&&window.pageYOffset<=scrollHeight-(window.innerHeight+menuHeight)){diff=0;if(currentTransformValue){diff=parseInt(currentTransformValue.replace('translateY(',''),10)}
clearInterval(timerID);timerID=setInterval(function(){menu.style.transform='translateY('+diff+'px)';diff+=menuHeight/50;if(diff>=menuHeight){menu.style.transform='translateY('+menuHeight+'px)';clearInterval(timerID)}})}else{diff=menuHeight;if(currentTransformValue){diff=parseInt(currentTransformValue.replace('translateY(',''),10)}
clearInterval(timerID);timerID=setInterval(function(){menu.style.transform='translateY('+diff+'px)';diff-=menuHeight/50;if(diff<=0){menu.style.transform='translateY(0px)';clearInterval(timerID)}})}}
lastScrollTop=currentScrollTop})}
function t794_init(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t794'):null;var hook=menu?menu.getAttribute('data-tooltip-hook'):'';if(!hook)return;var hookLinks=document.querySelectorAll('a[href="'+hook+'"]');hookLinks=Array.prototype.filter.call(hookLinks,function(hookLink){var isSubmenuAllowed=hookLink.getAttribute('data-submenu-disallowed')!=='yes';if(isSubmenuAllowed){hookLink.classList.add('t794__tm-link');hookLink.setAttribute('data-tooltip-menu-id',recid);return!0}
return!1});var parentMenu=hookLinks.length?hookLinks[0].closest('[data-menu]'):null;var tooltipMenu=rec.querySelector('.t794__tooltip-menu');var isParentFixed=parentMenu&&window.getComputedStyle(parentMenu).position==='fixed';if(tooltipMenu)tooltipMenu.setAttribute('data-pos-fixed',isParentFixed?'yes':'no');t794_addArrow(recid,hookLinks);t794_setUpMenu(recid,hookLinks);t_onFuncLoad('t_submenublocks__highlightActiveLinks',function(){t_submenublocks__highlightActiveLinks('.t794__list_item a')});if(menu.hasAttribute('data-full-submenu-mob')&&(window.isMobile||'ontouchend' in document)){t_onFuncLoad('t_submenublocks__setFullScreenMenu',function(){t_submenublocks__setFullScreenMenu(menu)})}}
function t794_addArrow(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenuBlock=rec?rec.querySelector('.t794'):null;var isArrowAppend=submenuBlock.getAttribute('data-add-arrow');if(!isArrowAppend)return;hookLinks=Array.prototype.slice.call(hookLinks);hookLinks.forEach(function(hookLink){var arrow=document.createElement('div');arrow.classList.add('t794__arrow');hookLink.appendChild(arrow);var isInsideZero=hookLink.closest('.tn-atom');var hasCustomBorderColor=window.getComputedStyle(hookLink).borderColor!=='rgba(0, 0, 0, 0)';if(isInsideZero&&!hasCustomBorderColor){hookLink.style.borderColor='initial';hookLink.style.border='none'}})}
function t794_setUpMenu(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenu=rec?rec.querySelector('.t794__tooltip-menu'):null;if(!submenu)return;var menuBlock=rec?rec.querySelector('.t794'):null;var verticalIndent=menuBlock.getAttribute('data-tooltip-margin');var content=submenu.querySelector('.t794__content');var hooksAndSubmenu=hookLinks.concat(submenu);if(window.innerWidth>980&&!('ontouchend' in document)){t_onFuncLoad('t_submenublocks__addEventsDesktop',function(){t_submenublocks__addEventsDesktop(submenu,hooksAndSubmenu,verticalIndent,'.t794')})}else{t_onFuncLoad('t_submenublocks__addEventsMobile',function(){t_submenublocks__addEventsMobile(submenu,hookLinks,verticalIndent,'.t794')})}
window.addEventListener('scroll',t_throttle(function(){if(content){content.addEventListener('mouseleave',function(){if(submenu.classList.contains('t794__tooltip-menu_show')){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t794')})}})}},300));var tooltipLinks=document.querySelectorAll('.t794__tooltip-menu a[href*="#"]');Array.prototype.forEach.call(tooltipLinks,function(tooltipLink){tooltipLink.addEventListener('click',function(){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t794')});var menuList=document.querySelectorAll('.t450, .t199__mmenu, .t280, .t282, .t204__burger, .t451, .t466');Array.prototype.forEach.call(menuList,function(menu){var event=document.createEvent('Event');event.initEvent('clickedAnchorInTooltipMenu',!0,!0);menu.dispatchEvent(event)});Array.prototype.forEach.call(tooltipLinks,function(link){link.classList.remove('t-active')});tooltipLink.classList.add('t-active')})})}
function t819_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var currentMode=document.querySelector('.t-records').getAttribute('data-tilda-mode');var tabs=rec.querySelectorAll('.t819__tab');var select=rec.querySelector('.t819__select');var content=rec.querySelectorAll('.t819__content');if(!tabs.length)return;if(!content.length)return;if(currentMode!=='edit'&&currentMode!=='preview'){t819_scrollToTabs(recid);window.onload=function(){t819_scrollToTabs(recid)}}
t819_showTabByUrl(recid,tabs,content,select);t819_showTab(recid,tabs,content,currentMode);t819_showTabMobile(recid,select,content,currentMode)}
function t819_showTab(recid,tabs,content,currentMode){var rec=document.querySelector('#rec'+recid);if(!rec)return;Array.prototype.forEach.call(tabs,function(tabItem){tabItem.addEventListener('click',function(event){var tabNumber=this.getAttribute('data-tab-number');rec.querySelector('.t819__wrapper').setAttribute('data-tab-current',tabNumber);Array.prototype.forEach.call(tabs,function(tabItem){tabItem.classList.remove('t819__tab_active');var button=tabItem.querySelector('.t817__tab-name');if(button){button.setAttribute('tabindex',-1);button.setAttribute('aria-selected',!1)}});Array.prototype.forEach.call(content,function(contentItem){contentItem.classList.remove('t819__content_active');if(parseInt(contentItem.getAttribute('data-tab-content-number'),10)===parseInt(tabNumber,10)){contentItem.classList.add('t819__content_active')}});tabItem.classList.add('t819__tab_active');var currentButton=tabItem.querySelector('.t817__tab-name');if(currentButton){currentButton.setAttribute('tabindex',0);currentButton.setAttribute('aria-selected',!0)}
t819_changeUrl(recid,currentMode,tabNumber);t819__updateLazyLoad(currentMode);event.preventDefault()});tabItem.addEventListener('keydown',function(event){var currentIndex=Number(rec.querySelector('.t819__wrapper').getAttribute('data-tab-current'));var prevent=!1;switch(event.key){case 'Left':case 'ArrowLeft':currentIndex=currentIndex===1?tabs.length:currentIndex-1;t819_showActiveTabFromKeyboard(recid,tabs,content,currentMode,currentIndex);prevent=!0;break;case 'Right':case 'ArrowRight':currentIndex=currentIndex===tabs.length?1:currentIndex+1;t819_showActiveTabFromKeyboard(recid,tabs,content,currentMode,currentIndex);prevent=!0;break;default:break}
if(prevent){event.stopPropagation();event.preventDefault()}})})}
function t819_showActiveTabFromKeyboard(recid,tabs,content,currentMode,currentIndex){var rec=document.querySelector('#rec'+recid);Array.prototype.forEach.call(tabs,function(tabItem){tabItem.classList.remove('t819__tab_active');var button=tabItem.querySelector('.t819__tab-name');if(button){button.setAttribute('tabindex',-1);button.setAttribute('aria-selected',!1)}});Array.prototype.forEach.call(content,function(contentItem){contentItem.classList.remove('t819__content_active')});var currentTab=rec.querySelector('[data-tab-number="'+currentIndex+'"]');if(!currentTab)return;currentTab.classList.add('t819__tab_active');var currentButton=currentTab.querySelector('.t819__tab-name');if(currentButton){currentButton.setAttribute('tabindex',0);currentButton.setAttribute('aria-selected',!0);currentButton.focus()}
var currentContent=rec.querySelector('[data-tab-content-number="'+currentIndex+'"]');if(currentContent)currentContent.classList.add('t819__content_active');var tabList=rec.querySelector('.t819__wrapper');if(tabList)tabList.setAttribute('data-tab-current',currentIndex);t819_changeUrl(recid,currentMode,currentIndex);t819__updateLazyLoad(currentMode)}
function t819_changeUrl(recid,currentMode,index){t819_removeUrl();if(currentMode!=='edit'&&currentMode!=='preview'){if(typeof history.replaceState==='function'){window.history.replaceState('','',window.location.href+'#!/tab/'+recid+'-'+index)}}}
function t819__updateLazyLoad(currentMode){if(!currentMode){if(window.lazy==='y'||document.querySelector('#allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}}
function t819_showTabMobile(recid,select,content,currentMode){select.addEventListener('change',function(event){var tabNumberMobile=this.value;Array.prototype.forEach.call(content,function(contentItem){contentItem.classList.remove('t819__content_active');if(parseInt(contentItem.getAttribute('data-tab-content-number'),10)===parseInt(tabNumberMobile,10)){contentItem.classList.add('t819__content_active')}});t819_removeUrl();if(currentMode!=='edit'&&currentMode!=='preview'){if(typeof history.replaceState==='function'){window.history.replaceState('','',window.location.href+'#!/tab/'+recid+'-'+tabNumberMobile)}}
if(!currentMode){if(window.lazy==='y'||document.querySelector('#allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
event.preventDefault()})}
function t819_showTabByUrl(recid,tabs,content,select){var rec=document.querySelector('#rec'+recid);var currentUrl=window.location.href;var tabIndexNumber=currentUrl.indexOf(recid+'-');var tabIndex=currentUrl.substring(tabIndexNumber+recid.length+1);if(tabIndexNumber!==-1){Array.prototype.forEach.call(tabs,function(tabItem){if(parseInt(tabItem.getAttribute('data-tab-number'),10)===parseInt(tabIndex,10)){tabItem.classList.add('t819__tab_active');tabItem.querySelector('.t819__tab-name').setAttribute('tabindex',0);tabItem.querySelector('.t819__tab-name').setAttribute('aria-selected',!0)}});Array.prototype.forEach.call(content,function(contentItem){if(parseInt(contentItem.getAttribute('data-tab-content-number'),10)===parseInt(tabIndex,10)){contentItem.classList.add('t819__content_active')}});select.value=tabIndex;rec.querySelector('.t819__wrapper').setAttribute('data-tab-current',tabIndex)}else{tabs[0].classList.add('t819__tab_active');content[0].classList.add('t819__content_active');rec.querySelector('.t819__wrapper').setAttribute('data-tab-current',1);tabs[0].querySelector('.t819__tab-name').setAttribute('tabindex',0);tabs[0].querySelector('.t819__tab-name').setAttribute('aria-selected',!0)}}
function t819_scrollToTabs(recid){var currentUrl=window.location.href;var tabIndexNumber=currentUrl.indexOf('#!/tab/');var tabIndexNumberStart=currentUrl.indexOf('tab/');if(parseInt(tabIndexNumber,10)!==-1){var tabRecord=currentUrl.substring(tabIndexNumberStart+4,tabIndexNumberStart+4+recid.length);if(parseInt(tabRecord,10)===parseInt(recid,10)){var tabBlock=document.querySelector('#rec'+tabRecord).querySelector('.t819');var targetOffset=tabBlock.getBoundingClientRect().top+window.pageYOffset;if(window.innerWidth>960){var target=targetOffset-200}else{var target=targetOffset-100}
t819_scrollToEl(target,300)}}}
function t819_removeUrl(){var currentUrl=window.location.href;var indexToRemove=currentUrl.indexOf('#!/tab/');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&indexToRemove<0){indexToRemove=currentUrl.indexOf('%23!/tab/')}
currentUrl=currentUrl.substring(0,indexToRemove);if(parseInt(indexToRemove,10)!==-1){if(typeof history.replaceState==='function'){window.history.replaceState('','',currentUrl)}}}
function t819_scrollToEl(elTopPos,duration){if(elTopPos===window.pageYOffset)return!1;var difference=window.pageYOffset;var cashedDiff=window.pageYOffset;var step=(10*(elTopPos||window.pageYOffset))/duration;var timer=setInterval(function(){if(cashedDiff>elTopPos){difference-=step}else{difference+=step}
window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if(cashedDiff>elTopPos&&window.pageYOffset<=elTopPos){document.body.removeAttribute('data-scrollable');clearInterval(timer)}else if(cashedDiff<=elTopPos&&window.pageYOffset>=elTopPos){document.body.removeAttribute('data-scrollable');clearInterval(timer)}},10);var timer2=setTimeout(function(){clearInterval(timer);document.body.removeAttribute('data-scrollable');clearTimeout(timer2)},duration*2)}
function t527_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t527');if(!container)return;var images=rec.querySelectorAll('.t527__bgimg');if(!images[0])return;var imageWidth=images[0].getAttribute('data-image-width');var imageHeight=images[0].getAttribute('data-image-height');var imageRatio=imageHeight/imageWidth;var imagePadding=imageRatio*100;for(var i=0;i<images.length;i++){images[i].style.paddingBottom=imagePadding+'%'}}
function t543_init(recId){var rec=document.querySelector(recId);if(!rec)return;var container=rec.querySelector('.t543');if(!container)return;var titleTag=container.getAttribute('data-title-tag');if(!titleTag)return;function checkTitleTag(mql){if(mql.matches){t543_changeTitleTag(recId,'.t543 .t543__title','div');t543_changeTitleTag(recId,'.t543_mobile .t543__title',titleTag)}else{t543_changeTitleTag(recId,'.t543 .t543__title',titleTag);t543_changeTitleTag(recId,'.t543_mobile .t543__title','div')}}
if('matchMedia' in window||'msMatchMedia' in window){var matchMedia=window.matchMedia||window.msMatchMedia;var mql=matchMedia('(max-width: 960px)');mql.addEventListener('change',checkTitleTag);checkTitleTag(mql)}}
function t543_changeTitleTag(recId,nodeSelector,tagName){var rec=document.querySelector(recId);if(!rec)return;var titleNode=rec.querySelector(nodeSelector);if(!titleNode)return;var attrs=Array.prototype.slice.call(titleNode.attributes).map(function(attr){return attr.name+'="'+attr.value+'"'}).join(' ');var replaceTagStart='<'+tagName+' '+attrs+'>';var replaceTagEnd='</'+tagName+'>';titleNode.outerHTML=replaceTagStart+titleNode.innerHTML+replaceTagEnd}
function t1069_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t1069');if(!container)return;t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)});var rows=rec.querySelectorAll('.t1069__row');Array.prototype.forEach.call(rows,function(row){var titles=row.querySelectorAll('.t-card__title');var descriptions=row.querySelectorAll('.t-card__descr');var prices=row.querySelectorAll('.t1069__price');var subtitles=row.querySelectorAll('.t-card__uptitle');if(titles.length>0)t1069_equalHeight(titles);if(descriptions.length>0)t1069_equalHeight(descriptions);if(prices.length>0)t1069_equalHeight(prices);if(subtitles.length>0)t1069_equalHeight(subtitles)})}
function t1069_equalHeight(elements){var maxHeight=0;for(var i=0;i<elements.length;i++){elements[i].style.height=''}
for(var i=0;i<elements.length;i++){var element=elements[i];var elementStyle=getComputedStyle(element,null);var elementPaddingTop=parseInt(elementStyle.paddingTop)||0;var elementPaddingBottom=parseInt(elementStyle.paddingBottom)||0;var elementHeight=element.clientHeight-(elementPaddingTop+elementPaddingBottom);if(elementHeight>maxHeight)maxHeight=elementHeight}
if(window.innerWidth>=960){for(var i=0;i<elements.length;i++){elements[i].style.height=maxHeight+'px'}}else{for(var i=0;i<elements.length;i++){elements[i].style.height=''}}}
function t868_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;rec.setAttribute('data-animationappear','off');rec.style.opacity='1';var popup=rec.querySelector('.t-popup');if(!popup)return;var hook=popup.getAttribute('data-tooltip-hook');if(!hook)return;var analitics=popup.getAttribute('data-track-popup');var customCodeHTML=t868__readCustomCode(rec);var recBlocks=document.querySelectorAll('.r');for(var i=0;i<recBlocks.length;i++){recBlocks[i].addEventListener('click',function(event){var target=event.target;var href=target.closest('a[href$="'+hook+'"]')?target:!1;if(!href)return;event.preventDefault();t868_showPopup(rec,customCodeHTML);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recid)});if(hook.substring(0,7)==='#popup:'&&analitics&&window.Tilda){var virtTitle=hook;virtTitle=virtTitle.substring(7);Tilda.sendEventToStatistics(analitics,virtTitle)}})}
if(!popup.getAttribute('data-popup-inited')&&'MutationObserver' in window){popup.setAttribute('data-popup-inited','yes');var stores=document.querySelectorAll('body .t-store');Array.prototype.forEach.call(stores,function(store){new MutationObserver(function(mutationsList){for(var mutation in mutationsList){var event=mutationsList[mutation];if(event.type==='attributes'){if(event.target.className.indexOf('t-popup_show')!==-1){popup.style.zIndex='99999999';t868_initPopup(recid);}}}}).observe(store,{attributes:!0,attributeFilter:['class'],subtree:!0,})})}}
function t868__readCustomCode(rec){var codeWrap=rec.querySelector('.t868 .t868__code-wrap');if(!codeWrap)return;var customCode=codeWrap.innerHTML;return customCode}
function t868_showPopup(rec){var popup=rec.querySelector('.t-popup');if(!popup)return;var popupContainer=popup.querySelector('.t-popup__container');if(!popupContainer)return;var codeWrap=popup.querySelector('.t868__code-wrap');if(!codeWrap)return;var windowWidth=window.innerWidth;var screenMin=rec.getAttribute('data-screen-min');var screenMax=rec.getAttribute('data-screen-max');if(screenMin&&windowWidth<parseInt(screenMin,10))return;if(screenMax&&windowWidth>parseInt(screenMax,10))return;popup.style.display='block';codeWrap.style.display='block';t868_setHeight(rec);setTimeout(function(){popupContainer.classList.add('t-popup__container-animated');popup.classList.add('t-popup_show')},100);if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed');popup.addEventListener('click',function(event){var container=event.target.closest('.t-popup__container');if(!container)t868_closePopup(rec)});var closeButton=rec.querySelector('.t-popup__close');if(closeButton){closeButton.addEventListener('click',function(){t868_closePopup(rec)})}
var buttons=rec.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(buttons,function(button){button.addEventListener('click',function(){var url=button.getAttribute('href');if(url.indexOf('#order')!==-1){var popupContainer=rec.querySelector('.t-popup__container');setTimeout(function(){while(popupContainer.firstChild){popupContainer.removeChild(popupContainer.firstChild)}},600)}
if(!url||url.substring(0,7)!=='#price:'){t868_closePopup(rec);if(!url||url.substring(0,7)==='#popup:'){setTimeout(function(){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed')},300)}}})});document.addEventListener('keydown',function(event){if(event.keyCode===27){t868_closePopup(rec)}})}
function t868_closePopup(rec){var popup=rec.querySelector('.t-popup');var codeWrap=rec.querySelector('.t868 .t868__code-wrap');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed');popup.classList.remove('t-popup_show');setTimeout(function(){if(!popup.classList.contains('.t-popup_show')){popup.style.display='none';if(codeWrap){codeWrap.style.display='none'}}},300)}
function t868_setHeight(rec){var videoCarier=rec.querySelector('.t868__video-carier');if(!videoCarier)return;var paddingLeft=parseInt(videoCarier.style.paddingLeft,10)||0;var paddingRight=parseInt(videoCarier.style.paddingRight,10)||0;var height=(videoCarier.clientWidth-(paddingLeft+paddingRight))/(16/9);videoCarier.style.height=height;Array.prototype.forEach.call(videoCarier.closest,function(parent){parent.style.height=height})}
if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;while(el&&el.nodeType===1){if(Element.prototype.matches.call(el,s)){return el}
el=el.parentElement||el.parentNode}
return null}}
function t958_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t958');if(!container)return;var sliderContainer=rec.querySelector('.t958__slidecontainer');var items=rec.querySelectorAll('.t958__item');var cards=rec.querySelectorAll('.t958__card');var totalSlides=items.length;if(!totalSlides){return}
var sliderWidth=parseFloat(getComputedStyle(items[0],null).width.replace('px',''));t958_checkSize(rec);sliderContainer.style.width=(sliderWidth*totalSlides)+'px';window.addEventListener('resize',t_throttle(function(){t958_findVisibleCards(rec);t958_initPopup(rec);t958_checkSize(rec);sliderWidth=parseFloat(getComputedStyle(items[0],null).width.replace('px',''));sliderContainer.style.width=(sliderWidth*totalSlides)+'px';var matrix=(getComputedStyle(sliderContainer,null).transform||'').replace(/[^0-9\-.,]/g,'').split(',');var x=matrix[12]||matrix[4];if(-((totalSlides-1)*sliderWidth)>x){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;i<cards.length;i++){cards[i].classList.add('t958__card-visible')}}
t958_initPopup(rec);var isiOS=/iPhone|iPad|iPod/i.test(navigator.userAgent)||(navigator.userAgent.indexOf('Macintosh')&&'ontouchend' in document);if(isiOS){var activeIndex;var activeSlide;if(document.readyState==='complete'){activeIndex=container.getAttribute('data-slide-pos');if(activeIndex)activeIndex=parseInt(activeIndex,10);activeSlide=typeof activeIndex==='number'?items[activeIndex]:null;if(activeSlide)t958__hideMobileSlides(activeSlide)}else{window.addEventListener('load',function(){activeIndex=container.getAttribute('data-slide-pos');if(activeIndex)activeIndex=parseInt(activeIndex,10);activeSlide=typeof activeIndex==='number'?items[activeIndex]:null;activeSlide=items[activeIndex];if(activeSlide)t958__hideMobileSlides(activeSlide)})}}}
function t958_checkSize(rec){var cards=rec.querySelectorAll('.t958__card_preview');var mores=rec.querySelectorAll('.t958__more-wrapper');var blockHeight=rec.querySelector('.t958__height');var maxWidth=parseFloat(getComputedStyle(blockHeight,null).width.replace('px',''));var windowMargin=80;var windowWidth=window.innerWidth;var cardMaxWidth=windowWidth-windowMargin;if(maxWidth>windowWidth){for(var i=0;i<cards.length;i++){cards[i].style.maxWidth=cardMaxWidth+'px'}
for(var i=0;i<mores.length;i++){mores[i].style.maxWidth=cardMaxWidth+'px'}}else{for(var i=0;i<cards.length;i++){cards[i].style.maxWidth=''}
for(var i=0;i<mores.length;i++){mores[i].style.maxWidth=''}}
for(var i=0;i<cards.length;i++){var card=cards[i];var cardStyle=getComputedStyle(card,null);var cardPaddingTop=parseInt(cardStyle.paddingTop)||0;var cardPaddingBottom=parseInt(cardStyle.paddingBottom)||0;var cardHeight=card.clientHeight-(cardPaddingTop+cardPaddingBottom);var cardInner=card.querySelector('.t958__card-inner');var cardInnerHeight=cardInner.offsetHeight;if(cardHeight<=cardInnerHeight){card.classList.add('t958__card_fade')}else{card.classList.remove('t958__card_fade')}}}
function t958_initSliderSwipe(rec){var sliderWrapper=rec.querySelector('.t958__gallery');var totalSlides=rec.querySelectorAll('.t958__item').length;var timeout;var isScrolling=!1;if(typeof Hammer!=='undefined'){delete Hammer.defaults.cssProps.userSelect;var hammer=new Hammer(sliderWrapper,{domEvents:!0,inputClass:Hammer.TouchInput,recognizers:[[Hammer.Swipe,{direction:Hammer.DIRECTION_HORIZONTAL}]]});window.addEventListener('scroll',function(){isScrolling=!0;clearTimeout(timeout);timeout=setTimeout(function(){isScrolling=!1},250)});if(totalSlides==1)return!1;hammer.on('swipeleft',function(event){if(isScrolling)return!1;sliderWrapper.setAttribute('data-slider-touch','yes');if(event.isFinal){t958_slide(rec,'right');sliderWrapper.setAttribute('data-slider-touch','')}});hammer.on('swiperight',function(event){if(isScrolling)return!1;sliderWrapper.setAttribute('data-slider-touch','yes');if(event.isFinal){t958_slide(rec,'left');sliderWrapper.setAttribute('data-slider-touch','')}})}}
function t958_slide(rec,direction){var allrecords=document.getElementById('allrecords');var container=rec.querySelector('.t958__slidecontainer');var items=rec.querySelectorAll('.t958__item');var totalSlides=items.length;var sliderWidth=parseFloat(getComputedStyle(items[0],null).width.replace('px',''));var position=parseInt(container.getAttribute('data-slide-pos'),10);var isiOS=/iPhone|iPad|iPod/i.test(navigator.userAgent)||(navigator.userAgent.indexOf('Macintosh')&&'ontouchend' in document);if(direction==='right'){container.setAttribute('data-slide-pos',++position);if(position>=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<cards.length;i++){var card=cards[i];card.classList.remove('t958__card-left');card.classList.remove('t958__card-right');card.classList.remove('t958__card-visible');var windowWidth=window.innerWidth;var cardLeftPos=card.getBoundingClientRect().left;var cardRightPos=cardLeftPos+parseFloat(getComputedStyle(card,null).width.replace('px',''));if(cardLeftPos<=0&&cardRightPos>=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;i<fadeCards.length;i++){fadeCards[i].addEventListener('click',function(){var card=this;if(card.classList.contains('t958__card-visible')){t958_showPopup(rec);var popup=rec.querySelector('.t-popup');var reviewId=card.getAttribute('data-review-block').replace('review','');var reviewPopup=popup.querySelector('.t958__popup-item[data-review-index="'+reviewId+'"]');var popupItems=popup.querySelectorAll('.t958__popup-item');for(var i=0;i<popupItems.length;i++){popupItems[i].style.display='none'}
reviewPopup.style.display='block'}})}}
function t958_checkPopupSize(rec){var popupContainer=rec.querySelector('.t-popup__container');var popupHeight=parseFloat(getComputedStyle(popupContainer,null).height.replace('px',''));var windowMargin=120;var windowHeight=window.innerHeight-windowMargin;if(popupHeight>windowHeight){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;i<popups.length;i++){popups[i].style.display='none'}},300)}}
function t958__hideMobileSlides(activeSlide){if(!activeSlide)return;var slideWrapper=activeSlide.closest('.t958__slidecontainer');var slides=Array.prototype.slice.call(slideWrapper.querySelectorAll('.t-slds__item:not(.t-slds__item_dummy):not([aria-hidden="true"])'));var slideWidth=getComputedStyle(activeSlide).width;var maxSlidesViewed=document.documentElement.clientWidth>960?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;i<maxSlidesViewed;i++){if(activeSlideIndex+i<=slides.length){activeIndexList.push(activeSlideIndex+i)}else{activeIndexList.push(i)}
if(activeSlideIndex-i>0){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:''})}