1!function(t){function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var e={};n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=6)}([function(t,n){t.exports=jQuery},function(t,n,e){"use strict";function i(){return"rtl"===u()("html").attr("dir")}function r(t,n){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(n?"-"+n:"")}function o(t){var n,e={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},i=document.createElement("div");for(var r in e)void 0!==i.style[r]&&(n=e[r]);return n||(n=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}e.d(n,"a",function(){return i}),e.d(n,"b",function(){return r}),e.d(n,"c",function(){return o});var a=e(0),u=e.n(a)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=e(0),r=e.n(i),o=e(3),a=e(1),u=e(4);o.a.addToJquery(r.a),o.a.rtl=a.a,o.a.GetYoDigits=a.b,o.a.transitionend=a.c,o.a.Plugin=u.a,window.Foundation=o.a},function(t,n,e){"use strict";function i(t){if(void 0===Function.prototype.name){var n=/function\s([^(]{1,})\(/,e=n.exec(t.toString());return e&&e.length>1?e[1].trim():""}return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name}function r(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}function o(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}e.d(n,"a",function(){return l});var a=e(0),u=e.n(a),s=e(1),c=e(5),l={version:"6.4.3",_plugins:{},_uuids:[],plugin:function(t,n){var e=n||i(t),r=o(e);this._plugins[r]=this[e]=t},registerPlugin:function(t,n){var r=n?o(n):i(t.constructor).toLowerCase();t.uuid=e.i(s.b)(6,r),t.$element.attr("data-"+r)||t.$element.attr("data-"+r,t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf."+r),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var n=o(i(t.$element.data("zfPlugin").constructor));this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-"+n).removeData("zfPlugin").trigger("destroyed.zf."+n);for(var e in t)t[e]=null},reInit:function(t){var n=t instanceof u.a;try{if(n)t.each(function(){u()(this).data("zfPlugin")._init()});else{var e=typeof t,i=this;({object:function(t){t.forEach(function(t){t=o(t),u()("[data-"+t+"]").foundation("_init")})},string:function(){t=o(t),u()("[data-"+t+"]").foundation("_init")},undefined:function(){this.object(Object.keys(i._plugins))}})[e](t)}}catch(t){console.error(t)}finally{return t}},reflow:function(t,n){void 0===n?n=Object.keys(this._plugins):"string"==typeof n&&(n=[n]);var e=this;u.a.each(n,function(n,i){var o=e._plugins[i];u()(t).find("[data-"+i+"]").addBack("[data-"+i+"]").each(function(){var t=u()(this),n={};if(t.data("zfPlugin"))return void console.warn("Tried to initialize "+i+" on an element that already has a Foundation plugin.");t.attr("data-options")&&t.attr("data-options").split(";").forEach(function(t,e){var i=t.split(":").map(function(t){return t.trim()});i[0]&&(n[i[0]]=r(i[1]))});try{t.data("zfPlugin",new o(u()(this),n))}catch(t){console.error(t)}finally{return}})})},getFnName:i,addToJquery:function(t){var n=function(n){var e=typeof n,r=t(".no-js");if(r.length&&r.removeClass("no-js"),"undefined"===e)c.a._init(),l.reflow(this);else{if("string"!==e)throw new TypeError("We're sorry, "+e+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var o=Array.prototype.slice.call(arguments,1),a=this.data("zfPlugin");if(void 0===a||void 0===a[n])throw new ReferenceError("We're sorry, '"+n+"' is not an available method for "+(a?i(a):"this element")+".");1===this.length?a[n].apply(a,o):this.each(function(e,i){a[n].apply(t(i).data("zfPlugin"),o)})}return this};return t.fn.foundation=n,t}};l.util={throttle:function(t,n){var e=null;return function(){var i=this,r=arguments;null===e&&(e=setTimeout(function(){t.apply(i,r),e=null},n))}}},window.Foundation=l,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],n=0;n<t.length&&!window.requestAnimationFrame;++n){var e=t[n];window.requestAnimationFrame=window[e+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var i=0;window.requestAnimationFrame=function(t){var n=Date.now(),e=Math.max(i+16,n);return setTimeout(function(){t(i=e)},e-n)},window.cancelAnimationFrame=clearTimeout}window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
1var n=Array.prototype.slice.call(arguments,1),e=this,i=function(){},r=function(){return e.apply(this instanceof i?this:t,n.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),r.prototype=new i,r})},function(t,n,e){"use strict";function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(t){return r(void 0!==t.constructor.name?t.constructor.name:t.className)}e.d(n,"a",function(){return c});var a=e(0),u=(e.n(a),e(1)),s=function(){function t(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(n,e,i){return e&&t(n.prototype,e),i&&t(n,i),n}}(),c=function(){function t(n,r){i(this,t),this._setup(n,r);var a=o(this);this.uuid=e.i(u.b)(6,a),this.$element.attr("data-"+a)||this.$element.attr("data-"+a,this.uuid),this.$element.data("zfPlugin")||this.$element.data("zfPlugin",this),this.$element.trigger("init.zf."+a)}return s(t,[{key:"destroy",value:function(){this._destroy();var t=o(this);this.$element.removeAttr("data-"+t).removeData("zfPlugin").trigger("destroyed.zf."+t);for(var n in this)this[n]=null}}]),t}()},function(t,n,e){"use strict";function i(t){var n={};return"string"!=typeof t?n:(t=t.trim().slice(1,-1))?n=t.split("&").reduce(function(t,n){var e=n.replace(/\+/g," ").split("="),i=e[0],r=e[1];return i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),t.hasOwnProperty(i)?Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]:t[i]=r,t},{}):n}e.d(n,"a",function(){return u});var r=e(0),o=e.n(r),a=window.matchMedia||function(){var t=window.styleMedia||window.media;if(!t){var n=document.createElement("style"),e=document.getElementsByTagName("script")[0],i=null;n.type="text/css",n.id="matchmediajs-test",e&&e.parentNode&&e.parentNode.insertBefore(n,e),i="getComputedStyle"in window&&window.getComputedStyle(n,null)||n.currentStyle,t={matchMedium:function(t){var e="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return n.styleSheet?n.styleSheet.cssText=e:n.textContent=e,"1px"===i.width}}}return function(n){return{matches:t.matchMedium(n||"all"),media:n||"all"}}}(),u={queries:[],current:"",_init:function(){var t=this;o()("meta.foundation-mq").length||o()('<meta class="foundation-mq">').appendTo(document.head);var n,e=o()(".foundation-mq").css("font-family");n=i(e);for(var r in n)n.hasOwnProperty(r)&&t.queries.push({name:r,value:"only screen and (min-width: "+n[r]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var n=this.get(t);return!!n&&a(n).matches},is:function(t){return t=t.trim().split(" "),t.length>1&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var n in this.queries)if(this.queries.hasOwnProperty(n)){var e=this.queries[n];if(t===e.name)return e.value}return null},_getCurrentSize:function(){for(var t,n=0;n<this.queries.length;n++){var e=this.queries[n];a(e.value).matches&&(t=e)}return"object"==typeof t?t.name:t},_watcher:function(){var t=this;o()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var n=t._getCurrentSize(),e=t.current;n!==e&&(t.current=n,o()(window).trigger("changed.zf.mediaquery",[n,e]))})}}},function(t,n,e){t.exports=e(2)}]); 2!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=103)}({0:function(e,t){e.exports=jQuery},1:function(e,t){e.exports={Foundation:window.Foundation}},103:function(e,t,n){e.exports=n(37)},37:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=(n.n(r),n(67));r.Foundation.MediaQuery=i.a,r.Foundation.MediaQuery._init()},67:function(e,t,n){"use strict";function r(e){var t={};return"string"!=typeof e?t:(e=e.trim().slice(1,-1))?t=e.split("&").reduce(function(e,t){var n=t.replace(/\+/g," ").split("="),r=n[0],i=n[1];return r=decodeURIComponent(r),i=void 0===i?null:decodeURIComponent(i),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i,e},{}):t}n.d(t,"a",function(){return a});var i=n(0),u=n.n(i),o=window.matchMedia||function(){var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],r=null;t.type="text/css",t.id="matchmediajs-test",n&&n.parentNode&&n.parentNode.insertBefore(t,n),r="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=n:t.textContent=n,"1px"===r.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}(),a={queries:[],current:"",_init:function(){var e=this;u()("meta.foundation-mq").length||u()('<meta class="foundation-mq">').appendTo(document.head);var t,n=u()(".foundation-mq").css("font-family");t=r(n);for(var i in t)t.hasOwnProperty(i)&&e.queries.push({name:i,value:"only screen and (min-width: "+t[i]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(e){var t=this.get(e);return!!t&&o(t).matches},is:function(e){return e=e.trim().split(" "),e.length>1&&"only"===e[1]?e[0]===this._getCurrentSize():this.atLeast(e[0])},get:function(e){for(var t in this.queries)if(this.queries.hasOwnProperty(t)){var n=this.queries[t];
2if(e===n.name)return n.value}return null},_getCurrentSize:function(){for(var e,t=0;t<this.queries.length;t++){var n=this.queries[t];o(n.value).matches&&(e=n)}return"object"==typeof e?e.name:e},_watcher:function(){var e=this;u()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var t=e._getCurrentSize(),n=e.current;t!==n&&(e.current=t,u()(window).trigger("changed.zf.mediaquery",[t,n]))})}}}}); 3!function(n){function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=102)}({0:function(n,t){n.exports=jQuery},1:function(n,t){n.exports={Foundation:window.Foundation}},102:function(n,t,e){n.exports=e(36)},3:function(n,t){n.exports={rtl:window.Foundation.rtl,GetYoDigits:window.Foundation.GetYoDigits,transitionend:window.Foundation.transitionend}},36:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e(1),r=(e.n(o),e(66));o.Foundation.Keyboard=r.a},66:function(n,t,e){"use strict";function o(n){return!!n&&n.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!a()(this).is(":visible")||a()(this).attr("tabindex")<0)})}function r(n){var t=d[n.which||n.keyCode]||String.fromCharCode(n.which).toUpperCase();return t=t.replace(/\W+/,""),n.shiftKey&&(t="SHIFT_"+t),n.ctrlKey&&(t="CTRL_"+t),n.altKey&&(t="ALT_"+t),t=t.replace(/_$/,"")}e.d(t,"a",function(){return c});var i=e(0),a=e.n(i),u=e(3),d=(e.n(u),{9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",35:"END",36:"HOME",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"}),f={},c={keys:function(n){var t={};for(var e in n)t[n[e]]=n[e];return t}(d),parseKey:r,handleKey:function(n,t,o){var r,i,d,c=f[t],s=this.parseKey(n);if(!c)return console.warn("Component not defined!");if(r=void 0===c.ltr?c:e.i(u.rtl)()?a.a.extend({},c.ltr,c.rtl):a.a.extend({},c.rtl,c.ltr),i=r[s],(d=o[i])&&"function"==typeof d){var l=d.apply();(o.handled||"function"==typeof o.handled)&&o.handled(l)}else(o.unhandled||"function"==typeof o.unhandled)&&o.unhandled()},findFocusable:o,register:function(n,t){f[n]=t},trapFocus:function(n){var t=o(n),e=t.eq(0),i=t.eq(-1);n.on("keydown.zf.trapfocus",function(n){n.target===i[0]&&"TAB"===r(n)?(n.preventDefault(),e.focus()):n.target===e[0]&&"SHIFT_TAB"===r(n)&&(n.preventDefault(),i.focus())})},releaseFocus:function(n){n.off("keydown.zf.trapfocus")}}}}); 4!function(t){function e(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=88)}({0:function(t,e){t.exports=jQuery},1:function(t,e){t.exports={Foundation:window.Foundation}},2:function(t,e){t.exports={Plugin:window.Foundation.Plugin}},22:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),s=(i.n(n),i(52));n.Foundation.plugin(s.a,"OffCanvas")},3:function(t,e){t.exports={rtl:window.Foundation.rtl,GetYoDigits:window.Foundation.GetYoDigits,transitionend:window.Foundation.transitionend}},4:function(t,e){t.exports={Motion:window.Foundation.Motion,Move:window.Foundation.Move}},5:function(t,e){t.exports={Keyboard:window.Foundation.Keyboard}},52:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return g});var a=i(0),r=i.n(a),l=i(5),c=(i.n(l),i(6)),d=(i.n(c),i(3)),f=(i.n(d),i(2)),u=(i.n(f),i(7)),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}
4return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),g=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){var n=this;this.className="OffCanvas",this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.contentClasses={base:[],reveal:[]},this.$lastTrigger=r()(),this.$triggers=r()(),this.position="left",this.$content=r()(),this.nested=!!this.options.nested,r()(["push","overlap"]).each(function(t,e){n.contentClasses.base.push("has-transition-"+e)}),r()(["left","right","top","bottom"]).each(function(t,e){n.contentClasses.base.push("has-position-"+e),n.contentClasses.reveal.push("has-reveal-"+e)}),u.a.init(r.a),c.MediaQuery._init(),this._init(),this._events(),l.Keyboard.register("OffCanvas",{ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");if(this.$element.attr("aria-hidden","true"),this.options.contentId?this.$content=r()("#"+this.options.contentId):this.$element.siblings("[data-off-canvas-content]").length?this.$content=this.$element.siblings("[data-off-canvas-content]").first():this.$content=this.$element.closest("[data-off-canvas-content]").first(),this.options.contentId?this.options.contentId&&null===this.options.nested&&console.warn("Remember to use the nested option if using the content ID option!"):this.nested=0===this.$element.siblings("[data-off-canvas-content]").length,!0===this.nested&&(this.options.transition="overlap",this.$element.removeClass("is-transition-push")),this.$element.addClass("is-transition-"+this.options.transition+" is-closed"),this.$triggers=r()(document).find('[data-open="'+t+'"], [data-close="'+t+'"], [data-toggle="'+t+'"]').attr("aria-expanded","false").attr("aria-controls",t),this.position=this.$element.is(".position-left, .position-top, .position-right, .position-bottom")?this.$element.attr("class").match(/position\-(left|top|right|bottom)/)[1]:this.position,!0===this.options.contentOverlay){var e=document.createElement("div"),i="fixed"===r()(this.$element).css("position")?"is-overlay-fixed":"is-overlay-absolute";e.setAttribute("class","js-off-canvas-overlay "+i),this.$overlay=r()(e),"is-overlay-fixed"===i?r()(this.$overlay).insertAfter(this.$element):this.$content.append(this.$overlay)}this.options.isRevealed=this.options.isRevealed||new RegExp(this.options.revealClass,"g").test(this.$element[0].className),!0===this.options.isRevealed&&(this.options.revealOn=this.options.revealOn||this.$element[0].className.match(/(reveal-for-medium|reveal-for-large)/g)[0].split("-")[2],this._setMQChecker()),this.options.transitionTime&&this.$element.css("transition-duration",this.options.transitionTime),this._removeContentClasses()}},{key:"_events",value:function(){if(this.$element.off(".zf.trigger .zf.offcanvas").on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"keydown.zf.offcanvas":this._handleKeyboard.bind(this)}),!0===this.options.closeOnClick){(this.options.contentOverlay?this.$overlay:this.$content).on({"click.zf.offcanvas":this.close.bind(this)})}}},{key:"_setMQChecker",value:function(){var t=this;r()(window).on("changed.zf.mediaquery",function(){c.MediaQuery.atLeast(t.options.revealOn)?t.reveal(!0):t.reveal(!1)}).one("load.zf.offcanvas",function(){c.MediaQuery.atLeast(t.options.revealOn)&&t.reveal(!0)})}},{key:"_removeContentClasses",value:function(t){"boolean"!=typeof t?this.$content.removeClass(this.contentClasses.base.join(" ")):!1===t&&this.$content.removeClass("has-reveal-"+this.position)}},{key:"_addContentClasses",value:function(t){this._removeContentClasses(t),"boolean"!=typeof t?this.$content.addClass("has-transition-"+this.options.transition+" has-position-"+this.position):!0===t&&this.$content.addClass("has-reveal-"+this.position)}},{key:"reveal",value:function(t){t?(this.close(),this.isRevealed=!0,this.$element.attr("aria-hidden","false"),this.$element.off("open.zf.trigger toggle.zf.trigger"),this.$element.removeClass("is-closed")):(this.isRevealed=!1,this.$element.attr("aria-hidden","true"),this.$element.off("open.zf.trigger toggle.zf.trigger").on({"open.zf.trigger":this.open.bind(this),"toggle.zf.trigger":this.toggle.bind(this)}),this.$element.addClass("is-closed")),this._addContentClasses(t)}},{key:"_stopScrolling",value:function(t){return!1}},{key:"_recordScrollable",value:function(t){var e=this;e.scrollHeight!==e.clientHeight&&(0===e.scrollTop&&(e.scrollTop=1),e.scrollTop===e.scrollHeight-e.clientHeight&&(e.scrollTop=e.scrollHeight-e.clientHeight-1)),e.allowUp=e.scrollTop>0,e.allowDown=e.scrollTop<e.scrollHeight-e.clientHeight,e.lastY=t.originalEvent.pageY}},{key:"_stopScrollPropagation",value:function(t){var e=this,i=t.pageY<e.lastY,n=!i;e.lastY=t.pageY,i&&e.allowUp||n&&e.allowDown?t.stopPropagation():t.preventDefault()}},{key:"open",value:function(t,e){if(!this.$element.hasClass("is-open")&&!this.isRevealed){var n=this;e&&(this.$lastTrigger=e),"top"===this.options.forceTo?window.scrollTo(0,0):"bottom"===this.options.forceTo&&window.scrollTo(0,document.body.scrollHeight),this.options.transitionTime&&"overlap"
4!==this.options.transition?this.$element.siblings("[data-off-canvas-content]").css("transition-duration",this.options.transitionTime):this.$element.siblings("[data-off-canvas-content]").css("transition-duration",""),this.$element.addClass("is-open").removeClass("is-closed"),this.$triggers.attr("aria-expanded","true"),this.$element.attr("aria-hidden","false").trigger("opened.zf.offcanvas"),this.$content.addClass("is-open-"+this.position),!1===this.options.contentScroll&&(r()("body").addClass("is-off-canvas-open").on("touchmove",this._stopScrolling),this.$element.on("touchstart",this._recordScrollable),this.$element.on("touchmove",this._stopScrollPropagation)),!0===this.options.contentOverlay&&this.$overlay.addClass("is-visible"),!0===this.options.closeOnClick&&!0===this.options.contentOverlay&&this.$overlay.addClass("is-closable"),!0===this.options.autoFocus&&this.$element.one(i.i(d.transitionend)(this.$element),function(){if(n.$element.hasClass("is-open")){var t=n.$element.find("[data-autofocus]");t.length?t.eq(0).focus():n.$element.find("a, button").eq(0).focus()}}),!0===this.options.trapFocus&&(this.$content.attr("tabindex","-1"),l.Keyboard.trapFocus(this.$element)),this._addContentClasses()}}},{key:"close",value:function(t){if(this.$element.hasClass("is-open")&&!this.isRevealed){var e=this;this.$element.removeClass("is-open"),this.$element.attr("aria-hidden","true").trigger("closed.zf.offcanvas"),this.$content.removeClass("is-open-left is-open-top is-open-right is-open-bottom"),!1===this.options.contentScroll&&(r()("body").removeClass("is-off-canvas-open").off("touchmove",this._stopScrolling),this.$element.off("touchstart",this._recordScrollable),this.$element.off("touchmove",this._stopScrollPropagation)),!0===this.options.contentOverlay&&this.$overlay.removeClass("is-visible"),!0===this.options.closeOnClick&&!0===this.options.contentOverlay&&this.$overlay.removeClass("is-closable"),this.$triggers.attr("aria-expanded","false"),!0===this.options.trapFocus&&(this.$content.removeAttr("tabindex"),l.Keyboard.releaseFocus(this.$element)),this.$element.one(i.i(d.transitionend)(this.$element),function(t){e.$element.addClass("is-closed"),e._removeContentClasses()})}}},{key:"toggle",value:function(t,e){this.$element.hasClass("is-open")?this.close(t,e):this.open(t,e)}},{key:"_handleKeyboard",value:function(t){var e=this;l.Keyboard.handleKey(t,"OffCanvas",{close:function(){return e.close(),e.$lastTrigger.focus(),!0},handled:function(){t.stopPropagation(),t.preventDefault()}})}},{key:"_destroy",value:function(){this.close(),this.$element.off(".zf.trigger .zf.offcanvas"),this.$overlay.off(".zf.offcanvas")}}]),e}(f.Plugin);g.defaults={closeOnClick:!0,contentOverlay:!0,contentId:null,nested:null,contentScroll:!0,transitionTime:null,transition:"push",forceTo:null,isRevealed:!1,revealOn:null,autoFocus:!0,revealClass:"reveal-for-",trapFocus:!1}},6:function(t,e){t.exports={MediaQuery:window.Foundation.MediaQuery}},7:function(t,e,i){"use strict";function n(t,e,i){var n=void 0,s=Array.prototype.slice.call(arguments,3);o()(window).off(e).on(e,function(e){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,s)},t||10)})}i.d(e,"a",function(){return c});var s=i(0),o=i.n(s),a=i(4),r=(i.n(a),function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if(t[e]+"MutationObserver"in window)return window[t[e]+"MutationObserver"];return!1}()),l=function(t,e){t.data(e).split(" ").forEach(function(i){o()("#"+i)["close"===e?"trigger":"triggerHandler"](e+".zf.trigger",[t])})},c={Listeners:{Basic:{},Global:{}},Initializers:{}};c.Listeners.Basic={openListener:function(){l(o()(this),"open")},closeListener:function(){o()(this).data("close")?l(o()(this),"close"):o()(this).trigger("close.zf.trigger")},toggleListener:function(){o()(this).data("toggle")?l(o()(this),"toggle"):o()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){t.stopPropagation();var e=o()(this).data("closable");""!==e?a.Motion.animateOut(o()(this),e,function(){o()(this).trigger("closed.zf")}):o()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=o()(this).data("toggle-focus");o()("#"+t).triggerHandler("toggle.zf.trigger",[o()(this)])}}
4,c.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",c.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",c.Listeners.Basic.openListener)},c.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",c.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",c.Listeners.Basic.closeListener)},c.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",c.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",c.Listeners.Basic.toggleListener)},c.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",c.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",c.Listeners.Basic.closeableListener)},c.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",c.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",c.Listeners.Basic.toggleFocusListener)},c.Listeners.Global={resizeListener:function(t){r||t.each(function(){o()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){r||t.each(function(){o()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){var i=t.namespace.split(".")[0];o()("[data-"+i+"]").not('[data-yeti-box="'+e+'"]').each(function(){var t=o()(this);t.triggerHandler("close.zf.trigger",[t])})}},c.Initializers.addClosemeListener=function(t){var e=o()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(t&&("string"==typeof t?i.push(t):"object"==typeof t&&"string"==typeof t[0]?i.concat(t):console.error("Plugin names must be strings")),e.length){var n=i.map(function(t){return"closeme.zf."+t}).join(" ");o()(window).off(n).on(n,c.Listeners.Global.closeMeListener)}},c.Initializers.addResizeListener=function(t){var e=o()("[data-resize]");e.length&&n(t,"resize.zf.trigger",c.Listeners.Global.resizeListener,e)},c.Initializers.addScrollListener=function(t){var e=o()("[data-scroll]");e.length&&n(t,"scroll.zf.trigger",c.Listeners.Global.scrollListener,e)},c.Initializers.addMutationEventsListener=function(t){if(!r)return!1;var e=t.find("[data-resize], [data-scroll], [data-mutate]"),i=function(t){var e=o()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var n=0;n<=e.length-1;n++){var s=new r(i);s.observe(e[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}},c.Initializers.addSimpleListeners=function(){var t=o()(document);c.Initializers.addOpenListener(t),c.Initializers.addCloseListener(t),c.Initializers.addToggleListener(t),c.Initializers.addCloseableListener(t),c.Initializers.addToggleFocusListener(t)},c.Initializers.addGlobalListeners=function(){var t=o()(document);c.Initializers.addMutationEventsListener(t),c.Initializers.addResizeListener(),c.Initializers.addScrollListener(),c.Initializers.addClosemeListener()},c.init=function(t,e){if(void 0===t.triggersInitialized){t(document);"complete"===document.readyState?(c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners()):t(window).on("load",function(){c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners()}),t.triggersInitialized=!0}e&&(e.Triggers=c,e.IHearYou=c.Initializers.addGlobalListeners)}},88:function(t,e,i){t.exports=i(22)}}); 5/*! 6 * imagesLoaded PACKAGED v4.1.4 7 * JavaScript is all like "You images are done yet or what?" 8 * MIT License 9 */ 10 11!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEac
vendor: 4,506 bytes, lines 11-43
11h(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o}); 12 13(function($){ 14 15 /** 16 * Copyright 2012, Digital Fusion 17 * Licensed under the MIT license. 18 * http://teamdf.com/jquery-plugins/license/ 19 * 20 * @author Sam Sehnert 21 * @desc A small plugin that checks whether elements are within 22 * the user visible viewport of a web browser. 23 * only accounts for vertical position, not horizontal. 24 */ 25 var $w = $(window); 26 $.fn.visible = function(partial,hidden,direction){ 27 28 if (this.length < 1) 29 return; 30 31 var $t = this.length > 1 ? this.eq(0) : this, 32 t = $t.get(0), 33 vpWidth = $w.width(), 34 vpHeight = $w.height(), 35 direction = (direction) ? direction : 'both', 36 clientSize = hidden === true ? t.offsetWidth * t.offsetHeight : true; 37 38 if (typeof t.getBoundingClientRect === 'function'){ 39 40 // Use this native browser method, if available. 41 var rec = t.getBoundingClientRect(), 42 tViz = rec.top >= 0 && rec.top < vpHeight, 43 bViz = rec.bottom >
43 0 && rec.bottom <= vpHeight, 44 lViz = rec.left >= 0 && rec.left < vpWidth, 45 rViz = rec.right > 0 && rec.right <= vpWidth, 46 vVisible = partial ? tViz || bViz : tViz && bViz, 47 hVisible = partial ? lViz || rViz : lViz && rViz; 48 49 if(direction === 'both') 50 return clientSize && vVisible && hVisible; 51 else if(direction === 'vertical') 52 return clientSize && vVisible; 53 else if(direction === 'horizontal') 54 return clientSize && hVisible; 55 } else { 56 57 var viewTop = $w.scrollTop(), 58 viewBottom = viewTop + vpHeight, 59 viewLeft = $w.scrollLeft(), 60 viewRight = viewLeft + vpWidth, 61 offset = $t.offset(), 62 _top = offset.top, 63 _bottom = _top + $t.height(), 64 _left = offset.left, 65 _right = _left + $t.width(), 66 compareTop = partial === true ? _bottom : _top, 67 compareBottom = partial === true ? _top : _bottom, 68 compareLeft = partial === true ? _right : _left, 69 compareRight = partial === true ? _left : _right; 70 71 if(direction === 'both') 72 return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop)) && ((compareRight <= viewRight) && (compareLeft >= viewLeft)); 73 else if(direction === 'vertical') 74 return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop)); 75 else if(direction === 'horizontal') 76 return !!clientSize && ((compareRight <= viewRight) && (compareLeft >= viewLeft)); 77 } 78 }; 79 80})(jQuery); 81 82jQuery( function ($) { 83 84 "use strict"; 85 86 var uniqId = ( function() { 87 var i=0; 88 return function() { 89 return i++; 90 } 91 })(); 92 93 // Add fresco to galleries 94 $( ".wp-block-gallery" ).each(function() { 95 96 var that = $(this); 97 98 that.attr('id', 'gallery-'+uniqId()); 99 100 that.find('.blocks-gallery-item').each(function(){ 101 102 var this_gallery_item = $(this); 103 104 var item_link = this_gallery_item.find('a').attr('href'); 105 106 if( item_link ) { 107 108 item_link = item_link.split('.').pop(); 109 110 if( item_link && ( typeof item_link === 'string') && ( item_link == 'jpg' || item_link == 'jpeg' || item_link == 'png' || item_link == 'gif' ) ) { 111 112 this_gallery_item.find('a').addClass('fresco'); 113 114 this_gallery_item.find('.fresco').attr('data-fresco-group', that.attr('id')); 115 116 if ( this_gallery_item.find('figcaption').length > 0 ) { 117 this_gallery_item.find('.fresco').attr('data-fresco-caption', this_gallery_item.find('figcaption').text()); 118 } 119 } 120 } 121 }); 122 }); 123}); 124jQuery( function ($) { 125 126 "use strict"; 127 128 // Global throttle. 129 window.gb_throttle = function(func, wait, immediate) { 130 var timeout; 131 return function() { 132 var context = this, args = arguments; 133 var later = function() { 134 timeout = null; 135 if ( ! immediate) { 136 func.apply( context, args ); 137 } 138 }; 139 var callNow = immediate && ! timeout; 140 if ( ! timeout ) { 141 timeout = setTimeout( later, wait ); 142 } 143 if (callNow) { 144 func.apply( context, args ); 145 } 146 }; 147 }; 148 149 // RTL fix for wpbakery full width elements position 150 $(window).on( 'resize', function() { 151 if ($('body').hasClass("rtl")) { 152 var $elements = $('[data-vc-full-width="true"]'); 153 $.each($elements, function () { 154 var $el = jQuery(this); 155 var $el_right = parseInt($el.css('right')); 156 $el.css('right', -$el_right); 157 }); 158 } 159 }); 160 161 //if is visible on screen add a class 162 $("section.related").each(function(i, el) { 163 if ($(el).visible(true)) { 164 $(el).addClass("on_screen"); 165 } 166 }); 167 168 //mobile menu 169 170 $(".mobile-navigation .menu-item-has-children .sub-menu").has('ul').addClass("has_children"); 171 172 $(".mobile-navigation .menu-item-has-children .sub-menu").before('<div class="more"><span class="spk-icon-down-small"></span></div>'); 173 174 $(".mobile-navigation").on("click", ".more", function(e) { 175 e.stopPropagation(); 176 177 var submenus = $(this).parent().find(".sub-menu"); 178 $.each(submenus, function(x,y){ 179 $(y).find(".sub-menu").addClass("open"); 180 $(y).find(".more").remove(); 181 }); 182 183 $(this).parent().toggleClass("current") 184 .children(".sub-menu").toggleClass("open"); 185 186 $(this).parent().find('.more').html($(this).parent().find('.more').html() == '<span class="spk-icon-down-small"></span>' ? '<span class="spk-icon-up-small"></span>' : '<span class="spk-icon-down-small"></span>'); 187 }); 188 189 $(".mobile-navigation").on("click", "a", function(e) { 190 if($(this).attr('href') == '#' && $(this).parent('.menu-item').hasClass('menu-item-has-children')) { 191 $(this).parent().find('.more').trigger('click'); 192 } else if($(this).attr('href').indexOf('#') > -1) { 193 $('#offCanvasRight1').foundation('close'); 194 } 195 }); 196 197 function replace_img_source(selector) { 198 var data_src = $(selector).attr('data-src'); 199 $(selector).one('load', function() { 200 }).each(function() { 201 $(selector).attr('src', data_src); 202 $(selector).css("opacity", "1"); 203 }); 204 } 205 206 $('#products-grid li img').each(function(){ 207 replace_img_source(this); 208 }); 209 210 $('.related.products li img').each(function(){ 211 replace_img_source(this); 212 }); 213 214 $('.upsells.products li img').each(function(){ 215 replace_img_source(this); 216 }); 217 218 $('.add_to_cart_button').on('click',function(){ 219 $(this).parents('li.animated').addClass('product_added_to_cart') 220 }) 221 222 $('.add_to_wishlist').on('click',function(){ 223 $(this).parents('.yith-wcwl-add-button').addClass('show_overlay'); 224 }) 225 226 // Login/register 227 var account_tab_list = $('.account-tab-list'); 228 229 account_tab_list.on('click','.account-tab-link',function(){ 230 231 if ( $('.account-tab-link').hasClass('registration_disabled') ) { 232 return false; 233 } else { 234 235 var that = $(this), 236 target = that.attr('href'); 237 238 that.parent().siblings().find('.account-tab-link').removeClass('current'); 239 that.addClass('current'); 240 241 $('.account-forms').find($(target)).siblings().stop().fadeOut(function(){ 242 $('.account-forms').find($(target)).fadeIn(); 243 }); 244 245 return false; 246 } 247 }); 248 249 // Login/register mobile 250 $('.account-tab-link-register').on('click',function(){ 251 $('.login-form').stop().fadeOut(function(){ 252 $('.register-form').fadeIn(); 253 }) 254 return false; 255 }) 256 257 $('.account-tab-link-login').on('click',function(){ 258 $('.register-form').stop().fadeOut(function(){ 259 $('.login-form').fadeIn(); 260 }) 261 return false; 262 }) 263 264 // Disable fresco 265 function disable_fresco() { 266 267 if ( getbowtied_scripts_vars.product_lightbox != 1 ) { 268 269 $(".product-images-layout .fresco, .product-images-layout-mobile .fresco, .woocommerce-product-gallery__wrapper .fresco").on('click',function() { 270 return false; 271 }); 272 } 273 } 274 275 disable_fresco(); 276 277 278 //add fresco groups to images galleries 279 $(".gallery").each(function() { 280 281 var that = $(this); 282 283 that.find('.gallery-item').each(function(){ 284 285 var this_gallery_item = $(this); 286 287 this_gallery_item.find('.fresco').attr('data-fresco-group', that.attr('id')); 288 289 if ( this_gallery_item.find('.gallery-caption').length > 0 ) { 290 this_gallery_item.find('.fresco').attr('data-fresco-caption', this_gallery_item.find('.gallery-caption').text()); 291 } 292 293 }); 294 295 }); 296 297 function handleSelect() { 298 if ( typeof $.fn.selectWoo === 'function' ) { 299 $( '.woocommerce-ordering select.orderby' ).selectWoo({ 300 minimumResultsForSearch: Infinity, 301 // allowClear: true, 302 // width: 'auto', 303 dropdownCssClass: "orderby-dropdown", 304 // dropdownAutoWidth: true 305 }); 306 } 307 $('.woocommerce-ordering').css({ opacity: 1 }); 308 } 309 310 handleSelect(); 311 312 313 //gallery caption 314 315 $('.gallery-item').each(function(){ 316 317 var that = $(this); 318 319 if ( that.find('.gallery-caption').length > 0 ) { 320 that.append('<span class="gallery-caption-trigger">i</span>') 321 } 322 323 }) 324 325 $('.gallery-caption-trigger').on('mouseenter',function(){ 326 $(this).siblings('.gallery-caption').addClass('show'); 327 }); 328 329 $('.gallery-caption-trigger').on('mouseleave',function(){ 330 $(this).siblings('.gallery-caption').removeClass('show'); 331 }); 332 333 $('.trigger-footer-widget').on('click', function(){ 334 335 var trigger = $(this).parent(); 336 337 trigger.fadeOut('1000',function(){ 338 trigger.remove(); 339 $('.site-footer-widget-area').fadeIn(); 340 }); 341 }); 342 343 //Language Switcher 344 $('.topbar-language-switcher').on( 'change', function(){ 345 window.location = $(this).val(); 346 }); 347 348 $(window).on( 'resize', function(){ 349 350 $('.site-search-form-wrapper-inner, .site-search .widget_search .search-form').css('margin-left',-$(window).width()/4); 351 352 }); 353 354 $(window).on( 'scroll', function() { 355
356 //mark this selector as visible 357 $("section.related, #site-footer").each(function(i, el) { 358 if ($(el).visible(true)) { 359 $(el).addClass("on_screen"); 360 361 } else { 362 $(el).removeClass("on_screen"); 363 364 } 365 }); 366 367 //single post overlay - only for large-up 368 if ( $(window).width() > 1024 ) { 369 $('.single-post-header-overlay').css('opacity', 0.3 + ($(window).scrollTop()) / (($(window).height())*1.4) ); 370 } 371 372 }); 373 374 $('.widget_layered_nav span.count, .widget_product_categories span.count').each(function(){ 375 var count = $(this).html(); 376 count = count.substring(1, count.length-1); 377 $(this).html(count); 378 }) 379 380 /******************** average rating widget ****************************/ 381 $('.widget_rating_filter ul li a').each(function(){ 382 var count = $(this).contents().filter(function(){ 383 return this.nodeType == 3; 384 })[0].nodeValue; 385 386 $(this).contents().filter(function(){ 387 return this.nodeType == 3; 388 })[0].nodeValue = ''; 389 390 count = count.slice(2,-1); 391 392 $(this).append('<span class="count">' + count + '</span>'); 393 }) 394 395 /********************** my account tabs by url **************************/ 396 if ( ('form#register').length > 0 ) 397 { 398 var hash = window.location.hash; 399 if (hash) 400 { 401 $('.account-tab-link').removeClass('current'); 402 $('a[href="'+hash+'"]').addClass('current'); 403 404 hash = hash.substring(1); 405 $('.account-forms > form').hide(); 406 $('form#'+hash).show(); 407 } 408 } 409 410 /* BACK TO TOP */ 411 if( getbowtied_scripts_vars.back_to_top_button && $('.progress-wrap').length > 0 ) { 412 var progressPath = document.querySelector('.progress-wrap path'); 413 var pathLength = progressPath.getTotalLength(); 414 progressPath.style.transition = progressPath.style.WebkitTransition = 'none'; 415 progressPath.style.strokeDasharray = pathLength + ' ' + pathLength; 416 progressPath.style.strokeDashoffset = pathLength; 417 progressPath.getBoundingClientRect(); 418 progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear'; 419 var updateProgress = function () { 420 var scroll = $(window).scrollTop(); 421 var height = $(document).height() - $(window).height(); 422 var progress = pathLength - (scroll * pathLength / height); 423 progressPath.style.strokeDashoffset = progress; 424 } 425 updateProgress(); 426 $(window).on( 'scroll', updateProgress ); 427 var offset = 50; 428 var duration = 550; 429 $(window).on('scroll', function() { 430 if ($(this).scrollTop() > offset) { 431 $('.progress-wrap').addClass('active-progress'); 432 } else { 433 $('.progress-wrap').removeClass('active-progress'); 434 } 435 }); 436 $('.progress-wrap').on('click', function(event) { 437 event.preventDefault(); 438 $('html, body').animate({scrollTop: 0}, duration); 439 return false; 440 }); 441 } 442 443 // wpbakery 444 function bs_fix_vc_full_width_row() { 445 446 var elements = $('[data-vc-full-width="true"]'); 447 $.each(elements, function () { 448 var el = jQuery(this); 449 el.css('right', el.css('left')).css('left', ''); 450 }); 451 452 } 453 454 // Fixes rows in RTL 455 if( $('body').hasClass("rtl") ) { 456 $(document).on('vc-full-width-row', function () { 457 bs_fix_vc_full_width_row(); 458 }); 459 } 460 461 // Run one time because it was not firing in Mac/Firefox and Windows/Edge some times 462 if ($('body').hasClass("rtl")) { 463 bs_fix_vc_full_width_row(); 464 } 465 466 // Checkout expand forms 467 $('.woocommerce-checkout').on('click', '.showlogin', function() { 468 $('form.woocommerce-form-login').toggleClass('fade'); 469 }); 470 471 $('.woocommerce-checkout').on('click', '.showcoupon, .checkout_coupon_inner .button', function() { 472 $('form.woocommerce-form-coupon').toggleClass('fade'); 473 }); 474 475 $(".vc_images_carousel").each(function() { 476 var height = $(this).find(".vc_item.vc_active").height(); 477 $(this).css("height", height); 478 }); 479 480 $(".vc_images_carousel").on('click', '.vc_right, .vc_left, .vc_carousel-indicators li', function(){ 481 482 var that = $(this); 483 484 setTimeout(function(){ 485 var height = that.parents(".vc_images_carousel").find(".vc_item.vc_active").height(); 486 that.parents(".vc_images_carousel").css("height", height); 487 }, 600); 488 489 490 }); 491 492 // set focus on search input field in off-canvas 493 $(document).on('click touchend', 'header .site-tools .search-button .spk-icon-search', function(){ 494 setTimeout( function(){ 495 $(".off-canvas .woocommerce-product-search .search-field").focus(); 496 }, 800); 497 }); 498 499 // close off-canvas when 'ESC' is pressed 500 $(document).on( 'keyup', function(event){ 501 //check if user has pressed 'Esc' 502 if( ( event.which=='27' ) && ( $('.off-canvas').length ) && ( $('.off-canvas').hasClass('is-open') ) ) { 503 $('.off-canvas').foundation('close'); 504 } 505 }); 506 507 // When Viewport Height is equal with 768, make the minicart image smaller 508 var windowHeight = $(window).height(); 509 var minicart_product_img = $('.shopkeeper-mini-cart .widget.woocommerce.widget_shopping_cart .widget_shopping_cart_content .cart_list.product_list_widget li.mini_cart_item .product-item-bg'); 510 511 if ( windowHeight == 768) { 512 minicart_product_img.addClass('smaller-vh'); 513 } else { 514 minicart_product_img.removeClass('smaller-vh'); 515 } 516 517 // If both facebook messenger and get this theme plugins exists, make them look nice 518 if ( $('#fbmsg').length ) { 519 520 if ( $('.getbowtied_get_this_theme').length ) { 521 $('#fbmsg').addClass('gbt_plugin_installed'); 522 } else { 523 $('#fbmsg').removeClass('gbt_plugin_installed'); 524 } 525 } 526 527 $("body.single-product form.cart").on("change", "input.qty, input.custom-qty", function() { 528 $('button.single_add_to_cart_button.ajax_add_to_cart').attr("data-quantity", this.value); 529 });
530 531 // overlay for loader on ajax add to cart and wishlist 532 $('body').on("click", ".products .ajax_add_to_cart", function() { 533 $(this).parents('.column').find('.product_thumbnail').prepend('<div class="overlay"></div>'); 534 }); 535 $('body').on('added_to_cart', function(){ 536 $('.product_thumbnail .overlay').remove(); 537 }); 538 539 //progress add to cart button 540 $("button.single_add_to_cart_button.ajax_add_to_cart.progress-btn").on("click", function(e) { 541 var progressBtn = $(this); 542 543 if (!progressBtn.hasClass("active")) { 544 progressBtn.addClass("active"); 545 setTimeout(function() { 546 progressBtn.addClass("check"); 547 }, 1500); 548 setTimeout(function() { 549 progressBtn.removeClass("active"); 550 progressBtn.removeClass("check"); 551 }, 3500); 552 } 553 }); 554 555 //my account order add class to order header 556 $('.woocommerce-MyAccount-content .woocommerce-order-details').siblings('p').addClass('order-info'); 557 558 $(document).foundation(); 559}); 560 561jQuery( function ($) { 562 563 "use strict"; 564 565 // sticky header 566 if( getbowtied_scripts_vars.sticky_header ) { 567 568 var headerHeight = $('.top-headers-wrapper').length ? $('.top-headers-wrapper').outerHeight() : 0; 569 570 var totalHeaderHeight = $('.site-header').length ? $('.site-header').outerHeight() : 0; 571 572 if( $('#site-top-bar').length ) { 573 totalHeaderHeight += $('#site-top-bar').outerHeight(); 574 } 575 576 $(window).on( 'scroll', function() { 577 if (getbowtied_scripts_vars.mobile_sticky_header) { 578 var that = $('.site-header-sticky'); 579 580 if ( $(this).scrollTop() > totalHeaderHeight ) { 581 $('.st-content').css( 'padding-top', headerHeight-1 ); // -1 fix top-headers-wrapper border-top / margin-top 582 that.addClass('sticky'); 583 } else { 584 that.removeClass('sticky'); 585 $('.st-content').css( 'padding-top', '' ); 586 } 587 } 588 }); 589 } 590 591 // menu dropdown apply scrollbar when longer than the screen 592 if( $('.site-header .main-navigation').length && $('.site-header .main-navigation > ul > li > .sub-menu').length ) { 593 var menu_height = $(window).height() - $('.site-header .main-navigation > ul > li > .sub-menu').offset().top; 594 $('.site-header .main-navigation > ul > li > .sub-menu').each( function () { 595 if( $(this).outerHeight() > menu_height ) { 596 $(this).css( {'max-height': menu_height - 100, 'overflow-y': 'auto' }); 597 } 598 }); 599 } 600 601 // adjust dropdowns' position to avoid offscreen display 602 function adjust_dropdown_position() { 603 if( $(window).width() >= 1024 ) { 604 $('.top-headers-wrapper .main-navigation > ul li.menu-item-has-children').each( function() { 605 606 var submenuWidth = $(this).find('> .sub-menu').outerWidth(); 607 608 var submenuOffset = $(this).find('> .sub-menu').offset().left; 609 var totalSubMenuWidth = submenuWidth + submenuOffset; 610 if ( ( totalSubMenuWidth - $(window).width() ) > 0 ) { 611 if( $(this).hasClass('mega-menu') ) { 612 var position = totalSubMenuWidth - $(window).width(); 613 $(this).find('> .sub-menu').css( 'left', '-' + position + 'px' ); 614 } else { 615 $(this).find('> .sub-menu').addClass('reverse'); 616 } 617 } 618 }); 619 } else { 620 $('.top-headers-wrapper .main-navigation > ul li.menu-item-has-children').each( function() { 621 $(this).children('ul').removeClass('reverse'); 622 if( $(this).hasClass('mega-menu') ) { 623 $(this).children('ul').css( 'left', 0 ); 624 } 625 }); 626 } 627 } 628 629 adjust_dropdown_position(); 630 var resizeTimer; 631 $(window).on( 'resize', function() { 632 clearTimeout(resizeTimer); 633 $('.top-headers-wrapper .main-navigation > ul li.menu-item-has-children.mega-menu > .sub-menu').css( 'left', 0 ); 634 resizeTimer = setTimeout(function() {
635 adjust_dropdown_position(); 636 }, 250); 637 }); 638 639 // close search offcanvas 640 $(document).on('click', '.site-search .close-button', function(){ 641 $(document).find('#offCanvasTop1').removeAttr("style"); 642 }); 643 644 // dropdown levels 645 $('.main-navigation > ul > li').on({ 646 mouseenter: function() { 647 $(this).addClass('active'); 648 }, 649 mouseleave: function() { 650 $(this).removeClass('active'); 651 } 652 }); 653 654 $('.main-navigation > ul > li ul li').on({ 655 mouseenter: function() { 656 clearTimeout($(this).data('timeoutId')); 657 $(this).addClass('active'); 658 }, 659 mouseleave: function() { 660 var that = $(this); 661 var timeoutId = setTimeout( function() { 662 that.removeClass('active'); 663 }, 200); 664 that.data('timeoutId', timeoutId); 665 } 666 }); 667 668}); 669 670jQuery( function($) { 671 672 "use strict"; 673 674 var classes = $(".custom-layout .mobile_gallery .woocommerce-product-gallery").attr("class"); 675 var ol_classes = $(".custom-layout .mobile_gallery .flex-control-thumbs").attr("class"); 676 677 $(window).on('resize', function() { 678 if ($(window).width() <= 1024) { 679 $(".custom-layout .mobile_gallery >
679 div").addClass(classes); 680 $(".custom-layout .mobile_gallery ol").addClass(ol_classes); 681 } else { 682 $(".custom-layout .mobile_gallery .woocommerce-product-gallery").removeClass(classes); 683 $(".custom-layout .mobile_gallery .flex-control-thumbs").removeClass(ol_classes); 684 } 685 }); 686 687 $(window).on( 'load', function() { 688 if ($(window).width() >= 1025) { 689 $(".custom-layout .mobile_gallery .woocommerce-product-gallery").removeClass(classes); 690 $(".custom-layout .mobile_gallery .flex-control-thumbs").removeClass(ol_classes); 691 } 692 }); 693 694 // Fresco Lightbox 695 if ( getbowtied_scripts_vars.product_lightbox == 1 ) { 696 697 // Add fresco to default gallery 698 $( ".product_layout_classic .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image" ).each(function() { 699 700 $(this).attr('id', 'product-gallery'); 701 $(this).find('a').addClass('fresco'); 702 $(this).find('.fresco').attr('data-fresco-group', $(this).attr('id')); 703 $(this).find('.fresco').attr('data-fresco-group-options', "overflow: true, thumbnails: 'vertical', onClick: 'close'"); 704 $(this).find('.fresco img').addClass('fresco-img'); 705 706 if( ! $(this).find('.fresco').hasClass('video') ) { 707 if ( $(this).find('.fresco img').attr('data-caption').length > 0 ) { 708 $(this).find('.fresco').attr('data-fresco-caption', $(this).find('.fresco img').attr('data-caption')); 709 } 710 } 711 }); 712 713 // Add fresco to mobile gallery 714 $( ".woocommerce-product-gallery__wrapper.mobile-gallery .woocommerce-product-gallery__image" ).each(function() { 715 716 $(this).attr('id', 'product-mobile-gallery'); 717 $(this).find('a').addClass('fresco'); 718 $(this).find('.fresco').attr('data-fresco-group', $(this).attr('id')); 719 $(this).find('.fresco').attr('data-fresco-group-options', "overflow: true, thumbnails: 'horizontal', onClick: 'close'"); 720 $(this).find('.fresco img').addClass('fresco-img'); 721 722 $(this).find('.fresco').each( function() { 723 if( $(this).find('img').length > 0 ) { 724 $(this).attr('data-fresco-options', "thumbnail: '" + $(this).find('img').attr('src') + "'"); 725 } 726 }); 727 728 if ( getbowtied_scripts_vars.product_gallery_zoom ) { 729 $(this).find('.fresco').addClass('zoom'); 730 } 731 732 if( ! $(this).find('.fresco').hasClass('video') ) { 733 if ( $(this).find('.fresco img').attr('data-caption').length > 0 ) { 734 $(this).find('.fresco').attr('data-fresco-caption', $(this).find('.fresco img').attr('data-caption')); 735 } 736 } 737 }); 738 739 // Trigger fresco lightbox 740 $('.product_layout_classic, .custom-layout').on('click', '.fresco-img, .zoomImg', function(){ 741 if ($(window).width() >= 1025) { 742 $(this).siblings('.fresco').trigger('click'); 743 } 744 }); 745 746 $('.custom-layout .easyzoom').on('click', '.easyzoom-flyout', function(){ 747 if ($(window).width() >= 1025) { 748 $(this).siblings('.fresco.zoom').trigger('click'); 749 } 750 }); 751 752 } 753 754 // Default Gallery - Scroll thumbnails 755 $(document).on('click touchend', '.product_layout_classic ol.flex-control-thumbs li img', function() { 756 if ($(window).width() >= 1025) { 757 758 var product_thumbnails = $('ol.flex-control-thumbs'); 759 var product_thumbnails_cells = product_thumbnails.find('li'); 760 var product_thumbnails_height = product_thumbnails.height(); 761 var product_thumbnails_cells_height = product_thumbnails_cells.length ? product_thumbnails_cells.outerHeight() : 0; 762 var product_images = $('.woocommerce-product-gallery__wrapper'); 763 var index = $('.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image.flex-active-slide').index(); 764 765 var scrollY = (index * product_thumbnails_cells_height) - ( (product_thumbnails_height - product_thumbnails_cells_height) / 2) - 10; 766 767 product_thumbnails.animate({ 768 scrollTop: scrollY 769 }, 300); 770 } 771 }); 772}); 773 774jQuery( function($){ 775 776 "use strict"; 777 778 /* open minicart on click */ 779 if (getbowtied_scripts_vars.option_minicart == 1 && getbowtied_scripts_vars.option_minicart_open == 1) { 780 781 $('body').on('click', '.shopping-bag-button .tools_button', function(e) { 782 783 if( $('body').hasClass('gbt_custom_notif') ) { 784 $('.gbt-custom-notification-notice').removeClass('open-notice').removeAttr( 'style' ).addClass('fade-out-notice'); 785 } 786 787 if ( $(window).width() >= 1024 ) { 788 789 e.preventDefault(); 790 $('.shopkeeper-mini-cart').toggleClass('open'); 791 e.stopPropagation(); 792 793 } else { 794 e.stopPropagation(); 795 } 796 }); 797 798 /* close minicart */ 799 $('body').on('click', function(event){ 800 if( $('.shopkeeper-mini-cart').hasClass('open') ) 801 { 802 if (!$(event.target).is('.shopkeeper-mini-cart') && !$(event.target).is('.shopping-bags-button .tools-button') && !$(event.target).is('.woocommerce-message') 803 && ( $('.shopkeeper-mini-cart').has(event.target).length === 0) ) 804 { 805 $('.shopkeeper-mini-cart').removeClass('open'); 806 } 807 } 808 }); 809 } 810 811 /* open minicart on hover */ 812 if ( $(window).width() >= 1024 ) { 813 if (getbowtied_scripts_vars.option_minicart == 1 && getbowtied_scripts_vars.option_minicart_open == 2) { 814 815 $('.shopping-bag-button').on({ 816 mouseenter: function(e) { 817 if( !($('.shopkeeper-mini-cart').hasClass('open')) ) { 818 window.setTimeout(function() { 819 820 if( $('body').hasClass('gbt_custom_notif') ) { 821 $('.gbt-custom-notification-notice').removeClass('open-notice').removeAttr( 'style' ).addClass('fade-out-notice'); 822 } 823 824 e.preventDefault(); 825 $('.shopkeeper-mini-cart').addClass('open'); 826 e.stopPropagation(); 827 828 }, 350); 829 } 830 }, 831 mouseleave: function() { 832 window.setTimeout(function() { 833 if ( $('.shopkeeper-mini-cart').hasClass('open') && !$('.shopkeeper-mini-cart').is(':hover') ) { 834 $('.shopkeeper-mini-cart').removeClass('open'); 835 } 836 }, 500); 837 } 838 }); 839 840 $('.shopkeeper-mini-cart').on({ 841 mouseleave: function (e) { 842 window.setTimeout(function() { 843 if ( ($('.shopkeeper-mini-cart').hasClass('open')) ) { 844 $('.shopkeeper-mini-cart').removeClass('open'); 845 } 846 }, 500); 847 } 848 }); 849 } 850 } 851 852}); 853 854jQuery( function($){ 855 856 "use strict"; 857 858 //woocommerce tabs 859 $('.woocommerce-tabs .row + .panel').addClass('current'); 860 $('.woocommerce-tabs ul.tabs li a').off('click').on('click', function(){ 861 var that = $(this); 862 var currentPanel = that.attr('href'); 863 864 that.parent().siblings().removeClass('active') 865 .end() 866 .addClass('active'); 867 868 if( $('.woocommerce-tabs').find(currentPanel).siblings('.panel').filter(':visible').length > 0 ) { 869 $('.woocommerce-tabs').find(currentPanel).siblings('.panel').filter(':visible').fadeOut(500,function(){ 870 $('.woocommerce-tabs').find(currentPanel).siblings('.panel').removeClass('current'); 871 $('.woocommerce-tabs').find(currentPanel).addClass('current').fadeIn(500); 872 }); 873 } else { 874 $('.woocommerce-tabs').find(currentPanel).siblings('.panel').removeClass('current'); 875 $('.woocommerce-tabs').find(currentPanel).addClass('current').fadeIn(500); 876 } 877 878 return false;
879 }); 880 881 //scroll on reviews tab 882 $('.woocommerce-review-link').off('click').on('click',function(){ 883 884 $('.tabs li a').each(function(){ 885 if ($(this).attr('href')=='#tab-reviews') { 886 $(this).trigger('click'); 887 } 888 }); 889 890 var elem_on_screen_height = 0; 891 892 if ( $('body').hasClass('admin-bar') ) { 893 elem_on_screen_height += 32; 894 } 895 896 var tab_reviews_topPos = $('.woocommerce-tabs').offset().top - elem_on_screen_height; 897 898 $('html, body').animate({ 899 scrollTop: tab_reviews_topPos 900 }, 1000); 901 902 return false; 903 }); 904 905}); 906 907jQuery( function($) { 908 909 "use strict"; 910 911 //Product Gallery zoom 912 913 if ($(".easyzoom").length ) { 914 915 if ( $(window).width() > 1024 ) { 916 917 var $easyzoom = $(".easyzoom").easyZoom({ 918 loadingNotice: '', 919 errorNotice: '', 920 preventClicks: false, 921 linkAttribute: "href", 922 }); 923 924 var easyzoom_api = $easyzoom.data('easyZoom'); 925 926 $(".variations").on('change', 'select', function() { 927 easyzoom_api.teardown(); 928 easyzoom_api._init(); 929 }); 930 931 } else { 932 933 $(".easyzoom a").on( 'click', function(event) { 934 event.preventDefault(); 935 }); 936 } 937 } 938 939}); 940 941jQuery( function($) { 942 943 'use strict'; 944 945 // Products Dot Navigation [ Product Version 2 & 3 ] 946 947 var productImagesController = $('.product-images-controller'); 948 var productImages = $('.product-images-style-2 .product_images .product-image:not(.mobile), .product-images-style-3 .product_images .product-image:not(.mobile)'); 949 var navigationItems = $('.product-images-style-2 .product-images-controller li a span.dot, .product-images-style-3 .product-images-controller li a span.dot'); 950 var productImagesContainer = $('.product-images-wrapper'); 951 var headerHeight = $('.site-header-sticky').length ? $('.site-header-sticky').outerHeight() : 0; 952 953 // set position of the product images controller layout 2 954 955 if ( $('.product_layout_cascade').length > 0 ) { 956 957 var controllerLayout2 = $('.product_layout_cascade .product-images-controller'); 958 controllerLayout2.css('top', productImagesContainer.offset().top); 959 } 960 961 962 $(window).on( 'scroll', function() { 963 964 navigationItems.addClass('current'); 965 966 productImages.each(function() { 967 968 var $this = $(this); 969 970 var activeImage = $(' a[href="#'+$this.attr('id')+'"]').data('number'); 971 972 973 if ( $this.offset().top + $this.outerHeight() <= productImagesController.offset().top - headerHeight ) { 974 975 navigationItems.removeClass('current'); 976 977 navigationItems.eq(activeImage).addClass('current'); 978 979 } else { 980 navigationItems.eq(activeImage).removeClass('current'); 981 } 982 983 }); 984 985 // set youtube vide icon current 986 987 var youtubeVideo = $('.product_layout_cascade .fluid-width-video-wrapper'); 988 989 if ( youtubeVideo.length > 0 ) { 990 991 if ( youtubeVideo.offset().top <= productImagesController.offset().top - headerHeight ) { 992 $('li.video-icon span.dot').addClass('current'); 993 } else { 994 $('.product-images-controller .video-icon .dot').removeClass('current'); 995 } 996 997 if ( youtubeVideo.offset().top + youtubeVideo.outerHeight() <= productImagesController.offset().top ) { 998 999 $('.product-images-controller .video-icon .dot').removeClass('current'); 1000 } 1001 1002 } 1003 1004 }); 1005 1006 1007 // navigationItem smooth scroll 1008 if ( $('.single-product').length > 0 ) { 1009 1010 $('a[href*="#controller-navigation-image"]:not([href="#"])').on( 'click', function() { 1011 1012 if ( location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname ) { 1013 var target = $(this.hash); 1014 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 1015 1016 // if wordpress admin bar exists take care of that 1017 var adminBarHeight = 0; 1018 if ( $('body').hasClass('admin-bar') ) { 1019 var adminBarHeight = 32; 1020 } 1021 1022 var header_height = $('.site-header-sticky').length ? $('.site-header-sticky').outerHeight() : 0; 1023 1024 if (target.length) { 1025 $('html, body').animate({ 1026 scrollTop: target.offset().top - header_height - adminBarHeight 1027 }, 500); 1028 return false; 1029 } 1030 } 1031 1032 }); 1033 1034 } 1035 1036 // Video Autoplay on click 1037 if ( $('.product-image.video iframe')) { 1038 1039 $('.product_layout_cascade .product-images-controller .video-icon > a').on('click', function(e) { 1040 $('.product-image.video iframe')[0].src += "&autoplay=1"; 1041 e.preventDefault(); 1042 }); 1043 1044 } 1045 }); 1046 1047jQuery( function($) { 1048 1049 'use strict'; 1050 1051 // Stops Products_infos at Footer 1052 1053 setTimeout(function(){ 1054 if($(".single-product .product .product_infos .cart .StripeElement").children().length > 0) { 1055 $(".single-product .product .product_infos .cart").addClass("stripe-button"); 1056 } 1057 },1000); 1058 1059 function product_infos_adjust() { 1060 // if product description is too long 1061 var productInfosHeight = $('.product .product_content_wrapper .product_infos').length ? $('.product .product_content_wrapper .product_infos').outerHeight() : 0; 1062 var productInfosPos = $('.product .product_content_wrapper .product_infos').position().top; 1063 var productInfosWidth = $('.product .product_content_wrapper .product_infos').length ? $('.product .product_content_wrapper .product_infos').outerWidth() : 0;
1064 var productContentWrapperOff = $('.product_content_wrapper').offset().top; 1065 1066 if ( (productInfosHeight > $(window).innerHeight() - productContentWrapperOff) && ($(window).width() >= 1024) ) { 1067 $('.product_infos').addClass('long-description'); // product description is longer than actual viewport 1068 } else { 1069 $('.product_infos').css({ top: productContentWrapperOff }); 1070 } 1071 } 1072 1073 if ( ($('.product_layout_cascade').length > 0) || ($('.product_layout_scattered').length > 0) ) { 1074 1075 product_infos_adjust(); 1076 1077 // if product_infos is at at footer, stop it. 1078 $(window).on( 'scroll', function() { 1079 1080 var windowTop = $(window).scrollTop(); 1081 var footerTop = $("#site-footer").length ? $("#site-footer").offset().top : 0; 1082 var productInfosOff = $('.product_infos.fixed').offset().top; 1083 var productInfosH = $(".product_infos.fixed").length ? $(".product_infos.fixed").height() : 0; 1084 var padding = 40; // let a distance between the product_infos and the footer 1085 var productContentWrapperOff = $('.product_content_wrapper').length ? $('.product_content_wrapper').offset().top : 0; 1086 1087 if (windowTop + productInfosH + 200 > footerTop - padding ) { 1088 1089 $('.product_infos.fixed:not(.long-description)').css({ 1090 top: (windowTop + productInfosH - footerTop + padding) * -1 1091 }); 1092 1093 } else { 1094 $('.product_infos.fixed:not(.long-description)').css({ 1095 top : productContentWrapperOff 1096 }); 1097 } 1098 1099 }); 1100 1101 $(window).on( 'orientationchange', function() { 1102 product_infos_adjust(); 1103 }); 1104 } 1105 1106}); 1107 1108jQuery( function($) { 1109 1110 'use strict'; 1111 1112 // Product Ratings Tooltip 1113 1114 if ( $(window).width() > 1024 ) { 1115 1116 var woocommerce_review_link_hover = $('.product .woocommerce-product-rating .woocommerce-review-link').html(); 1117 var woocommerce_review_link = $('.product .woocommerce_review_link_hover'); 1118 var woocommerce_product_rating = $('.product .woocommerce-product-rating'); 1119 var rating_tooltip = '<div class="woocommerce_review_link_hover">' + woocommerce_review_link_hover + '</div>'; 1120 1121 // check to see if the woocommerce reviews tab is enabled 1122 if ( woocommerce_review_link_hover != undefined ) { 1123 1124 woocommerce_product_rating.before(rating_tooltip); 1125 1126 woocommerce_product_rating.on({ 1127 mouseenter: function() { 1128 1129 $('.woocommerce_review_link_hover').addClass('hovered') 1130 }, 1131 mouseleave: function() { 1132 1133 $('.woocommerce_review_link_hover').removeClass('hovered') 1134 } 1135 1136 }); 1137 } 1138 } 1139}); 1140 1141jQuery( function($) { 1142 1143 'use strict'; 1144 1145 // Product Quantity Custom Buttons 1146 1147 $(document).on('click', '.plus-btn', function(e) { 1148 1149 var input = $(this).prev('input.custom-qty'); 1150 1151 if( $('body').hasClass('rtl') ) { 1152 input = $(this).next('input.custom-qty'); 1153 } 1154 1155 var val = parseInt(input.val()); 1156 if( !val ) { val = 0; } 1157 var max = parseInt(input.attr('max')); 1158 var step = parseInt(input.attr('step')) || 1; 1159 1160 if( !isNaN(max) ) { 1161 if( max > val ) { 1162 input.val( val+step ).change(); 1163 } 1164 } else { 1165 input.val( val+step ).change(); 1166 } 1167 1168 return false; 1169 }); 1170 1171 $(document).on('click', '.minus-btn', function(e) { 1172 1173 var input = $(this).next('input.custom-qty'); 1174 1175 if( $('body').hasClass('rtl') ) { 1176 input = $(this).prev('input.custom-qty'); 1177 } 1178 1179 var val = parseInt(input.val()); 1180 if( !val ) { val = 0; } 1181 var min = parseInt(input.attr('min')); 1182 var step = parseInt(input.attr('step')) || 1; 1183 1184 if( !isNaN(min) ) { 1185 if( min < val ) { 1186 input.val( val-step ).change(); 1187 } 1188 } else { 1189 input.val( val-step ).change(); 1190 } 1191 1192 return false; 1193 }); 1194 1195 var windowWidth = $(window).width(); 1196 1197 // Input Quantity Long Press 1198 1199 if ( windowWidth > 1024 ) { 1200 1201 var timer; 1202 1203 $(document).on('mousedown', '.plus-btn', function(e) { 1204 1205 var input = $(this).prev('input.custom-qty'); 1206 var val = parseInt(input.val()); 1207 1208 timer = setInterval(function() { 1209 1210 val++; 1211 input.val(val); 1212 1213 }, 250); 1214 1215 }); 1216 1217 $(document).on('mousedown', '.minus-btn', function(e) { 1218 1219 var input = $(this).next('input.custom-qty'); 1220 var val = parseInt(input.val()); 1221 1222 timer = setInterval(function() { 1223 1224 if (val > 1) { 1225 val--; 1226 input.val(val); 1227 } 1228 1229 }, 250); 1230 }); 1231 1232 1233 document.addEventListener("mouseup", function(){ 1234 if (timer) clearInterval(timer) 1235 }); 1236 1237 } 1238}); 1239 1240jQuery(function($) { 1241 1242 "use strict"; 1243 1244 // yith wishlist counter 1245 function getCookie(name) { 1246 var dc = document.cookie;
1247 var prefix = name + "="; 1248 var begin = dc.indexOf("; " + prefix); 1249 if (begin == -1) { 1250 begin = dc.indexOf(prefix); 1251 if (begin != 0) return null; 1252 } 1253 else 1254 { 1255 begin += 2; 1256 var end = document.cookie.indexOf(";", begin); 1257 if (end == -1) { 1258 end = dc.length; 1259 } 1260 } 1261 // because unescape has been deprecated, replaced with decodeURI 1262 //return unescape(dc.substring(begin + prefix.length, end)); 1263 return decodeURIComponent(decodeURIComponent((dc.substring(begin + prefix.length, end)))); 1264 } 1265 1266 function getbowtied_update_wishlist_count(count) { 1267 if ( ( typeof count === "number" && isFinite(count) && Math.floor(count) === count ) && count >=0 ) { 1268 $('.wishlist_items_number').html(count); 1269 } 1270 } 1271 1272 if ($('.wishlist_items_number').length ) { 1273 1274 var wishlistCounter = 0; 1275 1276 /* 1277 ** Check for Yith cookie 1278 */ 1279 var wlCookie = getCookie("yith_wcwl_products"); 1280 1281 if ( wlCookie != null ) { 1282 wlCookie = wlCookie.slice(0, wlCookie.indexOf(']') + 1); 1283 var products = JSON.parse(wlCookie); 1284 wishlistCounter = Object.keys(products).length; 1285 } else { 1286 wishlistCounter = Number($('.wishlist_items_number').html()); 1287 } 1288 1289 /* 1290 ** Increment counter on add 1291 */ 1292 $('body').on( 'added_to_wishlist' , function(){ 1293 wishlistCounter++; 1294 getbowtied_update_wishlist_count(wishlistCounter); 1295 }); 1296 1297 /* 1298 ** Decrement counter on remove 1299 */ 1300 $('body').on( 'removed_from_wishlist' , function(){ 1301 wishlistCounter--; 1302 getbowtied_update_wishlist_count(wishlistCounter); 1303 }); 1304 1305 getbowtied_update_wishlist_count(wishlistCounter); 1306 } 1307}); 1308 1309jQuery( function($){ 1310 1311 "use strict"; 1312 1313 //shopkeeper_catalogMode 1314 function shopkeeper_catalog_mode() { 1315 if ( getbowtied_scripts_vars.catalog_mode ) { 1316 $("form.cart div.quantity").empty(); 1317 $("form.cart button.single_add_to_cart_button").remove(); 1318 } 1319 } 1320 1321 shopkeeper_catalog_mode(); 1322}); 1323 1324jQuery(function($) { 1325 1326 "use strict"; 1327 1328 var pagination_type = getbowtied_scripts_vars.shop_pagination_type; 1329 var load_more_text = getbowtied_scripts_vars.ajax_load_more_locale; 1330 var load_more_loading_text = getbowtied_scripts_vars.ajax_loading_locale; 1331 var no_more_items_text = getbowtied_scripts_vars.ajax_no_more_items_locale; 1332 1333 if ( pagination_type == 'load_more_button' || pagination_type == 'infinite_scroll' ) { 1334 1335 if ( $( '.woocommerce-pagination' ).length && $( 'body' ).hasClass( 'archive' ) ) { 1336 1337 $( '.woocommerce-pagination' ).before( '<div class="getbowtied_ajax_load_button"><a getbowtied_ajax_load_more_processing="0">' + load_more_text + '</a></div>' ); 1338 1339 if ( pagination_type == 'infinite_scroll' ) { 1340 $( '.getbowtied_ajax_load_button' ).addClass( 'getbowtied_ajax_load_more_hidden' ); 1341 } 1342 1343 if ( $('.woocommerce-pagination a.next').length == 0 ) { 1344 $('.getbowtied_ajax_load_button').addClass( 'getbowtied_ajax_load_more_hidden' ); 1345 } 1346 1347 $('.woocommerce-pagination').hide(); 1348 } 1349 1350 $( 'body' ).on( 'click', '.getbowtied_ajax_load_button a', function(e) { 1351 1352 e.preventDefault(); 1353 1354 if ( $('.woocommerce-pagination a.next').length ) { 1355 1356 $( '.getbowtied_ajax_load_button a' ).attr( 'getbowtied_ajax_load_more_processing', 1 ); 1357 var href = $( '.woocommerce-pagination a.next' ).attr( 'href' ); 1358 1359 $( '.getbowtied_ajax_load_button' ).fadeOut( 200, function() { 1360 $( '.woocommerce-pagination' ).before( '<div class="getbowtied_ajax_load_more_loader"><span>' + load_more_loading_text + '</span></div>' ); 1361 }); 1362 1363 $.get(href, function(response) { 1364 1365 $( '.woocommerce-pagination' ).html( $(response).find( '.woocommerce-pagination' ).html() ); 1366 1367 var i= 0; 1368 1369 $( response ).find( '.site-content ul.products > li' ).each( function() { 1370 1371 i++; 1372 $(this).addClass( "ajax-loaded delay-" + i ); 1373 $('.site-content ul.products > li:last').after($(this)); 1374 }); 1375 1376 $('.getbowtied_ajax_load_more_loader').fadeOut(200, function(){ 1377 $('.getbowtied_ajax_load_button').fadeIn(200); 1378 $('.getbowtied_ajax_load_button a').attr('getbowtied_ajax_load_more_processing', 0); 1379 });
1380 1381 setTimeout(function(){ 1382 $('.getbowtied_ajax_load_more_loader').remove(); 1383 }, 250 ); 1384 1385 $(document).trigger('post-load'); 1386 1387 setTimeout(function(){ 1388 1389 $('.site-content ul.products > li').each( function(){ 1390 //lazy loading tweak 1391 var image = $(this).find('.product_thumbnail > img.jetpack-lazy-image'); 1392 if( image ) { 1393 if( image.attr('data-lazy-srcset') ) { 1394 image.attr('srcset', image.attr('data-lazy-srcset')); 1395 } else { 1396 image.attr('srcset', image.attr('src')); 1397 } 1398 } 1399 }); 1400 1401 $('.site-content ul.products > li.hidden').removeClass('hidden').addClass('animate'); 1402 }, 500); 1403 1404 if ($('.woocommerce-pagination a.next').length == 0) { 1405 $('.getbowtied_ajax_load_button').addClass('finished').removeClass('getbowtied_ajax_load_more_hidden'); 1406 $('.getbowtied_ajax_load_button a').show().html(no_more_items_text).addClass('disabled'); 1407 } 1408 1409 }); 1410 1411 } else { 1412 1413 $('.getbowtied_ajax_load_button').addClass('finished').removeClass('getbowtied_ajax_load_more_hidden'); 1414 $('.getbowtied_ajax_load_button a').show().html(no_more_items_text).addClass('disabled'); 1415 } 1416 }); 1417 } 1418 1419 if( pagination_type == 'infinite_scroll' ) { 1420 1421 var buffer_pixels = Math.abs(0); 1422 1423 $(window).on( 'scroll', function() { 1424 1425 if ($('.site-content ul.products:not(.product-categories)').length) { 1426 1427 var a = $('.site-content ul.products:not(.product-categories)').offset().top + $('.site-content ul.products:not(.product-categories)').outerHeight(); 1428 var b = a - $(window).scrollTop(); 1429 1430 if ((b - buffer_pixels) < $(window).height()) { 1431 if ($('.getbowtied_ajax_load_button a').attr('getbowtied_ajax_load_more_processing') == 0) { 1432 $('.getbowtied_ajax_load_button a').trigger('click'); 1433 } 1434 } 1435 1436 } 1437 1438 }); 1439 } 1440 1441 $('section.related.products').addClass('mobile-columns-' + getbowtied_scripts_vars.mobile_product_columns ); 1442 $('section.upsells.products').addClass('mobile-columns-' + getbowtied_scripts_vars.mobile_product_columns ); 1443}); 1444 1445/** 1446 * Product card jQuery animations 1447 * 1448 * @package BlockShop 1449 */ 1450 1451jQuery( 1452 1453 function($) { 1454 1455 "use strict"; 1456 1457 let user_delay = 200; 1458 1459 window.product_card_animation = function(action, delay) { 1460 1461 if (typeof action === "undefined" || action === null) { 1462 action = ''; 1463 } 1464 if (typeof delay === "undefined" || delay === null) { 1465 delay = 200; 1466 } 1467 1468 $( 'ul.products' ).addClass( 'js_animated' ); 1469 1470 if (action == 'reset') { 1471 $( 'ul.products.js_animated li.product' ).removeClass( 'visible animation_ready animated' ); 1472 } 1473 1474 $( 'ul.products.js_animated li.product:not(.visible)' ).each( 1475 function() { 1476 if ( $( this ).visible( true ) ) { 1477 $( this ).addClass( 'visible' ); 1478 } 1479 } 1480 ); 1481 1482 $( 'ul.products.js_animated li.product.visible:not(.animation_ready)' ).each( 1483 function(i) { 1484 $( this ).addClass( 'animation_ready' ); 1485 $( this ).delay( i * delay ).queue( 1486 function(next) { 1487 $( this ).addClass( 'animated' ); 1488 next(); 1489 } 1490 ); 1491 } 1492 ); 1493 1494 $( 'ul.products.js_animated li.product.visible:first' ).prevAll().addClass( 'visible' ).addClass( 'animation_ready' ).addClass( 'animated' ); 1495 1496 } 1497 1498 window.category_card_animation = function(action, delay) { 1499 1500 if (typeof action === "undefined" || action === null) { 1501 action = ''; 1502 } 1503 if (typeof delay === "undefined" || delay === null) { 1504 delay = 200; 1505 } 1506 1507 $( 'section.section-categories' ).addClass( 'js_animated' ); 1508 1509 if (action == 'reset') { 1510 $( 'section.section-categories.js_animated .category-grid-item' ).removeClass( 'visible animation_ready animated' ); 1511 } 1512 1513 $( 'section.section-categories.js_animated .category-grid-item:not(.visible)' ).each( 1514 function() { 1515 if ( $( this ).visible( true ) ) { 1516 $( this ).addClass( 'visible' ); 1517 } 1518 } 1519 ); 1520 1521 $( 'section.section-categories.js_animated .category-grid-item.visible:not(.animation_ready)' ).each( 1522 function(i) { 1523 $( this ).addClass( 'animation_ready' ); 1524 $( this ).delay( i * delay ).queue( 1525 function(next) { 1526 $( this ).addClass( 'animated' ); 1527 next(); 1528 } 1529 ); 1530 } 1531 ); 1532 1533 $( 'section.section-categories.js_animated .category-grid-item.visible:first' ).prevAll().addClass( 'visible' ).addClass( 'animation_ready' ).addClass( 'animated' ); 1534 1535 } 1536 1537 $( 'ul.products.js_animated' ).imagesLoaded( 1538 function() { 1539 product_card_animation(null, user_delay); 1540 } 1541 ); 1542 1543 $( 'section.section-categories.js_animated' ).imagesLoaded( 1544 function() { 1545 category_card_animation(null, user_delay); 1546 } 1547 ); 1548 1549 $( window ).on( 'resize', 1550 function() { 1551 gb_throttle( product_card_animation(null, user_delay), 300 ); 1552 gb_throttle( category_card_animation(null, user_delay), 300 ); 1553 } 1554 ); 1555 1556 $( window ).on( 'scroll', 1557 function() { 1558 gb_throttle( product_card_animation(null, user_delay), 300 ); 1559 gb_throttle( category_card_animation(null, user_delay), 300 ); 1560 } 1561 ); 1562 1563 $( document ).ajaxComplete( 1564 function() { 1565 $( 'ul.products.js_animated' ).imagesLoaded( 1566 function() { 1567 product_card_animation(null, user_delay); 1568 } 1569 ); 1570 } 1571 ); 1572 1573 } 1574); 1575 1576jQuery(function($) { 1577 1578 "use strict"; 1579 1580 $('#masonry_grid').addClass('fade-in'); 1581 1582 if (!$('body').hasClass('search')) { 1583 1584 if (getbowtied_scripts_vars.pagination_blog == 'load_more_button' || getbowtied_scripts_vars.pagination_blog == 'infinite_scroll') { 1585 1586 if ($('.posts-navigation').length) { 1587 1588 $('.posts-navigation').before('<div class="getbowtied_blog_ajax_load_button"><a getbowtied_blog_ajax_load_more_processing="0">'+getbowtied_scripts_vars.ajax_load_more_locale+'</a></div>'); 1589 1590 if (getbowtied_scripts_vars.pagination_blog == 'infinite_scroll') { 1591 $('.getbowtied_blog_ajax_load_button').addClass('getbowtied_blog_ajax_load_more_hidden'); 1592 } 1593 1594 if ($('.posts-navigation a.next').length == 0) { 1595 $('.getbowtied_blog_ajax_load_button').addClass('getbowtied_blog_ajax_load_more_hidden'); 1596 } 1597 } 1598 1599 $('.posts-navigation').hide(); 1600 $('.blog-posts > .blog-post').addClass('getbowtied_blog_ajax_load_more_item_visible'); 1601 1602 1603 $('body').on('click', '.getbowtied_blog_ajax_load_button a', function(e) { 1604 1605 e.preventDefault(); 1606 1607 if ($('.posts-navigation a.next').length) { 1608 1609 $('.getbowtied_blog_ajax_load_button a').attr('getbowtied_blog_ajax_load_more_processing', 1); 1610 var href = $('.posts-navigation a.next').attr('href'); 1611 1612 $('.getbowtied_blog_ajax_load_button').fadeOut(200, function(){ 1613 $('.posts-navigation').before('<div class="getbowtied_blog_ajax_load_more_loader"><span>'+getbowtied_scripts_vars.ajax_loading_locale+'</span></div>'); 1614 }); 1615 1616 $.get(href, function(response) { 1617 1618 $('.posts-navigation').html($(response).find('.posts-navigation').html()); 1619 1620 var i= 0; 1621 1622 $(response).find('.blog-posts > .blog-post').each(function() { 1623 1624 if ( getbowtied_scripts_vars.layout_blog == "layout-1" ) { 1625 i++; 1626 $(this).addClass('loaded delay-'+i); 1627 1628 var grid = document.querySelector('#masonry_grid'); 1629 var item = document.createElement('li'); 1630 1631 1632 salvattore.appendElements(grid, [item]); 1633 item.outerHTML = $(this).prop('outerHTML'); 1634 1635 } else { 1636 1637 i++; 1638 $(this).addClass('loaded delay-'+i); 1639 1640 $('.blog-posts > .blog-post:last').after($(this)); 1641 1642 } 1643 1644 }); 1645 1646 $('.getbowtied_blog_ajax_load_more_loader').fadeOut(200, function(){ 1647 $(this).remove(); 1648 $('.getbowtied_blog_ajax_load_button').show(); 1649 $('.getbowtied_blog_ajax_load_button a').attr('getbowtied_blog_ajax_load_more_processing', 0); 1650 }); 1651 1652 if ($('.posts-navigation a.next').length == 0) { 1653 $('.getbowtied_blog_ajax_load_button').addClass('finished').removeClass('getbowtied_blog_ajax_load_more_hidden'); 1654 $('.getbowtied_blog_ajax_load_button a').show().html(getbowtied_scripts_vars.ajax_no_more_items_locale).addClass('disabled'); 1655 } 1656 }); 1657 1658 } else { 1659 1660 $('.getbowtied_blog_ajax_load_button').addClass('finished').removeClass('getbowtied_blog_ajax_load_more_hidden'); 1661 $('.getbowtied_blog_ajax_load_button a').show().html(getbowtied_scripts_vars.ajax_no_more_items_locale).addClass('disabled'); 1662 } 1663 }); 1664 } 1665 1666 if (getbowtied_scripts_vars.pagination_blog == 'infinite_scroll') { 1667 1668 var buffer_pixels = Math.abs(0); 1669 1670 $(window).on( 'scroll', function() { 1671 1672 if ($('.blog-posts').length) { 1673 1674 var a = $('.blog-posts').offset().top + $('.blog-posts').outerHeight(); 1675 var b = a - $(window).scrollTop(); 1676 1677 if ((b - buffer_pixels) < $(window).height()) { 1678 if ($('.getbowtied_blog_ajax_load_button a').attr('getbowtied_blog_ajax_load_more_processing') == 0) { 1679 $('.getbowtied_blog_ajax_load_button a').trigger('click'); 1680 } 1681 } 1682 } 1683 }); 1684 } 1685 } 1686}); 1687 1688 1689
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.