window.theme={};window.theme.fn={getOptions:function(opts){if(typeof(opts)=='object'){return opts;}else if(typeof(opts)=='string'){try{return JSON.parse(opts.replace(/'/g,'"').replace(';',''));}catch(e){return{};}}else{return{};}},execPluginFunction:function(functionName,context){var args=Array.prototype.slice.call(arguments,2);var namespaces=functionName.split(".");var func=namespaces.pop();for(var i=0;i0){if(typeof functionName==='string'){var func=Function('return '+functionName)();}else{var callback=functionName;callback.call($(entry.target));} if(!alwaysObserve){observer.unobserve(entry.target);}}}},intersectionObserverOptions);$($el).each(function(){observer.observe($(this)[0]);});},intObsInit:function(selector,functionName){var $el=document.querySelectorAll(selector);var intersectionObserverOptions={rootMargin:'200px'} var observer=new IntersectionObserver(function(entries){for(var i=0;i0){var $this=$(entry.target),opts;var pluginOptions=theme.fn.getOptions($this.data('plugin-options'));if(pluginOptions) opts=pluginOptions;theme.fn.execPluginFunction(functionName,$this,opts);observer.unobserve(entry.target);}}},intersectionObserverOptions);$($el).each(function(){observer.observe($(this)[0]);});},dynIntObsInit:function(selector,functionName,pluginDefaults){var $el=document.querySelectorAll(selector);$($el).each(function(){var $this=$(this),opts;var pluginOptions=theme.fn.getOptions($this.data('plugin-options'));if(pluginOptions) opts=pluginOptions;var mergedPluginDefaults=theme.fn.mergeOptions(pluginDefaults,opts) var intersectionObserverOptions={rootMargin:theme.fn.getRootMargin(functionName,mergedPluginDefaults),threshold:0} if(!mergedPluginDefaults.forceInit){var observer=new IntersectionObserver(function(entries){for(var i=0;i0){theme.fn.execPluginFunction(functionName,$this,mergedPluginDefaults);observer.unobserve(entry.target);}}},intersectionObserverOptions);observer.observe($this[0]);}else{theme.fn.execPluginFunction(functionName,$this,mergedPluginDefaults);}});},getRootMargin:function(plugin,pluginDefaults){switch(plugin){case 'themePluginCounter':return pluginDefaults.accY?'0px 0px '+pluginDefaults.accY+'px 0px':'0px 0px 200px 0px';break;case 'themePluginAnimate':return pluginDefaults.accY?'0px 0px '+pluginDefaults.accY+'px 0px':'0px 0px 200px 0px';break;case 'themePluginIcon':return pluginDefaults.accY?'0px 0px '+pluginDefaults.accY+'px 0px':'0px 0px 200px 0px';break;case 'themePluginRandomImages':return pluginDefaults.accY?'0px 0px '+pluginDefaults.accY+'px 0px':'0px 0px 200px 0px';break;default:return '0px 0px 200px 0px';break;}},mergeOptions:function(obj1,obj2){var obj3={};for(var attrname in obj1){obj3[attrname]=obj1[attrname];} for(var attrname in obj2){obj3[attrname]=obj2[attrname];} return obj3;},execOnceTroughEvent:function($el,event,callback){var self=this,dataName=self.formatDataName(event);$($el).on(event,function(){if(!$(this).data(dataName)){callback.call($(this));$(this).data(dataName,true);$(this).off(event);}});return this;},execOnceTroughWindowEvent:function($el,event,callback){var self=this,dataName=self.formatDataName(event);$($el).on(event,function(){if(!$(this).data(dataName)){callback();$(this).data(dataName,true);$(this).off(event);}});return this;},formatDataName:function(name){name=name.replace('.','');return name;},isElementInView:function($el){var rect=$el[0].getBoundingClientRect();return(rect.top<=(window.innerHeight/3));}};!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,o=i(e);o;)o=i(e=o.ownerDocument);return e}(),e=[],o=null,n=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return o||(o=function(t,o){n=t&&o?l(t,o):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach(function(t){t._checkForIntersections()})}),o},s._resetCrossOriginUpdater=function(){o=null,n=null},s.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,o){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==o[e-1]})},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var o=e.defaultView;if(o&&-1==this._monitoringDocuments.indexOf(e)){var n=this._checkForIntersections,r=null,s=null;this.POLL_INTERVAL?r=o.setInterval(n,this.POLL_INTERVAL):(h(o,"resize",n,!0),h(e,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in o&&(s=new o.MutationObserver(n)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push(function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),c(t,"resize",n,!0)),c(e,"scroll",n,!0),s&&s.disconnect()});var u=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=u){var a=i(e);a&&this._monitorIntersections(a.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var o=this._monitoringDocuments.indexOf(e);if(-1!=o){var n=this.root&&(this.root.ownerDocument||this.root)||t;if(!this._observationTargets.some(function(t){var o=t.element.ownerDocument;if(o==e)return!0;for(;o&&o!=n;){var r=i(o);if((o=r&&r.ownerDocument)==e)return!0}return!1})){var r=this._monitoringUnsubscribes[o];if(this._monitoringDocuments.splice(o,1),this._monitoringUnsubscribes.splice(o,1),r(),e!=n){var s=i(e);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e=0&&m>=0&&{top:c,bottom:a,left:f,right:d,width:g,height:m}||null),!v)break;_=_&&p(_)}return v}},s.prototype._getRootRect=function(){var e;if(this.root&&!d(this.root))e=u(this.root);else{var o=d(this.root)?this.root:t,n=o.documentElement,i=o.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,o){return"px"==e.unit?e.value:e.value*(o%2?t.width:t.height)/100}),o={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return o.width=o.right-o.left,o.height=o.bottom-o.top,o},s.prototype._hasCrossedThreshold=function(t,e){var o=t&&t.isIntersecting?t.intersectionRatio||0:-1,n=e.isIntersecting?e.intersectionRatio||0:-1;if(o!==n)for(var i=0;i-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+parseFloat(navigator.appVersion.split("MSIE")[1])):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.jQuery1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.jQuery2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.jQuery1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js'];c=b.join(' ');if($.browser.mobile){c+=' mobile';} if(hasTouch){c+=' touch';} h.className+=' '+c;var isEdge=/Edge/.test(navigator.userAgent);if(isEdge){$('html').removeClass('chrome').addClass('edge');} var isIE11=!(window.ActiveXObject)&&"ActiveXObject"in window;if(isIE11){$('html').removeClass('gecko').addClass('ie ie11');return;} if($('body').hasClass('dark')){$('html').addClass('dark');} if($('body').hasClass('boxed')){$('html').addClass('boxed');}}});$.browserSelector();theme.globalWindowWidth=$(window).width();var globalWindowWidth=$(window).width();window.onresize=function(){theme.globalWindowWidth=$(window).width();} if(/iPad|iPhone|iPod/.test(navigator.platform)){$(document).ready(function($){$('.thumb-info').attr('onclick','return true');});} if($('a[data-bs-toggle="tab"]').length){$('a[data-bs-toggle="tab"]').on('shown.bs.tab',function(e){var $tabPane=$($(e.target).attr('href'));if($tabPane.length){$tabPane.find('.owl-carousel').trigger('refresh.owl.carousel');} $(this).parents('.nav-tabs').find('.active').removeClass('active');$(this).addClass('active').parent().addClass('active');});if(window.location.hash){$(window).on('load',function(){if(window.location.hash!=='*'&&$(window.location.hash).get(0)){new bootstrap.Tab($('a.nav-link[href="'+window.location.hash+'"]:not([data-hash])')[0]).show();}});}} if(!$('html').hasClass('disable-onload-scroll')&&window.location.hash&&!['#*'].includes(window.location.hash)){window.scrollTo(0,0);$(window).on('load',function(){setTimeout(function(){var target=window.location.hash,offset=($(window).width()<768)?180:90;if(!$(target).length){return;} if($("a[href$='"+window.location.hash+"']").is('[data-hash-offset]')){offset=parseInt($("a[href$='"+window.location.hash+"']").first().attr('data-hash-offset'));}else if($("html").is('[data-hash-offset]')){offset=parseInt($("html").attr('data-hash-offset'));} if(isNaN(offset)){offset=0;} $('body').addClass('scrolling');$('html, body').animate({scrollTop:$(target).offset().top-offset},600,'easeOutQuad',function(){$('body').removeClass('scrolling');});},1);});} $.fn.extend({textRotator:function(options){var defaults={fadeSpeed:500,pauseSpeed:100,child:null};var options=$.extend(defaults,options);return this.each(function(){var o=options;var obj=$(this);var items=$(obj.children(),obj);items.each(function(){$(this).hide();}) if(!o.child){var next=$(obj).children(':first');}else{var next=o.child;} $(next).fadeIn(o.fadeSpeed,function(){$(next).delay(o.pauseSpeed).fadeOut(o.fadeSpeed,function(){var next=$(this).next();if(next.length==0){next=$(obj).children(':first');} $(obj).textRotator({child:next,fadeSpeed:o.fadeSpeed,pauseSpeed:o.pauseSpeed});})});});}});var $noticeTopBar={$wrapper:$('.notice-top-bar'),$closeBtn:$('.notice-top-bar-close'),$header:$('#header'),$body:$('.body'),init:function(){var self=this;if(!$.cookie('portoNoticeTopBarClose')){self.build().events();}else{self.$wrapper.parent().prepend('');self.$wrapper.remove();} return this;},build:function(){var self=this;$(window).on('load',function(){setTimeout(function(){self.$body.css({'margin-top':self.$wrapper.outerHeight(),'transition':'ease margin 300ms'});$('#noticeTopBarContent').textRotator({fadeSpeed:500,pauseSpeed:5000});if(['absolute','fixed'].includes(self.$header.css('position'))){self.$header.css({'top':self.$wrapper.outerHeight(),'transition':'ease top 300ms'});} $(window).trigger('notice.top.bar.opened');},1000);});return this;},events:function(){var self=this;self.$closeBtn.on('click',function(e){e.preventDefault();self.$body.animate({'margin-top':0,},300,function(){self.$wrapper.remove();self.saveCookie();});if(['absolute','fixed'].includes(self.$header.css('position'))){self.$header.animate({top:0},300);} if(self.$header.hasClass('header-effect-shrink')){self.$header.find('.header-body').animate({top:0},300);} $(window).trigger('notice.top.bar.closed');});return this;},checkCookie:function(){var self=this;if($.cookie('portoNoticeTopBarClose')){return true;}else{return false;} return this;},saveCookie:function(){var self=this;$.cookie('portoNoticeTopBarClose',true);return this;}} if($('.notice-top-bar').length){$noticeTopBar.init();} if($('.image-hotspot').length){$('.image-hotspot').append('').append('');} if($('body[data-plugin-page-transition]').length){var link_click=false;$(document).on('click','a',function(e){link_click=$(this);});$(window).on("beforeunload",function(e){if(typeof link_click==='object'){var href=link_click.attr('href');if(href.indexOf('mailto:')!=0&&href.indexOf('tel:')!=0&&!link_click.data('rm-from-transition')){$('body').addClass('page-transition-active');}}});$(window).on("pageshow",function(e){if(e.persisted){if($('html').hasClass('safari')){window.location.reload();} $('body').removeClass('page-transition-active');}});} if($('.thumb-info-floating-caption').length){$('.thumb-info-floating-caption').on('mouseenter',function(){if(!$('.thumb-info-floating-caption-title').length){$('.body').append('
'+$(this).data('title')+'
');if($(this).data('type')){$('.thumb-info-floating-caption-title').append('
'+$(this).data('type')+'
').css({'padding-bottom':22});} if($(this).hasClass('thumb-info-floating-caption-clean')){$('.thumb-info-floating-caption-title').addClass('bg-transparent');}}}).on('mouseout',function(){$('.thumb-info-floating-caption-title').remove();});$(document).on('mousemove',function(e){$('.thumb-info-floating-caption-title').css({position:'fixed',left:e.clientX-20,top:e.clientY+20});});} $('[data-toggle-text-click]').on('click',function(){$(this).text(function(i,text){return text===$(this).attr('data-toggle-text-click')?$(this).attr('data-toggle-text-click-alt'):$(this).attr('data-toggle-text-click');});});if($('.shape-divider').length){aspectRatioSVG();$(window).on('resize',function(){aspectRatioSVG();});} if($('.shape-divider-horizontal-animation').length){theme.fn.intObs('.shape-divider-horizontal-animation',function(){for(var i=0;i<=1;i++){var svgClone=$(this).find('svg:nth-child(1)').clone();$(this).append(svgClone)} $(this).addClass('start');},{});} $('[data-porto-toggle-class]').on('click',function(e){e.preventDefault();$(this).toggleClass($(this).data('porto-toggle-class'));});var $window=$(window);$window.on('resize dynamic.height.resize',function(){$('[data-dynamic-height]').each(function(){var $this=$(this),values=JSON.parse($this.data('dynamic-height').replace(/'/g,'"').replace(';','')) if($window.width()<576){$this.height(values[4]);} if($window.width()>575&&$window.width()<768){$this.height(values[3]);} if($window.width()>767&&$window.width()<992){$this.height(values[2]);} if($window.width()>991&&$window.width()<1200){$this.height(values[1]);} if($window.width()>1199){$this.height(values[0]);}});});if($window.width()<992){$window.trigger('dynamic.height.resize');} if($('[data-trigger-play-video]').length){theme.fn.execOnceTroughEvent('[data-trigger-play-video]','mouseover.trigger.play.video',function(){var $video=$($(this).data('trigger-play-video'));$(this).on('click',function(e){e.preventDefault();if($(this).data('trigger-play-video-remove')=='yes'){$(this).animate({opacity:0},300,function(){$video[0].play();$(this).remove();});}else{setTimeout(function(){$video[0].play();},300);}});});} if($('video[data-auto-play]').length){$(window).on('load',function(){$('video[data-auto-play]').each(function(){var $video=$(this);setTimeout(function(){if($('#'+$video.attr('id')).length){if($('[data-trigger-play-video="#'+$video.attr('id')+'"]').data('trigger-play-video-remove')=='yes'){$('[data-trigger-play-video="#'+$video.attr('id')+'"]').animate({opacity:0},300,function(){$video[0].play();$('[data-trigger-play-video="#'+$video.attr('id')+'"]').remove();});}else{setTimeout(function(){$video[0].play();},300);}}},100);});});} if($('[data-remove-min-height]').length){$(window).on('load',function(){$('[data-remove-min-height]').each(function(){$(this).css({'min-height':0});});});} if($('.style-switcher-open-loader').length){$('.style-switcher-open-loader').on('click',function(e){e.preventDefault();var $this=$(this);$this.addClass('style-switcher-open-loader-loading');var basePath=$(this).data('base-path'),skinSrc=$(this).data('skin-src');var script1=document.createElement("script");script1.src=basePath+"master/style-switcher/style.switcher.localstorage.js";var script2=document.createElement("script");script2.src=basePath+"master/style-switcher/style.switcher.js";script2.id="styleSwitcherScript";script2.setAttribute('data-base-path',basePath);script2.setAttribute('data-skin-src',skinSrc);script2.onload=function(){setTimeout(function(){function checkIfReady(){if(!$('.style-switcher-open').length){window.setTimeout(checkIfReady,100);}else{$('.style-switcher-open').trigger('click');}} checkIfReady();},500);} document.body.appendChild(script1);document.body.appendChild(script2);});} try{if(window.location!==window.parent.location){$(window).on('load',function(){$el=$('').addClass('remove-envato-frame').attr({'href':window.location.href,'target':'_parent'}).text('Remove Frame');$('body').append($el);});}} catch(e){console.log(e);}})(jQuery);function scrollAndFocus($this,scrollTarget,focusTarget,scrollOffset,scrollAgain){(function($){$('body').addClass('scrolling');if($($this).closest('#mainNav').length){$($this).parents('.collapse.show').collapse('hide');} $('html, body').animate({scrollTop:$(scrollTarget).offset().top-(scrollOffset?scrollOffset:0)},300,function(){$('body').removeClass('scrolling');setTimeout(function(){$(focusTarget).focus();},500);if(scrollAgain){$('html, body').animate({scrollTop:$(scrollTarget).offset().top-(scrollOffset?scrollOffset:0)});}});})(jQuery);} function aspectRatioSVG(){if($(window).width()<1950){$('.shape-divider svg[preserveAspectRatio]').each(function(){if(!$(this).parent().hasClass('shape-divider-horizontal-animation')){$(this).attr('preserveAspectRatio','xMinYMin');}else{$(this).attr('preserveAspectRatio','none');}});}else{$('.shape-divider svg[preserveAspectRatio]').each(function(){$(this).attr('preserveAspectRatio','none');});}} document.addEventListener('lazybeforeunveil',function(e){var bg=e.target.getAttribute('data-bg-src');if(bg){e.target.style.backgroundImage='url('+bg+')';}});(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(jQuery);}}(function($){var CountTo=function(element,options){this.$element=$(element);this.options=$.extend({},CountTo.DEFAULTS,this.dataOptions(),options);this.init();};CountTo.DEFAULTS={from:0,to:0,speed:1000,refreshInterval:100,decimals:0,formatter:formatter,onUpdate:null,onComplete:null};CountTo.prototype.init=function(){this.value=this.options.from;this.loops=Math.ceil(this.options.speed/this.options.refreshInterval);this.loopCount=0;this.increment=(this.options.to-this.options.from)/this.loops;};CountTo.prototype.dataOptions=function(){var options={from:this.$element.data('from'),to:this.$element.data('to'),speed:this.$element.data('speed'),refreshInterval:this.$element.data('refresh-interval'),decimals:this.$element.data('decimals')};var keys=Object.keys(options);for(var i in keys){var key=keys[i];if(typeof(options[key])==='undefined'){delete options[key];}} return options;};CountTo.prototype.update=function(){this.value+=this.increment;this.loopCount++;this.render();if(typeof(this.options.onUpdate)=='function'){this.options.onUpdate.call(this.$element,this.value);} if(this.loopCount>=this.loops){clearInterval(this.interval);this.value=this.options.to;if(typeof(this.options.onComplete)=='function'){this.options.onComplete.call(this.$element,this.value);}}};CountTo.prototype.render=function(){var formattedValue=this.options.formatter.call(this.$element,this.value,this.options);this.$element.text(formattedValue);};CountTo.prototype.restart=function(){this.stop();this.init();this.start();};CountTo.prototype.start=function(){this.stop();this.render();this.interval=setInterval(this.update.bind(this),this.options.refreshInterval);};CountTo.prototype.stop=function(){if(this.interval){clearInterval(this.interval);}};CountTo.prototype.toggle=function(){if(this.interval){this.stop();}else{this.start();}};function formatter(value,options){return value.toFixed(options.decimals);} $.fn.countTo=function(option){return this.each(function(){var $this=$(this);var data=$this.data('countTo');var init=!data||typeof(option)==='object';var options=typeof(option)==='object'?option:{};var method=typeof(option)==='string'?option:'start';if(init){if(data)data.stop();$this.data('countTo',data=new CountTo(this,options));} data[method].call(data);});};}));(function($){$.fn.visible=function(partial,hidden,direction,container){if(this.length<1) return;var $t=this.length>1?this.eq(0):this,isContained=typeof container!=='undefined'&&container!==null,$w=isContained?$(container):$(window),wPosition=isContained?$w.position():0,t=$t.get(0),vpWidth=$w.outerWidth(),vpHeight=$w.outerHeight(),direction=(direction)?direction:'both',clientSize=hidden===true?t.offsetWidth*t.offsetHeight:true;if(typeof t.getBoundingClientRect==='function'){var rec=t.getBoundingClientRect(),tViz=isContained?rec.top-wPosition.top>=0&&rec.top=0&&rec.top0&&rec.bottom<=vpHeight+wPosition.top:rec.bottom>0&&rec.bottom<=vpHeight,lViz=isContained?rec.left-wPosition.left>=0&&rec.left=0&&rec.left0&&rec.right0&&rec.right<=vpWidth,vVisible=partial?tViz||bViz:tViz&&bViz,hVisible=partial?lViz||rViz:lViz&&rViz;if(direction==='both') return clientSize&&vVisible&&hVisible;else if(direction==='vertical') return clientSize&&vVisible;else if(direction==='horizontal') return clientSize&&hVisible;}else{var viewTop=isContained?0:wPosition,viewBottom=viewTop+vpHeight,viewLeft=$w.scrollLeft(),viewRight=viewLeft+vpWidth,position=$t.position(),_top=position.top,_bottom=_top+$t.height(),_left=position.left,_right=_left+$t.width(),compareTop=partial===true?_bottom:_top,compareBottom=partial===true?_top:_bottom,compareLeft=partial===true?_right:_left,compareRight=partial===true?_left:_right;if(direction==='both') return!!clientSize&&((compareBottom<=viewBottom)&&(compareTop>=viewTop))&&((compareRight<=viewRight)&&(compareLeft>=viewLeft));else if(direction==='vertical') return!!clientSize&&((compareBottom<=viewBottom)&&(compareTop>=viewTop));else if(direction==='horizontal') return!!clientSize&&((compareRight<=viewRight)&&(compareLeft>=viewLeft));}};})(jQuery);;(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module!=='undefined'&&module.exports){module.exports=factory(require('jquery'));}else{factory(jQuery);}})(function($){var _previousResizeWidth=-1,_updateTimeout=-1;var _parse=function(value){return parseFloat(value)||0;};var _rows=function(elements){var tolerance=1,$elements=$(elements),lastTop=null,rows=[];$elements.each(function(){var $that=$(this),top=$that.offset().top-_parse($that.css('margin-top')),lastRow=rows.length>0?rows[rows.length-1]:null;if(lastRow===null){rows.push($that);}else{if(Math.floor(Math.abs(lastTop-top))<=tolerance){rows[rows.length-1]=lastRow.add($that);}else{rows.push($that);}} lastTop=top;});return rows;};var _parseOptions=function(options){var opts={byRow:true,property:'height',target:null,remove:false};if(typeof options==='object'){return $.extend(opts,options);} if(typeof options==='boolean'){opts.byRow=options;}else if(options==='remove'){opts.remove=true;} return opts;};var matchHeight=$.fn.matchHeight=function(options){var opts=_parseOptions(options);if(opts.remove){var that=this;this.css(opts.property,'');$.each(matchHeight._groups,function(key,group){group.elements=group.elements.not(that);});return this;} if(this.length<=1&&!opts.target){return this;} matchHeight._groups.push({elements:this,options:opts});matchHeight._apply(this,opts);return this;};matchHeight.version='0.7.2';matchHeight._groups=[];matchHeight._throttle=80;matchHeight._maintainScroll=false;matchHeight._beforeUpdate=null;matchHeight._afterUpdate=null;matchHeight._rows=_rows;matchHeight._parse=_parse;matchHeight._parseOptions=_parseOptions;matchHeight._apply=function(elements,options){var opts=_parseOptions(options),$elements=$(elements),rows=[$elements];var scrollTop=$(window).scrollTop(),htmlHeight=$('html').outerHeight(true);var $hiddenParents=$elements.parents().filter(':hidden');$hiddenParents.each(function(){var $that=$(this);$that.data('style-cache',$that.attr('style'));});$hiddenParents.css('display','block');if(opts.byRow&&!opts.target){$elements.each(function(){var $that=$(this),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block';} $that.data('style-cache',$that.attr('style'));$that.css({'display':display,'padding-top':'0','padding-bottom':'0','margin-top':'0','margin-bottom':'0','border-top-width':'0','border-bottom-width':'0','height':'100px','overflow':'hidden'});});rows=_rows($elements);$elements.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||'');});} $.each(rows,function(key,row){var $row=$(row),targetHeight=0;if(!opts.target){if(opts.byRow&&$row.length<=1){$row.css(opts.property,'');return;} $row.each(function(){var $that=$(this),style=$that.attr('style'),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block';} var css={'display':display};css[opts.property]='';$that.css(css);if($that.outerHeight(false)>targetHeight){targetHeight=$that.outerHeight(false);} if(style){$that.attr('style',style);}else{$that.css('display','');}});}else{targetHeight=opts.target.outerHeight(false);} $row.each(function(){var $that=$(this),verticalPadding=0;if(opts.target&&$that.is(opts.target)){return;} if($that.css('box-sizing')!=='border-box'){verticalPadding+=_parse($that.css('border-top-width'))+_parse($that.css('border-bottom-width'));verticalPadding+=_parse($that.css('padding-top'))+_parse($that.css('padding-bottom'));} $that.css(opts.property,(targetHeight-verticalPadding)+'px');});});$hiddenParents.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||null);});if(matchHeight._maintainScroll){$(window).scrollTop((scrollTop/htmlHeight)*$('html').outerHeight(true));} return this;};matchHeight._applyDataApi=function(){var groups={};$('[data-match-height], [data-mh]').each(function(){var $this=$(this),groupId=$this.attr('data-mh')||$this.attr('data-match-height');if(groupId in groups){groups[groupId]=groups[groupId].add($this);}else{groups[groupId]=$this;}});$.each(groups,function(){this.matchHeight(true);});};var _update=function(event){if(matchHeight._beforeUpdate){matchHeight._beforeUpdate(event,matchHeight._groups);} $.each(matchHeight._groups,function(){matchHeight._apply(this.elements,this.options);});if(matchHeight._afterUpdate){matchHeight._afterUpdate(event,matchHeight._groups);}};matchHeight._update=function(throttle,event){if(event&&event.type==='resize'){var windowWidth=$(window).width();if(windowWidth===_previousResizeWidth){return;} _previousResizeWidth=windowWidth;} if(!throttle){_update(event);}else if(_updateTimeout===-1){_updateTimeout=setTimeout(function(){_update(event);_updateTimeout=-1;},matchHeight._throttle);}};$(matchHeight._applyDataApi);var on=$.fn.on?'on':'bind';$(window)[on]('load',function(event){matchHeight._update(false,event);});$(window)[on]('resize orientationchange',function(event){matchHeight._update(true,event);});});/*! waitForImages jQuery Plugin - v2.4.0 - 2018-02-13 * https://github.com/alexanderdickson/waitForImages * Copyright (c) 2018 Alex Dickson; Licensed MIT */;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){var eventNamespace='waitForImages';var hasSrcset=(function(img){return img.srcset&&img.sizes;})(new Image());$.waitForImages={hasImageProperties:['backgroundImage','listStyleImage','borderImage','borderCornerImage','cursor'],hasImageAttributes:['srcset']};$.expr.pseudos['has-src']=function(obj){return $(obj).is('img[src][src!=""]');};$.expr.pseudos.uncached=function(obj){if(!$(obj).is(':has-src')){return false;} return!obj.complete;};$.fn.waitForImages=function(){var allImgsLength=0;var allImgsLoaded=0;var deferred=$.Deferred();var originalCollection=this;var allImgs=[];var hasImgProperties=$.waitForImages.hasImageProperties||[];var hasImageAttributes=$.waitForImages.hasImageAttributes||[];var matchUrl=/url\(\s*(['"]?)(.*?)\1\s*\)/g;var finishedCallback;var eachCallback;var waitForAll;if($.isPlainObject(arguments[0])){waitForAll=arguments[0].waitForAll;eachCallback=arguments[0].each;finishedCallback=arguments[0].finished;}else{if(arguments.length===1&&$.type(arguments[0])==='boolean'){waitForAll=arguments[0];}else{finishedCallback=arguments[0];eachCallback=arguments[1];waitForAll=arguments[2];}} finishedCallback=finishedCallback||$.noop;eachCallback=eachCallback||$.noop;waitForAll=!!waitForAll;if(!$.isFunction(finishedCallback)||!$.isFunction(eachCallback)){throw new TypeError('An invalid callback was supplied.');} this.each(function(){var obj=$(this);if(waitForAll){obj.find('*').addBack().each(function(){var element=$(this);if(element.is('img:has-src')&&!element.is('[srcset]')){allImgs.push({src:element.attr('src'),element:element[0]});} $.each(hasImgProperties,function(i,property){var propertyValue=element.css(property);var match;if(!propertyValue){return true;} while(match=matchUrl.exec(propertyValue)){allImgs.push({src:match[2],element:element[0]});}});$.each(hasImageAttributes,function(i,attribute){var attributeValue=element.attr(attribute);var attributeValues;if(!attributeValue){return true;} allImgs.push({src:element.attr('src'),srcset:element.attr('srcset'),element:element[0]});});});}else{obj.find('img:has-src').each(function(){allImgs.push({src:this.src,element:this});});}});allImgsLength=allImgs.length;allImgsLoaded=0;if(allImgsLength===0){finishedCallback.call(originalCollection);deferred.resolveWith(originalCollection);} $.each(allImgs,function(i,img){var image=new Image();var events='load.'+eventNamespace+' error.'+eventNamespace;$(image).one(events,function me(event){var eachArguments=[allImgsLoaded,allImgsLength,event.type=='load'];allImgsLoaded++;eachCallback.apply(img.element,eachArguments);deferred.notifyWith(img.element,eachArguments);$(this).off(events,me);if(allImgsLoaded==allImgsLength){finishedCallback.call(originalCollection[0]);deferred.resolveWith(originalCollection[0]);return false;}});if(hasSrcset&&img.srcset){image.srcset=img.srcset;image.sizes=img.sizes;} image.src=img.src;});return deferred.promise();};}));(function(w,$){fontSpy=function(fontName,conf){var $html=$('html'),$body=$('body'),fontFamilyName=fontName;if(typeof fontFamilyName!=='string'||fontFamilyName===''){throw 'A valid fontName is required. fontName must be a string and must not be an empty string.';} var defaults={font:fontFamilyName,fontClass:fontFamilyName.toLowerCase().replace(/\s/g,''),success:function(){},failure:function(){},testFont:'Courier New',testString:'QW@HhsXJ',glyphs:'',delay:50,timeOut:1000,callback:$.noop};var config=$.extend(defaults,conf);var $tester=$(''+config.testString+config.glyphs+'').css('position','absolute').css('top','-9999px').css('left','-9999px').css('visibility','hidden').css('fontFamily',config.testFont).css('fontSize','250px');$body.append($tester);var fallbackFontWidth=$tester.outerWidth();$tester.css('fontFamily',config.font+','+config.testFont);var failure=function(){$html.addClass("no-"+config.fontClass);if(config&&config.failure){config.failure();} config.callback(new Error('FontSpy timeout'));$tester.remove();};var success=function(){config.callback();$html.addClass(config.fontClass);if(config&&config.success){config.success();} $tester.remove();};var retry=function(){setTimeout(checkFont,config.delay);config.timeOut=config.timeOut-config.delay;};var checkFont=function(){var loadedFontWidth=$tester.outerWidth();if(fallbackFontWidth!==loadedFontWidth){success();}else if(config.timeOut<0){failure();}else{retry();}} checkFont();}})(this,jQuery);(function($){"use strict";$.fn.pin=function(options){var scrollY=0,elements=[],disabled=false,$window=$(window);options=options||{};var recalculateLimits=function(){for(var i=0,len=elements.length;i");} var pad=$.extend({top:0,bottom:0},options.padding||{});$this.data("pin",{pad:pad,from:(options.containerSelector?containerOffset.top:offset.top)-pad.top,to:containerOffset.top+$container.height()-$this.outerHeight()-pad.bottom,end:containerOffset.top+$container.height(),parentTop:parentOffset.top});$this.css({width:$this.outerWidth()});$this.parent().css("height",$this.outerHeight());}};var onScroll=function(){if(disabled){return;} scrollY=$window.scrollTop();var elmts=[];for(var i=0,len=elements.length;idata.end){$this.css('position','');continue;} if(fromscrollY){!($this.css("position")=="fixed")&&$this.css({left:$this.offset().left,top:data.pad.top}).css("position","fixed");if(options.activeClass){$this.addClass(options.activeClass);}}else if(scrollY>=to){$this.css({left:"",top:to-data.parentTop+data.pad.top}).css("position","absolute");if(options.activeClass){$this.addClass(options.activeClass);}}else{$this.css({position:"",top:"",left:""});if(options.activeClass){$this.removeClass(options.activeClass);}}} elements=elmts;};var update=function(){recalculateLimits();onScroll();};this.each(function(){var $this=$(this),data=$(this).data('pin')||{};if(data&&data.update){return;} elements.push($this);$("img",this).one("load",recalculateLimits);data.update=update;$(this).data('pin',data);});$window.scroll(onScroll);$window.resize(function(){recalculateLimits();});recalculateLimits();$window.on('load',update);return this;};})(jQuery);(function($){"use strict";var defaults={action:function(){},runOnLoad:false,duration:500};var settings=defaults,running=false,start;var methods={};methods.init=function(){for(var i=0;i<=arguments.length;i++){var arg=arguments[i];switch(typeof arg){case "function":settings.action=arg;break;case "boolean":settings.runOnLoad=arg;break;case "number":settings.duration=arg;break;}} return this.each(function(){if(settings.runOnLoad){settings.action();} $(this).resize(function(){methods.timedAction.call(this);});});};methods.timedAction=function(code,millisec){var doAction=function(){var remaining=settings.duration;if(running){var elapse=new Date()-start;remaining=settings.duration-elapse;if(remaining<=0){clearTimeout(running);running=false;settings.action();return;}} wait(remaining);};var wait=function(time){running=setTimeout(doAction,time);};start=new Date();if(typeof millisec==='number'){settings.duration=millisec;} if(typeof code==='function'){settings.action=code;} if(!running){doAction();}};$.fn.afterResize=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else{return methods.init.apply(this,arguments);}};})(jQuery);jQuery(document).ready(function($){var animationDelay=2500,barAnimationDelay=3800,barWaiting=barAnimationDelay-3000,lettersDelay=50,typeLettersDelay=150,selectionDuration=500,typeAnimationDelay=selectionDuration+800,revealDuration=600,revealAnimationDelay=1500;initHeadline();function initHeadline(){animateHeadline('.word-rotator','.word-rotator.letters');} function animateHeadline($selector){var duration=animationDelay;theme.fn.intObs($selector,function(){if($(this).hasClass('letters')){$(this).find('b').each(function(){var word=$(this),letters=word.text().split(''),selected=word.hasClass('is-visible');for(i in letters){if(word.parents('.rotate-2').length>0)letters[i]=''+letters[i]+'';letters[i]=(selected)?''+letters[i]+'':''+letters[i]+'';} var newLetters=letters.join('');word.html(newLetters).css('opacity',1);});} var headline=$(this);if(headline.hasClass('loading-bar')){duration=barAnimationDelay;setTimeout(function(){headline.find('.word-rotator-words').addClass('is-loading')},barWaiting);}else if(headline.hasClass('clip')){var spanWrapper=headline.find('.word-rotator-words'),newWidth=spanWrapper.outerWidth()+10 spanWrapper.css('width',newWidth);}else if(!headline.hasClass('type')){var words=headline.find('.word-rotator-words b'),width=0;words.each(function(){var wordWidth=$(this).outerWidth();if(wordWidth>width)width=wordWidth;});headline.find('.word-rotator-words').css('width',width);};setTimeout(function(){hideWord(headline.find('.is-visible').eq(0))},duration);},{});} function hideWord($word){var nextWord=takeNext($word);if($word.parents('.word-rotator').hasClass('type')){var parentSpan=$word.parent('.word-rotator-words');parentSpan.addClass('selected').removeClass('waiting');setTimeout(function(){parentSpan.removeClass('selected');$word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out');},selectionDuration);setTimeout(function(){showWord(nextWord,typeLettersDelay)},typeAnimationDelay);}else if($word.parents('.word-rotator').hasClass('letters')){var bool=($word.children('i').length>=nextWord.children('i').length)?true:false;hideLetter($word.find('i').eq(0),$word,bool,lettersDelay);showLetter(nextWord.find('i').eq(0),nextWord,bool,lettersDelay);}else if($word.parents('.word-rotator').hasClass('clip')){$word.parents('.word-rotator-words').stop(true,true).animate({width:'2px'},revealDuration,function(){switchWord($word,nextWord);showWord(nextWord);});}else if($word.parents('.word-rotator').hasClass('loading-bar')){$word.parents('.word-rotator-words').removeClass('is-loading');switchWord($word,nextWord);setTimeout(function(){hideWord(nextWord)},barAnimationDelay);setTimeout(function(){$word.parents('.word-rotator-words').addClass('is-loading')},barWaiting);}else{switchWord($word,nextWord);setTimeout(function(){hideWord(nextWord)},animationDelay);}} function showWord($word,$duration){if($word.parents('.word-rotator').hasClass('type')){showLetter($word.find('i').eq(0),$word,false,$duration);$word.addClass('is-visible').removeClass('is-hidden');}else if($word.parents('.word-rotator').hasClass('clip')){if(document.hasFocus()){$word.parents('.word-rotator-words').stop(true,true).animate({'width':$word.outerWidth()+10},revealDuration,function(){setTimeout(function(){hideWord($word)},revealAnimationDelay);});}else{$word.parents('.word-rotator-words').stop(true,true).animate({width:$word.outerWidth()+10});setTimeout(function(){hideWord($word)},revealAnimationDelay);}}} function hideLetter($letter,$word,$bool,$duration){$letter.removeClass('in').addClass('out');if(!$letter.is(':last-child')){setTimeout(function(){hideLetter($letter.next(),$word,$bool,$duration);},$duration);}else if($bool){setTimeout(function(){hideWord(takeNext($word))},animationDelay);} if($letter.is(':last-child')&&$('html').hasClass('no-csstransitions')){var nextWord=takeNext($word);switchWord($word,nextWord);}} function showLetter($letter,$word,$bool,$duration){$letter.addClass('in').removeClass('out');if(!$letter.is(':last-child')){setTimeout(function(){showLetter($letter.next(),$word,$bool,$duration);},$duration);}else{if($word.parents('.word-rotator').hasClass('type')){setTimeout(function(){$word.parents('.word-rotator-words').addClass('waiting');},200);} if(!$bool){setTimeout(function(){hideWord($word)},animationDelay)} if(!$word.closest('.word-rotator').hasClass('type')){$word.closest('.word-rotator-words').stop(true,true).animate({width:$word.outerWidth()});}}} function takeNext($word){return(!$word.is(':last-child'))?$word.next():$word.parent().children().eq(0);} function takePrev($word){return(!$word.is(':first-child'))?$word.prev():$word.parent().children().last();} function switchWord($oldWord,$newWord){$oldWord.removeClass('is-visible').addClass('is-hidden');$newWord.removeClass('is-hidden').addClass('is-visible');if(!$newWord.closest('.word-rotator').hasClass('clip')){var space=0,delay=($newWord.outerWidth()>$oldWord.outerWidth())?0:600;if($newWord.closest('.word-rotator').hasClass('loading-bar')||$newWord.closest('.word-rotator').hasClass('slide')){space=3;delay=0;} setTimeout(function(){$newWord.closest('.word-rotator-words').stop(true,true).animate({width:$newWord.outerWidth()+space});},delay);}}});(function($){$.fn.hover3d=function(options){var settings=$.extend({selector:null,perspective:1000,sensitivity:20,invert:false,shine:false,hoverInClass:"hover-in",hoverOutClass:"hover-out",hoverClass:"hover-3d"},options);return this.each(function(){var $this=$(this),$card=$this.find(settings.selector);currentX=0;currentY=0;if(settings.shine){$card.append('
');} var $shine=$(this).find(".shine");$this.css({perspective:settings.perspective+"px",transformStyle:"preserve-3d"});$card.css({perspective:settings.perspective+"px",transformStyle:"preserve-3d",});$shine.css({position:"absolute",top:0,left:0,bottom:0,right:0,transform:'translateZ(1px)',"z-index":9});function enter(event){$card.addClass(settings.hoverInClass+" "+settings.hoverClass);currentX=currentY=0;setTimeout(function(){$card.removeClass(settings.hoverInClass);},1000);} function move(event){var w=$card.innerWidth(),h=$card.innerHeight(),currentX=Math.round(event.pageX-$card.offset().left),currentY=Math.round(event.pageY-$card.offset().top),ax=settings.invert?(w/2-currentX)/settings.sensitivity:-(w/2-currentX)/settings.sensitivity,ay=settings.invert?-(h/2-currentY)/settings.sensitivity:(h/2-currentY)/settings.sensitivity,dx=currentX-w/2,dy=currentY-h/2,theta=Math.atan2(dy,dx),angle=theta*180/Math.PI-90;if(angle<0){angle=angle+360;} $card.css({perspective:settings.perspective+"px",transformStyle:"preserve-3d",transform:"rotateY("+ax+"deg) rotateX("+ay+"deg)"});$shine.css('background','linear-gradient('+angle+'deg, rgba(255,255,255,'+event.offsetY/h*.5+') 0%,rgba(255,255,255,0) 80%)');} function leave(){$card.addClass(settings.hoverOutClass+" "+settings.hoverClass);$card.css({perspective:settings.perspective+"px",transformStyle:"preserve-3d",transform:"rotateX(0) rotateY(0)"});setTimeout(function(){$card.removeClass(settings.hoverOutClass+" "+settings.hoverClass);currentX=currentY=0;},1000);} $this.on("mouseenter",function(){return enter();});$this.on("mousemove",function(event){return move(event);});$this.on("mouseleave",function(){return leave();});});};}(jQuery));(function($){if($.isFunction($.fn['hover3d'])&&$('.hover-effect-3d').length){theme.fn.execOnceTroughEvent('.hover-effect-3d','mouseover.trigger.hover3d',function(){$(this).each(function(){var $this=$(this);$this.hover3d({selector:".thumb-info"});});});}}).apply(this,[jQuery]);if($('[data-title-border]').length){var $pageHeaderTitleBorder=$(''),$pageHeaderTitle=$('[data-title-border]'),$window=$(window);$pageHeaderTitle.before($pageHeaderTitleBorder);var setPageHeaderTitleBorderWidth=function(){$pageHeaderTitleBorder.width($pageHeaderTitle.width());} $window.afterResize(function(){setPageHeaderTitleBorderWidth();});setPageHeaderTitleBorderWidth();$pageHeaderTitleBorder.addClass('visible');} (function($){var $footerReveal={$wrapper:$('.footer-reveal'),init:function(){var self=this;self.build();self.events();},build:function(){var self=this,footer_height=self.$wrapper.outerHeight(true),window_height=($(window).height()-$('.header-body').height());if(footer_height>window_height){$('#footer').removeClass('footer-reveal');$('body').css('margin-bottom',0);}else{$('#footer').addClass('footer-reveal');$('body').css('margin-bottom',footer_height);}},events:function(){var self=this,$window=$(window);$window.on('load',function(){$window.afterResize(function(){self.build();});});}} if($('.footer-reveal').length){$footerReveal.init();}})(jQuery);if($('[data-reinit-plugin]').length){$('[data-reinit-plugin]').on('click',function(e){e.preventDefault();var pluginInstance=$(this).data('reinit-plugin'),pluginFunction=$(this).data('reinit-plugin-function'),pluginElement=$(this).data('reinit-plugin-element'),pluginOptions=theme.fn.getOptions($(this).data('reinit-plugin-options'));$(pluginElement).data(pluginInstance).destroy();setTimeout(function(){theme.fn.execPluginFunction(pluginFunction,$(pluginElement),pluginOptions);},1000);});} if($('[data-copy-to-clipboard]').length){theme.fn.intObs('[data-copy-to-clipboard]',function(){var $this=$(this);$this.wrap('
');var $copyButton=$('
COPY');$this.parent().prepend($copyButton);$copyButton.on('click',function(e){e.preventDefault();var $btn=$(this),$temp=$('