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)]}}
window.browserLang=(window.navigator.userLanguage||window.navigator.language).toUpperCase().slice(0,2);window.tildaBrowserLang=window.browserLang;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)}}}
var t786_POPUP_SHOWED_EVENT_NAME='catalog:popupShowed';var t786_POPUP_CLOSED_EVENT_NAME='catalog:popupClosed';function t786__init(recid){setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)});t786_initPopup(recid);t786__hoverZoom_init(recid);t786__updateLazyLoad(recid);t786__alignButtons_init(recid);t_onFuncLoad('t_store_addProductQuantityEvents',function(){t786_initProductQuantity(recid)});var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)},500)}
function t786_initProductQuantity(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var productList=rec.querySelectorAll('.t786__col, .t786__product-full');Array.prototype.forEach.call(productList,function(product){t_store_addProductQuantityEvents(product)})}
function t786__alignButtons_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;if(!rec.querySelector('[data-buttons-v-align]')){return}
try{t786__alignButtons(recid);if(document.querySelector('.t-records').getAttribute('data-tilda-mode')==='edit'){setInterval(function(){t786__alignButtons(recid)},200)}
window.addEventListener('resize',t_throttle(function(){if(typeof window.noAdaptive!=='undefined'&&window.noAdaptive&&window.isMobile){return}
t786__alignButtons(recid)}));var wrapperBlock=rec.querySelector('.t786');if(wrapperBlock){wrapperBlock.addEventListener('displayChanged',function(){t786__alignButtons(recid)})}
if(window.isMobile){window.addEventListener('orientationchange',function(){t786__alignButtons(recid)})}}catch(error){console.log('buttons-v-align error: '+error.message)}}
function t786__showMore(recid){var rec=document.querySelector('#rec'+recid+' .t786');if(!rec)return;var cardsShowLimit=parseInt(rec.getAttribute('data-show-count'),10);if(isNaN(cardsShowLimit)||cardsShowLimit<=0)return;var showMoreButton=rec.querySelector('.t786__showmore');if(!showMoreButton)return;if(!showMoreButton.querySelector('td').textContent){showMoreButton.querySelector('td').textContent=t786__dict()}
showMoreButton.style.display='inline-block';var allProductCards=rec.querySelectorAll('.t786__col');Array.prototype.forEach.call(allProductCards,function(productCard){productCard.style.display='none'});var cardsNumber=allProductCards.length;t786__showSeparator(rec,cardsShowLimit);for(var i=0;i<cardsShowLimit;i++){if(allProductCards[i]){allProductCards[i].style.display='inline-block'}}
showMoreButton.addEventListener('click',function(){var allCurrentProducts=rec.querySelectorAll('.t786__col');var currentproductsShowed=0;Array.prototype.forEach.call(allCurrentProducts,function(product){if(product.style.display==='inline-block'){++currentproductsShowed}});for(var i=0;i<cardsShowLimit+currentproductsShowed;i++){if(allProductCards[i]){allProductCards[i].style.display='inline-block'}}
if(rec.querySelector('[data-buttons-v-align]')){t786__alignButtons(recid)}
var displayChangedEvent=document.createEvent('HTMLEvents');displayChangedEvent.initEvent('displayChanged',!0,!1);rec.dispatchEvent(displayChangedEvent);var addBtnEvent=document.createEvent('HTMLEvents');addBtnEvent.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(addBtnEvent);if(cardsShowLimit+currentproductsShowed>=cardsNumber){showMoreButton.style.display='none'}
t786__showSeparator(rec,cardsShowLimit+currentproductsShowed);if(rec.querySelector('[data-buttons-v-align]')){t786__alignButtons(recid)}
if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}})}
function t786__dict(){var dictionary={EN:'Load more',RU:'Загрузить ещё',FR:'Charger plus',DE:'Mehr laden',ES:'Carga más',PT:'Carregue mais',UK:'Завантажити ще',JA:'もっと読み込む',ZH:'裝載更多',};var language=window.browserLang;return dictionary[language]?dictionary[language]:dictionary.EN}
function t786__showSeparator(rec,cardsShowLimit){if(window.jQuery&&rec instanceof jQuery){rec=rec.get(0)}
var allSeparators=rec.querySelectorAll('.t786__separator_number');Array.prototype.forEach.call(allSeparators,function(separator){separator.classList.add('t786__separator_hide');if(separator.getAttribute('data-product-separator-number')<=cardsShowLimit){separator.classList.remove('t786__separator_hide')}})}
function t786__alignButtons(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrappers=rec.querySelectorAll('.t786__textwrapper');var maxHeight=0;var container=rec.querySelector('.t786__container');if(container){var itemsInRow=parseInt(container.getAttribute('data-blocks-per-row'),10)}else{itemsInRow=1}
var mobileView=window.innerWidth<=480;var tableView=window.innerWidth<=960&&window.innerWidth>480;var mobileOneRow=window.innerWidth<=960&&rec.querySelector('.t786__container_mobile-flex');var mobileTwoItemsInRow=window.innerWidth<=480&&rec.querySelector('.t786 .mobile-two-columns');if(mobileView){itemsInRow=1}
if(tableView){itemsInRow=2}
if(mobileTwoItemsInRow){itemsInRow=2}
if(mobileOneRow){itemsInRow=999999}
var count=1;var wrappersInRow=[];Array.prototype.forEach.call(wrappers,function(wrapper){wrapper.style.height='auto';if(itemsInRow===1){wrapper.style.height='auto'}else{wrappersInRow.push(wrapper);if(wrapper.offsetHeight>maxHeight){maxHeight=wrapper.offsetHeight}
Array.prototype.forEach.call(wrappersInRow,function(card){card.style.height=maxHeight+'px'});if(count===itemsInRow){count=0;maxHeight=0;wrappersInRow=[]}
count++}})}
function t786__hoverZoom_init(recid){if(window.isMobile)return;var rec=document.getElementById('rec'+recid);if(!rec)return;try{if(!rec.querySelector('[data-hover-zoom]')){return}
var hoverScript='https://static.tildacdn.com/js/tilda-hover-zoom-1.0.min.js';if(document.querySelector("script[src^='"+hoverScript+"']")){t_onFuncLoad('t_hoverZoom_init',function(){t_hoverZoom_init(recid)})}else{var script=document.createElement('script');script.type='text/javascript';script.src=hoverScript;script.onload=function(){setTimeout(function(){t_hoverZoom_init(recid)},500)};script.onerror=function(error){console.log('Upload script error: ',error)};document.head.appendChild(script)}}catch(error){console.log('Zoom image init error: '+error.message)}}
function t786__updateLazyLoad(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var scrollContainer=rec.querySelector(' .t786__container_mobile-flex');var currentMode=document.querySelector('.t-records').getAttribute('data-tilda-mode');if(scrollContainer&&currentMode!=='edit'&&currentMode!=='preview'){scrollContainer.addEventListener('scroll',t_throttle(function(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}))}}
function t786_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var openerLink=rec.querySelectorAll('[href^="#prodpopup"]');var popup=rec.querySelector('.t-popup');Array.prototype.forEach.call(openerLink,function(link){link.addEventListener('click',clickOnceHandler,!1);function clickOnceHandler(event){event.preventDefault();var product=link.closest('.js-product');var productLid=product.getAttribute('data-product-lid');t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid+' #t786__product-'+productLid+'')});link.removeEventListener('click',clickOnceHandler,!1)}
link.addEventListener('click',showPopupHandler,!1);function showPopupHandler(event){event.preventDefault();if(event.target.classList.contains('t1002__addBtn')||event.target.parentNode.classList.contains('t1002__addBtn')){return}
t786_showPopup(recid);var product=link.closest('.js-product');var productLid=product.getAttribute('data-product-lid');var allProducts=popup.querySelectorAll('.js-product');Array.prototype.forEach.call(allProducts,function(product){product.style.display='none'});var productFull=popup.querySelector('.js-product[data-product-lid="'+productLid+'"]');productFull.style.display='block';var analitics=popup.getAttribute('data-track-popup');if(analitics&&productFull&&window.Tilda){var productName=productFull.querySelector('.js-product-name');if(productName){var virtualTitle=productName.textContent;if(!virtualTitle){virtualTitle='prod'+productLid}
Tilda.sendEventToStatistics(analitics,virtualTitle)}}
var currentUrl=window.location.href;if(currentUrl.indexOf('#!/tproduct/')===-1&&currentUrl.indexOf('%23!/tproduct/')===-1){if(typeof history.replaceState!=='undefined'){window.history.replaceState('','',window.location.href+'#!/tproduct/'+recid+'-'+productLid)}}
t786_updateSlider(recid+' #t786__product-'+productLid);if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}});if(document.querySelectorAll('#record'+recid).length===0){t786_checkUrl(recid)}
if(popup&&popup.hasAttribute('data-fixed-button')){t786_fixedPopupButton(recid)}}
function t786_checkUrl(recid){var currentUrl=window.location.href;var tprodIndex=(currentUrl.indexOf('#!/tproduct/')+1||currentUrl.indexOf('%23!/tproduct/')+1||currentUrl.indexOf('#%21%2Ftproduct%2F')+1||currentUrl.indexOf('#!%2Ftproduct%2F')+1||currentUrl.indexOf('%23%21%2Ftproduct%2F')+1)-1;if(tprodIndex!==-1){var currentUrl=currentUrl.substring(tprodIndex,currentUrl.length);var curProdLid=currentUrl.substring(currentUrl.indexOf('-')+1,currentUrl.length);if(curProdLid){var curProdLidMatch=curProdLid.match(/([0-9]+)/g);if(curProdLidMatch){curProdLid=curProdLidMatch[0]}}
if(currentUrl.indexOf(recid)===-1)return;var rec=document.getElementById('rec'+recid);if(!rec)return;if(currentUrl.indexOf(recid)!==0&&rec.querySelector('[data-product-lid="'+curProdLid+'"]')){var currentLink=rec.querySelector('[data-product-lid="'+curProdLid+'"] [href^="#prodpopup"]');var event=document.createEvent('HTMLEvents');event.initEvent('click',!0,!1);if(currentLink){currentLink.dispatchEvent(event)}}}}
function t786_updateSlider(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;t_onFuncLoad('t_slds_SliderWidth',function(){t_slds_SliderWidth(recid)});var slider=rec.querySelector('.t-slds__container');var paddingLeft=parseInt(slider.style.paddingLeft)||0;var paddingRight=parseInt(slider.style.paddingRight)||0;var sliderWrapper=rec.querySelector('.t-slds__items-wrapper');var sliderWidth=slider.clientWidth-(paddingLeft+paddingRight);var position=parseFloat(sliderWrapper.getAttribute('data-slider-pos'));sliderWrapper.style.transform='translate3d(-'+sliderWidth*position+'px, 0, 0)';t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)})}
function t786_showPopup(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var popup=rec.querySelector('.t-popup');popup.style.display='block';setTimeout(function(){popup.querySelector('.t-popup__container').classList.add('t-popup__container-animated');popup.classList.add('t-popup_show');t_triggerEvent(popup,t786_POPUP_SHOWED_EVENT_NAME)},50);setTimeout(function(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},300);var body=document.body;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');body.classList.add('t-body_popupshowed');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);popup.addEventListener('mousedown',function(event){var windowWidth=window.innerWidth;var maxScrollBarWidth=17;var windowWithoutScrollBar=windowWidth-maxScrollBarWidth;if(event.clientX>windowWithoutScrollBar){return}
if(event.target===this){t786_closePopup(body,popup)}});var closeButtons=rec.querySelectorAll('.t-popup__close, .t786__close-text');Array.prototype.forEach.call(closeButtons,function(button){button.addEventListener('click',function(){t786_closePopup(body,popup)})});document.addEventListener('keydown',function(event){var isGalleryShowedOldLib=document.body.classList.contains('t-zoomer__show');if(isGalleryShowedOldLib)return;var isGalleryShowedNewLib=document.body.classList.contains('t-zoomer__active');if(isGalleryShowedNewLib)return;var isPopupShowed=document.body.classList.contains('t-body_popupshowed');if(!isPopupShowed)return;if(popup&&popup.classList.contains('t-popup_show')){if(event.keyCode===27){t786_closePopup(body,popup)}}})}
function t786_closePopup(body,popup){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');body.classList.remove('t-body_popupshowed');popup.classList.remove('t-popup_show');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);var currentUrl=window.location.href;var indexToRemove=currentUrl.indexOf('#!/tproduct/');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&indexToRemove<0){indexToRemove=currentUrl.indexOf('%23!/tproduct/')}
currentUrl=currentUrl.substring(0,indexToRemove);setTimeout(function(){popup.scrollTop=0;popup.style.display='none';if(typeof history.replaceState!=='undefined'){window.history.replaceState('','',currentUrl)}},300);t_triggerEvent(popup,t786_POPUP_CLOSED_EVENT_NAME)}
function t786_fixedPopupButton(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var MOBILE_MAX_WIDTH=560;var popup=rec.querySelector('.t-popup');var popupContainer=popup.querySelector('.t-popup__container');var btnWrappers=rec.querySelectorAll('.t786__btn-wrapper');Array.prototype.forEach.call(btnWrappers,function(el){el.classList.add('t786__btn-wrapper-fixed')});function addStyle(){popupContainer.style.paddingBottom='90px';popupContainer.style.cssText+=';transform:none !important;'}
function resetStyle(){popupContainer.style.paddingBottom='';popupContainer.style.transform=''}
function handleResize(){if(window.innerWidth>MOBILE_MAX_WIDTH){resetStyle();return}
addStyle()}
if(window.isMobile){window.addEventListener('orientationchange',handleResize)}
popup.addEventListener(t786_POPUP_SHOWED_EVENT_NAME,function(){setTimeout(function(){handleResize()})});popup.addEventListener(t786_POPUP_CLOSED_EVENT_NAME,function(){resetStyle()});window.addEventListener('resize',handleResize)}
function t704_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t804_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var geodata=[];var geoDataBlock=rec.querySelector('.t_804_geo-datablock');var key=geoDataBlock.querySelector('.t_804_geo-key').innerHTML;var defValue=geoDataBlock.querySelector('.t_804_geo-default').innerHTML;var cards=geoDataBlock.querySelector('.t_804_geo-data').children;Array.prototype.forEach.call(cards,function(regionCard){var geoIpSet=regionCard.querySelectorAll('.t_804_geo-geoip');var geo=[];Array.prototype.forEach.call(geoIpSet,function(geoIPBlock){var geoIPInnerText=geoIPBlock.innerHTML;var geoIPArray=geoIPInnerText.split(';');Array.prototype.forEach.call(geoIPArray,function(geoIP){if(geoIP==='')return!0;var regex=/,/g;var geoIPValue=geoIP.replace(regex,'-');geo.push(geoIPValue)})});var value=regionCard.querySelector('.t_804_geo-value').innerHTML;geodata.push({value:value,geo:geo})});if(rec.closest('#t-header')||rec.closest('#t-footer')){var elements=document.querySelectorAll('.t-rec div, .t-rec span, .t-rec a, .t-rec p');Array.prototype.forEach.call(elements,function(elem){var html=elem.innerHTML;var replaced=html.replace(/(?!%%)[A-zА-яё0-9_-]*(?=%%)/gi,'<span data-replace-key="$&"></span>').replace(/%{2}/gim,'');if(replaced!==html){elem.innerHTML=replaced}});var event=document.createEvent('HTMLEvents');event.initEvent('replacingCompleted',!0,!1);document.dispatchEvent(event)}
var request=new XMLHttpRequest();request.open('GET','https://geo.tildacdn.com/geo/full/');request.timeout=15*1000;request.send();request.onprogress=function(){try{var data=JSON.parse(request.response);replaceGeo(data,key,geodata,defValue)}catch(e){}};request.onerror=function(){try{var data=JSON.parse(request.response);replaceGeo(data,key,geodata,defValue)}catch(e){}};request.ontimeout=function(){console.error('Timeout error: ',request.status)};function replaceGeo(data,key,geodata,defValue){var city=data.city.name_en;var region=data.region.name_en;var country=data.country.iso;var fullMatch=country+'-'+region+'-'+city;var partMatch=country+'-'+region;var val=defValue;Array.prototype.forEach.call(geodata,function(value){if(value.geo.indexOf(country)!==-1){val=value.value}
if(value.geo.indexOf(partMatch)!==-1){val=value.value}
if(value.geo.indexOf(fullMatch)!==-1){val=value.value}});var insertion=document.querySelectorAll('[data-replace-key="'+key+'"]');Array.prototype.forEach.call(insertion,function(span){span.innerHTML=val})}}
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 rec=this;while(rec&&rec.nodeType===1){if(Element.prototype.matches.call(rec,s)){return rec}
rec=rec.parentElement||rec.parentNode}
return null}}
function t898_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t898');if(!container)return;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var whatsApp=rec.querySelector('.t898__icon-whatsapp_wrapper');if(whatsApp){var whatsAppHref=whatsApp.getAttribute('href');if(whatsAppHref&&(whatsAppHref.indexOf('whatsapp://')>-1||whatsAppHref.indexOf('wa.me')>-1)){t898_removeExtraSymbolsFromWhatsApp(whatsApp,whatsAppHref)}}
if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
function t898_removeExtraSymbolsFromWhatsApp(whatsApp,whatsAppHref){if(whatsAppHref&&whatsAppHref.indexOf('?text=')!==-1){var whatsAppHrefArr=whatsAppHref.split('?text=');whatsAppHrefArr[0]=whatsAppHrefArr[0].replace(/[\(\)+-]/g,'');whatsAppHref=whatsAppHrefArr[0]+'?text='+whatsAppHrefArr[1]}else{whatsAppHref=whatsAppHref.replace(/[\(\)+-]/,'')}
whatsApp.setAttribute('href',whatsAppHref)}
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 t450_showMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec.querySelector('.t450');var overlay=rec.querySelector('.t450__overlay');var menuElements=rec.querySelectorAll('.t450__overlay, .t450__close, a[href*="#"]');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t450__body_menushowed');if(menu)menu.classList.add('t450__menu_show');if(overlay)overlay.classList.add('t450__menu_show');if(menu){menu.addEventListener('clickedAnchorInTooltipMenu',function(){t450_closeMenu(menu,overlay)})}
Array.prototype.forEach.call(menuElements,function(element){element.addEventListener('click',function(){if(element.closest('.tooltipstered, .t-menusub__target-link, .t794__tm-link, .t966__tm-link, .t978__tm-link'))return;if(element.href&&(element.href.substring(0,7)==='#price:'||element.href.substring(0,9)==='#submenu:'))return;t450_closeMenu(menu,overlay)})});document.addEventListener('keydown',function(e){if(e.keyCode===27){document.body.classList.remove('t390__body_popupshowed');var popups=document.querySelectorAll('.t390');Array.prototype.forEach.call(popups,function(popup){popup.classList.remove('t390__popup_show')})}});rec.addEventListener('click',function(e){if(e.target.closest('.t966__tm-link, .t978__tm-link')){t450_checkSize(recid);if(e.target.closest('.t978__tm-link')){setTimeout(function(){var hookLink=e.target.closest('.t978__tm-link');var menuBlock=hookLink.nextElementSibling;var submenuLinks=menuBlock?menuBlock.querySelectorAll('.t978__menu-link'):[];Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){t450_checkSize(recid)})})},300)}}});menu.addEventListener('menuOverflow',function(){t450_checkSize(recid)});t450_highlight(recid)}
function t450_closeMenu(menu,overlay){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t450__body_menushowed');if(menu)menu.classList.remove('t450__menu_show');if(overlay)overlay.classList.remove('t450__menu_show')}
function t450_checkSize(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t450'):null;if(!menu)return;var container=menu.querySelector('.t450__container');var topContainer=menu.querySelector('.t450__top');var rightContainer=menu.querySelector('.t450__rightside');setTimeout(function(){var topContainerHeight=topContainer?topContainer.offsetHeight:0;var rightContainerHeight=rightContainer?rightContainer.offsetHeight:0;var containerPaddingTop=container?window.getComputedStyle(container).paddingTop:'0';var containerPaddingBottom=container?window.getComputedStyle(container).paddingBottom:'0';containerPaddingTop=parseInt(containerPaddingTop,10);containerPaddingBottom=parseInt(containerPaddingBottom,10);if(topContainerHeight+rightContainerHeight+containerPaddingTop+containerPaddingBottom>document.documentElement.clientHeight){menu.classList.add('t450__overflowed')}else{menu.classList.remove('t450__overflowed')}})}
function t450_appearMenu(recid){var rec=document.getElementById('rec'+recid);var burger=rec?rec.querySelector('.t450__menu__content'):null;if(!burger)return;var burgerAppearOffset=burger?burger.getAttribute('data-appearoffset'):'';var burgerHideOffset=burger?burger.getAttribute('data-hideoffset'):'';if(burgerAppearOffset){burgerAppearOffset=t450_appearMenuParseNumber(burgerAppearOffset);if(window.pageYOffset>=burgerAppearOffset){if(burger.classList.contains('t450__beforeready')){burger.classList.remove('t450__beforeready')}}else{burger.classList.add('t450__beforeready')}}
if(burgerHideOffset){burgerHideOffset=t450_appearMenuParseNumber(burgerHideOffset);var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(window.pageYOffset+window.innerHeight>=scrollHeight-burgerHideOffset){if(!burger.classList.contains('t450__beforeready')){burger.classList.add('t450__beforeready')}}else if(burgerAppearOffset){if(window.pageYOffset>=burgerAppearOffset){burger.classList.remove('t450__beforeready')}}else{burger.classList.remove('t450__beforeready')}}}
function t450_appearMenuParseNumber(string){if(string.indexOf('vh')>-1){string=Math.floor((window.innerHeight*(parseInt(string)/100)))}
return parseInt(string,10)}
function t450_initMenu(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t450'):null;var overlay=rec?rec.querySelector('.t450__overlay'):null;var burger=rec?rec.querySelector('.t450__burger_container'):null;var menuLinks=rec?rec.querySelectorAll('.t-menu__link-item.t450__link-item_submenu'):[];var hook=menu?menu.getAttribute('data-tooltip-hook'):'';if(hook){document.addEventListener('click',function(e){if(e.target.closest('a[href="'+hook+'"]')){e.preventDefault();t450_closeMenu(menu,overlay);t450_showMenu(recid);t450_checkSize(recid)}})}
if(burger){burger.addEventListener('click',function(){t450_closeMenu(menu,overlay);t450_showMenu(recid);t450_checkSize(recid)})}
window.addEventListener('resize',function(){t450_checkSize(recid)});if(!window.isMobile)return;Array.prototype.forEach.call(menuLinks,function(link){link.addEventListener('click',function(){t450_checkSize(recid)})})}
function t450_highlight(recid){var url=window.location.href;var pathname=window.location.pathname;var hash=window.location.hash;if(url.substr(url.length-1)==='/'){url=url.slice(0,-1)}
if(pathname.substr(pathname.length-1)==='/'){pathname=pathname.slice(0,-1)}
if(pathname.charAt(0)==='/'){pathname=pathname.slice(1)}
if(pathname===''){pathname='/'}
var shouldBeActiveElements=document.querySelectorAll('.t450__menu a[href=\''+url+'\'], '+'.t450__menu a[href=\''+url+'/\'], '+'.t450__menu a[href=\''+pathname+'\'], '+'.t450__menu a[href=\'/'+pathname+'\'], '+'.t450__menu a[href=\''+pathname+'/\'], '+'.t450__menu a[href=\'/'+pathname+'/\']'+(hash?', .t450__menu a[href=\''+hash+'\']':''));var rec=document.getElementById('rec'+recid);var menuLinks=rec?rec.querySelectorAll('.t450__menu a'):[];Array.prototype.forEach.call(menuLinks,function(link){if(link.getAttribute('data-highlighted-by-user')!=='y')link.classList.remove('t-active')});Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
function t978_init(recid,cols,openOnClick){var rec=document.getElementById('rec'+recid);if(!rec)return;var submenuBlock=rec.querySelector('.t978');var hook=submenuBlock.getAttribute('data-tooltip-hook');var submenu=rec.querySelector('.t978__tooltip-menu');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('t978__tm-link');hookLink.setAttribute('data-tooltip-menu-id',recid);return!0}
return!1});var parentMenu=hookLinks[0]?hookLinks[0].closest('[data-menu]'):null;var isParentFixed=parentMenu?window.getComputedStyle(parentMenu).position==='fixed':!1;if(submenu)submenu.setAttribute('data-pos-fixed',isParentFixed?'yes':'no');t978_addArrow(recid,hookLinks);t978_setUpMenu(recid,hookLinks,cols,openOnClick);t_onFuncLoad('t_submenublocks__highlightActiveLinks',function(){t_submenublocks__highlightActiveLinks('.t978__menu-link, .t978__innermenu-link')});var isT804Exist=!!document.querySelector('.t804');if(isT804Exist){document.addEventListener('replacingCompleted',function(){t978_init(recid)})}
if(submenuBlock.hasAttribute('data-full-submenu-mob')&&(window.isMobile||'ontouchend' in document)){t_onFuncLoad('t_submenublocks__setFullScreenMenu',function(){t_submenublocks__setFullScreenMenu(submenuBlock)})}}
function t978_preview(recid,cols){var rec=document.getElementById('rec'+recid);if(!rec)return;var submenu=rec.querySelector('.t978__tooltip-menu');var content=submenu?submenu.querySelector('.t978__content'):null;if(!content)return;var innermenu=content.querySelector('.t978__innermenu');t978_divideMenu(recid,cols);var submenuActiveLink=content.querySelectorAll('.t978__menu-link');submenuActiveLink=Array.prototype.filter.call(submenuActiveLink,function(activeLink){return(activeLink.hasAttribute('data-menu-submenu-hook')&&activeLink.getAttribute('data-menu-submenu-hook'))});var submenuHook=submenuActiveLink.length?submenuActiveLink[0].getAttribute('data-menu-submenu-hook'):'';if(!submenuHook)return;var activeInnermenuWrapper=content.querySelector('.t978__innermenu-wrapper[data-submenu-hook="'+submenuHook+'"]');var activeInnermenuContent=activeInnermenuWrapper?activeInnermenuWrapper.querySelector('.t978__innermenu-content'):null;if(window.innerWidth>980){if(activeInnermenuWrapper)activeInnermenuWrapper.style.display='block';if(innermenu)innermenu.style.display='block';if(activeInnermenuContent)activeInnermenuContent.classList.add('t978__innermenu_show')}}
function t978_divideMenu(recid,rows){var rec=document.getElementById('rec'+recid);if(!rec)return;if(!rows)rows=1;var wrapperList=rec.querySelectorAll('.t978__tooltip-menu .t978__content .t978__innermenu-wrapper');Array.prototype.forEach.call(wrapperList,function(wrapper){var items=wrapper.querySelectorAll('.t978__innermenu-item');var list=wrapper.querySelector('.t978__innermenu-list');var minItemsCountInRow=Math.floor(items.length/rows);var remainder=items.length%rows;var rowClass='t978__menu-col_'+rows;for(var i=0;i<rows;i++){var row=document.createElement('div');row.classList.add('t978__menu-col');row.classList.add(rowClass);if(list)list.appendChild(row)}
var listRows=list?list.querySelectorAll('.t978__menu-col'):[];var pointer=0;Array.prototype.forEach.call(listRows,function(row,i){var itemsArray=Array.prototype.slice.call(items);var itemPerCol=i<remainder?minItemsCountInRow+1:minItemsCountInRow;var slicedItems=itemsArray.splice(pointer,pointer+itemPerCol);slicedItems.forEach(function(el){row.appendChild(el)});pointer+=itemPerCol})})}
function t978_addArrow(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenuBlock=rec?rec.querySelector('.t978'):null;var isArrowAppend=submenuBlock.getAttribute('data-add-arrow');if(!isArrowAppend)return;hookLinks=Array.prototype.slice.call(hookLinks);hookLinks.forEach(function(hookLink){if(hookLink.querySelector('.t978__arrow'))return;var arrow=document.createElement('div');arrow.classList.add('t978__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 t978_setUpMenu(recid,hookLinks,cols,openOnClick){var rec=document.getElementById('rec'+recid);var submenu=rec?rec.querySelector('.t978__tooltip-menu'):null;if(!submenu)return;var submenuBlock=rec.querySelector('.t978');var content=submenu.querySelector('.t978__content');var verticalIndent=submenuBlock?submenuBlock.getAttribute('data-tooltip-margin'):'';t978_divideMenu(recid,cols);hookLinks=Array.prototype.slice.call(hookLinks);if(window.innerWidth>980&&!('ontouchend' in document)){t978_addEventsDesktop(submenu,hookLinks,verticalIndent,openOnClick)}else{t978_addEventsMobile(submenu,hookLinks,verticalIndent,openOnClick)}
window.addEventListener('scroll',t_throttle(function(){if(content){content.addEventListener('mouseleave',function(){var activeHookLinks=hookLinks.length?hookLinks.filter(function(link){return link.classList.contains('t978__tm-link_active')}):[];var insertedSubmenu=activeHookLinks.length?activeHookLinks[0].nextElementSibling:null;if(submenu.classList.contains('t978__tooltip-menu_show')||(insertedSubmenu&&insertedSubmenu.classList.contains('t978__tooltip-menu_mobile'))){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(insertedSubmenu,'.t978')})}})}},300));var submenuAnchorLinks=document.querySelectorAll('.t978__tooltip-menu a[href*="#"]:not(.t978__menu-link_hook)');submenuAnchorLinks=Array.prototype.slice.call(submenuAnchorLinks);submenuAnchorLinks.forEach(function(link){link.addEventListener('click',function(){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t978',link)});submenuAnchorLinks.forEach(function(element){element.classList.remove('t-active')});link.classList.add('t-active')})});var elements=document.querySelectorAll('.t450, .t199__mmenu, .t280, .t282, .t204__burger, .t451, .t466');var event=document.createEvent('Event');event.initEvent('clickedAnchorInTooltipMenu',!0,!0);document.addEventListener('click',function(e){if(e.target.closest('.t978__tooltip-menu a[href*="#"]:not(.t978__menu-link_hook)')){Array.prototype.forEach.call(elements,function(el){el.dispatchEvent(event)})}})}
function t978_addEventsDesktop(submenu,hookLinks,verticalIndent,openOnClick){if(!submenu)return;hookLinks=Array.prototype.slice.call(hookLinks);var submenuLinks=submenu.querySelectorAll('.t978__menu-link');var hooksAndSubmenu=hookLinks.concat(submenu);t_onFuncLoad('t_submenublocks__addEventsDesktop',function(){t_submenublocks__addEventsDesktop(submenu,hooksAndSubmenu,verticalIndent,'.t978')});Array.prototype.forEach.call(submenuLinks,function(submenuLink){if(submenuLink.classList.contains('t978__menu-link_hook')){submenuLink.addEventListener('click',function(e){e.preventDefault()})}
if(submenu.getAttribute('data-set-events')!=='yes'){t978_addInnermenuEvents(submenu,openOnClick)}})}
function t978_addEventsMobile(submenu,hookLinks,verticalIndent,openOnClick){if(!submenu)return;t_onFuncLoad('t_submenublocks__addEventsMobile',function(){t_submenublocks__addEventsMobile(submenu,hookLinks,verticalIndent,'.t978')});document.addEventListener('submenuShow',function(){var activeHookLinks=hookLinks.filter(function(el){return el.classList.contains('t978__tm-link_active')});var isSubmenuShowed=submenu.classList.contains('t978__tooltip-menu_show');var insertedSubmenu=activeHookLinks.length?activeHookLinks[0].nextElementSibling:null;if(insertedSubmenu&&insertedSubmenu.classList.contains('t978__tooltip-menu_mobile')){t978_addInnermenuEvents(insertedSubmenu,openOnClick)}else if(submenu&&isSubmenuShowed){t978_addInnermenuEvents(submenu,openOnClick)}})}
function t978_addInnermenuEvents(submenu,openOnClick){if(!submenu)return;submenu.setAttribute('data-set-events','yes');var submenuLinks=submenu.querySelectorAll('.t978__menu-link');submenuLinks=Array.prototype.slice.call(submenuLinks);var innermenu=submenu.querySelectorAll('.t978__innermenu');var innermenuWrapper=submenu.querySelectorAll('.t978__innermenu-wrapper');var timer;var submenulinksAndInnermenu=submenuLinks.slice();Array.prototype.forEach.call(innermenu,function(menu){submenulinksAndInnermenu.push(menu)});if(window.innerWidth<=980||((window.isMobile||('ontouchend' in document&&/Macintosh/.test(navigator.userAgent)))&&window.innerWidth>980)){document.addEventListener('submenuHide',function(){t978_resetSubmenu(submenuLinks,innermenuWrapper,innermenu)});submenuLinks.forEach(function(submenuLink){submenuLink.removeEventListener('click',t978_addSubmenuClickEvent);submenuLink.addEventListener('click',t978_addSubmenuClickEvent)});return}
if(openOnClick==='on'){submenuLinks.forEach(function(submenuLink){submenuLink.addEventListener('click',function(e){var submenuHook=submenuLink.getAttribute('data-menu-submenu-hook');if(!submenuHook)return;e.preventDefault();t978_hideAllInnermenu(submenuLink);if(submenuLink.classList.contains('t978__menu-activelink')){t978_resetSubmenu(submenuLinks,innermenuWrapper,innermenu)}else{submenuLink.classList.add('t978__menu-activelink');t978_showInnermenu(submenu,submenuHook)}})})}else{submenulinksAndInnermenu.forEach(function(element){element.addEventListener('mouseover',function(e){var submenuLink=e.target.closest('.t978__menu-link');var isInnermenu=element.classList.contains('.t978__innermenu-content')||element.closest('.t978__innermenu-content');var isInnermenuShowed=element.classList.contains('.t978__innermenu_show')||element.closest('.t978__innermenu_show');if(submenuLink&&!submenuLink.classList.contains('.t978__menu-activelink')){t978_resetSubmenu(submenuLinks,innermenuWrapper,innermenu)}
if(isInnermenu&&!isInnermenuShowed)return;clearTimeout(timer);if(isInnermenu&&isInnermenuShowed)return;var submenuHook=element.getAttribute('data-menu-submenu-hook');if(submenuHook){element.classList.add('t978__menu-hoverlink');t978_showInnermenu(submenu,submenuHook)}});element.addEventListener('mouseout',function(){var submenuHook=element.getAttribute('data-menu-submenu-hook');if(submenuHook){timer=setTimeout(function(){t978_resetSubmenu(submenuLinks,innermenuWrapper,innermenu)},300)}})})}}
function t978_addSubmenuClickEvent(e){var submenuLink=this;var submenu=submenuLink.closest('.t978__tooltip-menu');var submenuHook=submenuLink.getAttribute('data-menu-submenu-hook');if(submenuHook){e.preventDefault();t978_hideAllInnermenu(submenuLink);if(submenuLink.classList.contains('t978__menu-activelink')){t978_hideInnermenu(submenu,submenuHook)}else{submenuLink.classList.add('t978__menu-activelink');t978_showInnermenu(submenu,submenuHook)}}}
function t978_showInnermenu(submenu,submenuHook){if(!submenu)return;var content=submenu.querySelector('.t978__content');if(!content)return;var innermenu=content.querySelector('.t978__innermenu');var innermenuWrapper=content.querySelector('.t978__innermenu-wrapper[data-submenu-hook="'+submenuHook+'"]');var activeLink=content.querySelector('.t978__menu-link[data-menu-submenu-hook="'+submenuHook+'"]');var activeLinkWrapper=activeLink?activeLink.parentElement:null;if(window.innerWidth<=980){if(activeLinkWrapper&&innermenuWrapper){activeLinkWrapper.insertAdjacentElement('afterend',innermenuWrapper)}
t_onFuncLoad('t_submenublocks__slideDown',function(){t_submenublocks__slideDown(innermenuWrapper,300,function(){var overflowEvent=document.createEvent('Event');overflowEvent.initEvent('menuOverflow',!0,!0);submenu.dispatchEvent(overflowEvent);t_onFuncLoad('t_submenublocks__processSubmenuHeight',function(){var isBottomMenu=submenu.style.bottom;t_submenublocks__processSubmenuHeight(submenu,innermenuWrapper,'.t978','open',isBottomMenu)})})})}else{if(innermenu)innermenu.classList.add('t978__innermenu_show');if(innermenuWrapper)innermenuWrapper.classList.add('t978__innermenu_show');t_onFuncLoad('t_submenublocks__processSubmenuHeight',function(){var isBottomMenu=submenu.style.bottom;content.style.alignItems=isBottomMenu?'flex-end':'';t_submenublocks__processSubmenuHeight(submenu,innermenuWrapper,'.t978','open',isBottomMenu)})}}
function t978_hideInnermenu(submenu,submenuHook){if(!submenu)return;var content=submenu.querySelector('.t978__content');if(!content)return;var innermenu=content.querySelector('.t978__innermenu');var innermenuWrapper=content.querySelector('.t978__innermenu-wrapper[data-submenu-hook="'+submenuHook+'"]');var activeLink=content.querySelector('.t978__menu-link[data-menu-submenu-hook="'+submenuHook+'"]');if(activeLink){activeLink.classList.remove('t978__menu-activelink');activeLink.classList.remove('t978__menu-hoverlink')}
if(window.innerWidth<=980){t_onFuncLoad('t_submenublocks__slideUp',function(){t_submenublocks__slideUp(innermenu,300,function(){var overflowEvent=document.createEvent('Event');overflowEvent.initEvent('menuOverflow',!0,!0);submenu.dispatchEvent(overflowEvent)});t_submenublocks__slideUp(innermenuWrapper,300,function(){var overflowEvent=document.createEvent('Event');overflowEvent.initEvent('menuOverflow',!0,!0);submenu.dispatchEvent(overflowEvent)})})}else{if(innermenu)innermenu.classList.remove('t978__innermenu_show');if(innermenuWrapper)innermenuWrapper.classList.remove('t978__innermenu_show');t_onFuncLoad('t_submenublocks__processSubmenuHeight',function(){t_submenublocks__processSubmenuHeight(submenu,innermenuWrapper,'.t978','close',!1)})}}
function t978_hideAllInnermenu(submenuLink){var menu=submenuLink.closest('.t978__menu');var links=menu.querySelectorAll('.t978__menu-link');Array.prototype.forEach.call(links,function(link){if(link.classList.contains('t978__menu-activelink')&&link!==submenuLink){var linkmenu=link.closest('.t978__tooltip-menu');var linkmenuHook=link.getAttribute('data-menu-submenu-hook');t978_hideInnermenu(linkmenu,linkmenuHook)}})}
function t978_resetSubmenu(submenuLinks,innermenuWrapper,innermenu){Array.prototype.forEach.call(submenuLinks,function(submenuLink){submenuLink.classList.remove('t978__menu-activelink');submenuLink.classList.remove('t978__menu-hoverlink')});if(window.innerWidth<=980){t_onFuncLoad('t_submenublocks__slideUp',function(){if(innermenu.length){Array.prototype.forEach.call(innermenu,function(menu){t_submenublocks__slideUp(menu,300,function(){var overflowEvent=document.createEvent('Event');overflowEvent.initEvent('menuOverflow',!0,!0);menu.dispatchEvent(overflowEvent)})})}
if(innermenuWrapper.length){Array.prototype.forEach.call(innermenuWrapper,function(wrapper){t_submenublocks__slideUp(wrapper,300,function(){var overflowEvent=document.createEvent('Event');overflowEvent.initEvent('menuOverflow',!0,!0);wrapper.dispatchEvent(overflowEvent)})})}})}else{if(innermenu.length){Array.prototype.forEach.call(innermenu,function(menu){menu.classList.remove('t978__innermenu_show')})}
if(innermenuWrapper.length){Array.prototype.forEach.call(innermenuWrapper,function(wrapper){wrapper.classList.remove('t978__innermenu_show')})}}}
function t985_init(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;if(searchVariants.length>0){t985_addSearchVariants(recid,searchVariants)}
var searchWidgetIcon=rec.querySelectorAll('.t985__search-widget-icon');Array.prototype.forEach.call(searchWidgetIcon,function(widgetIcon){widgetIcon.addEventListener('click',function(){t985_showSearch(rec)})});var closeIcon=rec.querySelector('.t985__close-icon');if(closeIcon){closeIcon.addEventListener('click',function(){t985_hideSearch(rec)})}
var overlay=rec.querySelector('.t985__overlay');if(overlay){overlay.addEventListener('click',function(event){var target=event.target;var parentTarget=target.parentElement;if(!target.classList.contains('.t985__widgetheader')&&!parentTarget.classList.contains('.t985__widgetheader')){t985_hideSearch(rec)}})}}
function t985_addSearchVariants(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;var container=rec.querySelector('.t985__searchvariants');var cleanVariants=searchVariants.replace(/(<([^>]+)>)/gi,'')
var searchArray=cleanVariants.split(',');Array.prototype.forEach.call(searchArray,function(variant){container.innerHTML+='<div class="t985__searchvariant t-text t-text_xs">'+variant+'</div>'})}
function t985_showSearch(rec){rec.querySelector('.t985__overlay').style.display='block';rec.querySelector('.t985__search-widget-icon').style.display='none'}
function t985_hideSearch(rec){rec.querySelector('.t985__overlay').style.display='none';rec.querySelector('.t985__search-widget-icon').style.display='block'}