window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
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 t982_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t982');if(!container)return;var itemWrappers=rec.querySelectorAll('.t982__itemwrapper');var socials=rec.querySelectorAll('.t982__socials');for(var i=0;i<socials.length;i++){var social=socials[i];var socialAttr=social.getAttribute('data-social-links');var links=[];social.removeAttribute('data-social-links');if(socialAttr){links=socialAttr.split(',');for(var j=0;j<links.length;j++){t982_addSocialsItem(links[j].trim(),social)}}}
t982_setEqualHeight(itemWrappers);if(typeof jQuery!=='undefined'){$(container).bind('displayChanged',function(){t982_setEqualHeight(itemWrappers)})}else{container.addEventListener('displayChanged',t_throttle(function(){t982_setEqualHeight(itemWrappers)}))}}
function t982_addSocialsItem(link,socialWrapper){var item=t982_findSocialsItem(link);if(item){var block='';block='<div class="t982__socials-item">';block+='<a href="'+link+'"  class="t982__socials-link" target="_blank" rel="nofollow noopener noreferrer">';block+=item.title;block+='</a>';block+='</div>';socialWrapper.append(block)}}
function t982_findSocialsItem(link){var socials=[{title:'Facebook',str:['facebook','fb.com']},{title:'Twitter',str:['twitter']},{title:'Vkontakte',str:['vk.com','vk.me']},{title:'Odnoklassniki',str:['ok.ru']},{title:'Behance',str:['behance']},{title:'Vimeo',str:['vimeo']},{title:'YouTube',str:['youtube','youtu.be']},{title:'Instagram',str:['instagram']},{title:'Pinterest',str:['pinterest']},{title:'LinkedIn',str:['linkedin']},{title:'SoundCloud',str:['soundcloud']},{title:'Telegram',str:['telegram','t.me']},{title:'WhatsApp',str:['wa.me']}];var socialsItem;Array.prototype.forEach.call(socials,function(item){Array.prototype.forEach.call(item.str,function(s){if(link.indexOf(s)!==-1)socialsItem=item})});return socialsItem}
function t982_setEqualHeight(itemWrappers){var maxHeight=0;for(var i=0;i<itemWrappers.length;i++){itemWrappers[i].style.height=''}
for(var i=0;i<itemWrappers.length;i++){var itemWrapper=itemWrappers[i];var itemWrapperStyle=getComputedStyle(itemWrapper,null);var itemWrapperPaddingTop=parseInt(itemWrapperStyle.paddingTop)||0;var itemWrapperPaddingBottom=parseInt(itemWrapperStyle.paddingBottom)||0;var itemWrapperHeight=itemWrapper.clientHeight-(itemWrapperPaddingTop+itemWrapperPaddingBottom);if(itemWrapperHeight>maxHeight)maxHeight=itemWrapperHeight}
if(window.innerWidth>=960){for(var i=0;i<itemWrappers.length;i++){itemWrappers[i].style.height=maxHeight+'px'}}else{for(var i=0;i<itemWrappers.length;i++){itemWrappers[i].style.height='auto'}}}
function t979_init(recid,rowheight,guttersizer){var rec=document.getElementById('rec'+recid);if(!rec)return;var grid=rec.querySelector('.t979__grid');if(!grid)return;var items=rec.querySelectorAll('.t979__grid-item');var images=rec.querySelectorAll('.t979__image');var overlayList=rec.querySelectorAll('.t979__overlay');if(guttersizer==='')guttersizer=0;t979_reverse(grid);t979_initMasonry(rec,recid,grid,rowheight,guttersizer,images);if(typeof jQuery!=='undefined'){$(rec).find('.t979').bind('displayChanged',t_throttle(function(){var gutterSizer=parseInt(guttersizer,10);var heightSizer=parseInt(rowheight,10);var containerWidth=grid?grid.offsetWidth:0;var imageWidths=t979_getImageWidths(grid,heightSizer);var rows=t979_divideRows(imageWidths,containerWidth);var heights=[];t979_fitItemsByWidth(rows,heights,containerWidth,heightSizer,gutterSizer);t979_updateItems(grid,rows,heights,gutterSizer);t979_updateGridHeight(grid,heights,gutterSizer)}))}else{var currentBlock=rec.querySelector('.t979');currentBlock.addEventListener('displayChanged',t_throttle(function(){var gutterSizer=parseInt(guttersizer,10);var heightSizer=parseInt(rowheight,10);var containerWidth=grid?grid.offsetWidth:0;var imageWidths=t979_getImageWidths(grid,heightSizer);var rows=t979_divideRows(imageWidths,containerWidth);var heights=[];t979_fitItemsByWidth(rows,heights,containerWidth,heightSizer,gutterSizer);t979_updateItems(grid,rows,heights,gutterSizer);t979_updateGridHeight(grid,heights,gutterSizer)}))}
window.addEventListener('resize',t_throttle(function(){var gutterSizer=parseInt(guttersizer,10);var heightSizer=parseInt(rowheight,10);var containerWidth=grid?grid.offsetWidth:0;var imageWidths=t979_getImageWidths(grid,heightSizer);var rows=t979_divideRows(imageWidths,containerWidth);var heights=[];t979_fitItemsByWidth(rows,heights,containerWidth,heightSizer,gutterSizer);t979_updateItems(grid,rows,heights,gutterSizer);t979_updateGridHeight(grid,heights,gutterSizer)}));t_onFuncLoad('imagesLoaded',function(){imagesLoaded(grid,function(){t979_initMasonry(rec,recid,grid,rowheight,guttersizer,images);Array.prototype.forEach.call(images,function(img){img.style.display='block'})})})}
function t979_reverse(grid){if(grid&&grid.classList.contains('t979__grid_reverse')){for(var i=grid.childElementCount-2;i>=0;i--){grid.appendChild(grid.children[i])}}}
function t979_initMasonry(rec,recid,grid,rowheight,guttersizer,images){var gutterSizer=parseInt(guttersizer,10);var heightSizer=parseInt(rowheight,10);Array.prototype.forEach.call(images,function(img){if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&window.lazy==='y'){t979__waitLazyLoadIMG(img,function(){t979_eventOnLoadImg(grid,heightSizer,gutterSizer)})}else{if(img.complete&&img.naturalHeight&&img.naturalWidth){t979_eventOnLoadImg(grid,heightSizer,gutterSizer)}else{img.addEventListener('load',function(){t979_eventOnLoadImg(grid,heightSizer,gutterSizer)})}}})}
function t979__waitLazyLoadIMG(img,cb){if(img.complete&&img.naturalHeight&&img.naturalWidth){cb()}else{setTimeout(function(){t979__waitLazyLoadIMG(img,cb)},500)}}
function t979_eventOnLoadImg(grid,heightSizer,gutterSizer){var containerWidth=grid?grid.offsetWidth:0;var imageWidths=t979_getImageWidths(grid,heightSizer);var rows=t979_divideRows(imageWidths,containerWidth);var heights=[];t979_fitItemsByWidth(rows,heights,containerWidth,heightSizer,gutterSizer);t979_updateItems(grid,rows,heights,gutterSizer);t979_updateGridHeight(grid,heights,gutterSizer)}
function t979_getImageWidths(grid,heightSizer){var imageWidths=[];if(!grid)return!1;var images=grid.querySelectorAll('.t979__image');Array.prototype.forEach.call(images,function(img){imageWidths.push(img.naturalWidth*heightSizer/img.naturalHeight)});return imageWidths}
function t979_divideRows(imageWidths,containerWidth){var rows=[];var curRow=0;var rowWidth=0;Array.prototype.forEach.call(imageWidths,function(item){rowWidth+=item;if(typeof rows[curRow]=='undefined'){rows[curRow]=[]}
rows[curRow].push(item);if(rowWidth>=containerWidth){curRow+=1;rowWidth=0}});return rows}
function t979_fitItemsByWidth(rows,heights,containerWidth,heightSizer,gutterSizer){rows.forEach(function(row){var sumWidth=0;var thresholdRatio=1.5;var rowWidth=containerWidth-gutterSizer*(row.length-1);row.forEach(function(width){sumWidth+=width});var ratio=rowWidth/sumWidth;if(ratio<thresholdRatio){row.forEach(function(width,curRow){width*=ratio;row[curRow]=width});heights.push(heightSizer*ratio)}else{heights.push(heightSizer)}
sumWidth=0;row.forEach(function(width){sumWidth+=width})})}
function t979_updateItems(grid,rows,heights,gutterSizer){if(!grid)return!1;var curRow=0;var curCol=0;var top=0;var left=0;var width=0;var height=0;var items=grid.querySelectorAll('.t979__grid-item');Array.prototype.forEach.call(items,function(item){if(curCol>=rows[curRow].length){top+=heights[curRow];curRow++;curCol=0;if(curRow!==0){top+=gutterSizer}
left=0}
left+=rows[curRow][curCol-1]?rows[curRow][curCol-1]+gutterSizer:0;width=rows[curRow][curCol];height=heights[curRow];item.style.top=top+'px';item.style.left=left+'px';item.style.width=width+'px';item.style.height=height+'px';curCol++})}
function t979_updateGridHeight(grid,heights,gutterSizer){var sumHeight=heights.reduce(function(cur,acc){return cur+acc+gutterSizer},0);sumHeight-=gutterSizer;if(grid)grid.style.height=sumHeight+'px'}
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);var excludeHashes=['#!/tproduct/','#!/tab/','#opencart']
if(excludeHashes.includes(hash)){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){var SCROLL_DURATION_MS=500;var body=document.body;if(body.getAttribute('data-scroll'))return;var scrollTargetY=t270_getTarget(hash,offset);if(isNaN(scrollTargetY))return;var canSmoothScroll=window.CSS&&window.CSS.supports('scroll-behavior','smooth')&&'scrollBehavior' in document.documentElement.style;var userAgent=navigator.userAgent.toLowerCase();var isAndroid=userAgent.indexOf('android')!==-1;if(window.isMobile&&!isAndroid&&canSmoothScroll){body.setAttribute('data-scroll','true');window.scrollTo({left:0,top:scrollTargetY,behavior:'smooth'});setTimeout(function(){body.removeAttribute('data-scroll')},SCROLL_DURATION_MS)}else{t270_smoothScrollTo(scrollTargetY,SCROLL_DURATION_MS)}}
function t270_smoothScrollTo(targetY,duration=500){var body=document.body;var startY=window.scrollY||window.pageYOffset;var deltaY=targetY-startY;var startTime=performance.now();function easeInOutQuad(t){return Math.pow(t,2)}
function scroll(){var currentTime=performance.now();var elapsedTime=Math.min((currentTime-startTime)/duration,1);var ease=easeInOutQuad(elapsedTime);window.scrollTo(0,startY+deltaY*ease);if(elapsedTime<1){requestAnimationFrame(scroll)}else{body.removeAttribute('data-scroll');body.removeAttribute('data-scrollable');window.scrollTo(0,targetY)}}
body.setAttribute('data-scroll','true');body.setAttribute('data-scrollable','true');requestAnimationFrame(scroll)}
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)+'"], div[id="'+hash.substr(1)+'"]');if(!target)return}
target=parseInt((target.getBoundingClientRect().top+window.pageYOffset)-offset,10);target=Math.max(target,0);return target}
function t280_showMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);var isAndroid=/(android)/i.test(navigator.userAgent);var menu=rec.querySelector('.t280');var menuItems=rec.querySelectorAll('.t280__menu__item');var menuLinks=rec.querySelectorAll('.t978__menu-link');var menuContainer=rec.querySelector('.t280__menu');var menuBurger=menu?menu.querySelector('.t-menuburger'):null;var clickElementsList=rec.querySelectorAll('.t280 .t-menuburger, .t280__menu__bg, .t280__menu__link:not(.tooltipstered):not(.t280__menu__link_submenu), .t978__tooltip-menu_mobile');Array.prototype.forEach.call(clickElementsList,function(clickElement){clickElement.addEventListener('click',function(){if(clickElement.closest('.t280__menu__link.tooltipstered')||clickElement.closest('.t794__tm-link'))return;if(isChrome&&isAndroid&&menuItems.length>10&&window.location.hash){setTimeout(function(){var hash=window.location.hash;window.location.hash='';window.location.hash=hash},50)}
if(!clickElement.closest('.t978__tm-link, .t966__tm-link')){document.body.classList.toggle('t280_opened');if(menu)menu.classList.toggle('t280__main_opened')}
if(clickElement.classList.contains('t-menuburger')){var expandedStatus=clickElement.classList.contains('t-menuburger-opened');clickElement.setAttribute('aria-expanded',expandedStatus)}
t280_changeSize(recid);t280_highlight(recid)})});document.addEventListener('click',function(e){if(e.target.closest('.t978__tm-link, .t966__tm-link, .t-menusub__target-link, .t978__menu-link_hook')){t280_changeSize(recid);if(menuContainer)menuContainer.style.transition='none'}
if(e.target.closest('.t978__menu-item')){setTimeout(function(){t280_changeSize(recid);if(menuContainer)menuContainer.style.transition='none'},200)}});Array.prototype.forEach.call(menuLinks,function(link){link.addEventListener('click',function(){t280_changeSize(recid)})});if(menu){menu.addEventListener('clickedAnchorInTooltipMenu',function(){document.body.classList.remove('t280_opened');menu.classList.remove('t280__main_opened')})}
var submenuLinks=rec.querySelectorAll('.t-menusub__link-item');Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){document.body.classList.remove('t280_opened');if(menu)menu.classList.remove('t280__main_opened');if(menuBurger){menuBurger.classList.remove('t-menuburger-opened');menuBurger.setAttribute('aria-expanded',!1)}})});if(submenuLinks.length>0){document.addEventListener('submenuShow',function(){t280_changeSize(recid)})}}
function t280_changeSize(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec.querySelector('.t280__menu');var menuBottom=rec.querySelector('.t280__bottom');var menuContainer=rec.querySelector('.t280__container');var menuWrapper=rec.querySelector('.t280__menu__wrapper');var menuHeight=menu?menu.offsetHeight:0;var menuBottomHeight=menuBottom?menuBottom.offsetHeight:0;var menuContainerHeight=menuContainer?menuContainer.offsetHeight:0;var padding=140;if(menuHeight>document.documentElement.clientHeight-(menuBottomHeight+menuContainerHeight+padding)){if(menuWrapper)menuWrapper.classList.add('t280__menu_static');if(menu)menu.style.paddingTop=(menuContainerHeight||0)+'px'}else{if(menuWrapper)menuWrapper.classList.remove('t280__menu_static');if(menu)menu.style.paddingTop=''}}
function t280_changeBgOpacityMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menuBlocks=rec.querySelectorAll('.t280__container__bg');Array.prototype.forEach.call(menuBlocks,function(menu){var bgColor=menu.getAttribute('data-bgcolor-rgba');var bgColorAfterScroll=menu.getAttribute('data-bgcolor-rgba-afterscroll');var bgOpacity=menu.getAttribute('data-bgopacity');var bgOpacityTwo=menu.getAttribute('data-bgopacity2');var menuShadowOpacity=parseInt(menu.getAttribute('data-menushadow'),10)||0;menuShadowOpacity/=100;var menuShadowCSS=menu.getAttribute('data-menushadow-css');menu.style.backgroundColor=window.pageYOffset>20?bgColorAfterScroll:bgColor;if((window.pageYOffset>20&&bgOpacityTwo==='0')||(window.pageYOffset<=20&&(bgOpacity==='0.0'||bgOpacity==='0'))||(!menuShadowOpacity&&!menuShadowCSS)){menu.style.boxShadow='none'}else if(menuShadowCSS){menu.style.boxShadow=menuShadowCSS}else if(menuShadowOpacity){menu.style.boxShadow='0px 1px 3px rgba(0,0,0,'+menuShadowOpacity+')'}})}
function t280_appearMenu(){var menuBlocks=document.querySelectorAll('.t280');Array.prototype.forEach.call(menuBlocks,function(menuBlock){var menu=menuBlock.querySelector('.t280__positionfixed');if(menu){var appearOffset=menuBlock.getAttribute('data-appearoffset');if(appearOffset&&appearOffset.indexOf('vh')!==-1){appearOffset=Math.floor((window.innerHeight*(parseInt(appearOffset)/100)))}
appearOffset=parseInt(appearOffset,10);var menuHeight=menu.clientHeight;if(isNaN(appearOffset))return;if(window.pageYOffset>=appearOffset){if(menu.style.transform==='translateY(-'+menuHeight+'px)'){t280_slideUpElement(menu,menuHeight,'toBottom')}}else if(menu.style.transform==='translateY(0px)'){t280_slideUpElement(menu,menuHeight,'toTop')}else{menu.style.transform='translateY(-'+menuHeight+'px)';menu.style.opacity='0'}}})}
function t280_slideUpElement(menu,menuHeight,direction){var diff=direction==='toTop'?0:menuHeight;var diffOpacity=direction==='toTop'?1:0;var timerID=setInterval(function(){menu.style.transform='translateY(-'+diff+'px)';menu.style.opacity=diffOpacity.toString();diffOpacity=direction==='toTop'?diffOpacity-0.1:diffOpacity+0.1;diff=direction==='toTop'?diff+(menuHeight/20):diff-(menuHeight/20);if(direction==='toTop'&&diff>=menuHeight){menu.style.transform='translateY(-'+menuHeight+'px)';menu.style.opacity='0';clearInterval(timerID)}
if(direction==='toBottom'&&diff<=0){menu.style.transform='translateY(0px)';menu.style.opacity='1';clearInterval(timerID)}},10)}
function t280_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('.t280__menu a[href=\''+url+'\'], '+'.t280__menu a[href=\''+url+'/\'], '+'.t280__menu a[href=\''+pathname+'\'], '+'.t280__menu a[href=\'/'+pathname+'\'], '+'.t280__menu a[href=\''+pathname+'/\'], '+'.t280__menu a[href=\'/'+pathname+'/\']'+(hash?', .t280__menu a[href=\''+hash+'\']':'')+(hash?', .t280__menu a[href=\'/'+hash+'\']':'')+(hash?', .t280__menu a[href=\''+hash+'/\']':'')+(hash?', .t280__menu a[href=\'/'+hash+'/\']':''));var rec=document.getElementById('rec'+recid);var menuLinks=rec?rec.querySelectorAll('.t280__menu a'):[];Array.prototype.forEach.call(menuLinks,function(link){link.classList.remove('t-active')});Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}