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.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 t754_POPUP_SHOWED_EVENT_NAME='catalog:popupShowed';var t754_POPUP_CLOSED_EVENT_NAME='catalog:popupClosed';function t754__init(recid){setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)});t754__hoverZoom_init(recid);t754_initPopup(recid);t754__updateLazyLoad(recid);t754__alignButtons_init(recid);t_onFuncLoad('t_store_addProductQuantityEvents',function(){t754_initProductQuantity(recid)});var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)},500)}
function t754_initProductQuantity(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var productList=rec.querySelectorAll('.t754__col, .t754__product-full');Array.prototype.forEach.call(productList,function(product){t_store_addProductQuantityEvents(product)})}
function t754__showMore(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t754');if(!wrapperBlock)return;var productColumns=wrapperBlock.querySelectorAll('.t754__col');var cardsSize=productColumns.length;var cardsCount=parseInt(wrapperBlock.getAttribute('data-show-count'),10);if(isNaN(cardsCount)||cardsCount<1)return;Array.prototype.forEach.call(productColumns,function(column){column.style.display='none'});for(var i=0;i<cardsCount;i++){if(productColumns[i]){productColumns[i].style.display='inline-block'}}
var showMoreButton=wrapperBlock.querySelector('.t754__showmore');if(!showMoreButton)return;if(showMoreButton.querySelector('td').textContent===''){showMoreButton.querySelector('td').textContent=t754__dict()}
if(cardsCount<productColumns.length){showMoreButton.style.display='inline-block'}
t754__showSeparator(wrapperBlock,cardsCount);showMoreButton.addEventListener('click',function(){var currentColumns=wrapperBlock.querySelectorAll('.t754__col');var currentColumnsShowed=0;Array.prototype.forEach.call(currentColumns,function(column){if(column.style.display==='inline-block'){++currentColumnsShowed}});for(var i=0;i<cardsCount+currentColumnsShowed;i++){if(currentColumns[i]){currentColumns[i].style.display='inline-block'}}
if(cardsCount+currentColumnsShowed>=cardsSize){showMoreButton.style.display='none'}
if(!document.querySelector('.t-records').getAttribute('data-tilda-mode')){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
t754__showSeparator(wrapperBlock,cardsCount+currentColumnsShowed);if(wrapperBlock.querySelector('[data-buttons-v-align]')){t754__alignButtons(recid)}})}
function t754__showSeparator(rec,cardsCount){if(window.jQuery&&rec instanceof jQuery){rec=rec.get(0)}
var allSeparators=rec.querySelectorAll('.t754__separator_number');Array.prototype.forEach.call(allSeparators,function(separator){separator.classList.add('t754__separator_hide');if(separator.getAttribute('data-product-separator-number')<=cardsCount){separator.classList.remove('t754__separator_hide')}})}
function t754__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 t754__alignButtons_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;if(!rec.querySelector('[data-buttons-v-align]')){return}
try{t754__alignButtons(recid);if(document.querySelector('.t-records').getAttribute('data-tilda-mode')==='edit'){setInterval(function(){t754__alignButtons(recid)},200)}
window.addEventListener('resize',t_throttle(function(){if(window.noAdaptive&&window.isMobile){return}
t754__alignButtons(recid)},200));var wrapperBlock=rec.querySelector('.t754');if(wrapperBlock){wrapperBlock.addEventListener('displayChanged',function(){t754__alignButtons(recid)})}
if(window.isMobile){window.addEventListener('orientationchange',function(){t754__alignButtons(recid)})}}catch(error){console.log('buttons-v-align error: '+error.message)}}
function t754__alignButtons(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrappers=rec.querySelectorAll('.t754__textwrapper');var maxHeight=0;var container=rec.querySelector('.t754__parent');if(!container)return;var itemsInRow=parseInt(container.getAttribute('data-blocks-per-row'),10);if(!itemsInRow){itemsInRow=3}
var mobileView=window.innerWidth<=480;var tableView=window.innerWidth<=960&&window.innerWidth>480;var mobileOneRow=window.innerWidth<=960&&rec.querySelector('.t754__container_mobile-flex');var mobileTwoItemsInRow=window.innerWidth<=480&&rec.querySelector('.t754 .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(element){element.style.height='auto';if(itemsInRow===1){element.style.height='auto'}else{wrappersInRow.push(element);if(element.offsetHeight>maxHeight){maxHeight=element.offsetHeight}
Array.prototype.forEach.call(wrappersInRow,function(wrapper){wrapper.style.height=maxHeight+'px'});if(count===itemsInRow){count=0;maxHeight=0;wrappersInRow=[]}
count++}})}
function t754__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 t754__updateLazyLoad(recid){var scrollContainer=document.querySelector('#rec'+recid+' .t754__container_mobile-flex');var tRecords=document.querySelector('.t-records');if(!tRecords)return;var currentMode=tRecords.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 t754_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var popup=rec.querySelector('.t-popup');var body=document.body;var linksProd=rec.querySelectorAll('[href^="#prodpopup"]');Array.prototype.forEach.call(linksProd,function(popupLink){var product=popupLink.closest('.js-product');var productLid=product.getAttribute('data-product-lid');var productLinks=document.querySelectorAll('.r a[href$="#!/tproduct/'+recid+'-'+productLid+'"]');Array.prototype.forEach.call(productLinks,function(productLink){productLink.addEventListener('click',function(){if(rec.querySelector('[data-product-lid="'+productLid+'"]')){var linkToPopup=product.querySelector('[href^="#prodpopup"]');if(linkToPopup){var event=document.createEvent('HTMLEvents');event.initEvent('click',!0,!1);linkToPopup.dispatchEvent(event)}}})});popupLink.addEventListener('click',clickOnceHandler,!1);function clickOnceHandler(event){event.preventDefault();var product=popupLink.closest('.js-product');var productLid=product.getAttribute('data-product-lid');t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid+' #t754__product-'+productLid)});popupLink.removeEventListener('click',clickOnceHandler,!1)}
popupLink.addEventListener('click',showPopupHandler,!1);function showPopupHandler(event){event.preventDefault();var isT1002Button=event.target.classList.contains('t1002__addBtn')||event.target.parentNode.classList.contains('t1002__addBtn');if(isT1002Button)return;t754_showPopup(recid);var product=popupLink.closest('.js-product');var productLid=product.getAttribute('data-product-lid');var productFull=popup.querySelector('.js-product[data-product-lid="'+productLid+'"]');productFull.style.display='block';var analitics=popupLink.getAttribute('data-track-popup');if(analitics&&productFull&&window.Tilda){var productName=productFull.querySelector('.js-product-name');if(productName){var virtTitle=productName.textContent;if(!virtTitle){virtTitle='prod'+productLid}
Tilda.sendEventToStatistics(analitics,virtTitle)}}
var currentUrl=window.location.href;if(currentUrl.indexOf('#!/tproduct/')<0&&currentUrl.indexOf('%23!/tproduct/')<0&&currentUrl.indexOf('#%21%2Ftproduct%2F')<0){if(history.replaceState){window.history.replaceState('','',window.location.href+'#!/tproduct/'+recid+'-'+productLid)}}
t754_updateSlider(recid+' #t754__product-'+productLid);if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}});if(popup){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){t754_closePopup(body,popup)}});var allRecords=document.getElementById('allrecords');var currentMode=allRecords.getAttribute('data-tilda-mode');var isPublishedPage=currentMode!=='edit'&&currentMode!=='preview';if(isPublishedPage&&(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes')){popup.addEventListener('scroll',function(event){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})})}}
var closeButtons=rec.querySelectorAll('.t-popup__close, .t754__close-text');Array.prototype.forEach.call(closeButtons,function(button){button.addEventListener('click',function(){t754_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){t754_closePopup(body,popup)}}});if(!document.getElementById('record'+recid)){t754_checkUrl(recid)}
if(popup&&popup.hasAttribute('data-fixed-button')){t754_fixedPopupButton(recid)}}
function t754_showPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;if(rec.classList.contains('r_hidden')){rec.classList.remove('r_hidden')
if(rec.classList.contains('r_anim')){rec.classList.remove('r_anim')}}
var popup=rec.querySelector('.t-popup');var fullProducts=popup.querySelectorAll('.t754__product-full');Array.prototype.forEach.call(fullProducts,function(product){product.style.display='none'});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,t754_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)}
function t754_closePopup(body,popup){var fullProducts=popup.querySelectorAll('.t754__product-full');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');body.classList.remove('t-body_popupshowed');popup.classList.remove('t-popup_show');var currentUrl=window.location.href;var indexToRemove=currentUrl.indexOf('#!/tproduct/');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&indexToRemove<0){indexToRemove=currentUrl.indexOf('%23!/tproduct/');if(indexToRemove<0){indexToRemove=currentUrl.indexOf('#%21%2Ftproduct%2F')}}
currentUrl=currentUrl.substring(0,indexToRemove);setTimeout(function(){popup.scrollTop=0;popup.style.display='none';Array.prototype.forEach.call(fullProducts,function(product){product.style.display='none'});if(history.replaceState){window.history.replaceState('','',currentUrl)}},300);t_triggerEvent(popup,t754_POPUP_CLOSED_EVENT_NAME)}
function t754_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 pos=parseFloat(sliderWrapper.getAttribute('data-slider-pos'));sliderWrapper.style.transform='translate3d(-'+sliderWidth*pos+'px, 0, 0)';t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)})}
function t754_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 t754_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('.t754__btn-wrapper');Array.prototype.forEach.call(btnWrappers,function(el){el.classList.add('t754__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(t754_POPUP_SHOWED_EVENT_NAME,function(){setTimeout(function(){handleResize()},0)});popup.addEventListener(t754_POPUP_CLOSED_EVENT_NAME,function(){resetStyle()});window.addEventListener('resize',handleResize)}
if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;while(el&&el.nodeType===1){if(Element.prototype.matches.call(el,s)){return el}
el=el.parentElement||el.parentNode}
return null}}
function t452_scrollToTop(){var duration=700;var difference=window.pageYOffset;var step=10*difference/duration;var timer=setInterval(function(){difference-=step;window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if(window.pageYOffset===0){document.body.removeAttribute('data-scrollable');clearInterval(timer)}},10)}
function t706_onSuccessCallback(){var products=document.querySelector('.t706__cartwin-products');var cartBottom=document.querySelector('.t706__cartwin-bottom');var cartForm=document.querySelector('.t706 .t-form__inputsbox');if(products)t706_slideUp(products,10);if(cartBottom)t706_slideUp(cartBottom,10);if(cartForm)t706_slideUp(cartForm,700);try{tcart__unlockScroll()}catch(error){}}
function t706_slideUp(target,duration){if(!target)return;if(!duration&&duration!==0)duration=500;target.style.transitionProperty='height, margin, padding';target.style.transitionDuration=duration+'ms';target.style.boxSizing='border-box';target.style.height=target.offsetHeight+'px';target.style.overflow='hidden';target.style.height='0';target.style.paddingTop='0';target.style.paddingBottom='0';target.style.marginTop='0';target.style.marginBottom='0';setTimeout(function(){target.style.display='none';target.style.height='';target.style.paddingTop='';target.style.paddingBottom='';target.style.marginTop='';target.style.marginBottom='';target.style.overflow='';target.style.transitionDuration='';target.style.transitionProperty=''},duration)}
function t190_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;rec.addEventListener('click',function(e){if(e.target.closest('.t190__button')){t190_scrollToTop()}})}
function t190_scrollToTop(){var duration=700;var start=(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0);var change=0-start;var currentTime=0;var increment=16;document.body.setAttribute('data-scrollable','true');var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(isSafari){t190__animateScrollPolyfill(0)}else{t190__animateScroll()}
function t190__easeInOutCubic(currentTime){if((currentTime/=duration/2)<1){return(change/2)*currentTime*currentTime*currentTime+start}else{return(change/2)*((currentTime-=2)*currentTime*currentTime+2)+start}}
function t190__animateScroll(){currentTime+=increment;window.scrollTo(0,t190__easeInOutCubic(currentTime));if(currentTime<duration){setTimeout(t190__animateScroll,increment)}else{document.body.removeAttribute('data-scrollable')}}}
function t190__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)}
function t886_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var notificationBlock=rec.querySelector('.t886');var closeButton=rec.querySelector('.t886__btn');var storageItem=notificationBlock.getAttribute('data-storage-item');var lastOpen;try{lastOpen=localStorage.getItem(storageItem)}catch(error){console.log('Your web browser does not support localStorage. Error status: ',error)}
if(!lastOpen){notificationBlock.classList.remove('t886_closed')}
if(closeButton){closeButton.addEventListener('click',function(event){notificationBlock.classList.add('t886_closed');try{localStorage.setItem(storageItem,Math.floor(Date.now()/1000))}catch(error){console.log('Your web browser does not support localStorage. Error status: ',error)}
event.preventDefault()})}}
window.requestAnimationFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60)}})();function t270_scroll(hash,offset){if(!hash)return;t270_checkLoad(hash,offset);if(hash.indexOf('#!/tproduct/')!==-1||hash.indexOf('#!/tab/')!==-1){return!0}
var isHistoryChangeAllowed=window.location.hash!==hash;var wrapperBlock=document.querySelector('.t270');var dontChangeHistory=wrapperBlock?Boolean(wrapperBlock.getAttribute('data-history-disabled')):!1;t270_scrollToEl(hash,offset);if(!dontChangeHistory&&isHistoryChangeAllowed){if(history.pushState){history.pushState(null,null,hash)}else{window.location.hash=hash}
isHistoryChangeAllowed=!1}
return!0}
function t270_checkLoad(hash,offset){if(window.t270_loadChecked)return;var sliderWrappers=document.body.querySelectorAll('.t-slds__items-wrapper');if(!sliderWrappers.length)return;var lastWrapper=sliderWrappers[sliderWrappers.length-1];var sliderImgs=lastWrapper?lastWrapper.querySelectorAll('.t-slds__bgimg'):[];var lastImg=sliderImgs[sliderImgs.length-1];var imageUrl=lastImg?window.getComputedStyle(lastImg).backgroundImage:'';imageUrl=imageUrl.substring(5,imageUrl.length-2);var preloaderImg=document.createElement('img');preloaderImg.src=imageUrl?imageUrl:'';preloaderImg.addEventListener('load',function(){t270_scroll(hash,offset);window.t270_loadChecked=!0})}
function t270_scrollToEl(hash,offset){if(document.body.getAttribute('data-scroll'))return;var scrollTargetY=t270_getTarget(hash,offset);if(isNaN(scrollTargetY))return;var body=document.body;var canSmoothScroll=window.CSS&&window.CSS.supports('scroll-behavior','smooth');if(window.isMobile&&canSmoothScroll&&'scrollBehavior' in document.documentElement.style){body.setAttribute('data-scroll','true');window.scrollTo({left:0,top:scrollTargetY,behavior:'smooth'});setTimeout(function(){body.removeAttribute('data-scroll')},500)}else{var html=document.querySelector('html');var documentHeight=Math.max(body.scrollHeight,body.offsetHeight,body.clientHeight,html.offsetHeight);var scrollY=window.scrollY||document.documentElement.scrollTop;var speed=2000;var time=Math.max(.1,Math.min(Math.abs(scrollY-scrollTargetY)/speed,.8));var currentTime=0;function t270_easeInQuad(pos){return Math.pow(pos,2)}
function t270_animationScroll(){currentTime+=1/60;var newDocumentHeight=Math.max(body.scrollHeight,body.offsetHeight,body.clientHeight,html.offsetHeight);if(documentHeight<newDocumentHeight){documentHeight=newDocumentHeight;scrollTargetY=t270_getTarget(hash,offset);scrollY=window.scrollY||document.documentElement.scrollTop;time=Math.max(.1,Math.min(Math.abs(scrollY-scrollTargetY)/speed,.8))}
var difference=currentTime/time;var animation=t270_easeInQuad(difference);if(difference<1){requestAnimationFrame(t270_animationScroll);window.scrollTo(0,scrollY+((scrollTargetY-scrollY)*animation))}else{body.removeAttribute('data-scroll');body.removeAttribute('data-scrollable');window.scrollTo(0,scrollTargetY)}}
body.setAttribute('data-scroll','true');body.setAttribute('data-scrollable','true');t270_animationScroll()}}
function t270_getTarget(hash,offset){var target;try{if(hash.substring(0,1)==='#'){target=document.getElementById(hash.substring(1))}else{target=document.querySelector(hash)}}catch(event){console.log('Exception t270: '+event.message);return}
if(!target){target=document.querySelector('a[name="'+hash.substr(1)+'"]');if(!target)return}
target=parseInt((target.getBoundingClientRect().top+window.pageYOffset)-offset,10);target=Math.max(target,0);return target}