!function(t){t.fn.checkbox=function(){t(this).each((function(){var e=t(this),a=e.attr("type");e.hide(),e.next("."+a+"-sign").remove();var n=t('<span class="'+a+'-sign" />').insertAfter(e);n.click((function(){n.closest("label").length||("radio"==e.attr("type")?e.prop("checked",!0).trigger("change").trigger("click"):e.prop("checked",!e.is(":checked")).trigger("change"))})),e.change((function(){t('input[name="'+e.attr("name")+'"]').each((function(){t(this).is(":checked")?t(this).next("."+t(this).attr("type")+"-sign").addClass("checked"):t(this).next("."+t(this).attr("type")+"-sign").removeClass("checked")}))})),e.is(":checked")?n.addClass("checked"):n.removeClass("checked")}))},t.fn.combobox=function(){t(this).each((function(){var e=t(this);e.insertBefore(e.parent(".combobox-wrapper")),e.next(".combobox-wrapper").remove(),e.css({opacity:0,position:"absolute",left:0,right:0,top:0,bottom:0});var a=t('<span class="combobox-wrapper" />').insertAfter(e),n=t('<span class="combobox-text" />').appendTo(a);t('<span class="combobox-button" />').appendTo(a);e.appendTo(a),e.change((function(){n.text(t("option:selected",e).text())})),n.text(t("option:selected",e).text()),e.comboWrap=a}))},t(":input").each((function(){const e=t(this);if(!e.attr("aria-label")){var a=e.attr("name");e.is("button")&&""===t.trim(e.text())&&!a&&(a=e.attr("type"),e.attr("aria-label",a)),a&&(e.closest("label").length&&""===t.trim(e.closest("label").text())&&!e.closest("label").attr("aria-label")?(e.closest("label").attr("aria-label",a),e.attr("aria-label",a)):e.attr("aria-label",a))}})),t("label").each((function(){const e=t(this);if(""===t.trim(e.text())){if(e.attr("aria-label"))return;let a=null;const n=e.attr("for");if(a=n?t("#"+n):e.find(":input").first(),a&&a.length>0){const t=a.attr("name");t&&e.attr("aria-label",t)}}}))}(jQuery);
(function (factory){
if(typeof define==="function"&&define.amd){
define(["jquery"], function ($){
return factory($)
})
}else if(typeof module==="object"&&typeof module.exports==="object"){
exports=factory(require("jquery"))
}else{
factory(jQuery)
}})(function ($){
$.easing.jswing=$.easing.swing;
var pow=Math.pow, sqrt=Math.sqrt, sin=Math.sin, cos=Math.cos, PI=Math.PI, c1=1.70158, c2=c1 * 1.525,
c3=c1 + 1, c4=2 * PI / 3, c5=2 * PI / 4.5;
function bounceOut(x){
var n1=7.5625, d1=2.75;
if(x < 1 / d1){
return n1 * x * x
}else if(x < 2 / d1){
return n1 * (x -=1.5 / d1) * x + .75
}else if(x < 2.5 / d1){
return n1 * (x -=2.25 / d1) * x + .9375
}else{
return n1 * (x -=2.625 / d1) * x + .984375
}}
$.extend($.easing, {
def: "easeOutQuad", swing: function (x){
return $.easing[$.easing.def](x)
}, easeInQuad: function (x){
return x * x
}, easeOutQuad: function (x){
return 1 - (1 - x) * (1 - x)
}, easeInOutQuad: function (x){
return x < .5 ? 2 * x * x:1 - pow(-2 * x + 2, 2) / 2
}, easeInCubic: function (x){
return x * x * x
}, easeOutCubic: function (x){
return 1 - pow(1 - x, 3)
}, easeInOutCubic: function (x){
return x < .5 ? 4 * x * x * x:1 - pow(-2 * x + 2, 3) / 2
}, easeInQuart: function (x){
return x * x * x * x
}, easeOutQuart: function (x){
return 1 - pow(1 - x, 4)
}, easeInOutQuart: function (x){
return x < .5 ? 8 * x * x * x * x:1 - pow(-2 * x + 2, 4) / 2
}, easeInQuint: function (x){
return x * x * x * x * x
}, easeOutQuint: function (x){
return 1 - pow(1 - x, 5)
}, easeInOutQuint: function (x){
return x < .5 ? 16 * x * x * x * x * x:1 - pow(-2 * x + 2, 5) / 2
}, easeInSine: function (x){
return 1 - cos(x * PI / 2)
}, easeOutSine: function (x){
return sin(x * PI / 2)
}, easeInOutSine: function (x){
return -(cos(PI * x) - 1) / 2
}, easeInExpo: function (x){
return x===0 ? 0:pow(2, 10 * x - 10)
}, easeOutExpo: function (x){
return x===1 ? 1:1 - pow(2, -10 * x)
}, easeInOutExpo: function (x){
return x===0 ? 0:x===1 ? 1:x < .5 ? pow(2, 20 * x - 10) / 2:(2 - pow(2, -20 * x + 10)) / 2
}, easeInCirc: function (x){
return 1 - sqrt(1 - pow(x, 2))
}, easeOutCirc: function (x){
return sqrt(1 - pow(x - 1, 2))
}, easeInOutCirc: function (x){
return x < .5 ? (1 - sqrt(1 - pow(2 * x, 2))) / 2:(sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2
}, easeInElastic: function (x){
return x===0 ? 0:x===1 ? 1:-pow(2, 10 * x - 10) * sin((x * 10 - 10.75) * c4)
}, easeOutElastic: function (x){
return x===0 ? 0:x===1 ? 1:pow(2, -10 * x) * sin((x * 10 - .75) * c4) + 1
}, easeInOutElastic: function (x){
return x===0 ? 0:x===1 ? 1:x < .5 ? -(pow(2, 20 * x - 10) * sin((20 * x - 11.125) * c5)) / 2:pow(2, -20 * x + 10) * sin((20 * x - 11.125) * c5) / 2 + 1
}, easeInBack: function (x){
return c3 * x * x * x - c1 * x * x
}, easeOutBack: function (x){
return 1 + c3 * pow(x - 1, 3) + c1 * pow(x - 1, 2)
}, easeInOutBack: function (x){
return x < .5 ? pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2:(pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2
}, easeInBounce: function (x){
return 1 - bounceOut(1 - x)
}, easeOutBounce: bounceOut, easeInOutBounce: function (x){
return x < .5 ? (1 - bounceOut(1 - 2 * x)) / 2:(1 + bounceOut(2 * x - 1)) / 2
}})
});
(function($){
$(window).resize(function(){
window.updateGemClientSize(false);
window.updateGemInnerSize();
});
$.headerBuilder=function(){
var $header=$('.site-header'),
$stickyElements=$('.header-sticky-row'),
$firstSticky='',
$window=$(window),
isSticked=false,
stickAfter=100,
cloneHTML='',
previousScroll;
$stickyElements.each(function(){
var $this=$(this);
if($this[0].offsetHeight > 10){
$firstSticky=$this;
return false;
}});
if(1||!$header.hasClass('header-with-sticky-template')){
var $adminBar=$('#wpadminbar');
var headerHeight=$header.find('.header-wrapper')[0].offsetHeight;
var adminBarHeight=$adminBar.length > 0 ? $adminBar[0].offsetHeight:0;
if(!$header.hasClass('header-with-sticky-template')){
if($firstSticky.length===0||$firstSticky[0].offsetHeight < 10){
return;
}
if(!$header.hasClass('header-transparent')){
$header.addClass('header-sticky-prepared').css({
paddingTop: headerHeight
});
}
stickAfter=$firstSticky.offset().top - adminBarHeight;
}else{
stickAfter=headerHeight + adminBarHeight;
}}
if($header.hasClass('header-with-sticky-template')){
$header=$header.next('.header-sticky-template');
}
$window.on('scroll', function(){
var after=stickAfter;
var currentScroll=$window.scrollTop();
var windowHeight=$window.height();
var documentHeight=$(document).height();
if(currentScroll > after){
stickHeader();
}else{
unstickHeader();
}
var startAfter=100;
if(($header.hasClass('header-hide-on-scroll-desktop')&&$window.width() > 991)||($header.hasClass('header-hide-on-scroll-mobile')&&$window.width() < 992)){
if(previousScroll - currentScroll > 0&&currentScroll > after){
$header.addClass('header-scroll-up');
$header.removeClass('header-scroll-down');
}else if(currentScroll - previousScroll > 0&&currentScroll + windowHeight!==documentHeight&&currentScroll > (after + startAfter)){
$header.addClass('header-scroll-down');
$header.removeClass('header-scroll-up');
}else if(currentScroll <=after){
$header.removeClass('header-scroll-down');
$header.removeClass('header-scroll-up');
}else if(currentScroll + windowHeight >=documentHeight - 5){
$header.addClass('header-scroll-up');
$header.removeClass('header-scroll-down');
}}
previousScroll=currentScroll;
});
function stickHeader(){
if(isSticked){
return;
}
if($header.hasClass('header-sticky-template')&&!(($header.hasClass('header-sticky-on-desktop')&&$window.width() > 991)||($header.hasClass('header-sticky-on-mobile')&&$window.width() < 992))){
return;
}
isSticked=true;
$header.addClass('header-sticked');
if($header.hasClass('header-light')){
$header.addClass('header-light-disabled');
$header.removeClass('header-light');
}
menuDropdownRecalc();
}
function unstickHeader(){
if(!isSticked){
return;
}
isSticked=false;
$header.removeClass('header-sticked');
if($header.hasClass('header-light-disabled')){
$header.addClass('header-light');
$header.removeClass('header-light-disabled');
}
menuDropdownRecalc();
}
function menuDropdownRecalc(){
if(!$header.hasClass('header-boxed')){
return;
}
$('.header-offsets-calculated .header-dropdown-menu').attr('style', '');
$('.header-offsets-calculated').removeClass('header-offsets-calculated');
}};
$(document).on('ready', function(){
$.headerBuilder();
});
})(jQuery);