/* InView */ jQuery(function(e) { e.belowthefold = function(t, o) { var r = e(window).height() + e(window).scrollTop(); return r <= e(t).offset().top - o.threshold }, e.abovethetop = function(t, o) { var r = e(window).scrollTop(); return r >= e(t).offset().top + e(t).height() - o.threshold }, e.rightofscreen = function(t, o) { var r = e(window).width() + e(window).scrollLeft(); return r <= e(t).offset().left - o.threshold }, e.leftofscreen = function(t, o) { var r = e(window).scrollLeft(); return r >= e(t).offset().left + e(t).width() - o.threshold }, e.inviewport = function(t, o) { return !(e.rightofscreen(t, o) || e.leftofscreen(t, o) || e.belowthefold(t, o) || e.abovethetop(t, o)) }, e.extend(e.expr[":"], { "below-the-fold": function(t) { return e.belowthefold(t, { threshold: 0 }) }, "above-the-top": function(t) { return e.abovethetop(t, { threshold: 0 }) }, "left-of-screen": function(t) { return e.leftofscreen(t, { threshold: 0 }) }, "right-of-screen": function(t) { return e.rightofscreen(t, { threshold: 0 }) }, "in-viewport": function(t) { return e.inviewport(t, { threshold: 0 }) } }) }); /*! * Isotope PACKAGED v2.0.0-beta.8 * Magical sorting and filtering layouts * http://isotope.metafizzy.co */ (function(t) { function e() {} function i(t) { function i(e) { e.prototype.option || (e.prototype.option = function(e) { t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) }) } function n(e, i) { t.fn[e] = function(n) { if ("string" == typeof n) { for (var s = o.call(arguments, 1), a = 0, p = this.length; p > a; a++) { var u = this[a], h = t.data(u, e); if (h) if (t.isFunction(h[n]) && "_" !== n.charAt(0)) { var f = h[n].apply(h, s); if (void 0 !== f) return f } else r("no such method '" + n + "' for " + e + " instance"); else r("cannot call methods on " + e + " prior to initialization; " + "attempted to call '" + n + "'") } return this } return this.each(function() { var o = t.data(this, e); o ? (o.option(n), o._init()) : (o = new i(this, n), t.data(this, e, o)) }) } } if (t) { var r = "undefined" == typeof console ? e : function(t) { console.error(t) }; return t.bridget = function(t, e) { i(e), n(t, e) }, t.bridget } } var o = Array.prototype.slice; "function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], i) : i(t.jQuery) })(window), function(t) { function e(e) { var i = t.event; return i.target = i.target || i.srcElement || e, i } var i = document.documentElement, o = function() {}; i.addEventListener ? o = function(t, e, i) { t.addEventListener(e, i, !1) } : i.attachEvent && (o = function(t, i, o) { t[i + o] = o.handleEvent ? function() { var i = e(t); o.handleEvent.call(o, i) } : function() { var i = e(t); o.call(t, i) }, t.attachEvent("on" + i, t[i + o]) }); var n = function() {}; i.removeEventListener ? n = function(t, e, i) { t.removeEventListener(e, i, !1) } : i.detachEvent && (n = function(t, e, i) { t.detachEvent("on" + e, t[e + i]); try { delete t[e + i] } catch (o) { t[e + i] = void 0 } }); var r = { bind: o, unbind: n }; "function" == typeof define && define.amd ? define("eventie/eventie", r) : "object" == typeof exports ? module.exports = r : t.eventie = r }(this), function(t) { function e(t) { "function" == typeof t && (e.isReady ? t() : r.push(t)) } function i(t) { var i = "readystatechange" === t.type && "complete" !== n.readyState; if (!e.isReady && !i) { e.isReady = !0; for (var o = 0, s = r.length; s > o; o++) { var a = r[o]; a() } } } function o(o) { return o.bind(n, "DOMContentLoaded", i), o.bind(n, "readystatechange", i), o.bind(t, "load", i), e } var n = t.document, r = []; e.isReady = !1, "function" == typeof define && define.amd ? (e.isReady = "function" == typeof requirejs, define("doc-ready/doc-ready", ["eventie/eventie"], o)) : t.docReady = o(t.eventie) }(this), function() { function t() {} function e(t, e) { for (var i = t.length; i--;) if (t[i].listener === e) return i; return -1 } function i(t) { return function() { return this[t].apply(this, arguments) } } var o = t.prototype, n = this, r = n.EventEmitter; o.getListeners = function(t) { var e, i, o = this._getEvents(); if (t instanceof RegExp) { e = {}; for (i in o) o.hasOwnProperty(i) && t.test(i) && (e[i] = o[i]) } else e = o[t] || (o[t] = []); return e }, o.flattenListeners = function(t) { var e, i = []; for (e = 0; t.length > e; e += 1) i.push(t[e].listener); return i }, o.getListenersAsObject = function(t) { var e, i = this.getListeners(t); return i instanceof Array && (e = {}, e[t] = i), e || i }, o.addListener = function(t, i) { var o, n = this.getListenersAsObject(t), r = "object" == typeof i; for (o in n) n.hasOwnProperty(o) && -1 === e(n[o], i) && n[o].push(r ? i : { listener: i, once: !1 }); return this }, o.on = i("addListener"), o.addOnceListener = function(t, e) { return this.addListener(t, { listener: e, once: !0 }) }, o.once = i("addOnceListener"), o.defineEvent = function(t) { return this.getListeners(t), this }, o.defineEvents = function(t) { for (var e = 0; t.length > e; e += 1) this.defineEvent(t[e]); return this }, o.removeListener = function(t, i) { var o, n, r = this.getListenersAsObject(t); for (n in r) r.hasOwnProperty(n) && (o = e(r[n], i), -1 !== o && r[n].splice(o, 1)); return this }, o.off = i("removeListener"), o.addListeners = function(t, e) { return this.manipulateListeners(!1, t, e) }, o.removeListeners = function(t, e) { return this.manipulateListeners(!0, t, e) }, o.manipulateListeners = function(t, e, i) { var o, n, r = t ? this.removeListener : this.addListener, s = t ? this.removeListeners : this.addListeners; if ("object" != typeof e || e instanceof RegExp) for (o = i.length; o--;) r.call(this, e, i[o]); else for (o in e) e.hasOwnProperty(o) && (n = e[o]) && ("function" == typeof n ? r.call(this, o, n) : s.call(this, o, n)); return this }, o.removeEvent = function(t) { var e, i = typeof t, o = this._getEvents(); if ("string" === i) delete o[t]; else if (t instanceof RegExp) for (e in o) o.hasOwnProperty(e) && t.test(e) && delete o[e]; else delete this._events; return this }, o.removeAllListeners = i("removeEvent"), o.emitEvent = function(t, e) { var i, o, n, r, s = this.getListenersAsObject(t); for (n in s) if (s.hasOwnProperty(n)) for (o = s[n].length; o--;) i = s[n][o], i.once === !0 && this.removeListener(t, i.listener), r = i.listener.apply(this, e || []), r === this._getOnceReturnValue() && this.removeListener(t, i.listener); return this }, o.trigger = i("emitEvent"), o.emit = function(t) { var e = Array.prototype.slice.call(arguments, 1); return this.emitEvent(t, e) }, o.setOnceReturnValue = function(t) { return this._onceReturnValue = t, this }, o._getOnceReturnValue = function() { return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0 }, o._getEvents = function() { return this._events || (this._events = {}) }, t.noConflict = function() { return n.EventEmitter = r, t }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function() { return t }) : "object" == typeof module && module.exports ? module.exports = t : this.EventEmitter = t }.call(this), function(t) { function e(t) { if (t) { if ("string" == typeof o[t]) return t; t = t.charAt(0).toUpperCase() + t.slice(1); for (var e, n = 0, r = i.length; r > n; n++) if (e = i[n] + t, "string" == typeof o[e]) return e } } var i = "Webkit Moz ms Ms O".split(" "), o = document.documentElement.style; "function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function() { return e }) : "object" == typeof exports ? module.exports = e : t.getStyleProperty = e }(window), function(t) { function e(t) { var e = parseFloat(t), i = -1 === t.indexOf("%") && !isNaN(e); return i && e } function i() { for (var t = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, e = 0, i = s.length; i > e; e++) { var o = s[e]; t[o] = 0 } return t } function o(t) { function o(t) { if ("string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { var o = r(t); if ("none" === o.display) return i(); var n = {}; n.width = t.offsetWidth, n.height = t.offsetHeight; for (var h = n.isBorderBox = !(!u || !o[u] || "border-box" !== o[u]), f = 0, c = s.length; c > f; f++) { var l = s[f], d = o[l]; d = a(t, d); var y = parseFloat(d); n[l] = isNaN(y) ? 0 : y } var m = n.paddingLeft + n.paddingRight, g = n.paddingTop + n.paddingBottom, v = n.marginLeft + n.marginRight, _ = n.marginTop + n.marginBottom, I = n.borderLeftWidth + n.borderRightWidth, L = n.borderTopWidth + n.borderBottomWidth, z = h && p, S = e(o.width); S !== !1 && (n.width = S + (z ? 0 : m + I)); var b = e(o.height); return b !== !1 && (n.height = b + (z ? 0 : g + L)), n.innerWidth = n.width - (m + I), n.innerHeight = n.height - (g + L), n.outerWidth = n.width + v, n.outerHeight = n.height + _, n } } function a(t, e) { if (n || -1 === e.indexOf("%")) return e; var i = t.style, o = i.left, r = t.runtimeStyle, s = r && r.left; return s && (r.left = t.currentStyle.left), i.left = e, e = i.pixelLeft, i.left = o, s && (r.left = s), e } var p, u = t("boxSizing"); return function() { if (u) { var t = document.createElement("div"); t.style.width = "200px", t.style.padding = "1px 2px 3px 4px", t.style.borderStyle = "solid", t.style.borderWidth = "1px 2px 3px 4px", t.style[u] = "border-box"; var i = document.body || document.documentElement; i.appendChild(t); var o = r(t); p = 200 === e(o.width), i.removeChild(t) } }(), o } var n = t.getComputedStyle, r = n ? function(t) { return n(t, null) } : function(t) { return t.currentStyle }, s = ["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"], o) : "object" == typeof exports ? module.exports = o(require("get-style-property")) : t.getSize = o(t.getStyleProperty) }(window), function(t, e) { function i(t, e) { return t[a](e) } function o(t) { if (!t.parentNode) { var e = document.createDocumentFragment(); e.appendChild(t) } } function n(t, e) { o(t); for (var i = t.parentNode.querySelectorAll(e), n = 0, r = i.length; r > n; n++) if (i[n] === t) return !0; return !1 } function r(t, e) { return o(t), i(t, e) } var s, a = function() { if (e.matchesSelector) return "matchesSelector"; for (var t = ["webkit", "moz", "ms", "o"], i = 0, o = t.length; o > i; i++) { var n = t[i], r = n + "MatchesSelector"; if (e[r]) return r } }(); if (a) { var p = document.createElement("div"), u = i(p, "div"); s = u ? i : r } else s = n; "function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function() { return s }) : window.matchesSelector = s }(this, Element.prototype), function(t) { function e(t, e) { for (var i in e) t[i] = e[i]; return t } function i(t) { for (var e in t) return !1; return e = null, !0 } function o(t) { return t.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase() }) } function n(t, n, r) { function a(t, e) { t && (this.element = t, this.layout = e, this.position = { x: 0, y: 0 }, this._create()) } var p = r("transition"), u = r("transform"), h = p && u, f = !!r("perspective"), c = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend" }[p], l = ["transform", "transition", "transitionDuration", "transitionProperty"], d = function() { for (var t = {}, e = 0, i = l.length; i > e; e++) { var o = l[e], n = r(o); n && n !== o && (t[o] = n) } return t }(); e(a.prototype, t.prototype), a.prototype._create = function() { this._transn = { ingProperties: {}, clean: {}, onEnd: {} }, this.css({ position: "absolute" }) }, a.prototype.handleEvent = function(t) { var e = "on" + t.type; this[e] && this[e](t) }, a.prototype.getSize = function() { this.size = n(this.element) }, a.prototype.css = function(t) { var e = this.element.style; for (var i in t) { var o = d[i] || i; e[o] = t[i] } }, a.prototype.getPosition = function() { var t = s(this.element), e = this.layout.options, i = e.isOriginLeft, o = e.isOriginTop, n = parseInt(t[i ? "left" : "right"], 10), r = parseInt(t[o ? "top" : "bottom"], 10); n = isNaN(n) ? 0 : n, r = isNaN(r) ? 0 : r; var a = this.layout.size; n -= i ? a.paddingLeft : a.paddingRight, r -= o ? a.paddingTop : a.paddingBottom, this.position.x = n, this.position.y = r }, a.prototype.layoutPosition = function() { var t = this.layout.size, e = this.layout.options, i = {}; e.isOriginLeft ? (i.left = this.position.x + t.paddingLeft + "px", i.right = "") : (i.right = this.position.x + t.paddingRight + "px", i.left = ""), e.isOriginTop ? (i.top = this.position.y + t.paddingTop + "px", i.bottom = "") : (i.bottom = this.position.y + t.paddingBottom + "px", i.top = ""), this.css(i), this.emitEvent("layout", [this]) }; var y = f ? function(t, e) { return "translate3d(" + t + "px, " + e + "px, 0)" } : function(t, e) { return "translate(" + t + "px, " + e + "px)" }; a.prototype._transitionTo = function(t, e) { this.getPosition(); var i = this.position.x, o = this.position.y, n = parseInt(t, 10), r = parseInt(e, 10), s = n === this.position.x && r === this.position.y; if (this.setPosition(t, e), s && !this.isTransitioning) return this.layoutPosition(), void 0; var a = t - i, p = e - o, u = {}, h = this.layout.options; a = h.isOriginLeft ? a : -a, p = h.isOriginTop ? p : -p, u.transform = y(a, p), this.transition({ to: u, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: !0 }) }, a.prototype.goTo = function(t, e) { this.setPosition(t, e), this.layoutPosition() }, a.prototype.moveTo = h ? a.prototype._transitionTo : a.prototype.goTo, a.prototype.setPosition = function(t, e) { this.position.x = parseInt(t, 10), this.position.y = parseInt(e, 10) }, a.prototype._nonTransition = function(t) { this.css(t.to), t.isCleaning && this._removeStyles(t.to); for (var e in t.onTransitionEnd) t.onTransitionEnd[e].call(this) }, a.prototype._transition = function(t) { if (!parseFloat(this.layout.options.transitionDuration)) return this._nonTransition(t), void 0; var e = this._transn; for (var i in t.onTransitionEnd) e.onEnd[i] = t.onTransitionEnd[i]; for (i in t.to) e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); if (t.from) { this.css(t.from); var o = this.element.offsetHeight; o = null } this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0 }; var m = u && o(u) + ",opacity"; a.prototype.enableTransition = function() { this.isTransitioning || (this.css({ transitionProperty: m, transitionDuration: this.layout.options.transitionDuration }), this.element.addEventListener(c, this, !1)) }, a.prototype.transition = a.prototype[p ? "_transition" : "_nonTransition"], a.prototype.onwebkitTransitionEnd = function(t) { this.ontransitionend(t) }, a.prototype.onotransitionend = function(t) { this.ontransitionend(t) }; var g = { "-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform" }; a.prototype.ontransitionend = function(t) { if (t.target === this.element) { var e = this._transn, o = g[t.propertyName] || t.propertyName; if (delete e.ingProperties[o], i(e.ingProperties) && this.disableTransition(), o in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[o]), o in e.onEnd) { var n = e.onEnd[o]; n.call(this), delete e.onEnd[o] } this.emitEvent("transitionEnd", [this]) } }, a.prototype.disableTransition = function() { this.removeTransitionStyles(), this.element.removeEventListener(c, this, !1), this.isTransitioning = !1 }, a.prototype._removeStyles = function(t) { var e = {}; for (var i in t) e[i] = ""; this.css(e) }; var v = { transitionProperty: "", transitionDuration: "" }; return a.prototype.removeTransitionStyles = function() { this.css(v) }, a.prototype.removeElem = function() { this.element.parentNode.removeChild(this.element), this.emitEvent("remove", [this]) }, a.prototype.remove = function() { if (!p || !parseFloat(this.layout.options.transitionDuration)) return this.removeElem(), void 0; var t = this; this.on("transitionEnd", function() { return t.removeElem(), !0 }), this.hide() }, a.prototype.reveal = function() { delete this.isHidden, this.css({ display: "" }); var t = this.layout.options; this.transition({ from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0 }) }, a.prototype.hide = function() { this.isHidden = !0, this.css({ display: "" }); var t = this.layout.options; this.transition({ from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: { opacity: function() { this.isHidden && this.css({ display: "none" }) } } }) }, a.prototype.destroy = function() { this.css({ position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: "" }) }, a } var r = document.defaultView, s = r && r.getComputedStyle ? function(t) { return r.getComputedStyle(t, null) } : function(t) { return t.currentStyle }; "function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property"], n) : (t.Outlayer = {}, t.Outlayer.Item = n(t.EventEmitter, t.getSize, t.getStyleProperty)) }(window), function(t) { function e(t, e) { for (var i in e) t[i] = e[i]; return t } function i(t) { return "[object Array]" === f.call(t) } function o(t) { var e = []; if (i(t)) e = t; else if (t && "number" == typeof t.length) for (var o = 0, n = t.length; n > o; o++) e.push(t[o]); else e.push(t); return e } function n(t, e) { var i = l(e, t); - 1 !== i && e.splice(i, 1) } function r(t) { return t.replace(/(.)([A-Z])/g, function(t, e, i) { return e + "-" + i }).toLowerCase() } function s(i, s, f, l, d, y) { function m(t, i) { if ("string" == typeof t && (t = a.querySelector(t)), !t || !c(t)) return p && p.error("Bad " + this.constructor.namespace + " element: " + t), void 0; this.element = t, this.options = e({}, this.options), this.option(i); var o = ++v; this.element.outlayerGUID = o, _[o] = this, this._create(), this.options.isInitLayout && this.layout() } function g(t, i) { t.prototype[i] = e({}, m.prototype[i]) } var v = 0, _ = {}; return m.namespace = "outlayer", m.Item = y, m.prototype.options = { containerStyle: { position: "relative" }, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, transitionDuration: "0.4s", hiddenStyle: { opacity: 0, transform: "scale(0.001)" }, visibleStyle: { opacity: 1, transform: "scale(1)" } }, e(m.prototype, f.prototype), m.prototype.option = function(t) { e(this.options, t) }, m.prototype._create = function() { this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), e(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() }, m.prototype.reloadItems = function() { this.items = this._itemize(this.element.children) }, m.prototype._itemize = function(t) { for (var e = this._filterFindItemElements(t), i = this.constructor.Item, o = [], n = 0, r = e.length; r > n; n++) { var s = e[n], a = new i(s, this); o.push(a) } return o }, m.prototype._filterFindItemElements = function(t) { t = o(t); for (var e = this.options.itemSelector, i = [], n = 0, r = t.length; r > n; n++) { var s = t[n]; if (c(s)) if (e) { d(s, e) && i.push(s); for (var a = s.querySelectorAll(e), p = 0, u = a.length; u > p; p++) i.push(a[p]) } else i.push(s) } return i }, m.prototype.getItemElements = function() { for (var t = [], e = 0, i = this.items.length; i > e; e++) t.push(this.items[e].element); return t }, m.prototype.layout = function() { this._resetLayout(), this._manageStamps(); var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; this.layoutItems(this.items, t), this._isLayoutInited = !0 }, m.prototype._init = m.prototype.layout, m.prototype._resetLayout = function() { this.getSize() }, m.prototype.getSize = function() { this.size = l(this.element) }, m.prototype._getMeasurement = function(t, e) { var i, o = this.options[t]; o ? ("string" == typeof o ? i = this.element.querySelector(o) : c(o) && (i = o), this[t] = i ? l(i)[e] : o) : this[t] = 0 }, m.prototype.layoutItems = function(t, e) { t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() }, m.prototype._getItemsForLayout = function(t) { for (var e = [], i = 0, o = t.length; o > i; i++) { var n = t[i]; n.isIgnored || e.push(n) } return e }, m.prototype._layoutItems = function(t, e) { function i() { o.emitEvent("layoutComplete", [o, t]) } var o = this; if (!t || !t.length) return i(), void 0; this._itemsOn(t, "layout", i); for (var n = [], r = 0, s = t.length; s > r; r++) { var a = t[r], p = this._getItemLayoutPosition(a); p.item = a, p.isInstant = e || a.isLayoutInstant, n.push(p) } this._processLayoutQueue(n) }, m.prototype._getItemLayoutPosition = function() { return { x: 0, y: 0 } }, m.prototype._processLayoutQueue = function(t) { for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; this._positionItem(o.item, o.x, o.y, o.isInstant) } }, m.prototype._positionItem = function(t, e, i, o) { o ? t.goTo(e, i) : t.moveTo(e, i) }, m.prototype._postLayout = function() { var t = this._getContainerSize(); t && (this._setContainerMeasure(t.width, !0), this._setContainerMeasure(t.height, !1)) }, m.prototype._getContainerSize = h, m.prototype._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" } }, m.prototype._itemsOn = function(t, e, i) { function o() { return n++, n === r && i.call(s), !0 } for (var n = 0, r = t.length, s = this, a = 0, p = t.length; p > a; a++) { var u = t[a]; u.on(e, o) } }, m.prototype.ignore = function(t) { var e = this.getItem(t); e && (e.isIgnored = !0) }, m.prototype.unignore = function(t) { var e = this.getItem(t); e && delete e.isIgnored }, m.prototype.stamp = function(t) { if (t = this._find(t)) { this.stamps = this.stamps.concat(t); for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; this.ignore(o) } } }, m.prototype.unstamp = function(t) { if (t = this._find(t)) for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; n(o, this.stamps), this.unignore(o) } }, m.prototype._find = function(t) { return t ? ("string" == typeof t && (t = this.element.querySelectorAll(t)), t = o(t)) : void 0 }, m.prototype._manageStamps = function() { if (this.stamps && this.stamps.length) { this._getBoundingRect(); for (var t = 0, e = this.stamps.length; e > t; t++) { var i = this.stamps[t]; this._manageStamp(i) } } }, m.prototype._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) } }, m.prototype._manageStamp = h, m.prototype._getElementOffset = function(t) { var e = t.getBoundingClientRect(), i = this._boundingRect, o = l(t), n = { left: e.left - i.left - o.marginLeft, top: e.top - i.top - o.marginTop, right: i.right - e.right - o.marginRight, bottom: i.bottom - e.bottom - o.marginBottom }; return n }, m.prototype.handleEvent = function(t) { var e = "on" + t.type; this[e] && this[e](t) }, m.prototype.bindResize = function() { this.isResizeBound || (i.bind(t, "resize", this), this.isResizeBound = !0) }, m.prototype.unbindResize = function() { i.unbind(t, "resize", this), this.isResizeBound = !1 }, m.prototype.onresize = function() { function t() { e.resize(), delete e.resizeTimeout } this.resizeTimeout && clearTimeout(this.resizeTimeout); var e = this; this.resizeTimeout = setTimeout(t, 100) }, m.prototype.resize = function() { var t = l(this.element), e = this.size && t; e && t.innerWidth === this.size.innerWidth || this.layout() }, m.prototype.addItems = function(t) { var e = this._itemize(t); return e.length && (this.items = this.items.concat(e)), e }, m.prototype.appended = function(t) { var e = this.addItems(t); e.length && (this.layoutItems(e, !0), this.reveal(e)) }, m.prototype.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) } }, m.prototype.reveal = function(t) { var e = t && t.length; if (e) for (var i = 0; e > i; i++) { var o = t[i]; o.reveal() } }, m.prototype.hide = function(t) { var e = t && t.length; if (e) for (var i = 0; e > i; i++) { var o = t[i]; o.hide() } }, m.prototype.getItem = function(t) { for (var e = 0, i = this.items.length; i > e; e++) { var o = this.items[e]; if (o.element === t) return o } }, m.prototype.getItems = function(t) { if (t && t.length) { for (var e = [], i = 0, o = t.length; o > i; i++) { var n = t[i], r = this.getItem(n); r && e.push(r) } return e } }, m.prototype.remove = function(t) { t = o(t); var e = this.getItems(t); if (e && e.length) { this._itemsOn(e, "remove", function() { this.emitEvent("removeComplete", [this, e]) }); for (var i = 0, r = e.length; r > i; i++) { var s = e[i]; s.remove(), n(s, this.items) } } }, m.prototype.destroy = function() { var t = this.element.style; t.height = "", t.position = "", t.width = ""; for (var e = 0, i = this.items.length; i > e; e++) { var o = this.items[e]; o.destroy() } this.unbindResize(), delete this.element.outlayerGUID, u && u.removeData(this.element, this.constructor.namespace) }, m.data = function(t) { var e = t && t.outlayerGUID; return e && _[e] }, m.create = function(t, i) { function o() { m.apply(this, arguments) } return Object.create ? o.prototype = Object.create(m.prototype) : e(o.prototype, m.prototype), o.prototype.constructor = o, g(o, "options"), e(o.prototype.options, i), o.namespace = t, o.data = m.data, o.Item = function() { y.apply(this, arguments) }, o.Item.prototype = new y, s(function() { for (var e = r(t), i = a.querySelectorAll(".js-" + e), n = "data-" + e + "-options", s = 0, h = i.length; h > s; s++) { var f, c = i[s], l = c.getAttribute(n); try { f = l && JSON.parse(l) } catch (d) { p && p.error("Error parsing " + n + " on " + c.nodeName.toLowerCase() + (c.id ? "#" + c.id : "") + ": " + d); continue } var y = new o(c, f); u && u.data(c, t, y) } }), u && u.bridget && u.bridget(t, o), o }, m.Item = y, m } var a = t.document, p = t.console, u = t.jQuery, h = function() {}, f = Object.prototype.toString, c = "object" == typeof HTMLElement ? function(t) { return t instanceof HTMLElement } : function(t) { return t && "object" == typeof t && 1 === t.nodeType && "string" == typeof t.nodeName }, l = Array.prototype.indexOf ? function(t, e) { return t.indexOf(e) } : function(t, e) { for (var i = 0, o = t.length; o > i; i++) if (t[i] === e) return i; 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"], s) : t.Outlayer = s(t.eventie, t.docReady, t.EventEmitter, t.getSize, t.matchesSelector, t.Outlayer.Item) }(window), function(t) { function e(t) { function e() { t.Item.apply(this, arguments) } return e.prototype = new t.Item, e.prototype._create = function() { this.id = this.layout.itemGUID++, t.Item.prototype._create.call(this), this.sortData = {} }, e.prototype.updateSortData = function() { if (!this.isIgnored) { this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random(); var t = this.layout.options.getSortData, e = this.layout._sorters; for (var i in t) { var o = e[i]; this.sortData[i] = o(this.element, this) } } }, e } "function" == typeof define && define.amd ? define("isotope/js/item", ["outlayer/outlayer"], e) : (t.Isotope = t.Isotope || {}, t.Isotope.Item = e(t.Outlayer)) }(window), function(t) { function e(t, e) { 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) } return function() { function t(t) { return function() { return e.prototype[t].apply(this.isotope, arguments) } } for (var o = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "resize"], n = 0, r = o.length; r > n; n++) { var s = o[n]; i.prototype[s] = t(s) } }(), i.prototype.resizeVertical = function() { var e = t(this.isotope.element), i = this.isotope.size && e; i && e.innerHeight === this.isotope.size.innerHeight || this.isotope.layout() }, i.prototype._getMeasurement = function() { this.isotope._getMeasurement.apply(this, arguments) }, i.prototype.getColumnWidth = function() { this.getSegmentSize("column", "Width") }, i.prototype.getRowHeight = function() { this.getSegmentSize("row", "Height") }, i.prototype.getSegmentSize = function(t, e) { var i = t + e, o = "outer" + e; if (this._getMeasurement(i, o), !this[i]) { var n = this.getFirstItemSize(); this[i] = n && n[o] || this.isotope.size["inner" + e] } }, i.prototype.getFirstItemSize = function() { var e = this.isotope.filteredItems[0]; return e && e.element && t(e.element) }, i.prototype.layout = function() { this.isotope.layout.apply(this.isotope, arguments) }, i.prototype.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 = new i, e && (o.options = e), o.prototype.namespace = t, i.modes[t] = o, o }, i } "function" == typeof define && define.amd ? define("isotope/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], e) : (t.Isotope = t.Isotope || {}, t.Isotope.LayoutMode = e(t.getSize, t.Outlayer)) }(window), function(t) { function e(t, e) { for (var i in e) t[i] = e[i]; return t } function i(t) { return "[object Array]" === h.call(t) } function o(t) { var e = []; if (i(t)) e = t; else if (t && "number" == typeof t.length) for (var o = 0, n = t.length; n > o; o++) e.push(t[o]); else e.push(t); return e } function n(t, e) { var i = f(e, t); - 1 !== i && e.splice(i, 1) } function r(t, i, r, p, h) { function f(t, e) { return function(i, o) { for (var n = 0, r = t.length; r > n; n++) { var s = t[n], a = i.sortData[s], p = o.sortData[s]; if (a > p || p > a) { var u = void 0 !== e[s] ? e[s] : e, h = u ? 1 : -1; return (a > p ? 1 : -1) * h } } return 0 } } var c = t.create("isotope", { layoutMode: "masonry", isJQueryFiltering: !0, sortAscending: !0 }); c.Item = p, c.LayoutMode = h, c.prototype._create = function() { this.itemGUID = 0, this._sorters = {}, this._getSorters(), t.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"]; for (var e in h.modes) this._initLayoutMode(e) }, c.prototype.reloadItems = function() { this.itemGUID = 0, t.prototype.reloadItems.call(this) }, c.prototype._itemize = function() { for (var e = t.prototype._itemize.apply(this, arguments), i = 0, o = e.length; o > i; i++) { var n = e[i]; n.id = this.itemGUID++ } return this._updateItemsSortData(e), e }, c.prototype._initLayoutMode = function(t) { var i = h.modes[t], o = this.options[t] || {}; this.options[t] = i.options ? e(i.options, o) : o, this.modes[t] = new i(this) }, c.prototype.layout = function() { return !this._isLayoutInited && this.options.isInitLayout ? (this.arrange(), void 0) : (this._layout(), void 0) }, c.prototype._layout = function() { var t = this._getIsInstant(); this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, t), this._isLayoutInited = !0 }, c.prototype.arrange = function(t) { this.option(t), this._getIsInstant(), this.filteredItems = this._filter(this.items), this._sort(), this._layout() }, c.prototype._init = c.prototype.arrange, c.prototype._getIsInstant = function() { var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; return this._isInstant = t }, c.prototype._filter = function(t) { function e() { f.reveal(n), f.hide(r) } var i = this.options.filter; i = i || "*"; for (var o = [], n = [], r = [], s = this._getFilterTest(i), a = 0, p = t.length; p > a; a++) { var u = t[a]; if (!u.isIgnored) { var h = s(u); h && o.push(u), h && u.isHidden ? n.push(u) : h || u.isHidden || r.push(u) } } var f = this; return this._isInstant ? this._noTransition(e) : e(), o }, c.prototype._getFilterTest = function(t) { return s && this.options.isJQueryFiltering ? function(e) { return s(e.element).is(t) } : "function" == typeof t ? function(e) { return t(e.element) } : function(e) { return r(e.element, t) } }, c.prototype.updateSortData = function(t) { this._getSorters(), t = o(t); var e = this.getItems(t); e = e.length ? e : this.items, this._updateItemsSortData(e) }, c.prototype._getSorters = function() { var t = this.options.getSortData; for (var e in t) { var i = t[e]; this._sorters[e] = l(i) } }, c.prototype._updateItemsSortData = function(t) { for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; o.updateSortData() } }; var l = function() { function t(t) { if ("string" != typeof t) return t; var i = a(t).split(" "), o = i[0], n = o.match(/^\[(.+)\]$/), r = n && n[1], s = e(r, o), p = c.sortDataParsers[i[1]]; return t = p ? function(t) { return t && p(s(t)) } : function(t) { return t && s(t) } } function e(t, e) { var i; return i = t ? function(e) { return e.getAttribute(t) } : function(t) { var i = t.querySelector(e); return i && u(i) } } return t }(); c.sortDataParsers = { parseInt: function(t) { return parseInt(t, 10) }, parseFloat: function(t) { return parseFloat(t) } }, c.prototype._sort = function() { var t = this.options.sortBy; if (t) { var e = [].concat.apply(t, this.sortHistory), i = f(e, this.options.sortAscending); this.filteredItems.sort(i), t !== this.sortHistory[0] && this.sortHistory.unshift(t) } }, c.prototype._mode = function() { var t = this.options.layoutMode, e = this.modes[t]; if (!e) throw Error("No layout mode: " + t); return e.options = this.options[t], e }, c.prototype._resetLayout = function() { t.prototype._resetLayout.call(this), this._mode()._resetLayout() }, c.prototype._getItemLayoutPosition = function(t) { return this._mode()._getItemLayoutPosition(t) }, c.prototype._manageStamp = function(t) { var e = this._mode(); e.options.isOriginLeft = this.options.isOriginLeft, e.options.isOriginTop = this.options.isOriginTop, e._manageStamp(t) }, c.prototype._getContainerSize = function() { return this._mode()._getContainerSize() }, c.prototype.resize = function() { this._mode().resize() }, c.prototype.appended = function(t) { var e = this.addItems(t); if (e.length) { var i = this._filterRevealAdded(e); this.filteredItems = this.filteredItems.concat(i) } }, c.prototype.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(); var o = this._filterRevealAdded(e); this.layoutItems(i), this.filteredItems = o.concat(this.filteredItems) } }, c.prototype._filterRevealAdded = function(t) { var e = this._noTransition(function() { return this._filter(t) }); return this.layoutItems(e, !0), this.reveal(e), t }, c.prototype.insert = function(t) { var e = this.addItems(t); if (e.length) { var i, o, n = e.length; for (i = 0; n > i; i++) o = e[i], this.element.appendChild(o.element); var r = this._filter(e); for (this._noTransition(function() { this.hide(r) }), i = 0; n > i; i++) e[i].isLayoutInstant = !0; for (this.arrange(), i = 0; n > i; i++) delete e[i].isLayoutInstant; this.reveal(r) } }; var d = c.prototype.remove; return c.prototype.remove = function(t) { t = o(t); var e = this.getItems(t); if (d.call(this, t), e && e.length) for (var i = 0, r = e.length; r > i; i++) { var s = e[i]; n(s, this.filteredItems) } }, c.prototype._noTransition = function(t) { var e = this.options.transitionDuration; this.options.transitionDuration = 0; var i = t.call(this); return this.options.transitionDuration = e, i }, c } var s = t.jQuery, a = String.prototype.trim ? function(t) { return t.trim() } : function(t) { return t.replace(/^\s+|\s+$/g, "") }, p = document.documentElement, u = p.textContent ? function(t) { return t.textContent } : function(t) { return t.innerText }, h = Object.prototype.toString, f = Array.prototype.indexOf ? function(t, e) { return t.indexOf(e) } : function(t, e) { for (var i = 0, o = t.length; o > i; i++) if (t[i] === e) return i; return -1 }; "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "matches-selector/matches-selector", "isotope/js/item", "isotope/js/layout-mode"], r) : t.Isotope = r(t.Outlayer, t.getSize, t.matchesSelector, t.Isotope.Item, t.Isotope.LayoutMode) }(window), function(t) { function e(t, e) { var o = t.create("masonry"); return o.prototype._resetLayout = function() { this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); var t = this.cols; for (this.colYs = []; t--;) this.colYs.push(0); this.maxY = 0 }, o.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 } this.columnWidth += this.gutter, this.cols = Math.floor((this.containerWidth + this.gutter) / this.columnWidth), this.cols = Math.max(this.cols, 1) }, o.prototype.getContainerWidth = function() { var t = this.options.isFitWidth ? this.element.parentNode : this.element, i = e(t); this.containerWidth = i && i.innerWidth }, o.prototype._getItemLayoutPosition = function(t) { t.getSize(); var e = t.size.outerWidth % this.columnWidth, o = e && 1 > e ? "round" : "ceil", n = Math[o](t.size.outerWidth / this.columnWidth); n = Math.min(n, this.cols); for (var r = this._getColGroup(n), s = Math.min.apply(Math, r), a = i(r, s), p = { x: this.columnWidth * a, y: s }, u = s + t.size.outerHeight, h = this.cols + 1 - r.length, f = 0; h > f; f++) this.colYs[a + f] = u; return p }, o.prototype._getColGroup = function(t) { if (2 > t) return this.colYs; for (var e = [], i = this.cols + 1 - t, o = 0; i > o; o++) { var n = this.colYs.slice(o, o + t); e[o] = Math.max.apply(Math, n) } return e }, o.prototype._manageStamp = function(t) { var i = e(t), o = this._getElementOffset(t), n = this.options.isOriginLeft ? o.left : o.right, r = n + i.outerWidth, s = Math.floor(n / this.columnWidth); s = Math.max(0, s); var a = Math.floor(r / this.columnWidth); a -= r % this.columnWidth ? 0 : 1, a = Math.min(this.cols - 1, a); for (var p = (this.options.isOriginTop ? o.top : o.bottom) + i.outerHeight, u = s; a >= u; u++) this.colYs[u] = Math.max(p, this.colYs[u]) }, o.prototype._getContainerSize = function() { this.maxY = Math.max.apply(Math, this.colYs); var t = { height: this.maxY }; return this.options.isFitWidth && (t.width = this._getContainerFitWidth()), t }, o.prototype._getContainerFitWidth = function() { for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];) t++; return (this.cols - t) * this.columnWidth - this.gutter }, o.prototype.resize = function() { var t = this.containerWidth; this.getContainerWidth(), t !== this.containerWidth && this.layout() }, o } var i = Array.prototype.indexOf ? function(t, e) { return t.indexOf(e) } : function(t, e) { for (var i = 0, o = t.length; o > i; i++) { var n = t[i]; if (n === e) return i } return -1 }; "function" == typeof define && define.amd ? define("masonry/masonry", ["outlayer/outlayer", "get-size/get-size"], e) : t.Masonry = e(t.Outlayer, t.getSize) }(window), function(t) { function e(t, e) { for (var i in e) t[i] = e[i]; return t } function i(t, i) { var o = t.create("masonry"), n = o.prototype._getElementOffset, r = o.prototype.layout, s = o.prototype._getMeasurement; e(o.prototype, i.prototype), o.prototype._getElementOffset = n, o.prototype.layout = r, o.prototype._getMeasurement = s; var a = o.prototype.measureColumns; return o.prototype.measureColumns = function() { this.items = this.isotope.filteredItems, a.call(this) }, o } "function" == typeof define && define.amd ? define("isotope/js/layout-modes/masonry", ["../layout-mode", "masonry/masonry"], i) : i(t.Isotope.LayoutMode, t.Masonry) }(window), function(t) { function e(t) { var e = t.create("fitRows"); return e.prototype._resetLayout = function() { this.x = 0, this.y = 0, this.maxY = 0 }, e.prototype._getItemLayoutPosition = function(t) { t.getSize(), 0 !== this.x && t.size.outerWidth + this.x > this.isotope.size.innerWidth && (this.x = 0, this.y = this.maxY); var e = { x: this.x, y: this.y }; return this.maxY = Math.max(this.maxY, this.y + t.size.outerHeight), this.x += t.size.outerWidth, e }, e.prototype._getContainerSize = function() { return { height: this.maxY } }, e } "function" == typeof define && define.amd ? define("isotope/js/layout-modes/fit-rows", ["../layout-mode"], e) : e(t.Isotope.LayoutMode) }(window), function(t) { function e(t) { var e = t.create("vertical", { horizontalAlignment: 0 }); return e.prototype._resetLayout = function() { this.y = 0 }, e.prototype._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 } }, e.prototype._getContainerSize = function() { return { height: this.y } }, e } "function" == typeof define && define.amd ? define("isotope/js/layout-modes/vertical", ["../layout-mode"], e) : e(t.Isotope.LayoutMode) }(window); /* Simple Placeholder */ ! function(l) { l.simplePlaceholder = { placeholderClass: null, hidePlaceholder: function() { var e = l(this); e.val() == e.attr("placeholder") && e.data(l.simplePlaceholder.placeholderData) && e.val("").removeClass(l.simplePlaceholder.placeholderClass).data(l.simplePlaceholder.placeholderData, !1) }, showPlaceholder: function() { var e = l(this); "" == e.val() && e.val(e.attr("placeholder")).addClass(l.simplePlaceholder.placeholderClass).data(l.simplePlaceholder.placeholderData, !0) }, preventPlaceholderSubmit: function() { return l(this).find(".simple-placeholder").each(function() { var e = l(this); e.val() == e.attr("placeholder") && e.data(l.simplePlaceholder.placeholderData) && e.val("") }), !0 } }, l.fn.simplePlaceholder = function(e) { if (void 0 == document.createElement("input").placeholder) { var a = { placeholderClass: "placeholding", placeholderData: "simplePlaceholder.placeholding" }; e && l.extend(a, e), l.extend(l.simplePlaceholder, a), this.each(function() { var e = l(this); e.focus(l.simplePlaceholder.hidePlaceholder), e.blur(l.simplePlaceholder.showPlaceholder), e.data(l.simplePlaceholder.placeholderData, !1), "" == e.val() && (e.val(e.attr("placeholder")), e.addClass(l.simplePlaceholder.placeholderClass), e.data(l.simplePlaceholder.placeholderData, !0)), e.addClass("simple-placeholder"), l(this.form).submit(l.simplePlaceholder.preventPlaceholderSubmit) }) } return this } }(jQuery); /* jQuery Easing */ window.Modernizr = function(e, t, n) { function r(e) { g.cssText = e } function a(e, t) { return typeof e === t } function i(e, t) { return !!~("" + e).indexOf(t) } function o(e, t) { for (var r in e) { var a = e[r]; if (!i(a, "-") && g[a] !== n) return "pfx" == t ? a : !0 } return !1 } function u(e, t, r) { for (var i in e) { var o = t[e[i]]; if (o !== n) return r === !1 ? e[i] : a(o, "function") ? o.bind(r || t) : o } return !1 } function c(e, t, n) { var r = e.charAt(0).toUpperCase() + e.slice(1), i = (e + " " + E.join(r + " ") + r).split(" "); return a(t, "string") || a(t, "undefined") ? o(i, t) : (i = (e + " " + O.join(r + " ") + r).split(" "), u(i, t, n)) } var s, l, f, d = "2.6.2", p = {}, h = !0, m = t.documentElement, v = "modernizr", y = t.createElement(v), g = y.style, M = ({}.toString, " -webkit- -moz- -o- -ms- ".split(" ")), b = "Webkit Moz O ms", E = b.split(" "), O = b.toLowerCase().split(" "), w = {}, j = [], I = j.slice, C = function(e, n, r, a) { var i, o, u, c, s = t.createElement("div"), l = t.body, f = l || t.createElement("body"); if (parseInt(r, 10)) for (; r--;) u = t.createElement("div"), u.id = a ? a[r] : v + (r + 1), s.appendChild(u); return i = ["­", '"].join(""), s.id = v, (l ? s : f).innerHTML += i, f.appendChild(s), l || (f.style.background = "", f.style.overflow = "hidden", c = m.style.overflow, m.style.overflow = "hidden", m.appendChild(f)), o = n(s, e), l ? s.parentNode.removeChild(s) : (f.parentNode.removeChild(f), m.style.overflow = c), !!o }, S = {}.hasOwnProperty; f = a(S, "undefined") || a(S.call, "undefined") ? function(e, t) { return t in e && a(e.constructor.prototype[t], "undefined") } : function(e, t) { return S.call(e, t) }, Function.prototype.bind || (Function.prototype.bind = function(e) { var t = this; if ("function" != typeof t) throw new TypeError; var n = I.call(arguments, 1), r = function() { if (this instanceof r) { var a = function() {}; a.prototype = t.prototype; var i = new a, o = t.apply(i, n.concat(I.call(arguments))); return Object(o) === o ? o : i } return t.apply(e, n.concat(I.call(arguments))) }; return r }), w.csstransforms3d = function() { var e = !!c("perspective"); return e && "webkitPerspective" in m.style && C("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function(t) { e = 9 === t.offsetLeft && 3 === t.offsetHeight }), e }; for (var x in w) f(w, x) && (l = x.toLowerCase(), p[l] = w[x](), j.push((p[l] ? "" : "no-") + l)); return p.addTest = function(e, t) { if ("object" == typeof e) for (var r in e) f(e, r) && p.addTest(r, e[r]); else { if (e = e.toLowerCase(), p[e] !== n) return p; t = "function" == typeof t ? t() : t, "undefined" != typeof h && h && (m.className += " " + (t ? "" : "no-") + e), p[e] = t } return p }, r(""), y = s = null, function(e, t) { function n(e, t) { var n = e.createElement("p"), r = e.getElementsByTagName("head")[0] || e.documentElement; return n.innerHTML = "x", r.insertBefore(n.lastChild, r.firstChild) } function r() { var e = y.elements; return "string" == typeof e ? e.split(" ") : e } function a(e) { var t = v[e[h]]; return t || (t = {}, m++, e[h] = m, v[m] = t), t } function i(e, n, r) { if (n || (n = t), l) return n.createElement(e); r || (r = a(n)); var i; return i = r.cache[e] ? r.cache[e].cloneNode() : p.test(e) ? (r.cache[e] = r.createElem(e)).cloneNode() : r.createElem(e), i.canHaveChildren && !d.test(e) ? r.frag.appendChild(i) : i } function o(e, n) { if (e || (e = t), l) return e.createDocumentFragment(); n = n || a(e); for (var i = n.frag.cloneNode(), o = 0, u = r(), c = u.length; c > o; o++) i.createElement(u[o]); return i } function u(e, t) { t.cache || (t.cache = {}, t.createElem = e.createElement, t.createFrag = e.createDocumentFragment, t.frag = t.createFrag()), e.createElement = function(n) { return y.shivMethods ? i(n, e, t) : t.createElem(n) }, e.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + r().join().replace(/\w+/g, function(e) { return t.createElem(e), t.frag.createElement(e), 'c("' + e + '")' }) + ");return n}")(y, t.frag) } function c(e) { e || (e = t); var r = a(e); return y.shivCSS && !s && !r.hasCSS && (r.hasCSS = !!n(e, "article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")), l || u(e, r), e } var s, l, f = e.html5 || {}, d = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, p = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, h = "_html5shiv", m = 0, v = {}; ! function() { try { var e = t.createElement("a"); e.innerHTML = "", s = "hidden" in e, l = 1 == e.childNodes.length || function() { t.createElement("a"); var e = t.createDocumentFragment(); return "undefined" == typeof e.cloneNode || "undefined" == typeof e.createDocumentFragment || "undefined" == typeof e.createElement }() } catch (n) { s = !0, l = !0 } }(); var y = { elements: f.elements || "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video", shivCSS: f.shivCSS !== !1, supportsUnknownElements: l, shivMethods: f.shivMethods !== !1, type: "default", shivDocument: c, createElement: i, createDocumentFragment: o }; e.html5 = y, c(t) }(this, t), p._version = d, p._prefixes = M, p._domPrefixes = O, p._cssomPrefixes = E, p.testProp = function(e) { return o([e]) }, p.testAllProps = c, p.testStyles = C, m.className = m.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (h ? " js " + j.join(" ") : ""), p }(this, this.document), function(e, t, n) { function r(e) { return "[object Function]" == v.call(e) } function a(e) { return "string" == typeof e } function i() {} function o(e) { return !e || "loaded" == e || "complete" == e || "uninitialized" == e } function u() { var e = y.shift(); g = 1, e ? e.t ? h(function() { ("c" == e.t ? d.injectCss : d.injectJs)(e.s, 0, e.a, e.x, e.e, 1) }, 0) : (e(), u()) : g = 0 } function c(e, n, r, a, i, c, s) { function l(t) { if (!p && o(f.readyState) && (M.r = p = 1, !g && u(), f.onload = f.onreadystatechange = null, t)) { "img" != e && h(function() { E.removeChild(f) }, 50); for (var r in C[n]) C[n].hasOwnProperty(r) && C[n][r].onload() } } var s = s || d.errorTimeout, f = t.createElement(e), p = 0, v = 0, M = { t: r, s: n, e: i, a: c, x: s }; 1 === C[n] && (v = 1, C[n] = []), "object" == e ? f.data = n : (f.src = n, f.type = e), f.width = f.height = "0", f.onerror = f.onload = f.onreadystatechange = function() { l.call(this, v) }, y.splice(a, 0, M), "img" != e && (v || 2 === C[n] ? (E.insertBefore(f, b ? null : m), h(l, s)) : C[n].push(f)) } function s(e, t, n, r, i) { return g = 0, t = t || "j", a(e) ? c("c" == t ? w : O, e, t, this.i++, n, r, i) : (y.splice(this.i++, 0, e), 1 == y.length && u()), this } function l() { var e = d; return e.loader = { load: s, i: 0 }, e } var f, d, p = t.documentElement, h = e.setTimeout, m = t.getElementsByTagName("script")[0], v = {}.toString, y = [], g = 0, M = "MozAppearance" in p.style, b = M && !!t.createRange().compareNode, E = b ? p : m.parentNode, p = e.opera && "[object Opera]" == v.call(e.opera), p = !!t.attachEvent && !p, O = M ? "object" : p ? "script" : "img", w = p ? "script" : O, j = Array.isArray || function(e) { return "[object Array]" == v.call(e) }, I = [], C = {}, S = { timeout: function(e, t) { return t.length && (e.timeout = t[0]), e } }; d = function(e) { function t(e) { var t, n, r, e = e.split("!"), a = I.length, i = e.pop(), o = e.length, i = { url: i, origUrl: i, prefixes: e }; for (n = 0; o > n; n++) r = e[n].split("="), (t = S[r.shift()]) && (i = t(i, r)); for (n = 0; a > n; n++) i = I[n](i); return i } function o(e, a, i, o, u) { var c = t(e), s = c.autoCallback; c.url.split(".").pop().split("?").shift(), c.bypass || (a && (a = r(a) ? a : a[e] || a[o] || a[e.split("/").pop().split("?")[0]]), c.instead ? c.instead(e, a, i, o, u) : (C[c.url] ? c.noexec = !0 : C[c.url] = 1, i.load(c.url, c.forceCSS || !c.forceJS && "css" == c.url.split(".").pop().split("?").shift() ? "c" : n, c.noexec, c.attrs, c.timeout), (r(a) || r(s)) && i.load(function() { l(), a && a(c.origUrl, u, o), s && s(c.origUrl, u, o), C[c.url] = 2 }))) } function u(e, t) { function n(e, n) { if (e) { if (a(e)) n || (f = function() { var e = [].slice.call(arguments); d.apply(this, e), p() }), o(e, f, t, 0, s); else if (Object(e) === e) for (c in u = function() { var t, n = 0; for (t in e) e.hasOwnProperty(t) && n++; return n }(), e) e.hasOwnProperty(c) && (!n && !--u && (r(f) ? f = function() { var e = [].slice.call(arguments); d.apply(this, e), p() } : f[c] = function(e) { return function() { var t = [].slice.call(arguments); e && e.apply(this, t), p() } }(d[c])), o(e[c], f, t, c, s)) } else !n && p() } var u, c, s = !!e.test, l = e.load || e.both, f = e.callback || i, d = f, p = e.complete || i; n(s ? e.yep : e.nope, !!l), l && n(l) } var c, s, f = this.yepnope.loader; if (a(e)) o(e, 0, f, 0); else if (j(e)) for (c = 0; c < e.length; c++) s = e[c], a(s) ? o(s, 0, f, 0) : j(s) ? d(s) : Object(s) === s && u(s, f); else Object(e) === e && u(e, f) }, d.addPrefix = function(e, t) { S[e] = t }, d.addFilter = function(e) { I.push(e) }, d.errorTimeout = 1e4, null == t.readyState && t.addEventListener && (t.readyState = "loading", t.addEventListener("DOMContentLoaded", f = function() { t.removeEventListener("DOMContentLoaded", f, 0), t.readyState = "complete" }, 0)), e.yepnope = l(), e.yepnope.executeStack = u, e.yepnope.injectJs = function(e, n, r, a, c, s) { var l, f, p = t.createElement("script"), a = a || d.errorTimeout; p.src = e; for (f in r) p.setAttribute(f, r[f]); n = s ? u : n || i, p.onreadystatechange = p.onload = function() { !l && o(p.readyState) && (l = 1, n(), p.onload = p.onreadystatechange = null) }, h(function() { l || (l = 1, n(1)) }, a), c ? p.onload() : m.parentNode.insertBefore(p, m) }, e.yepnope.injectCss = function(e, n, r, a, o, c) { var s, a = t.createElement("link"), n = c ? u : n || i; a.href = e, a.rel = "stylesheet", a.type = "text/css"; for (s in r) a.setAttribute(s, r[s]); o || (m.parentNode.insertBefore(a, m), h(n, 0)) } }(this, document), Modernizr.load = function() { yepnope.apply(window, [].slice.call(arguments, 0)) }, jQuery.easing.jswing = jQuery.easing.swing, jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function(e, t, n, r, a) { return jQuery.easing[jQuery.easing.def](e, t, n, r, a) }, easeInQuad: function(e, t, n, r, a) { return r * (t /= a) * t + n }, easeOutQuad: function(e, t, n, r, a) { return -r * (t /= a) * (t - 2) + n }, easeInOutQuad: function(e, t, n, r, a) { return (t /= a / 2) < 1 ? r / 2 * t * t + n : -r / 2 * (--t * (t - 2) - 1) + n }, easeInCubic: function(e, t, n, r, a) { return r * (t /= a) * t * t + n }, easeOutCubic: function(e, t, n, r, a) { return r * ((t = t / a - 1) * t * t + 1) + n }, easeInOutCubic: function(e, t, n, r, a) { return (t /= a / 2) < 1 ? r / 2 * t * t * t + n : r / 2 * ((t -= 2) * t * t + 2) + n }, easeInQuart: function(e, t, n, r, a) { return r * (t /= a) * t * t * t + n }, easeOutQuart: function(e, t, n, r, a) { return -r * ((t = t / a - 1) * t * t * t - 1) + n }, easeInOutQuart: function(e, t, n, r, a) { return (t /= a / 2) < 1 ? r / 2 * t * t * t * t + n : -r / 2 * ((t -= 2) * t * t * t - 2) + n }, easeInQuint: function(e, t, n, r, a) { return r * (t /= a) * t * t * t * t + n }, easeOutQuint: function(e, t, n, r, a) { return r * ((t = t / a - 1) * t * t * t * t + 1) + n }, easeInOutQuint: function(e, t, n, r, a) { return (t /= a / 2) < 1 ? r / 2 * t * t * t * t * t + n : r / 2 * ((t -= 2) * t * t * t * t + 2) + n }, easeInSine: function(e, t, n, r, a) { return -r * Math.cos(t / a * (Math.PI / 2)) + r + n }, easeOutSine: function(e, t, n, r, a) { return r * Math.sin(t / a * (Math.PI / 2)) + n }, easeInOutSine: function(e, t, n, r, a) { return -r / 2 * (Math.cos(Math.PI * t / a) - 1) + n }, easeInExpo: function(e, t, n, r, a) { return 0 == t ? n : r * Math.pow(2, 10 * (t / a - 1)) + n }, easeOutExpo: function(e, t, n, r, a) { return t == a ? n + r : r * (-Math.pow(2, -10 * t / a) + 1) + n }, easeInOutExpo: function(e, t, n, r, a) { return 0 == t ? n : t == a ? n + r : (t /= a / 2) < 1 ? r / 2 * Math.pow(2, 10 * (t - 1)) + n : r / 2 * (-Math.pow(2, -10 * --t) + 2) + n }, easeInCirc: function(e, t, n, r, a) { return -r * (Math.sqrt(1 - (t /= a) * t) - 1) + n }, easeOutCirc: function(e, t, n, r, a) { return r * Math.sqrt(1 - (t = t / a - 1) * t) + n }, easeInOutCirc: function(e, t, n, r, a) { return (t /= a / 2) < 1 ? -r / 2 * (Math.sqrt(1 - t * t) - 1) + n : r / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + n }, easeInElastic: function(e, t, n, r, a) { var i = 1.70158, o = 0, u = r; if (0 == t) return n; if (1 == (t /= a)) return n + r; if (o || (o = .3 * a), u < Math.abs(r)) { u = r; var i = o / 4 } else var i = o / (2 * Math.PI) * Math.asin(r / u); return -(u * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t * a - i) * Math.PI / o)) + n }, easeOutElastic: function(e, t, n, r, a) { var i = 1.70158, o = 0, u = r; if (0 == t) return n; if (1 == (t /= a)) return n + r; if (o || (o = .3 * a), u < Math.abs(r)) { u = r; var i = o / 4 } else var i = o / (2 * Math.PI) * Math.asin(r / u); return u * Math.pow(2, -10 * t) * Math.sin(2 * (t * a - i) * Math.PI / o) + r + n }, easeInOutElastic: function(e, t, n, r, a) { var i = 1.70158, o = 0, u = r; if (0 == t) return n; if (2 == (t /= a / 2)) return n + r; if (o || (o = .3 * a * 1.5), u < Math.abs(r)) { u = r; var i = o / 4 } else var i = o / (2 * Math.PI) * Math.asin(r / u); return 1 > t ? -.5 * u * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t * a - i) * Math.PI / o) + n : u * Math.pow(2, -10 * (t -= 1)) * Math.sin(2 * (t * a - i) * Math.PI / o) * .5 + r + n }, easeInBack: function(e, t, n, r, a, i) { return void 0 == i && (i = 1.70158), r * (t /= a) * t * ((i + 1) * t - i) + n }, easeOutBack: function(e, t, n, r, a, i) { return void 0 == i && (i = 1.70158), r * ((t = t / a - 1) * t * ((i + 1) * t + i) + 1) + n }, easeInOutBack: function(e, t, n, r, a, i) { return void 0 == i && (i = 1.70158), (t /= a / 2) < 1 ? r / 2 * t * t * (((i *= 1.525) + 1) * t - i) + n : r / 2 * ((t -= 2) * t * (((i *= 1.525) + 1) * t + i) + 2) + n }, easeInBounce: function(e, t, n, r, a) { return r - jQuery.easing.easeOutBounce(e, a - t, 0, r, a) + n }, easeOutBounce: function(e, t, n, r, a) { return (t /= a) < 1 / 2.75 ? 7.5625 * r * t * t + n : 2 / 2.75 > t ? r * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + n : 2.5 / 2.75 > t ? r * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + n : r * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + n }, easeInOutBounce: function(e, t, n, r, a) { return a / 2 > t ? .5 * jQuery.easing.easeInBounce(e, 2 * t, 0, r, a) + n : .5 * jQuery.easing.easeOutBounce(e, 2 * t - a, 0, r, a) + .5 * r + n } }); /* jQuery Visible */ (function(d) { d.fn.visible = function(e, i) { var a = d(this).eq(0), f = a.get(0), c = d(window), g = c.scrollTop(); c = g + c.height(); var b = a.offset().top, h = b + a.height(); a = e === true ? h : b; b = e === true ? b : h; return !!(i === true ? f.offsetWidth * f.offsetHeight : true) && b <= c && a >= g } })(jQuery); /* jQuery Parallax */ function hbParallax(e) { var t = jQuery(e).visible(true); if (t && jQuery(window).width() > 1024) { var n = parseInt(jQuery(e).offset().top); var r = n - jQuery(window).scrollTop(); var i = -(r / 1.7); var s = "50% " + i + "px"; jQuery(e).css({ backgroundPosition: s }) } }(function(e) { e.fn.extend({ parallax: function(e) { return this.each(function() { var e = jQuery(this); hbParallax(e); jQuery(window).scroll(function() { hbParallax(e) }) }) } }) })(jQuery) /* Sticky Element */ ! function(t) { var e = { topSpacing: 0, bottomSpacing: 0, className: "stuck", wrapperClassName: "sticky-wrapper", center: !1, getWidthFrom: "" }, i = t(window), n = t(document), o = [], s = i.height(), a = function() { for (var e = i.scrollTop(), a = n.height(), r = a - s, c = e > r ? r - e : 0, p = 0; p < o.length; p++) { var l = o[p], d = l.stickyWrapper.offset().top, h = d - l.topSpacing - c; if (h >= e) null !== l.currentTop && (l.stickyElement.css("position", "").css("top", ""), l.stickyElement.removeClass(l.className), l.currentTop = null); else { var u = a - l.stickyElement.outerHeight() - l.topSpacing - l.bottomSpacing - e - c; 0 > u ? u += l.topSpacing : u = l.topSpacing, l.currentTop != u && (l.stickyElement.css("position", "fixed").css("top", u), "undefined" != typeof l.getWidthFrom && l.stickyElement.css("width", t(l.getWidthFrom).width()), l.stickyElement.addClass(l.className), l.currentTop = u) } } }, r = function() { s = i.height() }, c = { init: function(i) { var n = t.extend(e, i); return this.each(function() { var e = t(this), i = e.attr("id"), s = t("
").attr("id", i + "-sticky-wrapper").addClass(n.wrapperClassName); e.wrapAll(s), n.center && e.parent().css({ width: e.outerWidth(), marginLeft: "auto", marginRight: "auto" }), "right" == e.css("float") && e.css({ "float": "none" }).parent().css({ "float": "right" }); var a = e.parent(); a.css("height", e.outerHeight()), o.push({ topSpacing: n.topSpacing, bottomSpacing: n.bottomSpacing, stickyElement: e, currentTop: null, stickyWrapper: a, className: n.className, getWidthFrom: n.getWidthFrom }) }) }, update: a }; window.addEventListener ? (window.addEventListener("scroll", a, !1), window.addEventListener("resize", r, !1)) : window.attachEvent && (window.attachEvent("onscroll", a), window.attachEvent("onresize", r)), t.fn.sticky = function(e) { return c[e] ? c[e].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof e && e ? (t.error("Method " + e + " does not exist on jQuery.sticky"), void 0) : c.init.apply(this, arguments) }, t(function() { setTimeout(a, 0) }) }(jQuery); /* SuperFish */ ! function(e) { var s = function() { var s = { bcClass: "sf-breadcrumb", menuClass: "sf-js-enabled", anchorClass: "sf-with-ul", menuArrowClass: "sf-arrows" }, o = function() { var s = /iPhone|iPad|iPod/i.test(navigator.userAgent); return s && e(window).load(function() { e("body").children().on("click", e.noop) }), s }(), n = function() { var e = document.documentElement.style; return "behavior" in e && "fill" in e && /iemobile/i.test(navigator.userAgent) }(), t = function(e, o) { var n = s.menuClass; o.cssArrows && (n += " " + s.menuArrowClass), e.toggleClass(n) }, i = function(o, n) { return o.find("li." + n.pathClass).slice(0, n.pathLevels).addClass(n.hoverClass + " " + s.bcClass).filter(function() { return e(this).children(n.popUpSelector).hide().show().length }).removeClass(n.pathClass) }, r = function(e) { e.children("a").toggleClass(s.anchorClass) }, a = function(e) { var s = e.css("ms-touch-action"); s = "pan-y" === s ? "auto" : "pan-y", e.css("ms-touch-action", s) }, l = function(s, t) { var i = "li:has(" + t.popUpSelector + ")"; e.fn.hoverIntent && !t.disableHI ? s.hoverIntent(u, p, i) : s.on("mouseenter.superfish", i, u).on("mouseleave.superfish", i, p); var r = "MSPointerDown.superfish"; o || (r += " touchend.superfish"), n && (r += " mousedown.superfish"), s.on("focusin.superfish", "li", u).on("focusout.superfish", "li", p).on(r, "a", t, h) }, h = function(s) { var o = e(this), n = o.siblings(s.data.popUpSelector); n.length > 0 && n.is(":hidden") && (o.one("click.superfish", !1), "MSPointerDown" === s.type ? o.trigger("focus") : e.proxy(u, o.parent("li"))()) }, u = function() { var s = e(this), o = d(s); clearTimeout(o.sfTimer), s.siblings().superfish("hide").end().superfish("show") }, p = function() { var s = e(this), n = d(s); o ? e.proxy(f, s, n)() : (clearTimeout(n.sfTimer), n.sfTimer = setTimeout(e.proxy(f, s, n), n.delay)) }, f = function(s) { s.retainPath = e.inArray(this[0], s.$path) > -1, this.superfish("hide"), this.parents("." + s.hoverClass).length || (s.onIdle.call(c(this)), s.$path.length && e.proxy(u, s.$path)()) }, c = function(e) { return e.closest("." + s.menuClass) }, d = function(e) { return c(e).data("sf-options") }; return { hide: function(s) { if (this.length) { var o = this, n = d(o); if (!n) return this; var t = n.retainPath === !0 ? n.$path : "", i = o.find("li." + n.hoverClass).add(this).not(t).removeClass(n.hoverClass).children(n.popUpSelector), r = n.speedOut; s && (i.show(), r = 0), n.retainPath = !1, n.onBeforeHide.call(i), i.stop(!0, !0).animate(n.animationOut, r, function() { var s = e(this); n.onHide.call(s) }) } return this }, show: function() { var e = d(this); if (!e) return this; var s = this.addClass(e.hoverClass), o = s.children(e.popUpSelector); return e.onBeforeShow.call(o), o.stop(!0, !0).animate(e.animation, e.speed, function() { e.onShow.call(o) }), this }, destroy: function() { return this.each(function() { var o, n = e(this), i = n.data("sf-options"); return i ? (o = n.find(i.popUpSelector).parent("li"), clearTimeout(i.sfTimer), t(n, i), r(o), a(n), n.off(".superfish").off(".hoverIntent"), o.children(i.popUpSelector).attr("style", function(e, s) { return s.replace(/display[^;]+;?/g, "") }), i.$path.removeClass(i.hoverClass + " " + s.bcClass).addClass(i.pathClass), n.find("." + i.hoverClass).removeClass(i.hoverClass), i.onDestroy.call(n), n.removeData("sf-options"), void 0) : !1 }) }, init: function(o) { return this.each(function() { var n = e(this); if (n.data("sf-options")) return !1; var h = e.extend({}, e.fn.superfish.defaults, o), u = n.find(h.popUpSelector).parent("li"); h.$path = i(n, h), n.data("sf-options", h), t(n, h), r(u), a(n), l(n, h), u.not("." + s.bcClass).superfish("hide", !0), h.onInit.call(this) }) } } }(); e.fn.superfish = function(o) { return s[o] ? s[o].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof o && o ? e.error("Method " + o + " does not exist on jQuery.fn.superfish") : s.init.apply(this, arguments) }, e.fn.superfish.defaults = { popUpSelector: "ul,.sf-mega", hoverClass: "sfHover", pathClass: "overrideThisToUse", pathLevels: 1, delay: 800, animation: { opacity: "show" }, animationOut: { opacity: "hide" }, speed: "normal", speedOut: "fast", cssArrows: !0, disableHI: !1, onInit: e.noop, onBeforeShow: e.noop, onShow: e.noop, onBeforeHide: e.noop, onHide: e.noop, onIdle: e.noop, onDestroy: e.noop }, e.fn.extend({ hideSuperfishUl: s.hide, showSuperfishUl: s.show }) }(jQuery); /* Equal Heights */ ! function(t) { t.fn.equalHeights = function(e, h) { return tallest = e ? e : 0, this.each(function() { t(this).height() > tallest && (tallest = t(this).height()) }), h && tallest > h && (tallest = h), this.each(function() { t(this).height(tallest).css("overflow", "auto") }) } }(jQuery); /* ToolTip */ ! function(t) { var e = function(t, e) { this.init("tooltip", t, e) }; e.prototype = { constructor: e, init: function(e, i, o) { var n, s; this.type = e, this.$element = t(i), this.options = this.getOptions(o), this.enabled = !0, "click" == this.options.trigger ? this.$element.on("click." + this.type, this.options.selector, t.proxy(this.toggle, this)) : "manual" != this.options.trigger && (n = "hover" == this.options.trigger ? "mouseenter" : "focus", s = "hover" == this.options.trigger ? "mouseleave" : "blur", this.$element.on(n + "." + this.type, this.options.selector, t.proxy(this.enter, this)), this.$element.on(s + "." + this.type, this.options.selector, t.proxy(this.leave, this))), this.options.selector ? this._options = t.extend({}, this.options, { trigger: "manual", selector: "" }) : this.fixTitle() }, getOptions: function(e) { return e = t.extend({}, t.fn[this.type].defaults, e, this.$element.data()), e.delay && "number" == typeof e.delay && (e.delay = { show: e.delay, hide: e.delay }), e }, enter: function(e) { var i = t(e.currentTarget)[this.type](this._options).data(this.type); return i.options.delay && i.options.delay.show ? (clearTimeout(this.timeout), i.hoverState = "in", this.timeout = setTimeout(function() { "in" == i.hoverState && i.show() }, i.options.delay.show), void 0) : i.show() }, leave: function(e) { var i = t(e.currentTarget)[this.type](this._options).data(this.type); return this.timeout && clearTimeout(this.timeout), i.options.delay && i.options.delay.hide ? (i.hoverState = "out", this.timeout = setTimeout(function() { "out" == i.hoverState && i.hide() }, i.options.delay.hide), void 0) : i.hide() }, show: function() { var t, e, i, o, n, s, h; if (this.hasContent() && this.enabled) { switch (t = this.tip(), this.setContent(), this.options.animation && t.addClass("fade"), s = "function" == typeof this.options.placement ? this.options.placement.call(this, t[0], this.$element[0]) : this.options.placement, e = /in/.test(s), t.detach().css({ top: 0, left: 0, display: "block" }).insertAfter(this.$element), i = this.getPosition(e), o = t[0].offsetWidth, n = t[0].offsetHeight, e ? s.split(" ")[1] : s) { case "bottom": h = { top: i.top + i.height, left: i.left + i.width / 2 - o / 2 }; break; case "top": h = { top: i.top - n, left: i.left + i.width / 2 - o / 2 }; break; case "left": h = { top: i.top + i.height / 2 - n / 2, left: i.left - o }; break; case "right": h = { top: i.top + i.height / 2 - n / 2, left: i.left + i.width } } t.offset(h).addClass(s).addClass("in") } }, setContent: function() { var t = this.tip(), e = this.getTitle(); t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e), t.removeClass("fade in top bottom left right") }, hide: function() { function e() { var e = setTimeout(function() { i.off(t.support.transition.end).detach() }, 500); i.one(t.support.transition.end, function() { clearTimeout(e), i.detach() }) } var i = this.tip(); return i.removeClass("in"), t.support.transition && this.$tip.hasClass("fade") ? e() : i.detach(), this }, fixTitle: function() { var t = this.$element; (t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "") }, hasContent: function() { return this.getTitle() }, getPosition: function(e) { return t.extend({}, e ? { top: 0, left: 0 } : this.$element.offset(), { width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight }) }, getTitle: function() { var t, e = this.$element, i = this.options; return t = e.attr("data-original-title") || ("function" == typeof i.title ? i.title.call(e[0]) : i.title) }, tip: function() { return this.$tip = this.$tip || t(this.options.template) }, validate: function() { this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null) }, enable: function() { this.enabled = !0 }, disable: function() { this.enabled = !1 }, toggleEnabled: function() { this.enabled = !this.enabled }, toggle: function(e) { var i = t(e.currentTarget)[this.type](this._options).data(this.type); i[i.tip().hasClass("in") ? "hide" : "show"]() }, destroy: function() { this.hide().$element.off("." + this.type).removeData(this.type) } }; var i = t.fn.tooltip; t.fn.tooltip = function(i) { return this.each(function() { var o = t(this), n = o.data("tooltip"), s = "object" == typeof i && i; n || o.data("tooltip", n = new e(this, s)), "string" == typeof i && n[i]() }) }, t.fn.tooltip.Constructor = e, t.fn.tooltip.defaults = { animation: !0, placement: "top", selector: !1, template: '
', trigger: "hover", title: "", delay: 0, html: !1 }, t.fn.tooltip.noConflict = function() { return t.fn.tooltip = i, this } }(window.jQuery); /* Images Loaded */ (function(e) { function t() {} function n(e, t) { if (r) return t.indexOf(e); for (var n = t.length; n--;) if (t[n] === e) return n; return -1 } var i = t.prototype, r = Array.prototype.indexOf ? !0 : !1; i._getEvents = function() { return this._events || (this._events = {}) }, i.getListeners = function(e) { var t, n, i = this._getEvents(); if ("object" == typeof e) { t = {}; for (n in i) i.hasOwnProperty(n) && e.test(n) && (t[n] = i[n]) } else t = i[e] || (i[e] = []); return t }, i.getListenersAsObject = function(e) { var t, n = this.getListeners(e); return n instanceof Array && (t = {}, t[e] = n), t || n }, i.addListener = function(e, t) { var i, r = this.getListenersAsObject(e); for (i in r) r.hasOwnProperty(i) && -1 === n(t, r[i]) && r[i].push(t); return this }, i.on = i.addListener, i.defineEvent = function(e) { return this.getListeners(e), this }, i.defineEvents = function(e) { for (var t = 0; e.length > t; t += 1) this.defineEvent(e[t]); return this }, i.removeListener = function(e, t) { var i, r, s = this.getListenersAsObject(e); for (r in s) s.hasOwnProperty(r) && (i = n(t, s[r]), -1 !== i && s[r].splice(i, 1)); return this }, i.off = i.removeListener, i.addListeners = function(e, t) { return this.manipulateListeners(!1, e, t) }, i.removeListeners = function(e, t) { return this.manipulateListeners(!0, e, t) }, i.manipulateListeners = function(e, t, n) { var i, r, s = e ? this.removeListener : this.addListener, o = e ? this.removeListeners : this.addListeners; if ("object" != typeof t || t instanceof RegExp) for (i = n.length; i--;) s.call(this, t, n[i]); else for (i in t) t.hasOwnProperty(i) && (r = t[i]) && ("function" == typeof r ? s.call(this, i, r) : o.call(this, i, r)); return this }, i.removeEvent = function(e) { var t, n = typeof e, i = this._getEvents(); if ("string" === n) delete i[e]; else if ("object" === n) for (t in i) i.hasOwnProperty(t) && e.test(t) && delete i[t]; else delete this._events; return this }, i.emitEvent = function(e, t) { var n, i, r, s = this.getListenersAsObject(e); for (i in s) if (s.hasOwnProperty(i)) for (n = s[i].length; n--;) r = t ? s[i][n].apply(null, t) : s[i][n](), r === !0 && this.removeListener(e, s[i][n]); return this }, i.trigger = i.emitEvent, i.emit = function(e) { var t = Array.prototype.slice.call(arguments, 1); return this.emitEvent(e, t) }, "function" == typeof define && define.amd ? define(function() { return t }) : e.EventEmitter = t })(this), function(e) { var t = document.documentElement, n = function() {}; t.addEventListener ? n = function(e, t, n) { e.addEventListener(t, n, !1) } : t.attachEvent && (n = function(t, n, i) { t[n + i] = i.handleEvent ? function() { var t = e.event; t.target = t.target || t.srcElement, i.handleEvent.call(i, t) } : function() { var n = e.event; n.target = n.target || n.srcElement, i.call(t, n) }, t.attachEvent("on" + n, t[n + i]) }); var i = function() {}; t.removeEventListener ? i = function(e, t, n) { e.removeEventListener(t, n, !1) } : t.detachEvent && (i = function(e, t, n) { e.detachEvent("on" + t, e[t + n]); try { delete e[t + n] } catch (i) { e[t + n] = void 0 } }); var r = { bind: n, unbind: i }; "function" == typeof define && define.amd ? define(r) : e.eventie = r }(this), function(e) { function t(e, t) { for (var n in t) e[n] = t[n]; return e } function n(e) { return "[object Array]" === a.call(e) } function i(e) { var t = []; if (n(e)) t = e; else if ("number" == typeof e.length) for (var i = 0, r = e.length; r > i; i++) t.push(e[i]); else t.push(e); return t } function r(e, n) { function r(e, n, o) { if (!(this instanceof r)) return new r(e, n); "string" == typeof e && (e = document.querySelectorAll(e)), this.elements = i(e), this.options = t({}, this.options), "function" == typeof n ? o = n : t(this.options, n), o && this.on("always", o), this.getImages(), s && (this.jqDeferred = new s.Deferred); var h = this; setTimeout(function() { h.check() }) } function a(e) { this.img = e } r.prototype = new e, r.prototype.options = {}, r.prototype.getImages = function() { this.images = []; for (var e = 0, t = this.elements.length; t > e; e++) { var n = this.elements[e]; "IMG" === n.nodeName && this.addImage(n); for (var i = n.querySelectorAll("img"), r = 0, s = i.length; s > r; r++) { var o = i[r]; this.addImage(o) } } }, r.prototype.addImage = function(e) { var t = new a(e); this.images.push(t) }, r.prototype.check = function() { function e(e, r) { return t.options.debug && h && o.log("confirm", e, r), t.progress(e), n++, n === i && t.complete(), !0 } var t = this, n = 0, i = this.images.length; this.hasAnyBroken = !1; for (var r = 0; i > r; r++) { var s = this.images[r]; s.on("confirm", e), s.check() } }, r.prototype.progress = function(e) { this.hasAnyBroken = this.hasAnyBroken || !e.isLoaded, this.emit("progress", this, e), this.jqDeferred && this.jqDeferred.notify(this, e) }, r.prototype.complete = function() { var e = this.hasAnyBroken ? "fail" : "done"; if (this.isComplete = !0, this.emit(e, this), this.emit("always", this), this.jqDeferred) { var t = this.hasAnyBroken ? "reject" : "resolve"; this.jqDeferred[t](this) } }, s && (s.fn.imagesLoaded = function(e, t) { var n = new r(this, e, t); return n.jqDeferred.promise(s(this)) }); var f = {}; return a.prototype = new e, a.prototype.check = function() { var e = f[this.img.src]; if (e) return this.useCached(e), void 0; if (f[this.img.src] = this, this.img.complete && void 0 !== this.img.naturalWidth) return this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), void 0; var t = this.proxyImage = new Image; n.bind(t, "load", this), n.bind(t, "error", this), t.src = this.img.src }, a.prototype.useCached = function(e) { if (e.isConfirmed) this.confirm(e.isLoaded, "cached was confirmed"); else { var t = this; e.on("confirm", function(e) { return t.confirm(e.isLoaded, "cache emitted confirmed"), !0 }) } }, a.prototype.confirm = function(e, t) { this.isConfirmed = !0, this.isLoaded = e, this.emit("confirm", this, t) }, a.prototype.handleEvent = function(e) { var t = "on" + e.type; this[t] && this[t](e) }, a.prototype.onload = function() { this.confirm(!0, "onload"), this.unbindProxyEvents() }, a.prototype.onerror = function() { this.confirm(!1, "onerror"), this.unbindProxyEvents() }, a.prototype.unbindProxyEvents = function() { n.unbind(this.proxyImage, "load", this), n.unbind(this.proxyImage, "error", this) }, r } var s = e.jQuery, o = e.console, h = o !== void 0, a = Object.prototype.toString; "function" == typeof define && define.amd ? define(["eventEmitter", "eventie"], r) : e.imagesLoaded = r(e.EventEmitter, e.eventie) }(window); /* Pretty Photo */ (function(e) { function t() { var e = location.href; hashtag = e.indexOf("#prettyPhoto") !== -1 ? decodeURI(e.substring(e.indexOf("#prettyPhoto") + 1, e.length)) : false; return hashtag } function n() { if (typeof theRel == "undefined") return; location.hash = theRel + "/" + rel_index + "/" } function r() { if (location.href.indexOf("#prettyPhoto") !== -1) location.hash = "prettyPhoto" } function i(e, t) { e = e.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var n = "[\\?&]" + e + "=([^&#]*)"; var r = new RegExp(n); var i = r.exec(t); return i == null ? "" : i[1] } e.prettyPhoto = { version: "3.1.5" }; e.fn.prettyPhoto = function(s) { function g() { e(".pp_loaderIcon").hide(); projectedTop = scroll_pos["scrollTop"] + (d / 2 - a["containerHeight"] / 2); if (projectedTop < 0) projectedTop = 0; $ppt.fadeTo(settings.animation_speed, 1); $pp_pic_holder.find(".pp_content").animate({ height: a["contentHeight"], width: a["contentWidth"] }, settings.animation_speed); $pp_pic_holder.animate({ top: projectedTop, left: v / 2 - a["containerWidth"] / 2 < 0 ? 0 : v / 2 - a["containerWidth"] / 2, width: a["containerWidth"] }, settings.animation_speed, function() { $pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]); $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed); if (isSet && S(pp_images[set_position]) == "image") { $pp_pic_holder.find(".pp_hoverContainer").show() } else { $pp_pic_holder.find(".pp_hoverContainer").hide() } if (settings.allow_expand) { if (a["resized"]) { e("a.pp_expand,a.pp_contract").show() } else { e("a.pp_expand").hide() } } if (settings.autoplay_slideshow && !m && !f) e.prettyPhoto.startSlideshow(); settings.changepicturecallback(); f = true }); C(); s.ajaxcallback() } function y(t) { $pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden"); $pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function() { e(".pp_loaderIcon").show(); t() }) } function b(t) { t > 1 ? e(".pp_nav").show() : e(".pp_nav").hide() } function w(e, t) { resized = false; E(e, t); imageWidth = e, imageHeight = t; if ((p > v || h > d) && doresize && settings.allow_resize && !u) { resized = true, fitting = false; while (!fitting) { if (p > v) { imageWidth = v - 200; imageHeight = t / e * imageWidth } else if (h > d) { imageHeight = d - 200; imageWidth = e / t * imageHeight } else { fitting = true } h = imageHeight, p = imageWidth } if (p > v || h > d) { w(p, h) } E(imageWidth, imageHeight) } return { width: Math.floor(imageWidth), height: Math.floor(imageHeight), containerHeight: Math.floor(h), containerWidth: Math.floor(p) + settings.horizontal_padding * 2, contentHeight: Math.floor(l), contentWidth: Math.floor(c), resized: resized } } function E(t, n) { t = parseFloat(t); n = parseFloat(n); $pp_details = $pp_pic_holder.find(".pp_details"); $pp_details.width(t); detailsHeight = parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom")); $pp_details = $pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({ position: "absolute", top: -1e4 }); detailsHeight += $pp_details.height(); detailsHeight = detailsHeight <= 34 ? 36 : detailsHeight; $pp_details.remove(); $pp_title = $pp_pic_holder.find(".ppt"); $pp_title.width(t); titleHeight = parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom")); $pp_title = $pp_title.clone().appendTo(e("body")).css({ position: "absolute", top: -1e4 }); titleHeight += $pp_title.height(); $pp_title.remove(); l = n + detailsHeight; c = t; h = l + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height(); p = t } function S(e) { if (e.match(/youtube\.com\/watch/i) || e.match(/youtu\.be/i)) { return "youtube" } else if (e.match(/vimeo\.com/i)) { return "vimeo" } else if (e.match(/\b.mov\b/i)) { return "quicktime" } else if (e.match(/\b.swf\b/i)) { return "flash" } else if (e.match(/\biframe=true\b/i)) { return "iframe" } else if (e.match(/\bajax=true\b/i)) { return "ajax" } else if (e.match(/\bcustom=true\b/i)) { return "custom" } else if (e.substr(0, 1) == "#") { return "inline" } else { return "image" } } function x() { if (doresize && typeof $pp_pic_holder != "undefined") { scroll_pos = T(); contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); projectedTop = d / 2 + scroll_pos["scrollTop"] - contentHeight / 2; if (projectedTop < 0) projectedTop = 0; if (contentHeight > d) return; $pp_pic_holder.css({ top: projectedTop, left: v / 2 + scroll_pos["scrollLeft"] - contentwidth / 2 }) } } function T() { if (self.pageYOffset) { return { scrollTop: self.pageYOffset, scrollLeft: self.pageXOffset } } else if (document.documentElement && document.documentElement.scrollTop) { return { scrollTop: document.documentElement.scrollTop, scrollLeft: document.documentElement.scrollLeft } } else if (document.body) { return { scrollTop: document.body.scrollTop, scrollLeft: document.body.scrollLeft } } } function N() { d = e(window).height(), v = e(window).width(); if (typeof $pp_overlay != "undefined") $pp_overlay.height(e(document).height()).width(v) } function C() { if (isSet && settings.overlay_gallery && S(pp_images[set_position]) == "image") { itemWidth = 52 + 5; navWidth = settings.theme == "facebook" || settings.theme == "pp_default" ? 50 : 30; itemsPerPage = Math.floor((a["containerWidth"] - 100 - navWidth) / itemWidth); itemsPerPage = itemsPerPage < pp_images.length ? itemsPerPage : pp_images.length; totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; if (totalPage == 0) { navWidth = 0; $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide() } else { $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show() } galleryWidth = itemsPerPage * itemWidth; fullGalleryWidth = pp_images.length * itemWidth; $pp_gallery.css("margin-left", -(galleryWidth / 2 + navWidth / 2)).find("div:first").width(galleryWidth + 5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"); goToPage = Math.floor(set_position / itemsPerPage) < totalPage ? Math.floor(set_position / itemsPerPage) : totalPage; e.prettyPhoto.changeGalleryPage(goToPage); $pp_gallery_li.filter(":eq(" + set_position + ")").addClass("selected") } else { $pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave") } } function k(t) { if (settings.social_tools) facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href)); settings.markup = settings.markup.replace("{pp_social}", ""); e("body").append(settings.markup); $pp_pic_holder = e(".pp_pic_holder"), $ppt = e(".ppt"), $pp_overlay = e("div.pp_overlay"); if (isSet && settings.overlay_gallery) { currentGalleryPage = 0; toInject = ""; for (var n = 0; n < pp_images.length; n++) { if (!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)) { classname = "default"; img_src = "" } else { classname = ""; img_src = pp_images[n] } toInject += "
  • " } toInject = settings.gallery_markup.replace(/{gallery}/g, toInject); $pp_pic_holder.find("#pp_full_res").after(toInject); $pp_gallery = e(".pp_pic_holder .pp_gallery"), $pp_gallery_li = $pp_gallery.find("li"); $pp_gallery.find(".pp_arrow_next").click(function() { e.prettyPhoto.changeGalleryPage("next"); e.prettyPhoto.stopSlideshow(); return false }); $pp_gallery.find(".pp_arrow_previous").click(function() { e.prettyPhoto.changeGalleryPage("previous"); e.prettyPhoto.stopSlideshow(); return false }); $pp_pic_holder.find(".pp_content").hover(function() { $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn() }, function() { $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut() }); itemWidth = 52 + 5; $pp_gallery_li.each(function(t) { e(this).find("a").click(function() { e.prettyPhoto.changePage(t); e.prettyPhoto.stopSlideshow(); return false }) }) } if (settings.slideshow) { $pp_pic_holder.find(".pp_nav").prepend('Play'); $pp_pic_holder.find(".pp_nav .pp_play").click(function() { e.prettyPhoto.startSlideshow(); return false }) } $pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme); $pp_overlay.css({ opacity: 0.7, height: e(document).height(), width: e(window).width() }).bind("click", function() { if (!settings.modal) e.prettyPhoto.close() }); e("a.pp_close").bind("click", function() { e.prettyPhoto.close(); return false }); if (settings.allow_expand) { e("a.pp_expand").bind("click", function(t) { if (e(this).hasClass("pp_expand")) { e(this).removeClass("pp_expand").addClass("pp_contract"); doresize = false } else { e(this).removeClass("pp_contract").addClass("pp_expand"); doresize = true } y(function() { e.prettyPhoto.open() }); return false }) } $pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function() { e.prettyPhoto.changePage("previous"); e.prettyPhoto.stopSlideshow(); return false }); $pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function() { e.prettyPhoto.changePage("next"); e.prettyPhoto.stopSlideshow(); return false }); x() } s = jQuery.extend({ hook: "rel", animation_speed: "fast", ajaxcallback: function() {}, slideshow: 5e3, autoplay_slideshow: false, opacity: .8, show_title: true, allow_resize: true, allow_expand: true, default_width: 500, default_height: 344, counter_separator_label: "/", theme: "pp_default", horizontal_padding: 20, hideflash: false, wmode: "opaque", autoplay: true, modal: false, deeplinking: true, overlay_gallery: true, overlay_gallery_max: 30, keyboard_shortcuts: true, changepicturecallback: function() {}, callback: function() {}, ie6_fallback: true, markup: '

    {pp_social}
    ', gallery_markup: '', image_markup: '', flash_markup: '', quicktime_markup: '', iframe_markup: '', inline_markup: '
    {content}
    ', custom_markup: "", social_tools: '
    Tweet
    ' }, s); var o = this, u = false, a, f, l, c, h, p, d = e(window).height(), v = e(window).width(), m; doresize = true, scroll_pos = T(); e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto", function() { x(); N() }); if (s.keyboard_shortcuts) { e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto", function(t) { if (typeof $pp_pic_holder != "undefined") { if ($pp_pic_holder.is(":visible")) { switch (t.keyCode) { case 37: e.prettyPhoto.changePage("previous"); t.preventDefault(); break; case 39: e.prettyPhoto.changePage("next"); t.preventDefault(); break; case 27: if (!settings.modal) e.prettyPhoto.close(); t.preventDefault(); break } } } }) } e.prettyPhoto.initialize = function() { settings = s; if (settings.theme == "pp_default") settings.horizontal_padding = 16; theRel = e(this).attr(settings.hook); galleryRegExp = /\[(?:.*)\]/; isSet = galleryRegExp.exec(theRel) ? true : false; pp_images = isSet ? jQuery.map(o, function(t, n) { if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).attr("href") }) : e.makeArray(e(this).attr("href")); pp_titles = isSet ? jQuery.map(o, function(t, n) { if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).find("img").attr("alt") ? e(t).find("img").attr("alt") : "" }) : e.makeArray(e(this).find("img").attr("alt")); pp_descriptions = isSet ? jQuery.map(o, function(t, n) { if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).attr("data-title") ? e(t).attr("data-title") : "" }) : e.makeArray(e(this).attr("data-title")); if (pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false; set_position = jQuery.inArray(e(this).attr("href"), pp_images); rel_index = isSet ? set_position : e("a[" + settings.hook + "^='" + theRel + "']").index(e(this)); k(this); if (settings.allow_resize) e(window).bind("scroll.prettyphoto", function() { x() }); e.prettyPhoto.open(); return false }; e.prettyPhoto.open = function(t) { if (typeof settings == "undefined") { settings = s; pp_images = e.makeArray(arguments[0]); pp_titles = arguments[1] ? e.makeArray(arguments[1]) : e.makeArray(""); pp_descriptions = arguments[2] ? e.makeArray(arguments[2]) : e.makeArray(""); isSet = pp_images.length > 1 ? true : false; set_position = arguments[3] ? arguments[3] : 0; k(t.target) } if (settings.hideflash) e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "hidden"); b(e(pp_images).size()); e(".pp_loaderIcon").show(); if (settings.deeplinking) n(); if (settings.social_tools) { facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href)); $pp_pic_holder.find(".pp_social").html(facebook_like_link) } if ($ppt.is(":hidden")) $ppt.css("opacity", 0).show(); $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); $pp_pic_holder.find(".currentTextHolder").text(set_position + 1 + settings.counter_separator_label + e(pp_images).size()); if (typeof pp_descriptions[set_position] != "undefined" && pp_descriptions[set_position] != "") { $pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])) } else { $pp_pic_holder.find(".pp_description").hide() } movie_width = parseFloat(i("width", pp_images[set_position])) ? i("width", pp_images[set_position]) : settings.default_width.toString(); movie_height = parseFloat(i("height", pp_images[set_position])) ? i("height", pp_images[set_position]) : settings.default_height.toString(); u = false; if (movie_height.indexOf("%") != -1) { movie_height = parseFloat(e(window).height() * parseFloat(movie_height) / 100 - 150); u = true } if (movie_width.indexOf("%") != -1) { movie_width = parseFloat(e(window).width() * parseFloat(movie_width) / 100 - 150); u = true } $pp_pic_holder.fadeIn(function() { settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined" ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(" "); imgPreloader = ""; skipInjection = false; switch (S(pp_images[set_position])) { case "image": imgPreloader = new Image; nextImage = new Image; if (isSet && set_position < e(pp_images).size() - 1) nextImage.src = pp_images[set_position + 1]; prevImage = new Image; if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; $pp_pic_holder.find("#pp_full_res")[0].innerHTML = settings.image_markup.replace(/{path}/g, pp_images[set_position]); imgPreloader.onload = function() { a = w(imgPreloader.width, imgPreloader.height); g() }; imgPreloader.onerror = function() { alert("Image cannot be loaded. Make sure the path is correct and image exist."); e.prettyPhoto.close() }; imgPreloader.src = pp_images[set_position]; break; case "youtube": a = w(movie_width, movie_height); movie_id = i("v", pp_images[set_position]); if (movie_id == "") { movie_id = pp_images[set_position].split("youtu.be/"); movie_id = movie_id[1]; if (movie_id.indexOf("?") > 0) movie_id = movie_id.substr(0, movie_id.indexOf("?")); if (movie_id.indexOf("&") > 0) movie_id = movie_id.substr(0, movie_id.indexOf("&")) } movie = "http://www.youtube.com/embed/" + movie_id; i("rel", pp_images[set_position]) ? movie += "?rel=" + i("rel", pp_images[set_position]) : movie += "?rel=1"; if (settings.autoplay) movie += "&autoplay=1"; toInject = settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie); break; case "vimeo": a = w(movie_width, movie_height); movie_id = pp_images[set_position]; var t = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/; var n = movie_id.match(t); movie = "http://player.vimeo.com/video/" + n[3] + "?title=0&byline=0&portrait=0"; if (settings.autoplay) movie += "&autoplay=1;"; vimeo_width = a["width"] + "/embed/?moog_width=" + a["width"]; toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, a["height"]).replace(/{path}/g, movie); break; case "quicktime": a = w(movie_width, movie_height); a["height"] += 15; a["contentHeight"] += 15; a["containerHeight"] += 15; toInject = settings.quicktime_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); break; case "flash": a = w(movie_width, movie_height); flash_vars = pp_images[set_position]; flash_vars = flash_vars.substring(pp_images[set_position].indexOf("flashvars") + 10, pp_images[set_position].length); filename = pp_images[set_position]; filename = filename.substring(0, filename.indexOf("?")); toInject = settings.flash_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + "?" + flash_vars); break; case "iframe": a = w(movie_width, movie_height); frame_url = pp_images[set_position]; frame_url = frame_url.substr(0, frame_url.indexOf("iframe") - 1); toInject = settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{path}/g, frame_url); break; case "ajax": doresize = false; a = w(movie_width, movie_height); doresize = true; skipInjection = true; e.get(pp_images[set_position], function(e) { toInject = settings.inline_markup.replace(/{content}/g, e); $pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject; g() }); break; case "custom": a = w(movie_width, movie_height); toInject = settings.custom_markup; break; case "inline": myClone = e(pp_images[set_position]).clone().append('
    ').css({ width: settings.default_width }).wrapInner('
    ').appendTo(e("body")).show(); doresize = false; a = w(e(myClone).width(), e(myClone).height()); doresize = true; e(myClone).remove(); toInject = settings.inline_markup.replace(/{content}/g, e(pp_images[set_position]).html()); break } if (!imgPreloader && !skipInjection) { $pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject; g() } }); return false }; e.prettyPhoto.changePage = function(t) { currentGalleryPage = 0; if (t == "previous") { set_position--; if (set_position < 0) set_position = e(pp_images).size() - 1 } else if (t == "next") { set_position++; if (set_position > e(pp_images).size() - 1) set_position = 0 } else { set_position = t } rel_index = set_position; if (!doresize) doresize = true; if (settings.allow_expand) { e(".pp_contract").removeClass("pp_contract").addClass("pp_expand") } y(function() { e.prettyPhoto.open() }) }; e.prettyPhoto.changeGalleryPage = function(e) { if (e == "next") { currentGalleryPage++; if (currentGalleryPage > totalPage) currentGalleryPage = 0 } else if (e == "previous") { currentGalleryPage--; if (currentGalleryPage < 0) currentGalleryPage = totalPage } else { currentGalleryPage = e } slide_speed = e == "next" || e == "previous" ? settings.animation_speed : 0; slide_to = currentGalleryPage * itemsPerPage * itemWidth; $pp_gallery.find("ul").animate({ left: -slide_to }, slide_speed) }; e.prettyPhoto.startSlideshow = function() { if (typeof m == "undefined") { $pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function() { e.prettyPhoto.stopSlideshow(); return false }); m = setInterval(e.prettyPhoto.startSlideshow, settings.slideshow) } else { e.prettyPhoto.changePage("next") } }; e.prettyPhoto.stopSlideshow = function() { $pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function() { e.prettyPhoto.startSlideshow(); return false }); clearInterval(m); m = undefined }; e.prettyPhoto.close = function() { if ($pp_overlay.is(":animated")) return; e.prettyPhoto.stopSlideshow(); $pp_pic_holder.stop().find("object,embed").css("visibility", "hidden"); e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed, function() { e(this).remove() }); $pp_overlay.fadeOut(settings.animation_speed, function() { if (settings.hideflash) e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "visible"); e(this).remove(); e(window).unbind("scroll.prettyphoto"); r(); settings.callback(); doresize = true; f = false; delete settings }) }; if (!pp_alreadyInitialized && t()) { pp_alreadyInitialized = true; hashIndex = t(); hashRel = hashIndex; hashIndex = hashIndex.substring(hashIndex.indexOf("/") + 1, hashIndex.length - 1); hashRel = hashRel.substring(0, hashRel.indexOf("/")); setTimeout(function() { e("a[" + s.hook + "^='" + hashRel + "']:eq(" + hashIndex + ")").trigger("click") }, 50) } return this.unbind("click.prettyphoto").bind("click.prettyphoto", e.prettyPhoto.initialize) }; })(jQuery); var pp_alreadyInitialized = false; /* HB Streams */ (function(e) { e.fn.extend({ hb_stream: function(t) { function r(t, n) { var r = t.feed; if (!r) { return false } var i = ""; i += ""; e(n).html(i); e(n).find("li").each(function() { pin_img_src = e(this).find("img").attr("src"); pin_url = "http://www.pinterest.com" + e(this).find("a").attr("href"); pin_desc = e(this).find("p:nth-child(2)").html(); pin_desc = pin_desc.replace("'", "`"); e(this).empty(); e(this).append(""); var t = e(this).find("img").width(); var n = e(this).find("img").height() }) } var n = { username: "envato", limit: 10, social_network: "dribbble" }; var t = e.extend(n, t); return this.each(function() { var n = t; var i = e(this); if (n.social_network == "dribbble") { i.append(""); e.getJSON("http://dribbble.com/" + n.username + "/shots.json?callback=?", function(t) { e.each(t.shots, function(t, r) { if (t < n.limit) { var s = r.title; s = s.replace("'", "`"); var o = e("").attr({ src: r.image_teaser_url, alt: s }); var u = e("").attr({ href: r.url, target: "_blank", title: s }); var a = e(u).append(o); var f = e("
  • ").append(a); e("ul", i).append(f) } }); e("li img", i).each(function() { var t = e(this).width(); var n = e(this).height(); if (t < n) { e(this).addClass("portrait") } else { e(this).addClass("landscape") } }) }) } if (n.social_network == "pinterest") { var s = "http://pinterest.com/" + n.username + "/feed.rss"; var o = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q=" + encodeURIComponent(s); o += "&num=" + n.limit; o += "&output=json_xml"; e.getJSON(o, function(e) { if (e.responseStatus == 200) { r(e.responseData, i) } else { alert("Whoops. Wrong Pinterest Username.") } }) } if (n.social_network == "flickr") { i.append(""); e.getJSON("http://api.flickr.com/services/rest/?method=flickr.people.findByUsername&username=" + n.username + "&format=json&api_key=85145f20ba1864d8ff559a3971a0a033&jsoncallback=?", function(t) { var r = t.user.nsid; e.getJSON("http://api.flickr.com/services/rest/?method=flickr.photos.search&user_id=" + r + "&format=json&api_key=85145f20ba1864d8ff559a3971a0a033&per_page=" + n.limit + "&page=1&extras=url_sq&jsoncallback=?", function(t) { e.each(t.photos.photo, function(t, n) { var r = n.owner; var s = n.title; var o = n.url_sq; var u = n.id; var a = "http://www.flickr.com/photos/" + r + "/" + u; var f = e("").attr({ src: o, alt: s }); var l = e("").attr({ href: a, target: "_blank", title: s }); var c = e(l).append(f); var h = e("
  • ").append(c); e("ul", i).append(h) }) }) }) } if (n.social_network == "instagram") { i.append(""); var u = "1024641492.18869b6.ad837e373be44c3fb5dce9e27e0954d8"; s = "https://api.instagram.com/v1/users/search?q=" + n.username + "&access_token=" + u + "&count=1&callback=?"; e.getJSON(s, function(t) { e.each(t.data, function(t, r) { var o = r.username; if (o == n.username) { var a = r.id; if (a != "") { s = "https://api.instagram.com/v1/users/" + a + "/media/recent/?access_token=" + u + "&count=" + n.limit + "&callback=?"; e.getJSON(s, function(t) { e.each(t.data, function(t, n) { var r = n.images.thumbnail.url; var s = n.link; var o = ""; if (n.caption != null) { o = n.caption.text } var u = e("").attr({ src: r, alt: o }); var a = e("").attr({ href: s, target: "_blank", title: o }); var f = e(a).append(u); var l = e("
  • ").append(f); e("ul", i).append(l) }) }) } } }) }) } }) } }) })(jQuery)