if(!String.prototype.endsWith){
String.prototype.endsWith=function(search, this_len){
if(this_len===undefined||this_len > this.length){
this_len=this.length;
}
return this.substring(this_len - search.length, this_len)===search;
};}
if(window.NodeList&&!NodeList.prototype.forEach){
NodeList.prototype.forEach=Array.prototype.forEach;
}
if(!String.prototype.trim){
String.prototype.trim=function(){
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
};}
(function($, sr){
'use strict';
var debounce=function(func, threshold, execAsap){
var timeout;
return function debounced(){
var obj=this, args=arguments;
function delayed(){
if(!execAsap)
func.apply(obj, args);
timeout=null;
}
if(timeout&&timeout.val)
theme.deleteTimeout(timeout);
else if(execAsap)
func.apply(obj, args);
timeout=theme.requestTimeout(delayed, threshold||100);
};};
jQuery.fn[sr]=function(fn){ return fn ? this.on('resize', debounce(fn) ):this.trigger(sr); };})(jQuery, 'smartresize');
jQuery.extend(jQuery.easing, {
def: 'easeOutQuad',
swing: function(x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeOutQuad: function(x, t, b, c, d){
return -c *(t /=d) *(t - 2) + b;
},
easeInOutQuart: function(x, t, b, c, d){
if(( t /=d / 2) < 1) return c / 2 * t * t * t * t + b;
return -c / 2 *(( t -=2) * t * t * t - 2) + b;
},
easeOutQuint: function(x, t, b, c, d){
return c *(( t=t / d - 1) * t * t * t * t + 1) + b;
}});
(function($){
$.fn.visible=function(partial, hidden, direction, container){
if(this.length < 1)
return;
var $t=this.length > 1 ? this.eq(0):this,
isContained=typeof container!=='undefined'&&container!==null,
$w=isContained ? $(container):$(window),
wPosition=isContained ? $w.position():0,
t=$t.get(0),
vpWidth=$w.outerWidth(),
vpHeight=$w.outerHeight(),
direction=(direction) ? direction:'both',
clientSize=hidden===true ? t.offsetWidth * t.offsetHeight:true;
if(typeof t.getBoundingClientRect==='function'){
var rec=t.getBoundingClientRect(),
tViz=isContained ?
rec.top - wPosition.top >=0&&rec.top < vpHeight + wPosition.top :
rec.top >=0&&rec.top < vpHeight,
bViz=isContained ?
rec.bottom - wPosition.top > 0&&rec.bottom <=vpHeight + wPosition.top :
rec.bottom > 0&&rec.bottom <=vpHeight,
lViz=isContained ?
rec.left - wPosition.left >=0&&rec.left < vpWidth + wPosition.left :
rec.left >=0&&rec.left < vpWidth,
rViz=isContained ?
rec.right - wPosition.left > 0&&rec.right < vpWidth + wPosition.left :
rec.right > 0&&rec.right <=vpWidth,
vVisible=partial ? tViz||bViz:tViz&&bViz,
hVisible=partial ? lViz||rViz:lViz&&rViz;
if(direction==='both')
return clientSize&&vVisible&&hVisible;
else if(direction==='vertical')
return clientSize&&vVisible;
else if(direction==='horizontal')
return clientSize&&hVisible;
}else{
var viewTop=isContained ? 0:wPosition,
viewBottom=viewTop + vpHeight,
viewLeft=$w.scrollLeft(),
viewRight=viewLeft + vpWidth,
position=$t.position(),
_top=position.top,
_bottom=_top + $t.height(),
_left=position.left,
_right=_left + $t.width(),
compareTop=partial===true ? _bottom:_top,
compareBottom=partial===true ? _top:_bottom,
compareLeft=partial===true ? _right:_left,
compareRight=partial===true ? _left:_right;
if(direction==='both')
return !!clientSize&&(( compareBottom <=viewBottom)&&(compareTop >=viewTop) )&&(( compareRight <=viewRight)&&(compareLeft >=viewLeft) );
else if(direction==='vertical')
return !!clientSize&&(( compareBottom <=viewBottom)&&(compareTop >=viewTop) );
else if(direction==='horizontal')
return !!clientSize&&(( compareRight <=viewRight)&&(compareLeft >=viewLeft) );
}};})(jQuery);
window.theme||(window.theme={});
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
rtl: js_porto_vars.rtl=='1' ? true:false,
rtl_browser: $('html').hasClass('browser-rtl'),
ajax_url: js_porto_vars.ajax_url,
request_error: js_porto_vars.request_error,
change_logo: js_porto_vars.change_logo=='1' ? true:false,
show_sticky_header: js_porto_vars.show_sticky_header=='1' ? true:false,
show_sticky_header_tablet: js_porto_vars.show_sticky_header_tablet=='1' ? true:false,
show_sticky_header_mobile: js_porto_vars.show_sticky_header_mobile=='1' ? true:false,
category_ajax: js_porto_vars.category_ajax=='1' ? true:false,
prdctfltr_ajax: js_porto_vars.prdctfltr_ajax=='1' ? true:false,
container_width: parseInt(js_porto_vars.container_width),
grid_gutter_width: parseInt(js_porto_vars.grid_gutter_width),
screen_xl: parseInt(js_porto_vars.screen_xl),
screen_xxl: parseInt(js_porto_vars.screen_xxl),
slider_loop: js_porto_vars.slider_loop=='1' ? true:false,
slider_autoplay: js_porto_vars.slider_autoplay=='1' ? true:false,
slider_autoheight: js_porto_vars.slider_autoheight=='1' ? true:false,
slider_speed: js_porto_vars.slider_speed ? js_porto_vars.slider_speed:5000,
slider_nav: js_porto_vars.slider_nav=='1' ? true:false,
slider_nav_hover: js_porto_vars.slider_nav_hover=='1' ? true:false,
slider_margin: js_porto_vars.slider_margin=='1' ? 40:0,
slider_dots: js_porto_vars.slider_dots=='1' ? true:false,
slider_animatein: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein:'',
slider_animateout: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout:'',
product_thumbs_count: js_porto_vars.product_thumbs_count ? parseInt(js_porto_vars.product_thumbs_count, 10):4,
product_zoom: js_porto_vars.product_zoom=='1' ? true:false,
product_zoom_mobile: js_porto_vars.product_zoom_mobile=='1' ? true:false,
product_image_popup: js_porto_vars.product_image_popup=='1' ? 'fadeOut':false,
innerHeight: window.innerHeight,
animation_support: !$('html').hasClass('no-csstransitions'),
owlConfig: {
rtl: js_porto_vars.rtl=='1' ? true:false,
loop: js_porto_vars.slider_loop=='1' ? true:false,
autoplay: js_porto_vars.slider_autoplay=='1' ? true:false,
autoHeight: js_porto_vars.slider_autoheight=='1' ? true:false,
autoplayTimeout: js_porto_vars.slider_speed ? js_porto_vars.slider_speed:7000,
autoplayHoverPause: true,
lazyLoad: true,
nav: js_porto_vars.slider_nav=='1' ? true:false,
navText: ["", ""],
dots: js_porto_vars.slider_dots=='1' ? true:false,
stagePadding:(js_porto_vars.slider_nav_hover!='1'&&js_porto_vars.slider_margin=='1') ? 40:0,
animateOut: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout:'',
animateIn: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein:''
},
sticky_nav_height: 0,
is_device_mobile: /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent||navigator.vendor||window.opera)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(( navigator.userAgent||navigator.vendor||window.opera).substr(0, 4) ),
getScrollbarWidth: function(){
if(this.scrollbarSize===undefined){
this.scrollbarSize=window.innerWidth - document.documentElement.clientWidth;
}
return this.scrollbarSize;
},
isTablet: function(){
if(window.innerWidth < 992)
return true;
return false;
},
isMobile: function(){
if(window.innerWidth <=480)
return true;
return false;
},
isIOS: function (){
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
|| (navigator.userAgent.includes("Mac")&&"ontouchend" in document);
},
refreshVCContent: function($elements){
if($elements||$(document.body).hasClass('elementor-page') ){
$(window).trigger('resize');
}
theme.refreshStickySidebar(true);
if(typeof window.vc_js=='function')
window.vc_js();
$(document.body).trigger('porto_refresh_vc_content', [$elements]);
},
adminBarHeight: function(){
if(theme.adminBarHeightNum||0===theme.adminBarHeightNum){
return theme.adminBarHeightNum;
}
var obj=document.getElementById('wpadminbar'),
fixed_top=$('.porto-scroll-progress.fixed-top:not(.fixed-under-header)');
if(fixed_top.length&&'0px'==fixed_top.css('margin-top') ){
theme.adminBarHeightNum=fixed_top.height();
}else{
theme.adminBarHeightNum=0;
}
if(obj&&obj.offsetHeight&&window.innerWidth > 600){
theme.adminBarHeightNum +=obj.offsetHeight;
}
return theme.adminBarHeightNum;
},
refreshStickySidebar: function(timeout, $sticky_sidebar){
if(typeof $sticky_sidebar=='undefined'){
$sticky_sidebar=$('.sidebar [data-plugin-sticky]');
}
if($sticky_sidebar.get(0) ){
if(timeout){
theme.requestTimeout(function(){
$sticky_sidebar.trigger('recalc.pin');
}, 400);
}else{
$sticky_sidebar.trigger('recalc.pin');
}}
},
scrolltoContainer: function($container, timeout){
if($container.get(0) ){
if(window.innerWidth < 992){
$('.sidebar-overlay').trigger('click');
}
if(!timeout){
timeout=600;
}
$('html, body').stop().animate({
scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 18
}, timeout, 'easeOutQuad');
}},
requestFrame: function(fn){
var handler=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;
if(!handler){
return setTimeout(fn, 1000 / 60);
}
var rt=new Object()
rt.val=handler(fn);
return rt;
},
requestTimeout: function(fn, delay){
var handler=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;
if(!handler){
return setTimeout(fn, delay);
}
var start, rt=new Object();
function loop(timestamp){
if(!start){
start=timestamp;
}
var progress=timestamp - start;
progress >=delay ? fn.call():rt.val=handler(loop);
};
rt.val=handler(loop);
return rt;
},
deleteTimeout: function(timeoutID){
if(!timeoutID){
return;
}
var handler=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame;
if(!handler){
return clearTimeout(timeoutID);
}
if(timeoutID.val){
return handler(timeoutID.val);
}},
execPluginFunction: function(functionName, context){
var args=Array.prototype.slice.call(arguments, 2);
var namespaces=functionName.split(".");
var func=namespaces.pop();
for(var i=0; i < namespaces.length; i++){
context=context[namespaces[i]];
}
return context[func].apply(context, args);
},
getOptions: function(opts){
if(typeof(opts)=='object'){
return opts;
}else if(typeof(opts)=='string'){
try {
return JSON.parse(opts.replace(/'/g, '"').replace(';', '') );
} catch(e){
return {};}}else{
return {};}},
mergeOptions: function(obj1, obj2){
var obj3={};
for(var attrname in obj1){ obj3[attrname]=obj1[attrname]; }
for(var attrname in obj2){ obj3[attrname]=obj2[attrname]; }
return obj3;
},
intObs: function(selector, functionName, accY){
var $el;
if(typeof selector=='string'){
$el=document.querySelectorAll(selector);
}else{
$el=selector;
}
var intersectionObserverOptions={
rootMargin: '200px'
}
if(typeof accY!='undefined'){
intersectionObserverOptions.rootMargin='0px 0px ' + Number(accY) + 'px 0px';
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
var $this=$(entry.target),
opts;
if(typeof functionName=='string'){
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
theme.execPluginFunction(functionName, $this, opts);
}else{
var callback=functionName;
callback.call($this);
}
observer.unobserve(entry.target);
}}
}, intersectionObserverOptions);
Array.prototype.forEach.call($el, function(obj){
observer.observe(obj);
});
},
dynIntObsInit: function(selector, functionName, pluginDefaults){
var $el;
if(typeof selector=='string'){
$el=document.querySelectorAll(selector);
}else{
$el=selector;
}
Array.prototype.forEach.call($el, function(obj){
var $this=$(obj),
opts;
if($this.data('observer-init') ){
return;
}
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
var mergedPluginDefaults=theme.mergeOptions(pluginDefaults, opts)
var intersectionObserverOptions={
rootMargin: '0px 0px 200px 0px',
thresholds: 0
}
if(mergedPluginDefaults.accY){
intersectionObserverOptions.rootMargin='0px 0px ' + Number(mergedPluginDefaults.accY) + 'px 0px';
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
theme.execPluginFunction(functionName, $this, mergedPluginDefaults);
observer.unobserve(entry.target);
}}
}, intersectionObserverOptions);
observer.observe(obj);
$this.data('observer-init', true);
});
}});
if(theme.isIOS()){
document.body.classList.add('ios');
}
$.extend(theme, {
add_query_arg: function(key, value){
key=escape(key); value=escape(value);
var s=document.location.search;
var kvp=key + "=" + value;
var r=new RegExp("(&|\\?)" + key + "=[^\&]*");
s=s.replace(r, "$1" + kvp);
if(!RegExp.$1){ s +=(s.length > 0 ? '&':'?') + kvp; };
return s;
},
addUrlParam: function (href, name, value){
var url=document.createElement('a'), s, r;
href=decodeURIComponent(decodeURI(href));
url.href=href;
s=url.search;
if(0 <=s.indexOf(name + '=')){
r=s.replace(new RegExp(name + '=[^&]*'), name + '=' + value);
}else{
r=(s.length&&0 <=s.indexOf('?')) ? s:'?';
r.endsWith('?')||(r +='&');
r +=name + '=' + value;
}
return encodeURI(href.replace(s, '') + r.replace(/&+/, '&'));
},
removeUrlParam: function (href, name){
var url=document.createElement('a'), s, r;
href=decodeURIComponent(decodeURI(href));
url.href=href;
s=url.search;
if(0 <=s.indexOf(name + '=')){
r=s.replace(new RegExp(name + '=[^&]*'), '').replace(/&+/, '&').replace('?&', '?');
r.endsWith('&')&&(r=r.substr(0, r.length - 1));
r.endsWith('?')&&(r=r.substr(0, r.length - 1));
r=r.replace('&&', '&');
}else{
r=s;
}
return encodeURI(href.replace(s, '') + r);
}});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var disableMobileAnimations=function (){
if($(document.body).hasClass('porto-dm-animate')&&window.innerWidth < 768){
theme.animation_support=false;
$('[data-appear-animation]').removeAttr('data-appear-animation');
$('.elementor-invisible').removeAttr('data-settings').removeData('settings').removeClass('elementor-invisible')
.add($('.appear-animation').removeClass('appear-animation') );
}}
$.extend(theme, {
disableMobileAnimations: disableMobileAnimations
});
theme.disableMobileAnimations();
}).apply(this, [window.theme, jQuery]);
!function(){ "use strict"; if("object"==typeof window) if("IntersectionObserver" in window&&"IntersectionObserverEntry" in window&&"intersectionRatio" in window.IntersectionObserverEntry.prototype) "isIntersecting" in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype, "isIntersecting", { get: function(){ return this.intersectionRatio > 0 }}); else { var t=function(t){ for(var e=window.document, o=i(e); o;)o=i(e=o.ownerDocument); return e }(), e=[], o=null, n=null; s.prototype.THROTTLE_TIMEOUT=100, s.prototype.POLL_INTERVAL=null, s.prototype.USE_MUTATION_OBSERVER = !0, s._setupCrossOriginUpdater=function(){ return o||(o=function(t, o){ n=t&&o ? l(t, o):{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }, e.forEach(function(t){ t._checkForIntersections() }) }), o }, s._resetCrossOriginUpdater=function(){ o=null, n=null }, s.prototype.observe=function(t){ if(!this._observationTargets.some(function(e){ return e.element==t }) ){ if(!t||1!=t.nodeType) throw new Error("target must be an Element"); this._registerInstance(), this._observationTargets.push({ element: t, entry: null }), this._monitorIntersections(t.ownerDocument), this._checkForIntersections() }}, s.prototype.unobserve=function(t){ this._observationTargets=this._observationTargets.filter(function(e){ return e.element!=t }), this._unmonitorIntersections(t.ownerDocument), 0==this._observationTargets.length&&this._unregisterInstance() }, s.prototype.disconnect=function(){ this._observationTargets=[], this._unmonitorAllIntersections(), this._unregisterInstance() }, s.prototype.takeRecords=function(){ var t=this._queuedEntries.slice(); return this._queuedEntries=[], t }, s.prototype._initThresholds=function(t){ var e=t||[0]; return Array.isArray(e)||(e=[e]), e.sort().filter(function(t, e, o){ if("number"!=typeof t||isNaN(t)||t < 0||t > 1) throw new Error("threshold must be a number between 0 and 1 inclusively"); return t!==o[e - 1] }) }, s.prototype._parseRootMargin=function(t){ var e=(t||"0px").split(/\s+/).map(function(t){ var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t); if(!e) throw new Error("rootMargin must be specified in pixels or percent"); return { value: parseFloat(e[1]), unit: e[2] }}); return e[1]=e[1]||e[0], e[2]=e[2]||e[0], e[3]=e[3]||e[1], e }, s.prototype._monitorIntersections=function(e){ var o=e.defaultView; if(o&&-1==this._monitoringDocuments.indexOf(e) ){ var n=this._checkForIntersections, r=null, s=null; this.POLL_INTERVAL ? r=o.setInterval(n, this.POLL_INTERVAL):(h(o, "resize", n, !0), h(e, "scroll", n, !0), this.USE_MUTATION_OBSERVER&&"MutationObserver" in o&&(s=new o.MutationObserver(n) ).observe(e, { attributes: !0, childList: !0, characterData: !0, subtree: !0 }) ), this._monitoringDocuments.push(e), this._monitoringUnsubscribes.push(function(){ var t=e.defaultView; t&&(r&&t.clearInterval(r), c(t, "resize", n, !0) ), c(e, "scroll", n, !0), s&&s.disconnect() }); var u=this.root&&(this.root.ownerDocument||this.root)||t; if(e!=u){ var a=i(e); a&&this._monitorIntersections(a.ownerDocument) }} }, s.prototype._unmonitorIntersections=function(e){ var o=this._monitoringDocuments.indexOf(e); if(-1!=o){ var n=this.root&&(this.root.ownerDocument||this.root)||t; if(!this._observationTargets.some(function(t){ var o=t.element.ownerDocument; if(o==e) return !0; for(; o&&o!=n;){ var r=i(o); if(( o=r&&r.ownerDocument)==e) return !0 } return !1 }) ){ var r=this._monitoringUnsubscribes[o]; if(this._monitoringDocuments.splice(o, 1), this._monitoringUnsubscribes.splice(o, 1), r(), e!=n){ var s=i(e); s&&this._unmonitorIntersections(s.ownerDocument) }} }}, s.prototype._unmonitorAllIntersections=function(){ var t=this._monitoringUnsubscribes.slice(0); this._monitoringDocuments.length=0, this._monitoringUnsubscribes.length=0; for(var e=0; e < t.length; e++)t[e]() }, s.prototype._checkForIntersections=function(){ if(this.root||!o||n){ var t=this._rootIsInDom(), e=t ? this._getRootRect():{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; this._observationTargets.forEach(function(n){ var i=n.element, s=u(i), h=this._rootContainsTarget(i), c=n.entry, a=t&&h && this._computeTargetAndRootIntersection(i, s, e), l=null; this._rootContainsTarget(i) ? o&&!this.root||(l=e):l={ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; var f=n.entry=new r( { time: window.performance&&performance.now&&performance.now(), target: i, boundingClientRect: s, rootBounds: l, intersectionRect: a }); c ? t&&h ? this._hasCrossedThreshold(c, f)&&this._queuedEntries.push(f):c&&c.isIntersecting&&this._queuedEntries.push(f):this._queuedEntries.push(f) }, this), this._queuedEntries.length&&this._callback(this.takeRecords(), this) }}, s.prototype._computeTargetAndRootIntersection=function(e, i, r){ if("none"!=window.getComputedStyle(e).display){ for(var s, h, c, a, f, d, g, m, v=i, _=p(e), b = !1; !b&&_;){ var w=null, y=1==_.nodeType ? window.getComputedStyle(_):{}; if("none"==y.display) return null; if(_==this.root||9==_.nodeType) if(b = !0, _==this.root||_==t) o&&!this.root ? !n||0==n.width&&0==n.height ?(_=null, w=null, v=null):w=n:w=r; else { var I=p(_), E=I&&u(I), T=I&&this._computeTargetAndRootIntersection(I, E, r); E&&T ?(_=I, w=l(E, T) ):(_=null, v=null) }else{ var R=_.ownerDocument; _!=R.body&&_!=R.documentElement&&"visible"!=y.overflow&&(w=u(_) ) } if(w&&(s=w, h=v, c=void 0, a=void 0, f=void 0, d=void 0, g=void 0, m=void 0, c=Math.max(s.top, h.top), a=Math.min(s.bottom, h.bottom), f=Math.max(s.left, h.left), d=Math.min(s.right, h.right), m=a - c, v=(g=d - f) >=0&&m >=0&&{ top: c, bottom: a, left: f, right: d, width: g, height: m }||null), !v) break; _=_&&p(_) } return v }}, s.prototype._getRootRect=function(){ var e; if(this.root&&!d(this.root) ) e=u(this.root); else { var o=d(this.root) ? this.root:t, n=o.documentElement, i=o.body; e={ top: 0, left: 0, right: n.clientWidth||i.clientWidth, width: n.clientWidth||i.clientWidth, bottom: n.clientHeight||i.clientHeight, height: n.clientHeight||i.clientHeight }} return this._expandRectByRootMargin(e) }, s.prototype._expandRectByRootMargin=function(t){ var e=this._rootMarginValues.map(function(e, o){ return "px"==e.unit ? e.value:e.value *(o % 2 ? t.width:t.height) / 100 }), o={ top: t.top - e[0], right: t.right + e[1], bottom: t.bottom + e[2], left: t.left - e[3] }; return o.width=o.right - o.left, o.height=o.bottom - o.top, o }, s.prototype._hasCrossedThreshold=function(t, e){ var o=t&&t.isIntersecting ? t.intersectionRatio||0:-1, n=e.isIntersecting ? e.intersectionRatio||0:-1; if(o!==n) for(var i=0; i < this.thresholds.length; i++){ var r=this.thresholds[i]; if(r==o||r==n||r < o!=r < n) return !0 }}, s.prototype._rootIsInDom=function(){ return !this.root||f(t, this.root) }, s.prototype._rootContainsTarget=function(e){ var o=this.root&&(this.root.ownerDocument||this.root)||t; return f(o, e)&&(!this.root||o==e.ownerDocument) }, s.prototype._registerInstance=function(){ e.indexOf(this) < 0&&e.push(this) }, s.prototype._unregisterInstance=function(){ var t=e.indexOf(this); -1!=t&&e.splice(t, 1) }, window.IntersectionObserver=s, window.IntersectionObserverEntry=r } function i(t){ try { return t.defaultView&&t.defaultView.frameElement||null } catch(t){ return null }} function r(t){ this.time=t.time, this.target=t.target, this.rootBounds=a(t.rootBounds), this.boundingClientRect=a(t.boundingClientRect), this.intersectionRect=a(t.intersectionRect||{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }), this.isIntersecting = !!t.intersectionRect; var e=this.boundingClientRect, o=e.width * e.height, n=this.intersectionRect, i=n.width * n.height; this.intersectionRatio=o ? Number(( i / o).toFixed(4) ):this.isIntersecting ? 1:0 } function s(t, e){ var o, n, i, r=e||{}; if("function"!=typeof t) throw new Error("callback must be a function"); if(r.root&&1!=r.root.nodeType&&9!=r.root.nodeType) throw new Error("root must be a Document or Element"); this._checkForIntersections=(o=this._checkForIntersections.bind(this), n=this.THROTTLE_TIMEOUT, i=null, function(){ i||(i=setTimeout(function(){ o(), i=null }, n) ) }), this._callback=t, this._observationTargets=[], this._queuedEntries=[], this._rootMarginValues=this._parseRootMargin(r.rootMargin), this.thresholds=this._initThresholds(r.threshold), this.root=r.root||null, this.rootMargin=this._rootMarginValues.map(function(t){ return t.value + t.unit }).join(" "), this._monitoringDocuments=[], this._monitoringUnsubscribes=[] } function h(t, e, o, n){ "function"==typeof t.addEventListener ? t.addEventListener(e, o, n||!1):"function"==typeof t.attachEvent&&t.attachEvent("on" + e, o) } function c(t, e, o, n){ "function"==typeof t.removeEventListener ? t.removeEventListener(e, o, n||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on" + e, o) } function u(t){ var e; try { e=t.getBoundingClientRect() } catch(t){ } return e ?(e.width&&e.height||(e={ top: e.top, right: e.right, bottom: e.bottom, left: e.left, width: e.right - e.left, height: e.bottom - e.top }), e):{ top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }} function a(t){ return !t||"x" in t ? t:{ top: t.top, y: t.top, bottom: t.bottom, left: t.left, x: t.left, right: t.right, width: t.width, height: t.height }} function l(t, e){ var o=e.top - t.top, n=e.left - t.left; return { top: o, left: n, height: e.height, width: e.width, bottom: o + e.height, right: n + e.width }} function f(t, e){ for(var o=e; o;){ if(o==t) return !0; o=p(o) } return !1 } function p(e){ var o=e.parentNode; return 9==e.nodeType&&e!=t ? i(e):(o&&o.assignedSlot&&(o=o.assignedSlot.parentNode), o&&11==o.nodeType&&o.host ? o.host:o) } function d(t){ return t&&9===t.nodeType }}();
(function($){
'use strict';
$.extend({
browserSelector: function(){
var hasTouch='ontouchstart' in window||navigator.msMaxTouchPoints;
var u=navigator.userAgent,
ua=u.toLowerCase(),
is=function(t){
return ua.indexOf(t) > -1;
},
g='gecko',
w='webkit',
s='safari',
o='opera',
h=document.documentElement,
b=[(!(/opera|webtv/i.test(ua) )&&/msie\s(\d)/.test(ua) ) ?('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1]) ):is('firefox/2') ? g + ' ff2':is('firefox/3.5') ? g + ' ff3 ff3_5':is('firefox/3') ? g + ' ff3':is('gecko/') ? g:is('opera') ? o +(/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1:(/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2:'') ):is('konqueror') ? 'konqueror':is('chrome') ? w + ' chrome':is('iron') ? w + ' iron':is('applewebkit/') ? w + ' ' + s +(/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1:''):is('mozilla/') ? g:'', is('j2me') ? 'mobile':is('iphone') ? 'iphone':is('ipod') ? 'ipod':is('mac') ? 'mac':is('darwin') ? 'mac':is('webtv') ? 'webtv':is('win') ? 'win':is('freebsd') ? 'freebsd':(is('x11')||is('linux') ) ? 'linux':'', 'js'];
var c=b.join(' ');
if(theme.is_device_mobile){
c +=' mobile';
}
if(hasTouch){
c +=' touch';
}
h.className +=' ' + c;
var isIE11 = !(window.ActiveXObject)&&"ActiveXObject" in window;
if(isIE11){
$('html').removeClass('gecko').addClass('ie ie11');
return;
}}
});
$.browserSelector();
})(jQuery);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__accordion';
var Accordion=function($el, opts){
return this.initialize($el, opts);
};
Accordion.defaults={
};
Accordion.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Accordion.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var polyfillCollapse=function(selector){
$(selector).each(function(){
let $this=$(this);
$this.addClass('show');
$this.prev().find('.accordion-toggle').removeClass('collapsed').attr('aria-expanded', true);
});
}
var $el=this.options.wrapper,
$collapse=$el.find('.collapse'),
collapsible=$el.data('collapsible'),
active_num=$el.data('active-tab');
if($collapse.length > 0){
if($el.data('use-accordion')&&'yes'==$el.data('use-accordion') ){
$el.find('.collapse').attr('data-bs-parent', '#' + $el.attr('id') );
}
if(collapsible=='yes'){
if($.fn.collapse){
$collapse.collapse({ toggle: false, parent: '#' + $el.attr('id') });
}}else if(!isNaN(active_num)&&active_num==parseInt(active_num)&&$el.find('.collapse').length >=active_num){
if(!$.fn.collapse){
polyfillCollapse($el.find('.collapse').eq(active_num - 1) );
}else{
$el.find('.collapse').collapse({ toggle: false, parent: '#' + $el.attr('id') });
$el.find('.collapse').eq(active_num - 1).collapse('toggle');
}}else{
if(!$.fn.collapse){
polyfillCollapse($el.find('.collapse') );
}else{
$el.find('.collapse').collapse({ parent: '#' + $el.attr('id') });
}}
}
return this;
}};
$.extend(theme, {
Accordion: Accordion
});
$.fn.themeAccordion=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Accordion($this, opts);
}});
};}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__accordionMenu';
var AccordionMenu=function($el, opts){
return this.initialize($el, opts);
};
AccordionMenu.defaults={
};
AccordionMenu.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, AccordionMenu.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var self=this,
$el=this.options.wrapper;
$el.find('li.menu-item.active').each(function(){
var $this=$(this);
if($this.find('> .arrow').get(0) )
$this.find('> .arrow').trigger('click');
});
$el.on('click', '.arrow', function(e){
e.preventDefault();
e.stopPropagation();
var $this=$(this),
$parent=$this.closest('li');
if(typeof self.options.open_one!='undefined'){
$parent.siblings('.open').children('.arrow').next().hide();
$parent.siblings('.open').removeClass('open');
$this.next().stop().toggle();
}else{
$this.next().stop().slideToggle();
}
if($parent.hasClass('open') ){
$parent.removeClass('open');
}else{
$parent.addClass('open');
}
if($this.closest('.header-side-nav .sidebar-menu').length){
$('.header-side-nav [data-plugin-sticky]').trigger('recalc.pin');
}
return false;
});
$el.find('.menu-item-has-children').each(function (){
var $this=$(this);
if($this.find('>.sub-menu > li:not(.hidden-item)').length==0){
$this.addClass('hidden-item');
}});
return this;
}};
$.extend(theme, {
AccordionMenu: AccordionMenu
});
$.fn.themeAccordionMenu=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.AccordionMenu($this, opts);
}});
};}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__flickrZoom';
var FlickrZoom=function($el, opts){
return this.initialize($el, opts);
};
FlickrZoom.defaults={
};
FlickrZoom.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, FlickrZoom.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var $el=this.options.wrapper,
links=[],
i=0,
$flickr_links=$el.find('.flickr_badge_image > a');
$flickr_links.each(function(){
var slide={},
$image=$(this).find('> img');
slide.src=$image.attr('src').replace('_s.', '_b.');
slide.title=$image.attr('title');
links[i]=slide;
i++;
});
$flickr_links.on('click', function(e){
e.preventDefault();
if($.fn.magnificPopup){
$.magnificPopup.close();
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), $flickr_links.index($(this) ));
}});
return this;
}};
$.extend(theme, {
FlickrZoom: FlickrZoom
});
$.fn.themeFlickrZoom=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.FlickrZoom($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__lazyload';
var PluginLazyLoad=function($el, opts){
return this.initialize($el, opts);
};
PluginLazyLoad.defaults={
effect: 'show',
appearEffect: '',
appear: function(elements_left, settings){
},
load: function(elements_left, settings){
$(this).addClass('lazy-load-loaded');
}};
PluginLazyLoad.prototype={
initialize: function($el, opts){
if(!$el.length){
return this;
}
if(!$.fn.lazyload){
return this;
}
var options=$.extend(true, {}, PluginLazyLoad.defaults, opts, {});
return lazyload($el, options);
}};
$.extend(theme, {
PluginLazyLoad: PluginLazyLoad
});
$.fn.themePluginLazyLoad=function(opts){
var $this=$(this);
if($this.data(instanceName) ){
return this;
}else{
var ins=new PluginLazyLoad($.makeArray(this), opts);
$this.data(instanceName, ins);
}
return this;
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__masonry';
var Masonry=function($el, opts){
return this.initialize($el, opts);
};
Masonry.defaults={
itemSelector: 'li',
isOriginLeft: !theme.rtl
};
Masonry.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Masonry.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
if(!$.fn.isotope){
return this;
}
var self=this,
$el=this.options.wrapper,
trigger_timer=null;
$el.isotope(this.options);
$el.isotope('on', 'layoutComplete', function(){
if(typeof this.options.callback=='function'){
this.options.callback.call();
}
if($el.find('.porto-lazyload:not(.lazy-load-loaded):visible').length){
$(window).trigger('scroll');
}});
$el.isotope('layout');
self.resize();
$(window).smartresize(function(){
self.resize()
});
return this;
},
resize: function(){
var self=this,
$el=this.options.wrapper;
if(self.resizeTimer){
theme.deleteTimeout(self.resizeTimer);
}
self.resizeTimer=theme.requestTimeout(function(){
if($el.data('isotope') ){
$el.isotope('layout');
}
delete self.resizeTimer;
}, 600);
}};
$.extend(theme, {
Masonry: Masonry
});
$.fn.themeMasonry=function(opts){
return this.map(function(){
var $this=$(this);
imagesLoaded(this, function(){
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Masonry($this, opts);
}});
});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__toggle';
var Toggle=function($el, opts){
return this.initialize($el, opts);
};
Toggle.defaults={
};
Toggle.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Toggle.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var $el=this.options.wrapper;
if($el.hasClass('active') )
$el.find("> div.toggle-content").stop().slideDown(350, function(){
$(this).attr('style', '').show();
});
$el.on('click', "> label", function(e){
var parentSection=$(this).parent(),
parentWrapper=$(this).closest("div.toogle"),
parentToggles=$(this).closest(".porto-toggles"),
isAccordion=parentWrapper.hasClass("toogle-accordion"),
toggleContent=parentSection.find("> div.toggle-content");
if(isAccordion&&typeof(e.originalEvent)!="undefined"){
parentWrapper.find("section.toggle.active > label").trigger("click");
}
if(!parentSection.hasClass("active") ){
if(parentToggles.length){
if(parentToggles.data('view')=='one-toggle'){
parentToggles.find('.toggle').each(function(){
$(this).removeClass('active');
$(this).find("> div.toggle-content").stop().slideUp(350, function(){
$(this).attr('style', '').hide();
});
});
}}
toggleContent.stop().slideDown(350, function(){
$(this).attr('style', '').show();
theme.refreshVCContent(toggleContent);
});
parentSection.addClass("active");
}else{
if(!parentToggles.length||parentToggles.data('view')!='one-toggle'){
toggleContent.stop().slideUp(350, function(){
$(this).attr('style', '').hide();
});
parentSection.removeClass("active");
}}
});
return this;
}};
$.extend(theme, {
Toggle: Toggle
});
$.fn.themeToggle=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Toggle($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
$.fn.themePin=function(options){
var scrollY=0, lastScrollY=0, elements=[], disabled=false, $window=$(window), fixedSideTop=[], fixedSideBottom=[], prevDataTo=[];
options=options||{};
var recalculateLimits=function(){
for(var i=0, len=elements.length; i < len; i++){
var $this=elements[i];
if(options.minWidth&&window.innerWidth < options.minWidth){
if($this.parent().hasClass("pin-wrapper") ){
if(options.hasWrap){
$this.parent().css('height', '');
}else{
$this.unwrap();
}}
$this.css({ width: "", left: "", top: "", position: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
disabled=true;
continue;
}else{
disabled=false;
}
var $container=options.containerSelector ?($this.closest(options.containerSelector).length ? $this.closest(options.containerSelector):$(options.containerSelector) ):$(document.body),
offset=$this.offset();
if(options.hasWrap&&$container.height() < $this.closest('.pin-wrapper').outerHeight()){
$container=$this.closest('.pin-wrapper');
}
var	containerOffset=$container.offset();
if(typeof containerOffset=='undefined'){
continue;
}
var parentOffset=$this.parent().offset();
if(!$this.parent().hasClass("pin-wrapper") ){
$this.wrap("<div class='pin-wrapper'>");
if($this.hasClass('elementor-element-populated') ){
var $el_cont=$this.closest('.elementor-container');
if($el_cont.length){
var matches=$el_cont.attr('class').match(/elementor-column-gap-([a-z]*)/g);
if(matches&&matches.length){
var gap=matches[0].replace('elementor-column-gap-', '');
$this.addClass('porto-gap-' + gap);
}}
}}
var pad=$.extend({
top: 0,
bottom: 0
}, options.padding||{});
var $pin=$this.parent(),
pt=parseInt($pin.parent().css('padding-top') ), pb=parseInt($pin.parent().css('padding-bottom') );
if(options.autoInit){
if($('#header').hasClass('header-side') ){
pad.top=theme.adminBarHeight();
}else{
pad.top=theme.adminBarHeight();
if($('#header > .main-menu-wrap').length||!$('#header').hasClass('sticky-menu-header') ){
pad.top +=(theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height:0);
}}
if(typeof options.paddingOffsetTop!='undefined'){
pad.top +=parseInt(options.paddingOffsetTop, 10);
}else{
pad.top +=18;
}
if(typeof options.paddingOffsetBottom!='undefined'){
pad.bottom=parseInt(options.paddingOffsetBottom, 10);
}else{
pad.bottom=0;
}}
var bb=$this.css('border-bottom'), h=$this.outerHeight();
$this.css('border-bottom', '1px solid transparent');
var o_h=$this.outerHeight() - h - 1;
$this.css('border-bottom', bb);
$this.css({ width: $this.outerWidth() <=$pin.width() ? $this.outerWidth():$pin.width() });
$pin.css("height", $this.outerHeight() + o_h);
if(( !options.autoFit&&!options.fitToBottom)||$this.outerHeight() <=$window.height()){
$this.data("themePin", {
pad: pad,
from:(options.containerSelector ? containerOffset.top:offset.top) - pad.top + pt,
pb: pb,
parentTop: parentOffset.top - pt,
offset: o_h,
stickyOffset: options.stickyOffset ? options.stickyOffset:0
});
}else{
$this.data("themePin", {
pad: pad,
fromFitTop:(options.containerSelector ? containerOffset.top:offset.top) - pad.top + pt,
from:(options.containerSelector ? containerOffset.top:offset.top) + $this.outerHeight() - window.innerHeight + pt,
pb: pb,
parentTop: parentOffset.top - pt,
offset: o_h,
stickyOffset: options.stickyOffset ? options.stickyOffset:0
});
}}
};
var onScroll=function(){
if(disabled){ return; }
scrollY=$window.scrollTop();
var window_height=window.innerHeight||$window.height();
for(var i=0, len=elements.length; i < len; i++){
var $this=$(elements[i]),
data=$this.data("themePin"),
sidebarTop;
let contentWrap=$this.closest('.porto-products-filter-body');
let sidebarWrap=$this.closest('.sidebar');
if(contentWrap.length&&sidebarWrap.length){
if($.contains(contentWrap[0], sidebarWrap[0])&&!contentWrap.hasClass('opened') ){
continue;
}}
if(!data||typeof data.pad=='undefined'){
continue;
}
var $container=options.containerSelector ?($this.closest(options.containerSelector).length ? $this.closest(options.containerSelector):$(options.containerSelector) ):$(document.body),
isFitToTop=(!options.autoFit&&!options.fitToBottom)||($this.outerHeight() + data.pad.top) <=window_height;
if(options.hasWrap&&$container.height() < $this.closest('.pin-wrapper').outerHeight()){
$container=$this.closest('.pin-wrapper');
}
data.end=$container.offset().top + $container.height();
if(isFitToTop){
data.to=$container.offset().top + $container.height() - $this.outerHeight() - data.pad.bottom - data.pb;
}else{
data.to=$container.offset().top + $container.height() - window_height - data.pb;
data.to2=$container.height() - $this.outerHeight() - data.pad.bottom - data.pb;
}
if(prevDataTo[i]===0){
prevDataTo[i]=data.to;
}
if(isFitToTop){
var from=data.from - data.pad.bottom,
to=data.to - data.pad.top - data.offset,
$parent=$this.closest('.sticky-nav-wrapper'),
widgetTop;
if($parent.length){
widgetTop=$parent.offset().top - data.pad.top;
if(widgetTop > from){
from=widgetTop;
}}
if(typeof data.fromFitTop!='undefined'&&data.fromFitTop){
from=data.fromFitTop - data.pad.bottom;
}
if(from + $this.outerHeight() > data.end||from >=to){
$this.css({ position: "", top: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
continue;
}
if(scrollY > from + data.stickyOffset&&scrollY < to){
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
top: data.pad.top
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}else if(scrollY >=to){
$this.css({
left: "",
top: to - data.parentTop + data.pad.top
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }
if($this.hasClass('sticky-absolute') ) $this.addClass('sticky-transition');
$this.addClass('sticky-absolute');
}else{
$this.css({ position: "", top: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}}else if(options.fitToBottom){
var from=data.from,
to=data.to;
if(data.from + window_height > data.end||data.from >=to){
$this.css({ position: "", top: "", bottom: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
continue;
}
if(scrollY > from&&scrollY < to){
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
bottom: data.pad.bottom,
top: ""
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}else if(scrollY >=to){
$this.css({
left: "",
top: data.to2,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }
if($this.hasClass('sticky-absolute') ) $this.addClass('sticky-transition');
$this.addClass('sticky-absolute');
}else{
$this.css({ position: "", top: "", bottom: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }
$this.removeClass('sticky-transition');
$this.removeClass('sticky-absolute');
}}else{
var this_height=$this.outerHeight()
if(prevDataTo[i]!=data.to){
if(fixedSideBottom[i]&&this_height + $this.offset().top + data.pad.bottom < scrollY + window_height){
fixedSideBottom[i]=false;
}}
if(( this_height + data.pad.top + data.pad.bottom) > window_height||fixedSideTop[i]||fixedSideBottom[i]){
var padTop=parseInt($this.parent().parent().css('padding-top') );
if(scrollY + data.pad.top - padTop <=data.parentTop){
$this.css({ position: "", top: "", bottom: "", left: "" });
fixedSideTop[i]=fixedSideBottom[i]=false;
if(options.activeClass){ $this.removeClass(options.activeClass); }}else if(scrollY >=data.to){
$this.css({
left: "",
top: data.to2,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }}else{
if(scrollY >=lastScrollY){
if(fixedSideTop[i]){
fixedSideTop[i]=false;
sidebarTop=$this.offset().top - data.parentTop;
$this.css({
left: "",
top: sidebarTop,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }}else if(!fixedSideBottom[i]&&this_height + $this.offset().top + data.pad.bottom < scrollY + window_height){
fixedSideBottom[i]=true;
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
bottom: data.pad.bottom,
top: ""
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }}
}else if(scrollY < lastScrollY){
if(fixedSideBottom[i]){
fixedSideBottom[i]=false;
sidebarTop=$this.offset().top - data.parentTop;
$this.css({
left: "",
top: sidebarTop,
bottom: ""
}).css("position", "absolute");
if(options.activeClass){ $this.addClass(options.activeClass); }}else if(!fixedSideTop[i]&&$this.offset().top >=scrollY + data.pad.top){
fixedSideTop[i]=true;
!($this.css("position")=="fixed")&&$this.css({
left: $this.offset().left,
top: data.pad.top,
bottom: ''
}).css("position", "fixed");
if(options.activeClass){ $this.addClass(options.activeClass); }}else if(!fixedSideBottom[i]&&fixedSideTop[i]&&$this.css('position')=='absolute'&&$this.offset().top >=scrollY + data.pad.top){
fixedSideTop[i]=false;
}}
}}else{
if(scrollY >=(data.parentTop - data.pad.top) ){
$this.css({
position: 'fixed',
top: data.pad.top
});
}else{
$this.css({ position: "", top: "", bottom: "", left: "" });
if(options.activeClass){ $this.removeClass(options.activeClass); }}
fixedSideTop[i]=fixedSideBottom[i]=false;
}}
prevDataTo[i]=data.to;
}
lastScrollY=scrollY;
};
var update=function(){ recalculateLimits(); onScroll(); },
r_timer=null;
this.each(function(){
var $this=$(this),
data=$this.data('themePin')||{};
if(data&&data.update){ return; }
elements.push($this);
$("img", this).one("load", function(){
if(r_timer){
theme.deleteTimeout(r_timer);
}
r_timer=theme.requestFrame(recalculateLimits);
});
data.update=update;
$this.data('themePin', data);
fixedSideTop.push(false);
fixedSideBottom.push(false);
prevDataTo.push(0);
});
window.addEventListener('touchmove', onScroll, { passive: true });
window.addEventListener('scroll', onScroll, { passive: true });
recalculateLimits();
if(!theme.isLoaded){
$window.on('load', update);
}else{
update();
}
$(this).on('recalc.pin', function(){
recalculateLimits();
onScroll();
});
return this;
};
theme=theme||{};
var instanceName='__sticky';
var Sticky=function($el, opts){
return this.initialize($el, opts);
};
Sticky.defaults={
autoInit: false,
minWidth: 767,
activeClass: 'sticky-active',
padding: {
top: 0,
bottom: 0
},
offsetTop: 0,
offsetBottom: 0,
autoFit: false,
fitToBottom: false,
stickyOffset: 0
};
Sticky.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Sticky.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
if(!$.fn.themePin){
return this;
}
var self=this,
$el=this.options.wrapper,
stickyResizeTrigger;
if($el.hasClass('porto-sticky-nav') ){
this.options.padding.top=theme.StickyHeader.sticky_height + theme.adminBarHeight();
this.options.activeClass='sticky-active';
this.options.containerSelector='.main-content-wrap';
theme.sticky_nav_height=$el.outerHeight();
if(this.options.minWidth > window.innerWidth)
theme.sticky_nav_height=0;
var porto_progress_obj=$('.porto-scroll-progress.fixed-top:not(.fixed-under-header)');
if(porto_progress_obj.length){
var flag=false;
if(porto_progress_obj.is(':hidden') ){
porto_progress_obj.show();
flag=true;
}
if(flag){
porto_progress_obj.hide();
}}
var offset=theme.adminBarHeight() + theme.StickyHeader.sticky_height - 1,
$transitionOffset=(offset > 100) ? offset:100;
this.options.stickyOffset=theme.sticky_nav_height + $transitionOffset;
var init_filter_widget_sticky=function(){
var prevScrollPos=$el.data('prev-pos') ? $el.data('prev-pos'):0,
scrollUpOffset=0,
objHeight=$el.outerHeight() + parseInt($el.css('margin-bottom') ),
scrollTop=$(window).scrollTop();
if($('.page-wrapper').hasClass('sticky-scroll-up') ){
if(scrollTop >=prevScrollPos){
$el.addClass('scroll-down');
}else{
$el.removeClass('scroll-down');
}
scrollUpOffset=- theme.StickyHeader.sticky_height;
if('undefined'==typeof(theme.StickyHeader.sticky_height) ){
$el.data('prev-pos', 0);
}else{
if($el.parent().offset().top + objHeight + $transitionOffset < scrollTop + offset + scrollUpOffset){
$el.addClass('sticky-ready');
}else{
$el.removeClass('sticky-ready');
}
$el.data('prev-pos', scrollTop);
}}
}
if(this.options.minWidth <=window.innerWidth){
window.removeEventListener('scroll', init_filter_widget_sticky);
window.addEventListener('scroll', init_filter_widget_sticky, { passive: true });
init_filter_widget_sticky();
}}
$el.themePin(this.options);
$(window).smartresize(function(){
if(stickyResizeTrigger){
clearTimeout(stickyResizeTrigger);
}
stickyResizeTrigger=setTimeout(function(){
$el.trigger('recalc.pin');
}, 800);
var $parent=$el.parent();
$el.outerWidth($parent.width());
if($el.css('position')=='fixed'){
$el.css('left', $parent.offset().left);
}
if($el.hasClass('porto-sticky-nav') ){
theme.sticky_nav_height=$el.outerHeight();
if(self.options.minWidth > window.innerWidth)
theme.sticky_nav_height=0;
}});
return this;
}};
$.extend(theme, {
Sticky: Sticky
});
$.fn.themeSticky=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
$this.trigger('recalc.pin');
setTimeout(function(){
$this.trigger('recalc.pin');
}, 800);
return $this.data(instanceName);
}else{
return new theme.Sticky($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
$(function(){
$(document.body).on('click', '.mobile-toggle', function(e){
var $nav_panel=$('#nav-panel');
if($nav_panel.length > 0){
if($(this).closest('.header-main').length&&$nav_panel.closest('.header-builder-p').length&&!$nav_panel.parent('.header-main').length){
$nav_panel.appendTo($(this).closest('.header-main') );
}else if($(this).closest('.header-main').length&&$nav_panel.closest('.wp-block-template-part').length){
$nav_panel.insertAfter($(this).closest('.header-main') );
}
if($nav_panel.is(':visible')&&$('#header').hasClass('sticky-header') ){
var h_h=$('#header').height(), p_h=$nav_panel.outerHeight();
if(h_h > p_h + 30){
$('#header').css('height', h_h - p_h);
}}
$nav_panel.stop().slideToggle();
}else if($('#side-nav-panel').length > 0){
$('html').toggleClass('panel-opened');
$('.panel-overlay').toggleClass('active');
if($('#side-nav-panel').hasClass('panel-right') ){
$('html').addClass('panel-right-opened');
}}
if($('#nav-panel .skeleton-body, #side-nav-panel .skeleton-body').length){
theme.lazyload_menu(1, 'mobile_menu');
}
e.preventDefault();
});
$(document.body).on('click', '.panel-overlay', function(){
$('html').css('transition', 'margin .3s').removeClass('panel-opened').removeClass('panel-right-opened');
theme.requestTimeout(function(){
$('html').css('transition', '');
}, 260);
$(this).removeClass('active');
});
$(document.body).on('click', '.side-nav-panel-close', function(e){
e.preventDefault();
$('.panel-overlay').trigger('click');
});
$(document.body).on('click', '#side-nav-panel .mobile-tab-items .nav-item', function(e){
e.preventDefault();
var $this=$(this),
$id=$this.attr('pane-id'),
$parent=$this.closest('.mobile-tabs');
if($id){
$parent.find('.active').removeClass('active');
$this.addClass('active');
$parent.find('.mobile-tab-content [tab-id="' + $id + '"]').addClass('active');
}});
$(window).on('resize', function(){
if(window.innerWidth > 991){
$('#nav-panel').hide();
if($('html').hasClass('panel-opened') ){
$('.panel-overlay').trigger('click');
}}
});
});
}).apply(this, [window.theme, jQuery]);
var scrolltotop={
setting: { startline: 100, scrollto: 0, scrollduration: 1000, fadeduration: [500, 100] },
controlHTML: '<img src="assets/img/up.png" style="width:40px; height:40px" />',
controlattrs: { offsetx: 10, offsety: 10 },
anchorkeyword: '#top',
state: { isvisible: false, shouldvisible: false },
scrollup: function(){
if(!this.cssfixedsupport)
this.$control.css({ opacity: 0 });
var dest=isNaN(this.setting.scrollto) ? this.setting.scrollto:parseInt(this.setting.scrollto);
if(typeof dest=="string"&&jQuery('#' + dest).length==1)
dest=jQuery('#' + dest).offset().top;
else
dest=0;
this.$body.stop().animate({ scrollTop: dest }, this.setting.scrollduration);
},
keepfixed: function(){
var $window=jQuery(window);
var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx;
var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety;
this.$control.css({ left: controlx + 'px', top: controly + 'px' });
},
togglecontrol: function(){
var scrolltop=jQuery(window).scrollTop();
if(!this.cssfixedsupport)
this.keepfixed();
this.state.shouldvisible=(scrolltop >=this.setting.startline) ? true:false;
if(this.state.shouldvisible&&!this.state.isvisible){
this.$control.stop().animate({ opacity: 1 }, this.setting.fadeduration[0]);
this.state.isvisible=true;
}
else if(this.state.shouldvisible==false&&this.state.isvisible){
this.$control.stop().animate({ opacity: 0 }, this.setting.fadeduration[1]);
this.state.isvisible=false;
}},
init: function(){
jQuery(document).ready(function($){
var mainobj=scrolltotop;
var iebrws=document.all;
mainobj.cssfixedsupport = !iebrws||iebrws&&document.compatMode=="CSS1Compat"&&window.XMLHttpRequest
mainobj.$body=(window.opera) ?(document.compatMode=="CSS1Compat" ? $('html'):$('body') ):$('html,body');
mainobj.$control=$('<div id="topcontrol">' + mainobj.controlHTML + '</div>')
.css({ position: mainobj.cssfixedsupport ? 'fixed':'absolute', bottom: mainobj.controlattrs.offsety, opacity: 0, cursor: 'pointer' })
.attr({ title: '' })
.on('click', function(){ mainobj.scrollup(); return false; })
.appendTo('body');
if(document.all&&!window.XMLHttpRequest&&mainobj.$control.text()!='')
mainobj.$control.css({ width: mainobj.$control.width() });
mainobj.togglecontrol();
$('a[href="' + mainobj.anchorkeyword + '"]').on('click', function(){
mainobj.scrollup();
return false;
});
$(window).on('scroll resize', function(e){
mainobj.togglecontrol();
});
});
}};
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
ScrollToTop: {
defaults: {
html: '<i class="fas fa-chevron-up"></i>',
offsetx: 10,
offsety: 0
},
initialize: function(html, offsetx, offsety){
if($('#topcontrol').length){
return this;
}
this.html=(html||this.defaults.html);
this.offsetx=(offsetx||this.defaults.offsetx);
this.offsety=(offsety||this.defaults.offsety);
this.build();
return this;
},
build: function(){
var self=this;
if(typeof scrolltotop!=='undefined'){
scrolltotop.controlHTML=self.html;
scrolltotop.controlattrs={ offsetx: self.offsetx, offsety: self.offsety };
scrolltotop.init();
}
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
MegaMenu: {
defaults: {
menu: $('.mega-menu')
},
initialize: function($menu){
this.$menu=($menu||this.defaults.menu);
this.events();
return this;
},
popupWidth: function(){
var winWidth=window.innerWidth,
popupWidth=theme.bodyWidth - theme.grid_gutter_width * 2;
if(!$('body').hasClass('wide') ){
if(winWidth >=1140 + theme.grid_gutter_width&&winWidth <=theme.container_width + 2 * theme.grid_gutter_width - 1&&theme.container_width >=1360)
popupWidth=1140 - theme.grid_gutter_width;
else if(winWidth >=theme.container_width + theme.grid_gutter_width - 1)
popupWidth=theme.container_width - theme.grid_gutter_width;
else if(winWidth >=992)
popupWidth=960 - theme.grid_gutter_width;
else if(winWidth >=768)
popupWidth=720 - theme.grid_gutter_width;
}
return popupWidth;
},
calcMenuPosition: function(menu_obj, is_left){
var menu=menu_obj,
$menuWrap;
if($(menu).closest('.elementor-top-section').length){
$menuWrap=$(menu).closest('.elementor-top-section');
}else if($(menu).closest('.e-con.e-parent').length){
$menuWrap=$(menu).closest('.e-con.e-parent');
}else if($(menu).closest('.e-con').length){
$menuWrap=$(menu).closest('.e-con');
}else if($(menu).closest('.header-main').length){
$menuWrap=$(menu).closest('.header-main');
}else if($(menu).closest('.main-menu-wrap').length){
$menuWrap=$(menu).closest('.main-menu-wrap');
}else if($(menu).closest('.header-top').length){
$menuWrap=$(menu).closest('.header-top');
}else if($(menu).closest('.header-bottom').length){
$menuWrap=$(menu).closest('.header-bottom');
}else{
$menuWrap=$(menu).closest('.top-row');
}
var $headerContainer=$menuWrap;
var ctSpacing=0;
if($menuWrap.children('.elementor-container').length){
$headerContainer=$menuWrap.children('.elementor-container');
}else if($menuWrap.find('.container-fluid').length){
$headerContainer=$menuWrap.find('.container-fluid');
}else if($menuWrap.find('.container').length){
$headerContainer=$menuWrap.find('.container');
}else if($menuWrap.find('.e-con-inner').length){
$headerContainer=$menuWrap.find('.e-con-inner');
}else if($menuWrap.find('.vc_column_container').length){
ctSpacing=2 * parseInt($menuWrap.find('.vc_column_container').css('padding-left') );
}
if($headerContainer.length >=1){
var isParent=false;
$headerContainer.each(function (){
var $this=$(this);
if($this.find(menu).length&&! isParent){
$headerContainer=$this;
isParent=true;
}});
if(! isParent){
$headerContainer=$menuWrap;
}}
if(! $headerContainer.length){
return;
}
var menuContainerWidth=$headerContainer.outerWidth() - parseInt($headerContainer.css('padding-left') ) - parseInt($headerContainer.css('padding-right') ) - ctSpacing;
if(menuContainerWidth < 900) return;
if(menu.parent().hasClass('pos-fullwidth') ){
menu.get(0).style.width=menuContainerWidth + 'px';
}
var browserWidth=document.body.offsetWidth,
menuLeftPos=menu.offset().left -(( browserWidth - menuContainerWidth) / 2),
l=false;
if('center'==is_left){
var remainWidth=menuContainerWidth -(menuLeftPos + menu.width());
if(remainWidth <=0){
l=remainWidth;
}else if(menuLeftPos <=0){
l=-menuLeftPos;
}}else if('justify'==is_left){
if(window.theme.rtl){
menuLeftPos=browserWidth -(menu.offset().left + menu.outerWidth()) -(browserWidth - menuContainerWidth) / 2;
}
var menuWidth=menu.width(),
remainWidth=menuContainerWidth -(menuLeftPos + menuWidth);
if(menuLeftPos > remainWidth&&menuLeftPos < menuWidth){
l=(menuLeftPos + remainWidth) / 3;
}
if(remainWidth <=0){
l=-remainWidth;
}}else if(false!==is_left){
var remainWidth=menuContainerWidth -(menuLeftPos + menu.width());
if(remainWidth <=0){
l=-remainWidth;
}}else if(menuLeftPos <=0){
l=-menuLeftPos;
}
return l;
},
build: function($menu){
var self=this;
if(!$menu){
$menu=self.$menu;
}
$menu.each(function(){
var $menu=$(this),
$menu_container=$menu.closest('.container'),
container_width=self.popupWidth();
if($menu.closest('.porto-popup-menu').length){
return false;
}
var $menu_items=$menu.children('li.has-sub');
$menu_items.each(function(){
var $menu_item=$(this),
$popup=$menu_item.children('.popup');
if($popup.length){
var popup_obj=$popup.get(0);
popup_obj.style.display='block';
if($menu_item.hasClass('wide') ){
popup_obj.style.left=0;
var padding=parseInt($popup.css('padding-left') ) + parseInt($popup.css('padding-right') ) +
parseInt($popup.find('> .inner').css('padding-left') ) + parseInt($popup.find('> .inner').css('padding-right') );
var row_number=4;
if($menu_item.hasClass('col-1') ) row_number=1;
if($menu_item.hasClass('col-2') ) row_number=2;
if($menu_item.hasClass('col-3') ) row_number=3;
if($menu_item.hasClass('col-4') ) row_number=4;
if($menu_item.hasClass('col-5') ) row_number=5;
if($menu_item.hasClass('col-6') ) row_number=6;
if(window.innerWidth < 992)
row_number=1;
var col_length=0;
$popup.find('> .inner > ul > li').each(function(){
var cols=parseFloat($(this).attr('data-cols') );
if(cols <=0||!cols)
cols=1;
if(cols > row_number)
cols=row_number;
col_length +=cols;
});
if(col_length > row_number) col_length=row_number;
var popup_max_width=$popup.data('popup-mw') ? $popup.data('popup-mw'):$popup.find('.inner').css('max-width'),
col_width=container_width / row_number;
if('none'!==popup_max_width&&parseInt(popup_max_width) < container_width){
col_width=parseInt(popup_max_width) / row_number;
}
$popup.find('> .inner > ul > li').each(function(){
var cols=parseFloat($(this).data('cols') );
if(cols <=0)
cols=1;
if(cols > row_number)
cols=row_number;
if($menu_item.hasClass('pos-center')||$menu_item.hasClass('pos-left')||$menu_item.hasClass('pos-right') )
this.style.width=(100 / col_length * cols) + '%';
else
this.style.width=(100 / row_number * cols) + '%';
});
if($menu_item.hasClass('pos-center') ){
var width=col_width * col_length - padding;
$popup.find('> .inner > ul').get(0).style.width=width + 'px';
var left_position=($menu_item.outerWidth() - width) / 2;
popup_obj.style.left=left_position + 'px';
popup_obj.style.right='auto';
self.SetMenuPosition(popup_obj, $popup, 'center', left_position);
}else if($menu_item.hasClass('pos-left') ){
$popup.find('> .inner > ul').get(0).style.width=(col_width * col_length - padding) + 'px';
popup_obj.style.left='0';
popup_obj.style.right='auto';
self.SetMenuPosition(popup_obj, $popup);
}else if($menu_item.hasClass('pos-right') ){
$popup.find('> .inner > ul').get(0).style.width=(col_width * col_length - padding) + 'px';
popup_obj.style.right='0';
popup_obj.style.left='auto';
self.SetMenuPosition(popup_obj, $popup, false);
}else if($menu_item.hasClass('pos-fullwidth') ){
popup_obj.style.right='auto';
popup_obj.style.left='0';
self.SetMenuPosition(popup_obj, $popup);
}else{
$popup.find('> .inner > ul').get(0).style.width=(container_width - padding) + 'px';
if(theme.rtl){
popup_obj.style.right='0';
popup_obj.style.left='auto';
}else{
popup_obj.style.left='0';
popup_obj.style.right='auto';
}
self.SetMenuPosition(popup_obj, $popup, 'justify');
}}else{
if($menu_item.hasClass('pos-left') ){
if($popup.offset().left + $popup.width() > window.innerWidth){
$menu_item.removeClass('pos-left').addClass('pos-right');
}}else if($menu_item.hasClass('pos-right') ){
if($popup.offset().left < 0){
$menu_item.removeClass('pos-right').addClass('pos-left');
}}else{
if($popup.offset().left + $popup.width() > window.innerWidth){
$menu_item.addClass('pos-right');
}else if($popup.find('> .inner > ul').length){
var $sub_menu=$popup.find('> .inner > ul').eq(0);
if($sub_menu.offset().left + $sub_menu.width() + 200 > window.innerWidth){
$sub_menu.addClass('pos-left');
}}
}}
$menu_item.addClass('sub-ready');
}});
});
return self;
},
SetMenuPosition: function(popup_obj, $popup, is_left=true, offsetWidth=0){
setTimeout(()=> {
var self=this,
left_position=self.calcMenuPosition($popup, is_left);
if(0!==left_position){
if('center'==is_left){
if(false!==left_position){
popup_obj.style.left=(offsetWidth + left_position) + 'px';
popup_obj.style.right='auto';
}}else if('justify'==is_left){
if(theme.rtl){
popup_obj.style.left='auto';
if(left_position){
popup_obj.style.right='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.right='-15px';
}else{
popup_obj.style.right='0';
}}
}else{
popup_obj.style.right='auto';
if(left_position){
popup_obj.style.left='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.left='-15px';
}else{
popup_obj.style.left='0';
}}
}}else{
if(is_left){
popup_obj.style.right='auto';
if(false!==left_position){
popup_obj.style.left='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.left='-15px';
}else{
popup_obj.style.left='0';
}}
}else{
popup_obj.style.left='auto';
if(false!==left_position){
popup_obj.style.right='-' + left_position + 'px';
}else{
if(! $('body').hasClass('wide') ){
popup_obj.style.right='-15px';
}else{
popup_obj.style.right='0';
}}
}}
}});
},
events: function(){
var self=this;
$(window).smartresize(function(e){
if(e.originalEvent){
self.build();
}});
if(theme.isLoaded){
theme.requestFrame(function(){
self.build();
});
}else{
$(window).on('load', function(){
theme.requestFrame(function(){
self.build();
});
});
}
if(self.$menu.length){
self.$menu.on('mouseenter', '.menu-item.has-sub', function(e){
var $thePopup=$(e.currentTarget).find('>.popup');
if($thePopup.find('.owl-carousel:not(.owl-loaded)').length==0){
return;
}
$thePopup.find('.owl-carousel:not(.owl-loaded)').each(function(){
var $this=$(this),
opts;
if(! $this.hasClass('owl-loaded') ){
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
if($.fn.themeCarousel){
$this.themeCarousel(opts);
}}
});
});
}
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
StickyHeader: {
defaults: {
header: $('#header')
},
initialize: function($header){
this.$header=($header||this.defaults.header);
this.sticky_height=0;
this.sticky_pos=0;
this.change_logo=theme.change_logo;
if(!theme.show_sticky_header||!this.$header.length||$('.side-header-narrow-bar').length)
return this;
var self=this;
var $menu_wrap=self.$header.find('> .main-menu-wrap');
if($menu_wrap.length){
self.$menu_wrap=$menu_wrap;
self.menu_height=$menu_wrap.height();
}else{
self.$menu_wrap=false;
}
self.$header_main=self.$header.find('.header-main');
if(self.$header_main.length > 1){
self.$header_main=$(self.$header_main[0]);
}
if(!self.$header_main.length&&self.$header.children('.elementor-location-header').length){
self.$header_main=self.$header.children('.elementor-location-header').last().addClass('header-main');
}
if(!self.$header_main.length){
return this;
}
self.reveal=self.$header.parents('.header-wrapper').hasClass('header-reveal');
self.is_sticky=false;
self.reset()
.build()
.events();
return self;
},
build: function(){
var self=this;
if(!self.is_sticky&&(window.innerHeight + self.header_height + theme.adminBarHeight() + parseInt(self.$header.css('border-top-width') ) >=$(document).height()) ){
return self;
}
if(window.innerHeight > $(document.body).height())
window.scrollTo(0, 0);
var scroll_top=$(window).scrollTop(),
$pageWrapper=$('.page-wrapper');
if(self.$menu_wrap&&!theme.isTablet()){
self.$header_main.stop().css('top', 0);
if(self.$header.parent().hasClass('fixed-header') )
self.$header.parent().attr('style', '');
if($('.page-wrapper').hasClass('sticky-scroll-up') ){
scroll_top -=self.sticky_height;
if(scroll_top > self.sticky_pos + 100){
self.$header.addClass('sticky-ready');
}else{
self.$header.removeClass('sticky-ready');
}}
if(scroll_top > self.sticky_pos){
if(!self.$header.hasClass('sticky-header')&&(! $pageWrapper.hasClass('sticky-scroll-up')||($pageWrapper.hasClass('sticky-scroll-up')&&'undefined'!==typeof($pageWrapper.data('prev-scrollpos') )) )){
var header_height=self.$header.outerHeight();
self.$header.addClass('sticky-header').css('height', header_height);
self.$menu_wrap.stop().css('top', theme.adminBarHeight());
var selectric=self.$header.find('.header-main .searchform select').data('selectric');
if(selectric&&typeof selectric.close!='undefined')
selectric.close();
if(self.$header.parent().hasClass('fixed-header') ){
self.$header_main.hide();
self.$header.css('height', '');
}
if(!self.init_toggle_menu){
self.init_toggle_menu=true;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').hasClass('show-always') ){
$('#main-toggle-menu').data('show-always', true);
$('#main-toggle-menu').removeClass('show-always');
}
$('#main-toggle-menu').addClass('closed');
$('#main-toggle-menu .menu-title').addClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
self.is_sticky=true;
}}else{
if(self.$header.hasClass('sticky-header') ){
self.$header.removeClass('sticky-header');
self.$header.css('height', '');
self.$menu_wrap.stop().css('top', 0);
self.$header_main.show();
var selectric=self.$header.find('.main-menu-wrap .searchform select').data('selectric');
if(selectric&&typeof selectric.close!='undefined')
selectric.close();
if(self.init_toggle_menu){
self.init_toggle_menu=false;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').data('show-always') ){
$('#main-toggle-menu').addClass('show-always');
$('#main-toggle-menu').removeClass('closed');
$('#main-toggle-menu .menu-title').removeClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
}
self.is_sticky=false;
}}
}else{
self.$header_main.show();
if(self.$header.parent().hasClass('fixed-header')&&$('#wpadminbar').length&&$('#wpadminbar').css('position')=='absolute'){
}else if(self.$header.parent().hasClass('fixed-header') ){
self.$header.parent().attr('style', '');
}else{
if(self.$header.parent().hasClass('fixed-header') )
self.$header.parent().attr('style', '');
}
if(self.$header.hasClass('sticky-menu-header')&&!theme.isTablet()){
self.$header_main.stop().css('top', 0);
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header');
self.is_sticky=false;
self.sticky_height=0;
}else{
if(self.$menu_wrap)
self.$menu_wrap.stop().css('top', 0);
if($pageWrapper.hasClass('sticky-scroll-up') ){
scroll_top -=self.sticky_height;
if(scroll_top > self.sticky_pos + 100){
self.$header.addClass('sticky-ready');
}else{
self.$header.removeClass('sticky-ready');
}}
if(scroll_top > self.sticky_pos&&(!theme.isTablet()||(theme.isTablet()&&(!theme.isMobile()&&theme.show_sticky_header_tablet)||(theme.isMobile()&&theme.show_sticky_header_tablet&&theme.show_sticky_header_mobile) )) ){
if(! self.$header.hasClass('sticky-header')&&(! $pageWrapper.hasClass('sticky-scroll-up')||($pageWrapper.hasClass('sticky-scroll-up')&&'undefined'!==typeof($pageWrapper.data('prev-scrollpos') )) )){
var header_height=self.$header.outerHeight();
self.$header.addClass('sticky-header').css('height', header_height);
self.$header_main.addClass('sticky');
if(self.change_logo) self.$header_main.addClass('change-logo');
self.$header_main.stop().css('top', theme.adminBarHeight());
if(!self.init_toggle_menu){
self.init_toggle_menu=true;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').hasClass('show-always') ){
$('#main-toggle-menu').data('show-always', true);
$('#main-toggle-menu').removeClass('show-always');
}
$('#main-toggle-menu').addClass('closed');
$('#main-toggle-menu .menu-title').addClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
self.is_sticky=true;
}}else{
if(self.$header.hasClass('sticky-header') ){
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header');
self.$header.css('height', '');
self.$header_main.stop().css('top', 0);
if(self.init_toggle_menu){
self.init_toggle_menu=false;
theme.MegaMenu.build();
if($('#main-toggle-menu').length){
if($('#main-toggle-menu').data('show-always') ){
$('#main-toggle-menu').addClass('show-always');
$('#main-toggle-menu').removeClass('closed');
$('#main-toggle-menu .menu-title').removeClass('closed');
$('#main-toggle-menu .toggle-menu-wrap').attr('style', '');
}}
}
self.is_sticky=false;
}}
}}
if(!self.$header.hasClass('header-loaded') )
self.$header.addClass('header-loaded');
if(!self.$header.find('.logo').hasClass('logo-transition') )
self.$header.find('.logo').addClass('logo-transition');
if(self.$header.find('.overlay-logo').get(0)&&!self.$header.find('.overlay-logo').hasClass('overlay-logo-transition') )
self.$header.find('.overlay-logo').addClass('overlay-logo-transition');
return self;
},
reset: function(){
var self=this;
if(self.$header.find('.logo').hasClass('logo-transition') )
self.$header.find('.logo').removeClass('logo-transition');
if(self.$header.find('.overlay-logo').get(0)&&self.$header.find('.overlay-logo').hasClass('overlay-logo-transition') )
self.$header.find('.overlay-logo').removeClass('overlay-logo-transition');
if(self.$menu_wrap&&!theme.isTablet()){
self.$header.addClass('sticky-header sticky-header-calc');
self.$header_main.addClass('sticky');
if(self.change_logo) self.$header_main.addClass('change-logo');
self.sticky_height=self.$menu_wrap.height() + parseInt(self.$menu_wrap.css('padding-top') ) + parseInt(self.$menu_wrap.css('padding-bottom') );
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header sticky-header-calc');
self.header_height=self.$header.height() + parseInt(self.$header.css('margin-top') );
self.menu_height=self.$menu_wrap.height() + parseInt(self.$menu_wrap.css('padding-top') ) + parseInt(self.$menu_wrap.css('padding-bottom') );
self.sticky_pos=(self.header_height - self.sticky_height) + parseInt($('body').css('padding-top') ) + parseInt(self.$header.css('border-top-width') );
if($('.banner-before-header').length){
self.sticky_pos +=$('.banner-before-header').height();
}
if($('.porto-block-html-top').length){
self.sticky_pos +=$('.porto-block-html-top').height();
}}else{
self.$header.addClass('sticky-header sticky-header-calc');
self.$header_main.addClass('sticky');
if(self.change_logo) self.$header_main.addClass('change-logo');
self.sticky_height=self.$header_main.outerHeight();
if(self.change_logo) self.$header_main.removeClass('change-logo');
self.$header_main.removeClass('sticky');
self.$header.removeClass('sticky-header sticky-header-calc');
self.header_height=self.$header.height() + parseInt(self.$header.css('margin-top') );
self.main_height=self.$header_main.height();
if(!(!theme.isTablet()||(theme.isTablet()&&!theme.isMobile()&&theme.show_sticky_header_tablet)||(theme.isMobile()&&theme.show_sticky_header_tablet&&theme.show_sticky_header_mobile) )){
self.sticky_height=0;
}
self.sticky_pos=self.$header.offset().top + self.header_height - self.sticky_height - theme.adminBarHeight() + parseInt(self.$header.css('border-top-width') );
}
if(self.reveal){
if(self.menu_height){
self.sticky_pos +=self.menu_height + 30;
}else{
self.sticky_pos +=30;
}}
if(self.sticky_pos < 0){
self.sticky_pos=0;
}
self.init_toggle_menu=false;
self.$header_main.removeAttr('style');
if(!theme.isTablet()&&self.$header.hasClass('header-side')&&typeof self.$header.attr('data-plugin-sticky')!='undefined'){
self.$header.css('height', '');
}else{
self.$header.removeAttr('style');
}
return self;
},
events: function(){
var self=this, win_width=0;
$(window).smartresize(function(){
if(win_width!=window.innerWidth){
self.reset().build();
win_width=window.innerWidth;
}});
var scrollEffect=function (){
theme.requestFrame(function(){
self.build();
var $pageWrapper=$('.page-wrapper');
if($pageWrapper.hasClass('sticky-scroll-up')&&! $('html').hasClass('porto-search-opened') ){
var prevScrollPos=0,
scrollTop=$(window).scrollTop();
if($pageWrapper.data('prev-scrollpos') ){
prevScrollPos=$pageWrapper.data('prev-scrollpos');
}
if(scrollTop >=prevScrollPos){
self.$header.addClass('scroll-down');
}else{
self.$header.removeClass('scroll-down');
}
$pageWrapper.data('prev-scrollpos', scrollTop);
}});
}
window.addEventListener('scroll', scrollEffect, { passive: true });
scrollEffect();
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
HashScroll: {
initialize: function(){
this.build()
.events();
return this;
},
build: function(){
var self=this;
try {
var hash=window.location.hash;
var target=$(hash);
if(target.length&&!(hash=='#review_form'||hash=='#reviews'||hash.indexOf('#comment-')!=-1) ){
$('html, body').delay(600).stop().animate({
scrollTop: target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1
}, 600, 'easeOutQuad');
}
return self;
} catch(err){
return self;
}},
getTarget: function(href){
if('#'==href||href.endsWith('#') ){
return false;
}
var target;
if(href.indexOf('#')==0){
target=$(href);
}else{
var url=window.location.href;
url=url.substring(url.indexOf('://') + 3);
if(url.indexOf('#')!=-1)
url=url.substring(0, url.indexOf('#') );
href=href.substring(href.indexOf('://') + 3);
href=href.substring(href.indexOf(url) + url.length);
if(href.indexOf('#')==0){
target=$(href);
}}
return target;
},
activeMenuItem: function(){
var self=this;
var scroll_pos=$(window).scrollTop();
var $menu_items=$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]');
if($menu_items.length){
$menu_items.each(function(){
var $this=$(this),
href=$this.attr('href'),
target=self.getTarget(href);
if(target&&target.get(0) ){
if($this.parent().is(':last-child')&&scroll_pos + window.innerHeight >=target.offset().top + target.outerHeight()){
$this.parent().siblings().removeClass('active');
$this.parent().addClass('active');
}else{
var scroll_to=target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1,
$parent=$this.parent();
if(scroll_to <=scroll_pos + 5){
$parent.siblings().removeClass('active');
$parent.addClass('active');
if($parent.closest('.secondary-menu').length){
$parent.closest('#header').find('.main-menu').eq(0).children('.menu-item.active').removeClass('active');
}}else{
$parent.removeClass('active');
}}
}});
}
return self;
},
events: function(){
var self=this;
$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"], a[href*="#"].hash-scroll, .hash-scroll-wrap a[href*="#"]').on('click', function(e){
e.preventDefault();
var $this=$(this),
href=$this.attr('href'),
target=self.getTarget(href);
if(target&&target.get(0) ){
var $parent=$this.parent();
var scroll_to=target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1;
$('html, body').stop().animate({
scrollTop: scroll_to
}, 600, 'easeOutQuad', function(){
$parent.siblings().removeClass('active');
$parent.addClass('active');
});
if($this.closest('.porto-popup-menu.opened').length){
$this.closest('.porto-popup-menu.opened').children('.hamburguer-btn').trigger('click');
}}else if(( '#'!=href||!$this.closest('.porto-popup-menu.opened').length)&&!$this.hasClass('nolink') ){
window.location.href=$this.attr('href');
}});
var $menu_items=$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]');
$menu_items.each(function(){
var rootMargin='-20% 0px -79.9% 0px',
isLast=$(this).parent().is(':last-child');
if(isLast){
var obj=document.getElementById(this.hash.replace('#', '') );
if(obj&&document.body.offsetHeight - obj.offsetTop < window.innerHeight){
var ratio=(window.innerHeight - document.body.offsetHeight + obj.offsetTop) / window.innerHeight * 0.8;
ratio=Math.round(ratio * 100);
rootMargin='-' +(20 + ratio) + '% 0px -' +(79.9 - ratio) + '% 0px';
}}
var callback=function(){
if(this&&typeof this[0]!='undefined'&&this[0].id){
$('.menu-item > a[href*="#' + this[0].id + '"], .porto-sticky-nav .nav > li > a[href*="#' + this[0].id + '"]').parent().addClass('active').siblings().removeClass('active');
}};
self.scrollSpyIntObs(this.hash, callback, {
rootMargin: rootMargin,
thresholds: 0
}, true, isLast, true, $menu_items, $(this).parent().index());
});
return self;
},
scrollSpyIntObs: function(selector, functionName, intObsOptions, alwaysObserve, isLast, firstLoad, $allItems, index){
if(typeof IntersectionObserver=='undefined'){
return this;
}
var obj=document.getElementById(selector.replace('#', '') );
if(!obj){
return this;
}
var self=this;
var intersectionObserverOptions={
rootMargin: '0px 0px 200px 0px'
}
if(Object.keys(intObsOptions).length){
intersectionObserverOptions=$.extend(intersectionObserverOptions, intObsOptions);
}
var observer=new IntersectionObserver(function(entries){
for(var i=0; i < entries.length; i++){
var entry=entries[i];
if(entry.intersectionRatio > 0){
if(typeof functionName==='string'){
var func=Function('return ' + functionName)();
}else{
var callback=functionName;
callback.call($(entry.target) );
}}else{
if(firstLoad==false){
if(isLast&&! $allItems.closest('.porto-sticky-nav').length){
$allItems.filter('[href*="' + entry.target.id + '"]').parent().prev().addClass('active').siblings().removeClass('active');
}}
firstLoad=false;
}}
}, intersectionObserverOptions);
observer.observe(obj);
return this;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__floatElement';
var PluginFloatElement=function($el, opts){
return this.initialize($el, opts);
};
PluginFloatElement.defaults={
startPos: 'top',
speed: 3,
horizontal: false,
circle: false,
transition: false,
transitionDelay: 0,
transitionDuration: 500
};
PluginFloatElement.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, PluginFloatElement.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var self=this,
$el=this.options.wrapper,
$window=$(window),
minus;
if(self.options.style){
$el.attr('style', self.options.style);
}
if(self.options.circle){
if(self.options.transition){
$el.css({
transition: 'ease-out transform ' + self.options.transitionDuration + 'ms ' + self.options.transitionDelay + 'ms'
});
}
window.addEventListener('scroll', function(){
self.movement(minus);
}, { passive: true });
}else if($window.width() > 767){
if(self.options.startPos=='none'){
minus='';
}else if(self.options.startPos=='top'){
$el.css({
top: 0
});
minus='';
}else{
$el.css({
bottom: 0
});
minus='-';
}
if(self.options.transition){
$el.css({
transition: 'ease-out transform ' + self.options.transitionDuration + 'ms ' + self.options.transitionDelay + 'ms'
});
}
if(! self.$el.hasClass('marquee') ){
self.movement(minus);
}
window.addEventListener('scroll', function(){
self.movement(minus);
}, { passive: true });
if(theme.locomotiveScroll){
theme.locomotiveScroll.on('scroll', function(instance){
self.movement(minus, instance.scroll.y);
});
}}
return this;
},
movement: function(minus, isLocomotive=false){
var self=this,
$el=this.options.wrapper,
$window=$(window),
scrollTop=isLocomotive===false ? $window.scrollTop():isLocomotive,
elementOffset=$el.offset().top,
currentElementOffset=(elementOffset - scrollTop);
if(isLocomotive!==false){
currentElementOffset=$el.offset().top;
elementOffset=currentElementOffset + scrollTop;
}
if(self.options.circle){
$el.css({
transform: 'rotate(' +(scrollTop * 0.25) + 'deg)'
});
}else{
var scrollPercent=100 * currentElementOffset /($window.height());
if(elementOffset + $el.height() >=scrollTop&&elementOffset <=scrollTop + window.innerHeight){
if(!self.options.horizontal){
$el.css({
transform: 'translate3d(0, ' + minus + scrollPercent / self.options.speed + '%, 0)'
});
}else{
$el.css({
transform: 'translate3d(' + minus + scrollPercent / self.options.speed + '%, 0, 0)'
});
}}
}}
};
$.extend(theme, {
PluginFloatElement: PluginFloatElement
});
$.fn.themePluginFloatElement=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new PluginFloatElement($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
function porto_init($wrap){
'use strict';
jQuery(window).on('touchstart', function(){ });
if(!$wrap){
$wrap=jQuery(document.body);
}
var wrapObj=$wrap.get(0);
$wrap.trigger('porto_init_start', [wrapObj]);
(function($){
if($.fn.themeAccordion){
$(function(){
$wrap.find('.accordion:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeAccordion(opts);
});
});
}
if($.fn.themeAccordionMenu){
$(function(){
$wrap.find('.accordion-menu:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeAccordionMenu(opts);
});
});
}
if($.fn.themeFlickrZoom){
$(function(){
$wrap.find('.wpb_flickr_widget:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeFlickrZoom(opts);
});
});
}
if($.fn.themePluginLazyLoad){
$(function(){
$wrap.find('[data-plugin-lazyload]:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themePluginLazyLoad(opts);
});
if($wrap.find('.porto-lazyload').length){
$wrap.find('.porto-lazyload').filter(function(){
if($(this).data('__lazyload')||($(this).closest('.owl-carousel').length&&$(this).closest('.owl-carousel').find('.owl-item.cloned').length) ){
return false;
}
return true;
}).themePluginLazyLoad({ effect: 'fadeIn', effect_speed: 400 });
if($wrap.find('.porto-lazyload').closest('.nivoSlider').length){
theme.requestTimeout(function(){
$wrap.find('.nivoSlider').each(function(){
if($(this).find('.porto-lazyload').length){
$(this).closest('.nivoSlider').find('.nivo-main-image').attr('src', $(this).closest('.nivoSlider').find('.porto-lazyload').eq(0).attr('src') );
}});
}, 100);
}
if($wrap.find('.porto-lazyload').closest('.porto-carousel-wrapper').length){
theme.requestTimeout(function(){
$wrap.find('.porto-carousel-wrapper').each(function(){
if($(this).find('.porto-lazyload:not(.lazy-load-loaded)').length){
$(this).find('.slick-list').css('height', 'auto');
}});
}, 100);
}}
});
}
if($.fn.themeMasonry){
$(function(){
$wrap.find('[data-plugin-masonry]:not(.manual)').each(function(){
var $this=$(this),
opts;
if($this.hasClass('elementor-row') ){
$this.children('.elementor-column').addClass('porto-grid-item');
}
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeMasonry(opts);
});
$wrap.find('.posts-masonry .posts-container:not(.manual)').each(function(){
var pluginOptions=$(this).data('plugin-options');
if(!pluginOptions){
pluginOptions={};}
pluginOptions.itemSelector='.post';
$(this).themeMasonry(pluginOptions);
});
$wrap.find('.page-portfolios .portfolio-row:not(.manual)').each(function(){
if($(this).closest('.porto-grid-container').length > 0||typeof $(this).attr('data-plugin-masonry')!='undefined'){
return;
}
var $parent=$(this).parent(), layoutMode='masonry', options, columnWidth='.portfolio:not(.w2)', timer=null;
if($parent.hasClass('portfolios-grid') ){
}else if($parent.hasClass('portfolios-masonry') ){
if(!$parent.children('.bounce-loader').length){
$parent.append('<div class="bounce-loader"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>');
}}
options={
itemSelector: '.portfolio',
layoutMode: layoutMode,
callback: function(){
timer&&clearTimeout(timer);
timer=setTimeout(function(){
if(typeof theme.FilterZoom!=='undefined'){
theme.FilterZoom.initialize($('.page-portfolios') );
}
$parent.addClass('portfolio-iso-active');
}, 400);
}};
if(layoutMode=='masonry'){
if(!$parent.find('.portfolio:not(.w2)').length)
columnWidth='.portfolio';
options=$.extend(true, {}, options, {
masonry: { columnWidth: columnWidth }});
}
$(this).themeMasonry(options);
});
$wrap.find('.page-members .member-row:not(.manual)').each(function(){
$(this).themeMasonry({
itemSelector: '.member',
callback: function(){
setTimeout(function(){
if(typeof theme.FilterZoom!=='undefined'){
theme.FilterZoom.initialize($('.page-members') );
}}, 400);
}});
});
});
}
if($.fn.themeToggle){
$(function(){
$wrap.find('section.toggle:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
$this.themeToggle(opts);
});
});
}
if($.fn.themeSticky){
$(function(){
$wrap.find('[data-plugin-sticky]:not(.manual), .porto-sticky:not(.manual), .porto-sticky-nav:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
if($this.is(':visible') ){
$this.themeSticky(opts);
}});
});
}
if($.fn['themePluginFloatElement']){
$(function(){
$wrap.find('[data-plugin-float-element]:not(.manual)').each(function(){
var $this=$(this),
opts;
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
$this.themePluginFloatElement(opts);
});
});
}
if(typeof bootstrap!='undefined'&&typeof wrapObj!='undefined'){
var tooltipTriggerList=[].slice.call(wrapObj.querySelectorAll("[data-bs-tooltip]:not(.manual), [data-toggle='tooltip']:not(.manual), .star-rating:not(.manual)") );
tooltipTriggerList.map(function(tooltipTriggerEl){
return new bootstrap.Tooltip(tooltipTriggerEl)
});
}
$wrap.find('a[data-bs-toggle="tab"]').off('shown.bs.tab').on('shown.bs.tab', function(e){
$(this).parents('.nav-tabs').find('.active').removeClass('active');
$(this).addClass('active').parent().addClass('active');
if($(this).closest('.tabs') ){
var _tabCarousel=$(this).closest('.tabs').find('.tab-content>.active').find('.owl-carousel');
if(! _tabCarousel.data('owl.carousel') ){
_tabCarousel.themeCarousel(_tabCarousel.data('plugin-options'));
}}
});
if(typeof theme.initAsync=='function'){
theme.initAsync($wrap, wrapObj);
}else{
$(document.body).on('porto_async_init', function(){
theme.initAsync($wrap, wrapObj);
});
}})(jQuery);
jQuery(document.body).trigger('porto_init', [$wrap]);
}
(function(theme, $){
'use strict';
$(document).ready(function(){
var win_width=0;
$(window).smartresize(function(){
if(win_width!=window.innerWidth){
theme.adminBarHeightNum=null;
win_width=window.innerWidth;
}
theme.bodyWidth=document.body.offsetWidth;
});
if(typeof theme.ScrollToTop!=='undefined'){
theme.ScrollToTop.initialize();
}
setTimeout(function(){
porto_init();
}, 0);
(function(){
theme.bodyWidth=theme.bodyWidth||document.body.offsetWidth;
if(typeof theme.MegaMenu!=='undefined'){
theme.MegaMenu.initialize();
}})();
setTimeout(()=> {
if(typeof theme.StickyHeader!=='undefined'){
theme.StickyHeader.initialize();
}
if(typeof theme.HashScroll!=='undefined'){
theme.HashScroll.initialize();
}});
$(document).trigger('porto_theme_init');
theme.isReady=true;
});
$(window).on('load', function(){
$(document).on('click', '.sidebar-toggle', function(e){
e.preventDefault();
var $html=$('html'),
$main=$('#main'),
$this=$(this);
if($this.siblings('.porto-product-filters').length){
if($html.hasClass('filter-sidebar-opened') ){
$html.removeClass('filter-sidebar-opened');
$this.siblings('.sidebar-overlay').removeClass('active');
if($html.hasClass('sidebar-right-opened') ){
$html.removeClass('sidebar-right-opened');
}}else{
$html.removeClass('sidebar-opened');
$html.addClass('filter-sidebar-opened');
$this.siblings('.sidebar-overlay').addClass('active');
if($main.hasClass('column2-right-sidebar')||$main.hasClass('column2-wide-right-sidebar') ){
$html.addClass('sidebar-right-opened');
}}
}else{
if($html.hasClass('sidebar-opened') ){
$html.removeClass('sidebar-opened');
$('.sidebar-overlay').removeClass('active');
if($html.hasClass('sidebar-right-opened') ){
$html.removeClass('sidebar-right-opened');
}}else{
$html.addClass('sidebar-opened');
$('.sidebar-overlay').addClass('active');
if($main.hasClass('column2-right-sidebar')||$main.hasClass('column2-wide-right-sidebar') ){
$html.addClass('sidebar-right-opened');
}}
}});
$('#header .mini-cart').on('click', function(e){
let $body=$('body');
if(js_porto_vars.cart_url&&($body.hasClass('woocommerce-cart')||$body.hasClass('woocommerce-checkout') )){
location.href=js_porto_vars.cart_url;
}});
$('.minicart-offcanvas .cart-head').on('click', function(){
let $body=$('body');
if(js_porto_vars.cart_url&&($body.hasClass('woocommerce-cart')||$body.hasClass('woocommerce-checkout') )){
return;
}
var $this=$(this);
$this.closest('.minicart-offcanvas').toggleClass('minicart-opened');
if($this.closest('.minicart-offcanvas').hasClass('minicart-opened') ){
$('html').css('margin-right', theme.getScrollbarWidth());
$('html').css('overflow', 'hidden');
}else{
$('html').css('overflow', '');
$('html').css('margin-right', '');
}});
$('.minicart-offcanvas .minicart-overlay').on('click', function(){
$(this).closest('.minicart-offcanvas').removeClass('minicart-opened');
$('html').css('overflow', '');
$('html').css('margin-right', '');
});
$(document.body).on('click', '.sidebar-overlay', function(){
var $html=$('html');
$html.removeClass('sidebar-opened');
$html.removeClass('filter-sidebar-opened');
$(this).removeClass('active');
$html.removeClass('sidebar-right-opened');
});
$(document.body).on('click', '.section-tabs .nav-link', function(e){
e.preventDefault();
var $this=$(this),
nav_id=$this.data('tab'),
$section_tab=$this.closest('.section-tabs'),
$nav_wrap=$section_tab.children('ul.nav'),
$tab_content=$section_tab.children('.tab-content');
if(nav_id){
$nav_wrap.find('.active').removeClass('active');
$this.addClass('active').parent('.nav-item').addClass('active');
$tab_content.find('>.active').removeClass('show active');
$tab_content.find('>.tab-pane[id="' + nav_id + '"]').addClass('active');
let _offsetHeight=$tab_content.find('>.active').get(0).offsetHeight;
$tab_content.find('>.active').addClass('show');
var _tabCarousel=$tab_content.find('>.active').find('.owl-carousel');
if(! _tabCarousel.data('owl.carousel') ){
_tabCarousel.themeCarousel(_tabCarousel.data('plugin-options'));
}}
});
$(window).on('resize', function(e){
if(e.originalEvent&&window.innerWidth > 991&&$('html').hasClass('sidebar-opened') ){
$('.sidebar-overlay').trigger('click');
}});
var $matchHeightObj=$('.tabs-simple .featured-box .box-content, .porto-content-box .featured-box .box-content, .vc_general.vc_cta3, .match-height');
if($matchHeightObj.length){
if($.fn.matchHeight){
$matchHeightObj.matchHeight();
}else{
var script=document.createElement("script");
script.addEventListener("load", function(event){
$matchHeightObj.matchHeight();
});
script.src=js_porto_vars.ajax_loader_url.replace('/images/ajax-loader@2x.gif', '/js/libs/jquery.matchHeight.min.js');
script.async=true;
document.body.appendChild(script);
}}
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
$('.share-whatsapp').css('display', 'inline-block');
}
$(document).ajaxComplete(function(event, xhr, options){
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
$('.share-whatsapp').css('display', 'inline-block');
}});
var ua=window.navigator.userAgent,
ie12=ua.indexOf('Edge/') > 0;
if(ie12) $('html').addClass('ie12');
$(document).on('click', '.portfolios-lightbox a.portfolio-link', function(e){
$(this).find('.thumb-info-zoom').trigger('click');
return false;
});
$('.porto-faqs').each(function(){
if($(this).find('.faq .toggle.active').length < 1){
$(this).find('.faq').eq(0).find('.toggle').addClass('active');
$(this).find('.faq').eq(0).find('.toggle-content').show();
}});
$(document).on('shown.bs.collapse', '.collapse', function(){
var panel=$(this);
theme.refreshVCContent(panel);
});
$(document).on('shown.bs.tab', 'a[data-bs-toggle="tab"]', function(e){
var panel=$($(e.target).attr('href') );
theme.refreshVCContent(panel);
});
$('.porto-tooltip .tooltip-icon').on('click', function(){
if($(this).parent().children(".tooltip-popup").css("display")=="none"){
$(this).parent().children(".tooltip-popup").fadeIn(200);
}else{
$(this).parent().children(".tooltip-popup").fadeOut(200);
}});
$('.porto-tooltip .tooltip-close').on('click', function(){
$(this).parent().fadeOut(200);
});
$('body').css('--porto-scroll-w', theme.getScrollbarWidth() + 'px');
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $, undefined){
"use strict";
$(document).ready(function(){
$(window).on('vc_reload', function(){
porto_init();
$('.type-post').addClass('post');
$('.type-portfolio').addClass('portfolio');
$('.type-member').addClass('member');
$('.type-block').addClass('block');
});
});
var timelineHeightAdjust={
$timeline: $('#exp-timeline'),
$timelineBar: $('#exp-timeline .timeline-bar'),
$firstTimelineItem: $('#exp-timeline .timeline-box').first(),
$lastTimelineItem: $('#exp-timeline .timeline-box').last(),
build: function(){
var self=this;
self.adjustHeight();
},
adjustHeight: function(){
var self=this,
calcFirstItemHeight=(self.$firstTimelineItem.outerHeight(true) / 2) + 5,
calcLastItemHeight=(self.$lastTimelineItem.outerHeight(true) / 2) + 5;
self.$timelineBar.css({
top: calcFirstItemHeight,
bottom: calcLastItemHeight
});
}}
if($('#exp-timeline').get(0) ){
var timeline_timer=null;
$(window).smartresize(function(){
if(timeline_timer){
clearTimeout(timeline_timer);
}
timeline_timer=setTimeout(function(){
timelineHeightAdjust.build();
}, 800);
});
timelineHeightAdjust.build();
}
$('.custom-view-our-location').on('click', function(e){
e.preventDefault();
var this_=$(this);
$('.custom-googlemap').slideDown('1000', function(){
this_.delay(700).hide();
});
});
window.addEventListener('LazyLoad::Initialized',
function(event){
theme.w3tcLazyLoadInstance=event.detail.instance;
},
false
);
})(window.theme, jQuery);
(function(theme, $, undefined){
'use strict';
window.addEventListener('load', function(){
theme.isLoaded=true;
});
$(document).ready(function(){
if(typeof elementorFrontend!='undefined'){
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addFilter('frontend/handlers/menu_anchor/scroll_top_distance', function(scrollTop){
if(theme&&theme.StickyHeader&&typeof theme.sticky_nav_height!='undefined'){
if(elementorFrontend.elements.$wpAdminBar.length){
scrollTop +=elementorFrontend.elements.$wpAdminBar.height();
}
scrollTop=scrollTop - theme.adminBarHeight() - theme.StickyHeader.sticky_height - theme.sticky_nav_height + 1;
}
return scrollTop;
});
elementorFrontend.elements.$window.on('elementor/nested-tabs/activate', function(e, content){
var _tabCarousel=$(content).find('.owl-carousel');
if(! _tabCarousel.data('owl.carousel') ){
_tabCarousel.themeCarousel(_tabCarousel.data('plugin-options') );
}});
});
}});
$('#footer .widget_wysija .wysija-submit:not(.btn)').addClass('btn btn-default');
if($('[data-vc-parallax] .owl-carousel').length){
theme.requestTimeout(function(){ if(typeof window.vcParallaxSkroll=='object'){ window.vcParallaxSkroll.refresh(); }}, 200);
}
if($('.page-content > .alignfull, .post-content > .alignfull').length){
var initAlignFull=function(){
$('.page-content > .alignfull, .post-content > .alignfull').each(function(){
$(this).css('left', -1 * $(this).parent().offset().left).css('right', -1 * $(this).parent().offset().left).css('width', $('body').width() -(parseInt($(this).css('margin-left'), 10) + parseInt($(this).css('margin-right'), 10) ));
});
};
initAlignFull();
$(window).smartresize(function(){
initAlignFull();
});
}})(window.theme, jQuery);
jQuery(document).ready((function(e){if(js_porto_vars.use_skeleton_screen.length>0&&e(".skeleton-loading").length){var t=(r=e.Deferred(),e((function(){r.resolve(),!0})),r.promise()),n=!1,i=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver;void 0!==i&&(n=new i((function(t,n){for(var i in t){var o=t[i];"childList"==o.type&&e(o.target).trigger("skeleton:initialised")}})));var o=setTimeout((function(){n&&(n.disconnect(),n=void 0)}),4e3);e(".skeleton-loading").each((function(i){var r=e(this),s=function(){var t=e.Deferred();return r.on("skeleton:initialised",(function(e){e.target.classList.contains("skeleton-loading")&&t.resolve(e)})),t.promise()}(),a=e.Deferred().resolve().promise();if(e.when(s,a,t).done((function(t){var i=e(t.target),r=i.siblings(".skeleton-body");r.length||(r=i.parent().parent().parent().find('[class="'+i.attr("class").replace("skeleton-loading","skeleton-body")+'"]')),porto_init(i),i.find(".sidebar-menu:not(.side-menu-accordion)").length&&void 0!==theme.SidebarMenu&&theme.SidebarMenu.initialize(i.find(".sidebar-menu:not(.side-menu-accordion)")),i.trigger("skeleton-loaded"),theme.requestTimeout((function(){r.length&&(r.parent().hasClass("yit-wcan-container")?r.parent().remove():r.remove()),i.removeClass("skeleton-loading"),i.closest(".skeleton-loading-wrap")&&i.closest(".skeleton-loading-wrap").removeClass("skeleton-loading-wrap"),(e(document.body).hasClass("elementor-default")||e(document.body).hasClass("elementor-page"))&&e(window).trigger("resize"),theme.refreshStickySidebar(!1)}),100),e(".skeleton-loading").length||(clearTimeout(o),n.disconnect(),n=void 0)})),r.children('script[type="text/template"]').length){var l=e(JSON.parse(r.children('script[type="text/template"]').eq(0).html()));r.children('script[type="text/template"]').eq(0).remove(),n&&n.observe(this,{childList:!0,subtree:!1}),r.append(l),n||r.trigger("skeleton:initialised")}}))}var r}));
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
mfpConfig: {
tClose: js_porto_vars.popup_close,
tLoading: '<div class="porto-ajax-loading"><i class="porto-loading-icon"></i></div>',
gallery: {
tPrev: js_porto_vars.popup_prev,
tNext: js_porto_vars.popup_next,
tCounter: js_porto_vars.mfp_counter
},
image: {
tError: js_porto_vars.mfp_img_error
},
ajax: {
tError: js_porto_vars.mfp_ajax_error
},
callbacks: {
open: function(){
$('body').addClass('lightbox-opened');
var fixed=this.st.fixedContentPos;
if(fixed){
$('#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap').css(theme.rtl_browser ? 'left':'right', theme.getScrollbarWidth());
}
var that=$(this._lastFocusedEl);
if(( that.closest('.portfolios-lightbox').hasClass('with-thumbs') )&&$(document).width() >=1024){
var portfolio_lightbox_thumbnails_base=that.closest('.portfolios-lightbox.with-thumbs').find('.porto-portfolios-lighbox-thumbnails').clone(),
magnificPopup=$.magnificPopup.instance;
$('body').prepend(portfolio_lightbox_thumbnails_base);
var $portfolios_lightbox_thumbnails=$('body > .porto-portfolios-lighbox-thumbnails'),
$portfolios_lightbox_thumbnails_carousel=$portfolios_lightbox_thumbnails.children('.owl-carousel');
$portfolios_lightbox_thumbnails_carousel.themeCarousel($portfolios_lightbox_thumbnails_carousel.data('plugin-options') );
$portfolios_lightbox_thumbnails_carousel.trigger('refresh.owl.carousel');
var $carousel_items_wrapper=$portfolios_lightbox_thumbnails_carousel.find('.owl-stage');
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current');
$.magnificPopup.instance.next=function(){
var magnificPopup=$.magnificPopup.instance;
$.magnificPopup.proto.next.call(this);
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current');
};
$.magnificPopup.instance.prev=function(){
var magnificPopup=$.magnificPopup.instance;
$.magnificPopup.proto.prev.call(this);
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current');
};
$carousel_items_wrapper.find('.owl-item').on('click', function(){
$carousel_items_wrapper.find('.owl-item').removeClass('current');
$.magnificPopup.instance.goTo($(this).index());
$(this).addClass('current');
});
}
},
close: function(){
$('body').removeClass('lightbox-opened');
var fixed=this.st.fixedContentPos;
if(fixed){
$('#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap').css(theme.rtl_browser ? 'left':'right', '');
}
$('.owl-carousel .owl-stage').each(function(){
var $this=$(this),
w=$this.width() + parseInt($this.css('padding-left') ) + parseInt($this.css('padding-right') );
$this.css({ 'width': w + 200 });
setTimeout(function(){
$this.css({ 'width': w });
}, 0);
});
var that=$(this._lastFocusedEl);
if(( that.parents('.portfolios-lightbox').hasClass('with-thumbs') )&&$(document).width() >=1024){
$(' body > .porto-portfolios-lighbox-thumbnails').remove();
}
}}
},
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
Search: {
defaults: {
popup: $('.searchform-popup'),
form: $('.searchform')
},
initialize: function($popup, $form){
this.$popup=($popup||this.defaults.popup);
this.$form=($form||this.defaults.form);
this.form_layout=this.$form.hasClass('search-layout-overlay') ? 'overlay':this.$form.hasClass('search-layout-reveal') ? 'reveal':false;
this.build()
.events();
return this;
},
build: function(){
var self=this;
var $search_form_texts=self.$form.find('.text input'),
$search_form_cats=self.$form.find('.cat');
if($('.searchform .cat').get(0)&&$.fn.selectric){
$('.searchform .cat').selectric({
arrowButtonMarkup: '',
expandToItemText: true,
maxHeight: 240
});
}
$search_form_texts.on('change', function(){
var $this=$(this),
val=$this.val();
$search_form_texts.each(function(){
if($this!=$(this) ) $(this).val(val);
});
});
$search_form_cats.on('change', function(){
var $this=$(this),
val=$this.val();
$search_form_cats.each(function(){
if($this!=$(this) ) $(this).val(val);
});
});
return this;
},
events: function(){
var self=this;
$('body').on('click', '.searchform-popup', function(e){
e.stopPropagation();
});
$('body').off('click', '.searchform-popup .search-toggle').on('click', '.searchform-popup .search-toggle', function(e){
var $this=$(this),
$form=$this.next();
$this.toggleClass('opened');
if('overlay'==self.form_layout){
$this.siblings('.search-layout-overlay').addClass('show');
$('html').addClass('porto-search-opened porto-search-overlay-wrap');
$this.closest('.vc_row.vc_row-flex>.vc_column_container>.vc_column-inner').css('z-index', '999');
}else if('reveal'==self.form_layout){
self.parents=[];
var $element=self.$popup;
while(!(( $element.hasClass('elementor-container')&&! $element.parent().hasClass('elementor-inner-container') )||($element.hasClass('e-con-inner')&&! $element.parent().hasClass('e-child') )||($element.parent().hasClass('vc_row')&&! $element.parent().hasClass('vc_inner') )||'header'==$element.parent().attr('id')||$element.parent().hasClass('header-main')||$element.parent().hasClass('header-top')||$element.parent().hasClass('header-bottom') )){
$element=$element.parent();
$element.addClass('position-static');
self.parents.push($element);
}
if('static'==$element.parent().css('position') ){
self.topParent=$element.parent();
self.topParent.addClass('position-relative');
}
$form.toggle();
window.setTimeout(function (){
$('body').addClass('porto-search-opened');
$form.find('.text>input[name="s"]').focus();
}, 100);
}else{
$form.toggle();
}
if($this.hasClass('opened') ){
$('#mini-cart.open').removeClass('open');
$this.next().find('input[type="text"]').focus();
if(self.$popup.find('.btn-close-search-form').length){
self.$popup.parent().addClass('position-static');
}}else if('reveal'==self.form_layout){
self.removeFormStyle();
}
e.preventDefault();
e.stopPropagation();
});
$('html,body').on('click', function(){
self.removeFormStyle();
});
if(!('ontouchstart' in document) ){
$(window).on('resize', function(){
self.removeFormStyle();
});
}
$('.btn-close-search-form').on('click', function(e){
e.preventDefault();
self.removeFormStyle();
});
return self;
},
removeFormStyle: function(){
this.$form.removeAttr('style');
var $searchToggle=this.$popup.find('.search-toggle');
$searchToggle.removeClass('opened');
if('overlay'==this.form_layout){
$('html').removeClass('porto-search-opened porto-search-overlay-wrap');
$searchToggle.siblings('.search-layout-overlay').removeClass('show');
$searchToggle.closest('.vc_row.vc_row-flex>.vc_column_container>.vc_column-inner').css('z-index', '');
}else if('reveal'==this.form_layout&&this.parents&&this.parents.length >=1){
$('body').removeClass('porto-search-opened');
this.parents.forEach($element=> {
$element.removeClass('position-static');
});
if(this.topParent){
this.topParent.removeClass('position-relative');
}}
if(this.$popup.find('.btn-close-search-form').length){
this.$popup.parent().removeClass('position-static');
}}
}});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__animate';
var Animate=function($el, opts){
return this.initialize($el, opts);
};
Animate.defaults={
accX: 0,
accY: -120,
delay: 1,
duration: 1000
};
Animate.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, true);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Animate.defaults, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
var self=this,
$el=this.options.wrapper,
delay=0,
duration=0;
if($el.data('appear-animation-svg') ){
$el.find('[data-appear-animation]').each(function(){
var $this=$(this),
opts;
var pluginOptions=theme.getOptions($this.data('plugin-options') );
if(pluginOptions)
opts=pluginOptions;
$this.themeAnimate(opts);
});
return this;
}
$el.addClass('appear-animation');
var el_obj=$el.get(0);
delay=Math.abs($el.data('appear-animation-delay') ? $el.data('appear-animation-delay'):self.options.delay);
duration=Math.abs($el.data('appear-animation-duration') ? $el.data('appear-animation-duration'):self.options.duration);
if('undefined'!==typeof $el.data('appear-animation')&&$el.data('appear-animation').includes('revealDir') ){
if(delay > 1){
el_obj.style.setProperty('--porto-reveal-animation-delay', delay + 'ms');
}
if(duration!=1000){
el_obj.style.setProperty('--porto-reveal-animation-duration', duration + 'ms');
}
if($el.data('animation-reveal-clr') ){
el_obj.style.setProperty('--porto-reveal-clr', $el.data('animation-reveal-clr') );
}}else{
if(delay > 1){
el_obj.style.animationDelay=delay + 'ms';
}
if(duration!=1000){
el_obj.style.animationDuration=duration + 'ms';
}}
$el.addClass($el.data('appear-animation') + ' appear-animation-visible');
return this;
}};
$.extend(theme, {
Animate: Animate
});
$.fn.themeAnimate=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this;
}else{
return new theme.Animate($this, opts);
}});
};}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__carousel';
var Carousel=function($el, opts){
return this.initialize($el, opts);
};
Carousel.defaults=$.extend({}, {
loop: true,
navText: [],
themeConfig: false,
lazyLoad: true,
lg: 0,
md: 0,
sm: 0,
xs: 0,
single: false,
rtl: theme.rtl
});
Carousel.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, true);
return this;
},
setOptions: function(opts){
if(( opts&&opts.themeConfig)||!opts){
this.options=$.extend(true, {}, Carousel.defaults, theme.owlConfig, opts, {
wrapper: this.$el,
themeConfig: true
});
}else{
this.options=$.extend(true, {}, Carousel.defaults, opts, {
wrapper: this.$el
});
}
return this;
},
calcOwlHeight: function($el){
var h=0;
$el.find('.owl-item.active').each(function(){
if(h < $(this).height())
h=$(this).height();
});
$el.children('.owl-stage-outer').height(h);
},
build: function(){
if(!$.fn.owlCarousel){
return this;
}
var $el=this.options.wrapper,
loop=this.options.loop,
lg=this.options.lg,
md=this.options.md,
sm=this.options.sm,
xs=this.options.xs,
single=this.options.single,
zoom=$el.find('.zoom').filter(function(){
if($(this).closest('.tb-image-type-slider').length){
return false;
}
return true;
}).get(0),
responsive={},
items,
count=$el.find('.owl-item').length > 0 ? $el.find('.owl-item:not(.cloned)').length:$el.find('> *').length,
fullscreen=typeof this.options.fullscreen=='undefined' ? false:this.options.fullscreen;
/*if(fullscreen){
$el.children().width(window.innerWidth - theme.getScrollbarWidth());
$el.children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height():window.innerHeight);
$el.children().css('max-height', '100%');
$(window).on('resize', function(){
$el.find('.owl-item').children().width(window.innerWidth - theme.getScrollbarWidth());
$el.find('.owl-item').children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height():window.innerHeight);
$el.find('.owl-item').children().css('max-height', '100%');
});
}*/
if(single){
items=1;
}else if(typeof this.options.responsive!='undefined'){
for(var w in this.options.responsive){
var number_items=Number(this.options.responsive[w]);
responsive[Number(w)]={ items: number_items, loop:(loop&&count >=number_items) ? true:false };}}else{
items=this.options.items ? this.options.items:(lg ? lg:1);
var isResponsive=(this.options.xxl||this.options.xl||lg||md||sm||xs);
if(isResponsive){
if(this.options.xxl){
responsive[theme.screen_xxl]={ items: this.options.xxl, loop:(loop&&count > this.options.xxl) ? true:false, mergeFit: this.options.mergeFit };}else if(lg&&items > lg + 1){
responsive[theme.screen_xxl]={ items: items, loop:(loop&&count > items) ? true:false, mergeFit: this.options.mergeFit };
responsive[theme.screen_xl]={ items: lg + 1, loop:(loop&&count > lg + 1) ? true:false, mergeFit: this.options.mergeFit };}
if(this.options.xl){
responsive[theme.screen_xl]={ items: this.options.xl, loop:(loop&&count > this.options.xl) ? true:false, mergeFit: this.options.mergeFit };}else if(typeof responsive[theme.screen_xl]=='undefined'&&(! lg||items!=lg) ){
responsive[theme.screen_xl]={ items: items, loop:(loop&&count >=items) ? true:false, mergeFit: this.options.mergeFit };}
if(lg) responsive[992]={ items: lg, loop:(loop&&count >=lg) ? true:false, mergeFit: this.options.mergeFit_lg };
if(md) responsive[768]={ items: md, loop:(loop&&count > md) ? true:false, mergeFit: this.options.mergeFit_md };
if(sm){
responsive[576]={ items: sm, loop:(loop&&count > sm) ? true:false, mergeFit: this.options.mergeFit_sm };}else{
if(xs&&xs > 1){
responsive[576]={ items: xs, loop:(loop&&count > xs) ? true:false, mergeFit: this.options.mergeFit_sm };}else{
responsive[576]={ items: 1, mergeFit: false };}}
if(xs){
responsive[0]={ items: xs, loop:(loop&&count > xs) ? true:false, mergeFit: this.options.mergeFit_xs };}else{
responsive[0]={ items: 1 };}}
}
if(!$el.hasClass('show-nav-title')&&this.options.themeConfig&&theme.slider_nav&&theme.slider_nav_hover){
$el.addClass('show-nav-hover');
}
this.options=$.extend(true, {}, this.options, {
items: items,
loop:(loop&&count > items) ? true:false,
responsive: responsive,
onInitialized: function(){
if($el.hasClass('stage-margin') ){
$el.find('.owl-stage-outer').css({
'margin-left': this.options.stagePadding,
'margin-right': this.options.stagePadding
});
}
var heading_cls='.porto-u-heading, .vc_custom_heading, .slider-title, .elementor-widget-heading, .porto-heading';
if($el.hasClass('show-dots-title')&&($el.prev(heading_cls).length||$el.closest('.slider-wrapper').prev(heading_cls).length||$el.closest('.porto-recent-posts').prev(heading_cls).length||$el.closest('.elementor-widget-porto_recent_posts, .elementor-section').prev(heading_cls).length) ){
var $obj=$el.prev(heading_cls);
if(!$obj.length){
$obj=$el.closest('.slider-wrapper').prev(heading_cls);
}
if(!$obj.length){
$obj=$el.closest('.porto-recent-posts').prev(heading_cls);
}
if(!$obj.length){
$obj=$el.closest('.elementor-widget-porto_recent_posts, .elementor-section').prev(heading_cls);
}
try {
var innerWidth=$obj.addClass('w-auto').css('display', 'inline-block').width();
$obj.removeClass('w-auto').css('display', '');
if(innerWidth + 15 + $el.find('.owl-dots').width() <=$obj.width()){
$el.find('.owl-dots').css(( $('body').hasClass('rtl') ? 'right':'left'), innerWidth + 15 +($el.width() - $obj.width()) / 2);
$el.find('.owl-dots').css('top', -1 * $obj.height() / 2 - parseInt($obj.css('margin-bottom') ) - $el.find('.owl-dots').height() / 2 + 2);
}else{
$el.find('.owl-dots').css('position', 'static');
}} catch(e){ }}
}});
if(this.options.autoHeight){
var thisobj=this;
$(window).on('resize', function(){
thisobj.calcOwlHeight($el);
});
if(theme.isLoaded){
setTimeout(function(){
thisobj.calcOwlHeight($el);
}, 100);
}else{
$(window).on('load', function(){
thisobj.calcOwlHeight($el);
});
}}
var links=false;
if(zoom){
links=[];
var i=0;
$el.find('.zoom').each(function(){
var slide={},
$zoom=$(this);
slide.src=$zoom.data('src') ? $zoom.data('src'):$zoom.data('mfp-src');
slide.title=$zoom.data('title');
links[i]=slide;
$zoom.data('index', i);
i++;
});
}
if($el.hasClass('show-nav-title') ){
this.options.stagePadding=0;
}else{
if(this.options.themeConfig&&theme.slider_nav&&theme.slider_nav_hover)
$el.addClass('show-nav-hover');
if(this.options.themeConfig&&!theme.slider_nav_hover&&theme.slider_margin)
$el.addClass('stage-margin');
}
if($el.hasClass('has-ccols-spacing') ){
$el.removeClass('has-ccols-spacing');
}
$el.owlCarousel(this.options);
if(zoom&&links){
$el.on('click', '.zoom', function(e){
e.preventDefault();
if($.fn.magnificPopup){
var image_index=$(this).data('index');
if(typeof image_index=='undefined'){
image_index=($(this).closest('.owl-item').index() - $el.find('.cloned').length / 2) % $el.data('owl.carousel').items().length;
}
$.magnificPopup.close();
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), image_index);
}
return false;
});
}
return this;
}}
$.extend(theme, {
Carousel: Carousel
});
$.fn.themeCarousel=function(opts, zoom){
if(typeof $.fn.owlCarousel!='function'){
return this;
}
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this;
}else{
return new theme.Carousel($this, opts, zoom);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
var instanceName='__lightbox';
var Lightbox=function($el, opts){
return this.initialize($el, opts);
};
Lightbox.defaults={
callbacks: {
open: function(){
$('body').addClass('lightbox-opened');
},
close: function(){
$('body').removeClass('lightbox-opened');
}}
};
Lightbox.prototype={
initialize: function($el, opts){
if($el.data(instanceName) ){
return this;
}
this.$el=$el;
this
.setData()
.setOptions(opts)
.build();
return this;
},
setData: function(){
this.$el.data(instanceName, this);
return this;
},
setOptions: function(opts){
this.options=$.extend(true, {}, Lightbox.defaults, theme.mfpConfig, opts, {
wrapper: this.$el
});
return this;
},
build: function(){
if(!$.fn.magnificPopup){
return this;
}
this.options.wrapper.magnificPopup(this.options);
return this;
}};
$.extend(theme, {
Lightbox: Lightbox
});
$.fn.themeLightbox=function(opts){
return this.map(function(){
var $this=$(this);
if($this.data(instanceName) ){
return $this.data(instanceName);
}else{
return new theme.Lightbox($this, opts);
}});
}}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
PostFilter: {
cache: {
},
defaults: {
elements: '.portfolio-filter'
},
initialize: function($elements, post_type){
this.$elements=($elements||$(this.defaults.elements) );
this.build(post_type);
return this;
},
filterFn: function(e){
if(typeof e=='undefined'||typeof e.data=='undefined'||typeof e.data.elements=='undefined'||!e.data.elements||!e.data.elements.length){
return;
}
var self=e.data.selfobj;
if(self.isLoading){
return false;
}
var $this=e.data.thisobj,
$elements=e.data.elements,
position=e.data.position,
post_type=e.data.post_type,
$parent=e.data.parent,
$posts_wrap=e.data.posts_wrap,
use_ajax=e.data.use_ajax,
page_path=e.data.page_path,
infinite_load=e.data.infinite_load,
load_more=e.data.load_more;
e.preventDefault();
if($(this).hasClass('active') ){
return;
}
self.isLoading=true;
var selector=$(this).attr('data-filter');
if('sidebar'==position){
$('.sidebar-overlay').trigger('click');
}
$this.find('.active').removeClass('active');
if(use_ajax){
var current_cat='*'==selector ? '':selector;
if(!page_path){
page_path=$posts_wrap.data('page_path');
}
if(page_path){
$posts_wrap.data('page_path', page_path.replace(/&category=[^&]*&/, '&category=' + current_cat + '&') );
}
$(this).addClass('active');
self.load_posts(current_cat, infinite_load||load_more ? true:false, $parent, post_type, $posts_wrap, undefined, $(this).children('a').attr('href') );
}else if('faq'==post_type){
$parent.find('.faq').each(function(){
var $that=$(this), easing="easeInOutQuart", timeout=300;
if(selector=='*'){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.hasClass(selector) ){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.css('display')!='none') $that.stop(true).slideUp(timeout, easing, function(){
$(this).attr('style', '').hide();
});
}}
});
if(!selected&&$parent.find('.faqs-infinite').length&&typeof($.fn.infinitescroll)!='undefined'){
$parent.find('.faqs-infinite').infinitescroll('retrieve');
}}else if($parent.hasClass('portfolios-timeline') ){
var selected=0;
$parent.find('.portfolio').each(function(){
var $that=$(this), easing="easeInOutQuart", timeout=300;
if(selector=='*'){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.hasClass(selector) ){
if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){
$(this).attr('style', '').show();
});
selected++;
}else{
if($that.css('display')!='none') $that.stop(true).slideUp(timeout, easing, function(){
$(this).attr('style', '').hide();
});
}}
});
if(!selected&&$parent.find('.portfolios-infinite').length&&typeof($.fn.infinitescroll)!='undefined'){
$parent.find('.portfolios-infinite').infinitescroll('retrieve');
}
setTimeout(function(){
theme.FilterZoom.initialize($parent);
}, 400);
}else{
$parent.find('.' + post_type + '-row').isotope({
filter: selector=='*' ? selector:'.' + selector
});
}
if(!use_ajax){
$(this).addClass('active');
self.isLoading=false;
}
if(position=='sidebar'){
self.$elements.each(function(){
var $that=$(this);
if($that==$this&&$that.data('position')!='sidebar') return;
$that.find('li').removeClass('active');
$that.find('li[data-filter="' + selector + '"]').addClass('active');
});
}
if(!use_ajax){
window.location.hash='#' + selector;
}
theme.refreshVCContent();
return false;
},
build: function(post_type_param){
var self=this;
self.$elements.each(function(){
var $this=$(this),
position=$this.data('position'),
$parent,
post_type;
if(typeof post_type_param=='undefined'){
if($this.hasClass('member-filter') ){
post_type='member';
}else if($this.hasClass('faq-filter') ){
post_type='faq';
}else if($this.hasClass('product-filter') ){
post_type='product';
}else if($this.hasClass('post-filter') ){
post_type='post';
}else if($this.hasClass('portfolio-filter') ){
post_type='portfolio';
}else{
post_type=$this.attr('data-filter-type');
}}else{
post_type=post_type_param;
}
if('sidebar'==position){
$parent=$('.main-content .page-' + post_type + 's');
}else if('global'==position){
$parent=$('.main-content .page-' + post_type + 's');
}else{
$parent=$this.closest('.page-' + post_type + 's');
}
if(!$parent.length){
$parent=$this.closest('.porto-posts-grid');
}
if(!$parent||!$parent.length){
return;
}
var use_ajax=$this.hasClass('porto-ajax-filter'),
infinite_load=$parent.hasClass('load-infinite'),
load_more=$parent.hasClass('load-more');
var $posts_wrap=$parent.find('.' + post_type + 's-container'),
page_path;
if(use_ajax&&(( !infinite_load&&!load_more)||!$parent.data('ajax_load_options') )){
var current_url=window.location.href;
if(-1!==current_url.indexOf('#') ){
current_url=current_url.split('#')[0];
}
page_path=theme.ajax_url +(-1===theme.ajax_url.indexOf('?') ? '?':'&')  + 'action=porto_ajax_posts&nonce=' + js_porto_vars.porto_nonce + '&post_type=' + post_type + '&current_link=' + current_url + '&category=&page=%cur_page%';
if($parent.data('post_layout') ){
page_path +='&post_layout=' + $parent.data('post_layout');
}
$posts_wrap.data('page_path', page_path);
}
$this.find('li').on('click', { thisobj: $this, selfobj: self, elements: self.$elements, position: position, parent: $parent, post_type: post_type, posts_wrap: $posts_wrap, use_ajax: use_ajax, page_path: page_path, infinite_load: infinite_load, load_more: load_more }, self.filterFn);
});
$(window).on('hashchange', { elements: self.$elements }, self.hashchange);
self.hashchange({ data: { elements: self.$elements }});
return self;
},
hashchange: function(e){
if(typeof e=='undefined'||typeof e.data=='undefined'||typeof e.data.elements=='undefined'||!e.data.elements||!e.data.elements.length){
return;
}
var $elements=e.data.elements,
$filter=$($elements.get(0) ),
hash=window.location.hash;
if(hash){
var $o=$filter.find('li[data-filter="' + hash.replace('#', '') + '"]');
if(!$o.hasClass('active') ){
$o.trigger('click');
}}
},
set_elements: function($elements){
var self=this;
if(typeof $elements=='undefined'||!$elements||!$elements.length){
self.destroy(self.$elements);
return;
}
self.$elements=$elements;
$(window).off('hashchange', self.hashchange).on('hashchange', { elements: $elements }, self.hashchange);
},
destroy: function($elements){
if(typeof $elements=='undefined'||!$elements||!$elements.length){
return;
}
var self=this;
$elements.find('li').off('click', self.filterFn);
$(window).off('hashchange', self.hashchange);
},
load_posts: function(cat, is_infinite, $parent, post_type, $posts_wrap, default_args, page_url){
var _gridcookie='';
if($parent.hasClass('archive-products') ){
_gridcookie=new URLSearchParams(location.search.substring(1) ).get('gridcookie');
if(!(_gridcookie==null||_gridcookie==''||_gridcookie=='grid') ){
page_url=theme.addUrlParam(page_url, 'gridcookie', _gridcookie);
}}
var pid=$parent.attr('id'),
self=this,
is_archive=$parent.hasClass('archive-posts'),
successfn=function(res, directcall){
if(!res){
return;
}
if(( typeof directcall=='undefined'||true!==directcall)&&typeof default_args=='undefined'&&pid){
if(!self.cache[pid]){
self.cache[pid]={};}
self.cache[pid][cat + _gridcookie]=res;
}
var $res=$(res),
is_shop=$parent.hasClass('archive-products'),
$posts=$res.find(is_archive ? '.archive-posts .posts-wrap':'.posts-wrap').children();
if(!$posts.length){
return;
}
if(typeof $posts_wrap=='undefined'||is_archive){
$posts_wrap=$parent.find('.' + post_type + 's-container');
}
if(!$posts_wrap.length){
return;
}
if($posts_wrap.data('isotope') ){
$posts_wrap.isotope('remove', $posts_wrap.children());
}else{
$posts_wrap.children().remove();
}
if($posts_wrap.hasClass('owl-loaded') ){
$posts_wrap.removeClass('owl-loaded');
}
$posts.children().addClass('fadeInUp animated');
$posts_wrap.append($posts);
theme.refreshVCContent($posts);
var $old_filter=$parent.find('.' + post_type + '-filter');
if($old_filter.length&&!$old_filter.hasClass('porto-ajax-filter')&&!$parent.hasClass('load-infinite')&&!$parent.hasClass('load-more') ){
var $new_filter=$res.find(( is_archive ? '.archive-posts ':'') + '.' + post_type + '-filter');
if($new_filter.length){
$old_filter.find('li:first-child').trigger('click');
theme.PostFilter.destroy($old_filter);
$old_filter.replaceWith($new_filter);
theme.PostFilter.initialize($new_filter, post_type);
theme.PostFilter.set_elements($('ul[data-filter-type], ul.portfolio-filter, ul.member-filter, ul.faq-filter, .porto-ajax-filter.product-filter, .porto-ajax-filter.post-filter') );
}}
porto_init($parent);
var behavior_action='';
if(post_type!='product'&&post_type!='member'&&post_type!='faq'&&post_type!='portfolio'&&post_type!='post'){
behavior_action='ptu';
}else{
behavior_action=post_type;
}
theme.PostsInfinite[behavior_action + 'Behavior']($posts, $posts_wrap);
$(document.body).trigger('porto_init_countdown', [$posts_wrap]);
var $old_pagination=$parent.find('.pagination-wrap'),
$new_pagination=$res.find(( is_archive ? '.archive-posts ':'') + '.pagination-wrap').eq(0),
has_pagination=false,
nst_pagination=false;
if($old_pagination.length){
if($new_pagination.length){
$old_pagination.replaceWith($new_pagination);
has_pagination=true;
nst_pagination=true;
}else{
$old_pagination.children().remove();
}}else if($new_pagination.length){
$parent.append($new_pagination);
has_pagination=true;
nst_pagination=true;
}
if(is_shop){
let _paginationWrap=$('.woocommerce-pagination');
var $old_pagination=_paginationWrap.find('ul.page-numbers'),
$new_pagination=$res.find('.woocommerce-pagination ul.page-numbers').eq(0),
has_pagination=false;
if($old_pagination.length){
if($new_pagination.length){
$old_pagination.replaceWith($new_pagination);
has_pagination=true;
}else{
$old_pagination.children().remove();
}}else if($new_pagination.length){
_paginationWrap.append($new_pagination);
has_pagination=true;
}}
if(is_infinite){
var infinitescroll_ins=$posts_wrap.data('infinitescroll');
if(has_pagination||(is_shop&&nst_pagination) ){
var $new_posts_wrap=$res.find(is_archive ? '.archive-posts .posts-wrap':'.posts-wrap');
if($new_posts_wrap.data('cur_page') ){
$posts_wrap.data('cur_page', $new_posts_wrap.data('cur_page') );
$posts_wrap.data('max_page', $new_posts_wrap.data('max_page') );
}
var should_init_again=true;
if(infinitescroll_ins){
if(infinitescroll_ins.options.state.isDestroyed){
$posts_wrap.removeData('infinitescroll');
}else{
should_init_again=false;
if($new_posts_wrap.data('cur_page') ){
infinitescroll_ins.update({
maxPage: $new_posts_wrap.data('max_page'),
state: {
currPage: $new_posts_wrap.data('cur_page')
}});
}
if(infinitescroll_ins.options.state.isPaused){
infinitescroll_ins.resume();
}}
}
if(should_init_again){
var ins=$posts_wrap.data('__postsinfinite');
if(ins){
ins.destroy();
}
var selector_product='.' + post_type + ', .timeline-date';
if(is_shop){
selector_product='.archive-products .products';
if($('.elementor-widget-wc-archive-products').length){
selector_product='.elementor-widget-wc-archive-products .products';
}}
new theme.PostsInfinite($posts_wrap, selector_product, $posts_wrap.data('infiniteoptions'), post_type);
}
if(is_archive){
var page_path=$posts_wrap.siblings('.pagination-wrap').find('.next').attr('href');
if(page_path){
page_path +=(-1!==page_path.indexOf('?') ? '&':'?') + 'portoajax=1&load_posts_only=2';
page_path=page_path.replace(/(paged=)(\d+)|(page\/)(\d+)/, '$1$3%cur_page%');
$posts_wrap.data('page_path', page_path);
}}
var selector_product='.' + post_type + ', .timeline-date';
if(is_shop){
selector_product='.archive-products .products';
if($('.elementor-widget-wc-archive-products').length){
selector_product='.elementor-widget-wc-archive-products .products';
}}
new theme.PostsInfinite($posts_wrap, selector_product, $posts_wrap.data('infiniteoptions'), post_type);
}}
if(is_archive){
$('.sidebar-content').each(function(index){
var $this=$(this),
$that=$($res.find('.sidebar-content').get(index) );
$this.html($that.html());
if(is_shop){
if(typeof updateSelect2!='undefined'&&updateSelect2){
if(jQuery().selectWoo){
var porto_wc_layered_nav_select=function(){
$this.find('select.woocommerce-widget-layered-nav-dropdown').each(function(){
$(this).selectWoo({
placeholder: $(this).find('option').eq(0).text(),
minimumResultsForSearch: 5,
width: '100%',
allowClear: typeof $(this).attr('multiple')!='undefined'&&$(this).attr('multiple')=='multiple' ? 'false':'true'
});
});
};
porto_wc_layered_nav_select();
}
$('body').children('span.select2-container').remove();
}}
});
if(is_shop){
var $script=$res.filter('script:contains("var woocommerce_price_slider_params")').first();
if($script&&$script.length&&$script.text().indexOf('{')!==-1&&$script.text().indexOf('}')!==-1){
var arrStr=$script.text().substring($script.text().indexOf('{'), $script.text().indexOf('}') + 1);
window.woocommerce_price_slider_params=JSON.parse(arrStr);
}
var $title=$('.entry-title');
if($title.length){
var $newTitle=$res.find('.entry-title').eq(0);
if($newTitle.length){
$title.html($newTitle.html());
}}
var $desc=$('.entry-description');
if($desc.length){
var $newDesc=$res.find('.entry-description').eq(0);
if($newDesc.length){
$desc.html($newDesc.html());
}}
var shop_before='.shop-loop-before',
$shop_before=$(shop_before);
if($shop_before.length){
if($res.find(shop_before).length){
$shop_before.each(function(index){
var $res_shop_before=$res.find(shop_before).eq(index);
if($res_shop_before.length){
$(this).html($res_shop_before.html()).show();
}});
}else{
$shop_before.empty();
}}
var $count=$('.woocommerce-result-count');
if($count.length){
var $newCount=$res.find('.woocommerce-result-count').eq(0);
if($newCount.length){
$count[0].outerHTML=$newCount.length ? $newCount[0].outerHTML:'';
}}
$(document).trigger('yith_wcan_init_shortcodes');
$(document).trigger('yith-wcan-ajax-filtered');
}
if(page_url&&!navigator.userAgent.match(/msie/i) ){
window.history.pushState({ 'pageTitle':(res&&res.pageTitle)||'' }, '', page_url);
}}
$(document.body).trigger('porto_load_posts_end', [$parent.parent()]);
};
if(typeof default_args=='undefined'&&typeof self.cache[pid]!='undefined'&&typeof self.cache[pid][cat+ _gridcookie]!='undefined'&&self.cache[pid][cat+ _gridcookie]){
successfn(self.cache[pid][cat+ _gridcookie], true);
self.isLoading=false;
$parent.removeClass('porto-ajax-loading').removeClass('loading').find('.porto-loading-icon').remove();
return;
}
var ajax_load_options=$parent.data('ajax_load_options');
if(( $parent.hasClass('archive-products')&&-1!=js_porto_vars.use_skeleton_screen.indexOf('shop') ) ||
(is_archive&&-1!=js_porto_vars.use_skeleton_screen.indexOf('blog') )){
$posts_wrap=$parent.find('.' + post_type + 's-container');
if(ajax_load_options){
var tag_name='div';
if('product'==post_type&&'ul'==$posts_wrap.get(0).tagName.toLowerCase()){
tag_name='li';
}
$posts_wrap.addClass('skeleton-body').empty();
for(var i=0; i < Number(ajax_load_options.count||(ajax_load_options.columns&&ajax_load_options.columns * 3)||12); i++){
$posts_wrap.append('<' + tag_name + ' class="porto-tb-item post ' + post_type +('product'==post_type ? ' product-col':'') + '"></' + tag_name + '>');
}}else{
$posts_wrap.addClass('skeleton-body').children().empty();
}}else{
if(!$parent.children('.porto-loading-icon').length){
$parent.append('<i class="porto-loading-icon"></i>');
}
$parent.addClass('porto-ajax-loading');
}
var current_url=window.location.href;
if(-1!==current_url.indexOf('#') ){
current_url=current_url.split('#')[0];
}
var args, load_url=theme.ajax_url;
if($parent.hasClass('archive-posts') ){
args={
portoajax: true,
load_posts_only: true
};
if($parent.closest('.porto-block').length){
args['builder_id']=$parent.closest('.porto-block').data('id');
}
load_url=typeof page_url!='undefined' ? page_url:current_url;
}else{
args={
action: 'porto_ajax_posts',
nonce: js_porto_vars.porto_nonce,
post_type: post_type,
current_link: current_url
};
if($parent.data('post_layout') ){
args['post_layout']=$parent.data('post_layout');
}
if(ajax_load_options){
args['extra']=ajax_load_options;
}
if(typeof default_args!='undefined'){
args=$.extend(args, default_args);
}}
if(cat){
args['category']=cat;
}
$.ajax({
url: load_url,
type: 'post',
data: args,
success: successfn,
complete: function(){
self.isLoading=false;
$posts_wrap.removeClass('skeleton-body');
$parent.removeClass('porto-ajax-loading').removeClass('loading').find('.porto-loading-icon').remove();
}});
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
'use strict';
theme=theme||{};
$.extend(theme, {
FilterZoom: {
defaults: {
elements: null
},
initialize: function($elements){
this.$elements=($elements||this.defaults.elements);
this.build();
return this;
},
build: function(){
var self=this;
self.$elements.each(function(){
var $this=$(this),
zoom=$this.find('.zoom, .thumb-info-zoom').get(0);
if(!zoom) return;
$this.find('.zoom, .thumb-info-zoom').off('click');
var links=[];
var i=0;
$this.find('article').each(function(){
var $that=$(this);
if($that.css('display')!='none'){
var $zoom=$that.find('.zoom, .thumb-info-zoom'),
slide,
src=$zoom.data('src'),
title=$zoom.data('title');
$zoom.data('index', i);
if(Array.isArray(src) ){
$.each(src, function(index, value){
slide={};
slide.src=value;
slide.title=title[index];
links[i]=slide;
i++;
});
}else{
slide={};
slide.src=src;
slide.title=title;
links[i]=slide;
i++;
}}
});
$this.find('article').each(function(){
var $that=$(this);
if($that.css('display')!='none'){
$that.off('click', '.zoom, .thumb-info-zoom').on('click', '.zoom, .thumb-info-zoom', function(e){
var $zoom=$(this), $parent=$zoom.parents('.thumb-info'), offset=0;
if($parent.get(0) ){
var $slider=$parent.find('.porto-carousel');
if($slider.get(0) ){
offset=$slider.data('owl.carousel').current() - $slider.find('.cloned').length / 2;
}}
e.preventDefault();
if($.fn.magnificPopup){
$.magnificPopup.close();
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), $zoom.data('index') + offset);
}
return false;
});
}});
});
return self;
}}
});
}).apply(this, [window.theme, jQuery]);
(function(theme, $){
theme.initAsync=function($wrap, wrapObj){
if($.fn.themeAnimate&&typeof wrapObj!='undefined'){
$(function(){
var svgAnimates=wrapObj.querySelectorAll('svg [data-appear-animation]');
if(svgAnimates.length){
$(svgAnimates).closest('svg').attr('data-appear-animation-svg', '1');
}
var $animates=wrapObj.querySelectorAll('[data-plugin-animate], [data-appear-animation], [data-appear-animation-svg]');
if($animates.length){
var animateResize=function(){
if(window.innerWidth < 768){
window.removeEventListener('resize', animateResize);
$animates.forEach(function(o){
o.classList.add('appear-animation-visible');
});
}};
if(theme.animation_support){
window.addEventListener('resize', animateResize);
theme.dynIntObsInit($animates, 'themeAnimate', theme.Animate.defaults);
}else{
$animates.forEach(function(o){
o.classList.add('appear-animation-visible');
});
}}
});
}
if($.fn.themeCarousel){
$(function(){
var portoImgNavMiddle=function($el){
var $images=$el.find('.owl-item img'),
height=0;
for(var i=0; i < $images.length; i++){
var imgHeight=$images.eq(i).height();
if(height < imgHeight){
height=imgHeight;
}}
if($el.hasClass('products-slider') ){
$el.children('.owl-nav').css('top',(5 + height / 2) + 'px');
}else{
$el.children('.owl-nav').css('top', height / 2 + 'px');
}};
var portoCarouselInit=function(e){
var $this=$(e.currentTarget);
$this.find('[data-appear-animation]:not(.appear-animation)').addClass('appear-animation');
if($this.find('.owl-item.cloned').length){
var $not_loaded=$this.find('img.lazy:not(.loaded)');
if($not_loaded.length){
if(typeof window.w3tc_lazyload=='object'){
window.w3tc_lazyload.update();
}else if(theme.w3tcLazyLoadInstance){
theme.w3tcLazyLoadInstance.update();
}}
$this.find('.porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad({ effect: 'fadeIn', effect_speed: 400 });
var $animates=e.currentTarget.querySelectorAll('.appear-animation');
if($animates.length){
if(theme.animation_support){
theme.dynIntObsInit($animates, 'themeAnimate', theme.Animate.defaults);
}else{
$animates.forEach(function(o){
o.classList.add('appear-animation-visible');
});
}}
if($.fn.themePluginAnimatedLetters&&($(this).find('.owl-item.cloned [data-plugin-animated-letters]:not(.manual)').length) ){
theme.dynIntObsInit($(this).find('.owl-item.cloned [data-plugin-animated-letters]:not(.manual)'), 'themePluginAnimatedLetters');
}}
setTimeout(function(){
var $hiddenItems=$this.find('.owl-item:not(.active)');
if(theme.animation_support){
$hiddenItems.find('.appear-animation').removeClass('appear-animation-visible');
$hiddenItems.find('.appear-animation').each(function(){
var $el=$(this),
delay=Math.abs($el.data('appear-animation-delay') ? $el.data('appear-animation-delay'):0);
if(delay > 1){
this.style.animationDelay=delay + 'ms';
}
var duration=Math.abs($el.data('appear-animation-duration') ? $el.data('appear-animation-duration'):1000);
if(1000!=duration){
this.style.animationDuration=duration + 'ms';
}});
}
if(window.innerWidth >=1200){
$hiddenItems.find('[data-vce-animate]').removeAttr('data-vcv-o-animated');
}
if($this.hasClass('nav-center-images-only') ){
portoImgNavMiddle($this);
}}, 300);
};
var portoCarouselTranslated=function(e){
var $this=$(e.currentTarget);
var $active=$this.find('.owl-item.active');
if($active.hasClass('translating') ){
$active.removeClass('translating');
return;
}
$this.find('.owl-item.translating').removeClass('translating');
$this.find('[data-plugin-animated-letters]').removeClass('invisible');
$this.find('.owl-item.active [data-plugin-animated-letters]').trigger('animated.letters.initialize');
if(window.innerWidth > 767){
$this.find('.appear-animation').removeClass('appear-animation-visible');
$active.find('.appear-animation').each(function(){
var $animation_item=$(this),
anim_name=$animation_item.data('appear-animation');
$animation_item.addClass(anim_name + ' appear-animation-visible');
});
}
if(window.innerWidth > 991){
if($this.closest('[data-plugin-sticky]').length){
theme.refreshStickySidebar(false, $this.closest('[data-plugin-sticky]') );
}}
$active.find('.slide-animate').each(function(){
var $animation_item=$(this),
settings=$animation_item.data('settings');
if(settings&&(settings._animation||settings.animation) ){
var animation=settings._animation||settings.animation,
delay=settings._animation_delay||settings.animation_delay||0;
theme.requestTimeout(function(){
$animation_item.removeClass('elementor-invisible').addClass('animated ' + animation);
}, delay);
}});
if(window.innerWidth >=1200){
$this.find('[data-vce-animate]').removeAttr('data-vcv-o-animated').removeAttr('data-vcv-o-animated-fully');
$active.find('[data-vce-animate]').each(function(){
var $animation_item=$(this);
if($animation_item.data('porto-origin-anim') ){
var anim_name=$animation_item.data('porto-origin-anim');
$animation_item.attr('data-vce-animate', anim_name).attr('data-vcv-o-animated', true);
var duration=parseFloat(window.getComputedStyle(this)['animationDuration']) * 1000,
delay=parseFloat(window.getComputedStyle(this)['animationDelay']) * 1000;
window.setTimeout(function(){
$animation_item.attr('data-vcv-o-animated-fully', true);
}, delay + duration + 5);
}});
}};
var portoCarouselTranslateVC=function(e){
var $this=$(e.currentTarget);
$this.find('.owl-item.active').addClass('translating');
if(window.innerWidth >=1200){
$this.find('[data-vce-animate]').each(function(){
var $animation_item=$(this);
$animation_item.data('porto-origin-anim', $animation_item.data('vce-animate') ).attr('data-vce-animate', '');
});
}};
var portoCarouselTranslateElementor=function(e){
var $this=$(e.currentTarget);
$this.find('.owl-item.active').addClass('translating');
$this.find('.owl-item:not(.active) .slide-animate').addClass('elementor-invisible');
$this.find('.slide-animate').each(function(){
var $animation_item=$(this),
settings=$animation_item.data('settings');
if(settings._animation||settings.animation){
$animation_item.removeClass(settings._animation||settings.animation);
}});
};
var portoCarouselTranslateWPB=function(e){
if(window.innerWidth > 767){
var $this=$(e.currentTarget);
$this.find('.owl-item.active').addClass('translating');
$this.find('.appear-animation').each(function(){
var $animation_item=$(this);
$animation_item.removeClass($animation_item.data('appear-animation') );
});
}};
var carouselItems=$wrap.find('.owl-carousel:not(.manual)');
carouselItems.on('initialized.owl.carousel refreshed.owl.carousel', portoCarouselInit).on('translated.owl.carousel', portoCarouselTranslated);
carouselItems.on('translate.owl.carousel', function(){
$(this).find('[data-plugin-animated-letters]').addClass('invisible');
$(this).find('[data-plugin-animated-letters]').trigger('animated.letters.destroy');
});
carouselItems.on('resized.owl.carousel', function (){
var $this=$(this);
if($this.hasClass('nav-center-images-only') ){
portoImgNavMiddle($this);
}})
carouselItems.filter(function(){
if($(this).find('[data-vce-animate]').length){
return true;
}
return false;
}).on('translate.owl.carousel', portoCarouselTranslateVC);
carouselItems.filter(function(){
var $anim_obj=$(this).find('.elementor-invisible');
if($anim_obj.length){
$anim_obj.addClass('slide-animate');
return true;
}
return false;
}).on('translate.owl.carousel', portoCarouselTranslateElementor);
carouselItems.filter(function(){
if($(this).find('.appear-animation, [data-appear-animation]').length){
return true;
}
return false;
}).on('translate.owl.carousel', portoCarouselTranslateWPB);
$wrap.find('[data-plugin-carousel]:not(.manual), .porto-carousel:not(.manual)').each(function(){
var $this=$(this),
opts;
if($this.closest('.tab-pane').length&&! $this.closest('.tab-pane').hasClass('active') ){
return;
}
if($this.closest('.e-n-tabs-content > .e-con').length&&! $this.closest('.e-n-tabs-content > .e-con').hasClass('e-active') ){
return;
}
if($this.closest('.sidebar-menu:not(.side-menu-accordion) .menu-block').length){
return;
}
if($this.closest('.mega-menu .menu-block').length){
return;
}
var pluginOptions=$this.data('plugin-options');
if(pluginOptions)
opts=pluginOptions;
setTimeout(function(){
$this.themeCarousel(opts);
}, 0);
});
});
}
$wrap.find('.video-fixed').each(function(){
var $this=$(this),
$video=$this.find('video, iframe');
if($video.length){
window.addEventListener('scroll', function(){
var offset=$(window).scrollTop() - $this.position().top + theme.adminBarHeight();
$video.css("cssText", "top: " + offset + "px !important;");
}, { passive: true });
}});
setTimeout(function(){
if(typeof theme.Search!=='undefined'){
theme.Search.initialize();
}}, 0);
$(document.body).trigger('porto_after_async_init', [ $wrap, wrapObj ]);
};
$(document.body).trigger('porto_async_init');
}).apply(this, [window.theme, jQuery]);
jQuery(document).ready(function($){
'use strict';
function porto_modal_open($this){
var trigger=$this.data('trigger-id'),
overlayClass=$this.data('overlay-class'),
disableOverlay=$this.data('disable-overlay'),
extraClass=$this.data('extra-class') ? $this.data('extra-class'):'',
type=$this.data('type');
if(typeof trigger!='undefined'){
if(typeof type=='undefined'){
type='inline';
}
if(type=='inline'){
trigger='#' + escape(trigger);
}
var args={
items: {
src: trigger
},
type: type,
mainClass: extraClass +(disableOverlay ? ' popup-builder-disable-overlay ':''),
prependTo: $('.page-wrapper')
};
if(trigger=='#popup-builder'){
args['fixedContentPos']=true;
}
var $popupModal=$this;
if($this.hasClass('porto-onload')||$this.hasClass('porto-exit-intent') ){
if(disableOverlay){
args['closeOnBgClick']=false;
args['fixedContentPos']=false;
args['focus']='.bb-none';
}
args['callbacks']={
'beforeClose': function(){
if($('.mfp-wrap .porto-disable-modal-onload').length&&($('.mfp-wrap .porto-disable-modal-onload').is(':checked')||$('.mfp-wrap .porto-disable-modal-onload input[type="checkbox"]').is(':checked') )){
$.cookie('porto_modal_disable_onload', 'true', { expires: 7 });
}else if('undefined'!==typeof $popupModal.data('expired')&&'undefined'!==typeof $popupModal.data('popup-id') ){
$.cookie('porto_modal_disable_period_onload_' + $popupModal.data('popup-id'), $popupModal.data('expired'), { expires: $popupModal.data('expired') });
}},
'afterClose': function(){
if($('#header .minicart-opened').length){
$('html').css(theme.rtl_browser ? 'margin-left':'margin-right', theme.getScrollbarWidth());
$('html').css('overflow', 'hidden');
}},
'open': function (){
if(disableOverlay){
$('.popup-builder.mfp-bg').remove();
}
var $popup_builder=$('.mfp-wrap .porto-block[data-bs-original-title]');
if($popup_builder.length){
bootstrap.Tooltip.getInstance($popup_builder[0]).update();
}
if($('.mfp-wrap .porto-block .owl-carousel') ){
$('.mfp-wrap .porto-block .owl-carousel').trigger('refresh.owl.carousel');
}}
};}
if(typeof overlayClass!="undefined"&&overlayClass){
args.mainClass +=escape(overlayClass);
}
setTimeout(()=> {
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, args), 0);
});
}}
theme.porto_modal_open=porto_modal_open;
function porto_init_magnific_popup_functions($wrap){
if(typeof $wrap=='undefined'||!$wrap.length){
$wrap=$(document.body);
}
$wrap.find('.lightbox:not(.manual)').each(function(){
var $this=$(this),
opts;
if($this.find('>.lb-dataContainer').length){
return;
}
var pluginOptions=$this.data('lightbox-options');
if(pluginOptions){
opts=pluginOptions;
}else{
pluginOptions=$this.data('plugin-options');
if(typeof pluginOptions!='object'){
pluginOptions=JSON.parse(pluginOptions);
}
if(pluginOptions){
opts=pluginOptions;
}}
$this.themeLightbox(opts);
});
$wrap.find('.porto-popup-iframe').magnificPopup($.extend(true, {}, theme.mfpConfig, {
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
}) );
$wrap.find('.porto-popup-ajax').magnificPopup($.extend(true, {}, theme.mfpConfig, {
type: 'ajax'
}) );
$wrap.find('.porto-popup-content').each(function(){
var animation=$(this).attr('data-animation');
$(this).magnificPopup($.extend(true, {}, theme.mfpConfig, {
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: animation
}) );
});
$wrap.find('.popup-youtube, .popup-vimeo, .popup-gmaps').each(function(index){
var overlayClass=$(this).find('.porto-modal-trigger').data('overlay-class'),
args={
type: 'iframe',
removalDelay: 160,
preloader: false,
fixedContentPos: false
};
if(typeof overlayClass!="undefined"&&overlayClass){
args.mainClass=escape(overlayClass);
}
$(this).magnificPopup(args);
});
if($wrap.find('.porto-modal-trigger.porto-onload').length){
var $obj=$wrap.find('.porto-modal-trigger.porto-onload').eq(0),
timeout=0;
if($obj.data('timeout') ){
timeout=parseInt($obj.data('timeout'), 10);
}
setTimeout(function(){
porto_modal_open($obj);
}, timeout);
}
$wrap.on('click', '.porto-modal-trigger', function(e){
e.preventDefault();
porto_modal_open($(this) );
});
if($wrap.hasClass('login-popup') ){
$wrap.find('.porto-link-login, .porto-link-register').magnificPopup({
items: {
src: theme.ajax_url +(-1===theme.ajax_url.indexOf('?') ? '?':'&')  + 'action=porto_account_login_popup&nonce=' + js_porto_vars.porto_nonce,
type: 'ajax'
},
tLoading: '<i class="porto-loading-icon"></i>',
callbacks: {
ajaxContentAdded: function(){
$(window).trigger('porto_login_popup_opened');
}}
});
}
if(typeof PhotoSwipe!='undefined'){
let _images=$wrap.find('.product-images'), links=[], i=0;
_images.find('img').each(function(){
var slide={};
slide.src=$(this).attr('href');
slide.title=$(this).attr('alt');
slide.w=parseInt($(this).attr('data-large_image_width') );
slide.h=parseInt($(this).attr('data-large_image_height') );
links[i]=slide;
i++;
});
_images.data('links', links);
_images.on('click', '.img-thumbnail a.zoom', function(e){
e.preventDefault();
var options=$.extend({
index: $(this).closest('.img-thumbnail').index(),
addCaptionHTMLFn: function(item, captionEl){
if(! item.title){
captionEl.children[0].textContent='';
return false;
}
captionEl.children[0].textContent=item.title;
return true;
}}, wc_single_product_params.photoswipe_options);
var photoswipe=new PhotoSwipe($('.pswp')[0], PhotoSwipeUI_Default, _images.data('links'), options);
photoswipe.init();
});
}else{
$wrap.find('.product-images').magnificPopup($.extend(true, {}, theme.mfpConfig, {
delegate: '.img-thumbnail a.zoom',
type: 'image',
gallery: { enabled: true }})
);
}
$wrap.find('.porto-posts-grid').each(function(){
$(this).magnificPopup($.extend(true, {}, theme.mfpConfig, {
delegate: '.porto-tb-featured-image span.zoom, .porto-tb-featured-image a.zoom, .post-image span.zoom',
type: 'image',
gallery: { enabled: true }})
);
});
$wrap.find('.porto-posts-grid .tb-image-type-slider div.zoom').each(function(){
var $this=$(this),
links=[];
$this.find('a').each(function(){
var slide={};
slide.src=$(this).attr('href');
slide.title=$(this).attr('title');
links.push(slide);
});
if(links.length){
$this.on('click', function(){
var $slider=$this.siblings('.porto-carousel');
if($slider.length){
var offset=$slider.data('owl.carousel').current() - $slider.find('.cloned').length / 2;
$.magnificPopup.open($.extend(true, {}, theme.mfpConfig, {
items: links,
gallery: {
enabled: true
},
type: 'image'
}), offset);
}});
}});
}
if($.fn.magnificPopup){
porto_init_magnific_popup_functions();
}else{
setTimeout(function(){
if($.fn.magnificPopup){
porto_init_magnific_popup_functions();
}}, 500);
}
$(document.body).on('porto_load_posts_end', function(e, $posts_wrap){
if($.fn.magnificPopup){
porto_init_magnific_popup_functions($posts_wrap);
}});
if(typeof theme.PostFilter!=='undefined'){
var $postFilterElements=$('ul[data-filter-type], .portfolio-filter, .member-filter, .faq-filter, .porto-ajax-filter.product-filter, .porto-ajax-filter.post-filter');
if($postFilterElements.length){
theme.PostFilter.initialize($postFilterElements);
}}
$('body').on('click', '.porto-ajax-load .pagination:not(.load-more) .page-numbers', function(e){
var $this=$(this);
if($this.hasClass('current')||$this.hasClass('dots') ){
return;
}
e.preventDefault();
var $wrap=$this.closest('.porto-ajax-load'),
post_type=$wrap.data('post_type'),
$obj=$wrap.find('.' + post_type + 's-container');
if(!$obj.length||$wrap.hasClass('loading') ){
return;
}
$wrap.addClass('loading');
var $filter=$wrap.find('.porto-ajax-filter'),
cat=$filter.length&&$filter.children('.active').length&&$filter.children('.active').data('filter');
if('*'==cat){
cat='';
}
var default_args={},
page=$this.attr('href').match(/paged=(\d+)|page\/(\d+)/);
if(page&&Array.isArray(page)&&(page[1]||page[2]) ){
default_args['page']=parseInt(page[1]||page[2]);
}else{
if($this.hasClass('prev') ){
default_args['page']=parseInt($this.next().text());
}else if($this.hasClass('next') ){
default_args['page']=parseInt($this.prev().text());
}else{
default_args['page']=parseInt($this.text());
}}
if(cat==''&&$wrap.find('input[type=hidden].category').length){
cat=$wrap.find('input[type=hidden].category').val();
default_args['taxonomy']=$wrap.find('input[type=hidden].taxonomy').val();
}
theme.PostFilter.load_posts(cat, $wrap.hasClass('load-infinite'), $wrap, post_type, $obj, default_args, $this.attr('href') );
});
if(typeof theme.FilterZoom!=='undefined'){
theme.FilterZoom.initialize($('.page-portfolios') );
theme.FilterZoom.initialize($('.page-members') );
theme.FilterZoom.initialize($('.blog-posts-related') );
}
var $minicart_offcanvas=$('.minicart-offcanvas'),
$wl_offcanvas=$('.wishlist-offcanvas'),
$mobile_sidebar=$('.mobile-sidebar'),
$mobile_panel=$('#side-nav-panel'),
$overlay_search=$('#header .btn-close-search-form'),
$html=$('html');
if($minicart_offcanvas.length||$wl_offcanvas.length||$mobile_sidebar.length||$mobile_panel.length||$('.skeleton-loading').length||$overlay_search.length){
$(document.documentElement).on('keyup', function(e){
try {
if(e.keyCode==27){
$minicart_offcanvas.removeClass('minicart-opened');
$wl_offcanvas.removeClass('minicart-opened');
if($mobile_sidebar.length){
$html.removeClass('filter-sidebar-opened');
$html.removeClass('sidebar-opened');
$('.sidebar-overlay').removeClass('active');
$('html').css('overflow', '');
$('html').css(theme.rtl_browser ? 'margin-left':'margin-right', '');
}
if($mobile_panel.length&&$html.hasClass('panel-opened') ){
$html.removeClass('panel-opened');
$('.panel-overlay').removeClass('active');
}
if($overlay_search.length){
$overlay_search.trigger('click');
}}
} catch(err){ }});
$('.skeleton-loading').on('skeleton-loaded', function(){
$mobile_sidebar=$('.mobile-sidebar');
});
}});
(function(t,a){"use strict";var e;t=t||{},a.extend(t,{PostAjaxModal:{defaults:{elements:".page-portfolios"},initialize:function(t,e){return this.$elements=t||a(this.defaults.elements),void 0===e&&(e="portfolio"),this.build(e),this},build:function(o){var n={$wrapper:null,modals:[],currentModal:0,total:0,p_type:"portfolio",build:function(t,e){var o=this;o.$wrapper=t,o.$wrapper&&(o.modals=[],o.total=0,o.p_type=e,t.find("a[data-ajax-on-modal]").each((function(){o.add(a(this))})),t.off("mousedown","a[data-ajax-on-modal]").on("mousedown","a[data-ajax-on-modal]",(function(t){if(2==t.which)return t.preventDefault(),!1})))},add:function(t){var a=this,e=t.attr("href"),o=a.total;a.modals.push({src:e}),a.total++,t.off("click").on("click",(function(t){return t.preventDefault(),a.show(o),!1}))},next:function(){var t=this;t.currentModal+1<t.total?t.show(t.currentModal+1):t.show(0)},prev:function(){var t=this;t.currentModal-1>=0?t.show(t.currentModal-1):t.show(t.total-1)},show:function(o){var n=this;if(n.currentModal=o,o<0||o>n.total-1)return!1;a.magnificPopup.close(),a.magnificPopup.open(a.extend(!0,{},t.mfpConfig,{type:"ajax",items:n.modals,gallery:{enabled:!0},ajax:{settings:{type:"post",data:{ajax_action:n.p_type+"_ajax_modal"}}},mainClass:n.p_type+"-ajax-modal",fixedContentPos:!0,callbacks:{parseAjax:function(t){var e=a(t.data),o=e.find("#content article."+n.p_type),i=e.filter('style[data-type]:not("")'),l="";i.each((function(){l+=a(this).text()})),a("#"+n.p_type+"AjaxCSS").get(0)?a("#"+n.p_type+"AjaxCSS").text(l):a('<style id="'+n.p_type+'AjaxCSS">'+l+"</style>").appendTo("head"),o.find("."+n.p_type+"-nav-all").html('<a href="#" data-ajax-'+n.p_type+'-close data-bs-tooltip data-original-title="'+js_porto_vars.popup_close+'" data-bs-placement="bottom"><i class="fas fa-th"></i></a>'),o.find("."+n.p_type+"-nav").html('<a href="#" data-ajax-'+n.p_type+'-prev class="'+n.p_type+'-nav-prev" data-bs-tooltip data-original-title="'+js_porto_vars.popup_prev+'" data-bs-placement="bottom"><i class="fa"></i></a><a href="#" data-toggle="tooltip" data-ajax-'+n.p_type+'-next class="'+n.p_type+'-nav-next" data-bs-tooltip data-original-title="'+js_porto_vars.popup_next+'" data-bs-placement="bottom"><i class="fa"></i></a>'),o.find(".elementor-invisible").removeClass("elementor-invisible"),0==o.length&&(o=e.find(".main-content>.porto-block")),t.data='<div class="ajax-container">'+o.html()+"</div>"},ajaxContentAdded:function(){var o=a("."+n.p_type+"-ajax-modal");o.find("a[data-ajax-"+n.p_type+"-close]").on("click",(function(t){return t.preventDefault(),a.magnificPopup.close(),!1})),e=o.find(".rev_slider, rs-module"),n.modals.length<=1?o.find("a[data-ajax-"+n.p_type+"-prev], a[data-ajax-"+n.p_type+"-next]").remove():(o.find("a[data-ajax-"+n.p_type+"-prev]").on("click",(function(t){if(t.preventDefault(),e&&e.get(0))try{e.revkill()}catch(t){}return o.find(".mfp-arrow-left").trigger("click"),!1})),o.find("a[data-ajax-"+n.p_type+"-next]").on("click",(function(t){if(t.preventDefault(),e&&e.get(0))try{e.revkill()}catch(t){}return o.find(".mfp-arrow-right").trigger("click"),!1}))),"portfolio"==n.p_type&&a(window).trigger("resize"),porto_init(),t.refreshVCContent(o),setTimeout((function(){var t=o.find("video");t.get(0)&&t.each((function(){a(this)[0].play(),a(this).parent().parent().parent().find(".video-controls").attr("data-action","play"),a(this).parent().parent().parent().find(".video-controls").html('<i class="ult-vid-cntrlpause"></i>')}))}),600),o.off("scroll").on("scroll",(function(){a.fn.appear&&a.fn.appear.run()}))},change:function(){a(".mfp-wrap .ajax-container").trigger("click")},beforeClose:function(){if(e&&e.get(0))try{e.revkill()}catch(t){}a("."+n.p_type+"-ajax-modal").off("scroll")}}}),o)}};return this.$elements.each((function(){var t=a(this);t.find("a[data-ajax-on-modal]").get(0)&&(t.data(o+"AjaxOnModal")||(n.build(t,o),t.data(o+"AjaxOnModal",n)))})),this}}}),a(document.documentElement).on("keydown",(function(t){try{37!=t.keyCode&&39!=t.keyCode||e&&e.get(0)&&e.revkill()}catch(t){}}))}).apply(this,[window.theme,jQuery]),jQuery(document).ready((function(t){"use strict";void 0!==theme.PostAjaxModal&&(t(".page-portfolios").length&&t(".page-portfolios").each((function(){theme.PostAjaxModal.initialize(t(this))})),t(".page-members").length&&t(".page-members").each((function(){theme.PostAjaxModal.initialize(t(this),"member")})))}));
(function(a,t){"use strict";var o;a=a||{},t.extend(a,{PortfolioAjaxPage:{defaults:{elements:".page-portfolios"},initialize:function(a){return this.$elements=a||t(this.defaults.elements),this.build(),this},build:function(){return this.$elements.each((function(){var e=t(this);if(e.find("#portfolioAjaxBox").get(0)&&!e.data("portfolioAjaxOnPage")){var n={$wrapper:t(this),pages:[],currentPage:0,total:0,$ajaxBox:e.find("#portfolioAjaxBox"),$ajaxBoxContent:e.find("#portfolioAjaxBoxContent"),build:function(){var a=this;a.pages=[],a.total=0,e.find("a[data-ajax-on-page]").each((function(){a.add(t(this))})),e.off("mousedown","a[data-ajax-on-page]").on("mousedown","a[data-ajax-on-page]",(function(a){if(2==a.which)return a.preventDefault(),!1}))},add:function(a){var t=this,o=a.attr("href");t.pages.push(o),t.total++,a.off("click").on("click",(function(a){a.preventDefault();var e=a.target.className;return"owl-next"==e||"owl-prev"==e||t.show(t.pages.indexOf(o)),!1}))},events:function(){var a=this;e.off("click","a[data-ajax-portfolio-close]").on("click","a[data-ajax-portfolio-close]",(function(t){return t.preventDefault(),a.close(),!1})),a.total<=1?t("a[data-ajax-portfolio-prev], a[data-ajax-portfolio-next]").remove():(e.off("click","a[data-ajax-portfolio-prev]").on("click","a[data-ajax-portfolio-prev]",(function(t){return t.preventDefault(),a.prev(),!1})),e.off("click","a[data-ajax-portfolio-next]").on("click","a[data-ajax-portfolio-next]",(function(t){return t.preventDefault(),a.next(),!1})))},close:function(){var a=this;if(a.$ajaxBoxContent.find(".rev_slider, rs-module").get(0))try{a.$ajaxBoxContent.find(".rev_slider, rs-module").revkill()}catch(a){}a.$ajaxBoxContent.empty(),a.$ajaxBox.removeClass("ajax-box-init").removeClass("ajax-box-loading")},next:function(){var a=this;a.currentPage+1<a.total?a.show(a.currentPage+1):a.show(0)},prev:function(){var a=this;a.currentPage-1>=0?a.show(a.currentPage-1):a.show(a.total-1)},show:function(e){var n=this;if(o=null,n.$ajaxBoxContent.find(".rev_slider, rs-module").get(0))try{n.$ajaxBoxContent.find(".rev_slider, rs-module").revkill()}catch(a){}if(n.$ajaxBoxContent.empty(),n.$ajaxBox.removeClass("ajax-box-init").addClass("ajax-box-loading"),a.scrolltoContainer(n.$ajaxBox),n.currentPage=e,e<0||e>n.total-1)return n.close(),!1;t.ajax({url:n.pages[e],complete:function(e){var i=t(e.responseText),r=i.find("#content article.portfolio");i.filter('style[data-type]:not("")');t("#portfolioAjaxCSS").get(0)?t("#portfolioAjaxCSS").text(""):t('<style id="portfolioAjaxCSS"></style>').appendTo("head"),r.find(".portfolio-nav-all").html('<a href="#" data-ajax-portfolio-close data-bs-tooltip data-original-title="'+js_porto_vars.popup_close+'"><i class="fas fa-th"></i></a>'),r.find(".portfolio-nav").html('<a href="#" data-ajax-portfolio-prev class="portfolio-nav-prev" data-bs-tooltip data-original-title="'+js_porto_vars.popup_prev+'"><i class="fa"></i></a><a href="#" data-toggle="tooltip" data-ajax-portfolio-next class="portfolio-nav-next" data-bs-tooltip data-original-title="'+js_porto_vars.popup_next+'"><i class="fa"></i></a>'),n.$ajaxBoxContent.html(r.html()).append('<div class="row"><div class="col-lg-12"><hr class="tall"></div></div>'),n.$ajaxBox.removeClass("ajax-box-loading"),t(window).trigger("resize"),porto_init(),a.refreshVCContent(n.$ajaxBoxContent),n.events(),o=n,n.$ajaxBoxContent.find(".lightbox:not(.manual)").each((function(){var a,o=t(this),e=o.data("plugin-options");e&&(a=e),o.themeLightbox(a)}))}})}};n.build(),e.data("portfolioAjaxOnPage",n)}})),this}}}),t(document.documentElement).on("keyup",(function(a){try{if(!o)return;39==a.keyCode&&o.next(),37==a.keyCode&&o.prev()}catch(a){}}))}).apply(this,[window.theme,jQuery]),jQuery(document).ready((function(a){"use strict";void 0!==theme.PortfolioAjaxPage&&theme.PortfolioAjaxPage.initialize()}));
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e,i){"use strict";e.infinitescroll=function(i,t,o){this.element=e(o),this._create(i,t)||(this.failed=!0)},e.infinitescroll.defaults={loading:{finished:i,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:"data:image/gif;base64,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",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:i},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,isBeyondMaxPage:!1,currPage:1},debug:!1,behavior:i,binder:e(window),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:i,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:i,path:i,prefill:!1,maxPage:i},e.infinitescroll.prototype={_binding:function(e){var t=this,o=t.options;if(o.v="2.0b2.120520",o.behavior&&this["_binding_"+o.behavior]!==i)this["_binding_"+o.behavior].call(this);else{if("bind"!==e&&"unbind"!==e)return this._debug("Binding value  "+e+" not valid"),!1;"unbind"===e?this.options.binder.off("smartscroll.infscr."+t.options.infid):this.options.binder["bind"==e?"on":e]("smartscroll.infscr."+t.options.infid,function(){t.scroll()}),this._debug("Binding",e)}},_create:function(t,o){var n=e.extend(!0,{},e.infinitescroll.defaults,t);this.options=n;var a=e(window);if(!this._validate(t))return!1;var s=e(n.nextSelector).attr("href");if(!s)return this._debug("Navigation selector not found"),!1;n.path=n.path||this._determinepath(s),n.contentSelector=n.contentSelector||this.element,n.loading.selector=n.loading.selector||n.contentSelector,n.loading.msg=n.loading.msg||e('<div id="infscr-loading"><img alt="Loading..." src="'+n.loading.img+'" /><div>'+n.loading.msgText+"</div></div>"),(new Image).src=n.loading.img,n.pixelsFromNavToBottom===i&&(n.pixelsFromNavToBottom=e(document).height()-e(n.navSelector).offset().top,this._debug("pixelsFromNavToBottom: "+n.pixelsFromNavToBottom));var r=this;return n.loading.start=n.loading.start||function(){e(n.navSelector).hide(),n.loading.msg.appendTo(n.loading.selector).show(n.loading.speed,e.proxy(function(){this.beginAjax(n)},r))},n.loading.finished=n.loading.finished||function(){n.state.isBeyondMaxPage||n.loading.msg.fadeOut(n.loading.speed)},n.callback=function(t,s,r){n.behavior&&t["_callback_"+n.behavior]!==i&&t["_callback_"+n.behavior].call(e(n.contentSelector)[0],s,r),o&&o.call(e(n.contentSelector)[0],s,n,r),n.prefill&&a.on("resize.infinite-scroll",t._prefill)},t.debug&&(!Function.prototype.bind||"object"!=typeof console&&"function"!=typeof console||"object"!=typeof console.log||["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.call(console[e],console)},Function.prototype.bind)),this._setup(),n.prefill&&this._prefill(),!0},_prefill:function(){function i(){return e(t.options.contentSelector).height()<=o.height()}var t=this,o=e(window);this._prefill=function(){i()&&t.scroll(),o.on("resize.infinite-scroll",function(){i()&&(o.off("resize.infinite-scroll"),t.scroll())})},this._prefill()},_debug:function(){!0===this.options.debug&&("undefined"!=typeof console&&"function"==typeof console.log?1===Array.prototype.slice.call(arguments).length&&Array.prototype.slice.call(arguments)[0]:Function.prototype.bind||"undefined"==typeof console||"object"!=typeof console.log||Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments)))},_determinepath:function(e){var t=this.options;if(t.behavior&&this["_determinepath_"+t.behavior]!==i)return this["_determinepath_"+t.behavior].call(this,e);if(t.pathParse)return this._debug("pathParse manual"),t.pathParse(e,this.options.state.currPage+1);if(e.match(/^(.*?)\b2\b(.*?$)/))e=e.match(/^(.*?)\b2\b(.*?$)/).slice(1);else if(e.match(/^(.*?)2(.*?$)/)){if(e.match(/^(.*?page=)2(\/.*|$)/))return e=e.match(/^(.*?page=)2(\/.*|$)/).slice(1);e=e.match(/^(.*?)2(.*?$)/).slice(1)}else{if(e.match(/^(.*?page=)1(\/.*|$)/))return e=e.match(/^(.*?page=)1(\/.*|$)/).slice(1);this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."),t.state.isInvalidPage=!0}return this._debug("determinePath",e),e},_error:function(e){var t=this.options;t.behavior&&this["_error_"+t.behavior]!==i?this["_error_"+t.behavior].call(this,e):("destroy"!==e&&"end"!==e&&(e="unknown"),this._debug("Error",e),("end"===e||t.state.isBeyondMaxPage)&&this._showdonemsg(),t.state.isDone=!0,t.state.currPage=1,t.state.isPaused=!1,t.state.isBeyondMaxPage=!1,this._binding("unbind"))},_loadcallback:function(t,o,n){var a,s=this.options,r=this.options.callback,l=s.state.isDone?"done":s.appendCallback?"append":"no-append";if(s.behavior&&this["_loadcallback_"+s.behavior]!==i)this["_loadcallback_"+s.behavior].call(this,t,o);else{switch(l){case"done":return this._showdonemsg(),!1;case"no-append":if("html"===s.dataType&&(o=e(o="<div>"+o+"</div>").find(s.itemSelector)),0===o.length)return this._error("end");break;case"append":if(this.element.closest(".archive-products").length){var c=e(".woocommerce-result-count");if(c.length){var h=e(o="<div>"+o+"</div>").find(".woocommerce-result-count").eq(0);h.length&&c.replaceWith(h)}}var A=t.children();if(0===A.length)return this._error("end");for(a=document.createDocumentFragment();t[0].firstChild;)a.appendChild(t[0].firstChild);this._debug("contentSelector",e(s.contentSelector)[0]),e(s.contentSelector)[0].appendChild(a),o=A.get()}if(s.loading.finished.call(e(s.contentSelector)[0],s),s.animate){var g=e(window).scrollTop()+e(s.loading.msg).height()+s.extraScrollPx+"px";e("html,body").animate({scrollTop:g},800,function(){s.state.isDuringAjax=!1})}s.animate||(s.state.isDuringAjax=!1),r(this,o,n),s.prefill&&this._prefill()}},_nearbottom:function(){var t=this.options,o=0+e(document).height()-t.binder.scrollTop()-e(window).height();return t.behavior&&this["_nearbottom_"+t.behavior]!==i?this["_nearbottom_"+t.behavior].call(this):(this._debug("math:",o,t.pixelsFromNavToBottom),o-t.bufferPx<t.pixelsFromNavToBottom)},_pausing:function(e){var t=this.options;{if(!t.behavior||this["_pausing_"+t.behavior]===i){switch("pause"!==e&&"resume"!==e&&null!==e&&this._debug("Invalid argument. Toggling pause value instead"),e=!e||"pause"!==e&&"resume"!==e?"toggle":e){case"pause":t.state.isPaused=!0;break;case"resume":t.state.isPaused=!1;break;case"toggle":t.state.isPaused=!t.state.isPaused}return this._debug("Paused",t.state.isPaused),!1}this["_pausing_"+t.behavior].call(this,e)}},_setup:function(){var e=this.options;{if(!e.behavior||this["_setup_"+e.behavior]===i)return this._binding("bind"),!1;this["_setup_"+e.behavior].call(this)}},_showdonemsg:function(){var t=this.options;t.behavior&&this["_showdonemsg_"+t.behavior]!==i?this["_showdonemsg_"+t.behavior].call(this):(t.loading.msg.find("img").hide().parent().find("div").html(t.loading.finishedMsg).animate({opacity:1},2e3,function(){e(this).parent().fadeOut(t.loading.speed)}),t.errorCallback.call(e(t.contentSelector)[0],"done"))},_validate:function(i){for(var t in i)if(t.indexOf&&t.indexOf("Selector")>-1&&0===e(i[t]).length)return this._debug("Your "+t+" found no elements."),!1;return!0},bind:function(){this._binding("bind")},destroy:function(){return this.options.state.isDestroyed=!0,this.options.loading.finished(),this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(t){var o,n,a,s,r=this,l=t.path;if(t.state.currPage++,t.maxPage!==i&&t.state.currPage>t.maxPage)return t.state.isBeyondMaxPage=!0,void this.destroy();switch(o=e(e(t.contentSelector).is("table, tbody")?"<tbody/>":"<div/>"),n="function"==typeof l?l(t.state.currPage):l.join(t.state.currPage),r._debug("heading into ajax",n),a="html"===t.dataType||"json"===t.dataType?t.dataType:"html+callback",t.appendCallback&&"html"===t.dataType&&(a+="+callback"),a){case"html+callback":r._debug("Using HTML via .load() method"),o.load(n+" "+t.itemSelector,i,function(e){r._loadcallback(o,e,n)});break;case"html":r._debug("Using "+a.toUpperCase()+" via $.ajax() method"),e.ajax({url:n,dataType:t.dataType,complete:function(e,i){(s=void 0!==e.isResolved?e.isResolved():"success"===i||"notmodified"===i)?r._loadcallback(o,e.responseText,n):r._error("end")}});break;case"json":r._debug("Using "+a.toUpperCase()+" via $.ajax() method"),e.ajax({dataType:"json",type:"GET",url:n,success:function(e,a,l){if(s=void 0!==l.isResolved?l.isResolved():"success"===a||"notmodified"===a,t.appendCallback)if(t.template!==i){var c=t.template(e);o.append(c),s?r._loadcallback(o,c):r._error("end")}else r._debug("template must be defined."),r._error("end");else s?r._loadcallback(o,e,n):r._error("end")},error:function(){r._debug("JSON ajax request failed."),r._error("end")}})}},retrieve:function(t){t=t||null;var o=this.options;if(o.behavior&&this["retrieve_"+o.behavior]!==i)this["retrieve_"+o.behavior].call(this,t);else{if(o.state.isDestroyed)return this._debug("Instance is destroyed"),!1;o.state.isDuringAjax=!0,o.loading.start.call(e(o.contentSelector)[0],o)}},scroll:function(){var e=this.options,t=e.state;e.behavior&&this["scroll_"+e.behavior]!==i?this["scroll_"+e.behavior].call(this):t.isDuringAjax||t.isInvalidPage||t.isDone||t.isDestroyed||t.isPaused||this._nearbottom()&&this.retrieve()},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(i){e.isPlainObject(i)&&(this.options=e.extend(!0,this.options,i))}},e.fn.infinitescroll=function(i,t){switch(typeof i){case"string":var o=Array.prototype.slice.call(arguments,1);this.each(function(){var t=e.data(this,"infinitescroll");return!!t&&("function"==typeof t[i]&&"_"!==i.charAt(0)&&void t[i].apply(t,o))});break;case"object":this.each(function(){var o=e.data(this,"infinitescroll");o?o.update(i):(o=new e.infinitescroll(i,t,this)).failed||e.data(this,"infinitescroll",o)})}return this};var t,o=e.event;o.special.smartscroll={setup:function(){e(this).on("scroll",o.special.smartscroll.handler)},teardown:function(){e(this).off("scroll",o.special.smartscroll.handler)},handler:function(i,o){var n=this,a=arguments;i.type="smartscroll",t&&clearTimeout(t),t=setTimeout(function(){e(n).trigger("smartscroll",a)},"execAsap"===o?0:100)}},e.fn.smartscroll=function(e){return e?this.on("smartscroll",e):this.trigger("smartscroll",["execAsap"])}});