window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isSafari=!1;if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){window.isSafari=!0}
window.isSafariVersion='';if(window.isSafari){var version=(navigator.appVersion).match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/);if(version!==null){window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
window.isIE=!!document.documentMode;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)}}}
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()})})})}}
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)});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 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 t486_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var textWrapper=rec.querySelector('.t486__textwrapper');if(!textWrapper)return;var images=rec.querySelectorAll('.t486__blockimg');var imageContainer=rec.querySelector('.t486__imgcontainer');var imageHeight=images[0].clientWidth;if(window.innerWidth>980){for(var i=0;i<images.length;i++){images[i].style.height=imageHeight+'px'}
textWrapper.style.height=imageContainer.clientWidth+'px'}else{var imageStyle=getComputedStyle(images[0],null);var imagePaddingLeft=parseInt(imageStyle.paddingLeft)||0;var imagePaddingRight=parseInt(imageStyle.paddingRight)||0;var imageWidth=images[0].clientWidth-(imagePaddingLeft+imagePaddingRight);for(var i=0;i<images.length;i++){images[i].style.height=imageWidth+'px'}
textWrapper.style.height='auto'}}
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 t992_init(recid){t992_highlight();t992_checkAnchorLinks(recid)}
function t992_highlight(){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('.t992__list-item a[href=\''+url+'\'], '+'.t992__list-item a[href=\''+url+'/\'], '+'.t992__list-item a[href=\''+pathname+'\'], '+'.t992__list-item a[href=\'/'+pathname+'\'], '+'.t992__list-item a[href=\''+pathname+'/\'], '+'.t992__list-item a[href=\'/'+pathname+'/\'], '+'.t992__list-item a[href=\'/'+hash+'/\']');Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
function t992_checkAnchorLinks(recid){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<980)return;var navLinks=rec.querySelectorAll('.t992__list-item a[href*=\'#\']');navLinks=Array.prototype.filter.call(navLinks,function(navLink){return!navLink.classList.contains('tooltipstered')});if(navLinks.length){t992_catchScroll(navLinks)}}
function t992_catchScroll(navLinks){var clickedSectionID=null;var sections=[];var sectionToNavigationLinkID={};var interval=100;var lastCall;var timeoutID;navLinks=navLinks.reverse();navLinks.forEach(function(link){var currentSection=t992_getSectionByHref(link);if(currentSection&&currentSection.id){sections.push(currentSection);sectionToNavigationLinkID[currentSection.id]=link}});t992_updateSectionsOffsets(sections);sections.sort(function(a,b){var firstTopOffset=parseInt(a.getAttribute('data-offset-top'),10)||0;var secondTopOffset=parseInt(b.getAttribute('data-offset-top'),10)||0;return secondTopOffset-firstTopOffset});window.addEventListener('resize',t_throttle(function(){t992_updateSectionsOffsets(sections)},200));if(typeof jQuery!=='undefined'){$('.t992').bind('displayChanged',function(){t992_updateSectionsOffsets(sections)})}else{var footerEls=document.querySelectorAll('.t992');Array.prototype.forEach.call(footerEls,function(footer){footer.addEventListener('displayChanged',function(){t992_updateSectionsOffsets(sections)})})}
var menuEls=document.querySelectorAll('.t992');Array.prototype.forEach.call(menuEls,function(menu){menu.addEventListener('displayChanged',function(){t992_updateSectionsOffsets(sections)})});setInterval(function(){t992_updateSectionsOffsets(sections)},5000);t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID);navLinks.forEach(function(navLink,i){navLink.addEventListener('click',function(){var clickedSection=t992_getSectionByHref(navLink);if(!navLink.classList.contains('tooltipstered')&&clickedSection&&clickedSection.id){navLinks.forEach(function(link,index){if(index===i){link.classList.add('t-active')}else{link.classList.remove('t-active')}});clickedSectionID=clickedSection.id}})});window.addEventListener('scroll',function(){var dateNow=new Date().getTime();if(lastCall&&dateNow<lastCall+interval){clearTimeout(timeoutID);timeoutID=setTimeout(function(){lastCall=dateNow;clickedSectionID=t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID)},interval-(dateNow-lastCall))}else{lastCall=dateNow;clickedSectionID=t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID)}})}
function t992_updateSectionsOffsets(sections){sections.forEach(function(section){var sectionTopPos=section.getBoundingClientRect().top+window.pageYOffset;section.setAttribute('data-offset-top',sectionTopPos)})}
function t992_getSectionByHref(curlink){if(!curlink)return;var href=curlink.getAttribute('href');var curLinkValue=href?href.replace(/\s+/g,''):'';if(curLinkValue.indexOf('/')===0)curLinkValue=curLinkValue.slice(1);if(href&&curlink.matches('[href*="#rec"]')){curLinkValue=curLinkValue.replace(/.*#/,'');return document.getElementById(curLinkValue)}else{var selector=href?href.trim():'';var slashIndex=selector.indexOf('#')!==-1?selector.indexOf('#'):!1;if(typeof slashIndex==='number'){selector=selector.slice(slashIndex+1)}else{slashIndex=selector.indexOf('/')!==-1?selector.indexOf('/'):!1;if(typeof slashIndex==='number')selector=selector.slice(slashIndex+1)}
var fullSelector='.r[data-record-type="215"] a[name="'+selector+'"]';return document.querySelector(fullSelector)?document.querySelector(fullSelector).closest('.r'):null}}
function t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID){var scrollPosition=window.pageYOffset;var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var returnValue=clickedSectionID;var lastSection=sections.length?sections[sections.length-1]:null;var lastSectionTopPos=lastSection?lastSection.getAttribute('data-offset-top'):'0';lastSectionTopPos=parseInt(lastSectionTopPos,10)||0;if(sections.length&&clickedSectionID===null&&lastSectionTopPos>(scrollPosition+300)){navLinks.forEach(function(link){link.classList.remove('t-active')});return null}
for(var i=0;i<sections.length;i++){var sectionTopPos=sections[i].getAttribute('data-offset-top');var navLink=sections[i].id?sectionToNavigationLinkID[sections[i].id]:null;if(scrollPosition+300>=sectionTopPos||i===0&&scrollPosition>=scrollHeight-window.innerHeight){if(clickedSectionID===null&&navLink&&!navLink.classList.contains('t-active')){navLinks.forEach(function(link){link.classList.remove('t-active')});if(navLink)navLink.classList.add('t-active');returnValue=null}else if(clickedSectionID!==null&&sections[i].id&&clickedSectionID===sections[i].id){returnValue=null}
break}}
return returnValue}
function t433_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var separateMap=document.querySelector('#separateMap'+recid);if(separateMap)separateMap.style.height='auto';t433_setMapHeight(recid);var mapWrapper=rec.querySelector('.t433');if(!mapWrapper)return;mapWrapper.addEventListener('displayChanged',function(){t433_setMapHeight(recid)});window.addEventListener('resize',t_throttle(function(){t433_setMapHeight(recid)}))}
function t433_setMapHeight(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var mapElement=rec.querySelector('.t-map');var textElement=rec.querySelector('.t433__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 t890_init(recId,offset){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t890');if(!container)return;var windowOffset=offset||window.innerHeight;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;window.addEventListener('scroll',t_throttle(function(){if(window.pageYOffset>windowOffset){container.style.display='block'}else{t890__fadeOut(container)}},200));var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);rec.addEventListener('click',function(e){if(e.target.closest('.t890__arrow')){isSafari?t890__animateScrollPolyfill(0):t890__scrollToTop()}})}
function t890__fadeOut(el){if(el.style.display==='none')return;var opacity=1;var timer=setInterval(function(){el.style.opacity=opacity;opacity-=0.1;if(opacity<=0.1){clearInterval(timer);el.style.display='none';el.style.opacity=null}},20)}
function t890__scrollToTop(){if(window.isIE){window.scrollTo(0,0)}else{window.scrollTo({left:0,top:0,behavior:'smooth'})}}
function t890__animateScrollPolyfill(target){var documentHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var bottomViewportPoint=documentHeight-document.documentElement.clientHeight;if(target>bottomViewportPoint)target=bottomViewportPoint;if(target===window.pageYOffset)return!1;var currentPosition=window.pageYOffset;var step=(target-currentPosition)/30;var difference=window.pageYOffset;var timerID=setInterval(function(){difference+=step;window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if((target-currentPosition<0&&window.pageYOffset<=target)||(target-currentPosition>0&&window.pageYOffset>=target)){clearInterval(timerID);document.body.removeAttribute('data-scrollable')}},10)}