window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isTablet=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/i.test(navigator.userAgent);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 t228__init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menuBlock=rec.querySelector('.t228');var mobileMenu=rec.querySelector('.t228__mobile');var menuSubLinkItems=rec.querySelectorAll('.t-menusub__link-item');var rightBtn=rec.querySelector('.t228__right_buttons_but .t-btn');var mobileMenuPosition=mobileMenu?mobileMenu.style.position||window.getComputedStyle(mobileMenu).position:'';var mobileMenuDisplay=mobileMenu?mobileMenu.style.display||window.getComputedStyle(mobileMenu).display:'';var isFixedMobileMenu=mobileMenuPosition==='fixed'&&mobileMenuDisplay==='block';var overflowEvent=document.createEvent('Event');var noOverflowEvent=document.createEvent('Event');overflowEvent.initEvent('t228_overflow',!0,!0);noOverflowEvent.initEvent('t228_nooverflow',!0,!0);if(menuBlock){menuBlock.addEventListener('t228_overflow',function(){t228_checkOverflow(recid)});menuBlock.addEventListener('t228_nooverflow',function(){t228_checkNoOverflow(recid)})}
rec.addEventListener('click',function(e){var targetLink=e.target.closest('.t-menusub__target-link');if(targetLink&&window.isMobile&&window.innerWidth<=980){if(targetLink.classList.contains('t-menusub__target-link_active')){if(menuBlock)menuBlock.dispatchEvent(overflowEvent)}else{if(menuBlock)menuBlock.dispatchEvent(noOverflowEvent)}}
var currentLink=e.target.closest('.t-menu__link-item:not(.tooltipstered):not(.t-menusub__target-link):not(.t794__tm-link):not(.t966__tm-link):not(.t978__tm-link):not(.t978__menu-link)');if(currentLink&&mobileMenu&&isFixedMobileMenu)mobileMenu.click()});Array.prototype.forEach.call(menuSubLinkItems,function(linkItem){linkItem.addEventListener('click',function(){if(mobileMenu&&isFixedMobileMenu)mobileMenu.click()})});if(rightBtn){rightBtn.addEventListener('click',function(){if(mobileMenu&&isFixedMobileMenu)mobileMenu.click()})}
if(menuBlock){menuBlock.addEventListener('showME601a',function(){var menuLinks=rec.querySelectorAll('.t966__menu-link');Array.prototype.forEach.call(menuLinks,function(menuLink){menuLink.addEventListener('click',function(){if(mobileMenu&&isFixedMobileMenu)mobileMenu.click()})})})}
t_onFuncLoad('t_throttle',function(){var onResizeThrottled=t_throttle(function(){t228_setWidth(recid)},50)
window.addEventListener('resize',onResizeThrottled)})}
function t228_checkOverflow(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t228'):null;if(!menu)return;var mobileContainer=document.querySelector('.t228__mobile_container');var mobileContainerHeight=t228_getFullHeight(mobileContainer);var windowHeight=document.documentElement.clientHeight;var menuPosition=menu.style.position||window.getComputedStyle(menu).position;if(menuPosition==='fixed'){menu.classList.add('t228__overflow');menu.style.setProperty('height',(windowHeight-mobileContainerHeight)+'px','important')}}
function t228_checkNoOverflow(recid){var rec=document.getElementById('rec'+recid);if(!rec)return!1;var menu=rec.querySelector('.t228');var menuPosition=menu?menu.style.position||window.getComputedStyle(menu).position:'';if(menuPosition==='fixed'){if(menu)menu.classList.remove('t228__overflow');if(menu)menu.style.height='auto'}}
function t228_setWidth(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menuCenterSideList=rec.querySelectorAll('.t228__centerside');Array.prototype.forEach.call(menuCenterSideList,function(menuCenterSide){menuCenterSide.classList.remove('t228__centerside_hidden')});if(window.innerWidth<=980)return;var menuBlocks=rec.querySelectorAll('.t228');Array.prototype.forEach.call(menuBlocks,function(menu){var maxWidth;var centerWidth=0;var paddingWidth=40;var leftSide=menu.querySelector('.t228__leftside');var rightSide=menu.querySelector('.t228__rightside');var menuList=menu.querySelector('.t228__list');var mainContainer=menu.querySelector('.t228__maincontainer');var leftContainer=menu.querySelector('.t228__leftcontainer');var rightContainer=menu.querySelector('.t228__rightcontainer');var centerContainer=menu.querySelector('.t228__centercontainer');var centerContainerLi=centerContainer?centerContainer.querySelectorAll('li'):[];var leftContainerWidth=t228_getFullWidth(leftContainer);var rightContainerWidth=t228_getFullWidth(rightContainer);var mainContainerWidth=mainContainer?mainContainer.offsetWidth:0;var dataAlign=menu.getAttribute('data-menu-items-align');var isDataAlignCenter=dataAlign==='center'||dataAlign===null;maxWidth=leftContainerWidth>=rightContainerWidth?leftContainerWidth:rightContainerWidth;maxWidth=Math.ceil(maxWidth);Array.prototype.forEach.call(centerContainerLi,function(li){centerWidth+=t228_getFullWidth(li)});leftSide.style.minWidth=''
rightSide.style.minWidth=''
if(mainContainerWidth-(maxWidth*2+paddingWidth*2)>centerWidth+20){if(isDataAlignCenter){if(leftSide)leftSide.style.minWidth=maxWidth+'px';if(rightSide)rightSide.style.minWidth=maxWidth+'px'}}else{if(leftSide)leftSide.style.minWidth=maxWidth+'';if(rightSide)rightSide.style.minWidth=maxWidth+''}
if(menuList&&menuList.classList.contains('t228__list_hidden'))menuList.classList.remove('t228__list_hidden')})}
function t228_getFullWidth(el){if(!el)return 0;var marginLeft=el.style.marginLeft||window.getComputedStyle(el).marginLeft;var marginRight=el.style.marginRight||window.getComputedStyle(el).marginRight;marginLeft=parseInt(marginLeft,10)||0;marginRight=parseInt(marginRight,10)||0;return el.offsetWidth+marginLeft+marginRight}
function t228_getFullHeight(el){if(!el)return 0;var marginTop=el.style.marginTop||window.getComputedStyle(el).marginTop;var marginBottom=el.style.marginBottom||window.getComputedStyle(el).marginBottom;marginTop=parseInt(marginTop,10)||0;marginBottom=parseInt(marginBottom,10)||0;return el.offsetHeight+marginTop+marginBottom}
function t966_init(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t966'):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('t966__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('.t966__tooltip-menu');var isParentFixed=parentMenu&&window.getComputedStyle(parentMenu).position==='fixed';if(tooltipMenu)tooltipMenu.setAttribute('data-pos-fixed',isParentFixed?'yes':'no');t966_addArrow(recid,hookLinks);t966_setUpMenu(recid,hookLinks);t_onFuncLoad('t_submenublocks__highlightActiveLinks',function(){t_submenublocks__highlightActiveLinks('.t966__menu-link')});var isT804Exist=!!document.querySelector('.t804');if(isT804Exist){document.addEventListener('replacingCompleted',function(){t966_init(recid)})}
if(menu.hasAttribute('data-full-submenu-mob')&&(window.isMobile||'ontouchend' in document)){t_onFuncLoad('t_submenublocks__setFullScreenMenu',function(){t_submenublocks__setFullScreenMenu(menu)})}}
function t966_divideMenu(recid,rows){var rec=document.getElementById('rec'+recid);if(!rec)return;if(!rows)rows=1;var menu=rec.querySelector('.t966');if(menu&&menu.getAttribute('data-sort-mobile')==='yes'&&window.innerWidth<980)return;var items=rec.querySelectorAll('.t966__menu-item-wrapper');var list=rec.querySelector('.t966__menu-list');var maxItemsCountInRow=Math.ceil(items.length/rows);var rowClass='t966__menu-list-row_'+(100/rows).toFixed();for(var i=0;i<maxItemsCountInRow;i++){var row=document.createElement('div');row.classList.add('t966__menu-list-row');row.classList.add(rowClass);if(list)list.appendChild(row)}
var listRows=list?list.querySelectorAll('.t966__menu-list-row'):[];Array.prototype.forEach.call(items,function(item,i){if(listRows[i%maxItemsCountInRow])listRows[i%maxItemsCountInRow].appendChild(item)});var allRec=document.getElementById('allrecords');var currentMode=allRec?allRec.getAttribute('data-tilda-mode'):'';if(currentMode==='edit'){var tooltipItems=document.querySelectorAll('.t966__tooltip-menu');Array.prototype.forEach.call(tooltipItems,function(item){item.style.display='block'})}}
function t966_addArrow(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenuBlock=rec?rec.querySelector('.t966'):null;var isArrowAppend=submenuBlock.getAttribute('data-add-arrow');if(!isArrowAppend)return;hookLinks=Array.prototype.slice.call(hookLinks);hookLinks.forEach(function(hookLink){if(hookLink.querySelector('.t966__arrow'))return;var arrow=document.createElement('div');arrow.classList.add('t966__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 t966_setUpMenu(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenu=rec?rec.querySelector('.t966__tooltip-menu'):null;if(!submenu)return;var content=submenu.querySelector('.t966__content');var menu=rec.querySelector('.t966');var verticalIndent=menu?menu.getAttribute('data-tooltip-margin'):'';var hooksAndSubmenu=hookLinks.concat(submenu);var timer;if(window.innerWidth>980&&!('ontouchend' in document)){t_onFuncLoad('t_submenublocks__addEventsDesktop',function(){t_submenublocks__addEventsDesktop(submenu,hooksAndSubmenu,verticalIndent,'.t966')})}else{t_onFuncLoad('t_submenublocks__addEventsMobile',function(){t_submenublocks__addEventsMobile(submenu,hookLinks,verticalIndent,'.t966')})}
document.addEventListener('click',function(e){if(submenu.getAttribute('data-mobiletooltip')!=='yes')return;if(!e.target.closest('.t966__tooltip-menu')&&!e.target.classList.contains('t966__tm-link')&&!e.target.closest('.t966__tm-link')){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t966')})}});window.addEventListener('scroll',t_throttle(function(){if(content){content.addEventListener('mouseleave',function(){var activeEl=hookLinks.filter(function(el){return el.classList.contains('t966__tm-link_active')});var afterActiveEl=activeEl.length?activeEl[0].nextElementSibling:null;if(submenu.classList.contains('t966__tooltip-menu_show')||(afterActiveEl&&afterActiveEl.classList.contains('t966__tooltip-menu_mobile'))){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(afterActiveEl,'.t966')})}})}},300));window.addEventListener('resize',t_throttle(function(){if(window.isMobile||window.innerWidth<980)return;var mobileMenu=document.querySelector('.t966__tooltip-menu_mobile');t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(mobileMenu,'.t966')})},300));var submenuLinks=submenu.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t966',link)});var clickedInTooltipMenuEls=document.querySelectorAll('.t450, .t199__mmenu, .t280, .t282, .t204__burger, .t451, .t466');Array.prototype.forEach.call(clickedInTooltipMenuEls,function(el){var event=document.createEvent('Event');event.initEvent('clickedAnchorInTooltipMenu',!0,!0);el.dispatchEvent(event)});Array.prototype.forEach.call(submenuLinks,function(otherLink){var linkTitle=otherLink.querySelector('.t966__menu-item-title');if(otherLink!==link){if(linkTitle)linkTitle.classList.remove('t-active')}else{if(linkTitle)linkTitle.classList.add('t-active')}})})})}
function t702_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t702');if(!container)return;rec.setAttribute('data-animationappear','off');rec.setAttribute('data-popup-subscribe-inited','y');rec.style.opacity=1;var documentBody=document.body;var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var analitics=popup.getAttribute('data-track-popup');var popupCloseBtn=popup.querySelector('.t-popup__close');var hrefs=rec.querySelectorAll('a[href*="#"]');var submitHref=rec.querySelector('.t-submit[href*="#"]');if(popupTooltipHook){t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(popupTooltipHook)});document.addEventListener('click',function(event){var target=event.target;var href=target.closest('a[href$="'+popupTooltipHook+'"]')?target:!1;if(!href)return;event.preventDefault();t702_showPopup(recId);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recId)});t702__lazyLoad();if(analitics&&window.Tilda){Tilda.sendEventToStatistics(analitics,popupTooltipHook)}});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,popupTooltipHook)})}
popup.addEventListener('scroll',t_throttle(function(){t702__lazyLoad()}));popup.addEventListener('click',function(event){var windowWithoutScrollBar=window.innerWidth-17;if(event.clientX>windowWithoutScrollBar)return;if(event.target===this)t702_closePopup(recId)});popupCloseBtn.addEventListener('click',function(){t702_closePopup(recId)});if(submitHref){submitHref.addEventListener('click',function(){if(documentBody.classList.contains('t-body_scroll-locked')){documentBody.classList.remove('t-body_scroll-locked')}})}
for(var i=0;i<hrefs.length;i++){hrefs[i].addEventListener('click',function(){var url=this.getAttribute('href');if(!url||url.substring(0,7)!='#price:'){t702_closePopup(recId);if(!url||url.substring(0,7)=='#popup:'){setTimeout(function(){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');documentBody.classList.add('t-body_popupshowed')},300)}}})}
function t702_escClosePopup(event){if(event.key==='Escape')t702_closePopup(recId)}
popup.addEventListener('tildamodal:show'+popupTooltipHook,function(){document.addEventListener('keydown',t702_escClosePopup)});popup.addEventListener('tildamodal:close'+popupTooltipHook,function(){document.removeEventListener('keydown',t702_escClosePopup)});rec.addEventListener('conditional-form-init',function(){t_onFuncLoad('t_form__conditionals_addFieldsListeners',function(){t_form__conditionals_addFieldsListeners(recId,function(){t_popup__resizePopup(recId)})})},{once:!0})}
function t702_lockScroll(){var documentBody=document.body;if(!documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=typeof window.pageYOffset!=='undefined'?window.pageYOffset:(document.documentElement||documentBody.parentNode||documentBody).scrollTop;documentBody.classList.add('t-body_scroll-locked');documentBody.style.top='-'+bodyScrollTop+'px';documentBody.setAttribute('data-popup-scrolltop',bodyScrollTop)}}
function t702_unlockScroll(){var documentBody=document.body;if(documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=documentBody.getAttribute('data-popup-scrolltop');documentBody.classList.remove('t-body_scroll-locked');documentBody.style.top=null;documentBody.removeAttribute('data-popup-scrolltop');document.documentElement.scrollTop=parseInt(bodyScrollTop)}}
function t702_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t702');if(!container)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;var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var ranges=rec.querySelectorAll('.t-range');var documentBody=document.body;if(ranges.length){Array.prototype.forEach.call(ranges,function(range){t702__triggerEvent(range,'popupOpened')})}
t_onFuncLoad('t_popup__showPopup',function(){t_popup__showPopup(popup)});if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');documentBody.classList.add('t-body_popupshowed');documentBody.classList.add('t702__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream&&window.isiOSVersion&&window.isiOSVersion[0]===11){setTimeout(function(){t702_lockScroll()},500)}
t702__lazyLoad();t702__triggerEvent(popup,'tildamodal:show'+popupTooltipHook);t_onFuncLoad('t_forms__calculateInputsWidth',function(){t_forms__calculateInputsWidth(recId)})}
function t702_closePopup(recId){var rec=document.getElementById('rec'+recId);var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var popupAll=document.querySelectorAll('.t-popup_show:not(.t-feed__post-popup):not(.t945__popup)');if(popupAll.length==1){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed')}else{var newPopup=[];for(var i=0;i<popupAll.length;i++){if(popupAll[i].getAttribute('data-tooltip-hook')===popupTooltipHook){popupAll[i].classList.remove('t-popup_show');newPopup.push(popupAll[i])}}
if(newPopup.length===popupAll.length){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed')}}
if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');popup.classList.remove('t-popup_show');document.body.classList.remove('t702__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream&&window.isiOSVersion&&window.isiOSVersion[0]===11){t702_unlockScroll()}
t_onFuncLoad('t_popup__addFocusOnTriggerButton',function(){t_popup__addFocusOnTriggerButton()});setTimeout(function(){var popupHide=document.querySelectorAll('.t-popup:not(.t-popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);t702__triggerEvent(popup,'tildamodal:close'+popupTooltipHook)}
function t702_sendPopupEventToStatistics(popupName){var virtPage='/tilda/popup/';var virtTitle='Popup: ';if(popupName.substring(0,7)=='#popup:'){popupName=popupName.substring(7)}
virtPage+=popupName;virtTitle+=popupName;if(window.Tilda&&typeof Tilda.sendEventToStatistics=='function'){Tilda.sendEventToStatistics(virtPage,virtTitle,'',0)}else{if(ga){if(window.mainTracker!='tilda'){ga('send',{hitType:'pageview',page:virtPage,title:virtTitle})}}
if(window.mainMetrika&&window[window.mainMetrika]){window[window.mainMetrika].hit(virtPage,{title:virtTitle,referer:window.location.href})}}}
function t702_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t702__lazyLoad(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
function t702__triggerEvent(el,eventName){var event;if(typeof window.CustomEvent==='function'){event=new CustomEvent(eventName)}else if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent(eventName,!0,!1)}else if(document.createEventObject){event=document.createEventObject();event.eventType=eventName}
event.eventName=eventName;if(el.dispatchEvent){el.dispatchEvent(event)}else if(el.fireEvent){el.fireEvent('on'+event.eventType,event)}else if(el[eventName]){el[eventName]()}else if(el['on'+eventName]){el['on'+eventName]()}}
function t833_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var wrapper=rec.querySelector('.t833__sliderwrapper');if(!wrapper)return;var dataContainer=rec.querySelector('.t833');if(!dataContainer)return;var coverRecs=dataContainer.getAttribute('data-coverslider-rec-ids');t833_showOnCertainWidth(rec,wrapper);if(document.querySelector('#allrecords').getAttribute('data-tilda-mode')==='edit'){var recDemo=rec.querySelector('.t833__demo');t833_addAnimation(recDemo,wrapper);return}
if(coverRecs){coverRecs=coverRecs.split(',');Array.prototype.forEach.call(coverRecs,function(rec){var currentRec=document.querySelector('#rec'+rec);var currentWrapper=wrapper.cloneNode(!0);currentWrapper.style.position='absolute';if(currentRec){t833_addAnimation(currentRec,currentWrapper)}})}else{var nextBlock=rec.nextElementSibling;var prevBlock=rec.previousElementSibling;var currentWrapper=wrapper.cloneNode(!0);currentWrapper.style.position='absolute';if(nextBlock&&nextBlock.querySelector('.t-cover')){t833_addAnimation(nextBlock,currentWrapper)}else if(prevBlock&&prevBlock.querySelector('.t-cover')){t833_addAnimation(prevBlock,currentWrapper)}}}
function t833_showOnCertainWidth(rec,wrapper){currentClass=rec.getAttribute('class');classListArr=currentClass.split(' ');Array.prototype.forEach.call(classListArr,function(classItem){if(classItem.indexOf('t-screen')!==-1){wrapper.classList.add(classItem)}})}
function t833_addAnimation(currentRec,wrapper){if(!currentRec)return;currentRec.setAttribute('data-animationappear','off');currentRec.classList.remove('r_hidden');var currentRecType=currentRec.getAttribute('data-record-type');var isT941=currentRecType==='941';var isT996=currentRecType==='996';if(currentRecType==='396'){currentRec.querySelector('.t396__filter').insertAdjacentElement('afterend',wrapper);wrapper.style.zIndex='0'}
var coverWrapper;if(isT941){coverWrapper=currentRec.querySelector('.t941__cover-wrap')}else if(isT996){coverWrapper=currentRec.querySelector('.t996__cover-wrapper')}else{coverWrapper=currentRec.querySelector('.t-cover')}
if(coverWrapper){if(isT941){wrapper.classList.add('t941__cover');coverWrapper.appendChild(wrapper)}else if(isT996){wrapper.classList.add('t996__cover');coverWrapper.appendChild(wrapper)}else{coverWrapper.querySelector('.t-cover__filter').insertAdjacentElement('afterend',wrapper)}
wrapper.style.zIndex='0'}
var images=t833_createImageArr(wrapper);var imageCount=images.length;var imagesLoaded=0;for(var i=0;i<imageCount;i++){images[i].onload=function(){imagesLoaded++;if(imagesLoaded==imageCount&&currentRec.length!==0){setTimeout(function(){t833_changeSlide(currentRec)},3000)}}}
var slider=currentRec.querySelector('.t833__slider');var allSlides=currentRec.querySelectorAll('.t833__slide');var numberOfSlides=allSlides.length;if(numberOfSlides===3||numberOfSlides===2){Array.prototype.forEach.call(allSlides,function(slide){var cloneSlide=slide.cloneNode(!0);slider.appendChild(cloneSlide)})}}
function t833_createImageArr(wrapper){var imagesSrc=[];allSlides=wrapper.querySelectorAll('.t833__slide');Array.prototype.forEach.call(allSlides,function(slideItem){imagesSrc.push(slideItem.getAttribute('data-original'))});var images=[];Array.prototype.forEach.call(imagesSrc,function(image,i){images[i]=new Image();images[i].src=image});return images}
function t833_changeSlide(currentRec){var sliderWrapper=currentRec.querySelectorAll('.t833__sliderwrapper');Array.prototype.forEach.call(sliderWrapper,function(sliderItem){var isLoaded=sliderItem.getAttribute('data-loaded')&&sliderItem.getAttribute('data-loaded')==='yes'?!0:!1;if(!isLoaded){var slides=sliderItem.querySelectorAll('.t833__slide');var firstSlide=sliderItem.querySelector('.t833__slide:first-child');var numberOfSlides=slides.length;firstSlide.classList.add('t833__slide_fx1');setTimeout(function(){t833_kenBurns(slides,numberOfSlides,1)},500);sliderItem.setAttribute('data-loaded','yes')}});function t833_kenBurns(slides,numberOfSlides,i){if(i==numberOfSlides)i=0;slides[i].classList.add('t833__slide_fx');if(i===0&&slides[numberOfSlides-2]){slides[numberOfSlides-2].classList.remove('t833__slide_fx');slides[numberOfSlides-2].classList.remove('t833__slide_fx1')}
if(i===1&&slides[numberOfSlides-1]){slides[numberOfSlides-1].classList.remove('t833__slide_fx');slides[numberOfSlides-1].classList.remove('t833__slide_fx1');Array.prototype.forEach.call(slides,function(slide){slide.classList.remove('t833__slide_opacity')})}
if(i>1&&slides[i-2]){slides[i-2].classList.remove('t833__slide_fx');slides[i-2].classList.remove('t833__slide_fx1')}
setTimeout(function(){t833_kenBurns(slides,numberOfSlides,i+1)},5000)}}
function t491_init(recId){t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
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:''})}
function t594_init(recId){t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t570_init(recid){if(window.innerWidth>750){t570_setMapHeight(recid);window.onload=function(){t570_setMapHeight(recid)};window.addEventListener('resize',function(){t570_setMapHeight(recid)})}}
function t570_setMapHeight(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var mapElement=rec.querySelector('.t-map');var textElement=rec.querySelector('.t570__col_text');if(!mapElement||!textElement)return;var paddingTop=parseInt(textElement.style.paddingTop,10)||0;var paddingBottom=parseInt(textElement.style.paddingBottom,10)||0;var textHeight=textElement.clientHeight-(paddingTop+paddingBottom);mapElement.style.height=textHeight+'px';var event=document.createEvent('HTMLEvents');event.initEvent('sizechange',!0,!1);mapElement.dispatchEvent(event)}
function t651_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t651');if(!container)return;if(window.isMobile&&!window.isTablet){var phone=rec.querySelector('.t651__phone');if(!phone)return;var phoneText=phone.textContent.replace(/\s+/g,'');var button=rec.querySelector('.t651__btn');var buttonWrapper=rec.querySelector('.t651__btn_wrapper');var buttonText=rec.querySelector('.t651__btn-text');button.addEventListener('click',function(){window.location.href='tel:'+phoneText;if(buttonWrapper)buttonWrapper.classList.remove('t651__btn_animate');if(buttonText)buttonText.style.display='none'});return}
rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var popup=rec.querySelector('.t651__popup');var analitics=popup.getAttribute('data-track-popup');var hook='TildaCallBackWidget'+recId;var button=rec.querySelector('.t651__btn');button.addEventListener('click',function(event){if(button.classList.contains('t651__btn_active')){t651_closePopup();return}
container.classList.add('t651_active');button.classList.add('t651__btn_active');t651_showPopup(recId);event.preventDefault();if(analitics&&window.Tilda){Tilda.sendEventToStatistics(analitics,hook)}})}
function t651_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var popup=rec.querySelector('.t651__popup');if(!popup)return;var buttonWrapper=rec.querySelector('.t651__btn_wrapper');var buttonText=rec.querySelector('.t651__btn-text');if(buttonWrapper)buttonWrapper.classList.remove('t651__btn_animate');if(buttonText)buttonText.style.display='none';popup.style.display='block';setTimeout(function(){popup.classList.add('t651__popup_show')},50);document.addEventListener('keydown',t651_escClosePopup)}
function t651_escClosePopup(event){if(event.key==='Escape')t651_closePopup()}
function t651_closePopup(){var blocks=document.querySelectorAll('.t651.t651_active');var buttons=document.querySelectorAll('.t651__btn.t651__btn_active');var popups=document.querySelectorAll('.t651__popup.t651__popup_show');for(var i=0;i<blocks.length;i++){blocks[i].classList.remove('t651_active')}
for(var i=0;i<buttons.length;i++){buttons[i].classList.remove('t651__btn_active')}
for(var i=0;i<popups.length;i++){popups[i].classList.remove('t651__popup_show')}
setTimeout(function(){var popupHide=document.querySelectorAll('.t651__popup:not(.t651__popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);document.removeEventListener('keydown',t651_escClosePopup)}