var oUnitThemestage={init:function(){this.setEvents('.unitthemestage');this.setTabContent('.unitthemestage')},setEvents:function(sCssPath){sCssPath=(sCssPath!=undefined&&sCssPath!=''?sCssPath+' ':'');$(sCssPath+'[data-unit-event]:not([data-unit-event=""])').each($.proxy(function(lIndex,oElement){var sParams,sFunction;sFunction=$(oElement).attr('data-unit-event-function');sParams=$(oElement).attr('data-unit-event-params');if(sFunction=='')return;$(oElement).on($(oElement).attr('data-unit-event'),$.proxy(function(){sParams=sParams.replace('this','oElement');eval('this.'+sFunction+'('+sParams+')')},this))},this))},setTabContent:function(sCssPath){sCssPath=(sCssPath!=undefined&&sCssPath!=''?sCssPath+' ':'');$(sCssPath+'[data-tab-content]:not([data-tab-content=""])').each($.proxy(function(lIndex,oElement){var oContainer=$(sCssPath+'[data-tab-container='+$(oElement).attr('data-tab-content')+']').html($(oElement).html())},this))},toggleTab:function(lCurrent,oEvent){oTab=$('.unitthemestage .tabs .tab').eq(lCurrent);var oMain=oTab.closest('[data-unit-layoutkey]');var sLayoutKey=oMain.attr('data-unit-layoutkey');if(this[sLayoutKey]&&typeof(this[sLayoutKey].toggleTab)=='function'){}else{oTab.siblings('.tab').removeClass('active').find('.tabContent').slideUp();oTab.addClass('active').find('.tabContent').slideDown()}},getOffset:function(){return 0},next:function(oElement){oElement=$(oElement);var oMain=oElement.closest('[data-unit-layoutkey]');var sLayoutKey=oMain.attr('data-unit-layoutkey');if(this[sLayoutKey]&&typeof(this[sLayoutKey].next)=='function'){this[sLayoutKey].next(oElement)}else{var oNext=$('[data-unit-scroll-to]',oMain).first();if(!oNext.length)return;$('body, html').animate({scrollTop:oNext.offset().top+this.getOffset(oNext)})}}};onScrMngrLoaded(function(){$(document).ready(function(){oUnitThemestage.init()})});var oUnitList={init:function(){this.setEvents('.unitlist');this.checkAndSetDetailLink();this.moveIntro();$('.unitlist.filter[data-unit-list-filter-layoutkey]').each($.proxy(function(i,o){this.filter.onInit(o);var sLayoutKey=$(o).attr('data-unit-list-filter-layoutkey');if(this.filter[sLayoutKey]&&typeof(this.filter[sLayoutKey].onInit)=='function'){this.filter[sLayoutKey].onInit(o)}},this));$('.unitlist.list[data-unit-layoutkey]').each($.proxy(function(i,o){var sLayoutKey=$(o).attr('data-unit-layoutkey');this.updatePagerVisibility(o);if(this[sLayoutKey]&&typeof(this[sLayoutKey].onInit)=='function'){this[sLayoutKey].onInit(o)}},this))},setEvents:function(sCssPath){sCssPath=(sCssPath!=''?sCssPath+' ':sCssPath);$(sCssPath+'[data-unit-event]:not([data-unit-event=""])').each($.proxy(function(lIndex,oElement){var sParams,sFunction;sFunction=$(oElement).attr('data-unit-event-function');sParams=$(oElement).attr('data-unit-event-params');if(sFunction=='')return;$(oElement).on($(oElement).attr('data-unit-event'),$.proxy(function(){sParams=sParams.replace('this','oElement');eval('this.'+sFunction+'('+sParams+')')},this))},this))},next:function(oElement){oElement=$(oElement);var sLayoutKey=oElement.closest('[data-unit-layoutkey]').attr('data-unit-layoutkey');if(this[sLayoutKey]&&typeof(this[sLayoutKey].next)=='function'){this[sLayoutKey].next(oElement)}else{}},checkAndSetDetailLink:function(){$('.unitlist.list[data-unit-elementlinked="true"]').each(function(){$('[data-unit-detaillink]:not([data-unit-detaillink=""])',$(this)).each(function(lIndex,oElement){oElement=$(oElement);oElement.addClass('hover');$(oElement).find('a[class!="liveedit"]').each(function(){$(this).removeAttr("href")});oElement.click(function(o){if(!$(o.target).closest('div.liveedit').length){if($(oElement).attr('data-unit-detaillink-target')!=undefined&&$(oElement).attr('data-unit-detaillink-target')!=''){window.open(oElement.attr('data-unit-detaillink'),$(oElement).attr('data-unit-detaillink-target'))}else{window.location.href=oElement.attr('data-unit-detaillink')}}})})})},moveIntro:function(){$('.unitlist.filter').each(function(){if($(this).find('.mainintro').length>0){$(this).prepend($(this).find('.mainintro'))}})},nextPage:function(oThis){var bUseFilterAjax=false;var oList=$(oThis).closest('.unitlist.list');var lPageNumber=parseInt(oList.attr('data-lPageNumber')||1,10)+1;oList.attr('data-lPageNumber',lPageNumber);this.updatePagerVisibility(oList,lPageNumber);if(oList.closest('[data-unit-list-filter-result="true"]').length){var oFilter=$(oList).closest('.unitlist.filter').find('[data-unit-list-filter="true"]');this.filter.loadAjax(oFilter,true)}else{this.loadAjax(oList)}},resetPageNumber:function(oElement){var oList=$(oElement).closest('.unitlist');if(oList.length){if(oList.attr('data-lPageNumber')!=undefined){oList.attr('data-lPageNumber',1)}else{if(oList.find('[data-lPageNumber]').length){oList.find('[data-lPageNumber]').attr('data-lPageNumber',1)}}}},updatePagerVisibility:function(oElement,lPageNumber){var oNextIcon=$(oElement).find('[data-unit-list-next="true"]');if(oNextIcon.length){if(!$.isNumeric(lPageNumber))lPageNumber=1;var lCount=$(oElement).attr('data-unit-list-count');var lPageSize=$(oElement).attr('data-unit-list-pageSize');if(lCount!=undefined&&lPageSize!=undefined){var lMaxPage=lCount/lPageSize;if(lCount%lPageSize!=0){lMaxPage+=1}lMaxPage=parseInt(lMaxPage);if(lPageNumber>=lMaxPage){oNextIcon.hide()}else{oNextIcon.show()}}}},loadAjax:function(oElement){var oLoading=$(oElement).find('[data-unit-list-loading="true"]');if($(oLoading).length>0){$(oLoading).show()}var oAjaxContainer=$(oElement).find('[data-unit-ajax-container="true"]');var lPageNumber=parseInt(oElement.attr('data-lPageNumber')||1,10);$.ajax(document.location.href,{data:{sSharedKey:$(oElement).attr('data-unit-list-sharedkey'),sPageKey:'Select',sUnitKey:'UnitList',bAjaxPager:true,lPageNumber:lPageNumber},type:"POST",success:function(data){if(oLoading.length){oLoading.hide()}var oData=$(data).find('[data-unit-ajax-container="true"]').html();$(oData).appendTo(oAjaxContainer).find('script').each(function(){eval($(this).text())});oUnitList.updatePagerVisibility(oElement,lPageNumber);$(oAjaxContainer).find('[data-carousel="true"]').each(function(lIndex,oElement){initCarousel(this)});var oContainer=$(oAjaxContainer).closest('[data-unit-layoutkey]');if(oContainer.length){var sLayoutKey=$(oContainer).attr('data-unit-layoutkey');if(sLayoutKey!==undefined&&oUnitList[sLayoutKey]&&typeof(oUnitList[sLayoutKey].onInit)=='function'){oUnitList[sLayoutKey].onInit(oContainer)}}if(typeof($.fn.convertVideo)=='function'){$('video[data-resize="true"]',oAjaxContainer).convertVideo()}var oMainIntroElement=$(oContainer).find('.mainintro');if(oMainIntroElement.length>0){oMainIntroElement.hide()}oUnitList.checkAndSetDetailLink()}})}};onScrMngrLoaded(function(){$(document).ready(function(){oUnitList.init()})});oUnitList.layout8={onInit:function(oElement){if($(oElement).find('div.innerContainer[data-lightgallery=true]')[0]!=undefined){var sLightGalleryElement;$(oElement).find('article.element').each(function(i,o){sLightGalleryElement=$(o).find('div.lightGallery');if(sLightGalleryElement[0]!=undefined){if(sLightGalleryElement.attr("data-src")!=undefined){$(o).addClass("lightGallery");$(o).attr("data-src",sLightGalleryElement.attr("data-src"));sLightGalleryElement.removeClass('lightGallery');sLightGalleryElement.removeAttr("data-src")}}})}}};var oUnitCookies={lCookieExpires:365,init:function(){if(GetCookie('bCookieBarClosed')!='true'){if($('section.unitcookieonpage').attr('data-cookieexpires')>0){this.lCookieExpires=$('section.unitcookieonpage').attr('data-cookieexpires').toString()}$(window).on('click',$.proxy(function(oEvent){if(!$.contains($('#unitcookieonpageBar')[0],oEvent.target)){this.closeBarAndSetCookie()}},this))}},closeBarAndSetCookie:function(){$('#unitcookieonpageBar').hide();SetCookie('bCookieBarClosed','true',this.lCookieExpires)}};onScrMngrLoaded(function(){$(document).ready(function(){oUnitCookies.init()})});function renderDefaultIcons(sParent){sParent=sParent==undefined?'':sParent+' ';$(sParent+"*.icon1 ul li, "+sParent+"ul.icon1 li").each(function(){var oElement=$('> svg.icon-check',this);if(oElement.length){$(oElement).html('')}else{$(this).html('<svg class="icon icon-check"><use xlink:href="#icon-check"></use></svg>'+$(this).html());oElement=$('> svg.icon-check',this)}})}function positionBreadcrumb(){var oBreadcrumb=$('[itemprop="breadcrumb"]');if(!oBreadcrumb.length)return;var oContainer=$('[data-breadcrumb="true"]').first().find('[data-breadcrumb-container="true"]');if(!oContainer.length)return;oContainer.html(oBreadcrumb[0].outerHTML);oBreadcrumb.remove()}onScrMngrLoaded(function(){$(function(){positionBreadcrumb();renderDefaultIcons();initStatusBarChecker();var aFeatures=['transition','transform'];var sPrefix;for(var i=0;i<aFeatures.length;i++){sPrefix='no';if(detectCSSFeature(aFeatures[i]))sPrefix='with';$(document.body).addClass(sPrefix+aFeatures[i])}})});function detectCSSFeature(sFeatureName){var bFeature=false;var aDomPrefixes='Webkit Moz ms O'.split(' ');var oBody=document.body;var sFeatureNameCapital;sFeatureName=sFeatureName.toLowerCase();if(oBody.style[sFeatureName]!==undefined){bFeature=true}if(bFeature===false){sFeatureNameCapital=sFeatureName.charAt(0).toUpperCase()+sFeatureName.substr(1);for(var i=0;i<aDomPrefixes.length;i++){if(oBody.style[aDomPrefixes[i]+sFeatureNameCapital]!==undefined){bFeature=true;break}}}return bFeature}function setColorLuminance(sColor,fLum){if(sColor.substr(0,3)=='rgb'){eval('sColor = rgb2hex'+sColor.substr(3))}sColor=String(sColor).replace(/[^0-9a-f]/gi,'');if(sColor.length<6){sColor=sColor[0]+sColor[0]+sColor[1]+sColor[1]+sColor[2]+sColor[2]}fLum=fLum||0;var sRgb="#",c,i;for(i=0;i<3;i++){c=parseInt(sColor.substr(i*2,2),16);c=Math.round(Math.min(Math.max(0,c+(c*fLum)),255)).toString(16);sRgb+=("00"+c).substr(c.length)}return sRgb}function rgb2hex(r,g,b){return'#'+r.toString(16)+g.toString(16)+b.toString(16)}function initStatusBarChecker(){var oTopHelper=$('<div class="statusbar-helper"></div>');var oTopHelper2=$('<div class="statusbar-helper"></div>');$(document.body).append(oTopHelper,oTopHelper2);oTopHelper.css({'position':'fixed','width':'100%','height':'100%','top':'0','bottom':'auto'});oTopHelper2.css({'position':'fixed','width':'100%','height':'100vh','top':'0','bottom':'auto'});function setProperty(){if($(window).width()<=1024){$('section.unitthemestage.gallery.layout1 div.galleryContainer div.innerContainer article.element').css('height','calc(100vh - 60px - '+(oTopHelper2.height()-oTopHelper.height())+'px)')}}$(document).on('scroll',function(){setProperty()});setProperty()}var oPhotogallery={loadOverlay:function(lProductID){var sSharedKey;if($(window).width()>1024){sSharedKey='Photogallery.Overlay'}else{sSharedKey='Photogallery.ResponsiveOverlay'}$('body').addClass('photogalleryopen');$.ajax(location.protocol+'//'+location.host+location.pathname+(location.search?location.search:''),{type:'POST',data:{sSharedKey:sSharedKey,lProductID:lProductID},success:$.proxy(function(data){$('div.Photogallery-outer-overlay').html(data)},this)})},loadImageView:function(oElement,sSharedKey,lProductID){$(oElement).parent().children().removeClass('active');$(oElement).addClass('active');$('div.Photogallery-overlay div.spinner').show();$.ajax(location.protocol+'//'+location.host+location.pathname+(location.search?location.search:''),{type:'POST',data:{sSharedKey:sSharedKey,lProductID:lProductID},success:$.proxy(function(data){$('div.Photogallery-overlay-images').html(data);$('div.Photogallery-overlay div.spinner').hide()},this)})},loadImageView2:function(lProductID,lImageCount){$('div.Photogallery-overlay div.views a').removeClass('active');$('div.Photogallery-overlay div.views a.large-square').addClass('active');$.ajax(location.protocol+'//'+location.host+location.pathname+(location.search?location.search:''),{type:'POST',data:{sSharedKey:'Photogallery.ImageView2',lProductID:lProductID,lImageCount:lImageCount},success:$.proxy(function(data){$('div.Photogallery-overlay-images').html(data);$('div.Photogallery-overlay-images video[data-resize="true"]').convertVideo()},this)})}};var oLpTable={toggleColumn:function(oElement){$(oElement).find('svg.icon.icon-down').toggleClass('rotate');$(oElement).next('div.priceColumn').toggleClass('active')}};function toggleMenu(sPageName){if(!$('header .menu ul li a').hasClass('open')){$('body').addClass('open-menu')}else if($('header .menu ul li a[data-code="'+sPageName+'"]').hasClass('open')){$('body').removeClass('open-menu')}else if(!$('header .menu ul li a[data-code="'+sPageName+'"]').hasClass('open')){$('header .menu ul li a').removeClass('open')}$('header .menu ul li a[data-code="'+sPageName+'"]').toggleClass('open');if(!$('div.menu-container .inner-submenu[data-code="'+sPageName+'"]').hasClass('open')){$('div.menu-container .inner-submenu').removeClass('open').fadeOut()}$('div.menu-container .inner-submenu[data-code="'+sPageName+'"]').toggleClass('open').fadeToggle();$('div.menu-container .submenu ul li.wave').each(function(){if($(this).next().length>0){if($(this).position().top<$(this).next().position().top){$(this).addClass('hide')}}})}function toggleMobileMenu(oElement){if(!oElement.closest('li').hasClass('open')){$('div.mobile-menu ul.menu li').removeClass('open').find('ul').slideUp()}oElement.closest('li').toggleClass('open').find('ul').slideToggle()}