var _gsScope='undefined'!=typeof module&&module.exports&&'undefined'!=typeof global ? global:this||window;
(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function (){
'use strict';
var t=document.documentElement,
e=window,
i=function (i, s){
var r='x'===s ? 'Width':'Height',
n='scroll' + r,
o='client' + r,
a=document.body;
return i===e||i===t||i===a ? Math.max(t[n], a[n]) - (e['inner' + r]||Math.max(t[o], a[o])):i[n] - i['offset' + r];
},
s=_gsScope._gsDefine.plugin({
propName: 'scrollTo',
API: 2,
version: '1.7.4',
init: function (t, s, r){
return (
(this._wdw=t===e),
(this._target=t),
(this._tween=r),
'object'!=typeof s&&(s={ y: s }),
(this.vars=s),
(this._autoKill=s.autoKill!==!1),
(this.x=this.xPrev=this.getX()),
(this.y=this.yPrev=this.getY()),
null!=s.x
? (this._addTween(this, 'x', this.x, 'max'===s.x ? i(t, 'x'):s.x, 'scrollTo_x', !0), this._overwriteProps.push('scrollTo_x'))
: (this.skipX = !0),
null!=s.y
? (this._addTween(this, 'y', this.y, 'max'===s.y ? i(t, 'y'):s.y, 'scrollTo_y', !0), this._overwriteProps.push('scrollTo_y'))
: (this.skipY = !0),
!0
);
},
set: function (t){
this._super.setRatio.call(this, t);
var s=this._wdw||!this.skipX ? this.getX():this.xPrev,
r=this._wdw||!this.skipY ? this.getY():this.yPrev,
n=r - this.yPrev,
o=s - this.xPrev;
this._autoKill &&
(!this.skipX&&(o > 7||-7 > o)&&i(this._target, 'x') > s&&(this.skipX = !0),
!this.skipY&&(n > 7||-7 > n)&&i(this._target, 'y') > r&&(this.skipY = !0),
this.skipX &&
this.skipY &&
(this._tween.kill(),
this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween, this.vars.onAutoKillParams||[]))),
this._wdw
? e.scrollTo(this.skipX ? s:this.x, this.skipY ? r:this.y)
: (this.skipY||(this._target.scrollTop=this.y), this.skipX||(this._target.scrollLeft=this.x)),
(this.xPrev=this.x),
(this.yPrev=this.y);
},
}),
r=s.prototype;
(s.max=i),
(r.getX=function (){
return this._wdw ? (null!=e.pageXOffset ? e.pageXOffset:null!=t.scrollLeft ? t.scrollLeft:document.body.scrollLeft):this._target.scrollLeft;
}),
(r.getY=function (){
return this._wdw ? (null!=e.pageYOffset ? e.pageYOffset:null!=t.scrollTop ? t.scrollTop:document.body.scrollTop):this._target.scrollTop;
}),
(r._kill=function (t){
return t.scrollTo_x&&(this.skipX = !0), t.scrollTo_y&&(this.skipY = !0), this._super._kill.call(this, t);
});
}),
_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
var $j=jQuery.noConflict();
var search_in_menu=0;
var $body=$j('body');
var $main_wrapper=$j('#main-wrapper');
var $doc=$j(document);
var $wind=$j(window);
var hb_open_flag=0;
var $is_fullpage=$j('#fullpage').length ? true:false;
var $preloader=$j('#hb-preloader').length;
var main_wrapper=document.getElementById('main-wrapper');
var is_safari=false;
if(navigator.userAgent.indexOf('Safari')!=-1&&navigator.userAgent.indexOf('Chrome')==-1){
is_safari=true;
}
if($body.hasClass('page-id-323')){
is_safari=true;
}
var hb_js=function (){
hb_hide_preloader_after_s();
hb_is_mobile();
hb_menu_init();
hb_menu_search();
hb_init_tooltip();
hb_max_height_fixes();
hb_header_dropdown();
hb_scroll_top_init();
hb_fit_video();
hb_anim_content();
hb_pagination_ajax();
hb_masonry();
hb_to_top_click();
hb_side_nav_handler();
hb_modern_search();
hb_fancy_search();
hb_click_forms();
hb_like_init();
hb_mini_contact_form();
hb_validations();
hb_fixed_footer_init();
hb_ajax_search();
hb_init_lightbox();
hb_single_blog_scripts();
hb_init_shortcodes();
hb_counter();
hb_charts();
hb_progress_bar();
hb_contact_forms();
hb_contact_forms_spec();
hb_animated_contents_ready();
hb_woo_stuff();
hb_count_gallery_filters();
hb_faq_filter();
hb_delayed_mh();
hb_smooth_scroll();
hb_fullwidth_page();
hb_fullscreen_image();
highendStickyHeader();
highendOnePageNav();
};
window.addEventListener('load', function (){
hb_hide_preloader();
hb_init_standard_gallery();
hb_init_fw_gallery();
hb_modal_on_load();
hb_max_height_fixes();
hb_parallax_init();
hb_center_vertically();
hb_center_me();
});
document.addEventListener('DOMContentLoaded', function (){
'use strict';
window.hb_js();
});
window.addEventListener('scroll', function (){
highendDebounce(hb_animated_contents());
highendDebounce(hb_counter());
highendDebounce(hb_charts());
highendDebounce(hb_progress_bar());
});
window.addEventListener('resize', function (){
if(is_responsive()){
highendDebounce(hb_center_me());
highendDebounce(hb_center_vertically());
highendDebounce(hb_fixed_footer_init());
highendDebounce(hb_max_height_fixes());
highendDebounce(hb_fullscreen_image());
highendDebounce(hb_parallax_init());
}});
function highendDebounce(fn){
var timeout;
return function (){
var context=this;
var args=arguments;
if(timeout){
window.cancelAnimationFrame(timeout);
}
timeout=window.requestAnimationFrame(function (){
fn.apply(this, args);
});
};}
function hb_hide_preloader_after_s(){
if($preloader){
setTimeout(function (){
if(!$j('#hb-preloader').hasClass('ajax-like-initiated')){
$j('#hb-preloader').css('opacity', 0);
$j('#hb-preloader').hide();
hb_animated_contents();
}}, 5000);
}}
function hb_hide_preloader(){
$j('#hb-preloader').css('opacity', 0);
setTimeout(function (){
$j('#hb-preloader').hide();
hb_animated_contents();
}, 600);
}
function hb_is_mobile(){
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
$body.addClass('mobile mobile-device');
}}
function is_responsive(){
if(highend_vars.responsive){
return true;
}
return false;
}
jQuery.exists=function (selector){
return $j(selector).length > 0;
};
function hb_init_tooltip(){
$body.tooltip({ selector: '[rel=tooltip]' });
}
function hb_animated_contents_ready(){
if(!$preloader){
hb_animated_contents();
}}
function hb_animated_contents(){
if($j.exists('.hb-animate-element')&&$j.inviewport&&!$body.hasClass('mobile')&&!$is_fullpage){
$j('.hb-animate-element:in-viewport').each(function (e){
hb_animation_in_viewport($j(this));
});
}}
function hb_animation_in_viewport($element){
if($element.hasClass('hb-in-viewport')){
return;
}
var delay=$element.attr('data-delay');
if(typeof delay=='undefined'||delay==''){
delay=80;
}
delay=parseInt(delay);
setTimeout(function (){
$element.addClass('hb-in-viewport');
}, delay);
}
function is_touch_device(){
return !!('ontouchstart' in window)||!!('onmsgesturechange' in window);
}
function hb_fit_video(){
$j('.fitVids, #pp_full_res').fitVids();
}
function hb_menu_init(){
$j('.sf-menu').superfish({
delay: 50,
speed: 200,
speedOut: 100,
autoArrows: true,
disableHI: true,
animation: { opacity: 'show' },
easing: 'easeOutQuad',
});
if($j('#main-nav').length&&!$j('#main-nav').hasClass('sf-subbed')){
$j('#main-nav li').each(function (){
$j(this).parent().addClass('sf-subbed');
if($j(this).find('> ul').length > 0){
$j(this).addClass('has-ul');
$j(this).find('> a').append('<i class="icon-angle-right sf-sub-indicator"></i>');
}});
}
if($j('.language-selector').length){
var lang=$j('.language-selector').find('.active-language .icl_lang_sel_native').html();
var lang_img=$j('.language-selector').find('.active-language .lang-img').html();
if(lang!==''){
$j('#hb-current-lang .lang-val').html(lang);
$j('#hb-current-lang .active-lang-img').html(lang_img);
}}
if($j('#mobile-menu').length&&$j('#mobile-menu').hasClass('interactive')){
$j('#mobile-menu > div > .menu-main-menu-container > li').each(function (){
if($j(this).find('ul').length){
$j(this).append('<span class="open-submenu"><i class="icon-angle-down"></i></span>');
}});
$j('.open-submenu').on('click', function (e){
if($j(this).hasClass('active')){
$j(this).find('i').attr('class', 'icon-angle-down');
$j(this).parent().find('ul').css('display', 'none');
$j(this).removeClass('active');
}else{
$j(this).addClass('active');
$j(this).find('i').attr('class', 'icon-angle-up');
$j(this).parent().find('ul').css('display', 'block');
}});
}
function show_mobile_menu(){
$body.addClass('mobile-menu-open');
setTimeout(function (){
$main_wrapper.on('click', clear_mobile_menu);
}, 500);
if($j('#fullpage').length){
$j.fn.fullpage.setAllowScrolling(false);
}}
$j('#show-nav-menu, .mobile-menu-close').on('touchstart click', function (e){
e.preventDefault();
if($body.hasClass('mobile-menu-open')){
hide_mobile_menu();
}else{
show_mobile_menu();
}});
$j('#mobile-menu li a').on('click', hide_mobile_menu);
function hide_mobile_menu(){
$body.removeClass('mobile-menu-open');
$main_wrapper.off('click', clear_mobile_menu);
if($j('#fullpage').length){
$j.fn.fullpage.setAllowScrolling(true);
}}
function clear_mobile_menu(){
$body.removeClass('mobile-menu-open');
hide_mobile_menu();
}}
function hb_fullwidth_page(){
if($j('#fullpage').length){
section_names=new Array();
$light_logo_length=$j('.hb-light-logo').length;
$is_special_header=$body.hasClass('hb-special-header-style');
$j('.section').each(function (){
section_names.push($j(this).attr('data-id'));
});
$j('#fullpage').fullpage({
sectionsColor: [],
anchors: section_names,
navigation: true,
navigationPosition: 'right',
navigationTooltips: [],
menu: '#menu',
resize: false,
loopTop: false,
loopBottom: false,
scrollingSpeed: 600,
verticalCentered: true,
easing: 'easeInOutQuad',
autoScrolling: true,
scrollOverflow: true,
css3: true,
onLeave: function (index, nextIndex, direction){
var i=nextIndex - 1;
var style=$j('#fullpage .section').eq(i).attr('data-nav-color');
if(style=='dark'){
$j('#fp-nav').addClass('dark-skin');
if($is_special_header){
$j('#header-inner-bg').addClass('dark-skin');
$j('.hb-visible-logo').removeClass('hb-visible-logo');
$j('.hb-dark-logo').addClass('hb-visible-logo');
}}else{
$j('#fp-nav').removeClass('dark-skin');
if($is_special_header){
$j('#header-inner-bg').removeClass('dark-skin');
$j('.hb-visible-logo').removeClass('hb-visible-logo');
$j('.hb-light-logo').addClass('hb-visible-logo');
}}
$j('#fullpage .section').eq(i).addClass('lazy-loaded');
},
afterLoad: function (anchorLink, index){
console.log(index);
$j('#fullpage .section')
.eq(index - 1)
.addClass('lazy-loaded');
var pb=$j('#fullpage .section')
.eq(index - 1)
.find('.hb-button.primary');
var sb=$j('#fullpage .section')
.eq(index - 1)
.find('.hb-button.secondary');
var ti=$j('#fullpage .section')
.eq(index - 1)
.find('h2');
var pa=$j('#fullpage .section')
.eq(index - 1)
.find('p');
var elements=new Array();
elements.push(pb);
elements.push(sb);
elements.push(ti);
elements.push(pa);
$j.each(elements, function (index, val){
hb_animation_in_viewport($j(this));
});
},
afterRender: function (){
if($j('video').length){
$j('video').get(0).play();
}
var i=0;
var style=$j('#fullpage .section').eq(i).attr('data-nav-color');
if(style=='dark'){
$j('#fp-nav').addClass('dark-skin');
if($is_special_header){
$j('#header-inner-bg').addClass('dark-skin');
$j('.hb-visible-logo').removeClass('hb-visible-logo');
$j('.hb-dark-logo').addClass('hb-visible-logo');
}}else{
$j('#fp-nav').removeClass('dark-skin');
if($is_special_header){
$j('#header-inner-bg').removeClass('dark-skin');
$j('.hb-visible-logo').removeClass('hb-visible-logo');
$j('.hb-light-logo').addClass('hb-visible-logo');
}}
var pb=$j('#fullpage .section').eq(0).find('.hb-button.primary');
var sb=$j('#fullpage .section').eq(0).find('.hb-button.secondary');
var ti=$j('#fullpage .section').eq(0).find('h2');
var pa=$j('#fullpage .section').eq(0).find('p');
var elements=new Array();
elements.push(pb);
elements.push(sb);
elements.push(ti);
elements.push(pa);
$j.each(elements, function (index, val){
hb_animation_in_viewport($j(this));
});
},
});
}}
function hb_max_height_fixes(){
var max;
/*if($j('.main-navigation .megamenu').length&&$wind.width() > 900){
var element;
var first_ul;
var $mega_lis;
$j('.main-navigation .megamenu').each(function(){
element=$j(this);
first_ul=element.find(">ul").css("display", "block");
$mega_lis=first_ul.find('>li');
$mega_lis.css("height", "auto");
max=Math.max.apply(Math, $mega_lis.map(function(){ return $j(this).outerHeight(); }));
$mega_lis.css("height", max);
first_ul.css("display", "none");
});
}*/
if($j('.hb-same-height').length&&$wind.width() > 767){
$j('.hb-same-height').each(function (){
var $cols=$j(this).find('.wpb_column');
$cols.css('height', 'auto');
max=Math.max.apply(Math,
$cols.map(function (){
return $j(this).outerHeight();
})
);
$cols.css('height', max);
});
}else if($wind.width() < 767){
$j('.hb-same-height .wpb_column').css('height', 'auto');
}
$j('.wpcf7-submit').on('touchstart click', function (e){
setTimeout(function (){
$wind.trigger('resize');
}, 500);
setTimeout(function (){
$wind.trigger('resize');
}, 1000);
setTimeout(function (){
$wind.trigger('resize');
}, 1500);
});
if($j('.hb-flipbox-container').length){
$j('.hb-flipbox-container').each(function (){
var front_height=$j(this).find('.hb-flipbox-front .hb-flipbox-content').outerHeight();
var back_height=$j(this).find('.hb-flipbox-back .hb-flipbox-content').outerHeight();
var min_height=Math.max(front_height, back_height);
$j(this).css('min-height', min_height);
});
}}
function hb_dmh(){
if($j('.hb-same-height').length&&$wind.width() > 767){
$j('.hb-same-height').each(function (){
var $cols=$j(this).find('.hb-column');
$cols.css('height', 'auto');
max=Math.max.apply(Math,
$cols.map(function (){
return $j(this).outerHeight();
})
);
$cols.css('height', max);
});
}else if($wind.width() < 767){
$j('.hb-same-height .hb-column').css('height', 'auto');
}
hb_fixed_footer_init();
}
function hb_delayed_mh(){
setTimeout(function (){
hb_dmh();
}, 2000);
setTimeout(function (){
hb_dmh();
}, 4000);
setTimeout(function (){
hb_dmh();
}, 8000);
}
function hb_header_dropdown(){
var $current;
var $dropdown;
$body
.on('mouseenter', '.top-widget, .share-holder', function (){
$dropdown=$j(this).find('.hb-dropdown-box');
if($dropdown.hasClass('dropdown-visible')){
$dropdown.removeClass('dropdown-visible');
}else{
$dropdown.addClass('dropdown-visible');
}
$current=$dropdown;
})
.on('mouseleave', '.top-widget, .share-holder', function (){
$current.removeClass('dropdown-visible');
});
$j('.top-widget #password, .top-widget #username').keypress(function (e){
var keycode=event.keyCode ? event.keyCode:event.which;
if(keycode=='13'){
$j('#hb-login-form').submit();
}});
$j('#password-tmp, #username-tmp').keypress(function (e){
var keycode=event.keyCode ? event.keyCode:event.which;
if(keycode=='13'){
$j('#hb-login-form-tmp').submit();
}});
}
function hb_scroll_top_init(){
var win=$wind;
(timeo=false),
(scroll_top=$j('#to-top')),
(set_status=function (){
var st=win.scrollTop();
if(st < 350){
scroll_top.removeClass('hb-pop-class');
}else if(!scroll_top.is('.hb-pop-class')){
scroll_top.addClass('hb-pop-class');
}});
win.scroll(function (){
highendDebounce(set_status());
});
set_status();
}
function hb_menu_search(){
if($body.hasClass('vc_editor')) return false;
hb_side_panel_added=0;
var $main_nav=$j('#main-nav');
var $search_in_header=highend_vars.search_header;
var $cart_count=highend_vars.cart_count;
var $cart_url=highend_vars.cart_url;
var $side_nav_socials=$j('#side-nav-socials');
if($j('#header-inner').length&&$j('#header-inner').hasClass('nav-type-2')&&!$j('#header-inner').hasClass('centered-nav')){
if($main_nav.length&&$body.hasClass('has-side-section')&&hb_side_panel_added==0){
$main_nav.append('<li id="hb-panel-opener" class="external float-right"><a class="hb-open-side-section" href="#"><i class="icon-bars"></i></a></li>');
hb_side_panel_added=1;
}
if($main_nav.length&&$main_wrapper.hasClass('with-shop-button')){
$main_nav.append('<li id="hb-cart-count" class="external float-right"><a class="hb-cart-init" aria-label="Cart" href="' +
$cart_url +
'"><i class="hb-icon-cart"></i><span class="cart-circle-count">' +
$cart_count +
'</span></a></li>'
);
}
if($main_nav.length&&$search_in_header==1&&search_in_menu==0){
$main_nav.append('<li id="nav-search" class="external float-right"><a href="#" id="search-trigger" class="no-transition external"><i class="hb-icon-search"></i></a></li>'
);
search_in_menu=1;
}}else{
if($main_nav.length&&$search_in_header==1&&search_in_menu==0){
$main_nav.append('<li id="nav-search" class="external"><a href="#" id="search-trigger" class="no-transition external"><i class="hb-icon-search"></i></a></li>'
);
search_in_menu=1;
}
if($main_nav.length&&$main_wrapper.hasClass('with-shop-button')){
$main_nav.append('<li id="hb-cart-count" class="external"><a class="hb-cart-init" aria-label="Cart" href="' +
$cart_url +
'"><i class="hb-icon-cart"></i><span class="cart-circle-count">' +
$cart_count +
'</span></a></li>'
);
}
if($main_nav.length&&$body.hasClass('has-side-section')&&hb_side_panel_added==0){
$main_nav.append('<li id="hb-panel-opener" class="external"><a class="hb-open-side-section" href="#"><i class="icon-bars"></i></a></li>');
hb_side_panel_added=1;
}}
$j('.hb-open-side-section').on('touchstart click', function (e){
e.preventDefault();
if(hb_open_flag==0){
hb_gs.TweenLite.to($j('#hb-side-section'), 0.55, {
right: '0px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.to($j('#hb-wrap, .highend-sticky-header #header-inner'), 0.55, { left: '-300px', ease: hb_gs.Power2.easeInOut });
hb_gs.TweenLite.fromTo($j('#hb-modal-overlay'), 0.55, { opacity: 0 }, { opacity: 1, display: 'block', ease: hb_gs.Power2.easeInOut });
hb_open_flag=1;
}else{
hb_gs.TweenLite.to($j('#hb-side-section'), 0.55, {
right: '-300px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.to($j('#hb-wrap, #header-inner'), 0.55, {
left: '0px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.fromTo($j('#hb-modal-overlay'), 0.55, { opacity: 1 }, { opacity: 0, display: 'none', ease: hb_gs.Power2.easeInOut });
hb_open_flag=0;
}});
$j('.hb-close-side-section, #hb-modal-overlay').on('touchstart click', function (e){
e.preventDefault();
if(hb_open_flag==1){
hb_gs.TweenLite.to($j('#hb-side-section'), 0.55, {
right: '-300px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.to($j('#hb-wrap, #header-inner'), 0.55, {
left: '0px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.fromTo($j('#hb-modal-overlay'), 0.55, { opacity: 1 }, { opacity: 0, display: 'none', ease: hb_gs.Power2.easeInOut });
hb_open_flag=0;
}});
}
function hb_anim_content(){
if(!is_touch_device()){
$body.addClass('hb-transform');
}}
function hb_to_top_click(){
$j('#to-top,.go-to-top').click(function (e){
e.preventDefault();
window.scrollTo({
top: 0,
left: 0,
behavior: 'smooth',
});
});
}
function hb_masonry(){
var $container=$j('.masonry-holder');
if($container.length){
var $layoutMode=$container.attr('data-layout-mode');
if($layoutMode=='fitRows'){
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'fitRows',
});
}else if($layoutMode=='masonry'){
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'masonry',
});
}else if($layoutMode=='straightDown'){
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'straightDown',
});
}else{
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'masonry',
});
}
$container.imagesLoaded(function (){
if($layoutMode=='fitRows'){
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'fitRows',
});
}else if($layoutMode=='masonry'){
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'masonry',
});
}else if($layoutMode=='straightDown'){
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'straightDown',
});
}else{
$container.isotope({
itemSelector: 'article',
animationEngine: 'best-available',
layoutMode: 'masonry',
});
}});
}}
function hb_side_nav_handler(){
if($body.hasClass('hb-side-navigation')){
var $panel=$j('#hb-side-navigation');
var hb_window_y;
function sideNavScroll(){
hb_window_y=$wind.scrollTop();
if(hb_window_y > 200&&$wind.width() >=1024){
$body.removeClass('transparent-side-navigation');
$panel.removeClass('hb-transparent');
$panel.addClass('hb-non-transparent');
window.dispatchEvent(new Event('resize'));
}else if(hb_window_y < 200&&$wind.width() >=1024){
$body.addClass('transparent-side-navigation');
$panel.addClass('hb-transparent');
$panel.removeClass('hb-non-transparent');
window.dispatchEvent(new Event('resize'));
}else if($wind.width() < 1024){
$body.removeClass('transparent-side-navigation');
$panel.removeClass('hb-transparent');
$panel.addClass('hb-non-transparent');
window.dispatchEvent(new Event('resize'));
}}
if($body.hasClass('transparent-side-navigation')){
sideNavScroll();
$wind.scroll(function (){
highendDebounce(sideNavScroll());
});
}
if($body.hasClass('side-navigation-with-animation')){
if($j('.hb-side-nav > li').length){
$wind.on('load', function (){
hb_gs.TweenLite.to($j('.side-logo-wrapper #logo'), 0.4, {
delay: 1,
left: '0px',
opacity: 1,
ease: hb_gs.Power1.easeOut,
});
setTimeout(function (){
$j('.hb-side-nav > li, .side-nav-bottom-part ul li, .side-nav-bottom-text').each(function (i, l){
hb_gs.TweenLite.to(l, 0.4, {
delay: i * 0.12,
left: '0px',
opacity: 1,
ease: hb_gs.Power1.easeOut,
});
});
}, 1000);
});
}else{
hb_gs.TweenLite.to($j('.side-logo-wrapper #logo'), 0.4, {
delay: 1,
left: '0px',
opacity: 1,
ease: hb_gs.Power1.easeOut,
});
}}
}}
function hb_parallax_init(){
if($j('#hb-page-title.parallax').length&&!$body.hasClass('mobile')&&navigator.userAgent.match(/iPad/i)==null){
var $scroll_val;
var $scrollTop;
var $opac;
$wind.scroll(function (){
highendDebounce(function (){
$scrollTop=$wind.scrollTop();
$scroll_val=$wind.scrollTop() * 0.3;
$scroll_val_img=$wind.scrollTop() * 0.2;
$opac=1 - $scrollTop / 260;
if($scroll_val <=0){
$scroll_val=0;
}
if($scroll_val_img <=0){
$scroll_val_img=0;
}
if($opac <=0){
$opac=0;
}
if(!$body.hasClass('mobile')&&navigator.userAgent.match(/iPad/i)==null){
hb_gs.TweenLite.to($j('.hb-image-bg-wrap'), 0, {
y: $scroll_val_img,
ease: hb_gs.Linear.easeNone,
autoRound: true,
});
hb_gs.TweenLite.to($j('.hb-page-title, .breadcrumbs-wrapper'), 0, {
y: $scroll_val,
opacity: $opac,
ease: hb_gs.Linear.easeNone,
autoRound: true,
});
}});
});
}
if(typeof revapi4!='undefined'){
revapi4.bind('revolution.slide.onloaded', function (e){
$j('#slider-section .rev_slider_wrapper').addClass('parallax-slider');
$j('#slider-section').addClass('parallax-slider-wrapper');
});
var $scroll_val;
var $scrollTop;
var $opac;
$wind.scroll(function (){
highendDebounce(function (){
$scrollTop=$wind.scrollTop();
$scroll_val=$wind.scrollTop() * 0.65;
$scroll_val_img=$wind.scrollTop() * 0.45;
$opac=1 - $scrollTop / 560;
if($scroll_val <=0){
$scroll_val=0;
}
if($scroll_val_img <=0){
$scroll_val_img=0;
}
if($opac <=0){
$opac=0;
}
$j('#slider-section .rev_slider_wrapper').css({
transform: 'translateY(' + $scroll_val_img + 'px)',
});
$j('#slider-section .rev_slider_wrapper').css({ opacity: $opac });
});
});
}
$j('.hb-parallax-wrapper').each(function (){
$j(this).jarallax({
speed: 0.2,
});
});
}
function hb_fullscreen_image(){
var $hght=$wind.outerHeight() + 1;
$j('.fullscreen-image').css('height', $hght + 'px');
}
function hb_fw_sections(){
var $fwh;
var $width=$wind.width();
var $pad_left='0px';
var $pad_right='0px';
var $mar_left='-50px';
if($main_wrapper.hasClass('hb-boxed-layout')&&$width > 767){
if($j('.hb-main-content').length){
$fwh=parseInt($j('.hb-main-content').width()) + 102;
}else{
$fwh=parseInt($j('.main-row').width()) + 70;
}
$j('.fw-section').each(function (){
$j(this).css({
'margin-left': $mar_left,
'padding-left': $pad_left,
'padding-right': $pad_right,
'margin-right': '0px',
width: $fwh,
visibility: 'visible',
});
});
}else{
if($j('.hb-main-content').length){
$fwh=($width - parseInt($j('.hb-main-content').width())) / 2;
}else{
$fwh=($width - parseInt($j('.main-row').width())) / 2 + 15;
}
if($body.hasClass('hb-side-navigation')&&$width > 1024){
$fwh=$fwh - 132;
$width=$width - 265;
}
$j('.fw-section').each(function (){
if($j(this).hasClass('fw-columns')){
$j(this).css({
left: -$fwh,
width: $width + 2,
height: 'auto',
});
}else{
$j(this).css({
'margin-left': -$fwh,
'padding-left': $fwh,
'padding-right': $fwh,
visibility: 'visible',
width: '100%',
'margin-right': '0px',
});
}});
}
if($j('.content-total-fw').length){
$j('.content-total-fw').each(function (){
var $that=$j(this);
$that.parent().css('height', $that.outerHeight());
$that.imagesLoaded(function (){
$that.parent().stop().animate({ height: $that.outerHeight() }, 350, 'easeOutCubic');
$that.stop().animate({ opacity: 1 }, 350, 'easeOutCubic');
});
});
}}
function hb_modern_search(){
if($body.hasClass('hb-modern-search')){
$search_overlay=$j('#modern-search-overlay');
$close_search=$j('.hb-modern-search-close');
$search_init=$j('#search-trigger');
$close_search.on('touchstart click', function (e){
e.preventDefault();
if($search_overlay.length&&$search_overlay.hasClass('overlay-visible')){
hb_gs.TweenLite.to($search_overlay, 0.8, {
opacity: 0,
scale: 1.5,
ease: hb_gs.Power3.easeOut,
onComplete: function (){
this.target.removeClass('overlay-visible');
},
});
}});
$search_init.on('touchstart click', function (e){
e.preventDefault();
$search_overlay.addClass('overlay-visible');
hb_gs.TweenLite.to($search_overlay, 0.5, {
opacity: 1,
scale: 1,
ease: hb_gs.Power3.easeOut,
onComplete: function (){},
});
$j('#hb-modern-search-input').focus();
});
$body.keyup(function (e){
if($search_overlay.hasClass('overlay-visible')){
var keycode=event.keyCode ? event.keyCode:event.which;
if(keycode=='27'){
try {
e.preventDefault();
} catch (x){
e.returnValue=false;
}
hb_gs.TweenLite.to($search_overlay, 0.5, {
opacity: 0,
scale: 1.5,
ease: hb_gs.Power3.easeOut,
onComplete: function (){
this.target.removeClass('overlay-visible');
},
});
}}
});
}}
function hb_fancy_search(){
var $open_flag=false;
var $header_inner=$j('#header-inner');
$j('#nav-search, #close-fancy-search').click(function (e){
e.preventDefault();
if($body.hasClass('hb-modern-search')){
return false;
}else{
if(!$open_flag){
$j('#fancy-search #s').val('');
if($header_inner.hasClass('nav-type-2')){
$j('#main-nav, #sticky-shop-button').stop(true, false).hide();
}else{
$j('#logo, #main-nav, #sticky-shop-button').stop(true, false).hide();
}
$j('#fancy-search').fadeIn(300);
$j('#fancy-search-form #s').focus();
$body.addClass('fancy-s-open');
$open_flag=true;
}else{
$j('#fancy-search').hide();
$j('#fancy-search #s').blur();
$j('#logo, #main-nav, #sticky-shop-button').stop(true, false).fadeIn(300);
$body.removeClass('fancy-s-open');
$open_flag=false;
}}
});
$doc.mouseup(function (e){
var $container=$j('#fancy-search');
if(!$container.is(e.target)&&$container.has(e.target).length===0&&$open_flag){
$j('#close-fancy-search').trigger('click');
}});
$doc.keyup(function (e){
if($j('#fancy-search').is(':visible')&&e.keyCode==27){
$j('#close-fancy-search').trigger('click');
}
if(hb_open_flag==1&&e.keyCode==27){
hb_gs.TweenLite.to($j('#hb-side-section'), 0.55, {
right: '-300px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.to($j('#hb-wrap, #header-inner'), 0.55, {
left: '0px',
ease: hb_gs.Power2.easeInOut,
});
hb_gs.TweenLite.fromTo($j('#hb-modal-overlay'), 0.55, { opacity: 1 }, { opacity: 0, display: 'none', ease: hb_gs.Power2.easeInOut });
hb_open_flag=0;
}});
}
function hb_click_forms(){
$j('#hb-submit-login-form').click(function (e){
e.preventDefault();
if($j('#hb-login-form').validate().form()){
$j('#hb-login-form').submit();
}});
$j('#hb-submit-login-form-tmp').click(function (e){
e.preventDefault();
if($j('#hb-login-form-tmp').validate().form()){
$j('#hb-login-form-tmp').submit();
}});
}
function hb_like_init(){
$body.on('click touchstart', '.like-holder', function (e){
var $this=jQuery(this);
var data={
action: 'highend_like_this',
post_id: $this.data('post-id'),
nonce: $this.data('nonce'),
};
jQuery.post(highend_vars.ajaxurl, data, function (response){
if(response.success){
if(response.data.message){
$this.addClass('like-active').find('span').html(response.data.message);
}}
});
});
}
function hb_mini_contact_form(){
var toggle=false;
$j('#contact-button').click(function (e){
e.preventDefault();
e.stopPropagation();
$j(this).toggleClass('active-c-button');
$panel=$j('#contact-panel');
if(!toggle){
hb_gs.TweenLite.to($panel, 0.2, {
opacity: 1,
visibility: 'visible',
scale: 1,
ease: hb_gs.Power3.easeOutBouce,
});
toggle=true;
}else{
hb_gs.TweenLite.to($panel, 0.2, {
opacity: 0,
scale: 0.8,
ease: hb_gs.Power3.easeOutBouce,
onComplete: function (){
$panel.css('visibility', 'hidden');
toggle=false;
},
});
}});
$j('#contact-panel').click(function (e){
e.stopPropagation();
});
$doc.click(function (e){
if(toggle){
$j('#contact-button').removeClass('active-c-button');
hb_gs.TweenLite.to($panel, 0.2, {
opacity: 0,
scale: 0.9,
ease: hb_gs.Power1.easeOutBouce,
onComplete: function (){
$panel.css('visibility', 'hidden');
toggle=false;
},
});
return false;
}});
}
function hb_header_effect(){
var $header=$j('#header-inner');
var header_els=$j('#header-inner, #header-inner #logo, .main-navigation, .plain-logo, #show-nav-menu');
if(($header.hasClass('centered-nav')||$header.hasClass('nav-type-2'))&&$header.hasClass('sticky-nav')){
$j('.main-navigation').sticky();
}
if($header.hasClass('sticky-nav')&&$header.hasClass('nav-type-1')){
$header.sticky();
$j('.image-logo, .plain-logo, #main-nav li a').addClass('no-transition');
var header_height=parseInt(highend_vars.header_height);
var header_height_sticky=parseInt(highend_vars.sticky_header_height);
var hb_window_y=$wind.scrollTop();
var new_height=0;
var offset=0;
var header_els=$j('#header-inner, #header-inner #logo, .main-navigation, .plain-logo, #show-nav-menu');
if($main_wrapper.hasClass('hb-boxed-layout')){
offset +=40;
}
if(!$body.hasClass('hb-special-header-style')){
if(hb_window_y > $j('#header-bar').height() + offset){
if(hb_window_y < header_height - header_height_sticky + $j('#header-bar').height() + offset){
new_height=header_height - hb_window_y + $j('#header-bar').height() + offset;
}else{
new_height=header_height_sticky;
}}else if(hb_window_y < 0&&is_safari==false){
new_height=header_height - hb_window_y;
}else{
new_height=header_height;
}
header_els.css({
height: new_height + 'px',
lineHeight: new_height + 'px',
});
if(new_height > header_height){
$j('#header-inner-sticky-wrapper').css({
height: new_height + 'px',
lineHeight: new_height + 'px',
});
}
$j(window).scroll(function (){
highendDebounce(function (){
var hb_window_y=$wind.scrollTop();
var new_height=0;
var offset=0;
if($main_wrapper.hasClass('hb-boxed-layout')){
offset +=40;
}
if(hb_window_y > $j('#header-bar').height() + offset){
if(hb_window_y < header_height - header_height_sticky + $j('#header-bar').height() + offset){
new_height=header_height - hb_window_y + $j('#header-bar').height() + offset;
}else{
new_height=header_height_sticky;
}}else if(hb_window_y < 0&&is_safari==false){
new_height=header_height - hb_window_y;
}else{
new_height=header_height;
}
header_els.css({
height: new_height + 'px',
lineHeight: new_height + 'px',
});
if(new_height > header_height){
$j('#header-inner-sticky-wrapper').css({
height: new_height + 'px',
lineHeight: new_height + 'px',
});
}});
});
}}
}
function hb_validations(){
if(jQuery().validate){
$j('#commentform').validate();
}}
function hb_fixed_footer_init(){
var $fixedFooterBool=$body.hasClass('hb-fixed-footer');
if($fixedFooterBool&&$wind.width() > 768){
hb_fixed_footer();
}else if($wind.width() <=768){
hb_reset_fixed_footer();
}}
function hb_fixed_footer(){
var $footer_height=0;
var $copyright_height=0;
var $total_height=0;
if($j('#copyright-wrapper').length){
$copyright_height=$j('#copyright-wrapper').outerHeight(true);
}
if($main_wrapper.hasClass('hb-boxed-layout')){
$j('#footer').css({
position: 'fixed',
bottom: 0,
'margin-bottom': $copyright_height + 'px',
width: 'inherit',
'max-width': 'inherit',
'z-index': -1,
});
$j('#copyright-wrapper').css({
position: 'fixed',
bottom: 0,
width: 'inherit',
'max-width': 'inherit',
'z-index': -2,
});
}else{
$j('#footer').css({
position: 'fixed',
bottom: 0,
'margin-bottom': $copyright_height + 'px',
left: 0,
width: '100%',
'z-index': -1,
});
$j('#copyright-wrapper').css({
position: 'fixed',
bottom: 0,
left: 0,
width: '100%',
'z-index': -2,
});
}
if($j('#footer').length){
$footer_height=$j('#footer').outerHeight(true);
}else if($j('#copyright-wrapper').length){
$footer_height=$j('#copyright-wrapper').outerHeight(true);
}
$total_height=$footer_height;
$j('#hb-wrap').css({
'margin-bottom': $total_height,
});
}
function hb_reset_fixed_footer(){
$j('#footer').css({
position: 'static',
bottom: 0,
'margin-bottom': 0,
left: 0,
width: '100%',
'z-index': 991,
});
$j('#copyright-wrapper').css({
position: 'static',
bottom: 0,
left: 0,
width: '100%',
'z-index': 992,
});
$j('#hb-wrap').css({
'margin-bottom': '0',
});
}
function hb_init_fw_gallery(){
var $fw_gallery_container=$j('#fw-gallery-grid');
var $isotope_gallery=$j('.fw-gallery-wrap');
var $enableFilter=$fw_gallery_container.attr('data-enable-filter');
var $enableSort=$fw_gallery_container.attr('data-enable-sort');
if($fw_gallery_container.length){
$fw_gallery_container.imagesLoaded(function (){
$isotope_gallery.removeClass('loading');
$j('#fw-gallery-grid .col').each(function (i){
var $that=$j(this);
var $counter=i;
setTimeout(function (){
$that.addClass('animate');
setTimeout(function (){
$that.removeClass('animate').addClass('visible');
}, 800);
}, $counter * 110 + 300);
});
$isotope_gallery.isotope({
itemSelector: '.elastic-item',
getSortData: {
name: '.hb-gallery-item-name',
date: function (elem){
return $j(elem).attr('data-value');
},
count: '.photo-count parseInt',
},
});
$wind.resize(function (){
highendDebounce($isotope_gallery.isotope());
});
});
$j('li.hb-dd-header').hover(function (){
var $dropdown=$j(this).find('.hb-gallery-dropdown');
$dropdown.addClass('dropdown-visible');
},
function (){
var $dropdown=$j(this).find('.hb-gallery-dropdown');
$dropdown.removeClass('dropdown-visible');
}
);
$j('ul.hb-sort-filter > li.hb-dd-header > ul > li > a').click(function (){
$j(this).addClass('hb-current-item');
var $new_sort_value=$j(this).html();
var $sort_value=$j(this).parent().parent().parent().find('strong');
var $sort_ascending=false;
var selector=$j(this).attr('data-sort-value');
$sort_value.html($new_sort_value);
$sort_value.siblings('.hb-gallery-dropdown').trigger('mouseout');
if(selector=='name'){
$sort_ascending=true;
}else if(selector=='date'){
$sort_ascending=false;
}
if(selector=='random'){
$isotope_gallery.isotope({ sortBy: 'random' });
}else{
$isotope_gallery.isotope({
sortBy: selector,
sortAscending: $sort_ascending,
});
}
return false;
});
$j('ul.hb-grid-filter > li.hb-dd-header > ul > li > a').click(function (){
$j(this).addClass('hb-current-item');
var selector=$j(this).attr('data-filter');
if(selector!='*'){
selector='.' + selector;
}
$isotope_gallery.isotope({ filter: selector });
var $new_sort_value=$j(this).attr('data-filter-name');
var $sort_value=$j(this).parent().parent().parent().find('strong');
$sort_value.html($new_sort_value);
$sort_value.siblings('.hb-gallery-dropdown').trigger('mouseout');
return false;
});
}}
function hb_init_standard_gallery(){
var $standard_gallery_masonry=$j('#standard-gallery-masonry');
var $enableFilter=$standard_gallery_masonry.attr('data-enable-filter');
var $enableSort=$standard_gallery_masonry.attr('data-enable-sort');
if($standard_gallery_masonry.length){
$standard_gallery_masonry.imagesLoaded(function (){
$j('#gallery-loading').stop(true, true).fadeOut(200);
$j('.standard-gallery-item').each(function (i){
var $that=$j(this);
var $counter=i;
setTimeout(function (){
$that.addClass('animate');
setTimeout(function (){
$that.removeClass('animate').css('opacity', 1);
}, 800);
}, $counter * 110 + 300);
});
$standard_gallery_masonry.isotope({
itemSelector: '.standard-gallery-item-wrap',
animationEngine: 'best-available',
layoutMode: 'fitRows',
getSortData: {
name: '.hb-gallery-item-name',
date: function (elem){
return $j(elem).attr('data-value');
},
},
});
});
$j('ul.filt-tabs > li > a').click(function (){
$j('ul.filt-tabs').find('.selected').removeClass('selected');
$j(this).parent().addClass('selected');
var selector=$j(this).attr('data-filter');
$standard_gallery_masonry.isotope({ filter: selector });
return false;
});
$j('ul.sort-tabs > li > a').click(function (){
$j('ul.sort-tabs').find('.selected').removeClass('selected');
$j(this).parent().addClass('selected');
var $sort_ascending=false;
var selector=$j(this).attr('data-sort');
if(selector=='name'){
$sort_ascending=true;
}else if(selector=='date'){
$sort_ascending=false;
}
$standard_gallery_masonry.isotope({
sortBy: selector,
sortAscending: $sort_ascending,
});
return false;
});
}}
function hb_ajax_search(){
if($body.hasClass('hb-modern-search')) return false;
if($j('#nav-search').length&&$j('#header-inner').hasClass('hb-ajax-search')){
$j('#fancy-search #s')
.autocomplete({
delay: 50,
minLength: 2,
appendTo: $j('#fancy-search'),
search: function (event, ui){
$j('#fancy-search').addClass('ajax-searching');
},
source: function (req, response){
$j.getJSON(highend_vars.ajaxurl + '?callback=?&action=hb_ajax_search', req, response);
},
select: function (event, ui){
if(typeof ui.item!='undefined'){
window.location.href=ui.item.link;
}else{
$j('#fancy-search-form').submit();
}},
response: function (event, ui){
$j('#fancy-search').removeClass('ajax-searching');
},
open: function (event, ui){
var len=$j('#fancy-search .ui-autocomplete > li').length;
if(len==5){
$j('#fancy-search .ui-autocomplete').append('<li class="ui-menu-item" role="presentation"><a id="ui-view-all-results" href="#" class="ui-corner-all" tabindex="-1"><i class="hb-moon-search-3"></i><span class="search-title all-results">View all results</span></a></li>'
);
}},
})
.data('ui-autocomplete')._renderItem=function (ul, item){
return $j('<li>')
.append('<a>' + item.image + "<span class='search-title'>" + item.label + "</span><span class='search-date'>" + item.date + '</span></a>')
.appendTo(ul);
};}else{
return false;
}}
function hb_init_lightbox(){
if(!$j.fn.prettyPhoto){
return;
}
$j("a[rel^='prettyPhoto'], a[rel^='prettyPhoto[gallery]'], .gallery-icon a, a[rel^='lightbox']").prettyPhoto({
animation_speed: 'fast',
opacity: 0.85,
overlay_gallery: true,
slideshow: false,
allow_resize: true,
show_title: true,
changepicturecallback: function (){
if(viewportWidth < 1025){
var viewportWidth=$j('html').innerWidth();
$j('.pp_pic_holder.pp_default').css('top', window.pageYOffset + 'px');
}},
default_width: 970,
default_height: 643,
social_tools: '',
});
$j('.gallery-item-init').click(function (e){
e.preventDefault();
var $api_images=$j(this).attr('data-gallery-images');
$j.prettyPhoto.open($api_images);
});
}
function popWindow(url, winName, w, h){
if(window.open){
if(poppedWindow){
poppedWindow='';
}
windowW=w;
windowH=h;
var windowX=screen.width / 2 - windowW / 2;
var windowY=screen.height / 2 - windowH / 2;
var myExtra='status=no,menubar=no,resizable=yes,toolbar=no,scrollbars=yes,addressbar=no';
var poppedWindow=window.open(url, winName, 'width=' + w + ',height=' + h + ',top=' + windowY + ',left=' + windowX + ',' + myExtra + '');
}else{
alert(
'Your security settings are not allowing our popup windows to function. Please make sure your security software allows popup windows to be opened by this web application.'
);
}
return false;
}
function hb_single_blog_scripts(){
$j('.scroll-to-comments').click(function (e){
e.preventDefault();
if($j('#comments').length){
$j('html, body').animate({
scrollTop: $j('#comments').offset().top - 120,
},
800,
'easeOutCubic'
);
}else{
$j('html, body').animate({
scrollTop: $j('#respond').offset().top - 120,
},
800,
'easeOutCubic'
);
}});
$j('.leave-your-reply').click(function (e){
e.preventDefault();
if($j('#respond').length){
$j('html, body').animate({
scrollTop: $j('#respond').offset().top - 120,
},
800,
'easeOutCubic'
);
}});
}
function hb_init_shortcodes(){
if($j('.hb-typed-text').length){
$j('.hb-typed-text').each(function (){
var $that=$j(this);
var strings_to_type=$that.parent().find('.hb-typed-strings').html();
strings_to_type=strings_to_type.replace('<p>', '');
strings_to_type=strings_to_type.replace('</p>', '');
var strings=strings_to_type.split('<br>');
if($that.data('highlight')==true){
$that.css('background-color', $that.data('highlightcolor')).parent().addClass('with-highlight');
$that.css('color', $that.data('highlighttextcolor'));
}
var options={
strings: strings,
typeSpeed: $that.data('speed'),
backDelay: $that.data('backdelay'),
loopCount: $that.data('loopcount'),
loop: $that.data('loop'),
contentType: 'html',
};
$that.typed(options);
});
}
document.querySelectorAll('.hb-owl-slider').forEach((item)=> {
var args={
items: parseInt(item.getAttribute('data-items')),
nav: item.getAttribute('data-navigation'),
navText: ["<i class='hb-moon-arrow-left-4'></i>", "<i class='hb-moon-arrow-right-5'></i>"],
autoplay: 'true'===item.getAttribute('data-autoplay'),
autoplayHoverPause: item.getAttribute('data-stoponhover')=='true',
autoplaySpeed: 'true'===item.getAttribute('data-autoplay') ? parseInt(item.getAttribute('data-autoplaySpeed')):false,
dots: item.getAttribute('data-pagination')=='true',
lazyLoad: item.getAttribute('data-lazyload')=='true',
rewind: item.getAttribute('data-rewindnav')=='true',
responsiveClass: true,
responsive: {
0: {
items: 1,
},
769: {
items: parseInt(item.getAttribute('data-items')),
},
},
};
$j(item).owlCarousel(args);
});
if($j('.init-testimonial-slider').length){
$j('.init-testimonial-slider').each(function (){
var $that=$j(this);
var $speed=$j(this).attr('data-slideshow-speed');
if($speed < 1000){
$speed=1000;
}
$that.flexslider({
selector: '.testimonial-slider > li',
slideshow: true,
animation: 'fade',
smoothHeight: false,
slideshowSpeed: $speed,
animationSpeed: 350,
directionNavArrowsLeft: '<i class="icon-chevron-left"></i>',
directionNavArrowsRight: '<i class="icon-chevron-right"></i>',
pauseOnHover: false,
controlNav: true,
directionNav: false,
prevText: '',
nextText: '',
});
});
}
var init_flexslider=function ($slider){
var speed=$slider.attr('data-speed');
var pause=$slider.attr('data-pause-on-hover');
var control=$slider.attr('data-control-nav');
var nav=$slider.attr('data-direction-nav');
pause=pause=='true';
control=control=='true';
nav=nav=='true';
$slider.fitVids().flexslider({
selector: '.hb-flex-slides > li',
slideshow: true,
animation: 'slide',
smoothHeight: true,
slideshowSpeed: speed,
animationSpeed: 500,
pauseOnHover: pause,
controlNav: control,
directionNav: nav,
prevText: '',
nextText: '',
start: function (){
$slider.removeClass('loading');
if($slider.parents('.masonry-holder').length){
$slider.parents('.masonry-holder').isotope();
}},
});
};
$j('#main-wrapper').on('init', '.init-flexslider', function (){
init_flexslider($j(this));
});
$j('.init-flexslider').trigger('init');
if($j('.init-carousel').length){
$j('.init-carousel').each(function (){
var $that=$j(this);
var visible_var=parseInt($that.attr('data-visible'), 10);
var speed_var=parseInt($that.attr('data-speed'), 10);
var autorotate=$that.attr('data-auto-rotate');
if(autorotate=='false'){
speed_var=false;
}
$that.hbcarousel({
visible: visible_var,
speed: 400,
itemMargin: 20,
carousel: true,
autoRotate: speed_var,
itemMinWidth: 200,
});
});
}
if($j('.init-team-carousel').length){
$j('.init-team-carousel').each(function (){
var $that=$j(this);
var visible_var=parseInt($that.attr('data-visible'), 10);
var speed_var=parseInt($that.attr('data-speed'), 10);
var autorotate=$that.attr('data-auto-rotate');
if(autorotate=='false'){
speed_var=false;
}
$that.hbcarousel({
visible: visible_var,
speed: 400,
itemMargin: 30,
carousel: true,
autoRotate: speed_var,
itemMinWidth: 200,
});
});
}
if($j('.hb-countdown-unit').length){
var date_value;
$j('.hb-countdown-unit').each(function (){
date_value=$j(this).attr('data-date');
$j(this).highendCountdown({
date: date_value,
format: 'on',
});
});
}
if($j('.hb-accordion').length){
$j('.hb-accordion').each(function (){
var $index=$j(this).attr('data-initialindex');
if($index!='-1'){
var $tog=$j(this).find('.hb-accordion-single').eq($index).find('.hb-accordion-tab');
$tog.addClass('active-toggle');
$tog.siblings('.hb-accordion-pane').slideDown(200);
hb_animated_contents();
hb_counter();
hb_charts();
hb_progress_bar();
}});
$j('.hb-accordion .hb-accordion-tab').click(function (e){
e.preventDefault();
var $that=$j(this);
$that.parent().parent().find('.hb-accordion-tab').removeClass('active-toggle');
$that.parent().parent().find('.hb-accordion-pane').slideUp(200);
if($that.next().is(':hidden')==true){
$that.next().slideDown(200);
$that.addClass('active-toggle');
hb_animated_contents();
hb_counter();
hb_charts();
hb_progress_bar();
}});
}
if($j('.hb-toggle').length){
$j('.hb-toggle').each(function (){
var $index=$j(this).attr('data-initialindex');
if($index!='-1'){
var $tog=$j(this).find('.hb-accordion-single').eq($index).find('.hb-accordion-tab');
$tog.addClass('active-toggle');
$tog.siblings('.hb-accordion-pane').slideDown(200);
hb_animated_contents();
hb_counter();
hb_charts();
hb_progress_bar();
}});
$j('#main-wrapper').on('click', '.hb-toggle .hb-accordion-tab', function (e){
e.preventDefault();
var $that=$j(this);
if(!$that.hasClass('active-toggle')){
$that.addClass('active-toggle').siblings('.hb-accordion-pane').slideDown(200);
hb_animated_contents();
hb_counter();
hb_charts();
hb_progress_bar();
}else{
$j(this).removeClass('active-toggle').siblings('.hb-accordion-pane').slideUp(200);
}});
}
$j('.map-info-section').on('click', '.minimize-section', function (e){
e.preventDefault();
$j(this).closest('.map-info-section').toggleClass('minimized');
});
if($j('.overlay').length){
$j('.hb-circle-frame a, .hb-box-frame a').hover(function (){
var $that=$j(this);
$that.find('.overlay').stop().animate({
opacity: 0.85,
},
220,
'easeOutCubic'
);
$that
.find('.plus-sign')
.stop()
.animate({
top: 50 + '%',
},
420,
'easeOutCubic'
);
},
function (){
var $that=$j(this);
$that.find('.overlay').stop().animate({
opacity: 0,
},
220,
'easeOutCubic'
);
$that
.find('.plus-sign')
.stop()
.animate({
top: 40 + '%',
},
420,
'easeOutCubic'
);
}
);
}
if($j('.hb-tabs-wrapper').length){
$j('.hb-tabs-wrapper ul.nav-tabs').find('li:first').addClass('active');
$j('.wpb_tabs.hb-tabs-wrapper').find('.tab-content:first').show();
var interval=0;
$j('.wpb_tabs.hb-tabs-wrapper').each(function (){
var $this_el=$j(this);
interval=parseInt($this_el.attr('hb-data-interval')) * 1000;
if(typeof interval!==typeof undefined&&interval!==false&&interval > 0){
setInterval(function (){
var $current=$this_el.find('.nav.nav-tabs > li.ui-tabs-active.ui-state-active > a');
var $next=$current.parent().next().find('a');
if($next.length==0){
$next=$this_el.find('.nav.nav-tabs > li:first-child > a');
}
$next.trigger('click');
}, interval);
}});
$j('.nav-tabs > li > a').click(function (e){
e.preventDefault();
$j(window).trigger('scroll');
hb_animated_contents();
hb_counter();
hb_charts();
hb_progress_bar();
var tabs_container=$j(this).parent().parent().parent();
var tabs=tabs_container.children('.nav-tabs');
var label=$j(this).attr('id');
var elem=null;
tabs.children('li').removeClass('active');
$j(this).parent().addClass('active');
tabs_container.find('.tab-content').each(function (e){
if($j(this).find('.tab-pane').attr('aria-labelledby')==label){
$j(this).find('.tab-pane').parent().show();
}else{
$j(this).find('.tab-pane').parent().hide();
}});
});
}
$j('.wpb_tabs_nav li a').click(function (){
$wind.trigger('resize');
});
if($j('.hb-modal-window').length){
$j('.modal-open').on('click', function (e){
e.preventDefault();
var $modal_id=$j(this).attr('data-modal-id');
$j('#' + $modal_id)
.parent()
.addClass('hb-visible-modal');
if($j('#' + $modal_id).hasClass('rendered')){
setTimeout(function (){
$j('#' + $modal_id).addClass('animate-modal');
}, 220);
$body.addClass('no-scroll');
}else{
if($j('.hb-accordion').length){
init_modal_accordion();
}
setTimeout(function (){
$j('#' + $modal_id).addClass('rendered animate-modal');
}, 220);
$body.addClass('no-scroll');
}});
$j('.hb-modal-window').on('click touchstart', '.close-modal', function (e){
e.preventDefault();
var $close_id=$j(this).attr('data-close-id');
$j('#' + $close_id).removeClass('animate-modal');
$body.removeClass('no-scroll');
$j('#' + $close_id)
.parent()
.removeClass('hb-visible-modal');
});
}}
function init_modal_accordion(){
$j('.hb-accordion').each(function (){
var $that=$j(this);
$that.parent().parent().find('.hb-accordion-tab').removeClass('active-toggle');
$that.parent().parent().find('.hb-accordion-pane').slideUp(200);
var $index=$j(this).attr('data-initialindex');
if($index!='-1'){
var $tog=$j(this).find('.hb-accordion-single').eq($index).find('.hb-accordion-tab');
$tog.addClass('active-toggle');
$tog.siblings('.hb-accordion-pane').slideDown(200);
hb_animated_contents();
hb_counter();
hb_charts();
hb_progress_bar();
}});
}
function hb_counter(){
if($j.exists('.hb-counter')&&$j.inviewport){
$j('.hb-counter:in-viewport').each(function (){
if(!$j(this).hasClass('activated')){
var countAsset=$j(this),
countNumber=countAsset.find('.count-number'),
countDivider=countAsset.find('.count-separator').find('span'),
countSubject=countAsset.find('.count-subject'),
countTo=countAsset.find('.count-number').attr('data-to'),
countFrom=countAsset.find('.count-number').attr('data-from'),
countSpeed=parseInt(countAsset.find('.count-number').attr('data-speed'));
countAsset.addClass('activated');
$j({ countNum: countFrom }).animate({ countNum: countTo },
{
duration: countSpeed,
easing: 'linear',
step: function (){
countAsset.find('.count-number').text(Math.floor(this.countNum)
.toString()
.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
);
},
complete: function (){
countAsset.find('.count-number').text(this.countNum.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','));
countDivider.animate({ width: 50 }, 650, 'easeOutCubic');
countSubject.delay(100).animate({ opacity: 1, bottom: '0px' }, 650, 'easeOutCubic');
},
}
);
}});
}}
function highendIsInViewport(element){
const rect=element.getBoundingClientRect();
return (
rect.top >=0 &&
rect.left >=0 &&
rect.bottom <=(window.innerHeight||document.documentElement.clientHeight) &&
rect.right <=(window.innerWidth||document.documentElement.clientWidth)
);
}
function hb_charts(){
var charts=document.querySelectorAll('.hb-chart');
charts.forEach(function (chart){
if(null===chart.getAttribute('initialized')&&highendIsInViewport(chart)){
chart.setAttribute('initialized', true);
var $that=$j(chart);
var $animation_speed=$that.attr('data-animation-speed');
var $size=$that.attr('data-barSize');
$that.easyPieChart({
animate: $animation_speed,
lineCap: 'round',
lineWidth: $that.attr('data-lineWidth'),
size: $size,
barColor: $that.attr('data-barColor'),
trackColor: $that.attr('data-trackColor'),
scaleColor: 'transparent',
onStep: function (value){
this.$el.find('.chart-percent span').text(Math.ceil(value));
},
onStop: function (value){
this.$el.siblings('.hb-chart-desc').animate({ opacity: 1, bottom: '0px' }, 650, 'easeOutCubic');
},
});
}});
}
function hb_progress_bar(){
if($j.exists('.hb-progress-bar')&&$j.inviewport){
$j('.hb-progress-bar .progress-outer:in-viewport').each(function (){
if(!$j(this).hasClass('activated')){
$j(this).addClass('activated');
var $that=$j(this);
$that.animate({
width: $j(this).attr('data-width') + '%',
},
1400,
'easeOutCubic'
);
}});
}}
function onSuccessSend(results){
var success_text=$j('#success_text').val();
$j('#hb-submit-contact-panel-form i').attr('class', 'hb-moon-checkmark');
$j('#hb-submit-contact-panel-form').removeClass('hb-asbestos').addClass('hb-nephritis disabled');
$j('#hb-submit-contact-panel-form span.hb-push-button-text').html(success_text);
$j('#hb-submit-contact-panel-form span.hb-push-button-icon').html("<i class='hb-moon-checkmark-2'></i>");
$j('#hb_contact_name_id').attr('disabled', 'disabled');
$j('#hb_contact_email_id').attr('disabled', 'disabled');
$j('#hb_contact_message_id').attr('disabled', 'disabled');
}
function hb_contact_forms(){
var sent=false;
var nameValidate=false;
var emailValidate=false;
var commentsValidate=false;
$j('#hb_contact_name_id').blur(function (){
nameValidate=$j('#contact-panel-form').validate().element('#hb_contact_name_id');
});
$j('#hb_contact_email_id').blur(function (){
emailValidate=$j('#contact-panel-form').validate().element('#hb_contact_email_id');
});
$j('#hb_contact_message_id').blur(function (){
commentsValidate=$j('#contact-panel-form').validate().element('#hb_contact_message_id');
});
$j('#hb-submit-contact-panel-form').click(function (e){
e.preventDefault();
if(!sent){
if($j('#hb_contact_subject_id').val()){
alert('Sorry - bots are not allowed!');
return false;
}
if(nameValidate&&emailValidate&&commentsValidate){
$j('#contact-name #contact-email, #contact-message').attr('disabled', true);
var data={};
data.contact_email=$j('#hb_contact_email_id').val();
data.contact_name=$j('#hb_contact_name_id').val();
data.contact_comments=$j('#hb_contact_message_id').val();
data.action='mail_action';
$j.post(highend_vars.ajaxurl, data, onSuccessSend);
$j('#hb-submit-contact-panel-form i').attr('class', 'hb-moon-spinner-8');
sent=true;
return;
}else{
$j('#contact-panel-form').validate().form();
}}
});
}
function hb_smooth_scroll(){
var offs=0;
if($j('#header-inner').hasClass('sticky-nav')){
offs=highend_vars.sticky_header_height;
}
$j('.smooth-scroll').click(function (e){
e.preventDefault();
if($j(this).is('a')){
var anch=$j(this).attr('href');
$j.scrollTo(anch, 800, { easing: 'easeInOutQuad', offset: -offs });
}else{
var $that=$j(this).find('a');
var anch=$that.attr('href');
$j.scrollTo(anch, 800, { easing: 'easeInOutQuad', offset: -offs });
}});
}
function hb_contact_forms_spec(){
var sent_spec=false;
var sNameValidate=false;
var sEmailValidate=false;
var sCommentsValidate=false;
$j('#sp-contact-name').blur(function (){
sNameValidate=$j('#sp-contact-form').validate().element('#sp-contact-name');
});
$j('#sp-contact-email').blur(function (){
sEmailValidate=$j('#sp-contact-form').validate().element('#sp-contact-email');
});
$j('#sp-contact-message').blur(function (){
sCommentsValidate=$j('#sp-contact-form').validate().element('#sp-contact-message');
});
$j('#special-submit-form').click(function (e){
e.preventDefault();
if(!sent_spec){
if($j('#hb_contact_subject_id').val()){
alert('Sorry - bots are not allowed!');
return false;
}
if(sNameValidate&&sEmailValidate&&sCommentsValidate){
$j('#sp-contact-name, #sp-contact-email, #sp-contact-message').attr('disabled', true);
var data_s={};
data_s.contact_email=$j('#sp-contact-email').val();
data_s.contact_name=$j('#sp-contact-name').val();
data_s.contact_comments=$j('#sp-contact-message').val();
data_s.action='mail_action';
$j.post(highend_vars.ajaxurl, data_s, onSuccessSendSpec);
sent_spec=true;
return;
}else{
$j('#sp-contact-form').validate().form();
}}
});
}
function onSuccessSendSpec(results){
var success_text=$j('#success_text_special').val();
$j('#special-submit-form i').attr('class', 'hb-moon-checkmark');
$j('#special-submit-form').html(success_text).addClass('disabled-button');
$j('#sp-contact-name').attr('disabled', 'disabled');
$j('#sp-contact-email').attr('disabled', 'disabled');
$j('#sp-contact-message').attr('disabled', 'disabled');
}
function hb_toggle_modal_overlay(){
var $overlay=$j('#hb-modal-overlay');
if($overlay.length){
if($overlay.hasClass('visible')){
$j('#hb-modal-overlay').fadeOut(220);
$overlay.removeClass('visible');
}else{
$j('#hb-modal-overlay').fadeIn(220);
$overlay.addClass('visible');
}}
}
function hb_woo_stuff(){
var $sticky_count=0;
var $hb_woo_notif=$j('#hb-woo-notif');
if($hb_woo_notif.length){
var cart_url=$hb_woo_notif.data('cart-url');
var cart_text=$hb_woo_notif.data('cart-text');
var text=$hb_woo_notif.data('text');
}
$body.bind('added_to_cart', function (){
if($hb_woo_notif.length){
var product_name=$j('.product-loading-icon.preloading.hb-spin').parent().parent().siblings('.hb-product-meta-wrapper').find('a h3').text();
var notif=$j(
'<li><div><i class="hb-moon-checkmark-2"></i><span>' + product_name + ' ' + text + ' <a href="' + cart_url + '">' + cart_text + '</a></span></div></li>'
);
if(product_name.length){
notif.appendTo('#hb-woo-notif').fadeIn(350);
setTimeout(function (){
notif.fadeOut(350);
}, 6000);
}}
$j('.product-loading-icon').removeClass('preloading hb-spin').addClass('hb-added-to-cart');
if($j('#sticky-shop-button').length){
$sticky_count=parseInt($j('#sticky-shop-button').find('span').html()) + 1;
$j('#sticky-shop-button').find('span').html($sticky_count);
}});
$body.on('click touchstart', '.hb-buy-button', function (){
if(!$j(this).hasClass('no-action-mark')){
$j(this).parent().find('.product-loading-icon').addClass('preloading hb-spin').removeClass('hb-added-to-cart').css('opacity', '1');
if($j('.cart-circle-count').length){
var ctemp=parseInt($j('.cart-circle-count').html());
ctemp++;
$j('.cart-circle-count').html(ctemp);
if(ctemp==1){
$j('.cart-tab .contents').html(ctemp + ' item');
}else{
$j('.cart-tab .contents').html(ctemp + ' items');
}}
if($j('.hb-cart-total-header').length){
setTimeout(function (){
if($j('#top-cart-widget').length){
var price=$j('#top-cart-widget .amount').html();
$j('.hb-cart-total-header .amount, .cart-tab .amount').html(price);
}}, 900);
}}
});
$j(document).on('click', '.plus, .minus', function (){
var b=$j(this).closest('.quantity').find('.qty'),
c=parseFloat(b.val()),
d=parseFloat(b.attr('max')),
e=parseFloat(b.attr('min')),
f=b.attr('step');
(c&&''!==c&&'NaN'!==c)||(c=0),
(''===d||'NaN'===d)&&(d=''),
(''===e||'NaN'===e)&&(e=0),
('any'===f||''===f||void 0===f||'NaN'===parseFloat(f))&&(f=1),
$j(this).is('.plus') ? b.val(d&&(d==c||c > d) ? d:c + parseFloat(f)):e&&(e==c||e > c) ? b.val(e):c > 0&&b.val(c - parseFloat(f)),
b.trigger('change');
});
var $current_hovered;
$body
.on('mouseenter', '.hb-woo-image-wrap', function (){
$j(this).find('.product-hover-image').css('opacity', '1');
$current_hovered=$j(this);
})
.on('mouseleave', '.hb-woo-image-wrap', function (){
$current_hovered.find('.product-hover-image').css('opacity', '0');
});
}
function hb_center_me(){
if($j('.hb-center-me').length){
$j('.hb-center-me').each(function (){
var $hght=$j(this).outerHeight() / 2;
$j(this).css('margin-top', -$hght + 'px');
});
}}
function hb_center_vertically(){
var max=0;
var $cols=null;
if($j('.hb-center-vertically').length&&$wind.width() > 767){
$j('.hb-center-vertically').each(function (){
$cols=$j(this).parent().children('.wpb_column');
$cols.css('height', 'auto');
max=Math.max.apply(Math,
$cols.map(function (){
return $j(this).innerHeight();
})
);
$cols.css('height', max);
});
}else if($j('.hb-center-vertically').length&&$wind.width() < 767){
$j('.hb-center-vertically').parent().children('.wpb_column').css('height', 'auto');
}}
function hb_count_gallery_filters(){
if($j('.hb-grid-filter').length){
var $that=null;
var $filter=null;
var $filter_count=null;
var count=0;
$j('.hb-grid-filter .hb-gallery-dropdown li').each(function (){
$that=$j(this);
$filter=$that.find('a').attr('data-filter');
$filter_count=$that.find('a').find('.hb-filter-count');
if($filter=='*'){
count=$j('.fw-gallery-wrap .elastic-item').length;
}else{
count=$j('.fw-gallery-wrap .' + $filter).length;
}
$filter_count.html('(' + count + ')');
});
}else if($j('.standard-gallery-filter').length){
var $that=null;
var $filter=null;
var $filter_count=null;
var count=0;
$j('.filt-tabs li').each(function (){
$that=$j(this);
$filter=$that.find('a').attr('data-filter');
$filter_count=$that.find('a').find('.item-count');
if($filter=='*'){
count=$j('#standard-gallery-masonry .standard-gallery-item-wrap').length;
}else{
count=$j('#standard-gallery-masonry ' + $filter).length;
}
$filter_count.html(count);
});
}}
function hb_faq_filter(){
if($j('.faq-filter').length){
var $elems=$j('.faq-filter li a');
var $data_filter=null;
if($j('.faq-filter').length){
$elems.each(function (){
$that=$j(this);
$data_filter=$that.attr('data-filter');
if($data_filter=='*'){
$that.find('.hb-filter-count').html($j('.faq-module-wrapper').find('.hb-toggle').length);
}else{
$that.find('.hb-filter-count').html($j('.faq-module-wrapper').find('.' + $data_filter).length);
}});
}
$doc.on('touchstart click', '.faq-filter li a', function (event){
event.stopPropagation();
event.preventDefault();
if(event.handled!==true){
$that=$j(this);
$data_filter=$that.attr('data-filter');
$j('.faq-module-wrapper').find('.selected').removeClass('selected');
$that.parent().addClass('selected');
if($data_filter=='*'){
$j('.faq-module-wrapper').find('.hb-toggle').slideDown(0);
}else{
$j('.faq-module-wrapper').find('.hb-toggle').slideUp(0);
$j('.faq-module-wrapper')
.find('.' + $data_filter)
.slideDown(0);
}
event.handled=true;
}else{
return false;
}});
}}
function hb_modal_on_load(){
if($j('.modal-show-on-load').length){
$j('.modal-show-on-load').each(function (){
var $that=$j(this);
var $modal_id=$that.attr('id');
$j('#' + $modal_id)
.parent()
.addClass('hb-visible-modal');
if($j('#' + $modal_id).hasClass('rendered')){
setTimeout(function (){
$j('#' + $modal_id).addClass('animate-modal');
}, 220);
$body.addClass('no-scroll');
}else{
setTimeout(function (){
$j('#' + $modal_id).addClass('rendered animate-modal');
}, 220);
$body.addClass('no-scroll');
}});
if($j('.hb-countdown-unit').length){
var date_value;
$j('.hb-countdown-unit').each(function (){
date_value=$j(this).attr('data-date');
$j(this).highendCountdown({
date: date_value,
format: 'on',
});
});
}}
}
function hb_pagination_ajax(){
pagination_count=highend_vars.paged;
var $container=$j('#hb-blog-posts');
var col_count=$container.attr('data-column-size');
var category=$container.attr('data-categories');
if($container.siblings('.load-more-posts').length){
$container.addClass('masonry-holder');
$j('.load-more-posts').on('click', function (e){
e.preventDefault();
if(!$j(this).hasClass('inactive')){
$j('.load-more-posts > .load-more-text ').hide(0);
$j('.load-more-posts > .hb-spin').toggleClass('non-visible');
load_article(pagination_count, $j(this).data('postid'), $j(this).data('template'), $j(this).data('query-vars'));
pagination_count++;
}});
}
var load_article=function (paged, post_id, template, query_vars){
var data={
action: 'highend_pagination_ajax',
_ajax_nonce: highend_vars.nonce,
paged: paged,
post_id: post_id,
template: template,
query_vars: query_vars,
};
$j.post(highend_vars.ajaxurl, data, function (response){
if('string'===typeof response&&''!==response.trim()){
$j('.load-more-posts > .load-more-text').html(highend_vars.texts['load-more']).show(0);
$j('.load-more-posts > .hb-spin').addClass('non-visible');
var $to_insert=$j(response);
$container.append($to_insert).isotope('appended', $to_insert);
$container.imagesLoaded(function (){
$container.isotope();
});
if($to_insert.find('.hb-flexslider').length){
$to_insert.find('.hb-flexslider').trigger('init');
}}else{
$j('.load-more-posts > .load-more-text').html(highend_vars.texts['no-more-posts']).show(0).parent().addClass('inactive');
$j('.load-more-posts > .hb-spin').addClass('non-visible');
}});
return false;
};}
function highendStickyHeader(){
if(document.body.classList.contains('hb-side-navigation')){
return;
}
var header=document.getElementById('header-inner');
var headerInner=document.getElementById('header-inner-bg');
if(null==header||null==headerInner){
return;
}
if(!header.classList.contains('sticky-nav')){
return;
}
if(header.classList.contains('nav-type-2')){
header=document.querySelector('.main-navigation-container');
headerInner=document.querySelector('.main-navigation');
}
var wpadminbar=document.getElementById('wpadminbar');
var stickyPosition=headerInner.getBoundingClientRect().top;
var tolerance;
if(null===wpadminbar){
tolerance=0;
}else if(window.outerWidth <=600){
tolerance=0;
}else{
tolerance=wpadminbar.getBoundingClientRect().height;
}
var stickyPlaceholder=null;
var sticky=stickyPosition - tolerance < 0;
var checkPosition=function (){
if(null===wpadminbar){
tolerance=0;
}else if(window.outerWidth <=600){
tolerance=0;
}else{
tolerance=wpadminbar.getBoundingClientRect().height;
}
stickyPosition=header.getBoundingClientRect().top;
sticky=stickyPosition - tolerance < 0;
maybeStickHeader();
};
var maybeStickHeader=function (){
if(sticky){
if(!document.body.classList.contains('highend-sticky-header')){
stickyPlaceholder=document.createElement('div');
stickyPlaceholder.setAttribute('id', 'highend-sticky-placeholder');
stickyPlaceholder.style.height=header.getBoundingClientRect().height + 'px';
header.appendChild(stickyPlaceholder);
document.body.classList.add('highend-sticky-header');
}}else{
if(document.body.classList.contains('highend-sticky-header')){
document.body.classList.remove('highend-sticky-header');
document.getElementById('highend-sticky-placeholder').remove();
}}
};
maybeStickHeader();
window.addEventListener('scroll', function (){
highendDebounce(checkPosition());
});
window.addEventListener('resize', function (){
highendDebounce(checkPosition());
});
}
function highendOnePageNav(){
if(null==main_wrapper||!main_wrapper.classList.contains('hb-one-page')){
return;
}
var header=document.getElementById('header-inner');
var bullets=document.getElementById('hb-one-page-bullets');
var getOffset=()=> {
var offset=0;
if(header&&header.classList.contains('sticky-nav')){
offset=parseInt(highend_vars.sticky_header_height);
}
if(document.getElementById('wpadminbar')){
offset +=document.getElementById('wpadminbar').clientHeight;
}
return offset;
};
var offset=getOffset();
document.querySelectorAll('.hb-one-page-section').forEach((item)=> {
var li=document.createElement('li');
li.classList.add('hb-animate-element', 'top-to-bottom');
li.setAttribute('rel', 'tooltip');
li.setAttribute('data-placement', 'right');
if(item.getAttribute('data-title')){
li.setAttribute('title', item.getAttribute('data-title'));
}
var anch=document.createElement('a');
anch.setAttribute('href', '#' + item.getAttribute('id'));
var i=document.createElement('i');
i.classList.add('hb-moon-radio-unchecked');
anch.appendChild(i);
li.appendChild(anch);
bullets.append(li);
});
bullets.style.marginTop=-(bullets.clientHeight / 2) + 'px';
document.querySelectorAll('#main-nav li a, #hb-side-menu li a, #hb-one-page-bullets li a').forEach((item)=> {
var section_id=item.getAttribute('href');
if(section_id.length <=1||'#'!==section_id[0]){
return;
}
var section=document.querySelector(section_id);
if(section){
item.addEventListener('click', (e)=> {
e.preventDefault();
window.scroll({
top: section.getBoundingClientRect().top + window.scrollY - offset,
behavior: 'smooth',
});
});
}});
};
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{playlist:t,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,mute:1,wmode:"transparent"},events:{onReady:function(e){e.target.mute().setLoop(!0)}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t,i,o,n,a=e.innerWidth(),r=e.innerHeight();a/r<16/9?(t=r*(16/9),i=r,o=-Math.round((t-a)/2)+"px",n=-Math.round((i-r)/2)+"px"):(i=(t=a)*(9/16),n=-Math.round((i-r)/2)+"px",o=-Math.round((t-a)/2)+"px"),t+="px",i+="px",e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:o,marginTop:n,width:t,height:i})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);
(function(e,t,r){"use strict";function n(r){if(o=t.documentElement,a=t.body,K(),it=this,r=r||{},ut=r.constants||{},r.easing)for(var n in r.easing)U[n]=r.easing[n];yt=r.edgeStrategy||"set",ct={beforerender:r.beforerender,render:r.render,keyframe:r.keyframe},ft=r.forceHeight!==!1,ft&&(Vt=r.scale||1),mt=r.mobileDeceleration||x,dt=r.smoothScrolling!==!1,gt=r.smoothScrollingDuration||E,vt={targetTop:it.getScrollTop()},Gt=(r.mobileCheck||function(){return/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||e.opera)})(),Gt?(st=t.getElementById("skrollr-body"),st&&at(),X(),Dt(o,[y,S],[T])):Dt(o,[y,b],[T]),it.refresh(),St(e,"resize orientationchange",function(){var e=o.clientWidth,t=o.clientHeight;(t!==$t||e!==Mt)&&($t=t,Mt=e,_t=!0)});var i=Y();return function l(){Z(),bt=i(l)}(),it}var o,a,i={get:function(){return it},init:function(e){return it||new n(e)},VERSION:"0.6.26"},l=Object.prototype.hasOwnProperty,s=e.Math,c=e.getComputedStyle,f="touchstart",u="touchmove",m="touchcancel",p="touchend",d="skrollable",g=d+"-before",v=d+"-between",h=d+"-after",y="skrollr",T="no-"+y,b=y+"-desktop",S=y+"-mobile",k="linear",w=1e3,x=.004,E=200,A="start",F="end",C="center",D="bottom",H="___skrollable_id",I=/^(?:input|textarea|button|select)$/i,P=/^\s+|\s+$/g,N=/^data(?:-(_\w+))?(?:-?(-?\d*\.?\d+p?))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/,O=/\s*(@?[\w\-\[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi,V=/^(@?[a-z\-]+)\[(\w+)\]$/,z=/-([a-z0-9_])/g,q=function(e,t){return t.toUpperCase()},L=/[\-+]?[\d]*\.?[\d]+/g,M=/\{\?\}/g,$=/rgba?\(\s*-?\d+\s*,\s*-?\d+\s*,\s*-?\d+/g,_=/[a-z\-]+-gradient/g,B="",G="",K=function(){var e=/^(?:O|Moz|webkit|ms)|(?:-(?:o|moz|webkit|ms)-)/;if(c){var t=c(a,null);for(var n in t)if(B=n.match(e)||+n==n&&t[n].match(e))break;if(!B)return B=G="",r;B=B[0],"-"===B.slice(0,1)?(G=B,B={"-webkit-":"webkit","-moz-":"Moz","-ms-":"ms","-o-":"O"}[B]):G="-"+B.toLowerCase()+"-"}},Y=function(){var t=e.requestAnimationFrame||e[B.toLowerCase()+"RequestAnimationFrame"],r=Pt();return(Gt||!t)&&(t=function(t){var n=Pt()-r,o=s.max(0,1e3/60-n);return e.setTimeout(function(){r=Pt(),t()},o)}),t},R=function(){var t=e.cancelAnimationFrame||e[B.toLowerCase()+"CancelAnimationFrame"];return(Gt||!t)&&(t=function(t){return e.clearTimeout(t)}),t},U={begin:function(){return 0},end:function(){return 1},linear:function(e){return e},quadratic:function(e){return e*e},cubic:function(e){return e*e*e},swing:function(e){return-s.cos(e*s.PI)/2+.5},sqrt:function(e){return s.sqrt(e)},outCubic:function(e){return s.pow(e-1,3)+1},bounce:function(e){var t;if(.5083>=e)t=3;else if(.8489>=e)t=9;else if(.96208>=e)t=27;else{if(!(.99981>=e))return 1;t=91}return 1-s.abs(3*s.cos(1.028*e*t)/t)}};n.prototype.refresh=function(e){var n,o,a=!1;for(e===r?(a=!0,lt=[],Bt=0,e=t.getElementsByTagName("*")):e.length===r&&(e=[e]),n=0,o=e.length;o>n;n++){var i=e[n],l=i,s=[],c=dt,f=yt,u=!1;if(a&&H in i&&delete i[H],i.attributes){for(var m=0,p=i.attributes.length;p>m;m++){var g=i.attributes[m];if("data-anchor-target"!==g.name)if("data-smooth-scrolling"!==g.name)if("data-edge-strategy"!==g.name)if("data-emit-events"!==g.name){var v=g.name.match(N);if(null!==v){var h={props:g.value,element:i,eventType:g.name.replace(z,q)};s.push(h);var y=v[1];y&&(h.constant=y.substr(1));var T=v[2];/p$/.test(T)?(h.isPercentage=!0,h.offset=(0|T.slice(0,-1))/100):h.offset=0|T;var b=v[3],S=v[4]||b;b&&b!==A&&b!==F?(h.mode="relative",h.anchors=[b,S]):(h.mode="absolute",b===F?h.isEnd=!0:h.isPercentage||(h.offset=h.offset*Vt))}}else u=!0;else f=g.value;else c="off"!==g.value;else if(l=t.querySelector(g.value),null===l)throw'Unable to find anchor target "'+g.value+'"'}if(s.length){var k,w,x;!a&&H in i?(x=i[H],k=lt[x].styleAttr,w=lt[x].classAttr):(x=i[H]=Bt++,k=i.style.cssText,w=Ct(i)),lt[x]={element:i,styleAttr:k,classAttr:w,anchorTarget:l,keyFrames:s,smoothScrolling:c,edgeStrategy:f,emitEvents:u,lastFrameIndex:-1},Dt(i,[d],[])}}}for(Et(),n=0,o=e.length;o>n;n++){var E=lt[e[n][H]];E!==r&&(J(E),et(E))}return it},n.prototype.relativeToAbsolute=function(e,t,r){var n=o.clientHeight,a=e.getBoundingClientRect(),i=a.top,l=a.bottom-a.top;return t===D?i-=n:t===C&&(i-=n/2),r===D?i+=l:r===C&&(i+=l/2),i+=it.getScrollTop(),0|i+.5},n.prototype.animateTo=function(e,t){t=t||{};var n=Pt(),o=it.getScrollTop();return pt={startTop:o,topDiff:e-o,targetTop:e,duration:t.duration||w,startTime:n,endTime:n+(t.duration||w),easing:U[t.easing||k],done:t.done},pt.topDiff||(pt.done&&pt.done.call(it,!1),pt=r),it},n.prototype.stopAnimateTo=function(){pt&&pt.done&&pt.done.call(it,!0),pt=r},n.prototype.isAnimatingTo=function(){return!!pt},n.prototype.isMobile=function(){return Gt},n.prototype.setScrollTop=function(t,r){return ht=r===!0,Gt?Kt=s.min(s.max(t,0),Ot):e.scrollTo(0,t),it},n.prototype.getScrollTop=function(){return Gt?Kt:e.pageYOffset||o.scrollTop||a.scrollTop||0},n.prototype.getMaxScrollTop=function(){return Ot},n.prototype.on=function(e,t){return ct[e]=t,it},n.prototype.off=function(e){return delete ct[e],it},n.prototype.destroy=function(){var e=R();e(bt),wt(),Dt(o,[T],[y,b,S]);for(var t=0,n=lt.length;n>t;t++)ot(lt[t].element);o.style.overflow=a.style.overflow="",o.style.height=a.style.height="",st&&i.setStyle(st,"transform","none"),it=r,st=r,ct=r,ft=r,Ot=0,Vt=1,ut=r,mt=r,zt="down",qt=-1,Mt=0,$t=0,_t=!1,pt=r,dt=r,gt=r,vt=r,ht=r,Bt=0,yt=r,Gt=!1,Kt=0,Tt=r};var X=function(){var n,i,l,c,d,g,v,h,y,T,b,S;St(o,[f,u,m,p].join(" "),function(e){var o=e.changedTouches[0];for(c=e.target;3===c.nodeType;)c=c.parentNode;switch(d=o.clientY,g=o.clientX,T=e.timeStamp,I.test(c.tagName)||e.preventDefault(),e.type){case f:n&&n.blur(),it.stopAnimateTo(),n=c,i=v=d,l=g,y=T;break;case u:I.test(c.tagName)&&t.activeElement!==c&&e.preventDefault(),h=d-v,S=T-b,it.setScrollTop(Kt-h,!0),v=d,b=T;break;default:case m:case p:var a=i-d,k=l-g,w=k*k+a*a;if(49>w){if(!I.test(n.tagName)){n.focus();var x=t.createEvent("MouseEvents");x.initMouseEvent("click",!0,!0,e.view,1,o.screenX,o.screenY,o.clientX,o.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),n.dispatchEvent(x)}return}n=r;var E=h/S;E=s.max(s.min(E,3),-3);var A=s.abs(E/mt),F=E*A+.5*mt*A*A,C=it.getScrollTop()-F,D=0;C>Ot?(D=(Ot-C)/F,C=Ot):0>C&&(D=-C/F,C=0),A*=1-D,it.animateTo(0|C+.5,{easing:"outCubic",duration:A})}}),e.scrollTo(0,0),o.style.overflow=a.style.overflow="hidden"},j=function(){var e,t,r,n,a,i,l,c,f,u,m,p=o.clientHeight,d=At();for(c=0,f=lt.length;f>c;c++)for(e=lt[c],t=e.element,r=e.anchorTarget,n=e.keyFrames,a=0,i=n.length;i>a;a++)l=n[a],u=l.offset,m=d[l.constant]||0,l.frame=u,l.isPercentage&&(u*=p,l.frame=u),"relative"===l.mode&&(ot(t),l.frame=it.relativeToAbsolute(r,l.anchors[0],l.anchors[1])-u,ot(t,!0)),l.frame+=m,ft&&!l.isEnd&&l.frame>Ot&&(Ot=l.frame);for(Ot=s.max(Ot,Ft()),c=0,f=lt.length;f>c;c++){for(e=lt[c],n=e.keyFrames,a=0,i=n.length;i>a;a++)l=n[a],m=d[l.constant]||0,l.isEnd&&(l.frame=Ot-l.offset+m);e.keyFrames.sort(Nt)}},W=function(e,t){for(var r=0,n=lt.length;n>r;r++){var o,a,s=lt[r],c=s.element,f=s.smoothScrolling?e:t,u=s.keyFrames,m=u.length,p=u[0],y=u[u.length-1],T=p.frame>f,b=f>y.frame,S=T?p:y,k=s.emitEvents,w=s.lastFrameIndex;if(T||b){if(T&&-1===s.edge||b&&1===s.edge)continue;switch(T?(Dt(c,[g],[h,v]),k&&w>-1&&(xt(c,p.eventType,zt),s.lastFrameIndex=-1)):(Dt(c,[h],[g,v]),k&&m>w&&(xt(c,y.eventType,zt),s.lastFrameIndex=m)),s.edge=T?-1:1,s.edgeStrategy){case"reset":ot(c);continue;case"ease":f=S.frame;break;default:case"set":var x=S.props;for(o in x)l.call(x,o)&&(a=nt(x[o].value),0===o.indexOf("@")?c.setAttribute(o.substr(1),a):i.setStyle(c,o,a));continue}}else 0!==s.edge&&(Dt(c,[d,v],[g,h]),s.edge=0);for(var E=0;m-1>E;E++)if(f>=u[E].frame&&u[E+1].frame>=f){var A=u[E],F=u[E+1];for(o in A.props)if(l.call(A.props,o)){var C=(f-A.frame)/(F.frame-A.frame);C=A.props[o].easing(C),a=rt(A.props[o].value,F.props[o].value,C),a=nt(a),0===o.indexOf("@")?c.setAttribute(o.substr(1),a):i.setStyle(c,o,a)}k&&w!==E&&("down"===zt?xt(c,A.eventType,zt):xt(c,F.eventType,zt),s.lastFrameIndex=E);break}}},Z=function(){_t&&(_t=!1,Et());var e,t,n=it.getScrollTop(),o=Pt();if(pt)o>=pt.endTime?(n=pt.targetTop,e=pt.done,pt=r):(t=pt.easing((o-pt.startTime)/pt.duration),n=0|pt.startTop+t*pt.topDiff),it.setScrollTop(n,!0);else if(!ht){var a=vt.targetTop-n;a&&(vt={startTop:qt,topDiff:n-qt,targetTop:n,startTime:Lt,endTime:Lt+gt}),vt.endTime>=o&&(t=U.sqrt((o-vt.startTime)/gt),n=0|vt.startTop+t*vt.topDiff)}if(Gt&&st&&i.setStyle(st,"transform","translate(0, "+-Kt+"px) "+Tt),ht||qt!==n){zt=n>qt?"down":qt>n?"up":zt,ht=!1;var l={curTop:n,lastTop:qt,maxTop:Ot,direction:zt},s=ct.beforerender&&ct.beforerender.call(it,l);s!==!1&&(W(n,it.getScrollTop()),qt=n,ct.render&&ct.render.call(it,l)),e&&e.call(it,!1)}Lt=o},J=function(e){for(var t=0,r=e.keyFrames.length;r>t;t++){for(var n,o,a,i,l=e.keyFrames[t],s={};null!==(i=O.exec(l.props));)a=i[1],o=i[2],n=a.match(V),null!==n?(a=n[1],n=n[2]):n=k,o=o.indexOf("!")?Q(o):[o.slice(1)],s[a]={value:o,easing:U[n]};l.props=s}},Q=function(e){var t=[];return $.lastIndex=0,e=e.replace($,function(e){return e.replace(L,function(e){return 100*(e/255)+"%"})}),G&&(_.lastIndex=0,e=e.replace(_,function(e){return G+e})),e=e.replace(L,function(e){return t.push(+e),"{?}"}),t.unshift(e),t},et=function(e){var t,r,n={};for(t=0,r=e.keyFrames.length;r>t;t++)tt(e.keyFrames[t],n);for(n={},t=e.keyFrames.length-1;t>=0;t--)tt(e.keyFrames[t],n)},tt=function(e,t){var r;for(r in t)l.call(e.props,r)||(e.props[r]=t[r]);for(r in e.props)t[r]=e.props[r]},rt=function(e,t,r){var n,o=e.length;if(o!==t.length)throw"Can't interpolate between \""+e[0]+'" and "'+t[0]+'"';var a=[e[0]];for(n=1;o>n;n++)a[n]=e[n]+(t[n]-e[n])*r;return a},nt=function(e){var t=1;return M.lastIndex=0,e[0].replace(M,function(){return e[t++]})},ot=function(e,t){e=[].concat(e);for(var r,n,o=0,a=e.length;a>o;o++)n=e[o],r=lt[n[H]],r&&(t?(n.style.cssText=r.dirtyStyleAttr,Dt(n,r.dirtyClassAttr)):(r.dirtyStyleAttr=n.style.cssText,r.dirtyClassAttr=Ct(n),n.style.cssText=r.styleAttr,Dt(n,r.classAttr)))},at=function(){Tt="translateZ(0)",i.setStyle(st,"transform",Tt);var e=c(st),t=e.getPropertyValue("transform"),r=e.getPropertyValue(G+"transform"),n=t&&"none"!==t||r&&"none"!==r;n||(Tt="")};i.setStyle=function(e,t,r){var n=e.style;if(t=t.replace(z,q).replace("-",""),"zIndex"===t)n[t]=isNaN(r)?r:""+(0|r);else if("float"===t)n.styleFloat=n.cssFloat=r;else try{B&&(n[B+t.slice(0,1).toUpperCase()+t.slice(1)]=r),n[t]=r}catch(o){}};var it,lt,st,ct,ft,ut,mt,pt,dt,gt,vt,ht,yt,Tt,bt,St=i.addEvent=function(t,r,n){var o=function(t){return t=t||e.event,t.target||(t.target=t.srcElement),t.preventDefault||(t.preventDefault=function(){t.returnValue=!1,t.defaultPrevented=!0}),n.call(this,t)};r=r.split(" ");for(var a,i=0,l=r.length;l>i;i++)a=r[i],t.addEventListener?t.addEventListener(a,n,!1):t.attachEvent("on"+a,o),Yt.push({element:t,name:a,listener:n})},kt=i.removeEvent=function(e,t,r){t=t.split(" ");for(var n=0,o=t.length;o>n;n++)e.removeEventListener?e.removeEventListener(t[n],r,!1):e.detachEvent("on"+t[n],r)},wt=function(){for(var e,t=0,r=Yt.length;r>t;t++)e=Yt[t],kt(e.element,e.name,e.listener);Yt=[]},xt=function(e,t,r){ct.keyframe&&ct.keyframe.call(it,e,t,r)},Et=function(){var e=it.getScrollTop();Ot=0,ft&&!Gt&&(a.style.height=""),j(),ft&&!Gt&&(a.style.height=Ot+o.clientHeight+"px"),Gt?it.setScrollTop(s.min(it.getScrollTop(),Ot)):it.setScrollTop(e,!0),ht=!0},At=function(){var e,t,r=o.clientHeight,n={};for(e in ut)t=ut[e],"function"==typeof t?t=t.call(it):/p$/.test(t)&&(t=t.slice(0,-1)/100*r),n[e]=t;return n},Ft=function(){var e=st&&st.offsetHeight||0,t=s.max(e,a.scrollHeight,a.offsetHeight,o.scrollHeight,o.offsetHeight,o.clientHeight);return t-o.clientHeight},Ct=function(t){var r="className";return e.SVGElement&&t instanceof e.SVGElement&&(t=t[r],r="baseVal"),t[r]},Dt=function(t,n,o){var a="className";if(e.SVGElement&&t instanceof e.SVGElement&&(t=t[a],a="baseVal"),o===r)return t[a]=n,r;for(var i=t[a],l=0,s=o.length;s>l;l++)i=It(i).replace(It(o[l])," ");i=Ht(i);for(var c=0,f=n.length;f>c;c++)-1===It(i).indexOf(It(n[c]))&&(i+=" "+n[c]);t[a]=Ht(i)},Ht=function(e){return e.replace(P,"")},It=function(e){return" "+e+" "},Pt=Date.now||function(){return+new Date},Nt=function(e,t){return e.frame-t.frame},Ot=0,Vt=1,zt="down",qt=-1,Lt=Pt(),Mt=0,$t=0,_t=!1,Bt=0,Gt=!1,Kt=0,Yt=[];"function"==typeof define&&define.amd?define("skrollr",function(){return i}):"undefined"!=typeof module&&module.exports?module.exports=i:e.skrollr=i})(window,document);
(()=>{var e=0,r={};function i(t){if(!t)throw new Error("No options passed to Waypoint constructor");if(!t.element)throw new Error("No element option passed to Waypoint constructor");if(!t.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=i.Adapter.extend({},i.defaults,t),this.element=this.options.element,this.adapter=new i.Adapter(this.element),this.callback=t.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=i.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=i.Context.findOrCreateByElement(this.options.context),i.offsetAliases[this.options.offset]&&(this.options.offset=i.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),r[this.key]=this,e+=1}i.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},i.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},i.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete r[this.key]},i.prototype.disable=function(){return this.enabled=!1,this},i.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},i.prototype.next=function(){return this.group.next(this)},i.prototype.previous=function(){return this.group.previous(this)},i.invokeAll=function(t){var e,i=[];for(e in r)i.push(r[e]);for(var o=0,n=i.length;o<n;o++)i[o][t]()},i.destroyAll=function(){i.invokeAll("destroy")},i.disableAll=function(){i.invokeAll("disable")},i.enableAll=function(){for(var t in i.Context.refreshAll(),r)r[t].enabled=!0;return this},i.refreshAll=function(){i.Context.refreshAll()},i.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},i.viewportWidth=function(){return document.documentElement.clientWidth},i.adapters=[],i.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},i.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.VcWaypoint=i})(),(()=>{function e(t){window.setTimeout(t,1e3/60)}var i=0,o={},u=window.VcWaypoint,t=window.onload;function n(t){this.element=t,this.Adapter=u.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,u.windowContext||(u.windowContext=!0,u.windowContext=new n(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}n.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},n.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".vcwaypoints"),delete o[this.key])},n.prototype.createThrottledResizeHandler=function(){var t=this;function e(){t.handleResize(),t.didResize=!1}this.adapter.on("resize.vcwaypoints",function(){t.didResize||(t.didResize=!0,u.requestAnimationFrame(e))})},n.prototype.createThrottledScrollHandler=function(){var t=this;function e(){t.handleScroll(),t.didScroll=!1}this.adapter.on("scroll.vcwaypoints",function(){t.didScroll&&!u.isTouch||(t.didScroll=!0,u.requestAnimationFrame(e))})},n.prototype.handleResize=function(){u.Context.refreshAll()},n.prototype.handleScroll=function(){var t,e,i={},o={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(t in o){var n,r=o[t],s=r.newScroll>r.oldScroll?r.forward:r.backward;for(n in this.waypoints[t]){var a,l,h=this.waypoints[t][n];null!==h.triggerPoint&&(a=r.oldScroll<h.triggerPoint,l=r.newScroll>=h.triggerPoint,a&&l||!a&&!l)&&(h.queueTrigger(s),i[h.group.id]=h.group)}}for(e in i)i[e].flushTriggers();this.oldScroll={x:o.horizontal.newScroll,y:o.vertical.newScroll}},n.prototype.innerHeight=function(){return this.element==this.element.window?u.viewportHeight():this.adapter.innerHeight()},n.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},n.prototype.innerWidth=function(){return this.element==this.element.window?u.viewportWidth():this.adapter.innerWidth()},n.prototype.destroy=function(){var t,e=[];for(t in this.waypoints)for(var i in this.waypoints[t])e.push(this.waypoints[t][i]);for(var o=0,n=e.length;o<n;o++)e[o].destroy()},n.prototype.refresh=function(){var t,e,i=this.element==this.element.window,o=i?void 0:this.adapter.offset(),n={};for(e in this.handleScroll(),t={horizontal:{contextOffset:i?0:o.left,contextScroll:i?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:i?0:o.top,contextScroll:i?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var r,s=t[e];for(r in this.waypoints[e]){var a,l=this.waypoints[e][r],h=l.options.offset,p=l.triggerPoint,c=0,d=null==p;l.element!==l.element.window&&(c=l.adapter.offset()[s.offsetProp]),"function"==typeof h?h=h.apply(l):"string"==typeof h&&(h=parseFloat(h),-1<l.options.offset.indexOf("%"))&&(h=Math.ceil(s.contextDimension*h/100)),a=s.contextScroll-s.contextOffset,l.triggerPoint=Math.floor(c+a-h),c=p<s.oldScroll,a=l.triggerPoint>=s.oldScroll,h=!c&&!a,!d&&(c&&a)?(l.queueTrigger(s.backward),n[l.group.id]=l.group):(!d&&h||d&&s.oldScroll>=l.triggerPoint)&&(l.queueTrigger(s.forward),n[l.group.id]=l.group)}}return u.requestAnimationFrame(function(){for(var t in n)n[t].flushTriggers()}),this},n.findOrCreateByElement=function(t){return n.findByElement(t)||new n(t)},n.refreshAll=function(){for(var t in o)o[t].refresh()},n.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){t&&t(),n.refreshAll()},u.requestAnimationFrame=function(t){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||e).call(window,t)},u.Context=n})(),(()=>{function r(t,e){return t.triggerPoint-e.triggerPoint}function s(t,e){return e.triggerPoint-t.triggerPoint}var e={vertical:{},horizontal:{}},i=window.VcWaypoint;function o(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),e[this.axis][this.name]=this}o.prototype.add=function(t){this.waypoints.push(t)},o.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},o.prototype.flushTriggers=function(){for(var t in this.triggerQueues){var e=this.triggerQueues[t];e.sort("up"===t||"left"===t?s:r);for(var i=0,o=e.length;i<o;i+=1){var n=e[i];!n.options.continuous&&i!==e.length-1||n.trigger([t])}}this.clearTriggerQueues()},o.prototype.next=function(t){this.waypoints.sort(r);t=i.Adapter.inArray(t,this.waypoints);return t===this.waypoints.length-1?null:this.waypoints[t+1]},o.prototype.previous=function(t){this.waypoints.sort(r);t=i.Adapter.inArray(t,this.waypoints);return t?this.waypoints[t-1]:null},o.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},o.prototype.remove=function(t){t=i.Adapter.inArray(t,this.waypoints);-1<t&&this.waypoints.splice(t,1)},o.prototype.first=function(){return this.waypoints[0]},o.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},o.findOrCreate=function(t){return e[t.axis][t.name]||new o(t)},i.Group=o})(),(()=>{var i=window.jQuery,t=window.VcWaypoint;function o(t){this.$element=i(t)}i.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,e){o.prototype[e]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,t)}}),i.each(["extend","inArray","isEmptyObject"],function(t,e){o[e]=i[e]}),t.adapters.push({name:"jquery",Adapter:o}),t.Adapter=o})(),(()=>{var n=window.VcWaypoint;function t(o){return function(){var e=[],i=arguments[0];return o.isFunction(arguments[0])&&((i=o.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var t=o.extend({},i,{element:this});"string"==typeof t.context&&(t.context=o(this).closest(t.context)[0]),e.push(new n(t))}),e}}window.jQuery&&(window.jQuery.fn.vcwaypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.vcwaypoint=t(window.Zepto))})();