!function (a){ function b(){ } function c(a){ function c(b){ b.prototype.option||(b.prototype.option=function (b){ a.isPlainObject(b)&&(this.options=a.extend(!0, this.options, b)) }) } function e(b, c){ a.fn[b]=function (e){ if("string"==typeof e){ for (var g=d.call(arguments, 1), h=0, i=this.length; i > h; h++){ var j=this[h], k=a.data(j, b); if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){ var l=k[e].apply(k, g); if(void 0!==l)return l } else f("no such method '" + e + "' for " + b + " instance"); else f("cannot call methods on " + b + " prior to initialization; attempted to call '" + e + "'") } return this } return this.each(function (){ var d=a.data(this, b); d ? (d.option(e), d._init()):(d=new c(this, e), a.data(this, b, d)) }) }} if(a){ var f="undefined"==typeof console ? b:function (a){ console.error(a) }; return a.bridget=function (a, b){ c(b), e(a, b) }, a.bridget }} var d=Array.prototype.slice; "function"==typeof define&&define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], c):c(a.jQuery) }(window), function (a){ function b(b){ var c=a.event; return c.target=c.target||c.srcElement||b, c } var c=document.documentElement, d=function (){ }; c.addEventListener ? d=function (a, b, c){ a.addEventListener(b, c, !1) }:c.attachEvent&&(d=function (a, c, d){ a[c + d]=d.handleEvent ? function (){ var c=b(a); d.handleEvent.call(d, c) }:function (){ var c=b(a); d.call(a, c) }, a.attachEvent("on" + c, a[c + d]) }); var e=function (){ }; c.removeEventListener ? e=function (a, b, c){ a.removeEventListener(b, c, !1) }:c.detachEvent&&(e=function (a, b, c){ a.detachEvent("on" + b, a[b + c]); try { delete a[b + c] } catch (d){ a[b + c]=void 0 }}); var f={bind: d, unbind: e}; "function"==typeof define&&define.amd ? define("eventie/eventie", f):"object"==typeof exports ? module.exports=f:a.eventie=f }(this), function (a){ function b(a){ "function"==typeof a&&(b.isReady ? a():f.push(a)) } function c(a){ var c="readystatechange"===a.type&&"complete"!==e.readyState; if(!b.isReady&&!c){ b.isReady = !0; for (var d=0, g=f.length; g > d; d++){ var h=f[d]; h() }} } function d(d){ return d.bind(e, "DOMContentLoaded", c), d.bind(e, "readystatechange", c), d.bind(a, "load", c), b } var e=a.document, f=[]; b.isReady = !1, "function"==typeof define&&define.amd ? (b.isReady="function"==typeof requirejs, define("doc-ready/doc-ready", ["eventie/eventie"], d)):a.docReady=d(a.eventie) }(this), function (){ function a(){ } function b(a, b){ for (var c=a.length; c--;)if(a[c].listener===b)return c; return -1 } function c(a){ return function (){ return this[a].apply(this, arguments) }} var d=a.prototype, e=this, f=e.EventEmitter; d.getListeners=function (a){ var b, c, d=this._getEvents(); if(a instanceof RegExp){ b={}; for (c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c]) } else b=d[a]||(d[a]=[]); return b }, d.flattenListeners=function (a){ var b, c=[]; for (b=0; b < a.length; b +=1)c.push(a[b].listener); return c }, d.getListenersAsObject=function (a){ var b, c=this.getListeners(a); return c instanceof Array&&(b={}, b[a]=c), b||c }, d.addListener=function (a, c){ var d, e=this.getListenersAsObject(a), f="object"==typeof c; for (d in e)e.hasOwnProperty(d)&&-1===b(e[d], c)&&e[d].push(f ? c:{listener: c, once: !1}); return this }, d.on=c("addListener"), d.addOnceListener=function (a, b){ return this.addListener(a, {listener: b, once: !0}) }, d.once=c("addOnceListener"), d.defineEvent=function (a){ return this.getListeners(a), this }, d.defineEvents=function (a){ for (var b=0; b < a.length; b +=1)this.defineEvent(a[b]); return this }, d.removeListener=function (a, c){ var d, e, f=this.getListenersAsObject(a); for (e in f)f.hasOwnProperty(e)&&(d=b(f[e], c), -1!==d&&f[e].splice(d, 1)); return this }, d.off=c("removeListener"), d.addListeners=function (a, b){ return this.manipulateListeners(!1, a, b) }, d.removeListeners=function (a, b){ return this.manipulateListeners(!0, a, b) }, d.manipulateListeners=function (a, b, c){ var d, e, f=a ? this.removeListener:this.addListener, g=a ? this.removeListeners:this.addListeners; if("object"!=typeof b||b instanceof RegExp)for (d=c.length; d--;)f.call(this, b, c[d]); else for (d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e ? f.call(this, d, e):g.call(this, d, e)); return this }, d.removeEvent=function (a){ var b, c=typeof a, d=this._getEvents(); if("string"===c)delete d[a]; else if(a instanceof RegExp)for (b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b]; else delete this._events; return this }, d.removeAllListeners=c("removeEvent"), d.emitEvent=function (a, b){ var c, d, e, f, g=this.getListenersAsObject(a); for (e in g)if(g.hasOwnProperty(e))for (d=g[e].length; d--;)c=g[e][d], c.once===!0&&this.removeListener(a, c.listener), f=c.listener.apply(this, b||[]), f===this._getOnceReturnValue()&&this.removeListener(a, c.listener); return this }, d.trigger=c("emitEvent"), d.emit=function (a){ var b=Array.prototype.slice.call(arguments, 1); return this.emitEvent(a, b) }, d.setOnceReturnValue=function (a){ return this._onceReturnValue=a, this }, d._getOnceReturnValue=function (){ return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue:!0 }, d._getEvents=function (){ return this._events||(this._events={}) }, a.noConflict=function (){ return e.EventEmitter=f, a }, "function"==typeof define&&define.amd ? define("eventEmitter/EventEmitter", [], function (){ return a }):"object"==typeof module&&module.exports ? module.exports=a:this.EventEmitter=a }.call(this), function (a){ function b(a){ if(a){ if("string"==typeof d[a])return a; a=a.charAt(0).toUpperCase() + a.slice(1); for (var b, e=0, f=c.length; f > e; e++)if(b=c[e] + a, "string"==typeof d[b])return b }} var c="Webkit Moz ms Ms O".split(" "), d=document.documentElement.style; "function"==typeof define&&define.amd ? define("get-style-property/get-style-property", [], function (){ return b }):"object"==typeof exports ? module.exports=b:a.getStyleProperty=b }(window), function (a){ function b(a){ var b=parseFloat(a), c=-1===a.indexOf("%")&&!isNaN(b); return c&&b } function c(){ for (var a={ width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, b=0, c=g.length; c > b; b++){ var d=g[b]; a[d]=0 } return a } function d(a){ function d(a){ if("string"==typeof a&&(a=document.querySelector(a)), a&&"object"==typeof a&&a.nodeType){ var d=f(a); if("none"===d.display)return c(); var e={}; e.width=a.offsetWidth, e.height=a.offsetHeight; for (var k=e.isBorderBox = !(!j||!d[j]||"border-box"!==d[j]), l=0, m=g.length; m > l; l++){ var n=g[l], o=d[n]; o=h(a, o); var p=parseFloat(o); e[n]=isNaN(p) ? 0:p } var q=e.paddingLeft + e.paddingRight, r=e.paddingTop + e.paddingBottom, s=e.marginLeft + e.marginRight, t=e.marginTop + e.marginBottom, u=e.borderLeftWidth + e.borderRightWidth, v=e.borderTopWidth + e.borderBottomWidth, w=k&&i, x=b(d.width); x!==!1&&(e.width=x + (w ? 0:q + u)); var y=b(d.height); return y!==!1&&(e.height=y + (w ? 0:r + v)), e.innerWidth=e.width - (q + u), e.innerHeight=e.height - (r + v), e.outerWidth=e.width + s, e.outerHeight=e.height + t, e }} function h(a, b){ if(e||-1===b.indexOf("%"))return b; var c=a.style, d=c.left, f=a.runtimeStyle, g=f&&f.left; return g&&(f.left=a.currentStyle.left), c.left=b, b=c.pixelLeft, c.left=d, g&&(f.left=g), b } var i, j=a("boxSizing"); return function (){ if(j){ var a=document.createElement("div"); a.style.width="200px", a.style.padding="1px 2px 3px 4px", a.style.borderStyle="solid", a.style.borderWidth="1px 2px 3px 4px", a.style[j]="border-box"; var c=document.body||document.documentElement; c.appendChild(a); var d=f(a); i=200===b(d.width), c.removeChild(a) }}(), d } var e=a.getComputedStyle, f=e ? function (a){ return e(a, null) }:function (a){ return a.currentStyle }, g=["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; "function"==typeof define&&define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], d):"object"==typeof exports ? module.exports=d(require("get-style-property")):a.getSize=d(a.getStyleProperty) }(window), function (a, b){ function c(a, b){ return a[h](b) } function d(a){ if(!a.parentNode){ var b=document.createDocumentFragment(); b.appendChild(a) }} function e(a, b){ d(a); for (var c=a.parentNode.querySelectorAll(b), e=0, f=c.length; f > e; e++)if(c[e]===a)return !0; return !1 } function f(a, b){ return d(a), c(a, b) } var g, h=function (){ if(b.matchesSelector)return "matchesSelector"; for (var a=["webkit", "moz", "ms", "o"], c=0, d=a.length; d > c; c++){ var e=a[c], f=e + "MatchesSelector"; if(b[f])return f }}(); if(h){ var i=document.createElement("div"), j=c(i, "div"); g=j ? c:f } else g=e; "function"==typeof define&&define.amd ? define("matches-selector/matches-selector", [], function (){ return g }):window.matchesSelector=g }(this, Element.prototype), function (a){ function b(a, b){ for (var c in b)a[c]=b[c]; return a } function c(a){ for (var b in a)return !1; return b=null, !0 } function d(a){ return a.replace(/([A-Z])/g, function (a){ return "-" + a.toLowerCase() }) } function e(a, e, f){ function h(a, b){ a&&(this.element=a, this.layout=b, this.position={x: 0, y: 0}, this._create()) } var i=f("transition"), j=f("transform"), k=i&&j, l = !!f("perspective"), m={ WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend" }[i], n=["transform", "transition", "transitionDuration", "transitionProperty"], o=function (){ for (var a={}, b=0, c=n.length; c > b; b++){ var d=n[b], e=f(d); e&&e!==d&&(a[d]=e) } return a }(); b(h.prototype, a.prototype), h.prototype._create=function (){ this._transn={ingProperties: {}, clean: {}, onEnd: {}}, this.css({position: "absolute"}) }, h.prototype.handleEvent=function (a){ var b="on" + a.type; this[b]&&this[b](a) }, h.prototype.getSize=function (){ this.size=e(this.element) }, h.prototype.css=function (a){ var b=this.element.style; for (var c in a){ var d=o[c]||c; b[d]=a[c] }}, h.prototype.getPosition=function (){ var a=g(this.element), b=this.layout.options, c=b.isOriginLeft, d=b.isOriginTop, e=parseInt(a[c ? "left":"right"], 10), f=parseInt(a[d ? "top":"bottom"], 10); e=isNaN(e) ? 0:e, f=isNaN(f) ? 0:f; var h=this.layout.size; e -=c ? h.paddingLeft:h.paddingRight, f -=d ? h.paddingTop:h.paddingBottom, this.position.x=e, this.position.y=f }, h.prototype.layoutPosition=function (){ var a=this.layout.size, b=this.layout.options, c={}; b.isOriginLeft ? (c.left=this.position.x + a.paddingLeft + "px", c.right=""):(c.right=this.position.x + a.paddingRight + "px", c.left=""), b.isOriginTop ? (c.top=this.position.y + a.paddingTop + "px", c.bottom=""):(c.bottom=this.position.y + a.paddingBottom + "px", c.top=""), this.css(c), this.emitEvent("layout", [this]) }; var p=l ? function (a, b){ return "translate3d(" + a + "px, " + b + "px, 0)" }:function (a, b){ return "translate(" + a + "px, " + b + "px)" }; h.prototype._transitionTo=function (a, b){ this.getPosition(); var c=this.position.x, d=this.position.y, e=parseInt(a, 10), f=parseInt(b, 10), g=e===this.position.x&&f===this.position.y; if(this.setPosition(a, b), g&&!this.isTransitioning)return void this.layoutPosition(); var h=a - c, i=b - d, j={}, k=this.layout.options; h=k.isOriginLeft ? h:-h, i=k.isOriginTop ? i:-i, j.transform=p(h, i), this.transition({ to: j, onTransitionEnd: {transform: this.layoutPosition}, isCleaning: !0 }) }, h.prototype.goTo=function (a, b){ this.setPosition(a, b), this.layoutPosition() }, h.prototype.moveTo=k ? h.prototype._transitionTo:h.prototype.goTo, h.prototype.setPosition=function (a, b){ this.position.x=parseInt(a, 10), this.position.y=parseInt(b, 10) }, h.prototype._nonTransition=function (a){ this.css(a.to), a.isCleaning&&this._removeStyles(a.to); for (var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this) }, h.prototype._transition=function (a){ if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a); var b=this._transn; for (var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c]; for (c in a.to)b.ingProperties[c] = !0, a.isCleaning&&(b.clean[c] = !0); if(a.from){ this.css(a.from); var d=this.element.offsetHeight; d=null } this.enableTransition(a.to), this.css(a.to), this.isTransitioning = !0 }; var q=j&&d(j) + ",opacity"; h.prototype.enableTransition=function (){ this.isTransitioning||(this.css({ transitionProperty: q, transitionDuration: this.layout.options.transitionDuration }), this.element.addEventListener(m, this, !1)) }, h.prototype.transition=h.prototype[i ? "_transition":"_nonTransition"], h.prototype.onwebkitTransitionEnd=function (a){ this.ontransitionend(a) }, h.prototype.onotransitionend=function (a){ this.ontransitionend(a) }; var r={"-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform"}; h.prototype.ontransitionend=function (a){ if(a.target===this.element){ var b=this._transn, d=r[a.propertyName]||a.propertyName; if(delete b.ingProperties[d], c(b.ingProperties)&&this.disableTransition(), d in b.clean&&(this.element.style[a.propertyName]="", delete b.clean[d]), d in b.onEnd){ var e=b.onEnd[d]; e.call(this), delete b.onEnd[d] } this.emitEvent("transitionEnd", [this]) }}, h.prototype.disableTransition=function (){ this.removeTransitionStyles(), this.element.removeEventListener(m, this, !1), this.isTransitioning = !1 }, h.prototype._removeStyles=function (a){ var b={}; for (var c in a)b[c]=""; this.css(b) }; var s={transitionProperty: "", transitionDuration: ""}; return h.prototype.removeTransitionStyles=function (){ this.css(s) }, h.prototype.removeElem=function (){ this.element.parentNode.removeChild(this.element), this.emitEvent("remove", [this]) }, h.prototype.remove=function (){ if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem(); var a=this; this.on("transitionEnd", function (){ return a.removeElem(), !0 }), this.hide() }, h.prototype.reveal=function (){ delete this.isHidden, this.css({display: ""}); var a=this.layout.options; this.transition({from: a.hiddenStyle, to: a.visibleStyle, isCleaning: !0}) }, h.prototype.hide=function (){ this.isHidden = !0, this.css({display: ""}); var a=this.layout.options; this.transition({ from: a.visibleStyle, to: a.hiddenStyle, isCleaning: !0, onTransitionEnd: { opacity: function (){ this.isHidden&&this.css({display: "none"}) }} }) }, h.prototype.destroy=function (){ this.css({position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: ""}) }, h } var f=a.getComputedStyle, g=f ? function (a){ return f(a, null) }:function (a){ return a.currentStyle }; "function"==typeof define&&define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property"], e):(a.Outlayer={}, a.Outlayer.Item=e(a.EventEmitter, a.getSize, a.getStyleProperty)) }(window), function (a){ function b(a, b){ for (var c in b)a[c]=b[c]; return a } function c(a){ return "[object Array]"===l.call(a) } function d(a){ var b=[]; if(c(a))b=a; else if(a&&"number"==typeof a.length)for (var d=0, e=a.length; e > d; d++)b.push(a[d]); else b.push(a); return b } function e(a, b){ var c=n(b, a); -1!==c&&b.splice(c, 1) } function f(a){ return a.replace(/(.)([A-Z])/g, function (a, b, c){ return b + "-" + c }).toLowerCase() } function g(c, g, l, n, o, p){ function q(a, c){ if("string"==typeof a&&(a=h.querySelector(a)), !a||!m(a))return void(i&&i.error("Bad " + this.constructor.namespace + " element: " + a)); this.element=a, this.options=b({}, this.constructor.defaults), this.option(c); var d=++r; this.element.outlayerGUID=d, s[d]=this, this._create(), this.options.isInitLayout&&this.layout() } var r=0, s={}; return q.namespace="outlayer", q.Item=p, q.defaults={ containerStyle: {position: "relative"}, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, isResizingContainer: !0, transitionDuration: "0.4s", hiddenStyle: {opacity: 0, transform: "scale(0.001)"}, visibleStyle: {opacity: 1, transform: "scale(1)"}}, b(q.prototype, l.prototype), q.prototype.option=function (a){ b(this.options, a) }, q.prototype._create=function (){ this.reloadItems(), this.stamps=[], this.stamp(this.options.stamp), b(this.element.style, this.options.containerStyle), this.options.isResizeBound&&this.bindResize() }, q.prototype.reloadItems=function (){ this.items=this._itemize(this.element.children) }, q.prototype._itemize=function (a){ for (var b=this._filterFindItemElements(a), c=this.constructor.Item, d=[], e=0, f=b.length; f > e; e++){ var g=b[e], h=new c(g, this); d.push(h) } return d }, q.prototype._filterFindItemElements=function (a){ a=d(a); for (var b=this.options.itemSelector, c=[], e=0, f=a.length; f > e; e++){ var g=a[e]; if(m(g))if(b){ o(g, b)&&c.push(g); for (var h=g.querySelectorAll(b), i=0, j=h.length; j > i; i++)c.push(h[i]) } else c.push(g) } return c }, q.prototype.getItemElements=function (){ for (var a=[], b=0, c=this.items.length; c > b; b++)a.push(this.items[b].element); return a }, q.prototype.layout=function (){ this._resetLayout(), this._manageStamps(); var a=void 0!==this.options.isLayoutInstant ? this.options.isLayoutInstant:!this._isLayoutInited; this.layoutItems(this.items, a), this._isLayoutInited = !0 }, q.prototype._init=q.prototype.layout, q.prototype._resetLayout=function (){ this.getSize() }, q.prototype.getSize=function (){ this.size=n(this.element) }, q.prototype._getMeasurement=function (a, b){ var c, d=this.options[a]; d ? ("string"==typeof d ? c=this.element.querySelector(d):m(d)&&(c=d), this[a]=c ? n(c)[b]:d):this[a]=0 }, q.prototype.layoutItems=function (a, b){ a=this._getItemsForLayout(a), this._layoutItems(a, b), this._postLayout() }, q.prototype._getItemsForLayout=function (a){ for (var b=[], c=0, d=a.length; d > c; c++){ var e=a[c]; e.isIgnored||b.push(e) } return b }, q.prototype._layoutItems=function (a, b){ function c(){ d.emitEvent("layoutComplete", [d, a]) } var d=this; if(!a||!a.length)return void c(); this._itemsOn(a, "layout", c); for (var e=[], f=0, g=a.length; g > f; f++){ var h=a[f], i=this._getItemLayoutPosition(h); i.item=h, i.isInstant=b||h.isLayoutInstant, e.push(i) } this._processLayoutQueue(e) }, q.prototype._getItemLayoutPosition=function (){ return {x: 0, y: 0}}, q.prototype._processLayoutQueue=function (a){ for (var b=0, c=a.length; c > b; b++){ var d=a[b]; this._positionItem(d.item, d.x, d.y, d.isInstant) }}, q.prototype._positionItem=function (a, b, c, d){ d ? a.goTo(b, c):a.moveTo(b, c) }, q.prototype._postLayout=function (){ this.resizeContainer() }, q.prototype.resizeContainer=function (){ if(this.options.isResizingContainer){ var a=this._getContainerSize(); a&&(this._setContainerMeasure(a.width, !0), this._setContainerMeasure(a.height, !1)) }}, q.prototype._getContainerSize=k, q.prototype._setContainerMeasure=function (a, b){ if(void 0!==a){ var c=this.size; c.isBorderBox&&(a +=b ? c.paddingLeft + c.paddingRight + c.borderLeftWidth + c.borderRightWidth:c.paddingBottom + c.paddingTop + c.borderTopWidth + c.borderBottomWidth), a=Math.max(a, 0), this.element.style[b ? "width":"height"]=a + "px" }}, q.prototype._itemsOn=function (a, b, c){ function d(){ return e++, e===f&&c.call(g), !0 } for (var e=0, f=a.length, g=this, h=0, i=a.length; i > h; h++){ var j=a[h]; j.on(b, d) }}, q.prototype.ignore=function (a){ var b=this.getItem(a); b&&(b.isIgnored = !0) }, q.prototype.unignore=function (a){ var b=this.getItem(a); b&&delete b.isIgnored }, q.prototype.stamp=function (a){ if(a=this._find(a)){ this.stamps=this.stamps.concat(a); for (var b=0, c=a.length; c > b; b++){ var d=a[b]; this.ignore(d) }} }, q.prototype.unstamp=function (a){ if(a=this._find(a))for (var b=0, c=a.length; c > b; b++){ var d=a[b]; e(d, this.stamps), this.unignore(d) }}, q.prototype._find=function (a){ return a ? ("string"==typeof a&&(a=this.element.querySelectorAll(a)), a=d(a)):void 0 }, q.prototype._manageStamps=function (){ if(this.stamps&&this.stamps.length){ this._getBoundingRect(); for (var a=0, b=this.stamps.length; b > a; a++){ var c=this.stamps[a]; this._manageStamp(c) }} }, q.prototype._getBoundingRect=function (){ var a=this.element.getBoundingClientRect(), b=this.size; this._boundingRect={ left: a.left + b.paddingLeft + b.borderLeftWidth, top: a.top + b.paddingTop + b.borderTopWidth, right: a.right - (b.paddingRight + b.borderRightWidth), bottom: a.bottom - (b.paddingBottom + b.borderBottomWidth) }}, q.prototype._manageStamp=k, q.prototype._getElementOffset=function (a){ var b=a.getBoundingClientRect(), c=this._boundingRect, d=n(a), e={ left: b.left - c.left - d.marginLeft, top: b.top - c.top - d.marginTop, right: c.right - b.right - d.marginRight, bottom: c.bottom - b.bottom - d.marginBottom }; return e }, q.prototype.handleEvent=function (a){ var b="on" + a.type; this[b]&&this[b](a) }, q.prototype.bindResize=function (){ this.isResizeBound||(c.bind(a, "resize", this), this.isResizeBound = !0) }, q.prototype.unbindResize=function (){ this.isResizeBound&&c.unbind(a, "resize", this), this.isResizeBound = !1 }, q.prototype.onresize=function (){ function a(){ b.resize(), delete b.resizeTimeout } this.resizeTimeout&&clearTimeout(this.resizeTimeout); var b=this; this.resizeTimeout=setTimeout(a, 100) }, q.prototype.resize=function (){ this.isResizeBound&&this.needsResizeLayout()&&this.layout() }, q.prototype.needsResizeLayout=function (){ var a=n(this.element), b=this.size&&a; return b&&a.innerWidth!==this.size.innerWidth }, q.prototype.addItems=function (a){ var b=this._itemize(a); return b.length&&(this.items=this.items.concat(b)), b }, q.prototype.appended=function (a){ var b=this.addItems(a); b.length&&(this.layoutItems(b, !0), this.reveal(b)) }, q.prototype.prepended=function (a){ var b=this._itemize(a); if(b.length){ var c=this.items.slice(0); this.items=b.concat(c), this._resetLayout(), this._manageStamps(), this.layoutItems(b, !0), this.reveal(b), this.layoutItems(c) }}, q.prototype.reveal=function (a){ var b=a&&a.length; if(b)for (var c=0; b > c; c++){ var d=a[c]; d.reveal() }}, q.prototype.hide=function (a){ var b=a&&a.length; if(b)for (var c=0; b > c; c++){ var d=a[c]; d.hide() }}, q.prototype.getItem=function (a){ for (var b=0, c=this.items.length; c > b; b++){ var d=this.items[b]; if(d.element===a)return d }}, q.prototype.getItems=function (a){ if(a&&a.length){ for (var b=[], c=0, d=a.length; d > c; c++){ var e=a[c], f=this.getItem(e); f&&b.push(f) } return b }}, q.prototype.remove=function (a){ a=d(a); var b=this.getItems(a); if(b&&b.length){ this._itemsOn(b, "remove", function (){ this.emitEvent("removeComplete", [this, b]) }); for (var c=0, f=b.length; f > c; c++){ var g=b[c]; g.remove(), e(g, this.items) }} }, q.prototype.destroy=function (){ var a=this.element.style; a.height="", a.position="", a.width=""; for (var b=0, c=this.items.length; c > b; b++){ var d=this.items[b]; d.destroy() } this.unbindResize(), delete this.element.outlayerGUID, j&&j.removeData(this.element, this.constructor.namespace) }, q.data=function (a){ var b=a&&a.outlayerGUID; return b&&s[b] }, q.create=function (a, c){ function d(){ q.apply(this, arguments) } return Object.create ? d.prototype=Object.create(q.prototype):b(d.prototype, q.prototype), d.prototype.constructor=d, d.defaults=b({}, q.defaults), b(d.defaults, c), d.prototype.settings={}, d.namespace=a, d.data=q.data, d.Item=function (){ p.apply(this, arguments) }, d.Item.prototype=new p, g(function (){ for (var b=f(a), c=h.querySelectorAll(".js-" + b), e="data-" + b + "-options", g=0, k=c.length; k > g; g++){ var l, m=c[g], n=m.getAttribute(e); try { l=n&&JSON.parse(n) } catch (o){ i&&i.error("Error parsing " + e + " on " + m.nodeName.toLowerCase() + (m.id ? "#" + m.id:"") + ": " + o); continue } var p=new d(m, l); j&&j.data(m, a, p) }}), j&&j.bridget&&j.bridget(a, d), d }, q.Item=p, q } var h=a.document, i=a.console, j=a.jQuery, k=function (){ }, l=Object.prototype.toString, m="object"==typeof HTMLElement ? function (a){ return a instanceof HTMLElement }:function (a){ return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName }, n=Array.prototype.indexOf ? function (a, b){ return a.indexOf(b) }:function (a, b){ for (var c=0, d=a.length; d > c; c++)if(a[c]===b)return c; return -1 }; "function"==typeof define&&define.amd ? define("outlayer/outlayer", ["eventie/eventie", "doc-ready/doc-ready", "eventEmitter/EventEmitter", "get-size/get-size", "matches-selector/matches-selector", "./item"], g):a.Outlayer=g(a.eventie, a.docReady, a.EventEmitter, a.getSize, a.matchesSelector, a.Outlayer.Item) }(window), function (a){ function b(a, b){ var d=a.create("masonry"); return d.prototype._resetLayout=function (){ this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); var a=this.cols; for (this.colYs=[]; a--;)this.colYs.push(0); this.maxY=0 }, d.prototype.measureColumns=function (){ if(this.getContainerWidth(), !this.columnWidth){ var a=this.items[0], c=a&&a.element; this.columnWidth=c&&b(c).outerWidth||this.containerWidth } this.columnWidth +=this.gutter, this.cols=Math.floor((this.containerWidth + this.gutter) / this.columnWidth), this.cols=Math.max(this.cols, 1) }, d.prototype.getContainerWidth=function (){ var a=this.options.isFitWidth ? this.element.parentNode:this.element, c=b(a); this.containerWidth=c&&c.innerWidth }, d.prototype._getItemLayoutPosition=function (a){ a.getSize(); var b=a.size.outerWidth % this.columnWidth, d=b&&1 > b ? "round":"ceil", e=Math[d](a.size.outerWidth / this.columnWidth); e=Math.min(e, this.cols); for (var f=this._getColGroup(e), g=Math.min.apply(Math, f), h=c(f, g), i={ x: this.columnWidth * h, y: g }, j=g + a.size.outerHeight, k=this.cols + 1 - f.length, l=0; k > l; l++)this.colYs[h + l]=j; return i }, d.prototype._getColGroup=function (a){ if(2 > a)return this.colYs; for (var b=[], c=this.cols + 1 - a, d=0; c > d; d++){ var e=this.colYs.slice(d, d + a); b[d]=Math.max.apply(Math, e) } return b }, d.prototype._manageStamp=function (a){ var c=b(a), d=this._getElementOffset(a), e=this.options.isOriginLeft ? d.left:d.right, f=e + c.outerWidth, g=Math.floor(e / this.columnWidth); g=Math.max(0, g); var h=Math.floor(f / this.columnWidth); h -=f % this.columnWidth ? 0:1, h=Math.min(this.cols - 1, h); for (var i=(this.options.isOriginTop ? d.top:d.bottom) + c.outerHeight, j=g; h >=j; j++)this.colYs[j]=Math.max(i, this.colYs[j]) }, d.prototype._getContainerSize=function (){ this.maxY=Math.max.apply(Math, this.colYs); var a={height: this.maxY}; return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()), a }, d.prototype._getContainerFitWidth=function (){ for (var a=0, b=this.cols; --b&&0===this.colYs[b];)a++; return (this.cols - a) * this.columnWidth - this.gutter }, d.prototype.needsResizeLayout=function (){ var a=this.containerWidth; return this.getContainerWidth(), a!==this.containerWidth }, d } var c=Array.prototype.indexOf ? function (a, b){ return a.indexOf(b) }:function (a, b){ for (var c=0, d=a.length; d > c; c++){ var e=a[c]; if(e===b)return c } return -1 }; "function"==typeof define&&define.amd ? define(["outlayer/outlayer", "get-size/get-size"], b):a.Masonry=b(a.Outlayer, a.getSize) }(window); if(void 0===ThriveApp)var ThriveApp={};var _isAdmin=0,_is_blankPage=0;ThriveApp.is_theme_layout=!1,ThriveApp.winWidth=jQuery(window).width(),ThriveApp.viewportHeight=jQuery(window).height(),jQuery(function(){_isAdmin=jQuery("#wpadminbar").length,ThriveApp.menuPositionTop=jQuery(".m-si nav").length?jQuery(".m-si nav").position().top:0,_is_blankPage=jQuery(".bp-t").length,_is_blankPage||(ThriveApp.menuPositionTop=jQuery("nav.right").length?jQuery("nav.right").position().top:0),ThriveApp.is_theme_layout=!!(jQuery(".bSe .awr .tve-c").length+jQuery(".bp-t .wrp").length),ThriveApp.menuResponsive(),ThriveApp.shortcodeTabsResize(),ThriveApp.setPageSectionHeight(),ThriveApp.bind_comments_handlers(),ThriveApp.check_comments_hash(),ThriveApp.videoShorcode(),ThriveApp.image_post_resize(),ThriveApp.blog_gallery(),jQuery(".cdt").thrive_timer(),ThriveApp.post_format_gallery(),ThriveApp.show_search(),ThriveApp.bold_first_paragraph(),ThriveApp.grid_layout(".gin",".gr-i"),jQuery(".sm_icons, .scfm .ss").each(function(){jQuery(this).mouseover(function(){jQuery(".bubb",this).css("left",function(){return(jQuery(this).parent().width()-jQuery(this).width())/2}).show(0)}),jQuery(this).mouseout(function(){jQuery(".bubb",this).hide()})}),jQuery(".tmw").hover(function(){jQuery(this).find(".tmm").slideDown()},function(){jQuery(this).find(".tmm").slideUp()}),jQuery(".faqB").click(function(){var a=jQuery(this).parents(".faqI");return a.toggleClass("oFaq"),jQuery(".faqC",a).slideToggle("fast"),!1}),jQuery(".accss .acc-h").click(function(){var a=jQuery(this),b=jQuery(this).parents(".accs"),c=b.find(".accss");if(a.parent().hasClass("opac"))return!1;a.parents(".accs").find(".opac").find(".accsi").slideUp(function(){c.removeClass("opac")}),a.next(".accsi").slideDown(function(){a.parents(".accss").addClass("opac")})}),jQuery(".thrive-borderless .wp-video-shortcode").length>0&&(jQuery(".thrive-borderless .wp-video-shortcode").css("width","100%"),jQuery(".thrive-borderless div").css("width","100%")),ThriveApp.comments_page=1,1==ThriveApp.lazy_load_comments&&(jQuery(window).scroll(ThriveApp.bind_scroll),ThriveApp.load_comments()),jQuery(window).trigger("scroll"),ThriveApp.bind_masonry_layout(),jQuery("#shf").on("click",function(){jQuery(".lrp.hid").slideToggle()}),jQuery(window).resize(function(){var a=jQuery(window).width(),b=jQuery(window).height();ThriveApp.winWidth!==a&&ThriveApp.delay(function(){ThriveApp.menuResponsive()},1),ThriveApp.winWidth=a,ThriveApp.viewportHeight=b,ThriveApp.shortcodeTabsResize(),ThriveApp.videoShorcode(),ThriveApp.setVideoPosition(),ThriveApp.setPageSectionHeight(),ThriveApp.image_post_resize(),ThriveApp.grid_layout(".gin",".gr-i")}),jQuery("body").on("added_to_cart",function(a,b,c,d){var e=jQuery(b[".mini-cart-contents"]).find("a.cart-contents-btn");jQuery(".mobile-mini-cart").html("").append(e)}),window.FB&&window.FB.XFBML&&jQuery(".fb-comments").each(function(){window.FB.XFBML.parse(this.parentNode)})}),ThriveApp.grid_layout=function(a,b){jQuery(a).length>0&&jQuery(a).each(function(){var a=jQuery(b,this),c=a.length,d=function(b){for(var d="",e=0;e=940?d(jQuery(".bSe").hasClass("fullWidth")?3:2):940>ThriveApp.winWidth&&ThriveApp.winWidth>=741&&d(2)})},ThriveApp.bold_first_paragraph=function(){"post"==ThriveApp.post_type&&jQuery(".bSe .awr-i .tve-c").children().each(function(){var a=jQuery(this),b=jQuery.trim(a.text()),c=a.html().replace(/ /g,"");if(!a.is(":hidden")&&!a.is(":empty")){if("P"!=a.prop("tagName"))return!1;if(""!=b&&""!=c)return a.addClass("ifp"),!1;if(""!=b||""!=c)return!1}})},ThriveApp.show_search=function(){jQuery(".s-bb").on("click",function(){jQuery(".h-b").toggleClass("s-s").find("#search").focus()})},ThriveApp.bind_masonry_layout=function(){if(jQuery(".bSe").hasClass("mry")){var a=document.querySelector(".mry");new Masonry(a,{itemSelector:".mry-i",gutter:".mry-g"})}},jQuery(window).on("load",function(){ThriveApp.bind_masonry_layout(),ThriveApp.resize_blank_page()}),ThriveApp.post_format_gallery=function(){jQuery("div[id^='thrive-gallery-header']").each(function(){jQuery(this).attr("data-count",jQuery(this).find(".thrive-gallery-item").length);var a=jQuery(this),b=a.find(".gnext"),c=a.find(".gprev"),d=a.find(".gallery-dmy");jQuery(".thrive-gallery-item",a).click(function(){return a.attr("data-index",jQuery(this).attr("data-index")),a.css("background-image","url("+jQuery(this).attr("data-image")+")"),d.attr("src",jQuery(this).attr("data-image")),!1}),c.click(function(){var b=parseInt(a.attr("data-index")),c=b-1;return c<0&&(c=a.attr("data-count")-1),jQuery("#li-thrive-gallery-item-"+c,a).length>0&&(a.attr("data-index",jQuery("#li-thrive-gallery-item-"+c,a).find("a").attr("data-index")),a.css("background-image","url("+jQuery("#li-thrive-gallery-item-"+c,a).find("a").attr("data-image")+")"),d.attr("src",jQuery("#li-thrive-gallery-item-"+c,a).find("a").attr("data-image"))),!1}),b.click(function(){var b=parseInt(a.attr("data-index")),c=b+1;return c>=a.attr("data-count")&&(c=0),jQuery("#li-thrive-gallery-item-"+c,a).length>0&&(a.attr("data-index",jQuery("#li-thrive-gallery-item-"+c,a).find("a").attr("data-index")),a.css("background-image","url("+jQuery("#li-thrive-gallery-item-"+c,a).find("a").attr("data-image")+")"),d.attr("src",jQuery("#li-thrive-gallery-item-"+c,a).find("a").attr("data-image"))),!1})})},ThriveApp.progress_bar=function(){jQuery('.pbfc:not(".stopCount")').each(function(a){if(jQuery(this).parents(".nsd").hasClass("nsds")){var b=jQuery(this),c=b.attr("data-percent"),d=b.find(".pbf span");jQuery({countNum:0}).animate({countNum:c},{duration:3e3,easing:"linear",step:function(){d.text(Math.ceil(this.countNum))},done:function(){d.text()==c&&b.addClass("stopCount")}})}})},ThriveApp.number_counter=function(){jQuery(".nbc.nsds").each(function(){function a(c,f){e=Math.ceil(f/100),c<=f?(b.text(c),c+=e,c+e>f&&(b.text(f),clearTimeout(d)),d=setTimeout(function(){a(c,f)},50)):clearTimeout(d)}var b=jQuery(".nbcn",this),c=b.attr("data-counter"),d=null,e=1;"false"==jQuery(this).attr("data-started")&&(a(0,c),jQuery(this).attr("data-started","true"))})},ThriveApp.image_post_resize=function(){jQuery(".tt-dmy").css({"max-height":ThriveApp.viewportHeight,"max-width":ThriveApp.winWidth})},ThriveApp.setPageSectionHeight=function(){var a=jQuery(" .wrp .bpd,.wrp .fullWidth , .wrp .lnd "),b=a.length;b&&ThriveApp.winWidth;jQuery(".pddbg, .scvps, .vt").css("max-width",ThriveApp.winWidth+"px"),jQuery(".pdfbg").each(function(){var a=jQuery(this).css("box-sizing","border-box"),b=parseInt(a.attr("data-height")),c=parseInt(a.attr("data-width")),d="100%";if(b&&!isNaN(b)&&c&&!isNaN(c)){var e=Math.min(ThriveApp.winWidth,a.parent().width());d=(e=722){var a=jQuery(this).children(".sub-menu"),b=jQuery(this).offset().left,c=a.width(),d=jQuery(".wrp.cnt"),e=d.width(),f=d.offset().left;(bf+e)&&(a.addClass("position_menu"),bf+e&&(a.hasClass("position_left")||a.addClass("position_right"))),jQuery(this).children(".sub-menu").stop().fadeIn("fast")}else jQuery(this).children(".sub-menu").show()}),jQuery(this).mouseleave(function(){jQuery(this).children(".sub-menu").stop().fadeOut("fast")})})},ThriveApp.menuResponsive=function(){ThriveApp.winWidth<774?(jQuery("header nav ul li").each(function(){jQuery(this).unbind("mouseenter"),jQuery(this).unbind("mouseleave")}),jQuery(".hsm").unbind("click").on("click",function(){var a=jQuery("#floating_menu").height(),b=jQuery("#wpadminbar").length?46:0,c=a+b,d=ThriveApp.viewportHeight-c;jQuery(".m-si nav").fadeToggle("fast",function(){var a=jQuery("#floating_menu nav ul").height();ThriveApp.viewportHeight<=a+c&&(jQuery(".m-si nav").css({"max-height":d+"px"}),jQuery("html").addClass("html-hidden")),a<=0&&jQuery("html").removeClass("html-hidden")})})):ThriveApp.winWidth>=774&&ThriveApp.showMenu()},ThriveApp.shortcodeTabsResize=function(){jQuery(".scT ul.scT-tab li").on("click",function(a){var b=jQuery(this),c=b.parents(".shortcode_tabs, .tabs_widget").first(),d=c.find(".scTC").eq(b.index());c.find(".tS").removeClass("tS"),b.addClass("tS"),c.find(".scTC").hide(),d.show(),a.preventDefault()})},ThriveApp.delay=function(){var a=0;return function(b,c){clearTimeout(a),a=setTimeout(b,c)}}(),ThriveApp.check_comments_hash=function(){if(location.hash&&-1!==location.hash.indexOf("#comment-")){var a=location.hash.indexOf("#comment-")+9,b=location.hash.substring(a,location.hash.length),c=jQuery("#comment-container-"+b);0!==c.length&&jQuery("html,body").animate({scrollTop:c.offset().top-30},"slow")}},ThriveApp.videoShorcode=function(){jQuery("iframe").each(function(){var a=jQuery(this);this.getAttribute("src")&&-1!==this.getAttribute("src").indexOf("autoplay")&&(a.closest(".vt-v").show(),a.closest(".vt").addClass("h-vt"))}),jQuery(".scvps .pvb a").click(function(a){a.preventDefault()}),jQuery(".scvps .pvb, .vt-t .pvb").click(function(){var a=jQuery(this),b=a.parents(".scvps").length?a.parents(".scvps"):a.parents(".vt"),c=b.height(),d="scvps"===b.attr("class"),e=b.find("iframe"),f=e.attr("src");if(a.parents(".scvps").css("height",c+"px"),d?(a.parents(".vdc").find("h1").hide(),a.parents(".vdc").find("h2").hide(),a.parents(".vdc").find("h3").hide(),a.hide(),a.parents(".scvps").find(".video-container").show()):(b.addClass("h-vt"),b.find(".vt-v").fadeIn(800)),e.length>0){var g=b.outerWidth(),h=e.attr("width");if(a.hasClass("is-video-format"))var i=b.outerHeight();else var i=9*g/16;g0){var l=b.find("video")[0];a.hasClass("is-video-format"),l.player.play()}e.length>0&&-1===f.indexOf("autoplay")&&(f.indexOf("vimeo")>=0?e.attr("src",ThriveApp.updateQueryStringParameter(f,"autoplay","1")):f.indexOf("youtube")>=0&&e.attr("src",ThriveApp.updateQueryStringParameter(f,"autoplay","1")),e.trigger("click"))})},ThriveApp.bind_scroll=function(){if(jQuery("#comment-bottom").length>0){var a=jQuery("#comment-bottom").offset().top;a>0&&a')},ThriveApp._get_element_height=function(a){var b,c,d=document.getElementById(a);return document.all?(b=d.currentStyle.height,c=parseInt(d.currentStyle.marginTop,10)+parseInt(d.currentStyle.marginBottom,10)+"px"):(b=document.defaultView.getComputedStyle(d,"").getPropertyValue("height"),c=parseInt(document.defaultView.getComputedStyle(d,"").getPropertyValue("margin-top"))+parseInt(document.defaultView.getComputedStyle(d,"").getPropertyValue("margin-bottom"))+"px"),b+c},ThriveApp.updateQueryStringParameter=function(a,b,c){var d=new RegExp("([?|&])"+b+"=.*?(&|$)","i");return separator=-1!==a.indexOf("?")?"&":"?",a.match(d)?a.replace(d,"$1"+b+"="+c+"$2"):a+separator+b+"="+c},ThriveApp.social_scripts={twitter:{src:"https://platform.twitter.com/widgets.js",loaded:0},google:{src:"https://apis.google.com/js/plusone.js?onload=onLoadCallback",loaded:0},facebook:{src:"://platform.twitter.com/widgets.js",loaded:0},linkedin:{src:"//platform.linkedin.com/in.js",loaded:0},pinterest:{src:"//assets.pinterest.com/js/pinit.js",loaded:0},youtube:{src:"https://apis.google.com/js/platform.js",loaded:0}},ThriveApp.load_script=function(a){if(0===ThriveApp.social_scripts[a].loaded)if("//assets.pinterest.com/js/pinit.js"==ThriveApp.social_scripts[a].src){var b=document.createElement("script");b.type="text/javascript",b.async=!0,b.src="https://assets.pinterest.com/js/pinit.js",b["data-pin-build"]="parsePins";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),ThriveApp.social_scripts[a].loaded=1}else jQuery.getScript(ThriveApp.social_scripts[a].src,function(){ThriveApp.social_scripts[a].loaded=1})},ThriveApp.setVideoPosition=function(){jQuery(".scvps .pvb").each(function(){var a=jQuery(this).parents(".scvps").find(".vwr");a.css({top:jQuery(this).parents(".scvps").outerHeight()/2-a.height()/2,left:jQuery(this).parents(".scvps").outerWidth()/2-a.width()/2})})},ThriveApp.open_share_popup=function(a,b,c){var d,e;return d=window.screen.width/2-(b/2+10),e=window.screen.height/2-(c/2+50),window.open(a,"Window","status=no,height="+c+",width="+b+",resizable=yes,left="+d+",top="+e+",screenX="+d+",screenY="+e+",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no"),!1};var _lastScrollTop=0,_theMenu=jQuery("#floating_menu"),_nextElement=_theMenu.parents(".h-bi").next(),_floatingOption=_theMenu.attr("data-float"),_hasFloatingMenu="float-fixed"==_floatingOption||"float-scroll"==_floatingOption,_defaultPadding=_nextElement.css("padding-top"),_menuHeight=_theMenu.outerHeight(),_textLogoHeight=_theMenu.find("#text_logo").height(),_hasCenterLogo=_theMenu.find(".center").length,_custom_header=_theMenu.children("header"),_custom_header_class=_custom_header.attr("class"),_is_custom_header="hic"==_custom_header_class||"hif"==_custom_header_class,_center_header_height;ThriveApp.menu_float={current_scroll_top:0,anim_done:!1,scroll_dir:"down",hasScroll:function(){return _is_custom_header?this.current_scroll_top>_center_header_height:this.current_scroll_top>0},onScroll:function(a){return _is_custom_header&&(_center_header_height="hic"==_custom_header_class?jQuery("header .tt-dmy").height():jQuery("header").height()),this.current_scroll_top0?(ThriveApp.menu_float.hideLogo(),_theMenu.addClass("a60")):_theMenu.removeClass("a60"),"float-scroll"==_floatingOption&&("down"==this.scroll_dir?_theMenu.removeClass("mfu mfd").addClass("mfd"):_theMenu.removeClass("mfu mfd").addClass("mfu"))},hideLogo:function(){_hasCenterLogo&&(_theMenu.find("#logo img").hide(),this.anim_done||(_theMenu.find("#text_logo").stop().animate({opacity:0,height:0},50),this.anim_done=!0))},showLogo:function(){_hasCenterLogo&&(_theMenu.find("#logo img").show(),_theMenu.find("#text_logo").animate({height:_textLogoHeight,opacity:1},50),this.anim_done=!1)}},ThriveApp.show_shortcodes=function(a){jQuery(".nsd").each(function(){var b=jQuery(this);a+ThriveApp.viewportHeight>=b.offset().top+b.outerHeight()&&(b.addClass("nsds"),ThriveApp.number_counter(),ThriveApp.progress_bar())})},ThriveApp.display_no_shares=function(a){function b(){e.val(d),f.html(ThriveApp._get_share_count_display_text(d,2)),jQuery("#tt-share-count").show()}function c(a){a&&a.total&&(d=parseInt(a.total),b())}var d=0,e=jQuery("#tt-hidden-share-no"),f=jQuery("#share_no_element"),g=[];if(a.linkedin&&g.push("in_share"),a.facebook&&g.push("fb_share"),a.google&&g.push("g_share"),a.pinterest&&g.push("pin_share"),g.length){var h={action:"thrive_get_share_counts",url:a.url,networks:g};window.TVE_Dash&&!TVE_Dash.ajax_sent?jQuery(document).on("tve-dash.load",function(){TVE_Dash.add_load_item("theme_shares",h,c)}):jQuery.post(ThriveApp.ajax_url,h,c)}};var _overlayElement=jQuery(".galleryOverlay");ThriveApp.blog_gallery=function(a){return function(){function b(b,c){a('
').appendTo(c)}function c(a,b,c){c?a.removeClass("g-n-a"):a.addClass("g-n-a");var e=a.find("img[data-index="+b+"]"),g=e.attr("data-cap"),h=e.attr("data-pos");b=e.parent().index(),a.css({left:"-"+100*b+"%"}),f=b,ThriveApp.winWidth>650&&d(e),jQuery(".img_count").text(h),jQuery(".cap_txt").text(g),""!=g?jQuery(".mob_text").text(g):jQuery(".mob_text").text(" - Swipe left/right to see more")}function d(a){var b=a.parents(".galleryOverlay").first().find(".nav_close");if(!a.width())return b.css({top:"20px",right:"20px"});var c=a.position().left-a.parent().position().left+a.width(),d=a.position().top;a.width()>=ThriveApp.winWidth&&(c-=16,d+=16),_isAdmin&&a.position().top<=32&&(d+=32),b.css({top:d-16+"px",left:c-16+"px"})}var f=0,g=0;a(".gallery").each(function(){var d=a(this),h=a(this).find(".galleryOverlay"),i=a(this).find(".galleryStage"),j=d.find(".gallery-item a").length,k=!1,l=!1,m=function(){l||(f0?c(i,f-1,!0):(i.addClass("g-n-a").css("left",-100*j+"%"),l=!0,setTimeout(function(){c(i,j-1,!0),l=!1},20)))};d.find(".gallery-item a").each(function(d){a(this).click(function(){return k=!0,h.show(0).addClass("g-v"),c(i,d,!1),!1}),b(a(this),h.find(".galleryStage"))}),d.find("a.nav_prev").click(function(){return n(),!1}),d.find("a.nav_next").click(function(){return m(),!1}),d.find(".nav_close").click(function(){return k=!1,h.removeClass("g-v").hide(),!1}),d.find(".galleryWrapper").touchwipe({wipeLeft:function(){m()},wipeRight:function(){n()},wipeUp:function(){k=!1,h.removeClass("g-v").hide()},wipeDown:function(){return!1},min_move_x:20,min_move_y:20,preventDefaultEvents:!0}),ThriveApp.winWidth<=650?i.click(function(){if(a(e.target).is("img"))return!1;k=!1,h.removeClass("g-v").hide()}):(i.click(function(b){if(a(b.target).is("img"))return!1;k=!1,h.removeClass("g-v").hide()}),d.mousemove(function(b){clearTimeout(g),a(".gl_ctrl, .gl_ctrl_mob").fadeIn(200),ThriveApp.winWidth<=650||a(b.target).is(".gl_ctrl,.gl_ctrl_mob")||(g=setTimeout(function(){jQuery(".gl_ctrl, .gl_ctrl_mob").fadeOut(200)},1e3))})),a("html").unbind("keydown").keydown(function(a){return!k||(37==a.keyCode?(n(),!1):39==a.keyCode?(m(),!1):27==a.keyCode?(h.removeClass("g-v").hide(),!1):void 0)})})}}(jQuery),jQuery.fn.thrive_timer=function(){return this.each(function(){var a,b=jQuery(this),c=b.attr("data-server-now"),d=c?new Date(c):new Date,e=new Date(b.attr("data-date")),f=0,g=0,h=0,i=0,j=2,k=b.attr("data-fade"),l=b.attr("data-message"),m=function(a,b){if(a.html()==b)return a;a.removeClass("next");var c=a.clone().removeClass("go-down").addClass("next").html(b);return a.before(c).next(".go-down").remove(),a.addClass("go-down"),setTimeout(function(){c.addClass("go-down")},20),a},n=function(a,b,c){void 0===c&&(c=!1);var d=0;if(b<=99)m(a.find(".part-1").first(),b%10),m(a.find(".part-2").first(),Math.floor(b/10)),d=2;else for(;b;)d++,m(a.find(".part-"+d).first(),b%10),b=Math.floor(b/10);if(!1!==c&&de?p():(i=Math.floor((e.getTime()-d.getTime())/1e3),h=Math.floor(i/60),i%=60,g=Math.floor(h/60),h%=60,f=Math.floor(g/24),g%=24,f>99&&(j=f.toString().length),function(){var a=function(a,b){return jQuery(''+b+"")};b.find(".second .cdfc").append(a(2,Math.floor(i/10))).append(a(1,i%10)),b.find(".minute .cdfc").append(a(2,Math.floor(h/10))).append(a(1,h%10)),b.find(".hour .cdfc").append(a(2,Math.floor(g/10))).append(a(1,g%10));for(var c=b.find(".day .cdfc"),d=f,e=1;e<=j;e++)c.append(a(e,d%10)),d=Math.floor(d/10);n(c.css("min-width",35*j+"px"),f,j)}(),b.find(".cdti").addClass("init_done"),a=setInterval(o,1e3))})},jQuery(window).scroll(function(){var a=jQuery(document).scrollTop(),b=0,c=0,d=jQuery(".ssf");if(ThriveApp.is_theme_layout&&(b=_is_blankPage?jQuery(".bp-t .wrp").offset().top:jQuery(".bSe .tve-c").offset().top,c=_is_blankPage?jQuery(".bp-t .wrp").height():jQuery(".bSe .tve-c").height()),_hasFloatingMenu&&ThriveApp.menu_float.onScroll(a),ThriveApp.show_shortcodes(a),d.hasClass("apsf"))return!1;if(a+40>b)if(d.show(0),a>b+c-d.height()){d.removeClass("fpss").addClass("apss");var e=jQuery(".ssf.apss")}else{d.removeClass("apss").addClass("fpss");var e=jQuery(".ssf.fpss");if(_hasFloatingMenu&&e.css({top:_menuHeight,bottom:"auto"}),jQuery(".bSe").length)if(jQuery(".bSe").hasClass("right")){var f=parseInt(jQuery(".bSe").offset().left+jQuery(".bSe").outerWidth());e.css({left:f+36+"px",right:"auto"})}else{var f=jQuery(".bSe").offset().left;e.css({left:f-e.width()-"36",right:"auto"})}}else d.hide(0)}),ThriveApp._get_share_count_display_text=function(a,b){b=Math.pow(10,b);for(var c=["k","m"],d=c.length-1;d>=0;d--){var e=Math.pow(10,3*(d+1));if(e<=a){a=Math.round(a*b/e)/b,1e3==a&&d=a?b.css("height",ThriveApp.viewportHeight):b.css("height",a)}}; var TVE_Dash=TVE_Dash||{};if(!ThriveGlobal||!ThriveGlobal.$j){var __thrive_$oJ=window.$,ThriveGlobal={$j:jQuery.noConflict()};__thrive_$oJ&&(window.$=__thrive_$oJ)}!function(a){TVE_Dash.ajax_sent=!1;var b={},c={};TVE_Dash.add_load_item=function(d,e,f){if("function"!=typeof f&&(f=a.noop),TVE_Dash.ajax_sent){var g={},h={};return g[d]=e,h[d]=f,this.send_ajax(g,h),!0}return e?(b[d]&&console.error&&console.error(d+" ajax action already defined"),b[d]=e,c[d]=f,!0):(console.error&&console.error("missing ajax data"),!1)},TVE_Dash.ajax_load_css=function(b){a.each(b,function(b,c){b+="-css",a("link#"+b).length||a('').appendTo("head")})},TVE_Dash.ajax_load_js=function(b){var c=document.body;a.each(b,function(d,e){if(-1!==d.indexOf("_before"))return!0;var f=document.createElement("script");if(b[d+"_before"]){a('").after(c.lastChild)}d&&(f.id=d+"-script"),f.src=e,c.appendChild(f)})},TVE_Dash.send_ajax=function(b,c){a.ajax({url:tve_dash_front.ajaxurl,xhrFields:{withCredentials:!0},data:{action:"tve_dash_front_ajax",tve_dash_data:b},dataType:"json",type:"post"}).done(function(b){b&&a.isPlainObject(b)&&(b.__resources&&(b.__resources.css&&TVE_Dash.ajax_load_css(b.__resources.css),b.__resources.js&&TVE_Dash.ajax_load_js(b.__resources.js),delete b.__resources),a.each(b,function(a,b){if("function"!=typeof c[a])return!0;c[a].call(null,b)}))})},a(function(){setTimeout(function(){var d=new a.Event("tve-dash.load");return a(document).trigger(d),!a.isEmptyObject(b)&&(!(!tve_dash_front.force_ajax_send&&tve_dash_front.is_crawler)&&(TVE_Dash.send_ajax(b,c),void(TVE_Dash.ajax_sent=!0)))})})}(ThriveGlobal.$j); if(ThriveApprentice===undefined){ var ThriveApprentice={};} jQuery(document).ready(function (){ jQuery("#tt-favorite-lesson").click(function (){ var post_data={ action: 'thrive_appr_add_to_favorites', post_id: ThriveApprentice.current_post_id }; jQuery.post(ThriveApprentice.ajax_url, post_data, ThriveApprentice.favorite_handle); }); jQuery("#completed-lesson").change(function (){ var post_data={ action: 'thrive_appr_set_progress', post_id: ThriveApprentice.current_post_id, status: jQuery(this).prop('checked') ? ThriveApprentice.progress_status.completed:ThriveApprentice.progress_status.started }; jQuery.post(ThriveApprentice.ajax_url, post_data, ThriveApprentice.progress_handle); return false; }); ThriveApprentice.navigation_widget(); }); ThriveApprentice.progress_handle=function (response){ console.log(response); }; ThriveApprentice.favorite_handle=function (response){ if(jQuery("#tt-favorite-lesson").find(".heart").hasClass("fill")){ jQuery("#tt-favorite-lesson").find("span").html(ThriveApprentice.lang.add_to_fav); jQuery("#tt-favorite-lesson").find(".heart").removeClass("fill"); }else{ jQuery("#tt-favorite-lesson").find("span").html(ThriveApprentice.lang.remove_from_fav); jQuery("#tt-favorite-lesson").find(".heart").addClass("fill"); }}; ThriveApprentice.navigation_widget=function (){ jQuery('.opn .apw-b').on('click', function (e){ _parent=jQuery(this).parents('.ap-c').first(); _parent.children('.apw-i').slideToggle('fast'); e.preventDefault(); }); }; !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);