!function(t,e){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){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,n){var o,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,n);o=void 0===o?l:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}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=o.call(arguments,1);return u(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(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||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),n+=r?0:1,o=i[n]}return this}},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=-1==t.indexOf("%")&&!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;h>e;e++){var i=u[e];t[i]=0}return t}function n(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 o(){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 o=n(e);s.isBoxSizeOuter=r=200==t(o.width),i.removeChild(e)}}function s(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=n(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;h>l;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=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 n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();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&&"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);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;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,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),s=0;s<i.length;s++)o.push(i[s])}}),o},i.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,s=this;this[o]=setTimeout(function(){n.apply(s,e),delete s[o]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?t():document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),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(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,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 n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(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=n.prototype=Object.create(t.prototype);d.constructor=n,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 n=h[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],s=this.layout.size,r=-1!=n.indexOf("%")?parseFloat(n)/100*s.width:parseInt(n,10),a=-1!=o.indexOf("%")?parseFloat(o)/100*s.height:parseInt(o,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"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[o];e[s]=this.getXValue(a),e[r]="";var u=n?"paddingTop":"paddingBottom",h=n?"top":"bottom",d=n?"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,n=this.position.y,o=parseInt(t,10),s=parseInt(e,10),r=o===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-n,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"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?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 n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(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,n=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}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:""})},n}),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,n,o,s){return e(t,i,n,o,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,n,o){"use strict";function s(t,e){var i=n.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=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,f[o]=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],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=o,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;n.extend(c,e.prototype),c.option=function(t){n.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),n.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,n=[],o=0;o<e.length;o++){var s=e[o],r=new i(s,this);n.push(r)}return n},c._filterFindItemElements=function(t){return n.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 n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):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 n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},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,n,o){n?t.goTo(e,i):(t.stagger(o*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(){o.dispatchEvent(t+"Complete",null,[e])}function n(){r++,r==s&&i()}var o=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,n)})},c.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),h)if(this.$element=this.$element||h(this.element),e){var o=h.Event(e);o.type=t,this.$element.trigger(o,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){n.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},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(),n=this._boundingRect,o=i(t),s={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return s},c.handleEvent=n.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()},n.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=n.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(),n.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=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=n.extend({},s.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(o),n.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=o,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope/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),n=i._create;i._create=function(){this.id=this.layout.itemGUID++,n.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 n=e[i];this.sortData[i]=n(this.element,this)}}};var o=i.destroy;return i.destroy=function(){o.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/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 n=i.prototype,o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return o.forEach(function(t){n[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),n.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},n._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},n.getColumnWidth=function(){this.getSegmentSize("column","Width")},n.getRowHeight=function(){this.getSegmentSize("row","Height")},n.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;if(this._getMeasurement(i,n),!this[i]){var o=this.getFirstItemSize();this[i]=o&&o[n]||this.isotope.size["inner"+e]}},n.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},n.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},n.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=Object.create(n),o.prototype.constructor=o,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry/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");return i.compatOptions.fitWidth="isFitWidth",i.prototype._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},i.prototype.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 n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,s=o/n,r=n-o%n,a=r&&1>r?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},i.prototype.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),s=Math.min.apply(Math,o),r=o.indexOf(s),a={x:this.columnWidth*r,y:s},u=s+t.size.outerHeight,h=this.cols+1-o.length,d=0;h>d;d++)this.colYs[r+d]=u;return a},i.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},i.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),s=o?n.left:n.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?n.top:n.bottom)+i.outerHeight,l=a;u>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},i.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/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"),n=i.prototype,o={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)o[s]||(n[s]=e.prototype[s]);var r=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=n._getOption;return n._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/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 n={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,n},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/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/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(i,n,o,s,r,a){return e(t,i,n,o,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/js/item"),require("isotope/js/layout-mode"),require("isotope/js/layout-modes/masonry"),require("isotope/js/layout-modes/fit-rows"),require("isotope/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,n,o,s,r){function a(t,e){return function(i,n){for(var o=0;o<t.length;o++){var s=t[o],r=i.sortData[s],a=n.sortData[s];if(r>a||a>r){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 n=t[i];n.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?o.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&&n&&o.dispatchEvent("arrangeComplete",null,[o.filteredItems])}var e,i,n,o=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){n=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],n=[],o=[],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?n.push(a):u||a.isHidden||o.push(a)}}return{matches:i,needReveal:n,needHide:o}},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 n(e.element,t)}},l.updateSortData=function(t){var e;t?(t=o.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&&e>i;i++){var n=t[i];n.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),n=i[0],o=n.match(/^\[(.+)\]$/),s=o&&o[1],r=e(s,n),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(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=a(e,this.options.sortAscending);this.filteredItems.sort(i),t!=this.sortHistory[0]&&this.sortHistory.unshift(t)}},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,n,o=e.length;for(i=0;o>i;i++)n=e[i],this.element.appendChild(n.element);var s=this._filter(e).matches;for(i=0;o>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;o>i;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=o.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,n=0;i&&i>n;n++){var s=e[n];o.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 n=t.apply(this,e);return this.options.transitionDuration=i,n},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
(function(e,t,n){"use strict";t.infinitescroll=function(n,r,i){this.element=t(i);if(!this._create(n,r)){this.failed=true}};t.infinitescroll.defaults={loading:{finished:n,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:"data:image/gif;base64,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",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:n},state:{isDuringAjax:false,isInvalidPage:false,isDestroyed:false,isDone:false,isPaused:false,isBeyondMaxPage:false,currPage:1},debug:false,behavior:n,binder:t(e),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:false,pathParse:n,dataType:"html",appendCallback:true,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:n,path:n,prefill:false,maxPage:n};t.infinitescroll.prototype={_binding:function(t){var r=this,i=r.options;i.v="2.0b2.120520";if(!!i.behavior&&this["_binding_"+i.behavior]!==n){this["_binding_"+i.behavior].call(this);return}if(t!=="bind"&&t!=="unbind"){this._debug("Binding value  "+t+" not valid");return false}if(t==="unbind"){this.options.binder.unbind("smartscroll.infscr."+r.options.infid)}else{this.options.binder[t]("smartscroll.infscr."+r.options.infid,function(){r.scroll()})}this._debug("Binding",t)},_create:function(i,s){var o=t.extend(true,{},t.infinitescroll.defaults,i);this.options=o;var u=t(e);var a=this;if(!a._validate(i)){return false}var f=t(o.nextSelector).attr("href");if(!f){this._debug("Navigation selector not found");return false}o.path=o.path||this._determinepath(f);o.contentSelector=o.contentSelector||this.element;o.loading.selector=o.loading.selector||o.contentSelector;o.loading.msg=o.loading.msg||t('<div id="infscr-loading"><div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div><div class="text">'+o.loading.msgText+"</div></div>");(new Image).src=o.loading.img;if(o.pixelsFromNavToBottom===n){o.pixelsFromNavToBottom=t(document).height()-t(o.navSelector).offset().top;this._debug("pixelsFromNavToBottom: "+o.pixelsFromNavToBottom)}var l=this;o.loading.start=o.loading.start||function(){t(o.navSelector).hide();o.loading.msg.appendTo(o.loading.selector).fadeIn(o.loading.speed,t.proxy(function(){this.beginAjax(o)},l))};o.loading.finished=o.loading.finished||function(){if(!o.state.isBeyondMaxPage)o.loading.msg.fadeOut(o.loading.speed)};o.callback=function(e,r,i){if(!!o.behavior&&e["_callback_"+o.behavior]!==n){e["_callback_"+o.behavior].call(t(o.contentSelector)[0],r,i)}if(s){s.call(t(o.contentSelector)[0],r,o,i)}if(o.prefill){u.bind("resize.infinite-scroll",e._prefill)}};if(i.debug){if(Function.prototype.bind&&(typeof console==="object"||typeof console==="function")&&typeof console.log==="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.call(console[e],console)},Function.prototype.bind)}}this._setup();if(o.prefill){this._prefill()}return true},_prefill:function(){function s(){return r.options.contentSelector.height()<=i.height()}var r=this;var i=t(e);this._prefill=function(){if(s()){r.scroll()}i.bind("resize.infinite-scroll",function(){if(s()){i.unbind("resize.infinite-scroll");r.scroll()}})};this._prefill()},_debug:function(){if(true!==this.options.debug){return}if(typeof console!=="undefined"&&typeof console.log==="function"){if(Array.prototype.slice.call(arguments).length===1&&typeof Array.prototype.slice.call(arguments)[0]==="string"){console.log(Array.prototype.slice.call(arguments).toString())}else{console.log(Array.prototype.slice.call(arguments))}}else if(!Function.prototype.bind&&typeof console!=="undefined"&&typeof console.log==="object"){Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments))}},_determinepath:function(t){var r=this.options;if(!!r.behavior&&this["_determinepath_"+r.behavior]!==n){return this["_determinepath_"+r.behavior].call(this,t)}if(!!r.pathParse){this._debug("pathParse manual");return r.pathParse(t,this.options.state.currPage+1)}else if(t.match(/^(.*?)\b2\b(.*?$)/)){t=t.match(/^(.*?)\b2\b(.*?$)/).slice(1)}else if(t.match(/^(.*?)2(.*?$)/)){if(t.match(/^(.*?page=)2(\/.*|$)/)){t=t.match(/^(.*?page=)2(\/.*|$)/).slice(1);return t}t=t.match(/^(.*?)2(.*?$)/).slice(1)}else{if(t.match(/^(.*?page=)1(\/.*|$)/)){t=t.match(/^(.*?page=)1(\/.*|$)/).slice(1);return t}else{this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");r.state.isInvalidPage=true}}this._debug("determinePath",t);return t},_error:function(t){var r=this.options;if(!!r.behavior&&this["_error_"+r.behavior]!==n){this["_error_"+r.behavior].call(this,t);return}if(t!=="destroy"&&t!=="end"){t="unknown"}this._debug("Error",t);if(t==="end"||r.state.isBeyondMaxPage){this._showdonemsg()}r.state.isDone=true;r.state.currPage=1;r.state.isPaused=false;r.state.isBeyondMaxPage=false;this._binding("unbind")},_loadcallback:function(i,s,o){var u=this.options,a=this.options.callback,f=u.state.isDone?"done":!u.appendCallback?"no-append":"append",l;if(!!u.behavior&&this["_loadcallback_"+u.behavior]!==n){this["_loadcallback_"+u.behavior].call(this,i,s);return}switch(f){case"done":this._showdonemsg();return false;case"no-append":if(u.dataType==="html"){s="<div>"+s+"</div>";s=t(s).find(u.itemSelector)}break;case"append":var c=i.children();if(c.length===0){return this._error("end")}l=document.createDocumentFragment();while(i[0].firstChild){l.appendChild(i[0].firstChild)}this._debug("contentSelector",t(u.contentSelector)[0]);t(u.contentSelector)[0].appendChild(l);s=c.get();break}u.loading.finished.call(t(u.contentSelector)[0],u);if(u.animate){var h=t(e).scrollTop()+t(u.loading.msg).height()+u.extraScrollPx+"px";t("html,body").animate({scrollTop:h},800,function(){u.state.isDuringAjax=false})}if(!u.animate){u.state.isDuringAjax=false}a(this,s,o);if(u.prefill){this._prefill()}},_nearbottom:function(){var i=this.options,s=0+t(document).height()-i.binder.scrollTop()-t(e).height();if(!!i.behavior&&this["_nearbottom_"+i.behavior]!==n){return this["_nearbottom_"+i.behavior].call(this)}this._debug("math:",s,i.pixelsFromNavToBottom);return s-i.bufferPx<i.pixelsFromNavToBottom},_pausing:function(t){var r=this.options;if(!!r.behavior&&this["_pausing_"+r.behavior]!==n){this["_pausing_"+r.behavior].call(this,t);return}if(t!=="pause"&&t!=="resume"&&t!==null){this._debug("Invalid argument. Toggling pause value instead")}t=t&&(t==="pause"||t==="resume")?t:"toggle";switch(t){case"pause":r.state.isPaused=true;break;case"resume":r.state.isPaused=false;break;case"toggle":r.state.isPaused=!r.state.isPaused;break}this._debug("Paused",r.state.isPaused);return false},_setup:function(){var t=this.options;if(!!t.behavior&&this["_setup_"+t.behavior]!==n){this["_setup_"+t.behavior].call(this);return}this._binding("bind");return false},_showdonemsg:function(){var r=this.options;if(!!r.behavior&&this["_showdonemsg_"+r.behavior]!==n){this["_showdonemsg_"+r.behavior].call(this);return}r.loading.msg.find(".spinner").animate({'opacity': 0},500).parent().find("div.text").addClass('all-loaded').html(r.loading.finishedMsg).animate({opacity:0.8},2e3,function(){t(this).parent().fadeOut(r.loading.speed)});r.errorCallback.call(t(r.contentSelector)[0],"done")},_validate:function(n){for(var r in n){if(r.indexOf&&r.indexOf("Selector")>-1&&t(n[r]).length===0){this._debug("Your "+r+" found no elements.");return false}}return true},bind:function(){this._binding("bind")},destroy:function(){this.options.state.isDestroyed=true;this.options.loading.finished();return this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(r){var i=this,s=r.path,o,u,a,f;r.state.currPage++;if(r.maxPage!=n&&r.state.currPage>r.maxPage){r.state.isBeyondMaxPage=true;this.destroy();return}o=t(r.contentSelector).is("table, tbody")?t("<tbody/>"):t("<div/>");u=typeof s==="function"?s(r.state.currPage):s.join(r.state.currPage);i._debug("heading into ajax",u);a=r.dataType==="html"||r.dataType==="json"?r.dataType:"html+callback";if(r.appendCallback&&r.dataType==="html"){a+="+callback"}switch(a){case"html+callback":i._debug("Using HTML via .load() method");o.load(u+" "+r.itemSelector,n,function(t){i._loadcallback(o,t,u)});break;case"html":i._debug("Using "+a.toUpperCase()+" via $.ajax() method");t.ajax({url:u,dataType:r.dataType,complete:function(t,n){f=typeof t.isResolved!=="undefined"?t.isResolved():n==="success"||n==="notmodified";if(f){i._loadcallback(o,t.responseText,u)}else{i._error("end")}}});break;case"json":i._debug("Using "+a.toUpperCase()+" via $.ajax() method");t.ajax({dataType:"json",type:"GET",url:u,success:function(e,t,s){f=typeof s.isResolved!=="undefined"?s.isResolved():t==="success"||t==="notmodified";if(r.appendCallback){if(r.template!==n){var a=r.template(e);o.append(a);if(f){i._loadcallback(o,a)}else{i._error("end")}}else{i._debug("template must be defined.");i._error("end")}}else{if(f){i._loadcallback(o,e,u)}else{i._error("end")}}},error:function(){i._debug("JSON ajax request failed.");i._error("end")}});break}},retrieve:function(r){r=r||null;var i=this,s=i.options;if(!!s.behavior&&this["retrieve_"+s.behavior]!==n){this["retrieve_"+s.behavior].call(this,r);return}if(s.state.isDestroyed){this._debug("Instance is destroyed");return false}s.state.isDuringAjax=true;s.loading.start.call(t(s.contentSelector)[0],s)},scroll:function(){var t=this.options,r=t.state;if(!!t.behavior&&this["scroll_"+t.behavior]!==n){this["scroll_"+t.behavior].call(this);return}if(r.isDuringAjax||r.isInvalidPage||r.isDone||r.isDestroyed||r.isPaused){return}if(!this._nearbottom()){return}this.retrieve()},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(n){if(t.isPlainObject(n)){this.options=t.extend(true,this.options,n)}}};t.fn.infinitescroll=function(n,r){var i=typeof n;switch(i){case"string":var s=Array.prototype.slice.call(arguments,1);this.each(function(){var e=t.data(this,"infinitescroll");if(!e){return false}if(!t.isFunction(e[n])||n.charAt(0)==="_"){return false}e[n].apply(e,s)});break;case"object":this.each(function(){var e=t.data(this,"infinitescroll");if(e){e.update(n)}else{e=new t.infinitescroll(n,r,this);if(!e.failed){t.data(this,"infinitescroll",e)}}});break}return this};var r=t.event,i;r.special.smartscroll={setup:function(){t(this).bind("scroll",r.special.smartscroll.handler)},teardown:function(){t(this).unbind("scroll",r.special.smartscroll.handler)},handler:function(e,n){var r=this,s=arguments;e.type="smartscroll";if(i){clearTimeout(i)}i=setTimeout(function(){t(r).trigger("smartscroll",s)},n==="execAsap"?0:100)}};t.fn.smartscroll=function(e){return e?this.bind("smartscroll",e):this.trigger("smartscroll",["execAsap"])}})(window,jQuery);
var SWIFT=SWIFT||{};
(function(){
"use strict";
SWIFT.page={
init: function (){
SWIFT.page.browserCheck();
if(jQuery('body').hasClass('header-below-slider')&&jQuery('.home-slider-wrap').length > 0){
SWIFT.page.headerSlider();
}
if(jQuery('#one-page-nav').length > 0){
SWIFT.page.onePageNav();
}
if(jQuery('#back-to-top').length > 0){
$window.scroll(function(){
SWIFT.page.backToTop();
});
}
SWIFT.page.expandingAssets();
if(jQuery('.recent-posts').length > 0){
SWIFT.recentPosts.init();
}
SWIFT.page.moveModals();
jQuery('a[data-toggle="modal"]').on('click', function(){
setTimeout(function(){
SWIFT.map.init();
}, 300);
return true;
});
SWIFT.page.modalClose();
if(body.hasClass('single-post')){
var replyTitle=jQuery('#respond').find('h3');
var originalText=jQuery('#respond').find('h3').html();
replyTitle.addClass('spb-heading');
replyTitle.html('<span>'+originalText+'</span>');
}
SWIFT.page.smoothScrollLinks();
if(!isMobileAlt&&jQuery('.sticky-details').length > 0){
SWIFT.portfolio.stickyDetails();
}
jQuery('.activity-time-since,.bp-secondary-action').on('click', function(e){
e.preventDefault();
jQuery('.viewer').css('display', 'none');
window.location=jQuery(this).attr('href');
});
jQuery('.love-it').on('click', function(){
SWIFT.page.loveIt(jQuery(this));
return false;
});
SWIFT.page.articleShare();
if(body.hasClass('article-swipe')&&body.hasClass('single-post')&&jQuery('.post-pagination-wrap').length > 0){
SWIFT.page.articleNavigation();
}
if(jQuery('article').hasClass('single-post-fw-media-title')){
SWIFT.page.postMediaTitle();
}
if(jQuery('.related-items').length > 0){
SWIFT.relatedPosts.init();
}
SWIFT.page.lightbox();
if(body.hasClass('page-transitions')){
SWIFT.page.pageTransitions();
}
SWIFT.page.directorySubmit();
},
load: function(){
if(jQuery('.fancy-heading').length > 0){
SWIFT.page.fancyHeading();
}
if(!isMobileAlt&&sfIncluded.hasClass('stickysidebars')&&jQuery('.sidebar').length > 0){
SWIFT.page.stickyWidget();
}
setTimeout(function(){
var urlHash=document.location.toString();
if(urlHash.match('#')){
var hash=urlHash.split('#')[1];
if(jQuery('#' + hash).length > 0){
SWIFT.page.onePageNavGoTo('#' + hash);
}}
}, 1200);
},
browserCheck: function(){
jQuery.browser={};
jQuery.browser.mozilla=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.webkit=/webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.opera=/opera/.test(navigator.userAgent.toLowerCase());
jQuery.browser.msie=/msie/.test(navigator.userAgent.toLowerCase());
jQuery.browser.msieMobile10=/iemobile\/10\.0/.test(navigator.userAgent.toLowerCase());
if(isMobileAlt){
body.addClass("mobile-browser");
}else{
body.addClass("standard-browser");
}
if(isIEMobile){
body.addClass("ie-mobile");
}
if(isAppleDevice){
body.addClass("apple-mobile-browser");
}
if(body.hasClass("woocommerce-page")&&!body.hasClass("woocommerce")){
body.addClass("woocommerce");
}
if(IEVersion&&IEVersion < 9){
body.addClass('browser-ie');
}
var pattern=/MSIE\s([\d]+)/,
ua=navigator.userAgent,
matched=ua.match(pattern);
if(matched){
body.addClass('browser-ie10');
}
if(!!navigator.userAgent.match(/Trident.*rv\:11\./)){
body.addClass('browser-ie11');
}
if(jQuery.browser.mozilla){
body.addClass('browser-ff');
}
if(navigator.userAgent.search("Safari") >=0&&navigator.userAgent.search("Chrome") < 0){
body.addClass('browser-safari');
}},
resizeVideos: function(){
},
resizeHeadings: function(){
var h1FontSize=jQuery('h1:not(.logo-h1)').css('font-size'),
h2FontSize=jQuery('h2:not(.caption-title)').css('font-size');
SWIFT.page.resizeHeadingsResize(h1FontSize, h2FontSize);
$window.smartresize(function(){
SWIFT.page.resizeHeadingsResize(h1FontSize, h2FontSize);
});
},
resizeHeadingsResize: function(h1FontSize, h2FontSize){
if($window.width() <=768){
if(h1FontSize){
h1FontSize=h1FontSize.replace("px", "");
var h1FontSizeMin=Math.floor(h1FontSize * 0.6);
jQuery('h1:not(.logo-h1)').fitText(1, { minFontSize: h1FontSizeMin + 'px', maxFontSize: h1FontSize +'px' }).css('line-height', '120%');
}
if(h2FontSize){
h2FontSize=h2FontSize.replace("px", "");
var h2FontSizeMin=Math.floor(h2FontSize * 0.6);
jQuery('h2:not(.caption-title)').fitText(1, { minFontSize: h2FontSizeMin + 'px', maxFontSize: h2FontSize +'px' }).css('line-height', '120%');
}}else{
jQuery('h1:not(.logo-h1)').css('font-size', '').css('line-height', '');
jQuery('h2:not(.caption-title)').css('font-size', '').css('line-height', '');
}},
loveIt: function($this){
var locale=jQuery('#loveit-locale'),
post_id=$this.data('post-id'),
user_id=$this.data('user-id'),
action='love_it';
if($this.hasClass('loved')){
action='unlove_it';
}
if(locale.data('loggedin')=='false'&&jQuery.cookie('loved-' + post_id)){
action='unlove_it';
}
var data={
action: action,
item_id: post_id,
user_id: user_id,
love_it_nonce: locale.data('nonce')
};
jQuery.post(locale.data('ajaxurl'), data, function(response){
var ajaxResponse=jQuery.trim(response),
count_wrap,
count;
if(ajaxResponse=='loved'){
$this.addClass('loved');
count_wrap=$this.find('data.count');
count=count_wrap.text();
count_wrap.text(parseInt(count) + 1);
if(locale.data('loggedin')=='false'){
jQuery.cookie('loved-' + post_id, 'yes', { expires: 1 });
}}else if(ajaxResponse=='unloved'){
$this.removeClass('loved');
count_wrap=$this.find('data.count');
count=count_wrap.text();
count_wrap.text(parseInt(count) - 1);
if(locale.data('loggedin')=='false'){
jQuery.cookie('loved-' + post_id, 'no', { expires: 1 });
}}else{
alert(locale.data('error'));
}});
},
expandingAssets: function(){
jQuery('.spb-row-expand-text').on('click', '', function(e){
e.preventDefault();
var expand=jQuery(this),
expandRow=expand.next();
if(expandRow.hasClass('spb-row-expanding-open')&&!expandRow.hasClass('spb-row-expanding-active')){
expandRow.addClass('spb-row-expanding-open').addClass('spb-row-expanding-active').slideUp(800);
setTimeout(function(){
expand.removeClass('row-open').find('span').text(expand.data('closed-text'));
expandRow.css('display', 'block').removeClass('spb-row-expanding-open').removeClass('spb-row-expanding-active');
}, 800);
}else if(!expandRow.hasClass('spb-row-expanding-active')){
expand.addClass('row-open').find('span').text(expand.data('open-text'));
expandRow.css('display', 'none').addClass('spb-row-expanding-open').addClass('spb-row-expanding-active').slideDown(800);
setTimeout(function(){
expandRow.removeClass('spb-row-expanding-active');
}, 800);
}});
},
headerSlider: function(){
jQuery('#site-loading').css('display', 'block');
var sliderHeight=0;
if(jQuery('.home-slider-wrap').find('.rev_slider_wrapper').length > 0){
sliderHeight=jQuery('.home-slider-wrap').find('.rev_slider_wrapper').height();
}else{
sliderHeight=jQuery('.home-slider-wrap').height();
}
jQuery('.home-slider-wrap').css('position', 'fixed').css('height', sliderHeight);
jQuery('#container').css('top', sliderHeight);
setTimeout(function(){
jQuery('#site-loading').fadeOut(1000);
}, 250);
$window.smartresize(function(){
jQuery('#container').css('top', jQuery('.home-slider-wrap').height());
});
jQuery('a#slider-continue').on('click', function(e){
e.preventDefault();
jQuery('html, body').stop().animate({
scrollTop: jQuery('#container').css('top')
}, 1500, 'easeInOutExpo');
});
},
fancyHeading: function(){
var fancyHeading=jQuery('.fancy-heading'),
fancyHeadingText=fancyHeading.find('.heading-text'),
fancyHeadingTextHeight=fancyHeadingText.height(),
fancyHeadingHeight=parseInt(fancyHeading.data('height'), 10),
header=jQuery('.header-wrap'),
headerHeight=0;
if(body.hasClass('header-naked-light')||body.hasClass('header-naked-dark')){
headerHeight=header.height();
}
if(!fancyHeadingHeight){
fancyHeadingHeight=400;
}
if(fancyHeadingTextHeight > fancyHeadingHeight){
fancyHeadingHeight=fancyHeadingTextHeight + 80;
}
fancyHeadingHeight=fancyHeadingHeight + headerHeight;
fancyHeadingText.vCenterTop();
setTimeout(function(){
fancyHeading.css({
'height': fancyHeadingHeight + 'px',
'opacity': 1
});
}, 400);
setTimeout(function(){
fancyHeadingText.css('opacity', 1);
}, 800);
setTimeout(function(){
fancyHeading.addClass('animated');
}, 1400);
if(parallaxScroll&&!isMobileAlt){
$window.scroll(function(){
var scrollTop=$window.scrollTop(),
headingOffset=0;
if(jQuery('.sticky-header').length > 0){
headingOffset=jQuery('#header-section').height();
}
if(jQuery('#top-bar').length > 0){
headingOffset=headingOffset + jQuery('#top-bar').height();
}
if(jQuery('#wpadminbar').length > 0){
headingOffset=headingOffset + 32;
}
scrollTop=scrollTop - headingOffset;
if(scrollTop < jQuery(document).height() - $window.height()){
if(scrollTop < 0){
scrollTop=0;
}
fancyHeading.stop(true,true).transition({
top: scrollTop / 1.8
}, 0);
fancyHeadingText.stop(true,true).transition({
opacity: 1 - scrollTop / 420
}, 0);
}});
}},
moveModals: function(){
jQuery(".modal").each(function(){
jQuery(this).appendTo("body");
});
},
modalClose: function(){
jQuery(".modal-backdrop, .modal .close, .modal .btn").on("click", function(){
jQuery(".modal iframe").each(function(){
var thisModal=jQuery(this);
thisModal.attr("src", thisModal.attr("src"));
});
});
},
smoothScrollLinks: function(){
body.on('click', '.smooth-scroll-link', function(e){
var linkHref=jQuery(this).attr('href'),
linkOffset=jQuery(this).data('offset') ? jQuery(this).data('offset'):0;
if(linkHref&&linkHref.indexOf('#')===0){
var headerHeight=0;
if(jQuery('.sticky-header').length > 0){
headerHeight=jQuery('.sticky-header').height() > 0 ? jQuery('.sticky-header').height():jQuery('#header-section').height();
}
if(jQuery('#wpadminbar').length > 0){
headerHeight=headerHeight + 32;
}
if(jQuery('.sticky-top-bar').length > 0){
headerHeight=headerHeight + jQuery('.sticky-top-bar').height() > 0 ? jQuery('.sticky-top-bar').height():jQuery('#top-bar').height();
}
if(isMobile||isMobileAlt){
if(jQuery('.sticky-top-bar').length > 0){
headerHeight=headerHeight - jQuery('.sticky-top-bar').height() > 0 ? jQuery('.sticky-top-bar').height():jQuery('#top-bar').height();
}
if(jQuery('#mobile-header').length > 0){
headerHeight=headerHeight - jQuery('#mobile-header').height();
}
if(jQuery('#wpadminbar').length > 0){
headerHeight=headerHeight - 46;
}
headerHeight=headerHeight - 24;
}
SWIFT.isScrolling=true;
jQuery('html, body').stop().animate({
scrollTop: jQuery(linkHref).offset().top - headerHeight + linkOffset
}, 1000, 'easeInOutExpo', function(){
SWIFT.isScrolling=false;
});
e.preventDefault();
}else{
return e;
}});
},
onePageNav: function(){
var onePageNav=jQuery('#one-page-nav'),
onePageNavType=onePageNav.hasClass('opn-arrows') ? "arrows":"standard",
onePageNavItems="",
pageSectionCount=0,
mainContent=jQuery('.page-content');
mainContent.find('section.row').each(function(){
var linkID=jQuery(this).attr('id'),
linkName=jQuery(this).data('rowname');
if(linkID&&linkName.length > 0&&jQuery(this).height() > 0){
onePageNavItems +='<li><a href="#'+linkID+'" data-title="'+linkName+'"><i></i></a><div class="hover-caption">'+linkName+'</div></li>';
pageSectionCount++;
}});
if(pageSectionCount > 0){
onePageNav.append('<ul>'+onePageNavItems+'</ul>');
if(onePageNavType==="arrows"){
onePageNav.find('ul').css('display', 'none');
onePageNav.append('<a href="#" class="opn-up"><i class="ss-up"></i></a>');
onePageNav.append('<div class="opn-status"><span class="current">1</span>/<span class="total">'+pageSectionCount+'</span></div>');
onePageNav.append('<a href="#" class="opn-down"><i class="ss-down"></i></a>');
}
onePageNav.vCenter();
setTimeout(function(){
SWIFT.page.onePageNavScroll(onePageNav);
onePageNav.css('display', 'block').stop().animate({
'right': '0',
'opacity': 1
}, 1000, "easeOutQuart");
jQuery('#one-page-nav ul li a').bind('click', function(e){
SWIFT.page.onePageNavGoTo(jQuery(this).attr('href'));
e.preventDefault();
});
jQuery('#one-page-nav a.opn-up').bind('click', function(e){
var currentSection=parseInt(jQuery('.opn-status .current').text(), 10),
prevSection=currentSection - 1,
prevSectionHref=jQuery('#one-page-nav ul li:nth-child('+ prevSection +') > a').attr('href');
if(prevSection > 0){
SWIFT.page.onePageNavGoTo(prevSectionHref);
}
e.preventDefault();
});
jQuery('#one-page-nav a.opn-down').bind('click', function(e){
var currentSection=parseInt(jQuery('.opn-status .current').text(), 10),
nextSection=currentSection + 1,
nextSectionHref=jQuery('#one-page-nav ul li:nth-child('+ nextSection +') > a').attr('href');
if(nextSection <=pageSectionCount){
SWIFT.page.onePageNavGoTo(nextSectionHref);
}
e.preventDefault();
});
SWIFT.page.onePageNavScroll(onePageNav);
$window.on('scroll', function(){
SWIFT.page.onePageNavScroll(onePageNav);
});
}, 1000);
}},
onePageNavGoTo: function(anchor){
var adjustment=0;
if(jQuery('#wpadminbar').length > 0){
adjustment=jQuery('#wpadminbar').height();
}
if(body.hasClass('sticky-header-enabled')){
adjustment=jQuery('.sticky-header').outerHeight() > 0 ? adjustment + jQuery('.sticky-header').outerHeight():adjustment + jQuery('#header-section').outerHeight();
}
if(jQuery('.sticky-top-bar').length > 0){
adjustment +=jQuery('.sticky-top-bar').height() > 0 ? adjustment + jQuery('.sticky-top-bar').height():adjustment + jQuery('#top-bar').height();
}
SWIFT.isScrolling=true;
jQuery('html, body').stop().animate({
scrollTop: jQuery(anchor).offset().top - adjustment + 1
}, 1000, 'easeInOutExpo', function(){
SWIFT.isScrolling=false;
});
},
onePageNavScroll: function(onePageNav){
var adjustment=0;
if(body.hasClass('sticky-header-enabled')){
adjustment=jQuery('.sticky-header').height() > 0 ? adjustment + jQuery('.sticky-header').height():adjustment + jQuery('#header-section').height();
}
if(jQuery('#wpadminbar').length > 0){
adjustment=adjustment + jQuery('#wpadminbar').height();
}
if(jQuery('.sticky-top-bar').length > 0){
adjustment +=jQuery('.sticky-top-bar').height() > 0 ? adjustment + jQuery('.sticky-top-bar').height():adjustment + jQuery('#top-bar').height();
}
var currentSection=jQuery('section.row:in-viewport('+adjustment+')').data('rowname'),
currentSectionIndex=0;
if(!currentSection){
onePageNav.find('li').removeClass('selected');
}
if(onePageNav.is(':visible')&&currentSection){
onePageNav.find('li').removeClass('selected');
onePageNav.find('li a[data-title="'+currentSection+'"]').parent().addClass('selected');
currentSectionIndex=onePageNav.find('li a[data-title="'+currentSection+'"]').parent().index() + 1;
}
if(currentSectionIndex > 0){
jQuery('.opn-status .current').text(currentSectionIndex);
}
if(onePageNav.hasClass('opn-arrows')){
var current=onePageNav.find('.current').text(),
total=onePageNav.find('.total').text();
if(current==="1"){
onePageNav.find('.opn-up').addClass('disabled');
}else{
onePageNav.find('.opn-up').removeClass('disabled');
}
if(current===total){
onePageNav.find('.opn-down').addClass('disabled');
}else{
onePageNav.find('.opn-down').removeClass('disabled');
}}
},
articleShare: function(){
jQuery('.article-share').each(function(){
var articleShare=jQuery(this),
image=articleShare.data('image'),
permalink=window.location.href,
title=encodeURIComponent(jQuery(document).find("title").text()),
links='';
links +='<li class="pinterest enabled" data-network="pinterest"><a href="http://pinterest.com/pin/create/button/?url=' + permalink + '&media=' + image + '&description=' + title + '" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=690,width=750\');return false;"></a></li>';
links +='<li class="twitter enabled" data-network="twitter"><a href="http://twitter.com/share?text=' + title + '&url=' + permalink + '" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=440,width=660\');return false;"></a></li>';
links +='<li class="facebook enabled" data-network="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=' + permalink + '" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=440,width=660\');return false;"></a></li>';
if(isMobile){
links +='<li class="whatsapp enabled" data-network="whatsapp"><a href="whatsapp://send?text=' + title + ' ' + permalink + '"></a></li>';
}
links +='<li class="googlePlus enabled" data-network="googlePlus"><a href="https://plus.google.com/share?url=' + permalink + '" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=440,width=660\');return false;"></a></li>';
links +='<li class="linkedin enabled" data-network="linkedin"><a href="https://www.linkedin.com/shareArticle?mini=true&url=' + permalink + '&title=' + title + '" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=690,width=750\');return false;"></a></li>';
links +='<li class="email enabled" data-network="email"><a href="mailto:?subject=' + title + '&body=' + permalink + '"></a></li>';
articleShare.find('share-button').append('<span>' + articleShare.data('buttontext') + '</span>');
articleShare.find('share-button').append('<div class="sb-social sb-top sb-center"><ul>' + links + '</ul></div>');
articleShare.find('share-button').on('click', function(){
jQuery(this).find('.sb-social').toggleClass('active');
});
});
},
articleNavigation: function(){
var postPagination=jQuery('.post-pagination-wrap'),
postNext=postPagination.find('.next-article > h2 > a').attr('href'),
postPrev=postPagination.find('.prev-article > h2 > a').attr('href');
jQuery('article.type-post').hammer().on("swipeleft", function(event){
if(postPrev){
window.location=postPrev;
}});
jQuery('article.type-post').hammer().on("swiperight", function(event){
if(postNext){
window.location=postNext;
}});
},
postMediaTitle: function(){
var detailsOverlay=jQuery('.details-overlay'),
detailFeature=jQuery('.detail-feature'),
featureHeight=detailsOverlay.height() + 80;
if(body.hasClass('header-naked-light')||body.hasClass('header-naked-dark')){
detailFeature.css('padding-top', jQuery('.header-wrap').height() * 2);
}
detailFeature.css('height', featureHeight);
setTimeout(function(){
jQuery('.details-overlay').vCenter().stop().animate({
'bottom': '50%',
'opacity': 1
}, 1500, "easeOutExpo");
}, 500);
$window.smartresize(function(){
detailFeature.css('height', detailsOverlay.height() + 80);
jQuery('.details-overlay').vCenter();
});
},
lightbox: function(){
var lightboxSocial={};
if(lightboxSharing){
lightboxSocial={
facebook: {
source: 'https://www.facebook.com/sharer/sharer.php?u={URL}',
text: 'Share on Facebook'
},
twitter: true,
googleplus: true,
pinterest: {
source: "https://pinterest.com/pin/create/button/?url={URL}&media={URL}",
text: "Share on Pinterest"
}};}
var galleryArr=[];
jQuery('[data-rel^="ilightbox["]').each(function (){
var attr=this.getAttribute("data-rel");
if(jQuery(this).hasClass('ilightbox-enabled') ){
return;
}
if(jQuery.inArray(attr, galleryArr)==-1){
galleryArr.push(attr);
}});
jQuery.each(galleryArr, function (b, c){
jQuery('[data-rel="' + c + '"]').iLightBox({
skin: lightboxSkin,
social: {
buttons: lightboxSocial
},
path: 'horizontal',
thumbnails: {
maxWidth: 120,
maxHeight: 120
},
controls: {
arrows: lightboxControlArrows,
thumbnail: lightboxThumbs
},
});
jQuery('[data-rel="' + c + '"]').addClass('ilightbox-enabled');
});
},
backToTop: function(){
var scrollPosition=$window.scrollTop();
if(scrollPosition > 300){
jQuery('#back-to-top').stop().animate({
'bottom': '10px',
'opacity': 1
}, 300, "easeOutQuart");
}else if(scrollPosition < 300){
jQuery('#back-to-top').stop().animate({
'bottom': '-80px',
'opacity': 0
}, 300, "easeInQuart");
}},
stickyWidget: function(){
var stickyWidget=jQuery('.sidebar-widget-wrap'),
sidebar=stickyWidget.parent(),
content=jQuery('.page-content'),
offset=50;
if(!body.hasClass('vertical-header')){
offset=offset + jQuery('#header-section').height();
}
if(jQuery('#wpadminbar').length > 0){
offset=offset + 32;
}
if(jQuery('#top-bar').length > 0){
offset=offset + jQuery('#top-bar').height();
}
if(jQuery('.page-heading').length > 0){
offset=offset + jQuery('.page-heading').height();
}
SWIFT.page.initStickyWidget(stickyWidget, sidebar, offset);
$window.smartresize(function(){
jQuery('.inner-page-wrap').stickem().destroy();
SWIFT.page.resizeStickyWidget(stickyWidget, sidebar);
SWIFT.page.initStickyWidget(stickyWidget, sidebar, offset);
});
},
initStickyWidget: function(stickyWidget, sidebar, offset){
jQuery('.inner-page-wrap').stickem({
item: '.sidebar-widget-wrap',
container: '.inner-page-wrap',
offset: offset,
onStick: function(){
SWIFT.page.resizeStickyWidget(stickyWidget, sidebar);
}});
},
resizeStickyWidget: function(stickyWidget, sidebar){
var headerHeight=0,
content=jQuery('.page-content'),
sidebarHeight=sidebar.height(),
contentHeight=content.height();
if(jQuery('.sticky-header').length > 0){
headerHeight=jQuery('.sticky-header').height() > 0 ? jQuery('.sticky-header').height():jQuery('#header-section').height();
}
if(jQuery('#wpadminbar').length > 0){
headerHeight=headerHeight + 32;
}
stickyWidget.css('width', sidebar.width()).css('top', headerHeight + 30);
if(contentHeight > sidebarHeight){
sidebar.css('height', contentHeight);
}else{
sidebar.css('height', sidebarHeight);
}},
getViewportHeight: function(){
var height="innerHeight" in window ? window.innerHeight: document.documentElement.offsetHeight;
return height;
},
checkIE: function(){
var undef,
v=3,
div=document.createElement('div'),
all=div.getElementsByTagName('i');
while (
div.innerHTML='<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v:undef;
},
pageTransitions: function(){
jQuery('a').on('click', function(e){
var linkElement=jQuery(this),
link=linkElement.attr('href'),
linkTarget=linkElement.attr('target'),
parentMenuItem=linkElement.parent(),
subMenu=parentMenuItem.find('ul.sub-menu');
if(linkElement.data('toggle')==="tab"||linkElement.parent('.ui-accordion-header').length > 0){
return e;
}
if(link.indexOf('#')===0&&link.length > 1){
SWIFT.isScrolling=true;
SWIFT.page.onePageNavGoTo(link);
setTimeout(function(){
SWIFT.isScrolling=false;
}, 1000);
e.preventDefault();
}else if(link.indexOf('#')===0&&link.length===1){
return;
}else if(linkTarget==='_blank'||link.indexOf('?') >=0||link.indexOf('.jpg') >=0||link.indexOf('.png') >=0||link.indexOf('mailto') >=0||e.ctrlKey||e.metaKey||link.indexOf('javascript')===0||link.indexOf('tel:')===0){
return e;
}else{
if(body.hasClass('mobile-menu-open')||body.hasClass('mh-overlay-show')){
return;
}else{
SWIFT.page.fadePageOut(link);
e.preventDefault();
}}
});
},
fadePageIn: function(){
body.addClass('page-fading-in');
jQuery('#site-loading').animate({
'opacity': 0,
}, 400, 'easeInExpo', function(){
jQuery(this).css('display', 'none');
});
setTimeout(function(){
jQuery('#main-container').animate({
'opacity': 1,
'paddingTop': '0'
}, 500, 'easeOutExpo', function(){
body.removeClass('page-fading-in');
});
}, 100);
},
fadePageOut: function(link){
var ptop='150px';
if(body.hasClass('header-naked-light')||body.hasClass('header-naked-dark')){
ptop='0px';
}
jQuery('#site-loading').css('display', 'block').animate({
'opacity': 1,
}, 400, 'easeInExpo');
jQuery('#main-container').animate({
'opacity': 0,
'paddingTop': ptop
}, 500, 'easeInExpo', function(){
window.location=link;
});
},
directorySubmit: function(){
jQuery('#sf_directory_calculate_coordinates').on("click", function(e){
e.preventDefault();
var geocoder=new google.maps.Geocoder();
geocoder.geocode({ 'address': jQuery('#sf_directory_address').val()}, function(results, status){
jQuery('#sf_directory_lat_coord').val(results[0].geometry.location.lat());
jQuery('#sf_directory_lng_coord').val(results[0].geometry.location.lng());
});
});
jQuery('#directory-submit').click(function(e){
if(jQuery('#sf_directory_address').val()===''||jQuery('#sf_directory_lat_coord').val()===''||jQuery('sf_directory_lng_coord').val()===''||jQuery('#directory_title').val()===''||jQuery('#directory_description').val()===''||jQuery('#directory-cat').val() <=0||jQuery('#directory-loc').val() <=0){
e.preventDefault();
jQuery('.directory-error').show();
jQuery('html, body').animate({ scrollTop: jQuery('.directory-error').offset().top-100}, 700);
return false;
}
jQuery('#add-directory-entry').submit();
});
}};
SWIFT.superSearch={
init: function(){
jQuery('.search-options .ss-dropdown').on('click', function(e){
e.preventDefault();
var option=jQuery(this),
dropdown=option.find('ul');
if(isMobileAlt){
if(dropdown.hasClass('show-dropdown')){
dropdown.removeClass('show-dropdown');
}else{
dropdown.addClass('show-dropdown');
}}else{
if(dropdown.hasClass('show-dropdown')){
dropdown.css('top', 30);
dropdown.removeClass('show-dropdown');
}else{
dropdown.css('top', -10);
dropdown.addClass('show-dropdown');
}}
});
jQuery('.ss-option').on('click', function(e){
e.preventDefault();
var selectedOption=jQuery(this).attr('data-attr_value');
var parentOption=jQuery(this).parent().parent().parent();
parentOption.find('li').removeClass('selected');
jQuery(this).parent().addClass('selected');
parentOption.attr('data-attr_value', selectedOption);
parentOption.find('span').text(jQuery(this).text());
});
jQuery('.super-search-go').on('click', function(e){
e.preventDefault();
var parentSearch=jQuery(this).parents('.sf-super-search'),
filterURL=SWIFT.superSearch.urlBuilder(parentSearch),
homeURL=jQuery(this).attr('data-home_url'),
shopURL=jQuery(this).attr('data-shop_url');
if(filterURL.indexOf("product_cat") >=0){
location.href=homeURL + filterURL;
}else{
location.href=shopURL + filterURL;
}});
},
urlBuilder: function(searchInstance){
var queryString="";
jQuery(searchInstance).find('.search-options .ss-dropdown').each(function(){
var attr=jQuery(this).attr('id');
var attrValue=jQuery(this).attr('data-attr_value');
if(attrValue!==""){
if(attr==="product_cat"){
if(queryString===""){
queryString +="?product_cat=" + attrValue;
}else{
queryString +="&product_cat=" + attrValue;
}}else{
if(queryString===""){
queryString +="?filter_" + attr + "=" + attrValue;
}else{
queryString +="&filter_" + attr + "=" + attrValue;
}}
}});
jQuery('.search-options input').each(function(){
var attr=jQuery(this).attr('name');
var attrValue=jQuery(this).attr('value');
if(queryString===""){
queryString +="?"+ attr + "=" + attrValue;
}else{
queryString +="&" + attr + "=" + attrValue;
}});
return queryString;
}};
SWIFT.header={
init: function(){
var lastAjaxSearchValue="",
searchTimer=false;
if(body.hasClass('sticky-header-enabled')&&!body.hasClass('vertical-header')){
SWIFT.header.stickyHeaderInit();
}
if(jQuery('.sticky-top-bar').length > 0){
SWIFT.header.stickyTopBarInit();
}
jQuery('.header-search-link-alt').on('click', function(e){
e.preventDefault();
var ajaxSearchWrap=jQuery('.ajax-search-wrap');
if(ajaxSearchWrap.is(':visible')){
ajaxSearchWrap.fadeOut(300);
setTimeout(function(){
jQuery('.ajax-search-results').slideUp(100).empty();
jQuery('.ajax-search-form input[name=s]').val('');
}, 300);
}else{
ajaxSearchWrap.fadeIn(300);
setTimeout(function(){
jQuery('.ajax-search-form input[name=s]').focus();
jQuery("#container").bind("click", function(e){
var ajaxSearchWrap=jQuery('.ajax-search-wrap');
if(!jQuery(e.target).closest('.ajax-search-wrap').length){
ajaxSearchWrap.fadeOut(300);
setTimeout(function(){
jQuery('.ajax-search-results').slideUp(100).empty();
jQuery('.ajax-search-form input[name=s]').val('');
}, 300);
jQuery("#container").unbind("click");
}});
}, 300);
}});
jQuery('.ajax-search-form input[name=s]').on('keyup', function(e){
var searchvalue=e.currentTarget.value;
clearTimeout(searchTimer);
if(lastAjaxSearchValue!=jQuery.trim(searchvalue)&&searchvalue.length >=3){
searchTimer=setTimeout(function(){
SWIFT.header.ajaxSearch(e);
}, 400);
}});
jQuery('a.overlay-menu-link').on('click', function(e){
e.preventDefault();
SWIFT.header.overlayMenuToggle();
});
jQuery('#overlay-menu li.menu-item a').on('click', function(){
SWIFT.header.overlayMenuToggle();
});
jQuery('a.contact-menu-link').on('click', function(e){
e.preventDefault();
var headerTop=jQuery('.header-wrap').scrollTop();
if(headerTop!==0){
jQuery('body,html').animate({scrollTop: headerTop}, 600, 'easeOutCubic');
setTimeout(function(){
jQuery('#contact-slideout').slideToggle(800, 'easeInOutExpo');
if(jQuery(this).hasClass('slide-open')){
jQuery(this).removeClass('slide-open');
}else{
SWIFT.map.init();
jQuery(this).addClass('slide-open');
}}, 800);
}else{
jQuery('#contact-slideout').slideToggle(800, 'easeInOutExpo');
if(jQuery(this).hasClass('slide-open')){
jQuery(this).removeClass('slide-open');
}else{
SWIFT.map.init();
jQuery(this).addClass('slide-open');
}}
});
if(body.hasClass('mh-sticky')){
var mobileHeader=jQuery('#mobile-header');
mobileHeader.sticky({
topSpacing: 0
});
jQuery('#mobile-header-sticky-wrapper').css('height', mobileHeader.outerHeight(true));
$window.smartresize(function(){
mobileHeader.sticky('update');
jQuery('#mobile-header-sticky-wrapper').css('height', mobileHeader.outerHeight(true));
});
}
if(body.hasClass('layout-boxed')&&body.hasClass('vertical-header-right')){
var rightOffset=($window.width() - jQuery('#container').width()) / 2;
jQuery('.header-wrap').css('right', rightOffset);
$window.smartresize(function(){
var rightOffset=($window.width() - jQuery('#container').width()) / 2;
jQuery('.header-wrap').css('right', rightOffset);
});
}},
stickyHeaderInit: function(){
var spacing=0,
stickyHeader=jQuery('.sticky-header'),
headerWrap=jQuery('.header-wrap');
if(jQuery('#wpadminbar').length > 0){
spacing=32;
}
if(jQuery('.sticky-top-bar').length > 0){
spacing +=jQuery('.sticky-top-bar').outerHeight();
}
stickyHeader.sticky({
topSpacing: spacing
});
$window.smartresize(function(){
stickyHeader.sticky('update');
});
if(body.hasClass('layout-boxed')){
jQuery('.sticky-header').css('max-width', headerWrap.width());
$window.smartresize(function(){
jQuery('.sticky-header').css('max-width', headerWrap.width());
});
}
if(body.hasClass('sh-dynamic')){
var defaultHeaderPos=headerWrap.offset().top;
$window.scroll(function (){
defaultHeaderPos=headerWrap.offset().top - $window.scrollTop();
if(jQuery('.sticky-wrapper').hasClass('is-sticky')&&defaultHeaderPos < -100){
headerWrap.addClass('resized-header');
}else if(headerWrap.hasClass('resized-header')){
headerWrap.removeClass('resized-header');
}});
}
if(body.hasClass('sh-show-hide')){
var lastTop=0;
$window.scroll(function(event){
var currentTop=jQuery(this).scrollTop();
if(currentTop > lastTop&&currentTop > 1000){
jQuery('.sticky-header').addClass('sticky-header-hide');
}else if(jQuery('.sticky-header').hasClass('sticky-header-hide')){
jQuery('.sticky-header').removeClass('sticky-header-hide');
}
lastTop=currentTop;
});
}},
stickyTopBarInit: function(){
var spacing=0,
stickyTB=jQuery('.sticky-top-bar'),
headerWrap=jQuery('.header-wrap');
if(jQuery('#wpadminbar').length > 0){
spacing=32;
}
stickyTB.sticky({
topSpacing: spacing
});
$window.smartresize(function(){
stickyTB.sticky('update');
});
if(body.hasClass('layout-boxed')){
stickyTB.css('max-width', headerWrap.width());
$window.smartresize(function(){
stickyTB.css('max-width', headerWrap.width());
});
}},
ajaxSearch: function(e){
var searchInput=jQuery(e.currentTarget),
searchValues=searchInput.parents('form').serialize() + '&action=sf_ajaxsearch',
results=jQuery('.ajax-search-results'),
loadingIndicator=jQuery('.ajax-search-wrap .ajax-loading'),
ajaxurl=jQuery('.ajax-search-wrap').data('ajaxurl');
jQuery.ajax({
url: ajaxurl,
type: "POST",
data: searchValues,
beforeSend: function(){
loadingIndicator.fadeIn(50);
},
success: function(response){
if(response===0){
response="";
}else{
results.html(response);
}},
complete: function(){
loadingIndicator.fadeOut(200);
results.slideDown(400);
}});
},
overlayMenuToggle: function(){
var overlayMenu=jQuery('#overlay-menu'),
overlayMenuItemHeight=Math.floor(overlayMenu.find('nav ul').height() / overlayMenu.find('ul.menu > li').length) - 5,
overlayMenuItemFS=Math.floor(overlayMenuItemHeight * 0.5);
if(overlayMenuItemFS > 60){
overlayMenuItemFS=60;
}
overlayMenu.find('li').css('height', overlayMenuItemHeight + 'px').css('font-size', overlayMenuItemFS + 'px').css('line-height', overlayMenuItemHeight - 20 + 'px');
if(body.hasClass('overlay-menu-open')){
body.removeClass('overlay-menu-open');
body.addClass('overlay-menu-closing');
setTimeout(function(){
jQuery('#main-nav,#main-navigation').fadeIn(400);
}, 200);
}else{
setTimeout(function(){
body.removeClass('overlay-menu-closing');
body.addClass('overlay-menu-open');
jQuery('#main-nav,#main-navigation').fadeOut(300);
}, 30);
}}
};
SWIFT.nav={
init: function(){
if(!isMobile||$window.width() > 768){
SWIFT.nav.mainMenu();
}
SWIFT.nav.mobileMenuInit();
SWIFT.nav.mainMenuActions();
},
mainMenu: function(){
var breakWidth=767;
if(body.hasClass('vertical-header')){
breakWidth=724;
}
jQuery("#main-navigation").find(".menu li.menu-item").hoverIntent({
over: function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
jQuery(this).find('ul.sub-menu,.mega-menu-sub').first().fadeIn(200);
}},
out:function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
jQuery(this).find('ul.sub-menu,.mega-menu-sub').first().fadeOut(150);
}},
timeout: 0
});
var mainNav=jQuery('#main-navigation'),
mainNavHeight=mainNav.height(),
subMenu=mainNav.find('.sub-menu');
subMenu.each(function(){
jQuery(this).css('top', mainNavHeight);
});
},
mainMenuActions: function(){
var breakWidth=767;
if(body.hasClass('vertical-header')){
breakWidth=724;
}
jQuery("ul.sub-menu").parents('li').addClass('parent');
jQuery('.menu li.parent > a').on('click', function(e){
if(jQuery('#container').width() < 1024||body.hasClass('standard-browser')){
return e;
}
var directDropdown=jQuery(this).parent().find('ul.sub-menu').first();
if(directDropdown.css('opacity')==='1'||directDropdown.css('opacity')===1){
return e;
}else{
e.preventDefault();
}});
jQuery("nav.std-menu").find(".menu li").each(function(){
var top=jQuery(this).outerHeight();
jQuery(this).find('ul.sub-menu').first().css('top', top);
});
jQuery("nav.std-menu").find(".menu li.parent").hoverIntent({
over: function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
jQuery(this).find('ul.sub-menu').first().stop(true, true).fadeIn(200);
}},
out:function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
jQuery(this).find('.sub-menu').first().stop(true, true).fadeOut(150);
}},
timeout: 100
});
jQuery(document).on("mouseenter", "li.shopping-bag-item", function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
jQuery(this).find('ul.sub-menu').first().stop(true, true).fadeIn(200);
}}).on("mouseleave", "li.shopping-bag-item", function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
jQuery(this).find('ul.sub-menu').first().stop(true, true).fadeOut(150);
}});
jQuery('.menu-item').on('click', 'a', function(e){
var menuItem=jQuery(this),
linkHref=menuItem.attr('href'),
isMobileMenuItem=false,
youtubeURL=linkHref.match(/watch\?v=([a-zA-Z0-9\-_]+)/),
vimeoURL=linkHref.match(/^http:\/\/(www\.)?vimeo\.com\/(clip\:)?(\d+).*$/);
if(jQuery(this).parents('nav').attr('id')==="mobile-menu"){
isMobileMenuItem=true;
}
if(youtubeURL||vimeoURL){
var videoURL="";
if(youtubeURL){
videoURL='http://www.youtube.com/embed/'+ youtubeURL[1] +'?autoplay=1&amp;wmode=transparent';
}else if(vimeoURL){
videoURL='https://player.vimeo.com/video/'+ vimeoURL[3] +'?title=0&amp;byline=0&amp;portrait=0&amp;autoplay=1&amp;wmode=transparent';
}
if(videoURL!==""){
jQuery(this).data('video', videoURL);
SWIFT.widgets.openFullWidthVideo(jQuery(this));
}
e.preventDefault();
}else if(linkHref.indexOf('#')===0&&linkHref.length > 1){
var headerHeight=0;
if(isMobileMenuItem){
SWIFT.nav.mobileMenuHideTrigger();
setTimeout(function(){
var windowWidth=$window.width(),
isMobSized=false;
if(windowWidth > 1024&&body.hasClass('mhs-tablet-land')){
isMobSized=true;
}else if(windowWidth > 991&&body.hasClass('mhs-tablet-port')){
isMobSized=true;
}else if(windowWidth > 767&&body.hasClass('mhs-mobile')){
isMobSized=true;
}else if(windowWidth <=767){
isMobSized=true;
}
if(body.hasClass('mh-sticky')||(body.hasClass('sticky-header-enabled')&&isMobSized)){
headerHeight=jQuery('#mobile-header').outerHeight(true);
}
if(jQuery('.sticky-top-bar').length > 0){
headerHeight +=jQuery('.sticky-top-bar').outerHeight();
}
if(jQuery(linkHref).length > 0){
jQuery('html, body').stop().animate({
scrollTop: jQuery(linkHref).offset().top - headerHeight
}, 1000, 'easeInOutExpo');
body.removeClass('mh-overlay-show');
}}, 400);
}else{
if(jQuery(linkHref).length > 0){
SWIFT.isScrolling=true;
SWIFT.page.onePageNavGoTo(linkHref);
setTimeout(function(){
SWIFT.isScrolling=false;
}, 1000);
}}
e.preventDefault();
}else{
if(isMobileMenuItem){
return;
}else{
return e;
}}
});
var currentLanguage=jQuery('li.aux-languages').find('.current-language').html();
if(currentLanguage!==""){
jQuery('li.aux-languages > a').html(currentLanguage);
}
$window.smartresize(function(){
if(jQuery('#container').width() > breakWidth||body.hasClass('responsive-fixed')){
var menus=jQuery('nav').find('ul.menu');
menus.each(function(){
jQuery(this).css("display", "");
});
}});
SWIFT.nav.currentScrollIndication();
$window.scroll(function (){
SWIFT.nav.currentScrollIndication();
});
},
currentScrollIndication: function(){
var adjustment=0;
if(body.hasClass('sticky-header-enabled')){
adjustment=jQuery('.header-wrap').height();
}
if(jQuery('.sticky-top-bar').length > 0){
adjustment +=jQuery('.sticky-top-bar').outerHeight();
}
var inview=jQuery('section.row:in-viewport('+adjustment+')').attr('id'),
menuItems=jQuery('#main-navigation .menu li a'),
link;
if(inview!==""&&typeof inview!='undefined'){
link=menuItems.filter('[href="#' + inview + '"]');
}
menuItems.parent().removeClass('current-scroll-item');
if(typeof inview!='undefined'&&link.length > 0&&!link.hasClass('.current-scroll-item')){
menuItems.parent().removeClass('current-scroll-item');
link.parent().addClass('current-scroll-item');
}},
mobileMenuInit: function(){
if(jQuery('#wpadminbar').length > 0){
var topPadding=54;
if(body.hasClass('mh-overlay')){
jQuery('.mobile-overlay-close').css('top', topPadding + 'px');
topPadding=topPadding + 40;
}
jQuery('#mobile-menu-wrap').css('padding-top', topPadding + 'px');
jQuery('#mobile-cart-wrap').css('padding-top', topPadding + 'px');
}
jQuery('#mobile-logo > a').on('click touchstart', function(e){
if(body.hasClass('mobile-menu-open')||body.hasClass('mobile-cart-open')||body.hasClass('mobile-menu-closing')){
return false;
}else{
return e;
}});
jQuery('.mobile-menu-link').on('click', function(e){
e.preventDefault();
if(body.hasClass('mh-overlay')){
SWIFT.nav.mobileHeaderOverlay('menu');
}else{
if(body.hasClass('mobile-menu-open')){
if(isAndroid){
return;
}
SWIFT.nav.mobileMenuHideTrigger();
}else{
SWIFT.nav.showMobileMenu();
}}
});
jQuery('.mobile-cart-link').on('click', function(e){
e.preventDefault();
if(body.hasClass('mh-overlay')){
SWIFT.nav.mobileHeaderOverlay('cart');
}else{
if(body.hasClass('mobile-menu-open')){
if(isAndroid){
return;
}
SWIFT.nav.mobileMenuHideTrigger();
}else{
SWIFT.nav.showMobileCart();
}}
});
jQuery('.mobile-overlay-close').on('click', function(e){
e.preventDefault();
if(body.hasClass('mh-cart-show')){
jQuery('#mobile-cart-wrap').animate({
'opacity': 0
}, 500, 'easeOutQuart');
setTimeout(function(){
body.removeClass('mh-overlay-show');
body.removeClass('mh-cart-show');
}, 500);
}else if(body.hasClass('mh-menu-show')){
jQuery('#mobile-menu-wrap').animate({
'opacity': 0
}, 500, 'easeOutQuart');
setTimeout(function(){
body.removeClass('mh-overlay-show');
body.removeClass('mh-menu-show');
}, 500);
}});
jQuery('#mobile-menu li > a').on('click', function(e){
var parentMenuItem=jQuery(this).parent(),
linkHref=jQuery(this).attr('href'),
linkTarget=jQuery(this).attr('target'),
subMenu=parentMenuItem.find('ul.sub-menu');
if(linkHref.indexOf('#')===0&&linkHref.length > 1){
var headerHeight=0;
SWIFT.nav.mobileMenuHideTrigger();
setTimeout(function(){
if(body.hasClass('mh-sticky')){
headerHeight=jQuery('#mobile-header').height();
}
if(jQuery('#wpadminbar').length > 0){
headerHeight=headerHeight + jQuery('#wpadminbar').height();
}
if(jQuery(linkHref).length > 0){
jQuery('html, body').stop().animate({
scrollTop: jQuery(linkHref).offset().top - headerHeight + 2
}, 1000, 'easeInOutExpo');
}}, 400);
e.preventDefault();
}else{
if(!parentMenuItem.hasClass('parent')){
SWIFT.nav.mobileMenuHideTrigger();
if(body.hasClass('page-transitions')){
SWIFT.page.fadePageOut(linkHref);
}
setTimeout(function(){
if(linkTarget!="_blank"){
window.location.href=linkHref;
}else{
window.open(linkHref);
}}, 400);
}
if(subMenu.hasClass('sub-menu-open')){
if(linkHref.indexOf('http')===0){
return e;
}else{
subMenu.removeClass('sub-menu-open');
e.preventDefault();
}}else{
subMenu.addClass('sub-menu-open');
e.preventDefault();
}}
});
jQuery("#mobile-menu-wrap").swipe({
swipeLeft:function(){
if(!body.hasClass('mobile-header-center-logo-alt')&&!body.hasClass('mobile-header-left-logo')){
SWIFT.nav.mobileMenuHideTrigger();
}},
swipeRight:function(){
if(body.hasClass('mobile-header-center-logo-alt')||body.hasClass('mobile-header-left-logo')){
SWIFT.nav.mobileMenuHideTrigger();
}},
});
jQuery("#mobile-cart-wrap").swipe({
swipeLeft:function(){
if(body.hasClass('mobile-header-center-logo-alt')||body.hasClass('mobile-header-right-logo')||body.hasClass('mobile-header-center-logo')){
SWIFT.nav.mobileMenuHideTrigger();
}},
swipeRight:function(){
if(!body.hasClass('mobile-header-center-logo-alt')&&!body.hasClass('mobile-header-right-logo')){
SWIFT.nav.mobileMenuHideTrigger();
}},
});
$window.smartresize(function(){
var windowWidth=$window.width();
if(windowWidth > 1024&&body.hasClass('mhs-tablet-land')){
SWIFT.nav.mobileMenuHideTrigger();
}else if(windowWidth > 991&&body.hasClass('mhs-tablet-port')){
SWIFT.nav.mobileMenuHideTrigger();
}else if(windowWidth > 767&&body.hasClass('mhs-mobile')){
SWIFT.nav.mobileMenuHideTrigger();
}});
},
showMobileMenu: function(){
var windowTop=$window.scrollTop();
if(jQuery('#wpadminbar').length > 0){
windowTop=windowTop - jQuery('#wpadminbar').height();
}
if(windowTop > 0&&body.hasClass('mh-sticky')){
jQuery('#mobile-header').css('position', 'absolute').css('top', windowTop);
}
jQuery('#mobile-menu-wrap').css('display', 'block');
body.addClass('mobile-menu-open');
setTimeout(function(){
jQuery('#container').on('click touchstart', SWIFT.nav.mobileMenuHideTrigger);
}, 400);
},
hideMobileMenu: function(){
var windowTop=$window.scrollTop();
body.removeClass('mobile-menu-open');
setTimeout(function(){
jQuery('#mobile-menu-wrap').css('display', 'none');
if(jQuery('.sticky-wrapper').hasClass('is-sticky')){
jQuery('#mobile-header').css('position', 'fixed').css('top', '0');
}else{
jQuery('#mobile-header').css('position', '').css('top', '');
}
jQuery('#container').off('click touchstart', SWIFT.nav.mobileMenuHideTrigger);
}, 300);
setTimeout(function(){
body.removeClass('mobile-menu-closing');
}, 1000);
},
showMobileCart: function(){
var windowTop=$window.scrollTop();
if(jQuery('#wpadminbar').length > 0){
windowTop=windowTop - jQuery('#wpadminbar').height();
}
if(windowTop > 0&&body.hasClass('mh-sticky')){
jQuery('#mobile-header').css('position', 'absolute').css('top', windowTop);
}
jQuery('#mobile-cart-wrap').css('display', 'block');
body.addClass('mobile-menu-open');
body.addClass('mobile-cart-open');
setTimeout(function(){
jQuery('#container').on('click touchstart', SWIFT.nav.mobileMenuHideTrigger);
}, 400);
},
hideMobileCart: function(){
var windowTop=$window.scrollTop();
body.removeClass('mobile-cart-open');
setTimeout(function(){
jQuery('#mobile-cart-wrap').css('display', 'none');
if(jQuery('.sticky-wrapper').hasClass('is-sticky')){
jQuery('#mobile-header').css('position', 'fixed').css('top', '0');
}else{
jQuery('#mobile-header').css('position', '').css('top', '');
}
jQuery('#container').off('click touchstart', SWIFT.nav.mobileMenuHideTrigger);
}, 400);
setTimeout(function(){
body.removeClass('mobile-menu-closing');
}, 1000);
},
mobileMenuHideTrigger: function(e){
if(e!=null){
e.preventDefault();
}
body.addClass('mobile-menu-closing');
SWIFT.nav.hideMobileMenu();
SWIFT.nav.hideMobileCart();
},
mobileHeaderOverlay: function(type){
if(type==="menu"){
jQuery('#mobile-menu-wrap').css('display', 'block');
body.addClass('mh-overlay-show');
body.addClass('mh-menu-show');
jQuery('#mobile-menu-wrap').animate({
'opacity': 1
}, 500, 'easeOutQuart');
}else if(type==="cart"){
jQuery('#mobile-cart-wrap').css('display', 'block');
body.addClass('mh-overlay-show');
body.addClass('mh-cart-show');
jQuery('#mobile-cart-wrap').animate({
'opacity': 1
}, 500, 'easeOutQuart');
}}
};
SWIFT.woocommerce={
init: function(){
SWIFT.woocommerce.productQuantityAdjust();
jQuery(document).on('click', '.add_to_wishlist', function(){
jQuery(this).parent().parent().find('.yith-wcwl-wishlistaddedbrowse').show().removeClass("hide").addClass("show");
jQuery(this).hide().addClass("hide").removeClass("show");
var data={action: 'sf_add_to_wishlist', product_id: jQuery(this).attr('data-product-id')};
var ajaxURL=jQuery(this).attr('data-ajaxurl');
jQuery.post(ajaxURL, data, function(response){
var json=jQuery.parseJSON(response);
jQuery('.wishlist-item .bag-contents').prepend(json.wishlist_output);
jQuery('.wishlist-link .count').text(parseInt(jQuery('.wishlist-link .count').text())+1);
});
});
jQuery('.add_to_cart_button').on('click', function(){
var button=jQuery(this);
var added_text=button.attr("data-added_text");
button.addClass("product-added");
button.find('span').text(added_text);
button.find('i').attr('class', 'fa-check');
});
jQuery('.show-products-link').on('click', function(e){
e.preventDefault();
var linkHref=jQuery(this).attr('href').replace('?', ''),
currentURL=document.location.href.replace(/\/page\/\d+/, ''),
currentQuery=document.location.search;
if(currentQuery.indexOf('?show') >=0){
window.location=jQuery(this).attr('href');
}else if(currentQuery.indexOf('?') >=0){
window.location=currentURL + '&' + linkHref;
}else{
window.location=currentURL + '?' + linkHref;
}});
jQuery('.shipping-calculator-form input').keypress(function(e){
if(e.which==10||e.which==13){
jQuery(".update-totals-button button").click();
}});
if(jQuery('.product-grid').length > 0){
if(!jQuery('.inner-page-wrap').hasClass('full-width-shop')){
var productGrid=jQuery('.product-grid');
productGrid.imagesLoaded(function (){
productGrid.equalHeights();
});
$window.smartresize(function(){
jQuery('.product-grid').children().css('min-height','0');
jQuery('.product-grid').equalHeights();
});
}}
},
load: function(){
if(jQuery('.woocommerce-shop-page').hasClass('full-width-shop')&&!(IEVersion&&IEVersion < 9)){
SWIFT.woocommerce.fullWidthShop();
}},
cartWishlist: function(){
jQuery(document).on('click', '.shopping-bag .remove-product', function(e){
e.preventDefault();
e.stopPropagation();
var prod_id=jQuery(this).attr('data-product-id'),
variation_id=jQuery(this).attr('data-variation-id'),
prod_quantity=jQuery(this).attr('data-product-qty'),
empty_bag_txt=jQuery('.shopping-bag').attr('data-empty-bag-txt'),
singular_item_txt=jQuery('.shopping-bag').attr('data-singular-item-txt'),
multiple_item_txt=jQuery('.shopping-bag').attr('data-multiple-item-txt'),
data={action: 'sf_cart_product_remove', product_id: prod_id, variation_id: variation_id},
ajaxURL=jQuery(this).attr('data-ajaxurl');
jQuery('.shopping-bag .loading-overlay').fadeIn(200);
jQuery.post(ajaxURL, data, function(response){
var cartTotal=response;
var cartcounter=0;
if(body.hasClass('woocommerce-checkout')){
jQuery('.shopping-bag').find(".bag-button")[0].click();
}
if(body.hasClass('woocommerce-cart')){
location.reload();
}
jQuery('.shopping-bag .loading-overlay').fadeOut(100);
cartcounter=parseInt(jQuery('.cart-contents .num-items').first().text()) - prod_quantity;
jQuery('.cart-contents .amount').replaceWith(cartTotal);
jQuery('.bag-total .amount').replaceWith(cartTotal);
jQuery('.cart-contents .num-items').text(cartcounter);
jQuery('.cart-contents .num-items').each(function(index){
jQuery(this).text(cartcounter);
});
if(variation_id > 0){
jQuery('.product-var-id-'+variation_id).remove();
}else{
jQuery('.product-id-'+prod_id).remove();
}
if(cartcounter <=0){
jQuery('.sub-menu .shopping-bag').prepend('<div class="bag-empty">' + empty_bag_txt + '</div>');
jQuery('.sub-menu .shopping-bag .bag-buttons').remove();
jQuery('.sub-menu .shopping-bag .bag-header').remove();
jQuery('.sub-menu .shopping-bag .bag-total').remove();
jQuery('.sub-menu .shopping-bag .bag-contents').remove();
}else{
if(cartcounter==1){
jQuery('.sub-menu .shopping-bag .bag-header').text('1 ' + singular_item_txt);
}else{
jQuery('.sub-menu .shopping-bag .bag-header').text(cartcounter + ' ' + multiple_item_txt);
}}
});
return false;
});
jQuery(document).on('click', '.wishlist_table .remove', function(){
jQuery(".prod-"+jQuery(this).attr('data-product-id')).remove();
var wishcounter=parseInt(jQuery('.wishlist-link .count').text())-1;
jQuery('.wishlist-link .count').text(wishcounter);
if(wishcounter===0){
jQuery('.wishlist-item .bag-contents').prepend('<div class="wishlist-empty">Your wishlist is currently empty.</div>');
}});
},
variations: function(){
jQuery('.variations_form select, .variations select').each(function(){
var variationSelect=jQuery(this);
variationSelect.on("change", function(){
if(jQuery('#sf-included').hasClass('has-productzoom')){
jQuery('.zoomContainer').remove();
setTimeout(function(){
jQuery('.product-slider-image').each(function(){
jQuery(this).data('zoom-image', jQuery(this).parent().find('a.zoom').attr('href'));
});
var firstImage=jQuery('#product-img-slider li:first').find('.product-slider-image');
SWIFT.woocommerce.productZoom(firstImage);
jQuery('#product-img-slider').flexslider(0);
}, 500);
}else{
setTimeout(function(){
jQuery('#product-img-slider').flexslider(0);
var flexViewport=jQuery('#product-img-slider').find('.flex-viewport'),
flexsliderHeight=flexViewport.find('ul.slides').css('height');
flexViewport.animate({
'height': flexsliderHeight
}, 300);
}, 500);
}});
});
},
productZoom: function(zoomObject){
jQuery('#product-img-slider li a.zoom').css('display', 'none');
zoomObject.elevateZoom({
zoomType: productZoomType,
cursor: "crosshair",
zoomParent: '#product-img-slider',
responsive: true,
zoomWindowFadeIn: 400,
zoomWindowFadeOut: 500,
lensSize: 250
});
$window.smartresize(function(){
var currentImage=jQuery('#product-img-slider li.flex-active-slide').find('.product-slider-image');
if(!currentImage){
jQuery('#product-img-slider li:first').find('.product-slider-image');
}
SWIFT.woocommerce.productZoom(currentImage);
});
},
fullWidthShop: function(){
var shopItems=jQuery('.full-width-shop').find('.products'),
itemWidth=shopItems.find('li.product').first().data('width'),
shopSidebar=shopItems.find('.sidebar');
if(shopSidebar.length > 0){
SWIFT.woocommerce.fullWidthShopSetSidebarHeight();
$window.smartresize(function(){
SWIFT.woocommerce.fullWidthShopSetSidebarHeight();
});
shopItems.isotope({
itemSelector: '.product',
layoutMode: 'masonry',
masonry: {
columnWidth: '.'+itemWidth
},
isOriginLeft: !isRTL
});
SWIFT.woocommerce.animateItems(shopItems);
shopSidebar.stop().animate({
'opacity': 1
}, 500);
shopItems.isotope('stamp', shopSidebar);
shopItems.isotope('layout');
}else{
shopItems.isotope({
itemSelector: '.product',
layoutMode: 'fitRows',
isOriginLeft: !isRTL
});
SWIFT.woocommerce.animateItems(shopItems);
}},
fullWidthShopSetSidebarHeight: function(){
var shopItems=jQuery('.full-width-shop').find('.products'),
shopSidebar=shopItems.find('div.sidebar'),
defaultSidebarHeight=shopSidebar.css('height', '').outerHeight(),
newSidebarHeight=0,
sidebarHeightMultiply=2,
firstProductHeight=shopItems.find('li.product').first().outerHeight(true);
sidebarHeightMultiply=Math.ceil(defaultSidebarHeight / firstProductHeight);
newSidebarHeight=firstProductHeight * sidebarHeightMultiply;
shopSidebar.css('height', newSidebarHeight);
},
animateItems: function(shopItems){
shopItems.find('.product').each(function(i){
jQuery(this).delay(i*200).animate({
'opacity':1
}, 800, 'easeOutExpo', function(){
jQuery(this).addClass('item-animated');
});
});
},
productQuantityAdjust: function(){
jQuery(document).on('click', '.qty-plus', function(e){
e.preventDefault();
var quantityInput=jQuery(this).parents('.quantity').find('input.qty'),
newValue=parseInt(quantityInput.val(), 10) + 1,
maxValue=parseInt(quantityInput.attr('max'), 10);
if(!maxValue){
maxValue=9999999999;
}
if(newValue <=maxValue){
quantityInput.val(newValue);
quantityInput.change();
}});
jQuery(document).on('click', '.qty-minus', function(e){
e.preventDefault();
var quantityInput=jQuery(this).parents('.quantity').find('input.qty'),
newValue=parseInt(quantityInput.val(), 10) - 1,
minValue=parseInt(quantityInput.attr('min'), 10);
if(!minValue){
minValue=1;
}
if(newValue >=minValue){
quantityInput.val(newValue);
quantityInput.change();
}});
}};
SWIFT.flexSlider={
init: function(){
if(jQuery('#product-img-slider').length > 0){
SWIFT.flexSlider.productSlider();
}
jQuery('.item-slider').flexslider({
useCSS: flexUseCSS,
animation: "slide",
slideDirection: "horizontal",
slideshow: sliderAuto,
slideshowSpeed: sliderSlideSpeed,
animationDuration: sliderAnimSpeed,
rtl: isRTL,
smoothHeight: true,
directionNav: true,
controlNav: true,
keyboardNav: false,
mousewheel: false,
prevText: "Prev",
nextText: "Next",
pausePlay: true,
pauseText: '',
playText: '',
randomize: false,
slideToStart: 0,
animationLoop: true,
pauseOnAction: true,
pauseOnHover: false,
controlsContainer: "",
manualControls: "",
start: function(){},
before: function(){},
after: function(){},
end: function(){}});
jQuery('.content-slider').each(function(){
var slider=jQuery(this),
autoplay=((slider.attr('data-autoplay')==="yes") ? true:false);
slider.flexslider({
useCSS: flexUseCSS,
animation: "fade",
slideshow: autoplay,
slideshowSpeed: sliderSlideSpeed,
animationDuration: sliderAnimSpeed,
smoothHeight: false,
directionNav: true,
rtl: isRTL,
controlNav: false,
prevText: "",
nextText: "",
pauseOnHover: true,
start: function(){
SWIFT.flexSlider.slideEqualHeights();
$window.smartresize(function(){
SWIFT.flexSlider.slideEqualHeights();
});
}});
});
},
productSlider: function(){
if(jQuery('#product-img-nav ul.slides li').length > 1){
jQuery('#product-img-nav').flexslider({
animation: "slide",
rtl: isRTL,
useCSS: flexUseCSS,
directionNav: false,
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 100,
itemMargin: 0,
asNavFor: '#product-img-slider'
});
}else{
jQuery('#product-img-nav').css('display', 'none');
}
jQuery('#product-img-slider').flexslider({
useCSS: flexUseCSS,
animation: "slide",
controlNav: true,
smoothHeight: true,
animationLoop: false,
slideshow: sliderAuto,
slideshowSpeed: sliderSlideSpeed,
animationDuration: sliderAnimSpeed,
rtl: isRTL,
sync: '#product-img-nav',
start: function(productSlider){
if(hasProductZoom){
if(productSlider.slides){
var currentImageHasSlides=productSlider.slides.eq(productSlider.currentSlide).find('.product-slider-image');
SWIFT.woocommerce.productZoom(currentImageHasSlides);
}else{
var currentImageNoSlides=jQuery('#product-img-slider').find('.product-slider-image');
SWIFT.woocommerce.productZoom(currentImageNoSlides);
}}
},
before: function(){
if(hasProductZoom){
jQuery('.zoomContainer').remove();
}},
after: function(productSlider){
if(hasProductZoom){
var currentSlideImage=productSlider.slides.eq(productSlider.currentSlide).find('.product-slider-image');
SWIFT.woocommerce.productZoom(currentSlideImage);
}}
});
},
thumb: function(){
jQuery('.thumb-slider').flexslider({
animation: "fade",
slideDirection: "horizontal",
slideshow: sliderAuto,
slideshowSpeed: sliderSlideSpeed,
animationDuration: sliderAnimSpeed,
directionNav: true,
controlNav: false,
keyboardNav: false,
smoothHeight: false,
rtl: isRTL
});
},
slideEqualHeights: function(){
setTimeout(function(){
jQuery('.content-slider').find('.slide-content-wrap').css('position', 'relative');
jQuery('.content-slider > ul').equalHeights();
jQuery('.content-slider').find('.slide-content-wrap').vCenterTop();
jQuery('.content-slider').find('.slide-content-wrap').css('position', 'absolute');
}, 200);
}};
var portfolioContainer=jQuery('.portfolio-wrap').find('.filterable-items');
SWIFT.portfolio={
init: function(){
portfolioContainer.each(function(){
var portfolioInstance=jQuery(this);
if(portfolioInstance.hasClass('masonry-items')&&!(IEVersion&&IEVersion < 9)){
SWIFT.portfolio.masonrySetup(portfolioInstance);
}else if(portfolioInstance.hasClass('multi-masonry-items')&&!(IEVersion&&IEVersion < 9)){
SWIFT.portfolio.multiMasonrySetup(portfolioInstance);
}else{
SWIFT.portfolio.standardSetup(portfolioInstance);
}});
$window.smartresize(function(){
SWIFT.portfolio.windowResized();
});
jQuery('.filtering li').each(function(){
var filter=jQuery(this),
filterName=jQuery(this).find('a').attr('class'),
portfolioItems=jQuery(this).parents('.portfolio-wrap').find('.filterable-items');
portfolioItems.find('.portfolio-item').each(function(){
if(jQuery(this).hasClass(filterName)){
filter.addClass('has-items');
}});
}).parents('.filtering').animate({
opacity: 1
}, 400);
jQuery('.filtering li').on('click', 'a', function(e){
e.preventDefault();
jQuery(this).parent().parent().find('li').removeClass('selected');
jQuery(this).parent().addClass('selected');
var selector=jQuery(this).data('filter');
var portfolioItems=jQuery(this).parents('.portfolio-wrap').find('.filterable-items');
portfolioItems.isotope({ filter: selector });
});
jQuery('.filter-wrap > a').on('click', function(e){
e.preventDefault();
jQuery(this).parent().find('.filter-slide-wrap').slideToggle();
});
},
standardSetup: function(portfolioInstance){
portfolioInstance.imagesLoaded(function (){
SWIFT.portfolio.setItemHeight();
SWIFT.flexSlider.thumb();
portfolioInstance.animate({opacity: 1}, 800);
portfolioInstance.isotope({
resizable: true,
layoutMode: 'fitRows',
isOriginLeft: !isRTL
});
});
portfolioInstance.appear(function(){
SWIFT.portfolio.animateItems(portfolioInstance);
});
},
masonrySetup: function(portfolioInstance){
portfolioInstance.imagesLoaded(function (){
SWIFT.flexSlider.thumb();
portfolioInstance.isotope({
resizable: false,
itemSelector:'.portfolio-item',
layoutMode: 'masonry',
isOriginLeft: !isRTL
});
});
portfolioInstance.appear(function(){
SWIFT.portfolio.animateItems(portfolioInstance);
});
},
multiMasonrySetup: function(portfolioInstance){
portfolioInstance.imagesLoaded(function (){
SWIFT.flexSlider.thumb();
SWIFT.portfolio.multiMasonrySizeFix();
portfolioInstance.isotope({
resizable: false,
itemSelector:'.portfolio-item',
layoutMode: 'packery',
masonry: {
columnWidth: '.grid-sizer'
},
isOriginLeft: !isRTL
});
});
portfolioInstance.appear(function(){
SWIFT.portfolio.animateItems(portfolioInstance);
});
},
animateItems: function(portfolioInstance){
portfolioInstance.find('.portfolio-item').each(function(i){
jQuery(this).delay(i*200).animate({
'opacity':1
}, 800, 'easeOutExpo', function(){
jQuery(this).addClass('item-animated');
});
});
},
setItemHeight: function(){
if(!portfolioContainer.hasClass('col-1')&&!portfolioContainer.hasClass('masonry-items')&&!portfolioContainer.hasClass('multi-masonry-items')){
portfolioContainer.children().css('min-height','0');
portfolioContainer.equalHeights();
}},
multiMasonrySizeFix: function(){
var baseItem=portfolioContainer.find('.portfolio-item.size-standard').first(),
standardHeight=baseItem.height(),
standardWidth=baseItem.width(),
wideTallHeight=(standardHeight * 2) + parseInt(baseItem.css('margin-bottom'), 10),
wideWidth=(standardWidth * 2) + parseInt(baseItem.css('margin-bottom'), 10);
if(standardHeight > 0){
portfolioContainer.find('.portfolio-item.size-wide .multi-masonry-img-wrap').css('height', standardHeight).css('width', wideWidth + 8);
portfolioContainer.find('.portfolio-item.size-wide-tall .multi-masonry-img-wrap').css('height', wideTallHeight).css('width', wideWidth + 8);
portfolioContainer.find('.portfolio-item.size-tall .multi-masonry-img-wrap').css('height', wideTallHeight).css('width', standardWidth + 8);
}
if(portfolioContainer.data('isotope')){
portfolioContainer.isotope('layout');
}},
windowResized: function(){
if(!portfolioContainer.hasClass('col-1')&&!portfolioContainer.hasClass('masonry-items')&&!portfolioContainer.hasClass('multi-masonry-items')){
SWIFT.portfolio.setItemHeight();
}
if(portfolioContainer.hasClass('multi-masonry-items')){
SWIFT.portfolio.multiMasonrySizeFix();
}},
portfolioShowcaseInit: function(){
SWIFT.flexSlider.thumb();
SWIFT.portfolio.portfolioShowcaseWrap();
SWIFT.portfolio.portfolioShowcaseItems();
$window.smartresize(function(){
SWIFT.portfolio.portfolioShowcaseWrap();
SWIFT.portfolio.portfolioShowcaseItems();
});
},
portfolioShowcaseWrap: function(){
var portfolioShowcaseWrap=jQuery('.portfolio-showcase-wrap');
portfolioShowcaseWrap.animate({opacity: 1}, 600);
},
portfolioShowcaseItems: function(){
jQuery('.portfolio-showcase-wrap').each(function(){
var contWidth=jQuery('#main-container').width();
if(jQuery('#container').hasClass('boxed-layout')){
contWidth=jQuery('#container').width();
}
var thisShowcase=jQuery(this),
columns=thisShowcase.find('.portfolio-showcase-items').data('columns'),
windowWidth=contWidth + 2,
itemWidth=Math.floor(windowWidth / columns),
maximisedWidth=Math.floor(windowWidth * 40 / 100),
reducedWidth=Math.floor(windowWidth / 5),
deselectedLeft=(itemWidth / 2 - maximisedWidth / 2) / 0.75,
resetLeft=(reducedWidth / 2 - maximisedWidth / 2) / 1.3,
isAnimating = !1,
speed=300;
var showcaseItem=thisShowcase.find('li.portfolio-item');
if(columns===5){
maximisedWidth=Math.floor(windowWidth * 25 / 100);
reducedWidth=Math.floor(windowWidth / 5.33);
deselectedLeft=(itemWidth / 2 - maximisedWidth / 2) / 0.75;
resetLeft=(reducedWidth / 2 - maximisedWidth / 2) / 1.3;
showcaseItem.css("width", itemWidth);
showcaseItem.css("height", maximisedWidth / 1.5);
showcaseItem.find('.main-image').css("width", maximisedWidth);
showcaseItem.find('.main-image').css("left", resetLeft);
showcaseItem.find('.main-image').css("top", - maximisedWidth / 6);
speed=200;
}else{
showcaseItem.css("width", itemWidth);
showcaseItem.css("height", maximisedWidth / 2);
showcaseItem.find('.main-image').css("width", maximisedWidth);
showcaseItem.find('.main-image').css("left", resetLeft);
}
showcaseItem.each(function (){
if(windowWidth > 768){
jQuery(this).mouseenter(function (){
if(!isAnimating){
isAnimating = !0;
jQuery(this).removeClass("deselected-item");
thisShowcase.find(".deselected-item").stop().animate({
width: reducedWidth
}, speed);
thisShowcase.find(".deselected-item").find(".main-image").stop().animate({
left: deselectedLeft
}, speed);
jQuery(this).find(".main-image").stop().animate({
left: 0
}, speed);
jQuery(this).stop().animate({
width: maximisedWidth
}, speed + 1, function (){
jQuery(this).find(".item-info").stop().show();
jQuery(this).find(".item-info").stop().animate({
bottom: 0
}, speed, "easeInOutQuart");
});
}});
jQuery(this).mouseleave(function (){
if(isAnimating){
isAnimating = !1;
jQuery(this).addClass("deselected-item");
thisShowcase.find(".portfolio-item").stop().animate({
width: itemWidth
}, speed);
thisShowcase.find(".portfolio-item .main-image").stop().animate({
left: resetLeft
}, speed);
jQuery(this).find(".item-info").stop().animate({
bottom: -85
}, speed, function (){
jQuery(this).find(".item-info").stop().hide();
});
}});
}});
});
},
stickyDetails: function(){
var offset=0,
navSelectorElement='.media-wrap',
footerOffset=160;
if(jQuery('.page-heading').length > 0){
offset +=jQuery('.page-heading').outerHeight(true);
}
if(jQuery('.inner-main-container').hasClass('portfolio-type-standard')){
offset +=130;
}
if(jQuery('.related-projects').length > 0){
footerOffset=520;
}
jQuery('.sticky-details').stickySidebar({
headerSelector: '.header-wrap',
navSelector: navSelectorElement,
contentSelector: '.article-body-wrap',
footerSelector: '#footer-wrap',
sidebarTopMargin: 0,
footerThreshold: footerOffset,
offset: offset
});
jQuery('.sticky-details').css('max-width', jQuery('.sticky-details').outerWidth(true));
SWIFT.portfolio.stickyDetailsScroll();
$window.scroll(function(){
SWIFT.portfolio.stickyDetailsScroll();
});
},
stickyDetailsScroll: function(){
var contentElement=jQuery('.article-body-wrap');
if(jQuery('.inner-main-container').hasClass('portfolio-type-fw-media')){
contentElement=jQuery('.portfolio-detail-description');
}
if(jQuery('.sticky-details').hasClass('sticky')){
jQuery('.sticky-details').css('margin-left', contentElement.outerWidth(true));
}else{
jQuery('.sticky-details').css('margin-left', 0);
}},
};
var blogItems=jQuery('.blog-wrap').find('.blog-items');
SWIFT.blog={
init: function(){
blogItems.each(function(){
var blogInstance=jQuery(this);
if(blogInstance.hasClass('blog-grid-items')){
SWIFT.blog.blogGrid(blogInstance.find('.grid-items'));
}else{
SWIFT.blog.blogLayout(blogInstance);
}});
SWIFT.blog.blogFiltersInit();
jQuery('.blog-slideout-trigger').on('click', function(e){
e.preventDefault();
var blogWrap=jQuery(this).parent().parent().parent().parent();
var filterPanel=blogWrap.find('.blog-filter-wrap .filter-slide-wrap');
var auxType=jQuery(this).attr('data-aux');
blogWrap.find('.aux-list li').addClass('col-sm-2');
blogWrap.find('.aux-list li a span').each(function(){
jQuery(this).html(jQuery(this).html().replace("(","").replace(")",""));
});
if(jQuery(this).parent().hasClass('selected')&&!filterPanel.is(':animated')){
blogWrap.find('.blog-aux-options li').removeClass('selected');
filterPanel.slideUp(400);
return;
}
blogWrap.find('.blog-aux-options li').removeClass('selected');
jQuery(this).parent().addClass('selected');
if(filterPanel.is(':visible')){
filterPanel.slideUp(400);
setTimeout(function(){
blogWrap.find('.aux-list').css('display', 'none');
blogWrap.find('.aux-'+auxType).css('display', 'block');
filterPanel.slideDown();
}, 600);
}else{
blogWrap.find('.aux-list').css('display', 'none');
blogWrap.find('.aux-'+auxType).css('display', 'block');
filterPanel.slideDown();
}});
},
blogFiltersInit: function(){
SWIFT.blog.blogShowFilters();
jQuery('.filtering').animate({
opacity: 1
}, 400);
jQuery('.filtering li').on('click', 'a', function(e){
e.preventDefault();
jQuery(this).parent().parent().find('li').removeClass('selected');
jQuery(this).parent().addClass('selected');
var selector=jQuery(this).data('filter');
var blogItems=jQuery(this).parents('.blog-wrap').find('.blog-items');
blogItems.isotope({ filter: selector });
});
jQuery('.filter-wrap > a').on('click', function(e){
e.preventDefault();
jQuery(this).parent().find('.filter-slide-wrap').slideToggle();
});
},
blogShowFilters: function(){
jQuery('.filtering li').each(function(){
var filter=jQuery(this),
filterName=jQuery(this).find('a').attr('class'),
blogItems=jQuery(this).parents('.blog-wrap').find('.blog-items');
blogItems.find('.blog-item').each(function(){
if(jQuery(this).hasClass(filterName)){
filter.addClass('has-items');
}});
});
},
blogLayout: function(blogInstance){
var blogType=blogInstance.data('blog-type'),
layoutMode='fitRows';
if(blogType==="masonry"){
layoutMode='masonry';
}
if(blogType==="masonry"&&blogInstance.hasClass('social-blog')){
var tweets=blogInstance.parent().find('.blog-tweets').html(),
instagrams=blogInstance.parent().find('.blog-instagrams');
blogInstance.imagesLoaded(function (){
SWIFT.flexSlider.thumb();
blogInstance.isotope({
resizable: false,
itemSelector:'.blog-item',
layoutMode: 'masonry',
getSortData:{
date:function(elem){
return jQuery(elem).data('date');
}},
sortBy: 'date',
sortAscending: false,
isOriginLeft: !isRTL
});
if(tweets!==""){
blogInstance.isotope('insert', jQuery(tweets));
}
if(instagrams.length > 0){
SWIFT.blog.masonryInstagram(instagrams, blogInstance);
}
blogInstance.isotope('updateSortData').isotope();
setTimeout(function(){
$window.trigger('resize');
}, 400);
if(isMobileAlt){
setTimeout(function(){
blogInstance.isotope('layout');
}, 1000);
}});
}else{
blogInstance.imagesLoaded(function (){
SWIFT.flexSlider.thumb();
blogInstance.isotope({
resizable: true,
layoutMode: layoutMode,
isOriginLeft: !isRTL
});
});
blogInstance.appear(function(){
SWIFT.blog.animateItems(blogInstance);
});
}},
masonryInstagram: function(instagrams, blogItems){
var userID=instagrams.data('userid'),
token=instagrams.data('token'),
count=instagrams.data('count'),
itemClass=instagrams.data('itemclass'),
clientid='756db9880cc84c3dab85118df38f9b91';
jQuery.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
data: {client_id: clientid, count: count},
url: 'https://api.instagram.com/v1/users/' + userID + '/media/recent?access_token=' + token,
success: function(data){
for (var i=0; i < count; i++){
if(data.data[i]){
var caption="";
if(data.data[i].caption){
caption=data.data[i].caption.text;
}
instagrams.append("<li class='blog-item instagram-item "+itemClass+"' data-date='"+data.data[i].created_time+"'><a class='timestamp inst-icon' target='_blank' href='" + data.data[i].link +"'><i class='fa-instagram'></i></a><div class='inst-overlay'><a target='_blank' href='" + data.data[i].link +"'></a><h6>"+instagrams.data('title')+"</h6><h2>"+caption+"</h2><div class='name-divide'></div><data class='date timeago' title='"+data.data[i].created_time+"' value=''>"+data.data[i].created_time+"</data></div><img class='instagram-image' src='" + data.data[i].images.low_resolution.url +"' width='306px' height='306px' /></li>");
}}
jQuery("data.timeago").timeago();
instagrams.imagesLoaded(function(){
blogItems.isotope('insert', jQuery(instagrams.html()));
});
blogItems.isotope('updateSortData').isotope();
}});
},
animateItems: function(blogInstance){
blogInstance.find('.blog-item').each(function(i){
jQuery(this).delay(i*200).animate({
'opacity':1,
}, 800, 'easeOutExpo', function(){
jQuery(this).addClass('item-animated');
});
});
},
blogGrid: function(gridItems){
var tweets=gridItems.parent().find('.blog-tweets').html(),
instagrams=gridItems.parent().find('.blog-instagrams');
gridItems.imagesLoaded(function (){
SWIFT.flexSlider.thumb();
gridItems.isotope({
resizable: false,
itemSelector:'.blog-item',
layoutMode: 'fitRows',
getSortData:{
id:function(elem){
return jQuery(elem).data('sortid');
}},
sortBy: 'id',
sortAscending: true,
isOriginLeft: !isRTL
});
if(tweets!==""){
gridItems.isotope('insert', jQuery(tweets));
}
if(instagrams.length > 0){
SWIFT.blog.blogGridInstagram(instagrams, gridItems);
}
gridItems.isotope('updateSortData').isotope();
SWIFT.blog.blogGridResize();
}).animate({
'opacity':1
}, 800, 'easeOutExpo');
$window.smartresize(function(){
SWIFT.blog.blogGridResize();
});
},
blogGridResize: function(){
blogItems.find('.grid-items').each(function(){
var gridItem=jQuery(this).find('.blog-item'),
itemWidth=gridItem.first().width();
if(gridItem.first().hasClass('col-sm-sf-25')){
itemWidth=itemWidth / 2;
}
gridItem.css('height', itemWidth);
});
setTimeout(function(){
jQuery(".tweet-text,.quote-excerpt").dotdotdot();
blogItems.find('.grid-items').isotope('layout');
}, 500);
},
blogGridInstagram: function(instagrams, gridItems){
var userID=instagrams.data('userid'),
token=instagrams.data('token'),
count=instagrams.data('count'),
clientid='756db9880cc84c3dab85118df38f9b91';
jQuery.ajax({
url: 'https://api.instagram.com/v1/users/' + userID + '/media/recent?access_token=' + token, // specify the ID of the first found user
dataType: 'jsonp',
type: 'GET',
data: {client_id: clientid, count: count},
success: function(data){
for (var i=0; i < count; i++){
if(data.data[i]){
var caption="";
if(data.data[i].caption){
caption=data.data[i].caption.text;
}
instagrams.append("<li class='blog-item col-sm-sf-5 instagram-item' data-date='"+data.data[i].created_time+"' data-sortid='"+i*2+"'><a class='timestamp inst-icon' target='_blank' href='" + data.data[i].link +"'><i class='fa-instagram'></i></a><div class='inst-img-wrap'><div class='inst-overlay'><a target='_blank' href='" + data.data[i].link +"'></a><h6>"+instagrams.data('title')+"</h6><h2>"+caption+"</h2><div class='name-divide'></div><data class='date timeago' title='"+data.data[i].created_time+"' value=''>"+data.data[i].created_time+"</data></div><img class='instagram-image' src='" + data.data[i].images.low_resolution.url +"' /></div></li>");
}}
jQuery("data.timeago").timeago();
SWIFT.blog.blogGridResize();
instagrams.imagesLoaded(function(){
gridItems.isotope('insert', jQuery(instagrams.html()));
SWIFT.blog.blogGridResize();
});
gridItems.isotope('updateSortData').isotope();
}});
},
infiniteScroll: function(){
if(!(IEVersion&&IEVersion < 9)){
var infScrollData=jQuery('#inf-scroll-params');
var infiniteScroll={
loading: {
img: infScrollData.data('loadingimage'),
msgText: infScrollData.data('msgtext'),
finishedMsg: infScrollData.data('finishedmsg')
},
"nextSelector":".pagenavi li.next a",
"navSelector":".pagenavi",
"itemSelector":".blog-item",
"contentSelector":".blog-items"
};
jQuery(infiniteScroll.contentSelector).infinitescroll(infiniteScroll, function(elements){
SWIFT.flexSlider.thumb();
blogItems.imagesLoaded(function (){
blogItems.isotope('appended', elements);
jQuery.each(elements, function(i, element){
jQuery(element).addClass('item-animated');
});
});
jQuery('[data-rel="ilightbox[posts]"]').removeClass('ilightbox-enabled').iLightBox().destroy();
SWIFT.page.lightbox();
SWIFT.blog.blogShowFilters();
if(blogItems.parent().find('.pagination-wrap').hasClass('load-more')){
jQuery('.load-more-btn').animate({
'opacity': 1
}, 400);
}}
);
if(blogItems.parent().find('.pagination-wrap').hasClass('load-more')){
$window.unbind('.infscr');
jQuery('.load-more-btn').on('click', function(e){
e.preventDefault();
jQuery(infiniteScroll.contentSelector).infinitescroll('retrieve');
jQuery('.load-more-btn').animate({
'opacity': 0
}, 400);
});
}}else{
jQuery('.pagination-wrap').removeClass('hidden');
}}
};
var galleriesContainer=jQuery('.galleries-wrap').find('.filterable-items');
SWIFT.galleries={
init: function(){
galleriesContainer.each(function(){
var galleriesInstance=jQuery(this);
if(galleriesInstance.hasClass('masonry-items')){
SWIFT.galleries.masonrySetup(galleriesInstance);
}else{
SWIFT.galleries.standardSetup(galleriesInstance);
}});
$window.smartresize(function(){
SWIFT.galleries.windowResized();
});
jQuery('.filtering li').each(function(){
var filter=jQuery(this),
filterName=jQuery(this).find('a').attr('class'),
galleryItems=jQuery(this).parents('.galleries-wrap').find('.filterable-items');
galleryItems.find('.gallery-item').each(function(){
if(jQuery(this).hasClass(filterName)){
filter.addClass('has-items');
}});
}).parents('.filtering').animate({
opacity: 1
}, 400);
jQuery('.filtering li').on('click', 'a', function(e){
e.preventDefault();
jQuery(this).parent().parent().find('li').removeClass('selected');
jQuery(this).parent().addClass('selected');
var selector=jQuery(this).data('filter');
var galleryItems=jQuery(this).parents('.galleries-wrap').find('.filterable-items');
galleryItems.isotope({ filter: selector });
});
},
standardSetup: function(galleryInstance){
galleryInstance.imagesLoaded(function (){
SWIFT.galleries.setItemHeight();
galleryInstance.animate({opacity: 1}, 800);
galleryInstance.isotope({
resizable: true,
layoutMode: 'fitRows',
isOriginLeft: !isRTL
});
});
galleryInstance.appear(function(){
SWIFT.galleries.animateItems(galleryInstance);
});
},
masonrySetup: function(galleryInstance){
galleryInstance.imagesLoaded(function (){
galleryInstance.isotope({
resizable: false,
itemSelector:'.gallery-item',
layoutMode: 'masonry',
isOriginLeft: !isRTL
});
});
galleryInstance.appear(function(){
SWIFT.galleries.animateItems(galleryInstance);
});
},
animateItems: function(galleryInstance){
galleryInstance.find('.gallery-item').each(function(i){
jQuery(this).delay(i*200).animate({
'opacity':1
}, 800, 'easeOutExpo', function(){
jQuery(this).addClass('item-animated');
});
});
},
setItemHeight: function(){
if(!galleriesContainer.hasClass('col-1')&&!galleriesContainer.hasClass('masonry-items')){
galleriesContainer.children().css('min-height','0');
galleriesContainer.equalHeights();
}},
windowResized: function(){
if(!galleriesContainer.hasClass('col-1')&&!galleriesContainer.hasClass('masonry-items')){
SWIFT.galleries.setItemHeight();
}},
};
SWIFT.gallery={
init: function(){
jQuery('.spb_gallery_widget').each(function(){
if(jQuery(this).hasClass('gallery-masonry')){
SWIFT.gallery.galleryMasonry(jQuery(this).find('.filterable-items'));
}else if(jQuery(this).hasClass('gallery-slider')){
SWIFT.gallery.gallerySlider(jQuery(this));
}});
},
galleryMasonry: function(element){
element.imagesLoaded(function (){
element.isotope({
resizable: false,
itemSelector:'.gallery-image',
layoutMode: 'masonry',
isOriginLeft: !isRTL
});
});
element.appear(function(){
SWIFT.gallery.animateItems(element);
});
},
animateItems: function(element){
element.find('.gallery-image').each(function(i){
jQuery(this).delay(i*200).animate({
'opacity':1
}, 800, 'easeOutExpo', function(){
jQuery(this).addClass('item-animated');
});
});
},
gallerySlider: function(element){
var gallerySlider=element.find('.gallery-slider'),
galleryNav=element.find('.gallery-nav'),
galleryAuto=gallerySlider.data('autoplay');
if(galleryAuto==="yes"){
galleryAuto=true;
}else{
galleryAuto=false;
}
galleryNav.flexslider({
animation: "slide",
directionNav: true,
controlNav: false,
animationLoop: sliderLoop,
slideshow: false,
itemWidth: 100,
itemMargin: 30,
rtl: isRTL,
asNavFor: gallerySlider
});
gallerySlider.flexslider({
animation: gallerySlider.data('transition'),
slideshow: false,
slideshowSpeed: sliderSlideSpeed,
animationDuration: sliderAnimSpeed,
controlNav: false,
animationLoop: sliderLoop,
rtl: isRTL,
sync: galleryNav,
start: function(){
if(galleryAuto){
gallerySlider.appear(function(){
gallerySlider.flexslider('play');
});
}}
});
}};
SWIFT.recentPosts={
init: function(){
var recentPostItems=jQuery('.recent-posts:not(.carousel-items,.posts-type-list)');
recentPostItems.imagesLoaded(function (){
SWIFT.flexSlider.thumb();
recentPostItems.equalHeights();
});
$window.smartresize(function(){
jQuery('.recent-posts:not(.carousel-items,.posts-type-list)').children().css('min-height','0');
jQuery('.recent-posts:not(.carousel-items,.posts-type-list)').equalHeights();
});
}};
SWIFT.carouselWidgets={
init: function(){
var carousel=jQuery('.carousel-items'),
carouselAuto=sfOptionParams.data('carousel-autoplay'),
carouselPSpeed=sfOptionParams.data('carousel-pagespeed'),
carouselSSpeed=sfOptionParams.data('carousel-slidespeed'),
carouselPagination=sfOptionParams.data('carousel-pagination'),
carouselPDirection='ltr',
desktopWidth=1199;
if(body.hasClass('vertical-header')){
desktopWidth=desktopWidth + jQuery('#header-section').width();
}
if(carouselAuto){
carouselAuto=true;
}else{
carouselAuto=false;
}
if(carouselPagination){
carouselPagination=true;
}else{
carouselPagination=false;
}
if(isRTL){
carouselPDirection='rtl';
}
carousel.each(function(){
var carouselInstance=jQuery('#'+jQuery(this).attr('id')),
carouselColumns=parseInt(carouselInstance.attr("data-columns"), 10),
desktopCarouselItems=4 > carouselColumns ? carouselColumns:4,
desktopSmallCarouselItems=3 > carouselColumns ? carouselColumns:3,
mobileCarouselItems=1;
if(carouselInstance.hasClass('clients-items')){
mobileCarouselItems=2;
}
if(carouselInstance.hasClass('testimonials')){
desktopCarouselItems=1;
desktopSmallCarouselItems=1;
mobileCarouselItems=1;
}
carouselInstance.imagesLoaded(function (){
if(!carouselInstance.hasClass('no-gutters')){
var carouselWidth=carouselInstance.width();
if(isRTL){
carouselInstance.css('margin-right', '-15px').css('width', carouselWidth);
}else{
carouselInstance.css('margin-left', '-15px').css('width', carouselWidth);
}}
carouselInstance.owlCarousel({
items:carouselColumns,
itemsDesktop: [desktopWidth,desktopCarouselItems],
itemsDesktopSmall: [desktopWidth-220,desktopSmallCarouselItems],
itemsTablet: mobileCarouselItems,
itemsMobile: [479,mobileCarouselItems],
paginationSpeed: carouselPSpeed,
slideSpeed: carouselSSpeed,
autoPlay: carouselAuto,
autoPlayDirection:carouselPDirection,
pagination: carouselPagination,
autoHeight:true,
beforeUpdate: function(){
if(!carouselInstance.hasClass('no-gutters')){
carouselInstance.css('width', '');
var carouselWidth=carouselInstance.width();
carouselInstance.css('width', carouselWidth);
}},
afterUpdate: function (){
carouselInstance.find('.flex-active-slide').resize();
},
afterInit: function(){
SWIFT.flexSlider.thumb();
carouselInstance.find('.flex-active-slide').resize();
carouselInstance.find('.owl-wrapper-outer').css('height', carouselInstance.find('.owl-wrapper').height());
}}).animate({
'opacity': 1
},800);
SWIFT.carouselWidgets.carouselMinHeight(carouselInstance);
$window.smartresize(function(){
SWIFT.carouselWidgets.carouselMinHeight(carouselInstance);
});
});
});
jQuery('.carousel-next').click(function(e){
e.preventDefault();
var carousel=jQuery(this).closest('.spb_content_element').find('.owl-carousel');
if(isRTL){
carousel.data('owlCarousel').prev();
}else{
carousel.data('owlCarousel').next();
}});
jQuery('.carousel-prev').click(function(e){
e.preventDefault();
var carousel=jQuery(this).closest('.spb_content_element').find('.owl-carousel');
if(isRTL){
carousel.data('owlCarousel').next();
}else{
carousel.data('owlCarousel').prev();
}});
},
carouselSwipeIndicator: function(carousel){
carousel.appear(function(){
var swipeIndicator=jQuery(this).parents('.carousel-wrap').find('.sf-swipe-indicator');
setTimeout(function(){
swipeIndicator.fadeIn(500);
}, 400);
setTimeout(function(){
swipeIndicator.addClass('animate');
}, 1000);
setTimeout(function(){
swipeIndicator.fadeOut(400);
}, 3000);
});
},
carouselMinHeight: function(carousel){
var minHeight=parseInt(carousel.find('.carousel-item:not(.no-thumb)').eq(0).css('height'));
carousel.find('.owl-item').each(function (){
jQuery(this).css('min-height',minHeight+'px');
});
}};
SWIFT.widgets={
init: function(){
SWIFT.widgets.accordion();
SWIFT.widgets.toggle();
SWIFT.widgets.fullWidthVideo();
SWIFT.widgets.introAnimations();
SWIFT.widgets.iconBoxes();
if(jQuery('[rel=tooltip]').length > 0){
jQuery('[rel=tooltip]').tooltip();
}
jQuery('.tabs-type-dynamic .menu-icon').hover(function(){
jQuery(this).parents('.nav-tabs').addClass('show-tabs');
});
jQuery('.tabs-type-dynamic').mouseleave(function(){
jQuery(this).find('.nav-tabs').removeClass('show-tabs');
});
jQuery('ul.nav-tabs li a, .spb_accordion_section > h3 a').on('click', '', function(){
var thisTab=jQuery(this),
asset=thisTab.parents('.spb_content_element').first();
setTimeout(function(){
$window.trigger('resize');
if(asset.find('.map-canvas').length > 0){
var map=asset.find('.map-canvas');
map.each(function(){
google.maps.event.trigger(jQuery(this), "resize");
});
}}, 300);
});
},
accordion: function(){
jQuery('.spb_accordion').each(function(){
var spb_tabs,
active_tab=false,
active_attr=parseInt(jQuery(this).attr('data-active'), 10);
if(jQuery.type(active_attr)==="number"){ active_tab=active_attr; }
spb_tabs=jQuery(this).find('.spb_accordion_wrapper').accordion({
header: "> div > h4",
autoHeight: true,
collapsible: true,
active: active_tab,
heightStyle: "content",
activate: function(){
setTimeout(function(){
$window.trigger('resize');
}, 1000);
}});
}).css('opacity', 1);
},
tabs: function(){
setTimeout(function(){
jQuery('.spb_tabs').each(function(){
jQuery(this).find('.tab-pane').first().addClass('active');
jQuery(this).find('.tab-pane').removeClass('load');
});
}, 200);
setTimeout(function(){
jQuery('.spb_tour').each(function(){
jQuery(this).find('.tab-pane').first().addClass('active');
jQuery(this).find('.tab-pane').removeClass('load');
});
}, 200);
jQuery('ul.nav-tabs li a, .spb_accordion_section > h4 a').on('click', '', function(){
var thisTab=jQuery(this),
asset=thisTab.parents('.spb_content_element').first();
if(asset.find('.map-canvas').length > 0){
setTimeout(function(){
jQuery(window).trigger('resize');
var map=asset.find('.map-canvas');
SWIFT.map.init();
}, 100);
}});
setTimeout(function(){
if(jQuery('.spb_tabs').length > 0){
var tabUrl=document.location.toString();
if(tabUrl.match('#')&&jQuery('.nav-tabs a[href="#'+tabUrl.split('#')[1]+'"]').length > 0){
var thisTab=jQuery('.nav-tabs a[href="#'+tabUrl.split('#')[1]+']"'),
tabHash=tabUrl.split('#')[1];
jQuery('.nav-tabs a[href="#'+tabHash+'"]').tab('show');
}
jQuery('.nav-tabs a').click(function (e){
var hash=e.target.hash;
if(history.pushState){
history.pushState(null, null, hash);
}else{
location.hash=hash;
}});
}
if(jQuery('.spb_accordion').length > 0){
var accordionUrl=document.location.toString();
if(accordionUrl.match('#')&&jQuery('.spb_accordion a[href="#'+accordionUrl.split('#')[1]+'"]').length > 0){
var thisAccordion=jQuery('.spb_accordion a[href="#'+accordionUrl.split('#')[1]+'"]'),
accordionHash=accordionUrl.split('#')[1];
jQuery('.spb_accordion a[href="#'+accordionHash+'"]').click();
}
jQuery('.spb_accordion a').click(function (e){
var hash=e.target.hash;
if(history.pushState){
history.pushState(null, null, hash);
}else{
location.hash=hash;
}});
}
if(jQuery('.spb_tour').length > 0){
var tourUrl=document.location.toString();
if(tourUrl.match('#')&&jQuery('.spb_tour a[href="#'+tourUrl.split('#')[1]+'"]').length > 0){
var thisTour=jQuery('.spb_tour a[href="#'+tourUrl.split('#')[1]+'"]'),
tourHash=tourUrl.split('#')[1];
jQuery('.spb_tour a[href="#'+tourHash+'"]').click();
}
jQuery('.spb_tour a').click(function (e){
var hash=e.target.hash;
if(history.pushState){
history.pushState(null, null, hash);
}else{
location.hash=hash;
}});
}}, 220);
},
toggle: function(){
jQuery('.spb_toggle').click(function(){
if(jQuery(this).hasClass('spb_toggle_title_active')){
jQuery(this).removeClass('spb_toggle_title_active').next().slideUp(500);
}else{
jQuery(this).addClass('spb_toggle_title_active').next().slideDown(500);
}});
jQuery('.spb_toggle_content').each(function(){
if(jQuery(this).next().is('h4.spb_toggle')===false){
jQuery('<div class="last_toggle_el_margin"></div>').insertAfter(this);
}});
},
initSkillBars: function(){
SWIFT.widgets.animateSkillBars();
jQuery('a.ui-tabs-anchor').click(function(){
SWIFT.widgets.animateSkillBars();
});
},
animateSkillBars: function(){
jQuery('.progress:not(.animated)').each(function(){
var progress=jQuery(this);
progress.appear(function(){
var progressBar=jQuery(this),
progressValue=progressBar.find('.bar').data('value');
progressBar.addClass('animated');
progressBar.find('.bar').animate({
width: progressValue + "%"
}, 800, function(){
progressBar.parent().find('.bar-text').css('width', progressValue + "%");
progressBar.parent().find('.bar-text .progress-value').fadeIn(600);
});
});
});
},
fullWidthVideo: function(){
body.on('click', '.fw-video-link', function(){
if(jQuery(this).data('video')!==""){
SWIFT.widgets.openFullWidthVideo(jQuery(this));
}
return false;
});
body.on('click', '.fw-video-close', function(){
SWIFT.widgets.closeFullWidthVideo();
});
},
openFullWidthVideo: function(element){
jQuery('.fw-video-close').addClass('is-open');
jQuery('.fw-video-spacer').animate({
height: windowheight
}, 1000, 'easeInOutExpo');
jQuery('.fw-video-area').css('display', 'block').animate({
top: 0,
height: '100%'
}, 1000, 'easeInOutExpo', function(){
jQuery('.fw-video-area > .fw-video-wrap').append('<iframe class="fw-video" src="'+element.data('video')+'" width="100%" height="100%" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>');
});
},
closeFullWidthVideo: function(){
jQuery('.fw-video-close').removeClass('is-open');
jQuery('.fw-video-spacer').animate({
height: 0
}, 1000, 'easeInOutExpo', function(){
});
jQuery('.fw-video-area').animate({
top:'-100%'
}, 1000, 'easeInOutExpo', function(){
jQuery('.fw-video-area').css('display', 'none');
jQuery('.fw-video-area .fw-video').remove();
});
jQuery('.fw-video-area video').each(function(){
this.pause();
});
setTimeout(function(){
jQuery('.fw-video-area').find('iframe').remove();
}, 1500);
return false;
},
introAnimations: function(){
if(!(isMobileAlt&&body.hasClass('disable-mobile-animations'))){
jQuery('.sf-animation').each(function(){
var animatedItem=jQuery(this),
itemAnimation=animatedItem.data('animation'),
itemDelay=animatedItem.data('delay');
animatedItem.appear(function(){
setTimeout(function(){
window.requestAnimationFrame(function(){
animatedItem.addClass(itemAnimation);
setTimeout(function(){
animatedItem.addClass('sf-animate');
}, 100);
});
}, itemDelay);
}, {accX: 0, accY: -150}, 'easeInCubic');
});
}},
iconBoxes: function(){
if(isMobileAlt){
jQuery('.sf-icon-box').on('click', function(){
jQuery(this).addClass('sf-mobile-hover');
});
}else{
jQuery('.sf-icon-box').hover(function(){
jQuery(this).addClass('sf-hover');
}, function(){
jQuery(this).removeClass('sf-hover');
}
);
}}
};
SWIFT.teamMembers={
init: function(){
var team=jQuery('.team-members:not(.carousel-items)');
team.imagesLoaded(function (){
if($window.width() > 767){
team.equalHeights();
}});
$window.smartresize(function(){
jQuery('.team-members:not(.carousel-items)').children().css('min-height','0');
if($window.width() > 767){
jQuery('.team-members:not(.carousel-items)').equalHeights();
}});
}};
SWIFT.relatedPosts={
init: function(){
var relatedItems=jQuery('.related-items');
relatedItems.imagesLoaded(function (){
if($window.width() > 767){
relatedItems.equalHeights();
}});
$window.smartresize(function(){
jQuery('.related-items').children().css('min-height','0');
if($window.width() > 767){
jQuery('.related-items').equalHeights();
}});
}};
var  mapsArray=[], boundsArray=[], infowindow, bounds, directory_bounds, mapTypeIdentifier="", mapType, mapColor, mapSaturation, mapCenterLat, mapCenterLng, companyPos="", isDraggable=true, latitude, longitude, mapCoordinates, markersArray=[], pinTitle, pinContent, pinLink, address, pinButtonText, pinLogoURL="";
SWIFT.map={
init:function(){
var maps=jQuery('.map-canvas');
var mapContainer;
if(typeof google!=='undefined'){
bounds=new google.maps.LatLngBounds();
}
maps.each(function(i, element){
mapContainer=element;
var mapZoom=mapContainer.getAttribute('data-zoom');
mapType=mapContainer.getAttribute('data-maptype');
mapColor=mapContainer.getAttribute('data-mapcolor');
mapCenterLat=mapContainer.getAttribute('data-center-lat');
mapCenterLng=mapContainer.getAttribute('data-center-lng');
mapSaturation=mapContainer.getAttribute('data-mapsaturation');
SWIFT.map.createMap(mapContainer, mapZoom, mapType, mapColor, mapSaturation, jQuery(this), mapCenterLat, mapCenterLng);
});
},
getLatLong: function(address, pintit, pinimage, fn){
var geocoder;
geocoder=new google.maps.Geocoder();
geocoder.geocode({ 'address': address}, function(results, status){
if(results[0]){
fn(results[0].geometry.location, results[0].geometry.location.lat(), results[0].geometry.location.lng(), pintit, pinimage);
}});
},
addWinContent: function(marker, html, map){
google.maps.event.addListener(marker, 'click', function(){
infowindow.setContent(html);
infowindow.open(map, marker);
});
},
addMarker: function(mapInstance, pinLogoURL, pinTitle, pinContent, pinLink, address, pinButtonText){
var companyMarker;
mapCoordinates=new google.maps.LatLng(latitude, longitude);
if(pinLogoURL){
companyPos=new google.maps.LatLng(latitude, longitude);
companyMarker=new google.maps.Marker({
position: mapCoordinates,
map: mapInstance,
icon: pinLogoURL,
animation: google.maps.Animation.DROP });
}else{
companyPos=new google.maps.LatLng(latitude, longitude);
companyMarker=new google.maps.Marker({
position: mapCoordinates,
map: mapInstance,
animation: google.maps.Animation.DROP });
}
var html='<div class="pinmarker">';
if(pinTitle!==""){
html +='<h3>'+pinTitle+'</h3>';
}
if(pinContent!==""){
html +='<p>'+pinContent+' </p>';
}
if(pinLink!==""&&pinButtonText!==""){
html +='<div><a href="http://' + pinLink + '" target="_blank">'+pinButtonText+'</a></div>';
}
html +='</div>';
infowindow=new google.maps.InfoWindow();
SWIFT.map.addWinContent(companyMarker, html, mapInstance);
bounds.extend(mapCoordinates);
},
createMap: function(mapContainer, mapZoom, mapType, mapColor, mapSaturation, targetMap, mapCenterLat, mapCenterLng){
if(google){
directory_bounds=new google.maps.LatLngBounds();
}
var pinLogoURL="", mapLightness=false;
if(mapSaturation=="mono-light"){
if(mapColor===""){
mapColor="#ffffff";
}
mapSaturation=-100;
}else if(mapSaturation=="mono-dark"){
if(mapColor===""){
mapColor="#222222";
}
mapSaturation=-100;
mapLightness=true;
}else{
mapSaturation=-20;
}
var styles=[
{
stylers: [
{hue: mapColor},
{"invert_lightness": mapLightness},
{saturation: mapSaturation}
]
}
];
var styledMap=new google.maps.StyledMapType(styles,{name: "Styled Map"});
if(isMobileAlt){
isDraggable=false;
}
if(mapType==="satellite"){
mapTypeIdentifier=google.maps.MapTypeId.SATELLITE;
}else if(mapType==="terrain"){
mapTypeIdentifier=google.maps.MapTypeId.TERRAIN;
}else if(mapType==="hybrid"){
mapTypeIdentifier=google.maps.MapTypeId.HYBRID;
}else{
mapTypeIdentifier=google.maps.MapTypeId.ROADMAP;
}
var settings={
scrollwheel: false,
draggable: isDraggable,
mapTypeControl: true,
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl: true,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: mapTypeIdentifier
};
var mapInstance=new google.maps.Map(mapContainer, settings);
var pincount=targetMap.parent().find('.pin_location').length;
mapsArray.push(mapInstance);
google.maps.event.addDomListener(window, 'resize', function(){
jQuery.each(mapsArray, function(i, val){
val.fitBounds(boundsArray[i]);
val.setZoom(parseInt(mapZoom, 10));
});
});
bounds=new google.maps.LatLngBounds();
boundsArray.push(bounds);
targetMap.parent().find('.pin_location').each(function(i, element){
pinLogoURL=element.getAttribute('data-pinimage');
pinTitle=element.getAttribute('data-title');
pinContent=element.getAttribute('data-content');
address=element.getAttribute('data-address');
pinLink=element.getAttribute('data-pinlink');
latitude=element.getAttribute('data-lat');
longitude=element.getAttribute('data-lng');
pinButtonText=element.getAttribute('data-button-text');
if(latitude===''&&longitude===''){
SWIFT.map.getLatLong(address, pinTitle, pinLogoURL ,function(location, lati,longi, pintit, pinimage){
latitude=lati;
longitude=longi;
pinTitle=pintit;
pinLogoURL=pinimage;
SWIFT.map.addMarker(mapInstance, pinLogoURL, pinTitle, pinContent, pinLink, address, pinButtonText);
if(pincount > 1){
if(mapCenterLat!==''&&mapCenterLng!==''){
mapInstance.setZoom(parseInt(mapZoom, 10));
mapInstance.setCenter(new google.maps.LatLng(mapCenterLat, mapCenterLng));
}else{
mapInstance.fitBounds(bounds);
}}else{
mapInstance.setZoom(parseInt(mapZoom, 10));
mapInstance.setCenter(new google.maps.LatLng(latitude, longitude));
}});
}else{
SWIFT.map.addMarker(mapInstance, pinLogoURL, pinTitle, pinContent, pinLink, address, pinButtonText);
if(pincount > 1){
if(mapCenterLat!==''&&mapCenterLng!==''){
mapInstance.setZoom(parseInt(mapZoom, 10));
mapInstance.setCenter(new google.maps.LatLng(mapCenterLat, mapCenterLng));
}else{
mapInstance.fitBounds(bounds);
}}else{
mapInstance.setZoom(parseInt(mapZoom, 10));
mapInstance.setCenter(new google.maps.LatLng(latitude, longitude));
}}
});
if(mapType!=="satellite"){
mapInstance.mapTypes.set('map_style', styledMap);
mapInstance.setMapTypeId('map_style');
}
var listener=google.maps.event.addListener(mapInstance, "idle", function(){
mapInstance.setZoom(parseInt(mapInstance.getZoom(), 10));
google.maps.event.removeListener(listener);
});
}};
SWIFT.mapDirectory={
init:function(searchTerm, locationFilter, categoryFilter){
searchTerm=jQuery('#dir-search-value').val();
locationFilter=jQuery('.directory-location-option').val();
categoryFilter=jQuery('.directory-category-option').val();
var mapsDirectory=jQuery('.map-directory-canvas');
var mapDirContainer, mapZoom;
mapsDirectory.each(function(i, element){
var mapDirContainer=element,
mapZoom=mapDirContainer.getAttribute('data-zoom'),
mapType=mapDirContainer.getAttribute('data-maptype'),
mapColor=mapDirContainer.getAttribute('data-mapcolor'),
mapSaturation=mapDirContainer.getAttribute('data-mapsaturation'),
mapExcerpt=mapDirContainer.getAttribute('data-excerpt');
if(categoryFilter==null||categoryFilter=='All'){
categoryFilter=mapDirContainer.getAttribute('data-directory-category');
}
SWIFT.mapDirectory.directoryMap(mapDirContainer, mapZoom, mapType, mapColor, mapSaturation, jQuery(this), searchTerm, locationFilter, categoryFilter);
});
},
searchDirectory: function(){
SWIFT.mapDirectory.init(jQuery('#dir-search-value').val(), jQuery('.directory-location-option').val(), jQuery('.directory-category-option').val());
},
getLatLong: function(address, fn){
var geocoder;
geocoder=new google.maps.Geocoder();
geocoder.geocode({ 'address': address}, function(results, status){
fn(results[0].geometry.location, results[0].geometry.location.lat(), results[0].geometry.location.lng());
});
},
addWinContent: function(marker, html, map){
markersArray.push(marker);
google.maps.event.addListener(marker, 'click', function(){
infowindow.setContent(html);
infowindow.open(map, marker);
});
},
addMarkerDir: function(mapInstance, pinLogoURL, pinTitle, pinContent, pinLink, address, pinButtonText,pinFeaturedImage, lat, lng){
var companyMarker, pinImgContainer;
mapCoordinates=new google.maps.LatLng(lat, lng);
if(pinLogoURL){
companyPos=new google.maps.LatLng(lat, lng);
companyMarker=new google.maps.Marker({
position: mapCoordinates,
map: mapInstance,
icon: pinLogoURL,
optimized: false,
animation: google.maps.Animation.DROP });
}else{
companyPos=new google.maps.LatLng(lat, lng);
companyMarker=new google.maps.Marker({
position: mapCoordinates,
map: mapInstance,
animation: google.maps.Animation.DROP });
}
if(pinFeaturedImage==""){
pinImgContainer='';
}else{
pinImgContainer='<img class="info-window-img" alt="" src="'+pinFeaturedImage+'" height="140" width="140"/>';
}
var html='';
if(pinLink===''||pinButtonText===''){
html='<div class="pinmarker">'+pinImgContainer+'<div class="pinmarker-container"><h3>'+pinTitle+'</h3><div class="excerpt">'+pinContent+'</div></div></div>';
}else{
html='<div class="pinmarker">'+pinImgContainer+'<div class="pinmarker-container"><h3>'+pinTitle+'</h3><div class="excerpt">'+pinContent+'</div><a class="pin-button" href="' + pinLink + '" target="_blank">'+pinButtonText+'</a></div></div>';
}
infowindow=new google.maps.InfoWindow();
SWIFT.mapDirectory.addWinContent(companyMarker, html, mapInstance);
directory_bounds.extend(mapCoordinates);
},
directoryMap: function(mapContainer, mapZoom, mapType, mapColor, mapSaturation, targetMap, searchTerm, locationFilter, categoryFilter, excerpt){
var pinLogoURL="", mapLightness=false;
var mapFilter=mapContainer.getAttribute('data-directory-map-filter');
var mapFilterPos=mapContainer.getAttribute('data-directory-map-filter-pos');
var mapResults=mapContainer.getAttribute('data-directory-map-results');
var excerpt=mapContainer.getAttribute('data-excerpt');
var directoryItemHtml="";
if(mapResults!=='list'){
if(mapSaturation=="mono-light"){
if(mapColor===""){
mapColor="#ffffff";
}
mapSaturation=-100;
}else if(mapSaturation=="mono-dark"){
if(mapColor===""){
mapColor="#222222";
}
mapSaturation=-100;
mapLightness=true;
}else{
mapSaturation=-20;
}
var styles=[
{
stylers: [
{hue: mapColor},
{"invert_lightness": mapLightness},
{saturation: mapSaturation}
]
}
];
var styledMap=new google.maps.StyledMapType(styles,{name: "Styled Map"});
if(isMobileAlt){
isDraggable=false;
}
if(mapType==="satellite"){
mapTypeIdentifier=google.maps.MapTypeId.SATELLITE;
}else if(mapType==="terrain"){
mapTypeIdentifier=google.maps.MapTypeId.TERRAIN;
}else if(mapType==="hybrid"){
mapTypeIdentifier=google.maps.MapTypeImapDirContainerd.HYBRID;
}else{
mapTypeIdentifier=google.maps.MapTypeId.ROADMAP;
}}else{
jQuery(mapContainer).hide();
}
var pinTitle, pinContent, pinLink, address, pinButtonText, pinShortContent, pinThumbnail;
var pincount=targetMap.parent().find('.pin_location').length;
directory_bounds=new google.maps.LatLngBounds();
if(categoryFilter===""){
categoryFilter=mapContainer.getAttribute('data-directory-category');
}
var data={
action: 'sf_directory',
search_term: searchTerm,
location_term: locationFilter,
category_term: categoryFilter,
item_excerpt: excerpt
};
jQuery.post(mapContainer.getAttribute('data-ajaxurl'), data, function(response){
var json=jQuery.parseJSON(response);
var mapFilterHtml;
var pincount=json.results;
jQuery('.directory-results').hide();
var settings={
scrollwheel: false,
draggable: isDraggable,
mapTypeControl: true,
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl: true,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: mapTypeIdentifier
};
if(pincount > 0){
var mapInstance=new google.maps.Map(mapContainer, settings);
markersArray=[];
if(mapColor!==""&&mapResults!='list'){
mapInstance.mapTypes.set('map_style', styledMap);
mapInstance.setMapTypeId('map_style');
}
google.maps.event.addDomListener(window, 'resize', function(){
mapInstance.fitBounds(directory_bounds);
mapInstance.setZoom(parseInt(mapZoom, 10));
});
var resultText="", thumbnail_image='';
if(pincount > 1){
resultText=json.results_text_1 + ' '+pincount+' '+json.results_text_2plural;
}else{
resultText=json.results_text_1 + ' '+pincount+' '+json.results_text_2;
}
jQuery(mapContainer).parent().parent().parent().find('.directory-results').prepend('<div class="results-title"><h2>'+resultText+'</h2>');
}else{
for (var i=0; i < markersArray.length; i++){
markersArray[i].setMap(null);
}
jQuery(mapContainer).parent().parent().parent().find('.directory-results').append('<div class="results-title"><h2>'+json.errormsg+'</h2>');
}
if(pincount > 0&&mapResults!='list'){
jQuery(mapContainer).show();
jQuery('.directory-results').append(json.pagination);
jQuery.each(json.items, function(i, item){
var hideFeaturedImage=mapContainer.getAttribute('data-directory-hide-featured-image');
var pinTitle=item.pin_title,
pinLogoURL=item.pin_logo_url,
pinContent=item.pin_content,
pinShortContent=item.pin_short_content,
address=item.pin_address,
pinLink=item.pin_link,
pinButtonText=item.pin_button_text,
latitude=item.pin_lat,
longitude=item.pin_lng,
pinThumbnail=item.pin_thumbnail,
categories=item.categories,
location=item.location,
thumbnail_image='',
result_header=true,
hasThumb=false,
extra_class='';
if(excerpt!=''){
pinContent=pinShortContent;
}
if(hideFeaturedImage=='yes'){
pinThumbnail="";
}
if(pinThumbnail&&pinLink){
hasThumb=true;
thumbnail_image='<figure class="animated-overlay overlay-alt"><img itemprop="image" src="'+pinThumbnail+'" alt="'+pinTitle+'"><a href="'+pinLink+'" target="_blank" class="link-to-post"></a><div class="figcaption-wrap"></div><figcaption><div class="thumb-info"><h4>'+pinTitle+'</h4></div></figcaption></figure>';
}else if(pinThumbnail){
hasThumb=true;
thumbnail_image='<figure><img itemprop="image" src="'+pinThumbnail+'" alt="'+pinTitle+'"></figure>';
}
if(!hasThumb){
extra_class='no-thumb';
}
if(mapResults!='list'){
SWIFT.mapDirectory.addMarkerDir(mapInstance, pinLogoURL, pinTitle, pinContent, pinLink, address, pinButtonText,pinThumbnail, latitude, longitude);
if(pincount > 1){
mapInstance.fitBounds(directory_bounds);
}else{
mapInstance.setZoom(parseInt(mapZoom, 10));
mapInstance.setCenter(new google.maps.LatLng(latitude, longitude));
}}
});
}else{
jQuery(mapContainer).hide();
}
jQuery('.directory-results').show();
});
}};
SWIFT.crowdfunding={
init:function(){
if(jQuery('#back-this-project').find('.edd_price_options').length <=0){
jQuery('#back-this-project > h2').css('display', 'none');
}
if(jQuery('#back-this-project').hasClass('project-donate-only')){
jQuery('.edd_price_options').find('li').first().addClass('atcf-selected');
jQuery('.edd_price_options').find('li').first().find('input[type="radio"]').prop('checked', true);
}
jQuery('.atcf-price-option').on('click', function(){
var selectedOption=jQuery(this),
selectedPrice=selectedOption.data('price').substr(0, selectedOption.data('price').indexOf('-'));
if(selectedOption.hasClass('inactive')){
return false;
}
if(selectedPrice&&jQuery('#atcf_custom_price').val().length <=0){
jQuery('#atcf_custom_price').val(selectedPrice);
}
jQuery('.atcf-price-option').find('input[type="radio"]').prop('checked', false);
jQuery('.atcf-price-option').removeClass('atcf-selected');
selectedOption.find('input[type="radio"]').prop('checked', true);
selectedOption.addClass('atcf-selected');
});
var campaignItems=jQuery('.campaign-items:not(.carousel-items)');
campaignItems.imagesLoaded(function (){
campaignItems.equalHeights();
});
$window.smartresize(function(){
jQuery('.campaign-items:not(.carousel-items)').children().css('min-height','0');
jQuery('.campaign-items:not(.carousel-items)').equalHeights();
});
}};
SWIFT.reloadFunctions={
init:function(){
jQuery('img[title]').each(function(){
jQuery(this).removeAttr('title');
});
if(!isAppleDevice){
jQuery('embed').show();
}
jQuery('.animate-top').on('click', function(e){
e.preventDefault();
jQuery('body,html').animate({scrollTop: 0}, 800, 'easeOutCubic');
});
},
load:function(){
if(!isMobile){
jQuery('.tooltip').each(function(){
jQuery(this).css('marginLeft', '-' + Math.round((jQuery(this).outerWidth(true) / 2)) + 'px');
});
jQuery('.comment-avatar').hover(function(){
jQuery(this).find('.tooltip').stop().animate({
bottom: '44px',
opacity: 1
}, 500, 'easeInOutExpo');
}, function(){
jQuery(this).find('.tooltip').stop().animate({
bottom: '25px',
opacity: 0
}, 400, 'easeInOutExpo');
});
jQuery('.grid-image').hover(function(){
jQuery(this).find('.tooltip').stop().animate({
bottom: '85px',
opacity: 1
}, 500, 'easeInOutExpo');
}, function(){
jQuery(this).find('.tooltip').stop().animate({
bottom: '65px',
opacity: 0
}, 400, 'easeInOutExpo');
});
}}
};
var $window=jQuery(window),
body=jQuery('body'),
sfIncluded=jQuery('#sf-included'),
sfOptionParams=jQuery('#sf-option-params'),
windowheight=SWIFT.page.getViewportHeight(),
deviceAgent=navigator.userAgent.toLowerCase(),
isMobile=deviceAgent.match(/(iphone|ipod|android|iemobile)/),
isMobileAlt=deviceAgent.match(/(iphone|ipod|ipad|android|iemobile)/),
isAppleDevice=deviceAgent.match(/(iphone|ipod|ipad)/),
isAndroid=deviceAgent.match(/(android)/),
isIEMobile=deviceAgent.match(/(iemobile)/),
parallaxScroll=navigator.userAgent.indexOf('Safari')!=-1||navigator.userAgent.indexOf('Chrome')==-1,
IEVersion=SWIFT.page.checkIE(),
isRTL=body.hasClass('rtl') ? true:false,
flexUseCSS=isMobileAlt ? false:true,
sliderAuto=sfOptionParams.data('slider-autoplay') ? true:false,
sliderLoop=sfOptionParams.data('slider-loop') ? true:false,
sliderSlideSpeed=sfOptionParams.data('slider-slidespeed'),
sliderAnimSpeed=sfOptionParams.data('slider-animspeed'),
lightboxControlArrows=sfOptionParams.data('lightbox-nav')==="arrows" ? true:false,
lightboxThumbs=sfOptionParams.data('lightbox-thumbs') ? true:false,
lightboxSkin=sfOptionParams.data('lightbox-skin')==="dark" ? "metro-black":"metro-white",
lightboxSharing=sfOptionParams.data('lightbox-sharing') ? true:false,
hasProductZoom=jQuery('#sf-included').hasClass('has-productzoom')&&!body.hasClass('mobile-browser') ? true:false,
productZoomType=sfOptionParams.data('product-zoom-type')==="lens" ? "lens":"inner";
SWIFT.isScrolling=false;
var onReady={
init: function(){
SWIFT.page.init();
if(jQuery('.sf-super-search').length > 0){
SWIFT.superSearch.init();
}
if(jQuery('#header-section').length > 0){
SWIFT.header.init();
}
SWIFT.nav.init();
SWIFT.woocommerce.init();
SWIFT.woocommerce.cartWishlist();
if(sfIncluded.hasClass('has-portfolio')){
SWIFT.portfolio.init();
}
if(sfIncluded.hasClass('has-portfolio-showcase')){
SWIFT.portfolio.portfolioShowcaseInit();
}
if(sfIncluded.hasClass('has-blog')){
SWIFT.blog.init();
}
if(sfIncluded.hasClass('has-infscroll')&&!isMobile){
SWIFT.blog.infiniteScroll();
}
if(sfIncluded.hasClass('has-gallery')){
SWIFT.gallery.init();
}
if(sfIncluded.hasClass('has-galleries')){
SWIFT.galleries.init();
}
SWIFT.widgets.init();
if(sfIncluded.hasClass('has-team')){
SWIFT.teamMembers.init();
}
if(sfIncluded.hasClass('has-carousel')){
SWIFT.carouselWidgets.init();
}
SWIFT.crowdfunding.init();
SWIFT.reloadFunctions.init();
}};
var onLoad={
init: function(){
SWIFT.flexSlider.init();
if(sfIncluded.hasClass('has-products')||body.hasClass('woocommerce-cart')||body.hasClass('woocommerce-account')){
SWIFT.woocommerce.load();
}
SWIFT.page.load();
if(body.hasClass('page-transitions')){
SWIFT.page.fadePageIn();
}
SWIFT.widgets.tabs();
if(sfIncluded.hasClass('has-progress-bar')){
SWIFT.widgets.initSkillBars();
}
if(sfIncluded.hasClass('has-map')){
SWIFT.map.init();
SWIFT.mapDirectory.init('', '', '');
jQuery('#directory-search-button').on("click", function(){
jQuery('.directory-search-form').submit();
});
jQuery('ul.nav-tabs li a, .spb_accordion_section > h3 a').click(function(){
var thisTabHref=jQuery(this).attr('href');
if(jQuery(thisTabHref).find('.spb_gmaps_widget').length > 0){
SWIFT.map.init();
SWIFT.mapDirectory.init('', '', '');
}});
}
SWIFT.reloadFunctions.load();
if(jQuery('#product-img-slider').length > 0){
SWIFT.woocommerce.variations();
}}
};
jQuery(document).ready(onReady.init);
jQuery(window).load(onLoad.init);
})(jQuery);
window.onpageshow=function(event){
if(event.persisted){
window.location.reload();
}};
!function(){var e={5574:function(e,t,i){"use strict";i.r(t),i.d(t,{AutoResizing:function(){return y},LAZY_BEFORE_SIZES:function(){return l},SMUSH_BEFORE_SIZES:function(){return c}});var n=i(356);function r(e){return r="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},r(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,a,o,s=[],u=!0,l=!1;try{if(a=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=a.call(i)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}var l="lazybeforesizes",c="smush:beforeSizes",d="data-original-sizes",f="data-srcset",v=["gif","jpg","jpeg","png","webp"],h="w",y=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.precision,n=void 0===i?0:i,r=t.skipAutoWidth,a=void 0!==r&&r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.precision=parseInt(n,10),this.precision=isNaN(this.precision)?0:this.precision,this.skipAutoWidth=a,this.initEventListeners()},t=[{key:"initEventListeners",value:function(){var e=this;document.addEventListener(l,function(t){var i;(0,n.G)(null===(i=t.detail)||void 0===i?void 0:i.instance)&&e.maybeAutoResize(t)})}},{key:"maybeAutoResize",value:function(e){var t,i,n,r=e.target,a=null===(t=e.detail)||void 0===t?void 0:t.width;if("IMG"===(null==r?void 0:r.nodeName)&&a)if(null===(i=e.detail)||void 0===i?void 0:i.dataAttr){if(this.isElementEligibleForResizing(r))if(this.shouldRevertToOriginalSizes(r,a))this.revertToOriginalSizesIfNeeded(r)&&e.preventDefault();else{var o=this.triggerEvent(r,c,{resizeWidth:a});if(o.defaultPrevented)this.revertToOriginalSizesIfNeeded(r)&&e.preventDefault();else{a=(null===(n=o.detail)||void 0===n?void 0:n.resizeWidth)||a;var s=this.getDataSrc(r);this.isFromSmushCDN(s)&&(this.resizeImageWithCDN(r,a),this.isChildOfPicture(r)&&this.resizeSourceElements(r.parentNode.querySelectorAll("source"),a))}}}else this.getOriginalSizesAttr(r)||e.preventDefault()}},{key:"shouldAutoResize",value:function(e,t){var i=e.parentNode;if(i&&this.isInlineElement(i)){if("PICTURE"===i.nodeName)return!1;var n=i.clientWidth,r=e.offsetWidth;if(t===n&&n===r)return!1}return!0}},{key:"isInlineElement",value:function(e){if(!e||1!==e.nodeType)return!1;var t=window.getComputedStyle(e).display;return"inline"===t||"inline-block"===t}},{key:"isChildOfPicture",value:function(e){var t;return e&&"PICTURE"===(null==e||null===(t=e.parentNode)||void 0===t?void 0:t.nodeName)}},{key:"resizeSourceElements",value:function(e,t){var i=this;e&&null!=e&&e.length&&e.forEach(function(e){return i.resizeSourceElement(e,t)})}},{key:"resizeSourceElement",value:function(e,t){var i=e.getAttribute(f);if(i){var n=this.parseSrcSet(i);if(n&&n.length)if(1===n.length&&""===n[0].unit)this.resizeNonResponsiveSource(e,n[0].src,t);else{var r=this.getBaseSourceSrcForResize(n,t);this.isFromSmushCDN(r)&&this.updateSrcsetForResize(e,i,r,t,n)}}}},{key:"resizeNonResponsiveSource",value:function(e,t,i){if(this.isFromSmushCDN(t)&&this.isSourceActive(e)){var n=this.getResizedCDNURL(t,i),r=this.getPixelRatio();if(r>1){var a=Math.ceil(i*r),o=this.getResizedCDNURL(t,a)+" "+a+h;n+=" ".concat(i).concat(h,", ").concat(o)}this.updateElementSrcset(e,null,n)}}},{key:"isSourceActive",value:function(e){var t,i=e.getAttribute("media");return!(i&&(null===(t=window)||void 0===t||null===(t=t.matchMedia(i))||void 0===t||!t.matches))}},{key:"getBaseSourceSrcForResize",value:function(e,t){var i=e[0];return h!==i.unit?null:!this.isThumbnail(i.src)||i.value>=t?i.src:null}},{key:"isElementEligibleForResizing",value:function(e){var t=this.getOriginalSizesAttr(e),i=this.getDataSrc(e),n=this.getDataSrcSet(e);return Boolean(t&&i&&n)}},{key:"shouldRevertToOriginalSizes",value:function(e,t){if("auto"===this.getElementWidth(e))return this.shouldSkipAutoWidth();var i=this.getOriginalSizesAttr(e),n=this.getMaxWidthFromSizes(i);return!(!(n&&t>n)||this.isChildOfPicture(e))||!this.shouldAutoResize(e,t)}},{key:"triggerEvent",value:function(e,t){var i=new CustomEvent(t,{detail:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},bubbles:!(arguments.length>3&&void 0!==arguments[3])||arguments[3],cancelable:!(arguments.length>4&&void 0!==arguments[4])||arguments[4]});return e.dispatchEvent(i),i}},{key:"shouldSkipAutoWidth",value:function(){return this.skipAutoWidth}},{key:"resizeImageWithCDN",value:function(e,t){var i=this.getDataSrcSet(e),n=this.getDataSrc(e);if(i&&n){var r=this.parseSrcSet(i),a=this.getBaseImageSrcForResize(n,r,t);this.updateSrcsetForResize(e,i,a,t,r)}}},{key:"updateSrcsetForResize",value:function(e,t,i,n,r){var a=this.updateSrcsetWithTargetWidth(t,i,n,r);a=this.updateSrcsetWithRetinaWidth(a,i,n,r),this.updateElementSrcset(e,t,a)}},{key:"getBaseImageSrcForResize",value:function(e,t,i){if(!this.isThumbnail(e))return e;var n=t.find(function(e){return e.value>=i});return n?n.src:e}},{key:"isThumbnail",value:function(e){return new RegExp("(-\\d+x\\d+)\\.(".concat(v.join("|"),")(?:\\?.+)?$"),"i").test(e)}},{key:"updateSrcsetWithTargetWidth",value:function(e,t,i,n){return this.findSimilarSource(n,i)?e:e+", "+this.getResizedCDNURL(t,i)+" "+i+h}},{key:"updateSrcsetWithRetinaWidth",value:function(e,t,i,n){var r=this.getPixelRatio();if(r<=1)return e;var a=Math.ceil(i*r);return this.findSimilarSource(n,r,"x")||this.findSimilarSource(n,a,h)?e:e+", "+this.getResizedCDNURL(t,a)+" "+a+h}},{key:"updateElementSrcset",value:function(e,t,i){i!==t&&e.setAttribute("data-srcset",i)}},{key:"getPixelRatio",value:function(){return window.devicePixelRatio||1}},{key:"findSimilarSource",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.precision;return e.find(function(e){return n===e.unit&&e.value>=t&&i.isFuzzyMatch(e.value,t,r)})}},{key:"getResizedCDNURL",value:function(e,t){var i=this.parseURL(e);if(i){var n=new URLSearchParams(i.search);n.set("size","".concat(t,"x0"));var r=i.origin+i.pathname;return"".concat(r,"?").concat(n.toString())}}},{key:"parseURL",value:function(e){try{return new URL(e)}catch(e){return null}}},{key:"parseSrcSet",value:function(e){var t=this.extractSourcesFromSrcSet(e);return this.sortSources(t)}},{key:"extractSourcesFromSrcSet",value:function(e){return e.split(",").map(function(e){var t=a(e.trim().split(/\s+/),2),i=t[0],n=t[1],r=0,o="";return n&&(n.endsWith(h)?(r=parseInt(n,10),o=h):n.endsWith("x")&&(r=parseFloat(n),o="x")),{markup:e,src:i,value:r,unit:o}})}},{key:"sortSources",value:function(e){return e.sort(function(e,t){return e.value===t.value?0:e.value>t.value?-1:1}),e}},{key:"revertToOriginalSizesIfNeeded",value:function(e){var t=this.getOriginalSizesAttr(e);return!!t&&(e.setAttribute("sizes",t),e.removeAttribute(d),!0)}},{key:"getElementWidth",value:function(e){var t,i=null===(t=e.style)||void 0===t?void 0:t.width;if(i&&"auto"===i.trim())return"auto";var n=window.getComputedStyle(e).width,r=parseInt(n,10);return isNaN(r)?n:r}},{key:"getMaxWidthFromSizes",value:function(e){var t=e.match(/\(max-width:\s*(\d+)px\)\s*100vw,\s*\1px/);return t?parseInt(t[1],10):0}},{key:"getOriginalSizesAttr",value:function(e){return e.getAttribute(d)}},{key:"getDataSrcSet",value:function(e){return e.getAttribute(f)}},{key:"getDataSrc",value:function(e){return e.getAttribute("data-src")}},{key:"isFromSmushCDN",value:function(e){return e&&e.includes("smushcdn.com")}},{key:"isFuzzyMatch",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.abs(e-t)<=i}}],t&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}();!function(e,t){if(null===(e=window.smushLazyLoadOptions)||void 0===e?void 0:e.autoResizingEnabled){var i=(null===(t=window.smushLazyLoadOptions)||void 0===t?void 0:t.autoResizeOptions)||{};i=Object.assign({precision:5,skipAutoWidth:!0},i),new y(i)}}()},356:function(e,t,i){"use strict";i.d(t,{G:function(){return a}});var n=i(6879),r=i.n(n),a=function(e){return e===r()||JSON.stringify((null==e?void 0:e.cfg)||{})===JSON.stringify((null===r()||void 0===r()?void 0:r().cfg)||{})};t.A=r()},9566:function(e,t,i){"use strict";i.r(t);var n=i(356);document.addEventListener("lazybeforeunveil",function(e){var t;(0,n.G)(null==e||null===(t=e.detail)||void 0===t?void 0:t.instance)&&function(e){var t=e.getAttribute("data-bg-image")||e.getAttribute("data-bg"),i=e.hasAttribute("data-bg-image")?"background-image":"background";if(t){var n,r=e.getAttribute("style")||"",a="".concat(i,": ").concat(t,";"),o=new RegExp("".concat(i,"\\s*:\\s*[^;]+;?"));n=o.test(r)?r.replace(o,a):r.length>0?r.replace(/;$/g,"")+";"+a:a,e.setAttribute("style",n.trim())}}(e.target)})},5380:function(e,t,i){"use strict";i.r(t);var n,r,a,o,s,u,l,c=i(356);function d(e){return d="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},d(e)}function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function v(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}r="smush-lazyload-video",a="smush-lazyloaded-video",o="smush-lazyload-autoplay",s="ontouchstart"in window?"touchstart":"pointerdown",u=Number(null===(n=window)||void 0===n?void 0:n.smush_video_render_delay)||0,l=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldDelayVideoRenderingForMobile=this.supportsIntersectionObserver(),this.queuedVideoElements=[],this.isMobileOrSafari=null,this.init()},t=[{key:"init",value:function(){var e=this;document.addEventListener("lazybeforeunveil",function(t){return e.handleVideoLazyLoad(t)}),document.addEventListener(s,function(){return e.enableVideoRenderingForMobile()},{once:!0,passive:!0}),document.addEventListener("DOMContentLoaded",function(){u<=0?document.querySelector(".".concat(r,".").concat(o))&&e.enableVideoRenderingForMobile():setTimeout(function(){return e.enableVideoRenderingForMobile()},u)})}},{key:"handleVideoLazyLoad",value:function(e){var t,i=e.target;(0,c.G)(null==e||null===(t=e.detail)||void 0===t?void 0:t.instance)&&i.classList.contains(r)&&(this.handleButtonPlay(i),this.maybePrepareVideoForPlay(i))}},{key:"handleButtonPlay",value:function(e){var t=this,i=e.querySelector(".".concat("smush-play-btn"));if(i){var n=function(){return t.loadIframeVideoWithAutoPlay(e)};i.addEventListener("click",n),i.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n())})}else{var r;this.loadIframeVideo(e),null===(r=window.console)||void 0===r||r.warning("Missing play button [.smush-play-btn] for video element:",e)}}},{key:"maybePrepareVideoForPlay",value:function(e){var t=e.classList.contains(o);this.shouldPrepareIframeForPlay()?this.maybePrepareVideoForMobileAndSafari(e,t):t&&this.loadIframeVideoWithAutoPlay(e)}},{key:"enableVideoRenderingForMobile",value:function(){this.shouldDelayVideoRenderingForMobile&&(this.shouldDelayVideoRenderingForMobile=!1,this.maybeObserveQueuedVideoElements())}},{key:"supportsIntersectionObserver",value:function(){return"IntersectionObserver"in window}},{key:"maybeObserveQueuedVideoElements",value:function(){this.queuedVideoElements.length&&this.observeQueuedVideoElements()}},{key:"observeQueuedVideoElements",value:function(){var e=this,t=new IntersectionObserver(function(i){i.forEach(function(i){if(i.isIntersecting){var n=i.target;e.loadIframeVideo(n),t.unobserve(n)}})},{rootMargin:"0px 0px 200px 0px",threshold:.1});this.queuedVideoElements.forEach(function(e){t.observe(e)})}},{key:"maybePrepareVideoForMobileAndSafari",value:function(e,t){this.shouldDelayVideoRenderingForMobile?this.queuedVideoElements.push(e):this.loadIframeVideo(e,t)}},{key:"shouldPrepareIframeForPlay",value:function(){return null===this.isMobileOrSafari&&(this.isMobileOrSafari=this.checkIfMobileOrSafari()),this.isMobileOrSafari}},{key:"checkIfMobileOrSafari",value:function(){var e=navigator.userAgent;return e.includes("Mobi")||e.includes("Safari")&&!e.includes("Chrome")}},{key:"loadIframeVideo",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.classList.contains(a)){e.classList.add(a,"loading");var n=e.querySelector("iframe");if(n){var r=null===(t=n.dataset)||void 0===t?void 0:t.src;if(r){if(i){var o=new URL(r);o.searchParams.set("autoplay","1"),o.searchParams.set("playsinline","1"),r=o.toString()}var s=n.getAttribute("allow")||"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture";s.includes("autoplay")||(s+="; autoplay"),n.setAttribute("allow",s),n.setAttribute("allowFullscreen","true"),n.setAttribute("src",r),e.classList.remove("loading")}else{var u;null===(u=window.console)||void 0===u||u.error("Missing data-src attribute for iframe:",n)}}else{var l;null===(l=window.console)||void 0===l||l.error("Missing iframe element in video wrapper:",e)}}}},{key:"loadIframeVideoWithAutoPlay",value:function(e){this.loadIframeVideo(e,!0)}}],t&&f(e.prototype,t),i&&f(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}(),new l},6879:function(e){!function(t){var i=function(e,t,i){"use strict";var n,r;if(function(){var t,i={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in r=e.lazySizesConfig||e.lazysizesConfig||{},i)t in r||(r[t]=i[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:r,noSupport:!0};var a=t.documentElement,o=e.HTMLPictureElement,s="addEventListener",u="getAttribute",l=e[s].bind(e),c=e.setTimeout,d=e.requestAnimationFrame||c,f=e.requestIdleCallback,v=/^picture$/i,h=["load","error","lazyincluded","_lazyloaded"],y={},m=Array.prototype.forEach,g=function(e,t){return y[t]||(y[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),y[t].test(e[u]("class")||"")&&y[t]},p=function(e,t){g(e,t)||e.setAttribute("class",(e[u]("class")||"").trim()+" "+t)},b=function(e,t){var i;(i=g(e,t))&&e.setAttribute("class",(e[u]("class")||"").replace(i," "))},S=function(e,t,i){var n=i?s:"removeEventListener";i&&S(e,t),h.forEach(function(i){e[n](i,t)})},z=function(e,i,r,a,o){var s=t.createEvent("Event");return r||(r={}),r.instance=n,s.initEvent(i,!a,!o),s.detail=r,e.dispatchEvent(s),s},w=function(t,i){var n;!o&&(n=e.picturefill||r.pf)?(i&&i.src&&!t[u]("srcset")&&t.setAttribute("srcset",i.src),n({reevaluate:!0,elements:[t]})):i&&i.src&&(t.src=i.src)},E=function(e,t){return(getComputedStyle(e,null)||{})[t]},A=function(e,t,i){for(i=i||e.offsetWidth;i<r.minSize&&t&&!e._lazysizesWidth;)i=t.offsetWidth,t=t.parentNode;return i},k=(pe=[],be=[],Se=pe,ze=function(){var e=Se;for(Se=pe.length?be:pe,me=!0,ge=!1;e.length;)e.shift()();me=!1},we=function(e,i){me&&!i?e.apply(this,arguments):(Se.push(e),ge||(ge=!0,(t.hidden?c:d)(ze)))},we._lsFlush=ze,we),C=function(e,t){return t?function(){k(e)}:function(){var t=this,i=arguments;k(function(){e.apply(t,i)})}},R=function(e){var t,n=0,a=r.throttleDelay,o=r.ricTimeout,s=function(){t=!1,n=i.now(),e()},u=f&&o>49?function(){f(s,{timeout:o}),o!==r.ricTimeout&&(o=r.ricTimeout)}:C(function(){c(s)},!0);return function(e){var r;(e=!0===e)&&(o=33),t||(t=!0,(r=a-(i.now()-n))<0&&(r=0),e||r<9?u():c(u,r))}},O=function(e){var t,n,r=99,a=function(){t=null,e()},o=function(){var e=i.now()-n;e<r?c(o,r-e):(f||a)(a)};return function(){n=i.now(),t||(t=c(o,r))}},M=(Q=/^img$/i,Z=/^iframe$/i,J="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),Y=0,K=0,X=0,ee=-1,te=function(e){X--,(!e||X<0||!e.target)&&(X=0)},ie=function(e){return null==G&&(G="hidden"==E(t.body,"visibility")),G||!("hidden"==E(e.parentNode,"visibility")&&"hidden"==E(e,"visibility"))},ne=function(e,i){var n,r=e,o=ie(e);for(U-=i,H+=i,q-=i,$+=i;o&&(r=r.offsetParent)&&r!=t.body&&r!=a;)(o=(E(r,"opacity")||1)>0)&&"visible"!=E(r,"overflow")&&(n=r.getBoundingClientRect(),o=$>n.left&&q<n.right&&H>n.top-1&&U<n.bottom+1);return o},re=function(){var e,i,o,s,l,c,d,f,v,h,y,m,g=n.elements;if((T=r.loadMode)&&X<8&&(e=g.length)){for(i=0,ee++;i<e;i++)if(g[i]&&!g[i]._lazyRace)if(!J||n.prematureUnveil&&n.prematureUnveil(g[i]))fe(g[i]);else if((f=g[i][u]("data-expand"))&&(c=1*f)||(c=K),h||(h=!r.expand||r.expand<1?a.clientHeight>500&&a.clientWidth>500?500:370:r.expand,n._defEx=h,y=h*r.expFactor,m=r.hFac,G=null,K<y&&X<1&&ee>2&&T>2&&!t.hidden?(K=y,ee=0):K=T>1&&ee>1&&X<6?h:Y),v!==c&&(j=innerWidth+c*m,B=innerHeight+c,d=-1*c,v=c),o=g[i].getBoundingClientRect(),(H=o.bottom)>=d&&(U=o.top)<=B&&($=o.right)>=d*m&&(q=o.left)<=j&&(H||$||q||U)&&(r.loadHidden||ie(g[i]))&&(D&&X<3&&!f&&(T<3||ee<4)||ne(g[i],c))){if(fe(g[i]),l=!0,X>9)break}else!l&&D&&!s&&X<4&&ee<4&&T>2&&(x[0]||r.preloadAfterLoad)&&(x[0]||!f&&(H||$||q||U||"auto"!=g[i][u](r.sizesAttr)))&&(s=x[0]||g[i]);s&&!l&&fe(s)}},ae=R(re),oe=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(te(e),p(t,r.loadedClass),b(t,r.loadingClass),S(t,ue),z(t,"lazyloaded"))},se=C(oe),ue=function(e){se({target:e.target})},le=function(e,t){var i=e.getAttribute("data-load-mode")||r.iframeLoadMode;0==i?e.contentWindow.location.replace(t):1==i&&(e.src=t)},ce=function(e){var t,i=e[u](r.srcsetAttr);(t=r.customMedia[e[u]("data-media")||e[u]("media")])&&e.setAttribute("media",t),i&&e.setAttribute("srcset",i)},de=C(function(e,t,i,n,a){var o,s,l,d,f,h;(f=z(e,"lazybeforeunveil",t)).defaultPrevented||(n&&(i?p(e,r.autosizesClass):e.setAttribute("sizes",n)),s=e[u](r.srcsetAttr),o=e[u](r.srcAttr),a&&(d=(l=e.parentNode)&&v.test(l.nodeName||"")),h=t.firesLoad||"src"in e&&(s||o||d),f={target:e},p(e,r.loadingClass),h&&(clearTimeout(_),_=c(te,2500),S(e,ue,!0)),d&&m.call(l.getElementsByTagName("source"),ce),s?e.setAttribute("srcset",s):o&&!d&&(Z.test(e.nodeName)?le(e,o):e.src=o),a&&(s||d)&&w(e,{src:o})),e._lazyRace&&delete e._lazyRace,b(e,r.lazyClass),k(function(){var t=e.complete&&e.naturalWidth>1;h&&!t||(t&&p(e,r.fastLoadedClass),oe(f),e._lazyCache=!0,c(function(){"_lazyCache"in e&&delete e._lazyCache},9)),"lazy"==e.loading&&X--},!0)}),fe=function(e){if(!e._lazyRace){var t,i=Q.test(e.nodeName),n=i&&(e[u](r.sizesAttr)||e[u]("sizes")),a="auto"==n;(!a&&D||!i||!e[u]("src")&&!e.srcset||e.complete||g(e,r.errorClass)||!g(e,r.lazyClass))&&(t=z(e,"lazyunveilread").detail,a&&L.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,X++,de(e,t,a,n,i))}},ve=O(function(){r.loadMode=3,ae()}),he=function(){3==r.loadMode&&(r.loadMode=2),ve()},ye=function(){D||(i.now()-V<999?c(ye,999):(D=!0,r.loadMode=3,ae(),l("scroll",he,!0)))},{_:function(){V=i.now(),n.elements=t.getElementsByClassName(r.lazyClass),x=t.getElementsByClassName(r.lazyClass+" "+r.preloadClass),l("scroll",ae,!0),l("resize",ae,!0),l("pageshow",function(e){if(e.persisted){var i=t.querySelectorAll("."+r.loadingClass);i.length&&i.forEach&&d(function(){i.forEach(function(e){e.complete&&fe(e)})})}}),e.MutationObserver?new MutationObserver(ae).observe(a,{childList:!0,subtree:!0,attributes:!0}):(a[s]("DOMNodeInserted",ae,!0),a[s]("DOMAttrModified",ae,!0),setInterval(ae,999)),l("hashchange",ae,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){t[s](e,ae,!0)}),/d$|^c/.test(t.readyState)?ye():(l("load",ye),t[s]("DOMContentLoaded",ae),c(ye,2e4)),n.elements.length?(re(),k._lsFlush()):ae()},checkElems:ae,unveil:fe,_aLSL:he}),L=(F=C(function(e,t,i,n){var r,a,o;if(e._lazysizesWidth=n,n+="px",e.setAttribute("sizes",n),v.test(t.nodeName||""))for(a=0,o=(r=t.getElementsByTagName("source")).length;a<o;a++)r[a].setAttribute("sizes",n);i.detail.dataAttr||w(e,i.detail)}),I=function(e,t,i){var n,r=e.parentNode;r&&(i=A(e,r,i),(n=z(e,"lazybeforesizes",{width:i,dataAttr:!!t})).defaultPrevented||(i=n.detail.width)&&i!==e._lazysizesWidth&&F(e,r,n,i))},W=O(function(){var e,t=P.length;if(t)for(e=0;e<t;e++)I(P[e])}),{_:function(){P=t.getElementsByClassName(r.autosizesClass),l("resize",W)},checkElems:W,updateElem:I}),N=function(){!N.i&&t.getElementsByClassName&&(N.i=!0,L._(),M._())};var P,F,I,W;var x,D,_,T,V,j,B,U,q,$,H,G,Q,Z,J,Y,K,X,ee,te,ie,ne,re,ae,oe,se,ue,le,ce,de,fe,ve,he,ye;var me,ge,pe,be,Se,ze,we;return c(function(){r.init&&N()}),n={cfg:r,autoSizer:L,loader:M,init:N,uP:w,aC:p,rC:b,hC:g,fire:z,gW:A,rAF:k}}(t,t.document,Date);t.lazySizes=i,e.exports&&(e.exports=i)}("undefined"!=typeof window?window:{})}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.dn=function(e){(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},function(){"use strict";var e=window.lazySizesConfig||null;e&&delete window.lazySizesConfig;var t=function(){e?window.lazySizesConfig=e:"lazySizesConfig"in window&&delete window.lazySizesConfig};i.dn(t);var n=i(356);i(9566),i(5380),i(5574),n.A.init(),t()}()}();