/*! Isotope PACKAGED v3.0.5 Licensed GPLv3 for open source use or Isotope Commercial License for commercial use https://isotope.metafizzy.co Copyright 2017 Metafizzy */
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);s.isBoxSizeOuter=r=200==t(n.width),i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];t&&clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var s=i.toDashed(n),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(o&&o.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,n,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=this.layout.size,r=o.indexOf("%")!=-1?parseFloat(o)/100*s.width:parseInt(o,10),a=n.indexOf("%")!=-1?parseFloat(n)/100*s.height:parseInt(n,10);r=isNaN(r)?0:r,a=isNaN(a)?0:a,r-=e?s.paddingLeft:s.paddingRight,a-=i?s.paddingTop:s.paddingBottom,this.position.x=r,this.position.y=a},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),s=parseInt(e,10),r=n===this.position.x&&s===this.position.y;if(this.setPosition(t,e),r&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,u=e-o,h={};h.transform=this.getTranslate(a,u),this.transition({to:h,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){
return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
/*! @vimeo/player v2.2.0 | (c) 2017 Vimeo | MIT License | https://github.com/vimeo/player.js */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function t(e,t,n){var r=E.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),E.set(e.element,r)}function n(e,t){return(E.get(e.element)||{})[t]||[]}function r(e,t,n){var r=E.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],E.set(e.element,r),!0;var i=r[t].indexOf(n);return-1!==i&&r[t].splice(i,1),E.set(e.element,r),r[t]&&0===r[t].length}function i(e,t){var i=n(e,t);if(i.length<1)return!1;var o=i.shift();return r(e,t,o),o}function o(e,t){var n=E.get(e);E.set(t,n),E.delete(e)}function a(e,t){return 0===e.indexOf(t.toLowerCase())?e:""+t.toLowerCase()+e.substr(0,1).toUpperCase()+e.substr(1)}function u(e){return e instanceof window.HTMLElement}function s(e){return!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e}function c(e){return/^(https?:)?\/\/((player|www).)?vimeo.com(?=$|\/)/.test(e)}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=e.url,r=t||n;if(!r)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(s(r))return"https://vimeo.com/"+r;if(c(r))return r.replace("http:","https:");if(t)throw new TypeError("“"+t+"” is not a valid video id.");throw new TypeError("“"+r+"” is not a vimeo.com url.")}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T.reduce(function(t,n){var r=e.getAttribute("data-vimeo-"+n);return(r||""===r)&&(t[n]=""===r?1:r),t},t)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){if(!c(e))throw new TypeError("“"+e+"” is not a vimeo.com url.");var i="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e);for(var o in t)t.hasOwnProperty(o)&&(i+="&"+o+"="+encodeURIComponent(t[o]));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",i,!0),a.onload=function(){if(404===a.status)return void r(new Error("“"+e+"” was not found."));if(403===a.status)return void r(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(a.responseText);n(t)}catch(e){r(e)}},a.onerror=function(){var e=a.status?" ("+a.status+")":"";r(new Error("There was an error fetching the embed code from Vimeo"+e+"."))},a.send()})}function d(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function v(e){return"string"==typeof e&&(e=JSON.parse(e)),e}function p(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var i=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));i>=8&&i<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function y(e,t){t=v(t);var o=[],a=void 0;if(t.event){if("error"===t.event){n(e,t.data.method).forEach(function(n){var i=new Error(t.data.message);i.name=t.data.name,n.reject(i),r(e,t.data.method,n)})}o=n(e,"event:"+t.event),a=t.data}else if(t.method){var u=i(e,t.method);u&&(o.push(u),a=t.value)}o.forEach(function(t){try{if("function"==typeof t)return void t.call(e,a);t.resolve(a)}catch(e){}})}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var g=void 0!==Array.prototype.indexOf,w=void 0!==window.postMessage;if(!g||!w)throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},b=(e(function(e,t){!function(e){function t(e,t){function r(e){if(!this||this.constructor!==r)return new r(e);this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,e&&n.call(this,e)}return t||w(e,"size",{get:y}),e.constructor=r,r.prototype=e,r}function n(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function r(e){return this.has(e)&&(this._keys.splice(g,1),this._values.splice(g,1),this._itp.forEach(function(e){g<e[0]&&e[0]--})),-1<g}function i(e){return this.has(e)?this._values[g]:void 0}function o(e,t){if(this.objectOnly&&t!==Object(t))throw new TypeError("Invalid value used as weak collection key");if(t!=t||0===t)for(g=e.length;g--&&!k(e[g],t););else g=e.indexOf(t);return-1<g}function a(e){return o.call(this,this._values,e)}function u(e){return o.call(this,this._keys,e)}function s(e,t){return this.has(e)?this._values[g]=t:this._values[this._keys.push(e)-1]=t,this}function c(e){return this.has(e)||this._values.push(e),this}function f(){(this._keys||0).length=this._values.length=0}function l(){return p(this._itp,this._keys)}function h(){return p(this._itp,this._values)}function d(){return p(this._itp,this._keys,this._values)}function v(){return p(this._itp,this._values,this._values)}function p(e,t,n){var r=[0],i=!1;return e.push(r),{next:function(){var o,a=r[0];return!i&&a<t.length?(o=n?[t[a],n[a]]:t[a],r[0]++):(i=!0,e.splice(e.indexOf(r),1)),{done:i,value:o}}}}function y(){return this._values.length}function m(e,t){for(var n=this.entries();;){var r=n.next();if(r.done)break;e.call(t,r.value[1],r.value[0],this)}}var g,w=Object.defineProperty,k=function(e,t){return e===t||e!==e&&t!==t};"undefined"==typeof WeakMap&&(e.WeakMap=t({delete:r,clear:f,get:i,has:u,set:s},!0)),"undefined"!=typeof Map&&"function"==typeof(new Map).values&&(new Map).values().next||(e.Map=t({delete:r,has:u,get:i,set:s,keys:l,values:h,entries:d,forEach:m,clear:f})),"undefined"!=typeof Set&&"function"==typeof(new Set).values&&(new Set).values().next||(e.Set=t({has:a,add:c,delete:r,clear:f,keys:h,values:h,entries:v,forEach:m})),"undefined"==typeof WeakSet&&(e.WeakSet=t({delete:r,add:c,clear:f,has:a},!0))}(void 0!==k?k:window)}),e(function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(t,n,r){n[t]=n[t]||r(),e.exports&&(e.exports=n[t])}("Promise",k,function(){function e(e,t){d.add(e,t),h||(h=p(d.drain))}function n(e){var n,r=void 0===e?"undefined":t(e);return null==e||"object"!=r&&"function"!=r||(n=e.then),"function"==typeof n&&n}function r(){for(var e=0;e<this.chain.length;e++)i(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function i(e,t,r){var i,o;try{!1===t?r.reject(e.msg):(i=!0===t?e.msg:t.call(void 0,e.msg),i===r.promise?r.reject(TypeError("Promise-chain cycle")):(o=n(i))?o.call(i,r.resolve,r.reject):r.resolve(i))}catch(e){r.reject(e)}}function o(t){var i,u=this;if(!u.triggered){u.triggered=!0,u.def&&(u=u.def);try{(i=n(t))?e(function(){var e=new s(u);try{i.call(t,function(){o.apply(e,arguments)},function(){a.apply(e,arguments)})}catch(t){a.call(e,t)}}):(u.msg=t,u.state=1,u.chain.length>0&&e(r,u))}catch(e){a.call(new s(u),e)}}}function a(t){var n=this;n.triggered||(n.triggered=!0,n.def&&(n=n.def),n.msg=t,n.state=2,n.chain.length>0&&e(r,n))}function u(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)}(i)}function s(e){this.def=e,this.triggered=!1}function c(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function f(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var n=new c(this);this.then=function(t,i){var o={success:"function"!=typeof t||t,failure:"function"==typeof i&&i};return o.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");o.resolve=e,o.reject=t}),n.chain.push(o),0!==n.state&&e(r,n),o.promise},this.catch=function(e){return this.then(void 0,e)};try{t.call(void 0,function(e){o.call(n,e)},function(e){a.call(n,e)})}catch(e){a.call(n,e)}}var l,h,d,v=Object.prototype.toString,p="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),l=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){l=function(e,t,n){return e[t]=n,e}}d=function(){function e(e,t){this.fn=e,this.self=t,this.next=void 0}var t,n,r;return{add:function(i,o){r=new e(i,o),n?n.next=r:t=r,n=r,r=void 0},drain:function(){var e=t;for(t=n=h=void 0;e;)e.fn.call(e.self),e=e.next}}}();var y=l({},"constructor",f,!1);return f.prototype=y,l(y,"__NPO__",0,!1),l(f,"resolve",function(e){var n=this;return e&&"object"==(void 0===e?"undefined":t(e))&&1===e.__NPO__?e:new n(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),l(f,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),l(f,"all",function(e){var t=this;return"[object Array]"!=v.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),a=0;u(t,e,function(e,t){o[e]=t,++a===i&&n(o)},r)})}),l(f,"race",function(e){var t=this;return"[object Array]"!=v.call(e)?t.reject(TypeError("Not an array")):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");u(t,e,function(e,t){n(t)},r)})}),f})})),E=new WeakMap,T=["id","url","width","maxwidth","height","maxheight","portrait","title","byline","color","autoplay","autopause","loop","responsive","speed"],_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),j=new WeakMap,x=new WeakMap,Player=function(){function Player(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(m(this,Player),window.jQuery&&e instanceof jQuery&&(e.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),e=e[0]),"string"==typeof e&&(e=document.getElementById(e)),!u(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var r=e.querySelector("iframe");r&&(e=r)}if("IFRAME"===e.nodeName&&!c(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(j.has(e))return j.get(e);this.element=e,this.origin="*";var i=new b(function(r,i){var a=function(e){if(c(e.origin)&&t.element.contentWindow===e.source){"*"===t.origin&&(t.origin=e.origin);var n=v(e.data),i="event"in n&&"ready"===n.event,o="method"in n&&"ping"===n.method;if(i||o)return t.element.setAttribute("data-ready","true"),void r();y(t,n)}};if(window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a),"IFRAME"!==t.element.nodeName){var u=l(e,n);h(f(u),u).then(function(n){var r=d(n,e);return t.element=r,o(e,r),j.set(t.element,t),n}).catch(function(e){return i(e)})}});return x.set(this,i),j.set(this.element,this),"IFRAME"===this.element.nodeName&&p(this,"ping"),this}return _(Player,[{key:"callMethod",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new b(function(i,o){return n.ready().then(function(){t(n,e,{resolve:i,reject:o}),p(n,e,r)})})}},{key:"get",value:function(e){var n=this;return new b(function(r,i){return e=a(e,"get"),n.ready().then(function(){t(n,e,{resolve:r,reject:i}),p(n,e)})})}},{key:"set",value:function(e,n){var r=this;return b.resolve(n).then(function(n){if(e=a(e,"set"),void 0===n||null===n)throw new TypeError("There must be a value to set.");return r.ready().then(function(){return new b(function(i,o){t(r,e,{resolve:i,reject:o}),p(r,e,n)})})})}},{key:"on",value:function(e,r){if(!e)throw new TypeError("You must pass an event name.");if(!r)throw new TypeError("You must pass a callback function.");if("function"!=typeof r)throw new TypeError("The callback must be a function.");0===n(this,"event:"+e).length&&this.callMethod("addEventListener",e).catch(function(){}),t(this,"event:"+e,r)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");r(this,"event:"+e,t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=x.get(this);return b.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}]),Player}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: "+e)};t.forEach(function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=l(e);h(f(t),t).then(function(t){return d(t,e)}).catch(n)}catch(e){n(e)}})}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(t){if(c(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),r=0;r<n.length;r++)if(n[r].contentWindow===t.source){var i=n[r].parentElement;i&&-1!==i.className.indexOf("vimeo-space")&&(i.style.paddingBottom=t.data.data[0].bottom+"px");break}};window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent&&window.attachEvent("onmessage",t)}(),Player});

jQuery(function($) {var $section = $('section.s123-page-data.s123-module-gallery.s123-page-data-gallery');var $details = $section.find('.g-item-details');var isShowSocialIcons = true;if ( $section.data('hide-social-icons') && $section.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
if ( $section.data('hide-info-bar') && $section.data('hide-info-bar') == 'on' ) return;var buttons = [];if ( $section.data('print-image-btn') && $section.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $section.data('download-image-btn') && $section.data('download-image-btn') == 'on' ) {buttons.push('download');}
var imageURL = $details.closest('.g-item-container').find('img').attr('src');var caption = Gallery_getImageMagnificPopupCaption($details.data('module-title'),$details.data('description'),$details.data('external-link'),$details.data('external-link-text'),$details.data('page-url'),$details.data('title'),isShowSocialIcons,imageURL,buttons);$details.html(caption);$details.find('.gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});if ( $section.data('prevent-download-image') && $section.data('prevent-download-image') == 'on' ) {$section.find('.g-item-container img').get(0).oncontextmenu = function() {return false;}}});
jQuery(function($) {GalleryModuleInitialize();});function GalleryModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {var skipHistoryEntry = false;var fixImagesWithJob = false;$(document).off('pjax_magnific_popup_reset').on('pjax_magnific_popup_reset', function() {skipHistoryEntry = true;$.magnificPopup.instance.close();skipHistoryEntry = false;});var $section = $('section.s123-module-gallery.isotope-gallery:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.gallery-category');var $isotopeFilter = $sectionThis.find('.filter');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var $galleryItem = $sectionThis.find('.gallery-item');var $videoBar = '';$sectionThis.data('layout-customize',layout_customize);if ( parseInt(layout_customize.mobile_number_images_in_row) > 1 ) {$sectionThis.addClass('m-m-i-in-row');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Isotope Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
autoFocusLast: false,gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( item.el.data('type') != 'video' ) {if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close.off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close.show() : $close.hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();if ( !skipHistoryEntry ) {window.history.replaceState('','Title',this.mp_currentPageUrl);}
setTimeout(function(){$(window).trigger('resize.gallery_handler');},100);bootbox.hideAll();}}});gallery_SetImageSize($sectionThis);$(document).off('gallery.isotope.handler').on('gallery.isotope.handler', function( event, $category ) {var $isotopeContainer = $category.find('.isotope-gallery-container');if ( $isotopeContainer.data('isotope') ) {$isotopeContainer.isotope('layout');} else {var transitionDuration = $.isNumeric($isotopeContainer.data('isotope-transition')) ? $isotopeContainer.data('isotope-transition') : '0.4s';$isotopeContainer.isotope({itemSelector: '.s123-module-gallery .gallery-item-wrapper',transitionDuration: transitionDuration});$isotopeContainer.on('layoutComplete', function( event ) {$(document).trigger('s123.page.ready.refreshAOS');});}});if ( $isotopeFilter.length !== 0 ) {var $firstCategory = $isotopeFilter.find('[data-filter]').first();var hash = window.location.hash.substring(1);if ( $isotopeFilter.find('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $isotopeFilter.find('[data-unique-id="'+window.location.hash.replace('#','')+'"]');}
$categories.hide();$categories.filter('[data-filter="'+$firstCategory.attr('data-filter')+'"]').show();$(document).trigger('gallery.isotope.handler',[$categories.filter('[data-filter="'+$firstCategory.attr('data-filter')+'"]')]);$isotopeFilter.find('li').removeClass('active');$firstCategory.addClass('active');$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+$firstCategory.data('filter')+'"]').show();}
$isotopeFilter.find('[data-filter]').off('click').on('click', function () {var filter = $(this).attr('data-filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {disableEnableInfinityScroll($sectionThis);$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);$(document).trigger('gallery.isotope.handler',[$(this)]);});});$isotopeFilter.find('[data-filter]').removeClass('active');$(this).addClass('active');return false;});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$sectionThis.find('.s123-infinity-scroll').off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.isotope-gallery-container').append($items);gallery_SetImageSize($this.find('.isotope-gallery-container').closest('section'));$this.find('.isotope-gallery-container').isotope('appended',$items);window.myLazyLoad.update();if ( IsIE11() ) {$.each($items, function( index, image ) {$(document).trigger('lazyload_enter.image',[$(image)]);});}});gallery_BrowserBackButtonHandler($isotopeFilter);}
if ( IsIE11() ) {$.each($isotopeContainer.find('img'), function( index, image ) {$(image).attr('src',$(image).attr('data-src'));});}
if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}});$(window).off('resize.gallery_handler').on('resize.gallery_handler', function (event) {$section.each(function( index ) {gallery_SetImageSize($(this));$(document).trigger('gallery.isotope.handler',[$(this).find('.gallery-category:visible')]);});});$(document).off('lazyload_enter.image').on('lazyload_enter.image',function( event, $img ) {if ( $img.closest('.s123-module-gallery.isotope-gallery').length === 0 ) return;var $sectionThis = $img.closest('section');var $galleryItemWrapper = $img.closest('.gallery-item-wrapper');if ( $sectionThis.hasClass('o-c-s') ) {$galleryItemWrapper.imagesLoaded().progress( function( instance, image ) {$(document).trigger('gallery.isotope.handler',[$galleryItemWrapper.closest('.gallery-category')]);});} else {$img.one('load', function() {var dbRatio = parseInt($galleryItemWrapper.data('original-width')) / parseInt($galleryItemWrapper.data('original-height'));$img.addClass('size-tester');var imageWidth = $img.width();var imageHeight = $img.height();var imageRatio = imageWidth / imageHeight;$img.removeClass('size-tester');if ( !((Math.abs(dbRatio.toFixed(3) - imageRatio.toFixed(3)).toFixed(3)) <= 0.01) ) {$galleryItemWrapper.data('original-width',imageWidth);$galleryItemWrapper.data('original-height',imageHeight);fixImagesOnFly($galleryItemWrapper,imageRatio);if ( !fixImagesWithJob ) {fixImagesWithJob = true;$.ajax({type: "POST",url: '/versions/2/wizard/modules/gallery/recalculateGalleryImages.php',data: {websiteID: $('#websiteID').val(),w: $('#w').val()},success: function( data ) {}});}}});}});function fixImagesOnFly( $galleryItemWrapper, imageRatio ) {$galleryItemWrapper.height(( $galleryItemWrapper.width() / imageRatio ));$(document).trigger('gallery.isotope.handler',[$galleryItemWrapper.closest('.gallery-category')]);}});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();}}
function gallery_BrowserBackButtonHandler( $categoriesFilter ) {var $categories = $categoriesFilter.find('[data-unique-id]');$categories.off('click.back_button_handler').on('click.back_button_handler', function( event, flag ) {event.preventDefault();var hash = window.location.hash.substring(1);if ( hash === $(this).data('unique-id') ) return;if ( flag == 'skipHistory' ) return;window.history.pushState('forward', null, '#'+$(this).data('unique-id'));});if ( window.history && window.history.pushState ) {$(window).off('popstate.back_button_handler').on('popstate.back_button_handler', function() {var hash = window.location.hash.substring(1);if ( hash.length === 0 ) {$categories.first().trigger('click',['skipHistory']);} else {$categories.filter('[data-unique-id="'+hash+'"]').trigger('click',['skipHistory']);}});}}
function galleryAddInfinityScroll( $sectionThis ) {$.each($sectionThis.find('.s123-infinity-scroll'), function( index, container ) {var $this = $(this);var infiniteScroll = new s123InfiniteScroll({isMobile: false,$container: $this,id: $this.data('unique-id'),offset: $('footer.global_footer').outerHeight(),ajax: {type: 'GET',url: '/versions/2/wizard/modules/gallery/front/infiniteScroll.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),uniquePageID: $this.data('module-id'),toolTitle: $this.data('tool-title'),pageUrl: $this.data('page-url'),limit: isMobileDevice.any() ? 25 : $this.data('limit'),initiRecordsAmount: $this.data('limit'),filter: $this.data('filter'),toolStyle: $this.data('tool-style'),tranW: $this.data('language'),imageSize: $this.data('image-size'),},success: function( data ) {$this.trigger('infiniteScroll.loaded',[data]);}}});});disableEnableInfinityScroll($sectionThis);}
function disableEnableInfinityScroll( $sectionThis ) {$.each($sectionThis.find('.s123-infinity-scroll'), function( index, category ) {var $this = $(this);if ( !$this.data('s123InfiniteScroll') ) return;if ( $this.is(':visible') ) {$this.data('s123InfiniteScroll').enable();} else {$this.data('s123InfiniteScroll').disable();}});}
function gallery_SetImageSize( $sectionThis ) {var imageWidth = Math.floor($sectionThis.find('.isotope-gallery-container:visible').width()/S123.galleriesImageResize.decideNumberOfImageByScreenWidth($sectionThis,'.isotope-gallery-container'));var isOldCustomer = false;if ( $sectionThis.hasClass('layout-1') ) {imageWidth = imageWidth - 10;}
$sectionThis.find('.gallery-item-wrapper').each(function( index, itemWrapper ) {var $this = $(this);$this.width(imageWidth);if ( $.isNumeric($this.data('original-width')) && $.isNumeric($this.data('original-height')) ) {var aspectRatio = ( parseInt($this.data('original-width')) / parseInt($this.data('original-height')) );var newHeight = ( imageWidth / aspectRatio );$this.height(newHeight);} else {isOldCustomer = true;}});S123.galleriesImageResize.init({section: $sectionThis,container: '.isotope-gallery-container',attr: 'data-src',element: '.gallery-thumb img',rowImageNum: 1,isBackgroundSizeCover: false,imageWidth: imageWidth,calcImageWidth: false,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});if ( isOldCustomer ) {$sectionThis.addClass('o-c-s');}}
function Gallery_getSocialLinks( url, title ) {var url = encodeURIComponent(window.location.origin + url);var title = encodeURIComponent(title);var html = '<div class="gallery-social-links">';html += '<a href="https://www.facebook.com/sharer/sharer.php?u='+url+'&t='+title+'" title="Share on Facebook" target="_blank">'+S123.s123IconToSvg.getHtml('facebook','','')+'</a>';
html += '<a href="https://twitter.com/intent/tweet?source='+url+'&text='+title+':%20'+url+'" target="_blank" title="Tweet">'+S123.s123IconToSvg.getHtml('twitter','','')+'</a>';
html += '<a href="https://pinterest.com/pin/create/button/?url='+url+'&description='+title+'" target="_blank" title="Pin it">'+S123.s123IconToSvg.getHtml('pinterest','','')+'</a>';
html += '<a href="https://tumblr.com/share/link?url='+url+'&description='+title+'" target="_blank" title="tumblr">'+S123.s123IconToSvg.getHtml('tumblr','','')+'</a>';
html += '<a href="mailto:?subject='+title+'&amp;body=Check out this image '+url+'" target="_blank" title="Share by Email">'+S123.s123IconToSvg.getHtml('envelope','','')+'</a>';html += '<a href="https://wa.me/?text='+title+' - '+url+'" target="_blank" title="whatsapp">'+S123.s123IconToSvg.getHtml('whatsapp','','')+'</a>';
html += '<a class="gallery-link-popup" href="javascript:void(0);" data-link="'+url+'" title="link" style="cursor: pointer;">'+S123.s123IconToSvg.getHtml('link','','')+'</a>';html +='</div>';return html;}
function Gallery_popuplink(link) {let html = '';html += '<div class="share-copy input-group field">';html +='<input type="text" id="copyLinkInput" value="'+decodeURIComponent(link)+'" class="form-control" readonly>';html +='<span class="input-group-btn">';html +='<button class="btn btn-primary copy-link-btn">'+S123.s123IconToSvg.getHtml('clipboard','','')+'</button>';html += '</span>'
html += '</div>';$html = $(html);$html.find('button.copy-link-btn').off('click').on('click', function(){var copyText = $html.find('#copyLinkInput').get(0);S123.CopyToClipboard.copy(copyText);return false;});const galleryLinkBox = bootbox.dialog({className: 's123-modal gallery-link-bootbox',message: $html,show: false,backdrop: true,keyboard: false,container:'.mfp-wrap.mfp-module-gallery',});galleryLinkBox.find('.bootbox-body').off('click').on('click',function(event) {event.stopPropagation();});galleryLinkBox.on('click', '.modal-backdrop', function() {event.stopPropagation();galleryLinkBox.modal('hide');});galleryLinkBox.modal('show');}
function Gallery_getImageMagnificPopupCaption( toolTitle, imageDescription, externalLink ,externalLinkText , imagePageURL, title , addSocial, imageURL, buttons ) {var caption = '<div class="gallery-image-text">';if ( !title == '' && !imageDescription == '' ) {caption += title + ' - ' + imageDescription;} else if ( !title == '' ) {caption += title;} else if ( !imageDescription == '' ) {caption += imageDescription;} else if ( !addSocial && buttons.length == 0 ) {caption += '&nbsp;';}
caption += '</div>';if ( !externalLink == '' ) {caption += '<a class="gallery-image-external-link" target="_blank" href="'+externalLink+'">';caption += !externalLinkText == '' ?externalLinkText : externalLink;caption += '</a>';}
if ( addSocial ) {if ( title === '' ) {socialShareTitle = toolTitle;} else {socialShareTitle = title+' - '+toolTitle;}
caption += Gallery_getSocialLinks(imagePageURL,socialShareTitle);}
var printImageTitle = title === '' ? translations.image : title;caption += Gallery_getDownloadPrintBtns(imageURL,buttons,printImageTitle);return caption;}
function Gallery_getDownloadPrintBtns( imageURL, buttons, title ) {if ( !buttons || buttons.length == 0 ) return '';var html = '<div class="gallery-download-print-btns">';if ( buttons.includes('download') ) {html += '<a href="/versions/2/wizard/modules/fileManager/downloadDigitalFile.php?'+ ($('#w').val().length > 0 ? 'w='+$('#websiteID').val()+'&' : '') +'url='+encodeURIComponent(imageURL.replace('2000_','normal_'))+'">'+S123.s123IconToSvg.getHtml('download','','')+'</a>';}
if ( buttons.includes('print') ) {html += '<a href="#" onclick="Gallery_printImg(\''+imageURL+'\',\''+title+'\')" title="'+translations.print+'">'+S123.s123IconToSvg.getHtml('print','','')+'</a>';}
html +='</div>';return html;}
function Gallery_getImgSourcetoPrint( url, title ) {return "<html><head><script>function step1(){\n" +"setTimeout('step2()', 10);}\n" +"function step2(){window.print();window.close()}\n" +"</scri" + "pt><title>" + title + "</title></head><body onload='step1()'>\n" +"<img src='" + url + "' /></body></html>";}
function Gallery_printImg( url, title ) {var printImg = window.open(document.URL,"_new");printImg.document.open();printImg.document.write(Gallery_getImgSourcetoPrint(url,title));printImg.document.close();}
jQuery(function($) {GalleryModuleInitialize_Layout4();});function GalleryModuleInitialize_Layout4() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-4:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.gallery-image');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-category',attr: 'data-bg',element: '.gallery-image a',rowImageNum: 1,isBackgroundSizeCover: true,imageWidth: false,calcImageWidth: true,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {GalleryModuleInitialize_Layout5();});function GalleryModuleInitialize_Layout5() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-5:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.gallery-image-box');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.gallery-images-container').append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-images-container',attr: 'data-bg',element: '.gallery-image a',rowImageNum: 1,isBackgroundSizeCover: true,imageWidth: false,calcImageWidth: true,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {GalleryModuleInitialize_Layout6();});function GalleryModuleInitialize_Layout6() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-6:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.filter li');var $categoriesDescription = $sectionThis.find('.gallery-category-description');var $flickityContainer = $sectionThis.find('.gallery-images-container');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var flickitySettings = {imagesLoaded: true,initialIndex: 1,lazyLoad: 2};var $galleryItem = $sectionThis.find('.gallery-image');var isScrolling;$sectionThis.find('.gallery-container').prepend($sectionThis.find('.gallery-category-description'));if ( layout_customize && layout_customize.display_type === 'carousel' ) {flickitySettings.friction = 0.28;var animationOffset = flickitySettings.friction;flickitySettings.wrapAround = true;flickitySettings.pauseAutoPlayOnHover = true;flickitySettings.autoPlay = layout_customize.autoPlay ? parseFloat(layout_customize.carouselInterval) : false;if ( $.isNumeric(flickitySettings.autoPlay) ) {if ( flickitySettings.autoPlay === 0 ) flickitySettings.autoPlay = animationOffset;flickitySettings.autoPlay = (flickitySettings.autoPlay + animationOffset) * 1000;}}
if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {flickitySettings.friction = 0.28;flickitySettings.autoPlay = 1500;flickitySettings.freeScroll = false;flickitySettings.prevNextButtons = false;flickitySettings.pageDots = false;flickitySettings.pauseAutoPlayOnHover = false;flickitySettings.wrapAround = true;}
$flickityContainer.flickity(flickitySettings);$isotopeContainer.isotope({itemSelector: '.gallery-images-container, .gallery-image-caption'});if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {$flickityContainer.on( 'dragStart.flickity', function( event, pointer ) {clearTimeout(isScrolling);});$flickityContainer.on('dragEnd.flickity', function( event, pointer ) {clearTimeout(isScrolling);var $this = $(this);var flkty = Flickity.data( this );isScrolling = setTimeout(function() {flkty.playPlayer();}, 1000);});}
$flickityContainer.on('settle.flickity', function() {var $this = $(this);var flkty = Flickity.data( this );var caption = Gallery_getImageMagnificPopupCaption($(flkty.selectedElement).data('tool-title'),$(flkty.selectedElement).data('image-description'),$(flkty.selectedElement).data('image-link'),$(flkty.selectedElement).data('image-link-text'),$(flkty.selectedElement).data('image-page-url'),$(flkty.selectedElement).attr('title'),false,'',[]);$this.next('.gallery-image-caption').html(caption);$sectionThis.find('.gallery-image:not(.is-selected) iframe').each(function () { 	// YouTube/Vimeo
switch ( $(this).data('player') ) {case 'youtube':if ( this.src.indexOf("youtube.com") > -1 ) {this.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');}
break;case 'vimeo':if ( this.src.indexOf("vimeo.com") > -1 ) {var player = new Vimeo.Player(this);player.pause();}
break;case 'site123':if (this.contentWindow.player) this.contentWindow.player.pause();break;}});$isotopeContainer.isotope('layout');});$isotopeContainer.on( 'arrangeComplete', function( event, filteredItems ) {$flickityContainer.flickity('resize');});$categories.off('click').on('click',function () {var $this = $(this);$isotopeContainer.isotope({filter: function() {return gallery_Filter_Layout6($(this),$this.data('filter'));}});$categories.removeClass('active');$this.addClass('active');$categoriesDescription.removeClass('active-description');$sectionThis.find('.gallery-category-description[data-filter="'+$this.data('filter')+'"]').addClass('active-description');$flickityContainer.flickity('resize');return false;});$categories.first().trigger('click');if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}});});}
function gallery_Filter_Layout6( $item, filter ) {return $item.attr('data-filter') == filter;}
jQuery(function($) {GalleryModuleInitialize_Layout7();});function GalleryModuleInitialize_Layout7() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-7:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.filter li');var $categoriesDescription = $sectionThis.find('.gallery-category-description');var $flickityContainer = $sectionThis.find('.gallery-images-container');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var flickitySettings = {imagesLoaded: true,initialIndex: 1,lazyLoad: 2};var $galleryItem = $sectionThis.find('.g-i');var isScrolling;if ( layout_customize && layout_customize.display_type === 'carousel' ) {flickitySettings.friction = 0.28;var animationOffset = flickitySettings.friction;flickitySettings.wrapAround = true;flickitySettings.pauseAutoPlayOnHover = true;flickitySettings.autoPlay = layout_customize.autoPlay ? parseFloat(layout_customize.carouselInterval) : false;if ( $.isNumeric(flickitySettings.autoPlay) ) {if ( flickitySettings.autoPlay === 0 ) flickitySettings.autoPlay = animationOffset;flickitySettings.autoPlay = (flickitySettings.autoPlay + animationOffset) * 1000;}}
if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {flickitySettings.friction = 0.28;flickitySettings.autoPlay = 1500;flickitySettings.freeScroll = false;flickitySettings.prevNextButtons = false;flickitySettings.pageDots = false;flickitySettings.pauseAutoPlayOnHover = false;flickitySettings.wrapAround = true;}
if ( $isotopeContainer.hasClass('carousel-style-2') ) {flickitySettings.lazyLoad = 4;flickitySettings.initialIndex = 3;}
$flickityContainer.flickity(flickitySettings);$isotopeContainer.isotope({itemSelector: '.gallery-images-container, .gallery-image-caption'});if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {$flickityContainer.on( 'dragStart.flickity', function( event, pointer ) {clearTimeout(isScrolling);});$flickityContainer.on('dragEnd.flickity', function( event, pointer ) {clearTimeout(isScrolling);var $this = $(this);var flkty = Flickity.data( this );isScrolling = setTimeout(function() {flkty.playPlayer();}, 1000);});}
$flickityContainer.on('settle.flickity', function() {var $this = $(this);var flkty = Flickity.data( this );var caption = Gallery_getImageMagnificPopupCaption($(flkty.selectedElement).data('tool-title'),$(flkty.selectedElement).data('image-description'),$(flkty.selectedElement).data('image-link'),$(flkty.selectedElement).data('image-link-text'),$(flkty.selectedElement).data('image-page-url'),$(flkty.selectedElement).attr('title'),false,'',[]);$this.next('.gallery-image-caption').html(caption);$(flkty.selectedElement).attr('alt',$(flkty.selectedElement).data('alt'));$sectionThis.find('.gallery-video-container:not(.is-selected) iframe').each(function () { 	// YouTube/Vimeo
switch ( $(this).data('player') ) {case 'youtube':if ( this.src.indexOf("youtube.com") > -1 ) {this.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');}
break;case 'vimeo':if ( this.src.indexOf("vimeo.com") > -1 ) {var player = new Vimeo.Player(this);player.pause();}
break;case 'site123':if (this.contentWindow.player) this.contentWindow.player.pause();break;}});$isotopeContainer.isotope('layout');});$isotopeContainer.on( 'arrangeComplete', function( event, filteredItems ) {$flickityContainer.flickity('resize');});if ( $categoriesDescription.length > 0 ) {$flickityContainer.addClass('gallery-images-container-with-description');}
$categories.off('click').on('click',function () {var $this = $(this);$isotopeContainer.isotope({filter: function() {return gallery_Filter_Layout7($(this),$this.data('filter'));}});$categories.removeClass('active');$this.addClass('active');$categoriesDescription.removeClass('active-description');$sectionThis.find('.gallery-category-description[data-filter="'+$this.data('filter')+'"]').addClass('active-description');$flickityContainer.flickity('resize');return false;});$categories.first().trigger('click');if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
if ( $sectionThis.find('.isotope-gallery-container').hasClass('carousel-style-2') ) {$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});}});});}
function gallery_Filter_Layout7( $item, filter ) {return $item.attr('data-filter') == filter;}
jQuery(function($) {GalleryModuleInitialize_Layout8();});function GalleryModuleInitialize_Layout8() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-8:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.gallery-image-box');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.gallery-images-container').append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-images-container',attr: 'data-bg',element: '.gallery-image a',rowImageNum: 1,isBackgroundSizeCover: true,imageWidth: false,calcImageWidth: true,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {GalleryModuleInitialize_Layout9_10();});function GalleryModuleInitialize_Layout9_10() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-9:not(.s123-module-videos),section.s123-module-gallery.layout-10:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.grid-item');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.data('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click.gallery.first.cat.click').on('click.gallery.first.cat.click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);if ( $sectionThis.hasClass('layout-10') ) {$this.find('.grid .grid-item').addClass('grid-item-grow');$this.find('.grid').append($items);} else {$this.append($items);}
window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click.gallery.first.cat.click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-category',attr: 'data-src',element: '.grid-item img',rowImageNum: 1,isBackgroundSizeCover: false,imageWidth: false,calcImageWidth: false,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {ServicesModuleInitialize();});function ServicesModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-services');$section.each(function( index ) {var $sectionThis = $(this);var categories = new ModuleLayoutCategories({$items :  $sectionThis.find('.services-category'),$categoriesContainer : $sectionThis.find('.categories-panel'),$filterButton : $sectionThis.find('.items-responsive-filter'),$categories : $sectionThis.find('.items-categories-container li')});if ( $sectionThis.hasClass('layout-10') ) {$sectionThis.find('.service-item-description').each(function() {const $paragraph = $(this);const lineHeight = parseFloat($paragraph.css('font-size')) * 1.5;const maxLines = 4;const actualHeight = $paragraph.height();const numberOfLines = actualHeight / lineHeight;if (numberOfLines > maxLines) {$paragraph.addClass('show-more');$paragraph.attr('data-rel', 'tooltip');$paragraph.css('height', lineHeight * maxLines);$paragraph.on('click', function() {var _this = $(this);bootbox.alert({title: _this.data('title'),message: _this.html(),backdrop: true});});}});}
ServicesModuleMobileViewCarouselInit($sectionThis);});});}
function ServicesModuleMobileViewCarouselInit( $section ) {let sectionID = $section.get(0).id.replace('section-','');let $sectionItemsContainer = $section.find('.service-grid');let mobileViewTypeNUM = $section.data('mobile-view-type');ServicesModuleMobileViewCarouselInitResizeHandler();if ( $sectionItemsContainer.hasClass('slick-initialized') ) {$sectionItemsContainer.css('visibility','none');$sectionItemsContainer.slick('unslick');$sectionItemsContainer.parent().find('.custom-arrow-container').remove();}
if ( findBootstrapEnvironment() != 'xs' || mobileViewTypeNUM != '2' ) {$sectionItemsContainer.css('visibility','visible');return;}
$sectionItemsContainer.on('init', function(event) {$sectionItemsContainer.css('visibility','visible');});$sectionItemsContainer.slick({dots: false,infinite: true,vertical: false,verticalSwiping: false,slidesToShow: 1,slidesToScroll: 1,adaptiveHeight: true,swipeToSlide: true,rtl: $('html').attr('dir') === 'rtl' ? true : false,centerMode: true,centerPadding: '8%',arrows: false});function ServicesModuleMobileViewCarouselInitResizeHandler() {$(window).off('resize.ServicesModuleMobileViewCarouselInit').on('resize.ServicesModuleMobileViewCarouselInit', function( event ) {clearTimeout(window.ServicesModuleMobileViewCarouselInit_Delay);window.ServicesModuleMobileViewCarouselInit_Delay = setTimeout( function() {var $sections = $('section.s123-module-services');$sections.each(function( index ) {ServicesModuleMobileViewCarouselInit($(this));});},50);});}}
// Run when the page ready (before images and other resource)
jQuery(function($) {MultiCurrencies.init();ActiveOrderPopup.init();WishList.init();});var MultiCurrencies = function() {var that = {nameSpace: 'multi-currencies',isActive: false,isChangedCurrency: false};that.init = function() {$(document).on('s123.page.ready.multi_currencies', function( event ) {that.settings = tryParseJSON($('.s123-multi-currencies').val());if ( !that.settings ) return;if ( !that.settings.active ) return;that.activeCurrency = tryParseJSON($.cookie($(websiteID).val()+'-'+that.nameSpace));that.defaultCurrency = that.settings.defaultCurrency;that.currencies = that.settings.currencies;that.setActiveCurrency(that.activeCurrency.currency);that.$menuIcon = $('[data-toggle="multiCurrenciesPopup"]');that.isActive = true;$(document).off('build_popup.open.multi_currencies').on('build_popup.open.multi_currencies', function( event ) {handleMenuIcon($('#popupFloatDivMenu [data-toggle="multiCurrenciesPopup"]'),true);});handleMenuIcon(that.$menuIcon,false);that.priceOnlyType.backup();$(document).off('pageLoaded.multi_currencies').on('pageLoaded.multi_currencies', function( event ) {if ( $.isNumeric(S123.QueryString.clientZone) ) {$('.client-zone-orders-table [data-rel="multiCurrency"]').removeAttr('data-rel');}
if ( isDefaultCurrency() && that.isChangedCurrency ) {that.reset();} else if ( isDefaultCurrency() && !that.isChangedCurrency  ) {$('[data-rel="multiCurrency"]').css({visibility: 'visible'});} else {updateAllPrices();}});if ( $.isNumeric(S123.QueryString.clientZone) ) return;$(document).off('s123.pjax.complete.multi_currencies').on('s123.pjax.complete.multi_currencies', function() {that.$menuIcon = $('[data-toggle="multiCurrenciesPopup"]');handleMenuIcon(that.$menuIcon,false);that.priceOnlyType.backup();$(document).trigger('pageLoaded.multi_currencies');});$(document).off('multi_currencies_price_update').on('multi_currencies_price_update', function( event, settings ) {$.each(settings, function( index, setting ) {if ( !isDefaultCurrency() ) {updatePrice(setting.el,setting.newPrice,true);} else {setting.el.find('[data-rel="multiCurrency"]').css({visibility: 'visible'});}});});$(document).trigger('pageLoaded.multi_currencies');modulesExtraActions();$(document).off('multi_currency_update').on('multi_currency_update', function() {buildPopup_CloseAction('popupFloatDivMenu');});});};that.setActiveCurrency = function( currency ) {that.activeCurrency = that.currencies[currency];if ( !that.activeCurrency ) {that.activeCurrency = that.defaultCurrency;}
$.cookie($(websiteID).val()+'-'+that.nameSpace,JSON.stringify(that.activeCurrency),{ expires: 365, path: '/' });};that.reset = function( ) {if ( !that.isActive ) return;if ( getOrderScreen() > 1 ) return;if ( window.czIsLoggedIn ) return;$('[data-rel="multiCurrency"]').each(function( index, el ) {var originalPrice = $(this).find('[data-type="price"]').data(that.nameSpace + '-price');var $price = $(showPrice(that.defaultCurrency.data,originalPrice));$(this).replaceWith($price);$price.css({visibility: 'visible'});backUpPrice($price.find('[data-type="price"]'),$price.find('[data-type="price"]').html(),false);});$('[data-multi-currency-symbol-only="true"]').html(that.defaultCurrency.data.symbol);that.priceOnlyType.update();that.isChangedCurrency = false;};that.geConvertedPrice = function( price ) {if ( !that.isActive ) return price;if ( !$.isNumeric(price) ) return price;if ( isDefaultCurrency() ) return price;if ( getOrderScreen() > 1 ) return price;var result = parseFloat(price) * parseFloat(that.activeCurrency.rate);return result > 0 ? result.toFixed(2) : result;};that.getOriginalPrice = function( price ) {if ( !that.isActive ) return price;if ( !$.isNumeric(price) ) return price;return parseFloat(price) / parseFloat(that.activeCurrency.rate);};that.getActiveCurrency = function() {return that.activeCurrency.data;};that.getMobileIconHtml = function() {var $clone = that.$menuIcon.clone();$clone.attr('data-is-mobile',true);return $clone.prop('outerHTML');};function handleMenuIcon( $menuIcon, isMobileMenu ) {setMenuIconCurrency($menuIcon);var html = '';var maxHeight = 160;html += '<div class="currency-menu-container fancy-scrollbar" style="max-height:' + maxHeight + 'px;">';html += '<div class="currency-list">';html += '<div class="currency-list-item" data-value="' + S123.escapeHtml(that.defaultCurrency.currency) + '">';html += '<a href="#">';html += '<span>' + that.defaultCurrency.currency + '</span>';html += '<span>-</span>';html += '<span>' + that.defaultCurrency.data.symbol + '</span>';html += '</a>';html += '</div>';$.each(that.currencies, function( currencyCode, currency ) {html += '<div class="currency-list-item" data-value="' + S123.escapeHtml(currencyCode) + '">';html += '<a href="#">';html += '<span>' + currencyCode + '</span>';html += '<span>-</span>';html += '<span>' + currency.data.symbol + '</span>';html += '</a>';html += '</div>';});html += '</div>';html += '</div>';$html = $(html);setActiveCurrencyListItem($html);$html.find('.currency-list').on('click.multi_currencies', 'a', function( event ) {event.preventDefault();if ( !isDefaultCurrency() ) {that.isChangedCurrency = true;} else {that.isChangedCurrency = false;}
that.setActiveCurrency($(this).parent().data('value'));$(document).trigger('pageLoaded.multi_currencies');modulesExtraActions();setMenuIconCurrency($menuIcon);$menuIcon.popover('hide');setActiveCurrencyListItem($html);$(document).trigger('multi_currency_update',[that.activeCurrency]);});S123.popOver.init({$el: $menuIcon,elSelector: '.multi-currencies-controller',namespace: 'multi_currency_menu_icon',oneTimeUsage: false,popOverSettings: {selector: 'multi-currency',content: $html,html: true,trigger: 'manual',template: '<div class="popover multi-currency" role="tooltip"><div class="arrow"></div><div data-menu-dismiss="popover"><i class="fa fa-times" aria-hidden="true"></i></div><div class="popover-content"></div></div>',placementCallBack: function() {if ( isMobileMenu ) return 'top';if ( getWebsiteMenuPosition() === 'top' || getWebsiteMenuPosition() === 'bottom' ) {if ( ($('nav#mainNav').offset().top - $(window).scrollTop()) > maxHeight ) {return 'top';} else {return 'bottom';}} else {if ( $('html').attr('dir') === 'rtl' ) {return 'left';} else {return 'right';}}}}});$(document).on('s123_pop_over_wrapper.show.multi_currency_menu_icon', function() {$menuIcon.addClass('active');})
.on('s123_pop_over_wrapper.hide.multi_currency_menu_icon', function() {$menuIcon.removeClass('active');});$menuIcon.off('click.multi_currencies').on('click.multi_currencies', function() {if ( $(this).hasClass('active') ) {$(this).popover('hide');} else {$(this).popover('show');}});}
function setActiveCurrencyListItem( $currencyList ) {$currencyList.find('.currency-list-item').removeClass('active');$currencyList.find('.currency-list-item[data-value="'+that.activeCurrency.currency+'"]').addClass('active');}
function setMenuIconCurrency( $menuIcon ) {var html = '';if ( $menuIcon.data('is-mobile') ) {html += '<span>' + that.activeCurrency.currency + '</span>';} else {html += '<span>' + that.activeCurrency.currency + '</span>';html += '<span class="m-c-symbol">' + that.activeCurrency.data.symbol + '</span>';if ( getWebsiteMenuPosition() === 'top' || getWebsiteMenuPosition() === 'bottom' ) {html += S123.s123IconToSvg.getHtml('caret-down','mc-icon','');} else {if ( $('html').attr('dir') === 'rtl' ) {html += S123.s123IconToSvg.getHtml('caret-left','mc-icon','');} else {html += S123.s123IconToSvg.getHtml('caret-right','mc-icon','');}}}
$menuIcon.html(html);}
function updateAllPrices() {if ( isDefaultCurrency() && that.isChangedCurrency ) {that.reset();} else if ( isDefaultCurrency() && !that.isChangedCurrency  ) {$('[data-rel="multiCurrency"]').css({visibility: 'visible'});} else {$('[data-rel="multiCurrency"]').each(function( index, el ) {updatePrice($(this),$(this).find('[data-type="price"]').html(),false);});}
$('[data-multi-currency-symbol-only="true"]').html(that.activeCurrency.data.symbol);that.priceOnlyType.update();}
function updatePrice( $el, newPrice, force ) {backUpPrice($el.find('[data-type="price"]'),newPrice,force);if ( isReplaceDisabled() ) {$el.css({visibility: 'visible'});} else {var $price = $el.find('[data-type="price"]');var priceAsString = $price.data(that.nameSpace + '-price');var price = parseFloat(priceAsString);var $newEl = $(showPrice(that.activeCurrency.data,(price * parseFloat(that.activeCurrency.rate)).toFixed(2)));backUpPrice($newEl.find('[data-type="price"]'),priceAsString,false);$price.parent().replaceWith($newEl);$newEl.css({visibility: 'visible'});}}
function backUpPrice( $el, newPrice, force ) {if ( !that.isActive ) return;if ( !$el.data(that.nameSpace + '-price') || force ) {$el.data(that.nameSpace + '-price',newPrice);}}
function modulesExtraActions() {$(document).off('donate_price_update.multi_currencies giftCard_price_update.multi_currencies').on('donate_price_update.multi_currencies giftCard_price_update.multi_currencies', function( event, $el ) {if ( isDefaultCurrency() ) return;var price = $el.val();price = parseFloat(price) * parseFloat(that.activeCurrency.rate);$el.val(price.toFixed(2));});}
function isDefaultCurrency() {return that.defaultCurrency.currency === that.activeCurrency.currency;}
function isReplaceDisabled() {if ( getOrderScreen() > 1 ) {return true;} else if ( window.czIsLoggedIn ) {return true;} else {return false;}
return false;}
function getOrderScreen() {var path = window.location.pathname.split("/");var orderScreen = path[path.length - 2];if ( orderScreen == '-order1' ) return 1;if ( orderScreen == '-order2' ) return 2;if ( orderScreen == '-order3' ) return 3;return 0;}
that.priceOnlyType = {backup: function() {$('[data-multi-currency-price-only="true"]').each(function( index, el ) {if ( $.isNumeric($(this).data(that.nameSpace + '-price')) ) return;$(this).data(that.nameSpace + '-price',$(this).html());});},update: function() {$('[data-multi-currency-price-only="true"]').each(function( index, el ) {var originalPrice = $(this).data(that.nameSpace + '-price');var newPrice = parseFloat(originalPrice) * parseFloat(that.activeCurrency.rate);if ( newPrice % 1 === 0 ) {$(this).html(newPrice);} else {$(this).html(newPrice.toFixed(2));}});}};return that;}();var ActiveOrderPopup = function() {AO = {};AO.init = function() {$( document ).on( 's123.page.ready.activeOrderPopup', function( event ) {AO.initializeAddToCart();AO.productCallToAction.init();AO.initializeShowCart();});};AO.initializeAddToCart = function() {$('.orderButtonPopup').off('click').on('click', function( event ) {var $this = $(this);if ( $this.hasClass('a-o-out-of-stock') ) {bootbox.dialog({title: translations.activeOrderPopup.messageTitle,message: translations.activeOrderPopup.messageBody,buttons: {cancel: {label: translations.Ok,className: 'btn btn-primary'}}});return;}
if ( $this.data('disable-atc-validator') != '1' ) {if ( !AO.atcValidator() ) return;}
$this.attr('disabled','');S123.ButtonLoading.start($this);var multiProducts = $this.data('multi-products') ? $this.data('multi-products') : JSON.stringify([$this.data('unique-page')]);var formData = new FormData();formData.append('w',$('#w').val());formData.append('websiteID',$('#websiteID').val());formData.append('moduleID',$this.data('module'));if ( $this.data('product-page') ) {if ( $('#productOptions').prop('type') == 'textarea' ) {formData.append('productOptions',$('#productOptions').length !== 0 ? $('#productOptions').html() : '');} else {formData.append('productOptions',$('#productOptions').length !== 0 ? $('#productOptions').val() : '');}
formData.append('customText',$('#customText').length !== 0 ? $('#customText').html() : '');}
formData.append('amount',$this.data('quantity-amount') ? $this.data('quantity-amount') : '1');formData.append('multiProducts',multiProducts);formData.append('viewModeTXT',viewModeTXT);$('input[type="file"]').each(function( index, upload ) {if ( upload.files.length > 0 ) {formData.append(upload.id,upload.files[0]);}});if ( $('.product-subscription-pricing').length !== 0 ) {let checkedPricing = $('.product-subscription-pricing').find('input[type="radio"]:checked');if ( checkedPricing.length == 0 ) {$('.product-subscription-error').remove();$('.product-subscription-title').append(`<div class="product-subscription-error">${translations.productSubscriptionError}</div>`);S123.ButtonLoading.stop($this);$this.removeAttr('disabled');return;}
formData.append('subscriptionTicketID',checkedPricing.val());formData.append('activeProductSubscription',true);}
$.ajax({type: "POST",url: "/versions/2/wizard/orders/front/addToCart.php",data: formData,cache: false,contentType: false,processData: false,success: function( response ) {response = tryParseJSON(response);showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&tranW='+websiteLanguageCountryFullCode+'&moduleID='+$this.data('module')+'&viewModeTXT='+viewModeTXT,true);CartCounter.updateCartIcon();S123.ButtonLoading.stop($this);$this.removeAttr('disabled');topWindow.eCommerce_cart_lastAdded = response.updatedCartIds ? response.updatedCartIds : false;}});});};AO.initializeShowCart = function() {$('.orderOpenCart').off('click').on('click',function( event ) {AO.showCart();});};AO.showCart = function() {showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&moduleTypeNUM=37&tranW='+websiteLanguageCountryFullCode+'&cartButton=1',true);};AO.atcValidator = function() {var $ct = $("#product-custom-text");var $po = $('.product-options');if ( $ct.length !== 0 && $ct.data('mandatory') ) {var $ct_fieldTitle = $('#ct_fieldTitle');if ( $ct_fieldTitle.val().length === 0 ) {$ct_fieldTitle.popover({container: 'body',content: translations.productvalidatorPopover,trigger: 'manual',template: '<div class="popover product-validator-popover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',placement: function(popover, input) {return isMobileDevice.any() ? 'auto' : ($('html').attr('dir') === 'rtl' ? 'left' : 'right');}});$ct_fieldTitle.popover('show').one('input', function(e) {$(this).popover('hide');});$ct_fieldTitle.focus();return false;}}
if ( $po.length !== 0 ) {var $options = $po.find('.p-o-container[data-mandatory="1"]');var addToCart = true;var $popoverContainer;var $firstErrorOption;var $errorsOptionsList = [];$.each($options, function( index, option ) {var $option = $(option);var addErrorMsg = false;switch( $option.data('type') ) {case 'color':case 'radio':case 'checkbox':case 'size':case 'list':if ( $option.find('[id*=poi].selected').length === 0 ) {addToCart = false;addErrorMsg = true;}
$popoverContainer = $(option);break;default:if ( $option.find('.fake-input').length > 0 ) {var id = $option.find('.fake-input').data('related-id');if ( $option.find('[data-id="'+id+'"]').val().length === 0 ) {addToCart = false;addErrorMsg = true;$popoverContainer = $(option).parent();}} else {if ( $option.find('.form-control').val().length === 0 ) {addToCart = false;addErrorMsg = true;$popoverContainer = $(option).parent();}}}
if ( addErrorMsg ) {$errorsOptionsList.push($option);var $popover = $option.find('.p-o-popover-box');if ( $popover.length === 0  ) $popover = $option;$popover.popover({container: 'body',content: translations.productvalidatorPopover,trigger: 'manual',template: '<div class="popover product-validator-popover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',placement: function(popover, input) {return isMobileDevice.any() ? 'auto' : ($('html').attr('dir') === 'rtl' ? 'right' : 'left');}});}});if ( $errorsOptionsList.length !== 0 ) {var offset = $('#mainNav').outerHeight();if ( !$.isNumeric(offset) ) offset = 0;if ( !elementInViewport($errorsOptionsList[0].get(0)) ) {$('html, body').scrollTop($errorsOptionsList[0].offset().top - offset);}
$.each($errorsOptionsList, function( index, $option ) {var $popover = $option.find('.p-o-popover-box');if ( $popover.length === 0  ) $popover = $option;$popover.popover('show');});$po.off('po.update').on('po.update', function( event ) {$('.product-validator-popover').popover('hide');});}
return addToCart;}
return true;};AO.productCallToAction = function() {var _ = {};_.init = function( settings ) {_.$controllers = $('.orderButtonPopup[data-p-c-t-a]');if ( _.$controllers.length == 0 ) return;_.$controllers.each(function() {var $this = $(this);var callToAction = $this.data('p-c-t-a');if ( callToAction.type == 'externalLink' && callToAction.externalLink.length > 0 ) {$this.off('click').on('click', function( event ) {window.open(callToAction.externalLink,'_blank');});} else if ( callToAction.type == 'contactUs' ) {$this.off('click').on('click', function( event ) {buildPopup('popupFloatDivSearch','',generateContactForm(callToAction),'',true,true,true,'right','')
S123.globalContactEmail.submitHandler();fillDescription(callToAction);});}});};function generateContactForm( callToAction ) {var html = '';html += '<div class="global-contact-email-container">';html += '<div class="g-c-email-info-box">';html += '<h3>'+translations.productCallToAction.title+'</h3>';html += '<p>'+translations.productCallToAction.infoBox+'</p>';html += '</div>';html += '<form class="g-c-email-form">';html += '<div class="row">';html += '<div class="col-xs-12">';html += '<div class="form-group">';html += '<label for="emailForm_fullName" class="white">'+translations.productCallToAction.fullName+'</label>';html += '<input type="text" name="emailForm_fullName" placeholder="'+translations.productCallToAction.fullName+'" class="form-control" required data-msg-required="'+translations.jqueryValidMsgRequire+'">';html += '</div>';html += '</div>';html += '<div class="col-xs-12">';html += '<div class="form-group">';html += '<label for="emailForm_email" class="white">'+translations.emailAddress+'</label>';html += '<input type="text" name="emailForm_email" placeholder="'+translations.emailAddress+'" class="form-control" required data-msg-required="'+translations.jqueryValidMsgRequire+'" data-rule-email="true" data-msg-email="'+translations.jqueryValidMsgEmail+'">';html += '</div>';html += '</div>';html += '<div class="col-xs-12">';html += '<div class="form-group">';html += '<label for="emailForm_phone" class="white">'+translations.productCallToAction.phone+'</label>';html += '<input type="text" name="emailForm_phone" placeholder="'+translations.productCallToAction.phone+'" class="form-control">';html += '</div>';html += '</div>';html += '</div>';html += '<div class="row">';html += '<div class="col-xs-12">';html += '<button type="submit" class="btn btn-primary btn-block">'+translations.send+'</button>';html += '<input type="hidden" name="websiteID" value="'+$('#websiteID').val()+'">';html += '<input type="hidden" name="w" value="'+$('#w').val()+'">';html += '<input type="hidden" name="isAddToCartBtn" value="1">';html += '<input type="hidden" name="recaptchaToken" value="">';html += '<textarea class="form-control hidden" name="emailForm_description"></textarea>';html += '</div>';html += '</div>';html += '</form>';html +='<div class="g-c-email-message-sent-box">';html += '<div class="row">';html += '<div class="col-sm-6 col-xs-12 col-md-offset-3">';html += '<h3 class="g-c-email-message-content">'+translations.productCallToAction.thankYouMessage+'</h3>';html += '</div>';html += '</div>';html += '<div class="row">';html += '<div class="col-sm-6 col-xs-12 col-md-offset-3">';html += '<button type="button" class="btn btn-primary close-order-thank-you">'+translations.productCallToAction.thankYouCloseBtn+'</button>';html += '</div>';html += '</div>';html += '</div>';html += '</div>';return html;}
function fillDescription( callToAction ) {var pageURL = window.location.protocol+'//'+domain+callToAction.pageURL;
var html = '';html += '<br>';html += '<strong>'+translations.productCallToAction.productName+'<strong> ';html += '<a href="'+pageURL+'" target="_blank">'+callToAction.title+'</a>';$('#popupFloatDivSearch [name="emailForm_description"]').val(html);}
return _;}();return AO;}();var WishList = function() {var WL = {};WL.init = function( settings ) {$( document ).on( 's123.page.ready.wish_list', function( event ) {WL.websiteID = $('#websiteID').val();WL.$menuButton = $('.wishListActionButton');if ( WL.$menuButton.length === 0 ) return;WL.eventRecurring();WL.initilizeMenuButton();WL.initializeLayoutButtons();WL.initializeDataPageButtons();});};WL.markUnMarkIcons = function() {var $container = $('.s123-module-eCommerce');var $items = $container.find('.product-data-obj');var $icons = $items.find('.wish-list-btn');WL.items = tryParseJSON($.cookie(WL.websiteID+'-wishList'));if ( !WL.items || $container.length === 0 ) return;$icons.removeClass('wl-active');$.each(WL.items, function( index, item ) {$items.filter('.product-data-obj[data-unique-id="'+item.uniqueID+'"]').find('.wish-list-btn').addClass('wl-active');});if ( $container.hasClass('s123-page-data-eCommerce') ) {WL.setToolTip($container);}};WL.setToolTip = function( $container ) {var $wishListBtn = $container.find('.wish-list-btn');$wishListBtn.attr('data-original-title',$wishListBtn.data('add-tooltip'));$wishListBtn.filter('.wl-active').attr('data-original-title',$wishListBtn.data('remove-tooltip'));$wishListBtn.tooltip({container: 'body',placement: 'auto'});};WL.eventRecurring = function() {WL.markUnMarkIcons();WL.updateCounterIcon();};WL.refresh = function() {WL.eventRecurring();};WL.initilizeMenuButton = function() {if ( WL.$menuButton.length === 0 ) return;WL.$menuButton.off('click').on('click',function( event ) {var $this = $(this);showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&moduleTypeNUM=112&tranW='+websiteLanguageCountryFullCode+'&cartButton=1&wishList=true',true);});};WL.initializeLayoutButtons = function() {var $container = $('.s123-module-eCommerce:not(.s123-page-data-eCommerce)');if ( $container.length === 0 ) return;$container.find('.wish-list-btn').off('click.wishList').on('click.wishList',function( event ) {event.stopPropagation();var $this = $(this);var $wishListItem = $this.closest('.product-data-obj');if ( $this.hasClass('disabled') ) return false;if ( $this.hasClass('wl-active') ) {WL.removeItem($this,$wishListItem.data('module'),$wishListItem.data('module-type-num'),$wishListItem.data('unique-id'));} else {WL.addItem($this,$wishListItem.data('module'),$wishListItem.data('unique-id'));}});};WL.initializeDataPageButtons = function() {var $container = $('.s123-module-eCommerce.s123-page-data-eCommerce');if ( $container.length === 0 ) return;$container.find('.wish-list-btn').off('click.wishList').on('click.wishList', function( event ) {var $this = $(this);var $wishListItem = $this.closest('.product-data-obj');if ( $this.hasClass('disabled') ) return false;if ( $this.hasClass('wl-active') ) {WL.removeItem($this,$wishListItem.data('module'),$wishListItem.data('module-type-num'),$wishListItem.data('unique-id'));} else {WL.addItem($this,$wishListItem.data('module'),$wishListItem.data('unique-id'));}});};WL.addItem = function( $item , moduleID, uniqueID ) {$item.addClass('disabled');$.ajax({type: "POST",url: "/versions/2/wizard/orders/front/addToCart.php",data:  {w: $('#w').val(),websiteID: WL.websiteID,moduleID: moduleID,wishList: true,multiProducts: JSON.stringify(Array(uniqueID)),viewModeTXT: viewModeTXT,},success: function( response ) {response = tryParseJSON(response);showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&tranW='+websiteLanguageCountryFullCode+'&moduleID='+moduleID+'&wishList=true',true);WishList.eventRecurring();$item.removeClass('disabled');topWindow.eCommerce_cart_lastAdded = response.updatedCartIds ? response.updatedCartIds : false;}});};WL.removeItem = function( $item, moduleID, moduleTypeNUM, uniqueID ) {$item.addClass('disabled');$.ajax({type: "POST",url: "/versions/2/wizard/orders/front/removeCartItem.php",data: {w: $('#w').val(),websiteID: WL.websiteID,moduleID: moduleID,id: WL.items[uniqueID].id,uniqueID: uniqueID,wishList: true,cartType: moduleTypeNUM,tranW: websiteLanguageCountryFullCode},success: function( response ) {var response = JSON.parse(response);if ( !response.success ) return;WishList.eventRecurring();$item.removeClass('disabled');topWindow.eCommerce_cart_lastAdded = response.updatedCartIds ? response.updatedCartIds : false;}});};WL.updateCounterIcon = function() {var $headerWishListWrapper = $('.header-wish-list');if ( $headerWishListWrapper.length === 0 ) return;var itemsNumber = WL.items ? Object.keys(WL.items).length : 0 ;if ( parseInt(itemsNumber) === 0 ) {if ( !$headerWishListWrapper.hasClass('show-static') ) {$headerWishListWrapper.hide();ResetMoreButton();}
$headerWishListWrapper.find('.count').hide();} else {if ( !$headerWishListWrapper.hasClass('show-static') ) {$headerWishListWrapper.show();ResetMoreButton();}
$headerWishListWrapper.find('.count').html(itemsNumber).css({ display: 'flex' });}};return WL;}();var ShowCartMobileHandler = function() {var _ = {};_.step1 = function( settings ) {$(document).one('buildSmallPopup.open',function() {$('body').addClass('popupWinScroll');});$(document).one('buildSmallPopup.close',function() {$('body').removeClass('popupWinScroll');if ( window.visualViewport ) {$(window.visualViewport).off('resize.cartMobile scroll.cartMobile');}
$(window).off('resize.cartMobile');});};_.step2 = function() {if ( !isMobileDevice.any() ) return;const updateQuickCartHeight = () => {const quickCart = $('.quickCart');if ( !quickCart.length ) return;const visibleHeight = window.visualViewport?.height || window.innerHeight;quickCart.height(visibleHeight);};const handleViewportChange = () => {clearTimeout(window.updateQuickCartTimeout);window.updateQuickCartTimeout = setTimeout(updateQuickCartHeight,100);};if ( window.visualViewport ) {$(window.visualViewport).on('resize.cartMobile scroll.cartMobile',handleViewportChange);}
$(window).on('resize.cartMobile',handleViewportChange);updateQuickCartHeight();};return _;}();function showCart_GetContent( url, bsp ) {var window_object = S123.isWebsiteInSlidingWindow ? parent : window;var b_s_p = window_object.buildSmallPopup;ShowCartMobileHandler.step1();$.ajax({type: "GET",url: url,success: function( response ) {if ( bsp ) {b_s_p('popupCart',translations.cart,response,'',true,false,true,'');} else {$('#popupCart .content').html(response);}
showCart(window_object);}});}
function showCart( current_window ) {var $cartOrderPage = current_window.$('#popupCart').find('.content');init();function init() {eventRecurring();if ( $.isArray(topWindow.eCommerce_cart_lastAdded) ) {$.each(topWindow.eCommerce_cart_lastAdded, function( index, cart_id ) {$cartOrderPage.find('[data-cart-id="'+cart_id+'"]').addClass('last-added-highlight');});topWindow.eCommerce_cart_lastAdded = false;}}
function eventRecurring() {current_window.CartCounter.updateCartIcon();var aop_settings = tryParseJSON($cartOrderPage.find('#aopSettings').val());$cartOrderPage.height('auto');$cartOrderPage.find('.empty-cart-btn').off('click').on('click','a.empty-cart', function() {$.ajax({type: "GET",url: $(this).data('href')+'&wishList='+aop_settings.wishList,success: function( data ) {$cartOrderPage.closest('#popupCart .content').html(data);eventRecurring();showCart_UpdateCartWasChanged();}});});$cartOrderPage.find('.change-cart').on('click', function() {$.ajax({type: "GET",url: $(this).data('href'),success: function( data ) {$cartOrderPage.closest('#popupCart .content').html(data);eventRecurring();}});});$cartOrderPage.find('.continue-shopping-btn, .closeIcon').click(function() {current_window.buildSmallPopup_CloseAction('popupCart');});$cartOrderPage.find('.edit-quantity').on('click',function() {var $this = $(this);$cartOrderPage.find('#quantity_box_'+$this.data('product-id')+'').toggle();});$cartOrderPage.find('.edit-quantity-minus').on('click',function() {var $this = $(this);var $box = $cartOrderPage.find('#quantity_box_'+$this.data('product-id')+'');$box.find('.quantity_field').val(parseInt($box.find('.quantity_field').val())-1).trigger('input');updateAutomaticCouponMsg();});$cartOrderPage.find('.edit-quantity-plus').on('click',function() {var $this = $(this);var $box = $cartOrderPage.find('#quantity_box_'+$this.data('product-id')+'');$box.find('.quantity_field').val(parseInt($box.find('.quantity_field').val())+1).trigger('input');updateAutomaticCouponMsg();});function updateAutomaticCouponMsg() {$.ajax({type: 'POST',url: '/versions/' + $('#versionNUM').val() + '/wizard/orders/front/getAutomaticCouponMsg.php',data: {w: $('#w').val(),websiteID: $(websiteID).val(),total: $('#cartTotalPrice span[data-type="price"]').html(),cartType: $('.cartBottom').data('cart-type'),couponApplyTo: 'cartOrder',},success: function( response ) {$('.cart-automatic-coupon-container').html('').append(response);}});}
$cartOrderPage.find('.quantity_field').on('input', function() {var $input = $(this);if ( $input.val().length === 0 ) $input.val(1);if ( !$.isNumeric($input.val()) ) $input.val($input.val().replace(/[^0-9]/g,''));if ( $input.val() <= 0 ) $input.val(1);if ( parseInt($input.val()) > parseInt($input.data('inventory-limit')) ) {$input.val($input.data('inventory-limit'));showCart_QuantityPopover($cartOrderPage.find('[data-cart-id="'+$input.data('product-id')+'"]'),translations.productQuntityLimit.replace('{{units_limitation}}',$input.data('inventory-limit')));} else if ( parseInt($input.val()) > parseInt($input.data('maximum-purchase')) ) {$input.val($input.data('maximum-purchase'));showCart_QuantityPopover($cartOrderPage.find('[data-cart-id="'+$input.data('product-id')+'"]'),translations.productQuntityLimit.replace('{{units_limitation}}',$input.data('maximum-purchase')));} else if ( parseInt($input.val()) < parseInt($input.data('minimum-purchase')) ) {$input.val($input.data('minimum-purchase'));showCart_QuantityPopover($cartOrderPage.find('[data-cart-id="'+$input.data('product-id')+'"]'),translations.productQuntityLimitMin.replace('{{units_limitation}}',$input.data('minimum-purchase')));}
showCart_UpdateQuantityTotalPrice();clearTimeout(window.quantityInputFinished);window.quantityInputFinished = setTimeout( function() {$cartOrderPage.find('#q_u_loading_'+$input.data('product-id')).show();$.ajax({type: 'POST',url: '/versions/' + aop_settings.versionNUM + '/wizard/orders/front/quantityUpdate.php',data: {w: aop_settings.w,websiteID: aop_settings.websiteID,tranW: aop_settings.tranW,moduleID: aop_settings.moduleID,cartType: aop_settings.cartType,id: $input.data('product-id'),newQuantity: $input.val()},success: function( response ) {var response = JSON.parse(response);if ( response.success ) {$cartOrderPage.find('#q_u_loading_'+$input.data('product-id')).hide();current_window.CartCounter.updateCartIcon();showCart_UpdateCartWasChanged();}}});},300);});$cartOrderPage.find('.remove-product-btn').off('click').on('click', function() {var $this = $(this);$this.parent().children().hide();$this.parent().append('<div class="loading-primary r-p-loading" class="text-center">'+S123.s123IconToSvg.getHtml('spinner','fa-spin','')+'</div>');$.ajax({type: 'POST',url: '/versions/' + aop_settings.versionNUM + '/wizard/orders/front/removeCartItem.php',data: {id: $this.data('product-id'),uniqueID: $this.closest('.item').get(0).id,w: aop_settings.w,websiteID: aop_settings.websiteID,tranW: aop_settings.tranW,moduleID: aop_settings.moduleID,cartType: aop_settings.cartType,wishList: aop_settings.wishList},success: function( response ) {var response = tryParseJSON(response);if ( response.success ) {if ( $this.closest('.item').siblings().not('.mix-modules-products-buttons').length == 0 ) {$cartOrderPage.find('.cart-list-container').hide();$cartOrderPage.find('.empty-cart-container').show();}
$this.closest('.item').fadeOut(300,function() {$this.closest('.item').remove();showCart_UpdateQuantityTotalPrice();if ( aop_settings.wishList ) {WishList.markUnMarkIcons();WishList.updateCounterIcon();}
showCart_UpdateCartWasChanged();updateAutomaticCouponMsg();});} else {$cartOrderPage.find('.r-p-loading').remove();$this.show();showCart_UpdateQuantityTotalPrice();}
current_window.CartCounter.updateCartIcon();},error: function(data) {$cartOrderPage.find('.r-p-loading').remove();$this.show();}});});$cartOrderPage.find('#couponWebsite').validate({errorElement: 'div',errorClass: 'help-block',focusInvalid: true,ignore: ":hidden",highlight: function (e) {$(e).closest('.form-group').removeClass('has-info').addClass('has-error');},success: function (e) {$(e).closest('.form-group').removeClass('has-error');$(e).remove();},errorPlacement: function (error, element) {if( element.is('input[type=checkbox]') || element.is('input[type=radio]') ) {var controls = element.closest('div[class*="col-"]');if( controls.find(':checkbox,:radio').length > 1 ) controls.append(error);else error.insertAfter(element.nextAll('.lbl:eq(0)').eq(0));}
else if( element.is('.select2') ) {error.insertAfter(element.siblings('[class*="select2-container"]:eq(0)'));}
else if( element.is('.chosen-select') ) {error.insertAfter(element.siblings('[class*="chosen-container"]:eq(0)'));}
else {error.appendTo(element.closest('.form-group'));}},submitHandler: function( form ) {$(form).find('button:submit').prop('disabled', true);return true;}});ShowCartMobileHandler.step2();if ( aop_settings.foodDeliveryCart ) {foodDeliveryEditProductEvent($cartOrderPage);}
if ( $('html.onlyContent123').length > 0 ) {window.parent.$(window.parent.document).trigger('pageLoaded');} else {$(document).trigger('pageLoaded');}
if ( window.location.pathname == '/-order1/' ) {$(document).off('order1.reload').on('order1.reload', function(){if ( typeof window.isCartWasChanged != 'undefined' ) {delete window.isCartWasChanged;window.location.reload();}});}}
function showCart_QuantityPopover( $input, message ) {$input.popover({container: $cartOrderPage,content: message,trigger: 'manual',template: '<div class="popover cart-validator-popover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',placement: function(popover, input) {return isMobileDevice.any() ? 'auto' : 'bottom';}});$input.popover('show');clearTimeout($input.data('q-p-timeout'));$input.data('q-p-timeout',setTimeout(function(){$input.popover('destroy');},3000));}
function showCart_UpdateQuantityTotalPrice() {var cartTotal = 0.00;$cartOrderPage.find('.quantity_field').each(function() {var $quantityInput = $(this);var $info            = $quantityInput.closest('.cart-product-info');var $priceBox        = $info.find('.cart-product-price');var $price           = $info.find('.cart-product-price [data-type="price"]');var $quantityPrice   = $info.find('.quantity-total-price');var $fullPrice           = $info.find('.cart-product-full-price [data-type="price"]');var $quantityFullPrice   = $info.find('.quantity-total-full-price');var total = (parseFloat($price.closest('[data-price]').data('price')) * parseInt($quantityInput.val()));var totalFullPrice = (parseFloat($fullPrice.closest('[data-price]').data('price')) * parseInt($quantityInput.val()));cartTotal += parseFloat(total);$quantityPrice.find('.main_price [data-type="price"]').html(total.toFixed(2));$quantityFullPrice.find('.main_price [data-type="price"]').html(totalFullPrice.toFixed(2));if (parseInt($quantityInput.val()) > 1) {$quantityPrice.show();$priceBox.hide();} else {$quantityPrice.hide();$priceBox.show();}
$info.find('.cart-product-quantity .qty_count').html($quantityInput.val());$(document).trigger('multi_currencies_price_update',[[{el: $quantityPrice.find('.main_price'),newPrice: total.toFixed(2)}]]);});$cartOrderPage.find('#cartTotalPrice [data-type="price"]').html(cartTotal.toFixed(2));$(document).trigger('multi_currencies_price_update',[[{el: $cartOrderPage.find('#cartTotalPrice'),newPrice: cartTotal.toFixed(2)}]]);}
function showCart_UpdateCartWasChanged() {window.isCartWasChanged = window.location.pathname == '/-order1/';}}
jQuery(function($) {ProductsModuleInitialize();});function ProductsModuleInitialize() {$( document ).on( "s123.page.load", function( event ) {var $sections = $('.s123-module-products.layout-2');$sections.each(function( index ) {var $s = $(this);var categories = new ModuleLayoutCategories({$items :  $s.find('.products-category'),$categoriesContainer : $s.find('.categories-panel'),$filterButton : $s.find('.items-responsive-filter'),$categories : $s.find('.items-categories-container li')});});});}
jQuery(function($) {ProductsModuleInitialize_Layout3();});function ProductsModuleInitialize_Layout3() {$( document ).on( "s123.page.ready", function( event ) {var $sections = $('.s123-module-products.layout-3');$sections.each(function( index ) {var $s = $(this);var categories = new ModuleLayoutCategories({$items :  $s.find('.products-container > div'),$categoriesContainer : $s.find('.categories-panel'),$filterButton : $s.find('.items-responsive-filter'),$categories : $s.find('.items-categories-container li')});});});}
function Comments_Initialize( settings ) {var that = this;var $s123CommentsContainer = $('#'+settings.id);var $commentsForm = $s123CommentsContainer.find('.commentsForm');var $commentsContainer;var Rating = {};var submitMessage = {};var hasRating = false;that.onLoad = settings.onLoad;that.onFormSubmit = settings.onFormSubmit;that.customLabels = settings.customLabels ? settings.customLabels : {};switch( settings.type ) {case 0:$commentsContainer 	= $s123CommentsContainer.find('#commentsContainer');submitMessage.title = translations.sent;submitMessage.message = translations.blogReviewMessage;break;case 1:$commentsContainer 	= $s123CommentsContainer.find('#commentsContainer');hasRating = true;break;default:return;break;}
that.init = function() {that.loadComments(false);};that.showSubcomments = function ( subComments, $commentsContainer ) {$.each(subComments,function( index, comment ) {var $parentComments = $commentsContainer.find('.commentBox');$.each($parentComments,function( index, parentComment ) {if ($(this).data('comment-id') == comment.parentID ) {$(parentComment).find('.sub-comments-div').append(that.comment_HTML(comment.title,comment.time,comment.message));}});});};that.comment_HTML = function ( title, time, message ) {var html ='';html += '<div class="sub-comments-div-box">';html += '<h4 class="title">'+title+'</h4>';html += '<small class="time">'+time+'</small><br/>';html += '<div class="message">'+message+'</div>';html += '</div>';return html;};that.submitHandler = function ( $form ) {var forms_GoogleRecaptcha = new Forms_GoogleRecaptcha();forms_GoogleRecaptcha.init($form);$form.validate({errorElement: 'div',errorClass: 'help-block',focusInvalid: true,ignore: "",highlight: function (e) {$(e).closest('.form-group').removeClass('has-info').addClass('has-error');},success: function (e) {$(e).closest('.form-group').removeClass('has-error');$(e).remove();}});$form.off('submit.commentsForm').off('submit.commentsForm').on('submit.commentsForm', function( event ) {event.preventDefault();if ( hasRating ) {var formValid = $form.valid();var ratingValid = Rating.valid();if ( !formValid || !ratingValid ) return;} else {if ( !$form.valid() ) return;}
if ( forms_GoogleRecaptcha.isActive && !forms_GoogleRecaptcha.isGotToken ) {forms_GoogleRecaptcha.getToken();return false;}
$form.find('.blogSubmitButton').prop('disabled', true);$form.find('.blogSubmitButton').html(S123.s123IconToSvg.getHtml('spinner','fa-spin',''));$.ajax({type: "POST",url: "/versions/2/wizard/comments/addShowComments.php",data: $form.serialize(),success: function( data ) {var dataObj = tryParseJSON(data);if ( dataObj.blockComment  == '1' ) {that.showManagerApproveMessage();}
that.loadComments(data.commentsHtml);$form.trigger('reset');forms_GoogleRecaptcha.reset();$form.find('.blogSubmitButton').prop('disabled', false);$form.find('.blogSubmitButton').html($form.find('.blogSubmitButton').data('text'));WizardNotificationUpdate();if ( that.onFormSubmit ) that.onFormSubmit.call(this,dataObj.newCommentID,dataObj.blockComment);}});return false;});};that.showManagerApproveMessage = function () {if ( !submitMessage.message ) return;bootbox.alert({title: submitMessage.title,message: submitMessage.message,className: 'contactUsConfirm',buttons: {ok: {label: translations.Ok}},backdrop: true});};that.showReplyModal = function (t,childForm) {var x = '';x += '<form class="row" method="post" style="margin:0px;">';x += '<div class="col-xs-12 col-sm-12">';x += '<div class="form-group">';x += '<textarea class="form-control comment_message" name="comment_message" placeholder="'+(that.customLabels.commentResponseText ? that.customLabels.commentResponseText : t.data('tran-comment'))+'" style="min-height: 150px;" required data-msg-required="'+t.data('tran-this-field-is-required')+'"></textarea>';x += '</div>';x += '<div class="row">';x += '<div class="col-xs-12 col-sm-6">';x += '<div class="form-group">';x += '<input type="text" name="contact_name" placeholder="'+(that.customLabels.commentName ? that.customLabels.commentName : t.data('tran-name'))+'" class="form-control" required data-msg-required="'+t.data('tran-this-field-is-required')+'">';x += '</div>';x += '</div>';x += '<div class="col-xs-12 col-sm-6">';x += '<div class="form-group">';x += '<input type="text" name="contact_email" placeholder="'+(that.customLabels.commentEmail ? that.customLabels.commentEmail : t.data('tran-email-address'))+'" class="form-control" required data-msg-required="'+t.data('tran-this-field-is-required')+'" data-rule-email="true" data-msg-email="'+t.data('tran-please-enter-valid-email')+'">';x += '</div>';x += '</div>';x += '</div>';x += '<div class="text-center">';x += '<button type="submit" class="btn btn-primary blogSubmitButton" data-text="'+t.data('tran-post-reply')+'">'+(that.customLabels.replyButtonText ? that.customLabels.replyButtonText : t.data('tran-post-reply'))+'</button>';x += '</div>';x += '<div class="text-center comments-message-text">';x += '<small>* '+(that.customLabels.commentMessage ? that.customLabels.commentMessage : t.data('tran-the-email-will-not-be-published-on-the-website'))+'</small>';x += '</div>';x += '</div>';x += '<input type="hidden" name="w" value="'+t.data('hidden-w')+'">';x += '<input type="hidden" name="websiteID" value="'+t.data('hidden-website-id')+'">';x += '<input type="hidden" name="uniquePageID" value="'+t.data('hidden-unique-page-id')+'">';x += '<input type="hidden" name="moduleID" value="'+t.data('module-id')+'">';x += '<input type="hidden" name="moduleTypeNUM" value="'+t.data('module-type')+'">';x += '<input type="hidden" name="tranW" value="'+websiteLanguageCountryFullCode+'">';x += '<input type="hidden" class="commentTo" name="commentTo" value="'+t.data('hidden-comment-to')+'">';x += '<input type="hidden" name="act" value="addShow">';x += '</form>';childForm.html(x);that.submitHandler(childForm.find('form'));};Rating = new function() {var R = this;R.init = function( settings ) {if ( !settings.hasRating ) return;R.$form = settings.$form;R.$input = settings.$input;R.$json = settings.$json;if ( R.$form.length === 0 ) return;R.$raty = R.$form.find('.rating-plugin');R.$raty.raty({starType: 'i',cancel: false,number: 5,hints: R.getHints(),starHalf: (IsIE11() ? 'fa fa-star-half star-half' : 'star-half svg-m'),starOff: (IsIE11() ? 'fa fa-star-o star-o' : 'star-o svg-m'),starOn: (IsIE11() ? 'fa fa-star star' : 'star svg-m'),click: function( rating ,event ) {R.$input.val(rating);R.valid();}});};R.getHints = function() {var json = tryParseJSON(R.$json.val());if ( !json ) {return hints = [translations.reviewBad,translations.reviewPoor,translations.reviewRegular,translations.reviewGood,translations.reviewGorgeous];} else {return hints = json.hints;}};R.valid = function() {var valid = $.isNumeric(R.$input.val()) && parseInt(R.$input.val()) > 0;var $parent = R.$raty.closest('.form-group');$parent.removeClass('.has-error');$parent.find('#ratingError').remove();if ( !valid ) {$parent.addClass('has-error');$parent.append('<div id="ratingError" class="text-center help-block">'+R.$raty.data('msg-required')+'</div>');}
return valid;};};that.loadComments = function( commentsHtml ) {if ( !commentsHtml ) {loadCommentsByAjax();} else {addCommentsToPage(commentsHtml);}
$commentsForm.find('.blogCommentsBox #comment_message').focus(function() {$commentsForm.find('.blogCommentsBox').addClass('active');});that.submitHandler($commentsForm);Rating.init({$form: $commentsForm,$input: $commentsForm.find('.rating'),$json: $commentsForm.find('.rating-plugin-data'),hasRating: hasRating});};function loadCommentsByAjax() {$.ajax({type: "POST",url: '/versions/2/wizard/comments/addShowComments.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),disableCssFiles: 1,moduleID: $commentsContainer.data('module-id'),moduleTypeNUM: $commentsContainer.data('module-type-num'),uniquePageID: $commentsContainer.data('unique-page-id'),tranW: $commentsContainer.data('tran-w'),act: $commentsContainer.data('action')},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;addCommentsToPage(data.commentsHtml);}});}
function addCommentsToPage( commentsHtml ) {$commentsContainer.html(commentsHtml);$commentsContainer.find('.blog-reply-to').each(function( index, replyLink ) {$(replyLink).off('click').on('click',function() {$childForm = $(this).closest('.commentBox').find('.blogReplyForm');if ($childForm.hasClass('hidden')) {that.showReplyModal($(this),$childForm);$('.blogReplyForm').addClass('hidden');$('.blog-reply-to').html($(this).data('text-reply'));$(this).html($(this).data('text-hide'));$childForm.removeClass('hidden');} else {$childForm.addClass('hidden');$(this).html($(this).data('text-reply'));}
$childForm.find('.comment_message').select();});});var subComments = tryParseJSON($commentsContainer.find('.sub-comments').html());that.showSubcomments(subComments,$commentsContainer);if ( hasRating) {if ( that.onLoad ) that.onLoad.call(this,$commentsContainer.find('.commentBox').length,$commentsContainer.find('#reviewAvg').val(),false);}}
that.init();}
!function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.matchesSelector=t()}(window,function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],o=0;o<t.length;o++){var r=t[o],n=r+"MatchesSelector";if(e[n])return n}}();return function(t,o){return t[e](o)}});
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return i.indexOf(t)==-1&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{},i=n[e]=n[e]||{};return i[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return i!=-1&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],s=0;s<n.length;s++){var o=n[s],f=i&&i[o];f&&(this.off(e,o),delete i[o]),o.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e});
!function(e,t){"function"==typeof define&&define.amd?define(["desandro-matches-selector/matches-selector"],function(r){return t(e,r)}):"object"==typeof module&&module.exports?module.exports=t(e,require("desandro-matches-selector")):e.fizzyUIUtils=t(e,e.matchesSelector)}(window,function(e,t){"use strict";var r={};r.extend=function(e,t){for(var r in t)e[r]=t[r];return e},r.modulo=function(e,t){return(e%t+t)%t};var n=Array.prototype.slice;r.makeArray=function(e){if(Array.isArray(e))return e;if(null===e||void 0===e)return[];var t="object"==typeof e&&"number"==typeof e.length;return t?n.call(e):[e]},r.removeFrom=function(e,t){var r=e.indexOf(t);r!=-1&&e.splice(r,1)},r.getParent=function(e,r){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,r))return e},r.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},r.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.filterFindElements=function(e,n){e=r.makeArray(e);var o=[];return e.forEach(function(e){if(e instanceof HTMLElement){if(!n)return void o.push(e);t(e,n)&&o.push(e);for(var r=e.querySelectorAll(n),u=0;u<r.length;u++)o.push(r[u])}}),o},r.debounceMethod=function(e,t,r){r=r||100;var n=e.prototype[t],o=t+"Timeout";e.prototype[t]=function(){var e=this[o];clearTimeout(e);var t=arguments,u=this;this[o]=setTimeout(function(){n.apply(u,t),delete u[o]},r)}},r.docReady=function(e){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},r.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(e,t,r){return t+"-"+r}).toLowerCase()};var o=e.console;return r.htmlInit=function(t,n){r.docReady(function(){var u=r.toDashed(n),a="data-"+u,i=document.querySelectorAll("["+a+"]"),c=document.querySelectorAll(".js-"+u),d=r.makeArray(i).concat(r.makeArray(c)),f=a+"-options",s=e.jQuery;d.forEach(function(e){var r,u=e.getAttribute(a)||e.getAttribute(f);try{r=u&&JSON.parse(u)}catch(i){return void(o&&o.error("Error parsing "+a+" on "+e.className+": "+i))}var c=new t(e,r);s&&s.data(e,n,c)})})},r});
!function(t,e){"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("fizzy-ui-utils")):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){var a=i.getQueryElement(t);if(!a)return void console.error("Bad element for InfiniteScroll: "+(a||t));if(t=a,t.infiniteScrollGUID){var l=o[t.infiniteScrollGUID];return l.option(e),l}this.element=t,this.options=i.extend({},n.defaults),this.option(e),r&&(this.$element=r(this.element)),this.create()}var r=t.jQuery,o={};n.defaults={},n.create={},n.destroy={};var a=n.prototype;i.extend(a,e.prototype);var l=0;a.create=function(){var t=this.guid=++l;this.element.infiniteScrollGUID=t,o[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath();var e=this.getPath&&this.getPath();if(!e)return void console.error("Disabling InfiniteScroll");this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(var i in n.create)n.create[i].call(this)},a.option=function(t){i.extend(this.options,t)},a.callOnInit=function(){var t=this.options.onInit;t&&t.call(this,this)},a.dispatchEvent=function(t,e,i){this.log(t,i);var n=e?[e].concat(i):i;if(this.emitEvent(t,n),r&&this.$element){t+=".infiniteScroll";var o=t;if(e){var a=r.Event(e);a.type=t,o=a}this.$element.trigger(o,i)}};var s={initialized:function(t){return"on "+t},request:function(t){return"URL: "+t},load:function(t,e){return(t.title||"")+". URL: "+e},error:function(t,e){return t+". URL: "+e},append:function(t,e,i){return i.length+" items. URL: "+e},last:function(t,e){return"URL: "+e},history:function(t,e){return"URL: "+e},pageIndex:function(t,e){return"current page determined to be: "+t+" from "+e}};a.log=function(t,e){if(this.options.debug){var i="[InfiniteScroll] "+t,n=s[t];n&&(i+=". "+n.apply(this,e)),console.log(i)}},a.updateMeasurements=function(){this.windowHeight=t.innerHeight;var e=this.element.getBoundingClientRect();this.top=e.top+t.pageYOffset},a.updateScroller=function(){var e=this.options.elementScroll;if(!e)return void(this.scroller=t);if(this.scroller=e===!0?this.element:i.getQueryElement(e),!this.scroller)throw"Unable to find elementScroll: "+e},a.updateGetPath=function(){var t=this.options.path;if(!t)return void console.error("InfiniteScroll path option required. Set as: "+t);var e=typeof t;if("function"==e)return void(this.getPath=t);var i="string"==e&&t.match("{{#}}");return i?void this.updateGetPathTemplate(t):void this.updateGetPathSelector(t)},a.updateGetPathTemplate=function(t){this.getPath=function(){var e=this.pageIndex+1;return t.replace("{{#}}",e)}.bind(this);var e=t.replace("{{#}}","(\\d\\d?\\d?)"),i=new RegExp(e),n=location.href.match(i);n&&(this.pageIndex=parseInt(n[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};var h=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/];return a.updateGetPathSelector=function(t){var e=document.querySelector(t);if(!e)return void console.error("Bad InfiniteScroll path option. Next link not found: "+t);for(var i,n,r=e.getAttribute("href"),o=0;r&&o<h.length;o++){n=h[o];var a=r.match(n);if(a){i=a.slice(1);break}}return i?(this.isPathSelector=!0,this.getPath=function(){var t=this.pageIndex+1;return i[0]+t+i[2]}.bind(this),this.pageIndex=parseInt(i[1],10)-1,void this.log("pageIndex",[this.pageIndex,"next link"])):void console.error("InfiniteScroll unable to parse next link href: "+r)},a.updateGetAbsolutePath=function(){var t=this.getPath(),e=t.match(/^http/)||t.match(/^\//);if(e)return void(this.getAbsolutePath=this.getPath);var i=location.pathname,n=i.substring(0,i.lastIndexOf("/"));this.getAbsolutePath=function(){return n+"/"+this.getPath()}},n.create.hideNav=function(){var t=i.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},n.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},a.destroy=function(){this.allOff();for(var t in n.destroy)n.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete o[this.guid],r&&this.$element&&r.removeData(this.element,"infiniteScroll")},n.throttle=function(t,e){e=e||200;var i,n;return function(){var r=+new Date,o=arguments,a=function(){i=r,t.apply(this,o)}.bind(this);i&&r<i+e?(clearTimeout(n),n=setTimeout(a,e)):a()}},n.data=function(t){t=i.getQueryElement(t);var e=t&&t.infiniteScrollGUID;return e&&o[e]},n.setJQuery=function(t){r=t},i.htmlInit(n,"infinite-scroll"),a._init=function(){},r&&r.bridget&&r.bridget("infiniteScroll",n),n});
!function(e,t){"function"==typeof define&&define.amd?define(["./core"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("./core")):t(e,e.InfiniteScroll)}(window,function(e,t){function i(e){for(var t=document.createDocumentFragment(),i=0;e&&i<e.length;i++)t.appendChild(e[i]);return t}function n(e){for(var t=e.querySelectorAll("script"),i=0;i<t.length;i++){var n=t[i],s=document.createElement("script");o(n,s),s.innerHTML=n.innerHTML,n.parentNode.replaceChild(s,n)}}function o(e,t){for(var i=e.attributes,n=0;n<i.length;n++){var o=i[n];t.setAttribute(o.name,o.value)}}function s(e,t,i,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType=t||"",o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.onload=function(){if(200==o.status)i(o.response);else{var e=new Error(o.statusText);n(e)}},o.onerror=function(){var t=new Error("Network error requesting "+e);n(t)},o.send()}var r=t.prototype;return t.defaults.loadOnScroll=!0,t.defaults.checkLastPage=!0,t.defaults.responseType="document",t.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},r.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()},r.loadNextPage=function(){if(!this.isLoading&&this.canLoad){var e=this.getAbsolutePath();this.isLoading=!0;var t=function(t){this.onPageLoad(t,e)}.bind(this),i=function(t){this.onPageError(t,e)}.bind(this);s(e,this.options.responseType,t,i),this.dispatchEvent("request",null,[e])}},r.onPageLoad=function(e,t){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[e,t]),this.appendNextPage(e,t),e},r.appendNextPage=function(e,t){var n=this.options.append,o="document"==this.options.responseType;if(o&&n){var s=e.querySelectorAll(n),r=i(s),a=function(){this.appendItems(s,r),this.isLoading=!1,this.dispatchEvent("append",null,[e,t,s])}.bind(this);this.options.outlayer?this.appendOutlayerItems(r,a):a()}},r.appendItems=function(e,t){e&&e.length&&(t=t||i(e),n(t),this.element.appendChild(t))},r.appendOutlayerItems=function(i,n){var o=t.imagesLoaded||e.imagesLoaded;return o?void o(i,n):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},r.onAppendOutlayer=function(e,t,i){this.options.outlayer.appended(i)},r.checkLastPage=function(e,t){var i=this.options.checkLastPage;if(i){var n=this.options.path;if("function"==typeof n){var o=this.getPath();if(!o)return void this.lastPageReached(e,t)}var s;if("string"==typeof i?s=i:this.isPathSelector&&(s=n),s&&e.querySelector){var r=e.querySelector(s);r||this.lastPageReached(e,t)}}},r.lastPageReached=function(e,t){this.canLoad=!1,this.dispatchEvent("last",null,[e,t])},r.onPageError=function(e,t){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[e,t]),e},t.create.prefill=function(){if(this.options.prefill){var e=this.options.append;if(!e)return void console.error("append option required for prefill. Set as :"+e);this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()}},r.prefill=function(){var e=this.getPrefillDistance();this.isPrefilling=e>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},r.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},r.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},t});
!function(t,e){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(i,o){return e(t,i,o)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var o=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},o.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},o.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},o.bindScrollWatchEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},o.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();t<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),o.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},o.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,i=t.pageYOffset+this.windowHeight;return e-i},o.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},o.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e});
!function(t,e){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(o,i){return e(t,o,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,o){var i=e.prototype;e.defaults.history="replace";var s=document.createElement("a");return e.create.history=function(){if(this.options.history){s.href=this.getAbsolutePath();var t=s.origin||s.protocol+"//"+s.host,e=t==location.origin;return e?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+s.origin+" on "+location.origin+" . History behavior disabled.")}},i.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},i.bindHistoryAppendEvents=function(e){var o=e?"addEventListener":"removeEventListener";this.scroller[o]("scroll",this.scrollHistoryHandler),t[o]("unload",this.unloadHandler)},i.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=i.destroyHistory=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},i.onAppendHistory=function(t,e,o){if(o&&o.length){var i=o[0],n=this.getElementScrollY(i);s.href=e,this.scrollPages.push({top:n,path:s.href,title:t.title})}},i.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},i.getElementWindowScrollY=function(e){var o=e.getBoundingClientRect();return o.top+t.pageYOffset},i.getElementElementScrollY=function(t){return t.offsetTop-this.top},i.onScrollHistory=function(){for(var t,e,o=this.getScrollViewY(),i=0;i<this.scrollPages.length;i++){var s=this.scrollPages[i];if(s.top>=o)break;t=i,e=s}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},o.debounceMethod(e,"onScrollHistory",150),i.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},i.setHistory=function(t,e){var o=this.options.history,i=o&&history[o+"State"];i&&(history[o+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},i.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var o=this.scrollPages[e],i=t.pageYOffset-o.top+this.top;this.destroyHistory(),scrollTo(0,i)}},i.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e});
!function(t,s){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(e,i){return s(t,e,i)}):"object"==typeof module&&module.exports?module.exports=s(t,require("./core"),require("fizzy-ui-utils")):s(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,s,e){function i(t){o(t,"none")}function n(t){o(t,"block")}function o(t,s){t&&(t.style.display=s)}var u=s.prototype;return s.create.status=function(){var t=e.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},u.bindHideStatus=function(t){var s=this.options.append?"append":"load";this[t](s,this.hideAllStatus)},u.showRequestStatus=function(){this.showStatus("request")},u.showErrorStatus=function(){this.showStatus("error")},u.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},u.showStatus=function(t){n(this.statusElement),this.hideStatusEventElements();var s=this.statusEventElements[t];n(s)},u.hideAllStatus=function(){i(this.statusElement),this.hideStatusEventElements()},u.hideStatusEventElements=function(){for(var t in this.statusEventElements){var s=this.statusEventElements[t];i(s)}},s});
!function(t,e){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=i.getQueryElement(this.options.button);if(t)return void(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},n.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},n.prototype.enable=function(){this.element.removeAttribute("disabled")},n.prototype.disable=function(){this.element.disabled="disabled"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=n,e});
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<g;e++){var i=a[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||h("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function r(){if(!p){p=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var r=o(e);n=200==Math.round(t(r.width)),d.isBoxSizeOuter=n,i.removeChild(e)}}function d(e){if(r(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var d=o(e);if("none"==d.display)return i();var h={};h.width=e.offsetWidth,h.height=e.offsetHeight;for(var p=h.isBorderBox="border-box"==d.boxSizing,u=0;u<g;u++){var f=a[u],m=d[f],s=parseFloat(m);h[f]=isNaN(s)?0:s}var l=h.paddingLeft+h.paddingRight,c=h.paddingTop+h.paddingBottom,b=h.marginLeft+h.marginRight,x=h.marginTop+h.marginBottom,y=h.borderLeftWidth+h.borderRightWidth,v=h.borderTopWidth+h.borderBottomWidth,W=p&&n,w=t(d.width);w!==!1&&(h.width=w+(W?0:l+y));var B=t(d.height);return B!==!1&&(h.height=B+(W?0:c+v)),h.innerWidth=h.width-(l+y),h.innerHeight=h.height-(c+v),h.outerWidth=h.width+b,h.outerHeight=h.height+x,h}}var n,h="undefined"==typeof console?e:function(t){console.error(t)},a=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],g=a.length,p=!1;return d});
!function(t,i){"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size"],i):"object"==typeof module&&module.exports?module.exports=i(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=i(t.EvEmitter,t.getSize))}(window,function(t,i){"use strict";function n(t){for(var i in t)return!1;return i=null,!0}function o(t,i){t&&(this.element=t,this.layout=i,this.position={x:0,y:0},this._create())}function e(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],l={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},u=o.prototype=Object.create(t.prototype);u.constructor=o,u._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},u.handleEvent=function(t){var i="on"+t.type;this[i]&&this[i](t)},u.getSize=function(){this.size=i(this.element)},u.css=function(t){var i=this.element.style;for(var n in t){var o=l[n]||n;i[o]=t[n]}},u.getPosition=function(){var t=getComputedStyle(this.element),i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=t[i?"left":"right"],e=t[n?"top":"bottom"],s=parseFloat(o),r=parseFloat(e),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),e.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=i?a.paddingLeft:a.paddingRight,r-=n?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},u.layoutPosition=function(){var t=this.layout.size,i={},n=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),e=n?"paddingLeft":"paddingRight",s=n?"left":"right",r=n?"right":"left",a=this.position.x+t[e];i[s]=this.getXValue(a),i[r]="";var h=o?"paddingTop":"paddingBottom",l=o?"top":"bottom",u=o?"bottom":"top",d=this.position.y+t[h];i[l]=this.getYValue(d),i[u]="",this.css(i),this.emitEvent("layout",[this])},u.getXValue=function(t){var i=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!i?t/this.layout.size.width*100+"%":t+"px"},u.getYValue=function(t){var i=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&i?t/this.layout.size.height*100+"%":t+"px"},u._transitionTo=function(t,i){this.getPosition();var n=this.position.x,o=this.position.y,e=t==this.position.x&&i==this.position.y;if(this.setPosition(t,i),e&&!this.isTransitioning)return void this.layoutPosition();var s=t-n,r=i-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},u.getTranslate=function(t,i){var n=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=n?t:-t,i=o?i:-i,"translate3d("+t+"px, "+i+"px, 0)"},u.goTo=function(t,i){this.setPosition(t,i),this.layoutPosition()},u.moveTo=u._transitionTo,u.setPosition=function(t,i){this.position.x=parseFloat(t),this.position.y=parseFloat(i)},u._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var i in t.onTransitionEnd)t.onTransitionEnd[i].call(this)},u.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var i=this._transn;for(var n in t.onTransitionEnd)i.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)i.ingProperties[n]=!0,t.isCleaning&&(i.clean[n]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var d="opacity,"+e(a);u.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:d,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},u.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},u.onotransitionend=function(t){this.ontransitionend(t)};var p={"-webkit-transform":"transform"};u.ontransitionend=function(t){if(t.target===this.element){var i=this._transn,o=p[t.propertyName]||t.propertyName;if(delete i.ingProperties[o],n(i.ingProperties)&&this.disableTransition(),o in i.clean&&(this.element.style[t.propertyName]="",delete i.clean[o]),o in i.onEnd){var e=i.onEnd[o];e.call(this),delete i.onEnd[o]}this.emitEvent("transitionEnd",[this])}},u.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},u._removeStyles=function(t){var i={};for(var n in t)i[n]="";this.css(i)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return u.removeTransitionStyles=function(){this.css(f)},u.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},u.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},u.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},u.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,i={},n=this.getHideRevealTransitionEndProperty("visibleStyle");i[n]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:i})},u.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},u.getHideRevealTransitionEndProperty=function(t){var i=this.layout.options[t];if(i.opacity)return"opacity";for(var n in i)return n},u.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,i={},n=this.getHideRevealTransitionEndProperty("hiddenStyle");i[n]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:i})},u.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},u.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o});
!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,s,o){return e(t,i,n,s,o)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,s){"use strict";function o(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var s=++c;this.element.outlayerGUID=s,f[s]=this,this._create();var o=this._getOption("initLayout");o&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var s=d[n]||1;return i*s}var h=t.console,u=t.jQuery,m=function(){},c=0,f={};o.namespace="outlayer",o.Item=s,o.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var l=o.prototype;n.extend(l,e.prototype),l.option=function(t){n.extend(this.options,t)},l._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},o.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},l._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},l.reloadItems=function(){this.items=this._itemize(this.element.children)},l._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],s=0;s<e.length;s++){var o=e[s],r=new i(o,this);n.push(r)}return n},l._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},l.getItemElements=function(){return this.items.map(function(t){return t.element})},l.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},l._init=l.layout,l._resetLayout=function(){this.getSize()},l.getSize=function(){this.size=i(this.element)},l._getMeasurement=function(t,e){var n,s=this.options[t];s?("string"==typeof s?n=this.element.querySelector(s):s instanceof HTMLElement&&(n=s),this[t]=n?i(n)[e]:s):this[t]=0},l.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},l._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},l._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},l._getItemLayoutPosition=function(){return{x:0,y:0}},l._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},l.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},l._positionItem=function(t,e,i,n,s){n?t.goTo(e,i):(t.stagger(s*this.stagger),t.moveTo(e,i))},l._postLayout=function(){this.resizeContainer()},l.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},l._getContainerSize=m,l._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},l._emitCompleteOnItems=function(t,e){function i(){s.dispatchEvent(t+"Complete",null,[e])}function n(){r++,r==o&&i()}var s=this,o=e.length;if(!e||!o)return void i();var r=0;e.forEach(function(e){e.once(t,n)})},l.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var s=u.Event(e);s.type=t,this.$element.trigger(s,i)}else this.$element.trigger(t,i)},l.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},l.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},l.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},l.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},l._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},l._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},l._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},l._manageStamp=m,l._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,s=i(t),o={left:e.left-n.left-s.marginLeft,top:e.top-n.top-s.marginTop,right:n.right-e.right-s.marginRight,bottom:n.bottom-e.bottom-s.marginBottom};return o},l.handleEvent=n.handleEvent,l.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},l.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},l.onresize=function(){this.resize()},n.debounceMethod(o,"onresize",100),l.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},l.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},l.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},l.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},l.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},l.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},l.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},l.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},l.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},l.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},l.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},l.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},l.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},o.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},o.create=function(t,e){var i=r(o);return i.defaults=n.extend({},o.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},o.compatOptions),i.namespace=t,i.data=o.data,i.Item=r(s),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var d={ms:1,s:1e3};return o.Item=s,o});
!function(t,i){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],i):"object"==typeof module&&module.exports?module.exports=i(require("outlayer"),require("get-size")):t.Masonry=i(t.Outlayer,t.getSize)}(window,function(t,i){"use strict";var o=t.create("masonry");o.compatOptions.fitWidth="isFitWidth";var e=o.prototype;return e._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},e.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],o=t&&t.element;this.columnWidth=o&&i(o).outerWidth||this.containerWidth}var e=this.columnWidth+=this.gutter,h=this.containerWidth+this.gutter,n=h/e,s=e-h%e,r=s&&s<1?"round":"floor";n=Math[r](n),this.cols=Math.max(n,1)},e.getContainerWidth=function(){var t=this._getOption("fitWidth"),o=t?this.element.parentNode:this.element,e=i(o);this.containerWidth=e&&e.innerWidth},e._getItemLayoutPosition=function(t){t.getSize();var i=t.size.outerWidth%this.columnWidth,o=i&&i<1?"round":"ceil",e=Math[o](t.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var h=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",n=this[h](e,t),s={x:this.columnWidth*n.col,y:n.y},r=n.y+t.size.outerHeight,a=e+n.col,u=n.col;u<a;u++)this.colYs[u]=r;return s},e._getTopColPosition=function(t){var i=this._getTopColGroup(t),o=Math.min.apply(Math,i);return{col:i.indexOf(o),y:o}},e._getTopColGroup=function(t){if(t<2)return this.colYs;for(var i=[],o=this.cols+1-t,e=0;e<o;e++)i[e]=this._getColGroupY(e,t);return i},e._getColGroupY=function(t,i){if(i<2)return this.colYs[t];var o=this.colYs.slice(t,t+i);return Math.max.apply(Math,o)},e._getHorizontalColPosition=function(t,i){var o=this.horizontalColIndex%this.cols,e=t>1&&o+t>this.cols;o=e?0:o;var h=i.size.outerWidth&&i.size.outerHeight;return this.horizontalColIndex=h?o+t:this.horizontalColIndex,{col:o,y:this._getColGroupY(o,t)}},e._manageStamp=function(t){var o=i(t),e=this._getElementOffset(t),h=this._getOption("originLeft"),n=h?e.left:e.right,s=n+o.outerWidth,r=Math.floor(n/this.columnWidth);r=Math.max(0,r);var a=Math.floor(s/this.columnWidth);a-=s%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=this._getOption("originTop"),l=(u?e.top:e.bottom)+o.outerHeight,c=r;c<=a;c++)this.colYs[c]=Math.max(l,this.colYs[c])},e._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},e._getContainerFitWidth=function(){for(var t=0,i=this.cols;--i&&0===this.colYs[i];)t++;return(this.cols-t)*this.columnWidth-this.gutter},e.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},o});
!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function i(t,e){for(var i in e)t[i]=e[i];return t}function o(t){if(Array.isArray(t))return t;var e="object"==typeof t&&"number"==typeof t.length;return e?d.call(t):[t]}function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);var s=t;return"string"==typeof t&&(s=document.querySelectorAll(t)),s?(this.elements=o(s),this.options=i({},this.options),"function"==typeof e?n=e:i(this.options,e),n&&this.on("always",n),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||t))}function n(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var h=t.jQuery,a=t.console,d=Array.prototype.slice;r.prototype=Object.create(e.prototype),r.prototype.options={},r.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},r.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&m[e]){for(var i=t.querySelectorAll("img"),o=0;o<i.length;o++){var r=i[o];this.addImage(r)}if("string"==typeof this.options.background){var n=t.querySelectorAll(this.options.background);for(o=0;o<n.length;o++){var s=n[o];this.addElementBackgroundImages(s)}}}};var m={1:!0,9:!0,11:!0};return r.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,o=i.exec(e.backgroundImage);null!==o;){var r=o&&o[2];r&&this.addBackground(r,t),o=i.exec(e.backgroundImage)}},r.prototype.addImage=function(t){var e=new n(t);this.images.push(e)},r.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},r.prototype.check=function(){function t(t,i,o){setTimeout(function(){e.progress(t,i,o)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},r.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},r.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},n.prototype=Object.create(e.prototype),n.prototype.check=function(){var t=this.getIsImageComplete();return t?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))},n.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},n.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},n.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.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(n.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(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(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},r.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(h=e,h.fn.imagesLoaded=function(t,e){var i=new r(this,t,e);return i.jqDeferred.promise(h(this))})},r.makeJQueryPlugin(),r});
!function(){window.FizzyDocs={},window.filterBind=function(n,t,i,e){n.addEventListener(t,function(n){matchesSelector(n.target,i)&&e(n)})}}();
FizzyDocs["commercial-license-agreement"]=function(e){"use strict";function t(e){var t=o.querySelector(".is-selected");t&&t.classList.remove("is-selected"),e.classList.add("is-selected");var i=e.getAttribute("data-license-option"),n=r[i];l.forEach(function(e){e.element.textContent=n[e.property]})}var r={developer:{title:"Developer","for-official":"one (1) Licensed Developer","for-plain":"one individual Developer"},team:{title:"Team","for-official":"up to eight (8) Licensed Developer(s)","for-plain":"up to 8 Developers"},organization:{title:"Organization","for-official":"an unlimited number of Licensed Developer(s)","for-plain":"an unlimited number of Developers"}},o=e.querySelector(".button-group"),i=e.querySelector("h2"),n=i.cloneNode(!0);n.style.borderTop="none",n.style.marginTop=0,n.id="",n.innerHTML=n.innerHTML.replace("Commercial License",'Commercial <span data-license-property="title"></span> License'),i.textContent="",o.parentNode.insertBefore(n,o.nextSibling);for(var l=[],a=e.querySelectorAll("[data-license-property]"),c=0,s=a.length;c<s;c++){var p=a[c],u={property:p.getAttribute("data-license-property"),element:p};l.push(u)}t(o.querySelector(".button--developer")),filterBind(o,"click",".button",function(e){t(e.target)})};
!function(){var t=0;FizzyDocs["gh-button"]=function(n){function e(t){return t.toString().replace(/(\d)(?=(\d{3})+$)/g,"$1,")}var a=n.href.split("/"),r=a[3],c=a[4],o=n.querySelector(".gh-button__stat__text");t++;var u="ghButtonCallback"+t;window[u]=function(t){var n=e(t.data.stargazers_count);o.textContent=n};var i=document.createElement("script");i.src="https://api.github.com/repos/"+r+"/"+c+"?callback="+u,document.head.appendChild(i)}}();
FizzyDocs["shirt-promo"]=function(e){var t=new Date(2017,9,6),o=Math.round((t-new Date)/864e5),r=e.querySelector(".shirt-promo__title");r.textContent+=". Only on sale for "+o+" more days."};
!function(){"use strict";window.InfiniteScrollDocs={},window.utils=fizzyUIUtils}();
InfiniteScrollDocs.append=function(e){var t=e.querySelector(".scroller__content");new InfiniteScroll(t,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),history:!1})};
InfiniteScrollDocs["button-option"]=function(e){var t=e.querySelector(".scroller__content");new InfiniteScroll(t,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",elementScroll:e,checkLastPage:".pagination__next",scrollThreshold:!1,button:e.querySelector(".view-more-button"),status:e.querySelector(".scroller-status"),history:!1})};
InfiniteScrollDocs["button-start"]=function(e){function t(){o.loadNextPage(),o.options.loadOnScroll=!0,n.style.display="none",n.removeEventListener("click",t)}var l=e.querySelector(".scroller__content"),o=new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,loadOnScroll:!1,status:e.querySelector(".scroller-status"),history:!1}),n=e.querySelector(".view-more-button");n.addEventListener("click",t)};
InfiniteScrollDocs["check-last-page-disabled"]=function(e){var l=e.querySelector(".scroller__content");new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",elementScroll:e,checkLastPage:!1,scrollThreshold:!1,button:e.querySelector(".view-more-button"),status:e.querySelector(".scroller-status"),history:!1})};
InfiniteScrollDocs.debug=function(e){var t=e.querySelector(".scroller__content");new InfiniteScroll(t,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),history:!1,debug:!0})};
InfiniteScrollDocs["element-scroll-container"]=function(e){new InfiniteScroll(e,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:!0,history:!1})};
InfiniteScrollDocs["load-count"]=function(e){var t=e.querySelector(".scroller"),o=e.querySelector(".scroller__content"),l=e.querySelector(".demo-status"),n=new InfiniteScroll(o,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:t,status:e.querySelector(".scroller-status"),history:!1});n.on("load",function(){l.textContent=n.loadCount+" page"+(n.loadCount>1?"s":"")+" loaded"})};
InfiniteScrollDocs["masonry-small"]=function(e){var t=e.querySelector(".scroller__content"),r=new Masonry(t,{itemSelector:".image-grid__item",columnWidth:".image-grid__col-sizer",gutter:".image-grid__gutter-sizer",percentPosition:!0,stagger:30,visibleStyle:{transform:"translateY(0)",opacity:1},hiddenStyle:{transform:"translateY(100px)",opacity:0}});imagesLoaded(t,function(){r.layout()}),new InfiniteScroll(t,{path:"demo/masonry/page{{#}}.html",append:".image-grid__item",checkLastPage:".pagination__next",outlayer:r,history:!1,elementScroll:e,status:e.querySelector(".scroller-status")})};
InfiniteScrollDocs["page-index"]=function(e){var t=e.querySelector(".scroller"),l=e.querySelector(".scroller__content"),o=e.querySelector(".demo-status"),n=new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:t,status:e.querySelector(".scroller-status"),history:!1});n.on("load",function(){o.textContent="Loaded page: "+this.pageIndex})};
InfiniteScrollDocs.prefill=function(e){function l(){new InfiniteScroll(r,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:t,prefill:!0,status:e.querySelector(".scroller-status"),history:!1}),c.disabled="disabled",c.removeEventListener("click",l)}var t=e.querySelector(".scroller"),r=e.querySelector(".scroller__content"),c=e.querySelector(".button");c.addEventListener("click",l)};
InfiniteScrollDocs["scroll-2"]=function(e){function l(){1==n.loadCount&&(n.options.loadOnScroll=!1,t.style.display="inline-block",n.off(l))}var o=e.querySelector(".scroller__content"),t=e.querySelector(".view-more-button"),n=new InfiniteScroll(o,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,button:t,status:e.querySelector(".scroller-status"),history:!1});n.on("load",l)};
InfiniteScrollDocs["scroll-threshold-option"]=function(e){var l=e.querySelector(".scroller__content");new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),scrollThreshold:100,history:!1})};
InfiniteScrollDocs.status=function(e){var l=e.querySelector(".scroller__content");new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),scrollThreshold:50,history:!1})};
InfiniteScrollDocs["image-grid"]=function(e){var i=new Masonry(e,{itemSelector:"none",columnWidth:".image-grid__col-sizer",gutter:".image-grid__gutter-sizer",percentPosition:!0,stagger:30,visibleStyle:{transform:"translateY(0)",opacity:1},hiddenStyle:{transform:"translateY(100px)",opacity:0}});imagesLoaded(e,function(){e.classList.remove("are-images-unloaded"),i.options.itemSelector=".image-grid__item";var t=e.querySelectorAll(".image-grid__item");i.appended(t)}),new InfiniteScroll(e,{path:".pagination__next",hideNav:".pagination",append:".image-grid__item",outlayer:i,status:".scroller-status",debug:!0})};
!function(){var t;InfiniteScrollDocs["page-nav"]=function(e){var i=e.querySelector(".page-nav__list"),n=getComputedStyle(e,":after").content,a=n.match("sticky");if(t&&a)return void(e.style.display="none");t=e;var c=i.clientHeight<=window.innerHeight;c&&a&&e.classList.add("is-sticky")}}();
InfiniteScrollDocs["site-scroll"]=function(n){function e(){i=new InfiniteScroll(".main .container",{path:function(){var n=c+this.loadCount,e=a[n];return e&&e+".html"},append:".main__page"}),i.on("append",t),i.loadNextPage(),o.style.display="none",o.removeEventListener("click",e)}function t(n,e,t){for(var i=0;i<t.length;i++)InfiniteScrollDocs.initElementJS(t[i])}var i,o=n.querySelector(".button"),a=["index","options","api","events","extras","license"],l=document.body.getAttribute("data-basename"),c=a.indexOf(l)+1;o.addEventListener("click",e)};
!function(){"use strict";InfiniteScrollDocs.initElementJS=function(t){for(var n=t.querySelectorAll("[data-js]"),e=0;e<n.length;e++){var i=n[e],c=i.getAttribute("data-js"),l=InfiniteScrollDocs[c]||FizzyDocs[c];l&&l(i)}},InfiniteScrollDocs.initElementJS(document)}();
;(function ($, window, document, undefined) {'use strict';var pluginName = 'treeview';var _default = {};_default.settings = {injectStyle: true,levels: 2,expandIcon: 'glyphicon glyphicon-plus',collapseIcon: 'glyphicon glyphicon-minus',emptyIcon: 'glyphicon',nodeIcon: '',selectedIcon: '',checkedIcon: 'glyphicon glyphicon-check',uncheckedIcon: 'glyphicon glyphicon-unchecked',color: undefined, // '#000000',
backColor: undefined, // '#FFFFFF',
borderColor: undefined, // '#dddddd',
onhoverColor: '#F5F5F5',selectedColor: '#FFFFFF',selectedBackColor: '#428bca',searchResultColor: '#D9534F',searchResultBackColor: undefined, //'#FFFFFF',
enableLinks: false,highlightSelected: true,highlightSearchResults: true,showBorder: true,showIcon: true,showCheckbox: false,showTags: false,multiSelect: false,onNodeChecked: undefined,onNodeCollapsed: undefined,onNodeDisabled: undefined,onNodeEnabled: undefined,onNodeExpanded: undefined,onNodeSelected: undefined,onNodeUnchecked: undefined,onNodeUnselected: undefined,onSearchComplete: undefined,onSearchCleared: undefined};_default.options = {silent: false,ignoreChildren: false};_default.searchOptions = {ignoreCase: true,exactMatch: false,revealResults: true};var Tree = function (element, options) {this.$element = $(element);this.elementId = element.id;this.styleId = this.elementId + '-style';this.init(options);return {options: this.options,init: $.proxy(this.init, this),remove: $.proxy(this.remove, this),getNode: $.proxy(this.getNode, this),getParent: $.proxy(this.getParent, this),getSiblings: $.proxy(this.getSiblings, this),getSelected: $.proxy(this.getSelected, this),getUnselected: $.proxy(this.getUnselected, this),getExpanded: $.proxy(this.getExpanded, this),getCollapsed: $.proxy(this.getCollapsed, this),getChecked: $.proxy(this.getChecked, this),getUnchecked: $.proxy(this.getUnchecked, this),getDisabled: $.proxy(this.getDisabled, this),getEnabled: $.proxy(this.getEnabled, this),selectNode: $.proxy(this.selectNode, this),unselectNode: $.proxy(this.unselectNode, this),toggleNodeSelected: $.proxy(this.toggleNodeSelected, this),collapseAll: $.proxy(this.collapseAll, this),collapseNode: $.proxy(this.collapseNode, this),expandAll: $.proxy(this.expandAll, this),expandNode: $.proxy(this.expandNode, this),toggleNodeExpanded: $.proxy(this.toggleNodeExpanded, this),revealNode: $.proxy(this.revealNode, this),checkAll: $.proxy(this.checkAll, this),checkNode: $.proxy(this.checkNode, this),uncheckAll: $.proxy(this.uncheckAll, this),uncheckNode: $.proxy(this.uncheckNode, this),toggleNodeChecked: $.proxy(this.toggleNodeChecked, this),disableAll: $.proxy(this.disableAll, this),disableNode: $.proxy(this.disableNode, this),enableAll: $.proxy(this.enableAll, this),enableNode: $.proxy(this.enableNode, this),toggleNodeDisabled: $.proxy(this.toggleNodeDisabled, this),search: $.proxy(this.search, this),clearSearch: $.proxy(this.clearSearch, this)};};Tree.prototype.init = function (options) {this.tree = [];this.nodes = [];if (options.data) {if (typeof options.data === 'string') {options.data = $.parseJSON(options.data);}
this.tree = $.extend(true, [], options.data);delete options.data;}
this.options = $.extend({}, _default.settings, options);this.destroy();this.subscribeEvents();this.setInitialStates({ nodes: this.tree }, 0);this.render();};Tree.prototype.remove = function () {this.destroy();$.removeData(this, pluginName);$('#' + this.styleId).remove();};Tree.prototype.destroy = function () {if (!this.initialized) return;this.$wrapper.remove();this.$wrapper = null;this.unsubscribeEvents();this.initialized = false;};Tree.prototype.unsubscribeEvents = function () {this.$element.off('click');this.$element.off('nodeChecked');this.$element.off('nodeCollapsed');this.$element.off('nodeDisabled');this.$element.off('nodeEnabled');this.$element.off('nodeExpanded');this.$element.off('nodeSelected');this.$element.off('nodeUnchecked');this.$element.off('nodeUnselected');this.$element.off('searchComplete');this.$element.off('searchCleared');};Tree.prototype.subscribeEvents = function () {this.unsubscribeEvents();this.$element.on('click', $.proxy(this.clickHandler, this));if (typeof (this.options.onNodeChecked) === 'function') {this.$element.on('nodeChecked', this.options.onNodeChecked);}
if (typeof (this.options.onNodeCollapsed) === 'function') {this.$element.on('nodeCollapsed', this.options.onNodeCollapsed);}
if (typeof (this.options.onNodeDisabled) === 'function') {this.$element.on('nodeDisabled', this.options.onNodeDisabled);}
if (typeof (this.options.onNodeEnabled) === 'function') {this.$element.on('nodeEnabled', this.options.onNodeEnabled);}
if (typeof (this.options.onNodeExpanded) === 'function') {this.$element.on('nodeExpanded', this.options.onNodeExpanded);}
if (typeof (this.options.onNodeSelected) === 'function') {this.$element.on('nodeSelected', this.options.onNodeSelected);}
if (typeof (this.options.onNodeUnchecked) === 'function') {this.$element.on('nodeUnchecked', this.options.onNodeUnchecked);}
if (typeof (this.options.onNodeUnselected) === 'function') {this.$element.on('nodeUnselected', this.options.onNodeUnselected);}
if (typeof (this.options.onSearchComplete) === 'function') {this.$element.on('searchComplete', this.options.onSearchComplete);}
if (typeof (this.options.onSearchCleared) === 'function') {this.$element.on('searchCleared', this.options.onSearchCleared);}};Tree.prototype.setInitialStates = function (node, level) {if (!node.nodes) return;level += 1;var parent = node;var _this = this;$.each(node.nodes, function checkStates(index, node) {node.nodeId = _this.nodes.length;node.parentId = parent.nodeId;if (!node.hasOwnProperty('selectable')) {node.selectable = true;}
node.state = node.state || {};if (!node.state.hasOwnProperty('checked')) {node.state.checked = false;}
if (!node.state.hasOwnProperty('disabled')) {node.state.disabled = false;}
if (!node.state.hasOwnProperty('expanded')) {if (!node.state.disabled &&(level < _this.options.levels) &&(node.nodes && node.nodes.length > 0)) {node.state.expanded = true;}
else {node.state.expanded = false;}}
if (!node.state.hasOwnProperty('selected')) {node.state.selected = false;}
_this.nodes.push(node);if (node.nodes) {_this.setInitialStates(node, level);}});};Tree.prototype.clickHandler = function (event) {if (!this.options.enableLinks) event.preventDefault();var target = $(event.target);var node = this.findNode(target);if (!node || node.state.disabled) return;var classList = target.attr('class') ? target.attr('class').split(' ') : [];if ((classList.indexOf('expand-icon') !== -1)) {this.toggleExpandedState(node, _default.options);this.render();}
else if ((classList.indexOf('check-icon') !== -1)) {this.toggleCheckedState(node, _default.options);this.render();}
else {if (node.selectable) {this.toggleSelectedState(node, _default.options);} else {this.toggleExpandedState(node, _default.options);}
this.render();}};Tree.prototype.findNode = function (target) {var nodeId = target.closest('li.list-group-item').attr('data-nodeid');var node = this.nodes[nodeId];if (!node) {console.log('Error: node does not exist');}
return node;};Tree.prototype.toggleExpandedState = function (node, options) {if (!node) return;this.setExpandedState(node, !node.state.expanded, options);};Tree.prototype.setExpandedState = function (node, state, options) {if (state === node.state.expanded) return;if (state && node.nodes) {node.state.expanded = true;if (!options.silent) {this.$element.trigger('nodeExpanded', $.extend(true, {}, node));}}
else if (!state) {node.state.expanded = false;if (!options.silent) {this.$element.trigger('nodeCollapsed', $.extend(true, {}, node));}
if (node.nodes && !options.ignoreChildren) {$.each(node.nodes, $.proxy(function (index, node) {this.setExpandedState(node, false, options);}, this));}}};Tree.prototype.toggleSelectedState = function (node, options) {if (!node) return;this.setSelectedState(node, !node.state.selected, options);};Tree.prototype.setSelectedState = function (node, state, options) {if (state === node.state.selected) return;if (state) {if (!this.options.multiSelect) {$.each(this.findNodes('true', 'g', 'state.selected'), $.proxy(function (index, node) {this.setSelectedState(node, false, options);}, this));}
node.state.selected = true;if (!options.silent) {this.$element.trigger('nodeSelected', $.extend(true, {}, node));}}
else {node.state.selected = false;if (!options.silent) {this.$element.trigger('nodeUnselected', $.extend(true, {}, node));}}};Tree.prototype.toggleCheckedState = function (node, options) {if (!node) return;this.setCheckedState(node, !node.state.checked, options);};Tree.prototype.setCheckedState = function (node, state, options) {if (state === node.state.checked) return;if (state) {node.state.checked = true;if (!options.silent) {this.$element.trigger('nodeChecked', $.extend(true, {}, node));}}
else {node.state.checked = false;if (!options.silent) {this.$element.trigger('nodeUnchecked', $.extend(true, {}, node));}}};Tree.prototype.setDisabledState = function (node, state, options) {if (state === node.state.disabled) return;if (state) {node.state.disabled = true;this.setExpandedState(node, false, options);this.setSelectedState(node, false, options);this.setCheckedState(node, false, options);if (!options.silent) {this.$element.trigger('nodeDisabled', $.extend(true, {}, node));}}
else {node.state.disabled = false;if (!options.silent) {this.$element.trigger('nodeEnabled', $.extend(true, {}, node));}}};Tree.prototype.render = function () {if (!this.initialized) {this.$element.addClass(pluginName);this.$wrapper = $(this.template.list);this.injectStyle();this.initialized = true;}
this.$element.empty().append(this.$wrapper.empty());this.buildTree(this.tree, 0);};Tree.prototype.buildTree = function (nodes, level) {if (!nodes) return;level += 1;var _this = this;$.each(nodes, function addNodes(id, node) {var treeItem = $(_this.template.item)
.addClass('node-' + _this.elementId)
.addClass(node.state.checked ? 'node-checked' : '')
.addClass(node.state.disabled ? 'node-disabled': '')
.addClass(node.state.selected ? 'node-selected' : '')
.addClass(node.searchResult ? 'search-result' : '')
.attr('data-nodeid', node.nodeId)
.attr('style', _this.buildStyleOverride(node));for (var i = 0; i < (level - 1); i++) {treeItem.append(_this.template.indent);}
var classList = [];if (node.nodes) {classList.push('expand-icon');if (node.state.expanded) {classList.push(_this.options.collapseIcon);}
else {classList.push(_this.options.expandIcon);}}
else {classList.push(_this.options.emptyIcon);}
treeItem
.append($(_this.template.icon)
.addClass(classList.join(' ')));if (_this.options.showIcon) {var classList = ['node-icon'];classList.push(node.icon || _this.options.nodeIcon);if (node.state.selected) {classList.pop();classList.push(node.selectedIcon || _this.options.selectedIcon ||node.icon || _this.options.nodeIcon);}
treeItem
.append($(_this.template.icon)
.addClass(classList.join(' ')));}
if (_this.options.showCheckbox) {var classList = ['check-icon'];if (node.state.checked) {classList.push(_this.options.checkedIcon);}
else {classList.push(_this.options.uncheckedIcon);}
treeItem
.append($(_this.template.icon)
.addClass(classList.join(' ')));}
if (_this.options.enableLinks) {treeItem
.append($(_this.template.link)
.attr('href', node.href)
.append(node.text));}
else {treeItem
.append(node.text);}
if (_this.options.showTags && node.tags) {$.each(node.tags, function addTag(id, tag) {treeItem
.append($(_this.template.badge)
.append(tag));});}
_this.$wrapper.append(treeItem);if (node.nodes && node.state.expanded && !node.state.disabled) {return _this.buildTree(node.nodes, level);}});};Tree.prototype.buildStyleOverride = function (node) {if (node.state.disabled) return '';var color = node.color;var backColor = node.backColor;if (this.options.highlightSelected && node.state.selected) {if (this.options.selectedColor) {color = this.options.selectedColor;}
if (this.options.selectedBackColor) {backColor = this.options.selectedBackColor;}}
if (this.options.highlightSearchResults && node.searchResult && !node.state.disabled) {if (this.options.searchResultColor) {color = this.options.searchResultColor;}
if (this.options.searchResultBackColor) {backColor = this.options.searchResultBackColor;}}
return 'color:' + color +';background-color:' + backColor + ';';};Tree.prototype.injectStyle = function () {if (this.options.injectStyle && !document.getElementById(this.styleId)) {$('<style type="text/css" id="' + this.styleId + '"> ' + this.buildStyle() + ' </style>').appendTo('head');}};Tree.prototype.buildStyle = function () {var style = '.node-' + this.elementId + '{';if (this.options.color) {style += 'color:' + this.options.color + ';';}
if (this.options.backColor) {style += 'background-color:' + this.options.backColor + ';';}
if (!this.options.showBorder) {style += 'border:none;';}
else if (this.options.borderColor) {style += 'border:1px solid ' + this.options.borderColor + ';';}
style += '}';if (this.options.onhoverColor) {style += '.node-' + this.elementId + ':not(.node-disabled):hover{' +'background-color:' + this.options.onhoverColor + ';' +'}';}
return this.css + style;};Tree.prototype.template = {list: '<ul class="list-group"></ul>',item: '<li class="list-group-item"></li>',indent: '<span class="indent"></span>',icon: '<span class="icon"></span>',link: '<a href="#" style="color:inherit;"></a>',badge: '<span class="badge"></span>'};Tree.prototype.css = '.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}'
Tree.prototype.getNode = function (nodeId) {return this.nodes[nodeId];};Tree.prototype.getParent = function (identifier) {var node = this.identifyNode(identifier);return this.nodes[node.parentId];};Tree.prototype.getSiblings = function (identifier) {var node = this.identifyNode(identifier);var parent = this.getParent(node);var nodes = parent ? parent.nodes : this.tree;return nodes.filter(function (obj) {return obj.nodeId !== node.nodeId;});};Tree.prototype.getSelected = function () {return this.findNodes('true', 'g', 'state.selected');};Tree.prototype.getUnselected = function () {return this.findNodes('false', 'g', 'state.selected');};Tree.prototype.getExpanded = function () {return this.findNodes('true', 'g', 'state.expanded');};Tree.prototype.getCollapsed = function () {return this.findNodes('false', 'g', 'state.expanded');};Tree.prototype.getChecked = function () {return this.findNodes('true', 'g', 'state.checked');};Tree.prototype.getUnchecked = function () {return this.findNodes('false', 'g', 'state.checked');};Tree.prototype.getDisabled = function () {return this.findNodes('true', 'g', 'state.disabled');};Tree.prototype.getEnabled = function () {return this.findNodes('false', 'g', 'state.disabled');};Tree.prototype.selectNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setSelectedState(node, true, options);}, this));this.render();};Tree.prototype.unselectNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setSelectedState(node, false, options);}, this));this.render();};Tree.prototype.toggleNodeSelected = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.toggleSelectedState(node, options);}, this));this.render();};Tree.prototype.collapseAll = function (options) {var identifiers = this.findNodes('true', 'g', 'state.expanded');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, false, options);}, this));this.render();};Tree.prototype.collapseNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, false, options);}, this));this.render();};Tree.prototype.expandAll = function (options) {options = $.extend({}, _default.options, options);if (options && options.levels) {this.expandLevels(this.tree, options.levels, options);}
else {var identifiers = this.findNodes('false', 'g', 'state.expanded');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, true, options);}, this));}
this.render();};Tree.prototype.expandNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, true, options);if (node.nodes && (options && options.levels)) {this.expandLevels(node.nodes, options.levels-1, options);}}, this));this.render();};Tree.prototype.expandLevels = function (nodes, level, options) {options = $.extend({}, _default.options, options);$.each(nodes, $.proxy(function (index, node) {this.setExpandedState(node, (level > 0) ? true : false, options);if (node.nodes) {this.expandLevels(node.nodes, level-1, options);}}, this));};Tree.prototype.revealNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {var parentNode = this.getParent(node);while (parentNode) {this.setExpandedState(parentNode, true, options);parentNode = this.getParent(parentNode);};}, this));this.render();};Tree.prototype.toggleNodeExpanded = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.toggleExpandedState(node, options);}, this));this.render();};Tree.prototype.checkAll = function (options) {var identifiers = this.findNodes('false', 'g', 'state.checked');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, true, options);}, this));this.render();};Tree.prototype.checkNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, true, options);}, this));this.render();};Tree.prototype.uncheckAll = function (options) {var identifiers = this.findNodes('true', 'g', 'state.checked');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, false, options);}, this));this.render();};Tree.prototype.uncheckNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, false, options);}, this));this.render();};Tree.prototype.toggleNodeChecked = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.toggleCheckedState(node, options);}, this));this.render();};Tree.prototype.disableAll = function (options) {var identifiers = this.findNodes('false', 'g', 'state.disabled');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, true, options);}, this));this.render();};Tree.prototype.disableNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, true, options);}, this));this.render();};Tree.prototype.enableAll = function (options) {var identifiers = this.findNodes('true', 'g', 'state.disabled');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, false, options);}, this));this.render();};Tree.prototype.enableNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, false, options);}, this));this.render();};Tree.prototype.toggleNodeDisabled = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, !node.state.disabled, options);}, this));this.render();};Tree.prototype.forEachIdentifier = function (identifiers, options, callback) {options = $.extend({}, _default.options, options);if (!(identifiers instanceof Array)) {identifiers = [identifiers];}
$.each(identifiers, $.proxy(function (index, identifier) {callback(this.identifyNode(identifier), options);}, this));};Tree.prototype.identifyNode = function (identifier) {return ((typeof identifier) === 'number') ?this.nodes[identifier] :identifier;};Tree.prototype.search = function (pattern, options) {options = $.extend({}, _default.searchOptions, options);this.clearSearch({ render: false });var results = [];if (pattern && pattern.length > 0) {if (options.exactMatch) {pattern = '^' + pattern + '$';}
var modifier = 'g';if (options.ignoreCase) {modifier += 'i';}
results = this.findNodes(pattern, modifier);$.each(results, function (index, node) {node.searchResult = true;})}
if (options.revealResults) {this.revealNode(results);}
else {this.render();}
this.$element.trigger('searchComplete', $.extend(true, {}, results));return results;};Tree.prototype.clearSearch = function (options) {options = $.extend({}, { render: true }, options);var results = $.each(this.findNodes('true', 'g', 'searchResult'), function (index, node) {node.searchResult = false;});if (options.render) {this.render();}
this.$element.trigger('searchCleared', $.extend(true, {}, results));};Tree.prototype.findNodes = function (pattern, modifier, attribute) {modifier = modifier || 'g';attribute = attribute || 'text';var _this = this;return $.grep(this.nodes, function (node) {var val = _this.getNodeValue(node, attribute);if (typeof val === 'string') {return val.match(new RegExp(pattern, modifier));}});};Tree.prototype.getNodeValue = function (obj, attr) {var index = attr.indexOf('.');if (index > 0) {var _obj = obj[attr.substring(0, index)];var _attr = attr.substring(index + 1, attr.length);return this.getNodeValue(_obj, _attr);}
else {if (obj.hasOwnProperty(attr)) {return obj[attr].toString();}
else {return undefined;}}};var logError = function (message) {if (window.console) {window.console.error(message);}};$.fn[pluginName] = function (options, args) {var result;this.each(function () {var _this = $.data(this, pluginName);if (typeof options === 'string') {if (!_this) {logError('Not initialized, can not call method : ' + options);}
else if (!$.isFunction(_this[options]) || options.charAt(0) === '_') {logError('No such method : ' + options);}
else {if (!(args instanceof Array)) {args = [ args ];}
result = _this[options].apply(_this, args);}}
else if (typeof options === 'boolean') {result = _this;}
else {$.data(this, pluginName, new Tree(this, $.extend(true, {}, options)));}});return result || this;};})(jQuery, window, document);
var eCommerceFilterTool = new function() {var filter = this;this.init = function ( settings ) {if ( !settings ) return;$('.e-commerce-filter-container').empty();filter.productsContainerSelector = '.products-container';filter.container = $('.e-commerce-filter-container');filter.$scrollTo = $('.breadcrumb-wrap');filter.isActive = settings.isActive;filter.products = settings.products;filter.currency = settings.currency;filter.filteredProducts = false;filter.translations = settings.translations;filter.deviceType = ['xs','sm'].includes(findBootstrapEnvironment()) ? 'mobile' : 'pc';filter.w = settings.w;filter.websiteID = settings.websiteID;filter.type = settings.type;filter.uniquePageID = settings.uniquePageID;filter.filterCombinations = {};filter.eCommerceSearch = settings.eCommerceSearch;filter.style = $('.s123-module-eCommerce .side-menu').data('menu-style');if ( !filter.isActive || !filter.container ) return;filter.brands = settings.brands;filter.price = settings.price;filter.collections = settings.collections;filter.pOptions = settings.pOptions;filter.pAttributes = settings.pAttributes;filter.ribbons = settings.ribbons;filter.addFilterTool();if ( filter.deviceType == 'pc' ) {filter.container.css({'display': 'flex', 'flex-direction': 'column'});var $allFilterBoxes = filter.container.find('.filter-options');$.each($allFilterBoxes, function( index, box ) {var $box = $(box);if ( $box.data('def-state') === 'opened') {$box.find('filter-option-content').addClass('expanded');filter.closeOpenBox($box.find('.expand-filter'),0);}});}
filter.addShowFilterMobileBtn();filter.mobileFilterBtnResponsiveHandler();filter.initialized = true;};this.mobileFilterBtnResponsiveHandler = function() {$(window).one('resize.eCommerceFilterToolMobileFilter', function( event ) {filter.adaptToScreenSize();setTimeout( function() {filter.mobileFilterBtnResponsiveHandler();},500);});}
this.adaptToScreenSize = function() {var widthIncludingScrollbar = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;if ( widthIncludingScrollbar > 991 ) {filter.container.css({display: 'flex',flexDirection: 'column'});if ( filter.containerParent ) filter.containerParent.append(filter.container);$('#ecommerceFilterMenuPopup').remove();filter.container.closest('.e-commerce-filter-parent').attr('data-style',filter.style);} else {if ( filter.containerParent ) return;filter.container.css({display: 'none',flexDirection: ''});filter.container.closest('.e-commerce-filter-parent').attr('data-style','');}};this.getBoxStateFromCookie = function( id ) {var eCommerceFilterBoxState = tryParseJSON($.cookie(filter.websiteID+'_eCommerceFilterBoxState'));if ( !eCommerceFilterBoxState ) return false;if ( !eCommerceFilterBoxState[id] ) return false;return eCommerceFilterBoxState[id].state;};this.saveBoxesStateToCookie = function() {var eCommerceFilterBoxState = {};var $allFilterBoxes = filter.container.find('.filter-options');$.each($allFilterBoxes, function( index, box ) {var $box = $(box);eCommerceFilterBoxState[$box.data('id')] = {state: $box.find('.filter-option-content.expanded').length ? 'opened' : 'closed'}});$.cookie(filter.websiteID+'_eCommerceFilterBoxState',JSON.stringify(eCommerceFilterBoxState),{ expires: 1, path: '/' });};this.addShowFilterMobileBtn = function() {var $mobileBtnContainer = $('<div class="m-f-b-container"><button class="mobile-filter-btn btn btn-primary">' + filter.translations.filterBy + '</button></div>');$mobileBtnContainer.insertBefore(filter.container);filter.$mobileBtn = $mobileBtnContainer.find('.mobile-filter-btn');filter.$mobileBtn.on('click', function() {var $customCover = $('<div class="custom-cover"></div>');var $ecommerceFilterMenuPopup = $('#ecommerceFilterMenuPopup');if ( $ecommerceFilterMenuPopup.length == 0 ) {filter.containerParent = filter.container.parent();buildPopup('ecommerceFilterMenuPopup','','','',true,true,true,'');$ecommerceFilterMenuPopup = $('#ecommerceFilterMenuPopup');$ecommerceFilterMenuPopup.attr('data-style',filter.style);$ecommerceFilterMenuPopup.find('.page').append(filter.container);$ecommerceFilterMenuPopup.append($customCover);filter.container.css({'display': 'flex', 'flex-direction': 'column'});$ecommerceFilterMenuPopup.find('.popupCloseButton').off('click').on('click', function() {$ecommerceFilterMenuPopup.removeClass('open');});$customCover.on('click', function() {$ecommerceFilterMenuPopup.removeClass('open');popupWinScrollAction(0);});$ecommerceFilterMenuPopup.find('.cover').off('click').on('click', function() {$ecommerceFilterMenuPopup.removeClass('open');popupWinScrollAction(0);});} else {$ecommerceFilterMenuPopup.addClass('open');}});};this.addFilterTool = function() {filter.addTagsContainer();filter.addCollectionsFilter();filter.addPriceFilter();filter.addBrandsFilter();filter.addProductOptionsFilter();filter.addProductAttributesFilter();filter.addRibbonsFilter();filter.resetProductsCounter();filter.addExpandBoxEvent();};this.addTagsContainer = function() {var html = '';html  = '<div class="filter-tags-container">';html += '<div>';html += '<span class="filter-by-title">';html += '<svg class="svg-icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M640 288a64 64 0 1 1 0.032-128.032A64 64 0 0 1 640 288z m123.456-96c-14.304-55.04-64-96-123.456-96s-109.152 40.96-123.456 96H128v64h388.544c14.304 55.04 64 96 123.456 96s109.152-40.96 123.456-96H896V192h-132.544zM640 864a64 64 0 1 1 0.032-128.032A64 64 0 0 1 640 864m0-192c-59.456 0-109.152 40.96-123.456 96H128v64h388.544c14.304 55.04 64 96 123.456 96s109.152-40.96 123.456-96H896v-64h-132.544c-14.304-55.04-64-96-123.456-96M384 576a64 64 0 1 1 0.032-128.032A64 64 0 0 1 384 576m0-192c-59.456 0-109.152 40.96-123.456 96H128v64h132.544c14.304 55.04 64 96 123.456 96s109.152-40.96 123.456-96H896v-64H507.456c-14.304-55.04-64-96-123.456-96"/></svg>';
html += '<span class="filter-by-title-value">';html += filter.translations.filterBy;html += '</span>';html += '</span>';html += '<div class="tags"></div>';html += '</div>';html += '</div>';filter.container.append(html);filter.$tags = filter.container.find('.filter-tags-container .tags');};this.floorCeilPrice = function( number ) {var ceil = (Math.ceil(number / 10) * 10);var complete = ceil - number;if ( complete > 5 ) {number = Math.floor(number / 10) * 10;} else if ( complete < 5 ) {number = Math.ceil(number / 10) * 10;} else {number = number;}
return number;};this.addPriceFilter = function() {if ( !filter.price.active ) return;var rangeIncrease = filter.price.rangeIncrease;var range = filter.floorCeilPrice((parseFloat(filter.price.min) + rangeIncrease));var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie('price');var html = '';filter.price.max = (Math.ceil(filter.price.max / 10) * 10);if ( rangeIncrease > 0 ) {template = template.replace('{{place}}',filter.price.place);template = template.replace('{{title}}',filter.translations.priceTitle);template = template.replace('{{class}}','filter-type-price');template = template.replace('{{type}}','price');template = template.replace('{{id}}','price');template = template.replace('{{defState}}',(defState ? defState : filter.price.filterBoxState));html += '<div class="filter-option-container">';html += '<a href="javascript:void(0);" class="range-filter" data-type="price" data-min="0" data-max="' + range + '">';html += filter.translations.priceUnder + ' ' + showPrice(filter.currency,range);html += '<span data-products-in-filter="0" class="products-in-filter"> (0)</span>';html += '</a>';html += '</div>';for ( var i = 1; i <= (filter.price.ranges-2); i++, range += rangeIncrease ) {range = filter.floorCeilPrice(range);html += '<div class="filter-option-container">';html += '<a href="javascript:void(0);" class="range-filter" data-type="price" data-min="' + (range + 1) + '" data-max="' + (range + rangeIncrease) + '">';html += showPrice(filter.currency,(range + 1)) + ' - ' + showPrice(filter.currency,(range + rangeIncrease)) + ' ';html += '<span data-products-in-filter="0" class="products-in-filter"> (0)</span>';html += '</a>';html += '</div>';}
range = filter.floorCeilPrice(range);html += '<div class="filter-option-container">';html += '<a href="javascript:void(0);" class="range-filter" data-type="price" data-min="' + (range + 1) + '" data-max="' + filter.price.max + '" data-custom-tag-text="' + range + ' ' + filter.translations.priceAbove + '">';html +=  showPrice(filter.currency,(range + 1)) + ' ' + filter.translations.priceAbove;html += '<span data-products-in-filter="0" class="products-in-filter"> (0)</span>';html += '</a>';html += '</div>';html += '<div class="form-group ' + ( filter.price.hideCustomFilter ? 'hidden' : '' ) + '">';html += '<div class="input-group">';html += '<input type="text" class="form-control minPrice" value="0">';html += '<input type="text" class="form-control maxPrice" value="' + filter.price.max + '">';html += '<button class="btn filter-by-price-btn">Filter</button>';html += '</div>';html += '</div>';template = template.replace('{{content}}',html);filter.container.append(template);filter.addPriceEvent();}};this.addCollectionsFilter = function() {if ( !filter.collections.active ) return;let $collectionsBox = $('#collectionsBox');if ( $collectionsBox.length == 0 ) return;$collectionsBox.attr('data-def-state',filter.collections.filterBoxState);$collectionsBox.attr('data-id',filter.collections.id);$collectionsBox.addClass('filter-options');$collectionsBox.find('#collectionsBoxBody').addClass('filter-option-content');$collectionsBox.find('.filter-type-title').replaceWith(`<span class="filter-type-title">${$collectionsBox.find('.filter-type-title').text()}</span>`);$collectionsBox.find('.filter-type-title').append(S123.s123IconToSvg.getHtml('plus','expand-filter plus-icon',''));$collectionsBox.find('.filter-type-title').append(S123.s123IconToSvg.getHtml('minus','expand-filter minus-icon',''));var defState = filter.getBoxStateFromCookie('collections-system-id');if ( defState ) {$collectionsBox.attr('data-def-state',defState);}
$collectionsBox.css({order: filter.collections.place,});filter.container.append($collectionsBox);$collectionsBox.show();};this.addBrandsFilter = function() {if ( !filter.brands.active ) return;var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie('brands-system-id');var html = '';template = template.replace('{{place}}',(parseInt(filter.brands.place)));template = template.replace('{{title}}',filter.translations.brandsTitle);template = template.replace('{{class}}','filter-type-brands');template = template.replace('{{type}}','brand');template = template.replace('{{id}}','brands-system-id');template = template.replace('{{defState}}',(defState ? defState : filter.brands.filterBoxState));$.each(filter.brands.values, function( index, brand ) {brand.allSettings = JSON.parse(brand.allSettings);var obj = {title : brand.allSettings.title,value : index,dataAttr: 'data-type="brand" data-unique-id="' + escapeHtml(index) + '" data-parent-unique-id="brands-system-id"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','style="order:' + escapeHtml(brand.place) + '";');});template = template.replace('{{content}}',html);filter.container.append(template);filter.addCheckBoxEvent();};this.addProductOptionsFilter = function() {if ( !filter.pOptions.active ) return;$.each(filter.pOptions.options, function( index, po ) {var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie(po.id);var html = '';template = template.replace('{{place}}',(parseInt(po.place)));template = template.replace('{{title}}',po.title);template = template.replace('{{class}}','filter-type-options');template = template.replace('{{type}}',po.type);template = template.replace('{{id}}',escapeHtml(po.id));template = template.replace('{{defState}}',(defState ? defState : po.filterBoxState));$.each(po.items, function( index, item ) {if ( po.type == 'color' ) {var obj = {title : item.title,value : item.color,dataAttr: 'data-type="' + escapeHtml(po.type) + '" data-unique-id="' + escapeHtml(item.color) + '" data-parent-unique-id="' + escapeHtml(po.id) + '" data-poi-id="' + escapeHtml(item.id) + '"'}
html += filter.generateColor(obj);} else  {var obj = {title : item.title,value : item.id,dataAttr: 'data-type="' + escapeHtml(po.type) + '" data-unique-id="' + escapeHtml(item.id) + '" data-parent-unique-id="' + escapeHtml(po.id) + '" data-poi-id="' + escapeHtml(item.id) + '"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','');}});template = template.replace('{{content}}',html);filter.container.append(template);});filter.container.find('.color').tooltip({container: '.e-commerce-filter-container',placement: 'top'});filter.addCheckBoxEvent();filter.addColorBoxEvent();};this.addProductAttributesFilter = function() {if ( !filter.pAttributes.active ) return;$.each(filter.pAttributes.attributes, function( index, attr ) {var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie(attr.id);var html = '';template = template.replace('{{place}}',(parseInt(attr.place)));template = template.replace('{{title}}',attr.title);template = template.replace('{{class}}','filter-type-attributes');template = template.replace('{{type}}','attribute');template = template.replace('{{id}}',escapeHtml(attr.id));template = template.replace('{{defState}}',(defState ? defState : attr.filterBoxState));$.each(attr.values, function( index, value ) {var obj = {title : value.title,value : value.id,dataAttr: 'data-type="' + escapeHtml(attr.type) + '" data-unique-id="' + escapeHtml(value.id) + '" data-parent-unique-id="' + escapeHtml(attr.id) + '"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','');});template = template.replace('{{content}}',html);filter.container.append(template);});filter.addCheckBoxEvent();};this.addRibbonsFilter = function() {if ( !filter.ribbons.active ) return;var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie('ribbonsObj-system-id');var html = '';template = template.replace('{{place}}',filter.ribbons.place);template = template.replace('{{title}}',filter.translations.ribbonsTitle);template = template.replace('{{class}}','filter-type-ribbons');template = template.replace('{{type}}','ribbon');template = template.replace('{{id}}','ribbonsObj-system-id');template = template.replace('{{defState}}',(defState ? defState : filter.ribbons.filterBoxState));$.each(filter.ribbons.values, function( index, ribbon ) {var obj = {title : ribbon.title,value : ribbon.id,dataAttr: 'data-type="ribbon" data-unique-id="' + escapeHtml(ribbon.id) + '" data-parent-unique-id="ribbonsObj-system-id"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','');});template = template.replace('{{content}}',html);filter.container.append(template);filter.addCheckBoxEvent();};this.resetProductsCounter = function() {var $counters = filter.container.find('.products-in-filter');var $filterOptions = filter.container.find('.filter-options');var products = filter.filteredProducts ? filter.filteredProducts : filter.products;$.each($counters, function( index, counter ) {var $this = $(this);$this.empty();var $parent = $(this).parent();switch( $parent.data('type') ) {case 'brand':var obj = {};obj.val = $parent.data('unique-id');break;case 'ribbon':var obj = {};obj.val = $parent.data('unique-id');break;case 'price':var obj = {};obj.min = $parent.data('min');obj.max = $parent.data('max');break;case 'color':var obj = {};obj.parentUniqueID = $this.data('parent-unique-id');obj.val = $this.data('unique-id');break;default :var obj = {};obj.parentUniqueID = $this.data('parent-unique-id');obj.val = $parent.data('unique-id');break;}
var result = filter.getProductByFilterType($parent.data('type'),obj,Array(),products);if ( $parent.data('type') === 'color' ) {var $color = $parent.find('.color');$color.attr('data-original-title', $color.data('title') + ' ('+result.length+')');filter.hideShowFilterOption($parent,$this,result.length);} else {filter.hideShowFilterOption($parent.parent(),$this,result.length);}});$.each($filterOptions, function( index, option ) {var $this = $(this);var $counters = $this.find('.products-in-filter');var $hiddenCounters  = $counters.filter('[data-products-in-filter="0"]');if ( $this.get(0).id == 'collectionsBox' ) return;if ( $counters.length === $hiddenCounters.length ) {$this.hide();} else {$this.show();}});filter.hideShowFilterSiblings();};this.hideShowFilterSiblings = function() {if ( filter.$tags.children('.tag').length === 0 ) {filter.container.siblings(':not(.m-f-b-container,#collectionsBox)').fadeIn(200);filter.$tags.addClass('no-tags');} else {filter.container.siblings(':not(.m-f-b-container,#collectionsBox)').fadeOut(200);filter.$tags.removeClass('no-tags');}};this.hideShowFilterOption = function( $option, $counter, productsCounter ) {if ( productsCounter == 0 ) {$option.hide();$counter.append('&nbsp;(' + productsCounter + ')');$counter.attr('data-products-in-filter',productsCounter);} else {$option.show();$counter.append('&nbsp;(' + productsCounter + ')');$counter.attr('data-products-in-filter',productsCounter);}};this.generateColor = function( obj ) {var html = '';html += '<label data-type="color">';html += '<div class="color" data-rel="tooltip" data-original-title="' + escapeHtml(obj.title) + '" title="' + escapeHtml(obj.title) + ' (0)" data-title="' + escapeHtml(obj.title) + '" ' + obj.dataAttr + ' style="background-color:' + escapeHtml(obj.value) + '; width:10px;height:10px;display:inline-block;border:solid 1px;">';html += S123.s123IconToSvg.getHtml('check','check-icon','');html += '</div>';html += '<span data-products-in-filter="0" '+ obj.dataAttr + ' class="products-in-filter hidden"> (0)</span>';html += '</label>';return html;};this.addPriceEvent = function() {var $rangeOptions = filter.container.find('.range-filter');var $filterByPriceBtn = filter.container.find('.filter-by-price-btn');var $minPrice = filter.container.find('.minPrice');var $maxPrice = filter.container.find('.maxPrice');$rangeOptions.on('click', function() {var $this = $(this);$minPrice.val($this.data('min'));$maxPrice.val($this.data('max'));$rangeOptions.removeClass('selected-filter');$this.addClass('selected-filter');$filterByPriceBtn.trigger('click');});$filterByPriceBtn.on('click', function() {filter.container.find('.filter-tags-container .tags .tag[data-type="price"]').remove();var dataAttr = 'data-type="price" data-min="' + $minPrice.val() + '" data-max="' + $maxPrice.val() + '"';var customTagText = $rangeOptions.filter('.selected-filter').data('custom-tag-text');if ( customTagText ) {filter.addFilterTag(customTagText,dataAttr);} else {filter.addFilterTag($minPrice.val()+'-'+$maxPrice.val(),dataAttr);}});};this.generateCheckBox = function( obj ) {var html = '';html += '<div class="filter-option-container" {{placeStyle}}>';html += '<label class="checkbox-label" ' + obj.dataAttr + '>';html += '<input class="checkboxInput" data-title="' + escapeHtml(obj.title) + '" ' + obj.dataAttr + ' type="checkbox" value="' + escapeHtml(obj.value) + '">';html += '<span class="checkbox-custom"></span>';html += '<span class="lbl input-title">&nbsp;' + obj.title + '</span>';html += '<span data-products-in-filter="0" '+ obj.dataAttr + ' class="products-in-filter"> (0)</span>';html += '</label>';html += '</div>';return html;};this.addFilterTag = function( title, dataAttr ) {var html = '';html += '<span class="tag" ' + dataAttr + ' style="display: inline-block;">';html += '<span class="filter-tag-title">' + title + '</span>&nbsp;|';html += '<button type="button" class="close">';html += S123.s123IconToSvg.getHtml('times','','');html += '</button>';html += '</span>';var $html = $(html);if ( $html.data('type') === 'price' ) {filter.multiCurrencyConvertion($html);$(document).off('multi_currency_update.eCommerce_filter').on('multi_currency_update.eCommerce_filter', function() {filter.multiCurrencyConvertion($html);});}
filter.container.find('.filter-tags-container .tags').append($html);filter.refreshTagsEvent();filter.filterProducts();};this.multiCurrencyConvertion = function( $html ) {var text = $html.find('.filter-tag-title').html();var min = MultiCurrencies.geConvertedPrice($html.data('min'));var max = MultiCurrencies.geConvertedPrice($html.data('max'));if ( text.indexOf('Above') != -1 ) {$html.find('.filter-tag-title').html(min + ' ' + filter.translations.priceAbove);} else {$html.find('.filter-tag-title').html(min + '-' + max);}};this.addCheckBoxEvent = function() {var $checkBoxes = filter.container.find('.checkboxInput');$checkBoxes.off('change').on('change', function() {var $this = $(this);if ( $this.is(':checked') ) {filter.checkBoxCheckedEvent($this);} else {filter.checkBoxUnCheckedEvent($this);}});}
this.addColorBoxEvent = function() {var $colors = filter.container.find('.color');$colors.off('click').on('click', function( event ) {var $this = $(this);if ( $this.hasClass('checked') ) {$this.removeClass('checked');var dataAttr = '.tag[data-unique-id="' + escapeHtml($this.data('unique-id')) + '"][data-type="color"][data-parent-unique-id="' + escapeHtml($this.data('parent-unique-id')) + '"]';filter.container.find(dataAttr).remove();filter.filterProducts();} else {$this.addClass('checked');if ( filter.container.find('.filter-tags-container .tags .tag[data-unique-id="' + escapeHtml($this.data('unique-id')) + '"] ').length > 0 ) return;var dataAttr = 'data-unique-id="' + $this.data('unique-id') + '" data-type="color" data-parent-unique-id="' + escapeHtml($this.data('parent-unique-id')) + '" data-poi-id="' + $this.data('poi-id') + '"';filter.addFilterTag($this.data('title'),dataAttr);}});}
this.refreshTagsEvent = function() {filter.container.find('.filter-tags-container .tags .close').off('click').on('click' ,function() {var $tag = $(this).parent();if ($tag.data('type') == 'color' ) {filter.container.find('.color[data-unique-id="' + escapeHtml($tag.data('unique-id')) + '"]').removeClass('checked');} else {filter.container.find('.checkboxInput[value="' + escapeHtml($tag.data('unique-id')) + '"]').prop('checked',false);}
$tag.remove();filter.filterProducts();});};this.checkBoxCheckedEvent = function( $checkbox ) {if ( filter.container.find('.filter-tags-container .tags .tag[data-unique-id="' + escapeHtml($checkbox.val()) + '"] ').length > 0 ) return;var dataAttr = '';dataAttr += 'data-unique-id="' + escapeHtml($checkbox.val()) + '" data-type="' + escapeHtml($checkbox.data('type')) + '" data-parent-unique-id="' + escapeHtml($checkbox.data('parent-unique-id')) + '"';if ( $checkbox.data('poi-id') ) {dataAttr += '" data-poi-id="' + $checkbox.data('poi-id') + '"';}
filter.addFilterTag($checkbox.data('title'),dataAttr);};this.checkBoxUnCheckedEvent = function( $this ) {var dataAttr = '';dataAttr += '.tag[data-unique-id="' + escapeHtml($this.val()) + '"][data-type="' + escapeHtml($this.data('type')) + '"]';filter.container.find(dataAttr).remove();filter.refreshTagsEvent();filter.filterProducts();};this.filterProducts = function() {var $tags = filter.container.find('.filter-tags-container .tag');if ( $tags.length == 0 ) filter.filteredProducts = false;var dataAttr = '';var products = Array();filter.filterCombinations = {};products = filter.filteredProducts;if ( $tags.length > 0 ) {$.each($tags, function( index, tag ) {var $this = $(this);switch ( $this.data('type') ) {case 'price':var obj = {};obj.min = $this.data('min');obj.max = $this.data('max');filter.filterCombinations.price = {min: obj.min,max: obj.max};break;default:var obj = {};obj.parentUniqueID = $this.data('parent-unique-id');obj.val = $this.data('unique-id');if ( filter.filterCombinations[$this.data('type')] && filter.filterCombinations[$this.data('type')].boxes ) {if ( filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID] && filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID].values ) {filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID].values.push(obj.val);} else {filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID] = {values: [obj.val]};}} else {var boxes = {};boxes[obj.parentUniqueID] = {values: [obj.val]}
filter.filterCombinations[$this.data('type')] = {boxes: boxes};}
break;}
var searchIn = Array();if ( $this.is(':first-child') ) {searchIn = filter.products;} else {searchIn = products;products = false;}
var tmp = filter.getProductByFilterType($this.data('type'),obj,Array(),searchIn);if ( products ) {Array.prototype.push.apply(products,tmp);} else {products = tmp;}});filter.filteredProducts = products;}
filter.resetProductsCounter();filter.getProductsByAjax();};this.getProductsByAjax = function() {var $productsContainer = $(filter.productsContainerSelector);var $loader = $productsContainer.parent().find('.s123-loader-ellips');$loader.parent().show();$loader.show();$productsContainer.fadeOut(200);scrollToProducts(false);if ( $productsContainer.data('infiniteScroll') ) $productsContainer.infiniteScroll('destroy');let ajaxData = {w: filter.w,websiteID: filter.websiteID,filterCombinations: JSON.stringify(filter.filterCombinations),filterOptionsIDS: encodeURIComponent(filter.getFilterOptionsIDS()),pageNumber: 1,type: filter.type,uniquePageID: filter.uniquePageID,eCommerceSearch: filter.eCommerceSearch,pageHasSideMenu: true,tranW: websiteLanguageCountryFullCode};if ( $('#productsSorting').length > 0 ) {ajaxData.sortBy = $('#productsSorting').val();}
$.ajax({type: "GET",url: '/versions/2/wizard/modules/eCommerceCollections/front/eCommerceFilterProducts.php',data: ajaxData,success: function( data ) {data = tryParseJSON(data);if ( !data ) return;$productsContainer.empty();$productsContainer.append(data.productsHtml);eCommerceProductrBoxesEvents();$loader.parent().hide();$loader.hide();$productsContainer.fadeIn(200, function() {window.myLazyLoad.update();scrollToProducts(function() {if ( data.productsLeft > 0 ) {InfiniteScroll_init(filter.type,filter.uniquePageID,JSON.stringify(filter.filterCombinations),encodeURIComponent(filter.getFilterOptionsIDS()),true);}});});}});};this.getProductByFilterType = function( type, obj, products, searchIn ) {$.each(searchIn, function( key, product ) {var as = product.as;var productOptions = tryParseJSON(as.pop);var productAttributes = tryParseJSON(as.pa);if ( productOptions.active && ['color','list','checkbox','radio','size'].indexOf(type) != -1 ) {$.each(productOptions.options, function( key, po ) {if ( po.ty == type && type == 'color' ) {$.each(po.items, function( key, item ) {if ( obj.val == item.c && obj.parentUniqueID === po.id ) {if ( !containsObject(product,products) ) {products.push(product);}}});} else if ( po.ty == type ) {$.each(po.items, function( key, item ) {if ( obj.val == item.id && obj.parentUniqueID === po.id ) {if ( !containsObject(product,products) ) {products.push(product);}}});}});}
if ( productAttributes.active && type == 'attribute' ) {$.each(productAttributes.attributes, function( key, attr ) {$.each(attr.values, function( key, value ) {if ( obj.val == value.id && obj.parentUniqueID === attr.id ) {if ( !containsObject(product,products) ) {products.push(product);}}});});}
if ( type == 'brand' ) {var brand = as[type];if ( obj.val == brand ) {if ( !containsObject(product,products) ) {products.push(product);}}}
if ( type == 'ribbon' ) {var ribbon = as[type];if ( obj.val == ribbon ) {if ( !containsObject(product,products) ) {products.push(product);}}}
if ( type == 'price' ) {var price = parseFloat(as.price);if ( as.onSale === 'on' && $.isNumeric(as.salePrice) ) {price = parseFloat(as.salePrice);}
if ( price >= obj.min && price <= obj.max ) {if ( !containsObject(product,products) ) {products.push(product);}}}});return products;};this.getFilterBoxTemplate = function() {var html = '';html = '<div class="filter-options {{class}}" data-def-state="{{defState}}" style="order:{{place}};" data-type="{{type}}" data-id="{{id}}">';html += '<span class="filter-type-title">';html += '{{title}}';html += S123.s123IconToSvg.getHtml('plus','expand-filter plus-icon','');html += S123.s123IconToSvg.getHtml('minus','expand-filter minus-icon','');html += '</span>';html += '<div class="filter-option-content">';html += '{{content}}';html += '</div>';html += '</div>';return html;};this.addExpandBoxEvent = function() {filter.container.find('.filter-type-title').on('click', function() {filter.closeOpenBox($(this).find('.expand-filter'),200);});};this.closeOpenBox = function( $expandIcon, animationTime ) {var $box = $expandIcon.closest('.filter-options');var $content = $box.find('.filter-option-content');if ( $content.hasClass('expanded') ) {$box.removeClass('is-open');$content.slideUp(animationTime,function() {$content.removeClass('expanded');filter.saveBoxesStateToCookie();});} else {$box.addClass('is-open');$content.slideDown(animationTime,function() {$content.addClass('expanded');filter.saveBoxesStateToCookie();});}};this.getFilterCombinations = function() {if ( !filter.initialized ) return {};return filter.filterCombinations;};this.getFilterOptionsIDS = function() {if ( !filter.isActive ) return [];let optionsOnlyOneTime = {};let optionsMoreThenOneTime = [];filter.container.find('.filter-tags-container .tag').each(function( index, tag ) {let $tag = $(tag);if ( !$tag.data('poi-id') ) return;if ( $tag.data('type') == 'checkbox' ) {optionsMoreThenOneTime.push($tag.data('poi-id'));} else {optionsOnlyOneTime[$tag.data('type')] = $tag.data('poi-id');}});return [...Object.values(optionsOnlyOneTime),...optionsMoreThenOneTime].join(',');};function containsObject( obj, list ) {var x;for (x in list) {if (list.hasOwnProperty(x) && list[x] === obj) {return true;}}
return false;}
function tryParseJSON( str ) {try {var Obj = JSON.parse(str);if ( Obj && typeof Obj === "object" ) {return Obj;}} catch (e) {}
return false;}
function escapeHtml(text) {if (!text) return text;var map = {'&': '&amp;','<': '&lt;','>': '&gt;','"': '&quot;',"'": '&#039;',};return text.toString().replace(/[&<>"']/g, function(m) {return map[m];});}
function scrollToProducts( callback ) {let scrollHeaderSize = 0;let scrollTop = 0;if ( $('nav#mainNav').length > 0 ) {scrollHeaderSize = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--scrollHeaderSize').trim()) - 1;}
if ( filter.$scrollTo.length > 0 ) {scrollTop = filter.$scrollTo.offset().top - parseInt(scrollHeaderSize)}
$('html').stop().animate({scrollTop: scrollTop},600,function() {if ( callback ) callback.call(this);});}};
$( document ).on( "s123.page.ready", function( event ) {var rtl = $('html[dir=rtl]').length === 1;eCommerceProductBoxCarousel_init();eCommerceFilterTool.init(tryParseJSON($('.filter-object-data').val()));if ( !['xs','sm'].includes(findBootstrapEnvironment()) ) {$('.e-commerce-filter-parent').attr('data-style',$('.s123-module-eCommerce .side-menu').data('menu-style'));}
productsSorting.init({w: $('#w').val(),isRtl: rtl,websiteID: $('#websiteID').val(),uniquePageID: $('.products-container').data('unique-page-id'),type: $('.products-container').data('type'),pageHasSideMenu: $('.products-container').data('has-side-menu'),productsContainerSelector: '.products-container',$container: $('.e-commerce-sort-container'),$mobileContainer: $('.e-commerce-filter-parent'),$scrollTo: $('.s123-module-eCommerce')});InfiniteScroll_init($('[data-s123-pagination="true"]').data('type'),$('[data-s123-pagination="true"]').data('unique-page-id'),'','',$('[data-s123-pagination="true"]').data('has-side-menu'));(function() {function getCategoriesTree( $collections, parentState ) {var obj = {parent: {state: parentState},nodes: []}
$.each($collections, function( index, collection ) {var $collection = $(collection);if ( $collection.data('active') == '1' ) {obj.parent.state.expanded = true;obj.parent.state.selected = false;}
var collectionObj = {text: $collection.data('title'),href: $collection.data('href'),state: {selected: $collection.data('active') == '1',expanded: $collection.data('active') == '1'},nodes: []}
var $children = $collection.children().filter('.sub-collections').find('ul').first().children();if ( $children.length > 0 ) {var tree = getCategoriesTree($children,collectionObj.state);collectionObj.nodes = tree.nodes;collectionObj.state = tree.parent.state;if ( tree.parent.state.expanded ) obj.parent.state.expanded = true;} else {delete collectionObj.nodes;}
obj.nodes.push(collectionObj);});return obj;}
var tree = [];var defState = {selected: false,expanded: false}
$('.collections-container.nav').hide();$('.collection-tree-view').remove();var $collectionTreeView = $('<div class="collection-tree-view"></div>');$collectionTreeView.insertAfter($('.collections-container.nav'));var categoriesNodes = getCategoriesTree($('.collections-container.nav .sub-collections ul').first().children(),defState).nodes;$.each(categoriesNodes, function( index, collection ) {tree.push(collection);});$collectionTreeView.on('mousedown', function() {setTimeout(function() {treeview_AddPajaxSupport();},200);});$collectionTreeView.treeview({data: tree,levels: 3,expandIcon: 'fa fa-plus',collapseIcon: 'fa fa-minus',showBorder: false,backColor: '#428bca00',color: '#428bca',selectedColor: '#428bca',selectedBackColor: '#428bca00',highlightSelected: true,enableLinks: true})
.show();treeview_AddPajaxSupport();function treeview_AddPajaxSupport() {$collectionTreeView.find('ul li a').addClass('s123-fast-page-load');S123.Pjax.refresh();}})();homepageSectionsCarouselInit(rtl);$(window).off('resize.homepageSectionsCarouselInit').on('resize.homepageSectionsCarouselInit', function( event ) {clearTimeout(window.homepageSectionsCarouselInit_delay);window.homepageSectionsCarouselInit_delay = setTimeout( function() {homepageSectionsCarouselInit(rtl);},50);});$('.search-result-page-e-commerce #eCommerceSearch').off('keydown').on('keydown', function( event ) {if ( event.which === 13 && $(this).val().length === 0 ) event.preventDefault();});loadCollectionsCounters();CollectionsTitleFixText();});function CollectionsTitleFixText() {let $collections_boxes = $('.s123-module-eCommerce .collection-container .c-box-layout-5');if ( $collections_boxes.length === 0 ) return;$.each($collections_boxes, function( index, collections_box ) {let $collections_box = $(collections_box);site123FixText.itemFixText($collections_box.find('.title'),$collections_box.find('.title-container'),3);});}
function eCommerceProductrBoxesEvents() {$(document).trigger('s123.page.ready.data-model');$(document).trigger('s123.page.ready.activeOrderPopup');$(document).trigger('s123.page.ready.wish_list');$(document).trigger('s123.page.ready.wizard_preview_manage_helpers');eCommerceProductBoxCarousel_init();$(document).trigger('pageLoaded');}
function InfiniteScroll_init( type, uniquePageID, filterCombinations, filterOptionsIDS, pageHasSideMenu ) {var $container = $('[data-s123-pagination="true"]');var $loadingIcon = $container.parent().children('.s123-page-load-status');var paginationProductsLeft = $container.data('pagination-products-left');if ( $container.length === 0 ) return;if ( $loadingIcon.length === 0 ) {$container.parent().append('<div class="s123-page-load-status"><div class="s123-loader-ellips infinite-scroll-request"><span class="s123-loader-ellips__dot"></span><span class="s123-loader-ellips__dot"></span><span class="s123-loader-ellips__dot"></span><span class="s123-loader-ellips__dot"></span></div></div>');}
if ( parseInt(paginationProductsLeft) === 0 ) return;$container.infiniteScroll({append: false,responseType: 'text',scrollThreshold: 400,loadOnScroll: true,history: false,status: '.s123-page-load-status',path: function() {if ( this.loadCount < 2 ) this.loadCount = 2;var path = '/versions/2/wizard/modules/eCommerceCollections/front/eCommerceFilterProducts.php?w='+encodeURIComponent(w.value)+'&websiteID='+encodeURIComponent(websiteID.value)+'&pageNumber='+encodeURIComponent(this.loadCount)+'&filterCombinations='+encodeURIComponent(filterCombinations)+'&type='+encodeURIComponent(type)+'&uniquePageID='+encodeURIComponent(uniquePageID)+'&pageHasSideMenu='+encodeURIComponent(pageHasSideMenu)+'&tranW='+websiteLanguageCountryFullCode
+'&filterOptionsIDS='+filterOptionsIDS;if ( $('#productsSorting').length > 0 ) path += '&sortBy='+encodeURIComponent($('#productsSorting').val());if ( $('#eCommerceSearch').length > 0 ) path += '&eCommerceSearch='+encodeURIComponent($('#eCommerceSearch').val());return path;}})
.off('load.infiniteScroll').on('load.infiniteScroll', function( event, response ) {response = tryParseJSON(response);$container.infiniteScroll('appendItems',$(response.productsHtml));eCommerceProductrBoxesEvents();window.myLazyLoad.update();if ( response.productsLeft == 0 ) $container.infiniteScroll('destroy');});}
function eCommerceProductBoxCarousel_init() {var rtl = $('html[dir=rtl]').length === 1;$('.s123-module-eCommerce').each(function() {$(this).find('.product-box-carousel').each(function() {var $product_box_carousel = $(this);$product_box_carousel.owlCarousel({items: 1,center: true,nav: true,slideTransition: 'ease',dots: false,navSpeed: 500,mouseDrag: false,loop: true,rtl :rtl,navText:  [S123.s123IconToSvg.getHtml('angle-'+(rtl ? 'right' : 'left'),'fa-2x',''),S123.s123IconToSvg.getHtml('angle-'+(rtl ? 'left' : 'right'),'fa-2x','')],});$product_box_carousel.find('.owl-nav')
.off('click.owl_nav')
.on('click.owl_nav', function( event ) {var $this = $(this);var $target = $(event.target);if ( $target.is($this) ) {$product_box_carousel.find('.owl-item.active .product-image').get(0).click();}})
.css({ cursor: 'pointer' });});});}
var productsSorting = function() {var that = {};that.init = function( settings ) {if ( !settings ) return;if ( settings.$container.length == 0 ) return;if ( that.initialized ) return;that.$container = settings.$container;that.$mobileContainer = settings.$mobileContainer;that.$scrollTo = settings.$scrollTo;that.w = settings.w;that.isRtl = settings.isRtl;that.websiteID = settings.websiteID;that.uniquePageID = settings.uniquePageID;that.type =  settings.type;that.pageHasSideMenu =  settings.pageHasSideMenu;that.productsContainerSelector = settings.productsContainerSelector;that.$el = $(generateHtml());that.$container.html(that.$el);that.$productsSorting = that.$el.find('#productsSorting');that.$mobileIcon = that.$el.find('.mobile-icon');that.$productsSorting.on('change.sort_products', function() {sortChange();});mobileResponsiveHandler();adaptToScreenSize();that.initialized = true;$(document).one('s123.pjax.send.productsSorting',function() {destroy();});};function destroy() {that.$productsSorting.off('change.sort_products');$(window).off('resize.eCommerceSortByMobileFilter');that.initialized = false;}
function sortChange() {var $productsContainer = $(that.productsContainerSelector);var $loader = $productsContainer.parent().find('.s123-loader-ellips');$loader.parent().show();$loader.show();$productsContainer.fadeOut(200);if ( $productsContainer.data('infiniteScroll') ) $productsContainer.infiniteScroll('destroy');$.ajax({type: "GET",url: '/versions/2/wizard/modules/eCommerceCollections/front/eCommerceFilterProducts.php',data: {w: that.w,websiteID: that.websiteID,filterCombinations: JSON.stringify(eCommerceFilterTool.getFilterCombinations()),filterOptionsIDS: encodeURIComponent(eCommerceFilterTool.getFilterOptionsIDS()),pageNumber: 1,type: that.type,uniquePageID: that.uniquePageID,eCommerceSearch: $('#eCommerceSearch').length > 0 ? $('#eCommerceSearch').val() : '',sortBy: that.$productsSorting.val(),pageHasSideMenu: that.pageHasSideMenu,tranW: websiteLanguageCountryFullCode},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;$productsContainer.empty();$productsContainer.append(data.productsHtml);eCommerceProductrBoxesEvents();$loader.parent().hide();$loader.hide();$productsContainer.fadeIn(200, function() {window.myLazyLoad.update();$('html').stop().animate({scrollTop: that.$scrollTo.offset().top},600,function() {if ( data.productsLeft > 0 ) {InfiniteScroll_init(that.type,that.uniquePageID,JSON.stringify(eCommerceFilterTool.getFilterCombinations()),encodeURIComponent(eCommerceFilterTool.getFilterOptionsIDS()),that.pageHasSideMenu);}});});}});}
function generateHtml() {var html = '';html += '<div class="p-s-c" style="position: relative;">';html += '<span class="mobile-icon">';html += S123.s123IconToSvg.getHtml('sort-amount-asc','','');html += '</span>';html += '<select id="productsSorting" class="form-control">';html += '<option selected disabled hidden>' + translations.eCommerceSort.sortBy + '</option>';html += '<option value="recommended">' + translations.eCommerceSort.recommended + '</option>';html += '<option value="byHighPrice">' + translations.eCommerceSort.byHighPrice + '</option>';html += '<option value="byLowerPriceBy">' + translations.eCommerceSort.byLowerPriceBy + '</option>';html += '</select>';html += '</div>';return html;}
function mobileResponsiveHandler() {$(window).one('resize.eCommerceSortByMobileFilter', function( event ) {adaptToScreenSize();setTimeout( function() {mobileResponsiveHandler();},500);});}
function adaptToScreenSize() {var widthIncludingScrollbar = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;if ( widthIncludingScrollbar > 991 ) {that.$container.append(that.$el);that.$el.css({display: ''});that.$el.find('select').css({opacity: '',position: '',left: '',right: ''});that.$mobileIcon.hide();that.$container.show();} else {that.$mobileContainer.append(that.$el);that.$el.css({display: 'inline-flex'});that.$el.find('select').css({opacity: 0,position: 'absolute'});if ( that.isRtl ) {that.$el.find('select').css({right: 0});} else {that.$el.find('select').css({left: 0});}
that.$mobileIcon.show();that.$container.hide();}};return that;}();function loadCollectionsCounters() {var $counters = $('.collection-container.e-commerce-items .count');if ( $counters.hasClass('counters-loaded') ) return;if ( $counters.length > 0 ) {var colelctionBoxes = [];var uniqueIDS = [];var moduleTypeNUM = $('.s123-module-eCommerce').data('module-type-num');if ( moduleTypeNUM == 112 || IsEcommerceHighlight(moduleTypeNUM) ) moduleTypeNUM = 113;$counters.each(function(index, coutner) {var $coutner = $(coutner);var $colelctionBox = $coutner.closest('.e-c-box');var uniqueID = $colelctionBox.data('unique-id');if ( $.isNumeric(uniqueID) ) {uniqueID = uniqueID.toString();}
colelctionBoxes.push($colelctionBox);if ( uniqueIDS.indexOf(uniqueID) == -1 ) {uniqueIDS.push(uniqueID);}});$.ajax({type: "POST",url: '/versions/'+$(versionNUM).val()+'/wizard/modules/eCommerceCollections/front/getRelatedProductsAmount.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),uniqueIDS: JSON.stringify(uniqueIDS),uniquePageID: $('#section-112 .collection-container').data('unique-page-id'),moduleTypeNUM: moduleTypeNUM},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;if ( !data.success ) return;$.each(colelctionBoxes, function(index, $colelctionBox) {var uniqueID = $colelctionBox.data('unique-id');$colelctionBox.find('.count-amount').text(data.items[uniqueID]);$colelctionBox.addClass('show-counter');});$counters.addClass('counters-loaded');}});}}
function homepageSectionsCarouselInit( rtl ) {var $homepageSections = $('.s123-module-eCommerce .homepage-section');$.each($homepageSections, function( index, section ) {var $section = $(section);var $sectionItemsContainer = $section.find('.e-commerce-items');var sectionData = tryParseJSON($section.find('.section-data').val());var sectionID = sectionData.id;var sectionStyle = sectionData.style;if ( sectionStyle == 2 ) carousel_init();if ( $section.hasClass('highlight-carousel') ) {sectionID = $section.closest('.s123-module-eCommerce').get(0).id;carousel_init();}
function carousel_init() {if ( $sectionItemsContainer.hasClass('slick-initialized') ) {$sectionItemsContainer.css('visibility','none');$sectionItemsContainer.slick('unslick');$sectionItemsContainer.parent().find('.custom-arrow-container').remove();}
var $prevArrow = $('<div class="custom-arrow-container custom-slick-prev-container"><a href="javascript:void(0);" class="related-p-c-s-p slick-arrow" data-section-id="'+sectionID+'">'+S123.s123IconToSvg.getHtml('chevron-circle-up','','')+'</a></div>');var $nextArrow = $('<div class="custom-arrow-container custom-slick-next-container"><a href="javascript:void(0);" class="related-p-c-s-n slick-arrow"  data-section-id="'+sectionID+'">'+S123.s123IconToSvg.getHtml('chevron-circle-down','','')+'</a></div>');$sectionItemsContainer.css({ display: 'grid' });var slidesToShow = findBootstrapColPerRow($sectionItemsContainer);if ( slidesToShow == 0 ) slidesToShow = 1;if ( $sectionItemsContainer.children().length <= slidesToShow ) return;$sectionItemsContainer.children().each(function() {$(this).width($(this).width());});$sectionItemsContainer.css({ display: 'flex' });$sectionItemsContainer.parent().prepend($prevArrow);$sectionItemsContainer.parent().append($nextArrow);$sectionItemsContainer.parent().addClass('homepage-section-container');$sectionItemsContainer.slick({dots: false,infinite: true,vertical: false,verticalSwiping: false,slidesToShow: slidesToShow,slidesToScroll: 1,adaptiveHeight: true,swipeToSlide: true,rtl: rtl,prevArrow: '.related-p-c-s-p[data-section-id="'+sectionID+'"]',nextArrow: '.related-p-c-s-n[data-section-id="'+sectionID+'"]'});$sectionItemsContainer.on('init', function(event) {$sectionItemsContainer.css('visibility','');});}});}
