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 t121_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t121');var videoLazy=rec.querySelector('.t-video-lazyload');if(videoLazy){t_onFuncLoad('t_video_lazyload__setHeight',function(){var videoHeight=videoLazy.getAttribute('data-videolazy-height');if(videoHeight!=='540px')return;t_video_lazyload__setHeight(videoLazy);window.addEventListener('resize',function(){t_video_lazyload__setHeight(videoLazy)});if(!wrapperBlock)return;wrapperBlock.addEventListener('displayChanged',function(){t_video_lazyload__setHeight(videoLazy)})})}
var videoCarrier=rec.querySelector('.t-video-carier');if(!videoCarrier)return;var screenMin=rec.getAttribute('data-screenmin');var screenMax=rec.getAttribute('data-screenmax');var isLoad=!1;if(window.innerWidth<parseInt(screenMin,10)||window.innerWidth>parseInt(screenMax,10))return;window.addEventListener('scroll',t_throttle(function(){if(!isLoad){var videoCarrierOffsetTop=videoCarrier.getBoundingClientRect().top+window.pageYOffset;var videoCarrierHeight=parseInt(window.getComputedStyle(videoCarrier).height,10);var windowScrollTop=window.pageYOffset;var windowHeight=window.innerHeight;if(windowScrollTop+windowHeight>videoCarrierOffsetTop-500&&windowScrollTop<videoCarrierOffsetTop+videoCarrierHeight+501){t_onFuncLoad('processYoutubeVideo',function(){processYoutubeVideo(videoCarrier,videoCarrier.style.height)});isLoad=!0}}}));var event=document.createEvent('HTMLEvents');event.initEvent('scroll',!0,!1);window.dispatchEvent(event)}
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'}
function t670_init(recid,isEditMode){var rec=document.getElementById('rec'+recid);if(!rec)return;var image=rec.querySelector('.t-img');if(image){if(image.complete){t670_addImageEvents(recid,isEditMode)}else{image.addEventListener('load',function(){t670_addImageEvents(recid,isEditMode)});image.addEventListener('error',function(){t670_addImageEvents(recid,isEditMode)})}}else{t670_addImageEvents(recid,isEditMode)}}
function t670_addImageEvents(recid,isEditMode){var rec=document.getElementById('rec'+recid);t670_imageHeight(rec);t670_show(rec);t670_hide(rec);t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid)});if(isEditMode){t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)})}
var wrapper=rec.querySelector('.t670');if(wrapper){wrapper.addEventListener('displayChanged',function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)});t_onFuncLoad('t_slds_positionArrows',function(){t_slds_positionArrows(recid)})})}}
function t670_show(rec){var playBtns=rec.querySelectorAll('.t670__play');Array.prototype.forEach.call(playBtns,function(play){var itemWrap=play.closest('.t670__imgwrapper');var image=itemWrap.querySelector('.t-slds__bgimg');var videoWrap=itemWrap.querySelector('.t670__wrap-video');var videoLazy=videoWrap.querySelector('.t-video-lazyload');play.addEventListener('click',function(event){event.preventDefault();event.stopPropagation();t_onFuncLoad('t_video_lazyload__addVideo',function(){videoWrap.style.display='block';image.style.opacity=0;t_video_lazyload__addVideo(videoLazy)})})})}
function t670_hide(rec){var videoWraps=rec.querySelectorAll('.t670__wrap-video');var videos=rec.querySelectorAll('.t670__wrap-video .t-video-lazyload');rec.addEventListener('updateSlider',function(){Array.prototype.forEach.call(videoWraps,function(videoWrap){videoWrap.display.style='none'});Array.prototype.forEach.call(videos,function(video){video.innerHTML=''})})}
function t670_imageHeight(rec){var images=rec.querySelectorAll('.t670__separator');Array.prototype.forEach.call(images,function(img){var width=parseInt(img.getAttribute('data-slider-image-width'))||0;var height=parseInt(img.getAttribute('data-slider-image-height'))||0;var ratio=height/width;var padding=ratio*100;img.style.paddingBottom=padding+'%'})}
function t142_checkSize(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t142__submit');if(!button)return;var buttonStyle=getComputedStyle(button,null);var buttonPaddingTop=parseInt(buttonStyle.paddingTop)||0;var buttonPaddingBottom=parseInt(buttonStyle.paddingBottom)||0;var buttonHeight=button.clientHeight-(buttonPaddingTop+buttonPaddingBottom)+5;var textHeight=button.scrollHeight;if(buttonHeight<textHeight){button.classList.add('t142__submit-overflowed')}}
function t999_init(recId){t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t967_setLogoPadding(recid){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<=980)return;var menu=rec.querySelector('.t967');var logo=menu?menu.querySelector('.t967__logowrapper'):null;var leftWrap=menu?menu.querySelector('.t967__leftwrapper'):null;var rightWrap=menu?menu.querySelector('.t967__rightwrapper'):null;var logoWidth=logo?logo.offsetWidth:0;if(leftWrap)leftWrap.style.paddingRight=((logoWidth/2)+50)+'px';if(rightWrap)rightWrap.style.paddingRight=((logoWidth/2)+50)+'px'}