Skip to content

Instantly share code, notes, and snippets.

@flynnduism
Created January 18, 2016 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flynnduism/699179d2a757f420a836 to your computer and use it in GitHub Desktop.
Save flynnduism/699179d2a757f420a836 to your computer and use it in GitHub Desktop.
function hexToRgb(e) {
var t = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
e = e.replace(t, function(e, t, n, i) {
return t + t + n + n + i + i
});
var n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
return n ? {
r: parseInt(n[1], 16),
g: parseInt(n[2], 16),
b: parseInt(n[3], 16)
} : null
}
function clamp(e, t, n) {
return Math.min(Math.max(e, t), n)
}
function isInArray(e, t) {
return t.indexOf(e) > -1
}! function(e, t) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) {
if (!e.document) throw new Error("jQuery requires a window with a document");
return t(e)
} : t(e)
}("undefined" != typeof window ? window : this, function(e, t) {
function n(e) {
var t = e.length,
n = Z.type(e);
return "function" === n || Z.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === n || 0 === t || "number" == typeof t && t > 0 && t - 1 in e
}
function i(e, t, n) {
if (Z.isFunction(t)) return Z.grep(e, function(e, i) {
return !!t.call(e, i, e) !== n
});
if (t.nodeType) return Z.grep(e, function(e) {
return e === t !== n
});
if ("string" == typeof t) {
if (oe.test(t)) return Z.filter(t, e, n);
t = Z.filter(t, e)
}
return Z.grep(e, function(e) {
return Y.call(t, e) >= 0 !== n
})
}
function a(e, t) {
for (;
(e = e[t]) && 1 !== e.nodeType;);
return e
}
function r(e) {
var t = he[e] = {};
return Z.each(e.match(fe) || [], function(e, n) {
t[n] = !0
}), t
}
function s() {
G.removeEventListener("DOMContentLoaded", s, !1), e.removeEventListener("load", s, !1), Z.ready()
}
function o() {
Object.defineProperty(this.cache = {}, 0, {
get: function() {
return {}
}
}), this.expando = Z.expando + Math.random()
}
function l(e, t, n) {
var i;
if (void 0 === n && 1 === e.nodeType)
if (i = "data-" + t.replace(xe, "-$1").toLowerCase(), n = e.getAttribute(i), "string" == typeof n) {
try {
n = "true" === n ? !0 : "false" === n ? !1 : "null" === n ? null : +n + "" === n ? +n : be.test(n) ? Z.parseJSON(n) : n
} catch (a) {}
ye.set(e, t, n)
} else n = void 0;
return n
}
function c() {
return !0
}
function u() {
return !1
}
function d() {
try {
return G.activeElement
} catch (e) {}
}
function p(e, t) {
return Z.nodeName(e, "table") && Z.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e
}
function f(e) {
return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e
}
function h(e) {
var t = Pe.exec(e.type);
return t ? e.type = t[1] : e.removeAttribute("type"), e
}
function m(e, t) {
for (var n = 0, i = e.length; i > n; n++) ge.set(e[n], "globalEval", !t || ge.get(t[n], "globalEval"))
}
function v(e, t) {
var n, i, a, r, s, o, l, c;
if (1 === t.nodeType) {
if (ge.hasData(e) && (r = ge.access(e), s = ge.set(t, r), c = r.events)) {
delete s.handle, s.events = {};
for (a in c)
for (n = 0, i = c[a].length; i > n; n++) Z.event.add(t, a, c[a][n])
}
ye.hasData(e) && (o = ye.access(e), l = Z.extend({}, o), ye.set(t, l))
}
}
function g(e, t) {
var n = e.getElementsByTagName ? e.getElementsByTagName(t || "*") : e.querySelectorAll ? e.querySelectorAll(t || "*") : [];
return void 0 === t || t && Z.nodeName(e, t) ? Z.merge([e], n) : n
}
function y(e, t) {
var n = t.nodeName.toLowerCase();
"input" === n && Ce.test(e.type) ? t.checked = e.checked : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue)
}
function b(t, n) {
var i, a = Z(n.createElement(t)).appendTo(n.body),
r = e.getDefaultComputedStyle && (i = e.getDefaultComputedStyle(a[0])) ? i.display : Z.css(a[0], "display");
return a.detach(), r
}
function x(e) {
var t = G,
n = ze[e];
return n || (n = b(e, t), "none" !== n && n || (Oe = (Oe || Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement), t = Oe[0].contentDocument, t.write(), t.close(), n = b(e, t), Oe.detach()), ze[e] = n), n
}
function _(e, t, n) {
var i, a, r, s, o = e.style;
return n = n || $e(e), n && (s = n.getPropertyValue(t) || n[t]), n && ("" !== s || Z.contains(e.ownerDocument, e) || (s = Z.style(e, t)), We.test(s) && Ie.test(t) && (i = o.width, a = o.minWidth, r = o.maxWidth, o.minWidth = o.maxWidth = o.width = s, s = n.width, o.width = i, o.minWidth = a, o.maxWidth = r)), void 0 !== s ? s + "" : s
}
function w(e, t) {
return {
get: function() {
return e() ? void delete this.get : (this.get = t).apply(this, arguments)
}
}
}
function k(e, t) {
if (t in e) return t;
for (var n = t[0].toUpperCase() + t.slice(1), i = t, a = Ve.length; a--;)
if (t = Ve[a] + n, t in e) return t;
return i
}
function C(e, t, n) {
var i = Xe.exec(t);
return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : t
}
function T(e, t, n, i, a) {
for (var r = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0, s = 0; 4 > r; r += 2) "margin" === n && (s += Z.css(e, n + we[r], !0, a)), i ? ("content" === n && (s -= Z.css(e, "padding" + we[r], !0, a)), "margin" !== n && (s -= Z.css(e, "border" + we[r] + "Width", !0, a))) : (s += Z.css(e, "padding" + we[r], !0, a), "padding" !== n && (s += Z.css(e, "border" + we[r] + "Width", !0, a)));
return s
}
function S(e, t, n) {
var i = !0,
a = "width" === t ? e.offsetWidth : e.offsetHeight,
r = $e(e),
s = "border-box" === Z.css(e, "boxSizing", !1, r);
if (0 >= a || null == a) {
if (a = _(e, t, r), (0 > a || null == a) && (a = e.style[t]), We.test(a)) return a;
i = s && (Q.boxSizingReliable() || a === e.style[t]), a = parseFloat(a) || 0
}
return a + T(e, t, n || (s ? "border" : "content"), i, r) + "px"
}
function A(e, t) {
for (var n, i, a, r = [], s = 0, o = e.length; o > s; s++) i = e[s], i.style && (r[s] = ge.get(i, "olddisplay"), n = i.style.display, t ? (r[s] || "none" !== n || (i.style.display = ""), "" === i.style.display && ke(i) && (r[s] = ge.access(i, "olddisplay", x(i.nodeName)))) : (a = ke(i), "none" === n && a || ge.set(i, "olddisplay", a ? n : Z.css(i, "display"))));
for (s = 0; o > s; s++) i = e[s], i.style && (t && "none" !== i.style.display && "" !== i.style.display || (i.style.display = t ? r[s] || "" : "none"));
return e
}
function F(e, t, n, i, a) {
return new F.prototype.init(e, t, n, i, a)
}
function E() {
return setTimeout(function() {
Qe = void 0
}), Qe = Z.now()
}
function q(e, t) {
var n, i = 0,
a = {
height: e
};
for (t = t ? 1 : 0; 4 > i; i += 2 - t) n = we[i], a["margin" + n] = a["padding" + n] = e;
return t && (a.opacity = a.width = e), a
}
function j(e, t, n) {
for (var i, a = (nt[t] || []).concat(nt["*"]), r = 0, s = a.length; s > r; r++)
if (i = a[r].call(n, t, e)) return i
}
function D(e, t, n) {
var i, a, r, s, o, l, c, u, d = this,
p = {},
f = e.style,
h = e.nodeType && ke(e),
m = ge.get(e, "fxshow");
n.queue || (o = Z._queueHooks(e, "fx"), null == o.unqueued && (o.unqueued = 0, l = o.empty.fire, o.empty.fire = function() {
o.unqueued || l()
}), o.unqueued++, d.always(function() {
d.always(function() {
o.unqueued--, Z.queue(e, "fx").length || o.empty.fire()
})
})), 1 === e.nodeType && ("height" in t || "width" in t) && (n.overflow = [f.overflow, f.overflowX, f.overflowY], c = Z.css(e, "display"), u = "none" === c ? ge.get(e, "olddisplay") || x(e.nodeName) : c, "inline" === u && "none" === Z.css(e, "float") && (f.display = "inline-block")), n.overflow && (f.overflow = "hidden", d.always(function() {
f.overflow = n.overflow[0], f.overflowX = n.overflow[1], f.overflowY = n.overflow[2]
}));
for (i in t)
if (a = t[i], Ke.exec(a)) {
if (delete t[i], r = r || "toggle" === a, a === (h ? "hide" : "show")) {
if ("show" !== a || !m || void 0 === m[i]) continue;
h = !0
}
p[i] = m && m[i] || Z.style(e, i)
} else c = void 0;
if (Z.isEmptyObject(p)) "inline" === ("none" === c ? x(e.nodeName) : c) && (f.display = c);
else {
m ? "hidden" in m && (h = m.hidden) : m = ge.access(e, "fxshow", {}), r && (m.hidden = !h), h ? Z(e).show() : d.done(function() {
Z(e).hide()
}), d.done(function() {
var t;
ge.remove(e, "fxshow");
for (t in p) Z.style(e, t, p[t])
});
for (i in p) s = j(h ? m[i] : 0, i, d), i in m || (m[i] = s.start, h && (s.end = s.start, s.start = "width" === i || "height" === i ? 1 : 0))
}
}
function N(e, t) {
var n, i, a, r, s;
for (n in e)
if (i = Z.camelCase(n), a = t[i], r = e[n], Z.isArray(r) && (a = r[1], r = e[n] = r[0]), n !== i && (e[i] = r, delete e[n]), s = Z.cssHooks[i], s && "expand" in s) {
r = s.expand(r), delete e[i];
for (n in r) n in e || (e[n] = r[n], t[n] = a)
} else t[i] = a
}
function M(e, t, n) {
var i, a, r = 0,
s = tt.length,
o = Z.Deferred().always(function() {
delete l.elem
}),
l = function() {
if (a) return !1;
for (var t = Qe || E(), n = Math.max(0, c.startTime + c.duration - t), i = n / c.duration || 0, r = 1 - i, s = 0, l = c.tweens.length; l > s; s++) c.tweens[s].run(r);
return o.notifyWith(e, [c, r, n]), 1 > r && l ? n : (o.resolveWith(e, [c]), !1)
},
c = o.promise({
elem: e,
props: Z.extend({}, t),
opts: Z.extend(!0, {
specialEasing: {}
}, n),
originalProperties: t,
originalOptions: n,
startTime: Qe || E(),
duration: n.duration,
tweens: [],
createTween: function(t, n) {
var i = Z.Tween(e, c.opts, t, n, c.opts.specialEasing[t] || c.opts.easing);
return c.tweens.push(i), i
},
stop: function(t) {
var n = 0,
i = t ? c.tweens.length : 0;
if (a) return this;
for (a = !0; i > n; n++) c.tweens[n].run(1);
return t ? o.resolveWith(e, [c, t]) : o.rejectWith(e, [c, t]), this
}
}),
u = c.props;
for (N(u, c.opts.specialEasing); s > r; r++)
if (i = tt[r].call(c, e, u, c.opts)) return i;
return Z.map(u, j, c), Z.isFunction(c.opts.start) && c.opts.start.call(e, c), Z.fx.timer(Z.extend(l, {
elem: e,
anim: c,
queue: c.opts.queue
})), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always)
}
function H(e) {
return function(t, n) {
"string" != typeof t && (n = t, t = "*");
var i, a = 0,
r = t.toLowerCase().match(fe) || [];
if (Z.isFunction(n))
for (; i = r[a++];) "+" === i[0] ? (i = i.slice(1) || "*", (e[i] = e[i] || []).unshift(n)) : (e[i] = e[i] || []).push(n)
}
}
function P(e, t, n, i) {
function a(o) {
var l;
return r[o] = !0, Z.each(e[o] || [], function(e, o) {
var c = o(t, n, i);
return "string" != typeof c || s || r[c] ? s ? !(l = c) : void 0 : (t.dataTypes.unshift(c), a(c), !1)
}), l
}
var r = {},
s = e === _t;
return a(t.dataTypes[0]) || !r["*"] && a("*")
}
function L(e, t) {
var n, i, a = Z.ajaxSettings.flatOptions || {};
for (n in t) void 0 !== t[n] && ((a[n] ? e : i || (i = {}))[n] = t[n]);
return i && Z.extend(!0, e, i), e
}
function R(e, t, n) {
for (var i, a, r, s, o = e.contents, l = e.dataTypes;
"*" === l[0];) l.shift(), void 0 === i && (i = e.mimeType || t.getResponseHeader("Content-Type"));
if (i)
for (a in o)
if (o[a] && o[a].test(i)) {
l.unshift(a);
break
}
if (l[0] in n) r = l[0];
else {
for (a in n) {
if (!l[0] || e.converters[a + " " + l[0]]) {
r = a;
break
}
s || (s = a)
}
r = r || s
}
return r ? (r !== l[0] && l.unshift(r), n[r]) : void 0
}
function O(e, t, n, i) {
var a, r, s, o, l, c = {},
u = e.dataTypes.slice();
if (u[1])
for (s in e.converters) c[s.toLowerCase()] = e.converters[s];
for (r = u.shift(); r;)
if (e.responseFields[r] && (n[e.responseFields[r]] = t), !l && i && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = r, r = u.shift())
if ("*" === r) r = l;
else if ("*" !== l && l !== r) {
if (s = c[l + " " + r] || c["* " + r], !s)
for (a in c)
if (o = a.split(" "), o[1] === r && (s = c[l + " " + o[0]] || c["* " + o[0]])) {
s === !0 ? s = c[a] : c[a] !== !0 && (r = o[0], u.unshift(o[1]));
break
}
if (s !== !0)
if (s && e["throws"]) t = s(t);
else try {
t = s(t)
} catch (d) {
return {
state: "parsererror",
error: s ? d : "No conversion from " + l + " to " + r
}
}
}
return {
state: "success",
data: t
}
}
function z(e, t, n, i) {
var a;
if (Z.isArray(t)) Z.each(t, function(t, a) {
n || Tt.test(e) ? i(e, a) : z(e + "[" + ("object" == typeof a ? t : "") + "]", a, n, i)
});
else if (n || "object" !== Z.type(t)) i(e, t);
else
for (a in t) z(e + "[" + a + "]", t[a], n, i)
}
function I(e) {
return Z.isWindow(e) ? e : 9 === e.nodeType && e.defaultView
}
var W = [],
$ = W.slice,
B = W.concat,
X = W.push,
Y = W.indexOf,
U = {},
J = U.toString,
V = U.hasOwnProperty,
Q = {},
G = e.document,
K = "2.1.1",
Z = function(e, t) {
return new Z.fn.init(e, t)
},
ee = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
te = /^-ms-/,
ne = /-([\da-z])/gi,
ie = function(e, t) {
return t.toUpperCase()
};
Z.fn = Z.prototype = {
jquery: K,
constructor: Z,
selector: "",
length: 0,
toArray: function() {
return $.call(this)
},
get: function(e) {
return null != e ? 0 > e ? this[e + this.length] : this[e] : $.call(this)
},
pushStack: function(e) {
var t = Z.merge(this.constructor(), e);
return t.prevObject = this, t.context = this.context, t
},
each: function(e, t) {
return Z.each(this, e, t)
},
map: function(e) {
return this.pushStack(Z.map(this, function(t, n) {
return e.call(t, n, t)
}))
},
slice: function() {
return this.pushStack($.apply(this, arguments))
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq(-1)
},
eq: function(e) {
var t = this.length,
n = +e + (0 > e ? t : 0);
return this.pushStack(n >= 0 && t > n ? [this[n]] : [])
},
end: function() {
return this.prevObject || this.constructor(null)
},
push: X,
sort: W.sort,
splice: W.splice
}, Z.extend = Z.fn.extend = function() {
var e, t, n, i, a, r, s = arguments[0] || {},
o = 1,
l = arguments.length,
c = !1;
for ("boolean" == typeof s && (c = s, s = arguments[o] || {}, o++), "object" == typeof s || Z.isFunction(s) || (s = {}), o === l && (s = this, o--); l > o; o++)
if (null != (e = arguments[o]))
for (t in e) n = s[t], i = e[t], s !== i && (c && i && (Z.isPlainObject(i) || (a = Z.isArray(i))) ? (a ? (a = !1, r = n && Z.isArray(n) ? n : []) : r = n && Z.isPlainObject(n) ? n : {}, s[t] = Z.extend(c, r, i)) : void 0 !== i && (s[t] = i));
return s
}, Z.extend({
expando: "jQuery" + (K + Math.random()).replace(/\D/g, ""),
isReady: !0,
error: function(e) {
throw new Error(e)
},
noop: function() {},
isFunction: function(e) {
return "function" === Z.type(e)
},
isArray: Array.isArray,
isWindow: function(e) {
return null != e && e === e.window
},
isNumeric: function(e) {
return !Z.isArray(e) && e - parseFloat(e) >= 0
},
isPlainObject: function(e) {
return "object" !== Z.type(e) || e.nodeType || Z.isWindow(e) ? !1 : e.constructor && !V.call(e.constructor.prototype, "isPrototypeOf") ? !1 : !0
},
isEmptyObject: function(e) {
var t;
for (t in e) return !1;
return !0
},
type: function(e) {
return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? U[J.call(e)] || "object" : typeof e
},
globalEval: function(e) {
var t, n = eval;
e = Z.trim(e), e && (1 === e.indexOf("use strict") ? (t = G.createElement("script"), t.text = e, G.head.appendChild(t).parentNode.removeChild(t)) : n(e))
},
camelCase: function(e) {
return e.replace(te, "ms-").replace(ne, ie)
},
nodeName: function(e, t) {
return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()
},
each: function(e, t, i) {
var a, r = 0,
s = e.length,
o = n(e);
if (i) {
if (o)
for (; s > r && (a = t.apply(e[r], i), a !== !1); r++);
else
for (r in e)
if (a = t.apply(e[r], i), a === !1) break
} else if (o)
for (; s > r && (a = t.call(e[r], r, e[r]), a !== !1); r++);
else
for (r in e)
if (a = t.call(e[r], r, e[r]), a === !1) break; return e
},
trim: function(e) {
return null == e ? "" : (e + "").replace(ee, "")
},
makeArray: function(e, t) {
var i = t || [];
return null != e && (n(Object(e)) ? Z.merge(i, "string" == typeof e ? [e] : e) : X.call(i, e)), i
},
inArray: function(e, t, n) {
return null == t ? -1 : Y.call(t, e, n)
},
merge: function(e, t) {
for (var n = +t.length, i = 0, a = e.length; n > i; i++) e[a++] = t[i];
return e.length = a, e
},
grep: function(e, t, n) {
for (var i, a = [], r = 0, s = e.length, o = !n; s > r; r++) i = !t(e[r], r), i !== o && a.push(e[r]);
return a
},
map: function(e, t, i) {
var a, r = 0,
s = e.length,
o = n(e),
l = [];
if (o)
for (; s > r; r++) a = t(e[r], r, i), null != a && l.push(a);
else
for (r in e) a = t(e[r], r, i), null != a && l.push(a);
return B.apply([], l)
},
guid: 1,
proxy: function(e, t) {
var n, i, a;
return "string" == typeof t && (n = e[t], t = e, e = n), Z.isFunction(e) ? (i = $.call(arguments, 2), a = function() {
return e.apply(t || this, i.concat($.call(arguments)))
}, a.guid = e.guid = e.guid || Z.guid++, a) : void 0
},
now: Date.now,
support: Q
}), Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t) {
U["[object " + t + "]"] = t.toLowerCase()
});
var ae = function(e) {
function t(e, t, n, i) {
var a, r, s, o, l, c, d, f, h, m;
if ((t ? t.ownerDocument || t : z) !== D && j(t), t = t || D, n = n || [], !e || "string" != typeof e) return n;
if (1 !== (o = t.nodeType) && 9 !== o) return [];
if (M && !i) {
if (a = ye.exec(e))
if (s = a[1]) {
if (9 === o) {
if (r = t.getElementById(s), !r || !r.parentNode) return n;
if (r.id === s) return n.push(r), n
} else if (t.ownerDocument && (r = t.ownerDocument.getElementById(s)) && R(t, r) && r.id === s) return n.push(r), n
} else {
if (a[2]) return Z.apply(n, t.getElementsByTagName(e)), n;
if ((s = a[3]) && _.getElementsByClassName && t.getElementsByClassName) return Z.apply(n, t.getElementsByClassName(s)), n
}
if (_.qsa && (!H || !H.test(e))) {
if (f = d = O, h = t, m = 9 === o && e, 1 === o && "object" !== t.nodeName.toLowerCase()) {
for (c = T(e), (d = t.getAttribute("id")) ? f = d.replace(xe, "\\$&") : t.setAttribute("id", f), f = "[id='" + f + "'] ", l = c.length; l--;) c[l] = f + p(c[l]);
h = be.test(e) && u(t.parentNode) || t, m = c.join(",")
}
if (m) try {
return Z.apply(n, h.querySelectorAll(m)), n
} catch (v) {} finally {
d || t.removeAttribute("id")
}
}
}
return A(e.replace(le, "$1"), t, n, i)
}
function n() {
function e(n, i) {
return t.push(n + " ") > w.cacheLength && delete e[t.shift()], e[n + " "] = i
}
var t = [];
return e
}
function i(e) {
return e[O] = !0, e
}
function a(e) {
var t = D.createElement("div");
try {
return !!e(t)
} catch (n) {
return !1
} finally {
t.parentNode && t.parentNode.removeChild(t), t = null
}
}
function r(e, t) {
for (var n = e.split("|"), i = e.length; i--;) w.attrHandle[n[i]] = t
}
function s(e, t) {
var n = t && e,
i = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || J) - (~e.sourceIndex || J);
if (i) return i;
if (n)
for (; n = n.nextSibling;)
if (n === t) return -1;
return e ? 1 : -1
}
function o(e) {
return function(t) {
var n = t.nodeName.toLowerCase();
return "input" === n && t.type === e
}
}
function l(e) {
return function(t) {
var n = t.nodeName.toLowerCase();
return ("input" === n || "button" === n) && t.type === e
}
}
function c(e) {
return i(function(t) {
return t = +t, i(function(n, i) {
for (var a, r = e([], n.length, t), s = r.length; s--;) n[a = r[s]] && (n[a] = !(i[a] = n[a]))
})
})
}
function u(e) {
return e && typeof e.getElementsByTagName !== U && e
}
function d() {}
function p(e) {
for (var t = 0, n = e.length, i = ""; n > t; t++) i += e[t].value;
return i
}
function f(e, t, n) {
var i = t.dir,
a = n && "parentNode" === i,
r = W++;
return t.first ? function(t, n, r) {
for (; t = t[i];)
if (1 === t.nodeType || a) return e(t, n, r)
} : function(t, n, s) {
var o, l, c = [I, r];
if (s) {
for (; t = t[i];)
if ((1 === t.nodeType || a) && e(t, n, s)) return !0
} else
for (; t = t[i];)
if (1 === t.nodeType || a) {
if (l = t[O] || (t[O] = {}), (o = l[i]) && o[0] === I && o[1] === r) return c[2] = o[2];
if (l[i] = c, c[2] = e(t, n, s)) return !0
}
}
}
function h(e) {
return e.length > 1 ? function(t, n, i) {
for (var a = e.length; a--;)
if (!e[a](t, n, i)) return !1;
return !0
} : e[0]
}
function m(e, n, i) {
for (var a = 0, r = n.length; r > a; a++) t(e, n[a], i);
return i
}
function v(e, t, n, i, a) {
for (var r, s = [], o = 0, l = e.length, c = null != t; l > o; o++)(r = e[o]) && (!n || n(r, i, a)) && (s.push(r), c && t.push(o));
return s
}
function g(e, t, n, a, r, s) {
return a && !a[O] && (a = g(a)), r && !r[O] && (r = g(r, s)), i(function(i, s, o, l) {
var c, u, d, p = [],
f = [],
h = s.length,
g = i || m(t || "*", o.nodeType ? [o] : o, []),
y = !e || !i && t ? g : v(g, p, e, o, l),
b = n ? r || (i ? e : h || a) ? [] : s : y;
if (n && n(y, b, o, l), a)
for (c = v(b, f), a(c, [], o, l), u = c.length; u--;)(d = c[u]) && (b[f[u]] = !(y[f[u]] = d));
if (i) {
if (r || e) {
if (r) {
for (c = [], u = b.length; u--;)(d = b[u]) && c.push(y[u] = d);
r(null, b = [], c, l)
}
for (u = b.length; u--;)(d = b[u]) && (c = r ? te.call(i, d) : p[u]) > -1 && (i[c] = !(s[c] = d))
}
} else b = v(b === s ? b.splice(h, b.length) : b), r ? r(null, s, b, l) : Z.apply(s, b)
})
}
function y(e) {
for (var t, n, i, a = e.length, r = w.relative[e[0].type], s = r || w.relative[" "], o = r ? 1 : 0, l = f(function(e) {
return e === t
}, s, !0), c = f(function(e) {
return te.call(t, e) > -1
}, s, !0), u = [function(e, n, i) {
return !r && (i || n !== F) || ((t = n).nodeType ? l(e, n, i) : c(e, n, i))
}]; a > o; o++)
if (n = w.relative[e[o].type]) u = [f(h(u), n)];
else {
if (n = w.filter[e[o].type].apply(null, e[o].matches), n[O]) {
for (i = ++o; a > i && !w.relative[e[i].type]; i++);
return g(o > 1 && h(u), o > 1 && p(e.slice(0, o - 1).concat({
value: " " === e[o - 2].type ? "*" : ""
})).replace(le, "$1"), n, i > o && y(e.slice(o, i)), a > i && y(e = e.slice(i)), a > i && p(e))
}
u.push(n)
}
return h(u)
}
function b(e, n) {
var a = n.length > 0,
r = e.length > 0,
s = function(i, s, o, l, c) {
var u, d, p, f = 0,
h = "0",
m = i && [],
g = [],
y = F,
b = i || r && w.find.TAG("*", c),
x = I += null == y ? 1 : Math.random() || .1,
_ = b.length;
for (c && (F = s !== D && s); h !== _ && null != (u = b[h]); h++) {
if (r && u) {
for (d = 0; p = e[d++];)
if (p(u, s, o)) {
l.push(u);
break
}
c && (I = x)
}
a && ((u = !p && u) && f--, i && m.push(u))
}
if (f += h, a && h !== f) {
for (d = 0; p = n[d++];) p(m, g, s, o);
if (i) {
if (f > 0)
for (; h--;) m[h] || g[h] || (g[h] = G.call(l));
g = v(g)
}
Z.apply(l, g), c && !i && g.length > 0 && f + n.length > 1 && t.uniqueSort(l)
}
return c && (I = x, F = y), m
};
return a ? i(s) : s
}
var x, _, w, k, C, T, S, A, F, E, q, j, D, N, M, H, P, L, R, O = "sizzle" + -new Date,
z = e.document,
I = 0,
W = 0,
$ = n(),
B = n(),
X = n(),
Y = function(e, t) {
return e === t && (q = !0), 0
},
U = "undefined",
J = 1 << 31,
V = {}.hasOwnProperty,
Q = [],
G = Q.pop,
K = Q.push,
Z = Q.push,
ee = Q.slice,
te = Q.indexOf || function(e) {
for (var t = 0, n = this.length; n > t; t++)
if (this[t] === e) return t;
return -1
},
ne = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
ie = "[\\x20\\t\\r\\n\\f]",
ae = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
re = ae.replace("w", "w#"),
se = "\\[" + ie + "*(" + ae + ")(?:" + ie + "*([*^$|!~]?=)" + ie + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + re + "))|)" + ie + "*\\]",
oe = ":(" + ae + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + se + ")*)|.*)\\)|)",
le = new RegExp("^" + ie + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ie + "+$", "g"),
ce = new RegExp("^" + ie + "*," + ie + "*"),
ue = new RegExp("^" + ie + "*([>+~]|" + ie + ")" + ie + "*"),
de = new RegExp("=" + ie + "*([^\\]'\"]*?)" + ie + "*\\]", "g"),
pe = new RegExp(oe),
fe = new RegExp("^" + re + "$"),
he = {
ID: new RegExp("^#(" + ae + ")"),
CLASS: new RegExp("^\\.(" + ae + ")"),
TAG: new RegExp("^(" + ae.replace("w", "w*") + ")"),
ATTR: new RegExp("^" + se),
PSEUDO: new RegExp("^" + oe),
CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ie + "*(even|odd|(([+-]|)(\\d*)n|)" + ie + "*(?:([+-]|)" + ie + "*(\\d+)|))" + ie + "*\\)|)", "i"),
bool: new RegExp("^(?:" + ne + ")$", "i"),
needsContext: new RegExp("^" + ie + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ie + "*((?:-\\d)?\\d*)" + ie + "*\\)|)(?=[^-]|$)", "i")
},
me = /^(?:input|select|textarea|button)$/i,
ve = /^h\d$/i,
ge = /^[^{]+\{\s*\[native \w/,
ye = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
be = /[+~]/,
xe = /'|\\/g,
_e = new RegExp("\\\\([\\da-f]{1,6}" + ie + "?|(" + ie + ")|.)", "ig"),
we = function(e, t, n) {
var i = "0x" + t - 65536;
return i !== i || n ? t : 0 > i ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320)
};
try {
Z.apply(Q = ee.call(z.childNodes), z.childNodes), Q[z.childNodes.length].nodeType
} catch (ke) {
Z = {
apply: Q.length ? function(e, t) {
K.apply(e, ee.call(t))
} : function(e, t) {
for (var n = e.length, i = 0; e[n++] = t[i++];);
e.length = n - 1
}
}
}
_ = t.support = {}, C = t.isXML = function(e) {
var t = e && (e.ownerDocument || e).documentElement;
return t ? "HTML" !== t.nodeName : !1
}, j = t.setDocument = function(e) {
var t, n = e ? e.ownerDocument || e : z,
i = n.defaultView;
return n !== D && 9 === n.nodeType && n.documentElement ? (D = n, N = n.documentElement, M = !C(n), i && i !== i.top && (i.addEventListener ? i.addEventListener("unload", function() {
j()
}, !1) : i.attachEvent && i.attachEvent("onunload", function() {
j()
})), _.attributes = a(function(e) {
return e.className = "i", !e.getAttribute("className")
}), _.getElementsByTagName = a(function(e) {
return e.appendChild(n.createComment("")), !e.getElementsByTagName("*").length
}), _.getElementsByClassName = ge.test(n.getElementsByClassName) && a(function(e) {
return e.innerHTML = "<div class='a'></div><div class='a i'></div>", e.firstChild.className = "i", 2 === e.getElementsByClassName("i").length
}), _.getById = a(function(e) {
return N.appendChild(e).id = O, !n.getElementsByName || !n.getElementsByName(O).length
}), _.getById ? (w.find.ID = function(e, t) {
if (typeof t.getElementById !== U && M) {
var n = t.getElementById(e);
return n && n.parentNode ? [n] : []
}
}, w.filter.ID = function(e) {
var t = e.replace(_e, we);
return function(e) {
return e.getAttribute("id") === t
}
}) : (delete w.find.ID, w.filter.ID = function(e) {
var t = e.replace(_e, we);
return function(e) {
var n = typeof e.getAttributeNode !== U && e.getAttributeNode("id");
return n && n.value === t
}
}), w.find.TAG = _.getElementsByTagName ? function(e, t) {
return typeof t.getElementsByTagName !== U ? t.getElementsByTagName(e) : void 0
} : function(e, t) {
var n, i = [],
a = 0,
r = t.getElementsByTagName(e);
if ("*" === e) {
for (; n = r[a++];) 1 === n.nodeType && i.push(n);
return i
}
return r
}, w.find.CLASS = _.getElementsByClassName && function(e, t) {
return typeof t.getElementsByClassName !== U && M ? t.getElementsByClassName(e) : void 0
}, P = [], H = [], (_.qsa = ge.test(n.querySelectorAll)) && (a(function(e) {
e.innerHTML = "<select msallowclip=''><option selected=''></option></select>", e.querySelectorAll("[msallowclip^='']").length && H.push("[*^$]=" + ie + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || H.push("\\[" + ie + "*(?:value|" + ne + ")"), e.querySelectorAll(":checked").length || H.push(":checked")
}), a(function(e) {
var t = n.createElement("input");
t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && H.push("name" + ie + "*[*^$|!~]?="), e.querySelectorAll(":enabled").length || H.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), H.push(",.*:")
})), (_.matchesSelector = ge.test(L = N.matches || N.webkitMatchesSelector || N.mozMatchesSelector || N.oMatchesSelector || N.msMatchesSelector)) && a(function(e) {
_.disconnectedMatch = L.call(e, "div"), L.call(e, "[s!='']:x"), P.push("!=", oe)
}), H = H.length && new RegExp(H.join("|")), P = P.length && new RegExp(P.join("|")), t = ge.test(N.compareDocumentPosition), R = t || ge.test(N.contains) ? function(e, t) {
var n = 9 === e.nodeType ? e.documentElement : e,
i = t && t.parentNode;
return e === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(i)))
} : function(e, t) {
if (t)
for (; t = t.parentNode;)
if (t === e) return !0;
return !1
}, Y = t ? function(e, t) {
if (e === t) return q = !0, 0;
var i = !e.compareDocumentPosition - !t.compareDocumentPosition;
return i ? i : (i = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1, 1 & i || !_.sortDetached && t.compareDocumentPosition(e) === i ? e === n || e.ownerDocument === z && R(z, e) ? -1 : t === n || t.ownerDocument === z && R(z, t) ? 1 : E ? te.call(E, e) - te.call(E, t) : 0 : 4 & i ? -1 : 1)
} : function(e, t) {
if (e === t) return q = !0, 0;
var i, a = 0,
r = e.parentNode,
o = t.parentNode,
l = [e],
c = [t];
if (!r || !o) return e === n ? -1 : t === n ? 1 : r ? -1 : o ? 1 : E ? te.call(E, e) - te.call(E, t) : 0;
if (r === o) return s(e, t);
for (i = e; i = i.parentNode;) l.unshift(i);
for (i = t; i = i.parentNode;) c.unshift(i);
for (; l[a] === c[a];) a++;
return a ? s(l[a], c[a]) : l[a] === z ? -1 : c[a] === z ? 1 : 0
}, n) : D
}, t.matches = function(e, n) {
return t(e, null, null, n)
}, t.matchesSelector = function(e, n) {
if ((e.ownerDocument || e) !== D && j(e), n = n.replace(de, "='$1']"), !(!_.matchesSelector || !M || P && P.test(n) || H && H.test(n))) try {
var i = L.call(e, n);
if (i || _.disconnectedMatch || e.document && 11 !== e.document.nodeType) return i
} catch (a) {}
return t(n, D, null, [e]).length > 0
}, t.contains = function(e, t) {
return (e.ownerDocument || e) !== D && j(e), R(e, t)
}, t.attr = function(e, t) {
(e.ownerDocument || e) !== D && j(e);
var n = w.attrHandle[t.toLowerCase()],
i = n && V.call(w.attrHandle, t.toLowerCase()) ? n(e, t, !M) : void 0;
return void 0 !== i ? i : _.attributes || !M ? e.getAttribute(t) : (i = e.getAttributeNode(t)) && i.specified ? i.value : null
}, t.error = function(e) {
throw new Error("Syntax error, unrecognized expression: " + e)
}, t.uniqueSort = function(e) {
var t, n = [],
i = 0,
a = 0;
if (q = !_.detectDuplicates, E = !_.sortStable && e.slice(0), e.sort(Y), q) {
for (; t = e[a++];) t === e[a] && (i = n.push(a));
for (; i--;) e.splice(n[i], 1)
}
return E = null, e
}, k = t.getText = function(e) {
var t, n = "",
i = 0,
a = e.nodeType;
if (a) {
if (1 === a || 9 === a || 11 === a) {
if ("string" == typeof e.textContent) return e.textContent;
for (e = e.firstChild; e; e = e.nextSibling) n += k(e)
} else if (3 === a || 4 === a) return e.nodeValue
} else
for (; t = e[i++];) n += k(t);
return n
}, w = t.selectors = {
cacheLength: 50,
createPseudo: i,
match: he,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: !0
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: !0
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
ATTR: function(e) {
return e[1] = e[1].replace(_e, we), e[3] = (e[3] || e[4] || e[5] || "").replace(_e, we), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)
},
CHILD: function(e) {
return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || t.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && t.error(e[0]), e
},
PSEUDO: function(e) {
var t, n = !e[6] && e[2];
return he.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && pe.test(n) && (t = T(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3))
}
},
filter: {
TAG: function(e) {
var t = e.replace(_e, we).toLowerCase();
return "*" === e ? function() {
return !0
} : function(e) {
return e.nodeName && e.nodeName.toLowerCase() === t
}
},
CLASS: function(e) {
var t = $[e + " "];
return t || (t = new RegExp("(^|" + ie + ")" + e + "(" + ie + "|$)")) && $(e, function(e) {
return t.test("string" == typeof e.className && e.className || typeof e.getAttribute !== U && e.getAttribute("class") || "")
})
},
ATTR: function(e, n, i) {
return function(a) {
var r = t.attr(a, e);
return null == r ? "!=" === n : n ? (r += "", "=" === n ? r === i : "!=" === n ? r !== i : "^=" === n ? i && 0 === r.indexOf(i) : "*=" === n ? i && r.indexOf(i) > -1 : "$=" === n ? i && r.slice(-i.length) === i : "~=" === n ? (" " + r + " ").indexOf(i) > -1 : "|=" === n ? r === i || r.slice(0, i.length + 1) === i + "-" : !1) : !0
}
},
CHILD: function(e, t, n, i, a) {
var r = "nth" !== e.slice(0, 3),
s = "last" !== e.slice(-4),
o = "of-type" === t;
return 1 === i && 0 === a ? function(e) {
return !!e.parentNode
} : function(t, n, l) {
var c, u, d, p, f, h, m = r !== s ? "nextSibling" : "previousSibling",
v = t.parentNode,
g = o && t.nodeName.toLowerCase(),
y = !l && !o;
if (v) {
if (r) {
for (; m;) {
for (d = t; d = d[m];)
if (o ? d.nodeName.toLowerCase() === g : 1 === d.nodeType) return !1;
h = m = "only" === e && !h && "nextSibling"
}
return !0
}
if (h = [s ? v.firstChild : v.lastChild], s && y) {
for (u = v[O] || (v[O] = {}), c = u[e] || [], f = c[0] === I && c[1], p = c[0] === I && c[2], d = f && v.childNodes[f]; d = ++f && d && d[m] || (p = f = 0) || h.pop();)
if (1 === d.nodeType && ++p && d === t) {
u[e] = [I, f, p];
break
}
} else if (y && (c = (t[O] || (t[O] = {}))[e]) && c[0] === I) p = c[1];
else
for (;
(d = ++f && d && d[m] || (p = f = 0) || h.pop()) && ((o ? d.nodeName.toLowerCase() !== g : 1 !== d.nodeType) || !++p || (y && ((d[O] || (d[O] = {}))[e] = [I, p]), d !== t)););
return p -= a, p === i || p % i === 0 && p / i >= 0
}
}
},
PSEUDO: function(e, n) {
var a, r = w.pseudos[e] || w.setFilters[e.toLowerCase()] || t.error("unsupported pseudo: " + e);
return r[O] ? r(n) : r.length > 1 ? (a = [e, e, "", n], w.setFilters.hasOwnProperty(e.toLowerCase()) ? i(function(e, t) {
for (var i, a = r(e, n), s = a.length; s--;) i = te.call(e, a[s]), e[i] = !(t[i] = a[s])
}) : function(e) {
return r(e, 0, a)
}) : r
}
},
pseudos: {
not: i(function(e) {
var t = [],
n = [],
a = S(e.replace(le, "$1"));
return a[O] ? i(function(e, t, n, i) {
for (var r, s = a(e, null, i, []), o = e.length; o--;)(r = s[o]) && (e[o] = !(t[o] = r))
}) : function(e, i, r) {
return t[0] = e, a(t, null, r, n), !n.pop()
}
}),
has: i(function(e) {
return function(n) {
return t(e, n).length > 0
}
}),
contains: i(function(e) {
return function(t) {
return (t.textContent || t.innerText || k(t)).indexOf(e) > -1
}
}),
lang: i(function(e) {
return fe.test(e || "") || t.error("unsupported lang: " + e), e = e.replace(_e, we).toLowerCase(),
function(t) {
var n;
do
if (n = M ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-");
while ((t = t.parentNode) && 1 === t.nodeType);
return !1
}
}),
target: function(t) {
var n = e.location && e.location.hash;
return n && n.slice(1) === t.id
},
root: function(e) {
return e === N
},
focus: function(e) {
return e === D.activeElement && (!D.hasFocus || D.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
},
enabled: function(e) {
return e.disabled === !1
},
disabled: function(e) {
return e.disabled === !0
},
checked: function(e) {
var t = e.nodeName.toLowerCase();
return "input" === t && !!e.checked || "option" === t && !!e.selected
},
selected: function(e) {
return e.parentNode && e.parentNode.selectedIndex, e.selected === !0
},
empty: function(e) {
for (e = e.firstChild; e; e = e.nextSibling)
if (e.nodeType < 6) return !1;
return !0
},
parent: function(e) {
return !w.pseudos.empty(e)
},
header: function(e) {
return ve.test(e.nodeName)
},
input: function(e) {
return me.test(e.nodeName)
},
button: function(e) {
var t = e.nodeName.toLowerCase();
return "input" === t && "button" === e.type || "button" === t
},
text: function(e) {
var t;
return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase())
},
first: c(function() {
return [0]
}),
last: c(function(e, t) {
return [t - 1]
}),
eq: c(function(e, t, n) {
return [0 > n ? n + t : n]
}),
even: c(function(e, t) {
for (var n = 0; t > n; n += 2) e.push(n);
return e
}),
odd: c(function(e, t) {
for (var n = 1; t > n; n += 2) e.push(n);
return e
}),
lt: c(function(e, t, n) {
for (var i = 0 > n ? n + t : n; --i >= 0;) e.push(i);
return e
}),
gt: c(function(e, t, n) {
for (var i = 0 > n ? n + t : n; ++i < t;) e.push(i);
return e
})
}
}, w.pseudos.nth = w.pseudos.eq;
for (x in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0
}) w.pseudos[x] = o(x);
for (x in {
submit: !0,
reset: !0
}) w.pseudos[x] = l(x);
return d.prototype = w.filters = w.pseudos, w.setFilters = new d, T = t.tokenize = function(e, n) {
var i, a, r, s, o, l, c, u = B[e + " "];
if (u) return n ? 0 : u.slice(0);
for (o = e, l = [], c = w.preFilter; o;) {
(!i || (a = ce.exec(o))) && (a && (o = o.slice(a[0].length) || o), l.push(r = [])), i = !1, (a = ue.exec(o)) && (i = a.shift(), r.push({
value: i,
type: a[0].replace(le, " ")
}), o = o.slice(i.length));
for (s in w.filter) !(a = he[s].exec(o)) || c[s] && !(a = c[s](a)) || (i = a.shift(), r.push({
value: i,
type: s,
matches: a
}), o = o.slice(i.length));
if (!i) break
}
return n ? o.length : o ? t.error(e) : B(e, l).slice(0)
}, S = t.compile = function(e, t) {
var n, i = [],
a = [],
r = X[e + " "];
if (!r) {
for (t || (t = T(e)), n = t.length; n--;) r = y(t[n]), r[O] ? i.push(r) : a.push(r);
r = X(e, b(a, i)), r.selector = e
}
return r
}, A = t.select = function(e, t, n, i) {
var a, r, s, o, l, c = "function" == typeof e && e,
d = !i && T(e = c.selector || e);
if (n = n || [], 1 === d.length) {
if (r = d[0] = d[0].slice(0), r.length > 2 && "ID" === (s = r[0]).type && _.getById && 9 === t.nodeType && M && w.relative[r[1].type]) {
if (t = (w.find.ID(s.matches[0].replace(_e, we), t) || [])[0], !t) return n;
c && (t = t.parentNode), e = e.slice(r.shift().value.length)
}
for (a = he.needsContext.test(e) ? 0 : r.length; a-- && (s = r[a], !w.relative[o = s.type]);)
if ((l = w.find[o]) && (i = l(s.matches[0].replace(_e, we), be.test(r[0].type) && u(t.parentNode) || t))) {
if (r.splice(a, 1), e = i.length && p(r), !e) return Z.apply(n, i), n;
break
}
}
return (c || S(e, d))(i, t, !M, n, be.test(e) && u(t.parentNode) || t), n
}, _.sortStable = O.split("").sort(Y).join("") === O, _.detectDuplicates = !!q, j(), _.sortDetached = a(function(e) {
return 1 & e.compareDocumentPosition(D.createElement("div"))
}), a(function(e) {
return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
}) || r("type|href|height|width", function(e, t, n) {
return n ? void 0 : e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
}), _.attributes && a(function(e) {
return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
}) || r("value", function(e, t, n) {
return n || "input" !== e.nodeName.toLowerCase() ? void 0 : e.defaultValue
}), a(function(e) {
return null == e.getAttribute("disabled")
}) || r(ne, function(e, t, n) {
var i;
return n ? void 0 : e[t] === !0 ? t.toLowerCase() : (i = e.getAttributeNode(t)) && i.specified ? i.value : null
}), t
}(e);
Z.find = ae, Z.expr = ae.selectors, Z.expr[":"] = Z.expr.pseudos, Z.unique = ae.uniqueSort, Z.text = ae.getText, Z.isXMLDoc = ae.isXML, Z.contains = ae.contains;
var re = Z.expr.match.needsContext,
se = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
oe = /^.[^:#\[\.,]*$/;
Z.filter = function(e, t, n) {
var i = t[0];
return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === i.nodeType ? Z.find.matchesSelector(i, e) ? [i] : [] : Z.find.matches(e, Z.grep(t, function(e) {
return 1 === e.nodeType
}))
}, Z.fn.extend({
find: function(e) {
var t, n = this.length,
i = [],
a = this;
if ("string" != typeof e) return this.pushStack(Z(e).filter(function() {
for (t = 0; n > t; t++)
if (Z.contains(a[t], this)) return !0
}));
for (t = 0; n > t; t++) Z.find(e, a[t], i);
return i = this.pushStack(n > 1 ? Z.unique(i) : i), i.selector = this.selector ? this.selector + " " + e : e, i
},
filter: function(e) {
return this.pushStack(i(this, e || [], !1))
},
not: function(e) {
return this.pushStack(i(this, e || [], !0))
},
is: function(e) {
return !!i(this, "string" == typeof e && re.test(e) ? Z(e) : e || [], !1).length
}
});
var le, ce = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
ue = Z.fn.init = function(e, t) {
var n, i;
if (!e) return this;
if ("string" == typeof e) {
if (n = "<" === e[0] && ">" === e[e.length - 1] && e.length >= 3 ? [null, e, null] : ce.exec(e), !n || !n[1] && t) return !t || t.jquery ? (t || le).find(e) : this.constructor(t).find(e);
if (n[1]) {
if (t = t instanceof Z ? t[0] : t, Z.merge(this, Z.parseHTML(n[1], t && t.nodeType ? t.ownerDocument || t : G, !0)), se.test(n[1]) && Z.isPlainObject(t))
for (n in t) Z.isFunction(this[n]) ? this[n](t[n]) : this.attr(n, t[n]);
return this
}
return i = G.getElementById(n[2]), i && i.parentNode && (this.length = 1, this[0] = i), this.context = G, this.selector = e, this
}
return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : Z.isFunction(e) ? "undefined" != typeof le.ready ? le.ready(e) : e(Z) : (void 0 !== e.selector && (this.selector = e.selector, this.context = e.context), Z.makeArray(e, this))
};
ue.prototype = Z.fn, le = Z(G);
var de = /^(?:parents|prev(?:Until|All))/,
pe = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
Z.extend({
dir: function(e, t, n) {
for (var i = [], a = void 0 !== n;
(e = e[t]) && 9 !== e.nodeType;)
if (1 === e.nodeType) {
if (a && Z(e).is(n)) break;
i.push(e)
}
return i
},
sibling: function(e, t) {
for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
return n
}
}), Z.fn.extend({
has: function(e) {
var t = Z(e, this),
n = t.length;
return this.filter(function() {
for (var e = 0; n > e; e++)
if (Z.contains(this, t[e])) return !0
})
},
closest: function(e, t) {
for (var n, i = 0, a = this.length, r = [], s = re.test(e) || "string" != typeof e ? Z(e, t || this.context) : 0; a > i; i++)
for (n = this[i]; n && n !== t; n = n.parentNode)
if (n.nodeType < 11 && (s ? s.index(n) > -1 : 1 === n.nodeType && Z.find.matchesSelector(n, e))) {
r.push(n);
break
}
return this.pushStack(r.length > 1 ? Z.unique(r) : r)
},
index: function(e) {
return e ? "string" == typeof e ? Y.call(Z(e), this[0]) : Y.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
},
add: function(e, t) {
return this.pushStack(Z.unique(Z.merge(this.get(), Z(e, t))))
},
addBack: function(e) {
return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
}
}), Z.each({
parent: function(e) {
var t = e.parentNode;
return t && 11 !== t.nodeType ? t : null
},
parents: function(e) {
return Z.dir(e, "parentNode")
},
parentsUntil: function(e, t, n) {
return Z.dir(e, "parentNode", n)
},
next: function(e) {
return a(e, "nextSibling")
},
prev: function(e) {
return a(e, "previousSibling")
},
nextAll: function(e) {
return Z.dir(e, "nextSibling")
},
prevAll: function(e) {
return Z.dir(e, "previousSibling")
},
nextUntil: function(e, t, n) {
return Z.dir(e, "nextSibling", n)
},
prevUntil: function(e, t, n) {
return Z.dir(e, "previousSibling", n)
},
siblings: function(e) {
return Z.sibling((e.parentNode || {}).firstChild, e)
},
children: function(e) {
return Z.sibling(e.firstChild)
},
contents: function(e) {
return e.contentDocument || Z.merge([], e.childNodes)
}
}, function(e, t) {
Z.fn[e] = function(n, i) {
var a = Z.map(this, t, n);
return "Until" !== e.slice(-5) && (i = n), i && "string" == typeof i && (a = Z.filter(i, a)), this.length > 1 && (pe[e] || Z.unique(a), de.test(e) && a.reverse()), this.pushStack(a)
}
});
var fe = /\S+/g,
he = {};
Z.Callbacks = function(e) {
e = "string" == typeof e ? he[e] || r(e) : Z.extend({}, e);
var t, n, i, a, s, o, l = [],
c = !e.once && [],
u = function(r) {
for (t = e.memory && r, n = !0, o = a || 0, a = 0, s = l.length, i = !0; l && s > o; o++)
if (l[o].apply(r[0], r[1]) === !1 && e.stopOnFalse) {
t = !1;
break
}
i = !1, l && (c ? c.length && u(c.shift()) : t ? l = [] : d.disable())
},
d = {
add: function() {
if (l) {
var n = l.length;
! function r(t) {
Z.each(t, function(t, n) {
var i = Z.type(n);
"function" === i ? e.unique && d.has(n) || l.push(n) : n && n.length && "string" !== i && r(n)
})
}(arguments), i ? s = l.length : t && (a = n, u(t))
}
return this
},
remove: function() {
return l && Z.each(arguments, function(e, t) {
for (var n;
(n = Z.inArray(t, l, n)) > -1;) l.splice(n, 1), i && (s >= n && s--, o >= n && o--)
}), this
},
has: function(e) {
return e ? Z.inArray(e, l) > -1 : !(!l || !l.length)
},
empty: function() {
return l = [], s = 0, this
},
disable: function() {
return l = c = t = void 0, this
},
disabled: function() {
return !l
},
lock: function() {
return c = void 0, t || d.disable(), this
},
locked: function() {
return !c
},
fireWith: function(e, t) {
return !l || n && !c || (t = t || [], t = [e, t.slice ? t.slice() : t], i ? c.push(t) : u(t)), this
},
fire: function() {
return d.fireWith(this, arguments), this
},
fired: function() {
return !!n
}
};
return d
}, Z.extend({
Deferred: function(e) {
var t = [
["resolve", "done", Z.Callbacks("once memory"), "resolved"],
["reject", "fail", Z.Callbacks("once memory"), "rejected"],
["notify", "progress", Z.Callbacks("memory")]
],
n = "pending",
i = {
state: function() {
return n
},
always: function() {
return a.done(arguments).fail(arguments), this
},
then: function() {
var e = arguments;
return Z.Deferred(function(n) {
Z.each(t, function(t, r) {
var s = Z.isFunction(e[t]) && e[t];
a[r[1]](function() {
var e = s && s.apply(this, arguments);
e && Z.isFunction(e.promise) ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[r[0] + "With"](this === i ? n.promise() : this, s ? [e] : arguments)
})
}), e = null
}).promise()
},
promise: function(e) {
return null != e ? Z.extend(e, i) : i
}
},
a = {};
return i.pipe = i.then, Z.each(t, function(e, r) {
var s = r[2],
o = r[3];
i[r[1]] = s.add, o && s.add(function() {
n = o
}, t[1 ^ e][2].disable, t[2][2].lock), a[r[0]] = function() {
return a[r[0] + "With"](this === a ? i : this, arguments), this
}, a[r[0] + "With"] = s.fireWith
}), i.promise(a), e && e.call(a, a), a
},
when: function(e) {
var t, n, i, a = 0,
r = $.call(arguments),
s = r.length,
o = 1 !== s || e && Z.isFunction(e.promise) ? s : 0,
l = 1 === o ? e : Z.Deferred(),
c = function(e, n, i) {
return function(a) {
n[e] = this, i[e] = arguments.length > 1 ? $.call(arguments) : a, i === t ? l.notifyWith(n, i) : --o || l.resolveWith(n, i)
}
};
if (s > 1)
for (t = new Array(s), n = new Array(s), i = new Array(s); s > a; a++) r[a] && Z.isFunction(r[a].promise) ? r[a].promise().done(c(a, i, r)).fail(l.reject).progress(c(a, n, t)) : --o;
return o || l.resolveWith(i, r), l.promise()
}
});
var me;
Z.fn.ready = function(e) {
return Z.ready.promise().done(e), this
}, Z.extend({
isReady: !1,
readyWait: 1,
holdReady: function(e) {
e ? Z.readyWait++ : Z.ready(!0)
},
ready: function(e) {
(e === !0 ? --Z.readyWait : Z.isReady) || (Z.isReady = !0, e !== !0 && --Z.readyWait > 0 || (me.resolveWith(G, [Z]), Z.fn.triggerHandler && (Z(G).triggerHandler("ready"), Z(G).off("ready"))))
}
}), Z.ready.promise = function(t) {
return me || (me = Z.Deferred(), "complete" === G.readyState ? setTimeout(Z.ready) : (G.addEventListener("DOMContentLoaded", s, !1), e.addEventListener("load", s, !1))), me.promise(t)
}, Z.ready.promise();
var ve = Z.access = function(e, t, n, i, a, r, s) {
var o = 0,
l = e.length,
c = null == n;
if ("object" === Z.type(n)) {
a = !0;
for (o in n) Z.access(e, t, o, n[o], !0, r, s)
} else if (void 0 !== i && (a = !0, Z.isFunction(i) || (s = !0), c && (s ? (t.call(e, i), t = null) : (c = t, t = function(e, t, n) {
return c.call(Z(e), n)
})), t))
for (; l > o; o++) t(e[o], n, s ? i : i.call(e[o], o, t(e[o], n)));
return a ? e : c ? t.call(e) : l ? t(e[0], n) : r
};
Z.acceptData = function(e) {
return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType
}, o.uid = 1, o.accepts = Z.acceptData, o.prototype = {
key: function(e) {
if (!o.accepts(e)) return 0;
var t = {},
n = e[this.expando];
if (!n) {
n = o.uid++;
try {
t[this.expando] = {
value: n
}, Object.defineProperties(e, t)
} catch (i) {
t[this.expando] = n, Z.extend(e, t)
}
}
return this.cache[n] || (this.cache[n] = {}), n
},
set: function(e, t, n) {
var i, a = this.key(e),
r = this.cache[a];
if ("string" == typeof t) r[t] = n;
else if (Z.isEmptyObject(r)) Z.extend(this.cache[a], t);
else
for (i in t) r[i] = t[i];
return r
},
get: function(e, t) {
var n = this.cache[this.key(e)];
return void 0 === t ? n : n[t]
},
access: function(e, t, n) {
var i;
return void 0 === t || t && "string" == typeof t && void 0 === n ? (i = this.get(e, t), void 0 !== i ? i : this.get(e, Z.camelCase(t))) : (this.set(e, t, n), void 0 !== n ? n : t)
},
remove: function(e, t) {
var n, i, a, r = this.key(e),
s = this.cache[r];
if (void 0 === t) this.cache[r] = {};
else {
Z.isArray(t) ? i = t.concat(t.map(Z.camelCase)) : (a = Z.camelCase(t), t in s ? i = [t, a] : (i = a, i = i in s ? [i] : i.match(fe) || [])), n = i.length;
for (; n--;) delete s[i[n]]
}
},
hasData: function(e) {
return !Z.isEmptyObject(this.cache[e[this.expando]] || {})
},
discard: function(e) {
e[this.expando] && delete this.cache[e[this.expando]]
}
};
var ge = new o,
ye = new o,
be = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
xe = /([A-Z])/g;
Z.extend({
hasData: function(e) {
return ye.hasData(e) || ge.hasData(e)
},
data: function(e, t, n) {
return ye.access(e, t, n)
},
removeData: function(e, t) {
ye.remove(e, t)
},
_data: function(e, t, n) {
return ge.access(e, t, n)
},
_removeData: function(e, t) {
ge.remove(e, t)
}
}), Z.fn.extend({
data: function(e, t) {
var n, i, a, r = this[0],
s = r && r.attributes;
if (void 0 === e) {
if (this.length && (a = ye.get(r), 1 === r.nodeType && !ge.get(r, "hasDataAttrs"))) {
for (n = s.length; n--;) s[n] && (i = s[n].name, 0 === i.indexOf("data-") && (i = Z.camelCase(i.slice(5)), l(r, i, a[i])));
ge.set(r, "hasDataAttrs", !0)
}
return a
}
return "object" == typeof e ? this.each(function() {
ye.set(this, e)
}) : ve(this, function(t) {
var n, i = Z.camelCase(e);
if (r && void 0 === t) {
if (n = ye.get(r, e), void 0 !== n) return n;
if (n = ye.get(r, i), void 0 !== n) return n;
if (n = l(r, i, void 0), void 0 !== n) return n
} else this.each(function() {
var n = ye.get(this, i);
ye.set(this, i, t), -1 !== e.indexOf("-") && void 0 !== n && ye.set(this, e, t)
})
}, null, t, arguments.length > 1, null, !0)
},
removeData: function(e) {
return this.each(function() {
ye.remove(this, e)
})
}
}), Z.extend({
queue: function(e, t, n) {
var i;
return e ? (t = (t || "fx") + "queue", i = ge.get(e, t), n && (!i || Z.isArray(n) ? i = ge.access(e, t, Z.makeArray(n)) : i.push(n)), i || []) : void 0
},
dequeue: function(e, t) {
t = t || "fx";
var n = Z.queue(e, t),
i = n.length,
a = n.shift(),
r = Z._queueHooks(e, t),
s = function() {
Z.dequeue(e, t)
};
"inprogress" === a && (a = n.shift(), i--), a && ("fx" === t && n.unshift("inprogress"), delete r.stop, a.call(e, s, r)), !i && r && r.empty.fire()
},
_queueHooks: function(e, t) {
var n = t + "queueHooks";
return ge.get(e, n) || ge.access(e, n, {
empty: Z.Callbacks("once memory").add(function() {
ge.remove(e, [t + "queue", n])
})
})
}
}), Z.fn.extend({
queue: function(e, t) {
var n = 2;
return "string" != typeof e && (t = e, e = "fx", n--), arguments.length < n ? Z.queue(this[0], e) : void 0 === t ? this : this.each(function() {
var n = Z.queue(this, e, t);
Z._queueHooks(this, e), "fx" === e && "inprogress" !== n[0] && Z.dequeue(this, e)
})
},
dequeue: function(e) {
return this.each(function() {
Z.dequeue(this, e)
})
},
clearQueue: function(e) {
return this.queue(e || "fx", [])
},
promise: function(e, t) {
var n, i = 1,
a = Z.Deferred(),
r = this,
s = this.length,
o = function() {
--i || a.resolveWith(r, [r])
};
for ("string" != typeof e && (t = e, e = void 0), e = e || "fx"; s--;) n = ge.get(r[s], e + "queueHooks"), n && n.empty && (i++, n.empty.add(o));
return o(), a.promise(t)
}
});
var _e = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
we = ["Top", "Right", "Bottom", "Left"],
ke = function(e, t) {
return e = t || e, "none" === Z.css(e, "display") || !Z.contains(e.ownerDocument, e)
},
Ce = /^(?:checkbox|radio)$/i;
! function() {
var e = G.createDocumentFragment(),
t = e.appendChild(G.createElement("div")),
n = G.createElement("input");
n.setAttribute("type", "radio"), n.setAttribute("checked", "checked"), n.setAttribute("name", "t"), t.appendChild(n), Q.checkClone = t.cloneNode(!0).cloneNode(!0).lastChild.checked, t.innerHTML = "<textarea>x</textarea>", Q.noCloneChecked = !!t.cloneNode(!0).lastChild.defaultValue
}();
var Te = "undefined";
Q.focusinBubbles = "onfocusin" in e;
var Se = /^key/,
Ae = /^(?:mouse|pointer|contextmenu)|click/,
Fe = /^(?:focusinfocus|focusoutblur)$/,
Ee = /^([^.]*)(?:\.(.+)|)$/;
Z.event = {
global: {},
add: function(e, t, n, i, a) {
var r, s, o, l, c, u, d, p, f, h, m, v = ge.get(e);
if (v)
for (n.handler && (r = n, n = r.handler, a = r.selector), n.guid || (n.guid = Z.guid++), (l = v.events) || (l = v.events = {}), (s = v.handle) || (s = v.handle = function(t) {
return typeof Z !== Te && Z.event.triggered !== t.type ? Z.event.dispatch.apply(e, arguments) : void 0
}), t = (t || "").match(fe) || [""], c = t.length; c--;) o = Ee.exec(t[c]) || [], f = m = o[1], h = (o[2] || "").split(".").sort(), f && (d = Z.event.special[f] || {}, f = (a ? d.delegateType : d.bindType) || f, d = Z.event.special[f] || {}, u = Z.extend({
type: f,
origType: m,
data: i,
handler: n,
guid: n.guid,
selector: a,
needsContext: a && Z.expr.match.needsContext.test(a),
namespace: h.join(".")
}, r), (p = l[f]) || (p = l[f] = [], p.delegateCount = 0, d.setup && d.setup.call(e, i, h, s) !== !1 || e.addEventListener && e.addEventListener(f, s, !1)), d.add && (d.add.call(e, u), u.handler.guid || (u.handler.guid = n.guid)), a ? p.splice(p.delegateCount++, 0, u) : p.push(u), Z.event.global[f] = !0)
},
remove: function(e, t, n, i, a) {
var r, s, o, l, c, u, d, p, f, h, m, v = ge.hasData(e) && ge.get(e);
if (v && (l = v.events)) {
for (t = (t || "").match(fe) || [""], c = t.length; c--;)
if (o = Ee.exec(t[c]) || [], f = m = o[1], h = (o[2] || "").split(".").sort(), f) {
for (d = Z.event.special[f] || {}, f = (i ? d.delegateType : d.bindType) || f, p = l[f] || [], o = o[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), s = r = p.length; r--;) u = p[r], !a && m !== u.origType || n && n.guid !== u.guid || o && !o.test(u.namespace) || i && i !== u.selector && ("**" !== i || !u.selector) || (p.splice(r, 1), u.selector && p.delegateCount--, d.remove && d.remove.call(e, u));
s && !p.length && (d.teardown && d.teardown.call(e, h, v.handle) !== !1 || Z.removeEvent(e, f, v.handle), delete l[f])
} else
for (f in l) Z.event.remove(e, f + t[c], n, i, !0);
Z.isEmptyObject(l) && (delete v.handle, ge.remove(e, "events"))
}
},
trigger: function(t, n, i, a) {
var r, s, o, l, c, u, d, p = [i || G],
f = V.call(t, "type") ? t.type : t,
h = V.call(t, "namespace") ? t.namespace.split(".") : [];
if (s = o = i = i || G, 3 !== i.nodeType && 8 !== i.nodeType && !Fe.test(f + Z.event.triggered) && (f.indexOf(".") >= 0 && (h = f.split("."), f = h.shift(), h.sort()), c = f.indexOf(":") < 0 && "on" + f, t = t[Z.expando] ? t : new Z.Event(f, "object" == typeof t && t), t.isTrigger = a ? 2 : 3, t.namespace = h.join("."), t.namespace_re = t.namespace ? new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = i), n = null == n ? [t] : Z.makeArray(n, [t]), d = Z.event.special[f] || {}, a || !d.trigger || d.trigger.apply(i, n) !== !1)) {
if (!a && !d.noBubble && !Z.isWindow(i)) {
for (l = d.delegateType || f, Fe.test(l + f) || (s = s.parentNode); s; s = s.parentNode) p.push(s), o = s;
o === (i.ownerDocument || G) && p.push(o.defaultView || o.parentWindow || e)
}
for (r = 0;
(s = p[r++]) && !t.isPropagationStopped();) t.type = r > 1 ? l : d.bindType || f, u = (ge.get(s, "events") || {})[t.type] && ge.get(s, "handle"), u && u.apply(s, n), u = c && s[c], u && u.apply && Z.acceptData(s) && (t.result = u.apply(s, n), t.result === !1 && t.preventDefault());
return t.type = f, a || t.isDefaultPrevented() || d._default && d._default.apply(p.pop(), n) !== !1 || !Z.acceptData(i) || c && Z.isFunction(i[f]) && !Z.isWindow(i) && (o = i[c], o && (i[c] = null), Z.event.triggered = f, i[f](), Z.event.triggered = void 0, o && (i[c] = o)), t.result
}
},
dispatch: function(e) {
e = Z.event.fix(e);
var t, n, i, a, r, s = [],
o = $.call(arguments),
l = (ge.get(this, "events") || {})[e.type] || [],
c = Z.event.special[e.type] || {};
if (o[0] = e, e.delegateTarget = this, !c.preDispatch || c.preDispatch.call(this, e) !== !1) {
for (s = Z.event.handlers.call(this, e, l), t = 0;
(a = s[t++]) && !e.isPropagationStopped();)
for (e.currentTarget = a.elem, n = 0;
(r = a.handlers[n++]) && !e.isImmediatePropagationStopped();)(!e.namespace_re || e.namespace_re.test(r.namespace)) && (e.handleObj = r, e.data = r.data, i = ((Z.event.special[r.origType] || {}).handle || r.handler).apply(a.elem, o), void 0 !== i && (e.result = i) === !1 && (e.preventDefault(), e.stopPropagation()));
return c.postDispatch && c.postDispatch.call(this, e), e.result
}
},
handlers: function(e, t) {
var n, i, a, r, s = [],
o = t.delegateCount,
l = e.target;
if (o && l.nodeType && (!e.button || "click" !== e.type))
for (; l !== this; l = l.parentNode || this)
if (l.disabled !== !0 || "click" !== e.type) {
for (i = [], n = 0; o > n; n++) r = t[n], a = r.selector + " ", void 0 === i[a] && (i[a] = r.needsContext ? Z(a, this).index(l) >= 0 : Z.find(a, this, null, [l]).length), i[a] && i.push(r);
i.length && s.push({
elem: l,
handlers: i
})
}
return o < t.length && s.push({
elem: this,
handlers: t.slice(o)
}), s
},
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function(e, t) {
return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e
}
},
mouseHooks: {
props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(e, t) {
var n, i, a, r = t.button;
return null == e.pageX && null != t.clientX && (n = e.target.ownerDocument || G, i = n.documentElement, a = n.body, e.pageX = t.clientX + (i && i.scrollLeft || a && a.scrollLeft || 0) - (i && i.clientLeft || a && a.clientLeft || 0), e.pageY = t.clientY + (i && i.scrollTop || a && a.scrollTop || 0) - (i && i.clientTop || a && a.clientTop || 0)), e.which || void 0 === r || (e.which = 1 & r ? 1 : 2 & r ? 3 : 4 & r ? 2 : 0), e
}
},
fix: function(e) {
if (e[Z.expando]) return e;
var t, n, i, a = e.type,
r = e,
s = this.fixHooks[a];
for (s || (this.fixHooks[a] = s = Ae.test(a) ? this.mouseHooks : Se.test(a) ? this.keyHooks : {}), i = s.props ? this.props.concat(s.props) : this.props, e = new Z.Event(r), t = i.length; t--;) n = i[t], e[n] = r[n];
return e.target || (e.target = G), 3 === e.target.nodeType && (e.target = e.target.parentNode), s.filter ? s.filter(e, r) : e
},
special: {
load: {
noBubble: !0
},
focus: {
trigger: function() {
return this !== d() && this.focus ? (this.focus(), !1) : void 0
},
delegateType: "focusin"
},
blur: {
trigger: function() {
return this === d() && this.blur ? (this.blur(), !1) : void 0
},
delegateType: "focusout"
},
click: {
trigger: function() {
return "checkbox" === this.type && this.click && Z.nodeName(this, "input") ? (this.click(), !1) : void 0
},
_default: function(e) {
return Z.nodeName(e.target, "a")
}
},
beforeunload: {
postDispatch: function(e) {
void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result)
}
}
},
simulate: function(e, t, n, i) {
var a = Z.extend(new Z.Event, n, {
type: e,
isSimulated: !0,
originalEvent: {}
});
i ? Z.event.trigger(a, null, t) : Z.event.dispatch.call(t, a), a.isDefaultPrevented() && n.preventDefault()
}
}, Z.removeEvent = function(e, t, n) {
e.removeEventListener && e.removeEventListener(t, n, !1)
}, Z.Event = function(e, t) {
return this instanceof Z.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && e.returnValue === !1 ? c : u) : this.type = e, t && Z.extend(this, t), this.timeStamp = e && e.timeStamp || Z.now(), void(this[Z.expando] = !0)) : new Z.Event(e, t)
}, Z.Event.prototype = {
isDefaultPrevented: u,
isPropagationStopped: u,
isImmediatePropagationStopped: u,
preventDefault: function() {
var e = this.originalEvent;
this.isDefaultPrevented = c, e && e.preventDefault && e.preventDefault()
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = c, e && e.stopPropagation && e.stopPropagation()
},
stopImmediatePropagation: function() {
var e = this.originalEvent;
this.isImmediatePropagationStopped = c, e && e.stopImmediatePropagation && e.stopImmediatePropagation(), this.stopPropagation()
}
}, Z.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function(e, t) {
Z.event.special[e] = {
delegateType: t,
bindType: t,
handle: function(e) {
var n, i = this,
a = e.relatedTarget,
r = e.handleObj;
return (!a || a !== i && !Z.contains(i, a)) && (e.type = r.origType, n = r.handler.apply(this, arguments), e.type = t), n
}
}
}), Q.focusinBubbles || Z.each({
focus: "focusin",
blur: "focusout"
}, function(e, t) {
var n = function(e) {
Z.event.simulate(t, e.target, Z.event.fix(e), !0)
};
Z.event.special[t] = {
setup: function() {
var i = this.ownerDocument || this,
a = ge.access(i, t);
a || i.addEventListener(e, n, !0), ge.access(i, t, (a || 0) + 1)
},
teardown: function() {
var i = this.ownerDocument || this,
a = ge.access(i, t) - 1;
a ? ge.access(i, t, a) : (i.removeEventListener(e, n, !0), ge.remove(i, t))
}
}
}), Z.fn.extend({
on: function(e, t, n, i, a) {
var r, s;
if ("object" == typeof e) {
"string" != typeof t && (n = n || t, t = void 0);
for (s in e) this.on(s, t, n, e[s], a);
return this
}
if (null == n && null == i ? (i = t, n = t = void 0) : null == i && ("string" == typeof t ? (i = n, n = void 0) : (i = n, n = t, t = void 0)), i === !1) i = u;
else if (!i) return this;
return 1 === a && (r = i, i = function(e) {
return Z().off(e), r.apply(this, arguments)
}, i.guid = r.guid || (r.guid = Z.guid++)), this.each(function() {
Z.event.add(this, e, i, n, t)
})
},
one: function(e, t, n, i) {
return this.on(e, t, n, i, 1)
},
off: function(e, t, n) {
var i, a;
if (e && e.preventDefault && e.handleObj) return i = e.handleObj, Z(e.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this;
if ("object" == typeof e) {
for (a in e) this.off(a, t, e[a]);
return this
}
return (t === !1 || "function" == typeof t) && (n = t, t = void 0), n === !1 && (n = u), this.each(function() {
Z.event.remove(this, e, n, t)
})
},
trigger: function(e, t) {
return this.each(function() {
Z.event.trigger(e, t, this)
})
},
triggerHandler: function(e, t) {
var n = this[0];
return n ? Z.event.trigger(e, t, n, !0) : void 0
}
});
var qe = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
je = /<([\w:]+)/,
De = /<|&#?\w+;/,
Ne = /<(?:script|style|link)/i,
Me = /checked\s*(?:[^=]|=\s*.checked.)/i,
He = /^$|\/(?:java|ecma)script/i,
Pe = /^true\/(.*)/,
Le = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
Re = {
option: [1, "<select multiple='multiple'>", "</select>"],
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""]
};
Re.optgroup = Re.option, Re.tbody = Re.tfoot = Re.colgroup = Re.caption = Re.thead, Re.th = Re.td, Z.extend({
clone: function(e, t, n) {
var i, a, r, s, o = e.cloneNode(!0),
l = Z.contains(e.ownerDocument, e);
if (!(Q.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || Z.isXMLDoc(e)))
for (s = g(o), r = g(e), i = 0, a = r.length; a > i; i++) y(r[i], s[i]);
if (t)
if (n)
for (r = r || g(e), s = s || g(o), i = 0, a = r.length; a > i; i++) v(r[i], s[i]);
else v(e, o);
return s = g(o, "script"), s.length > 0 && m(s, !l && g(e, "script")), o
},
buildFragment: function(e, t, n, i) {
for (var a, r, s, o, l, c, u = t.createDocumentFragment(), d = [], p = 0, f = e.length; f > p; p++)
if (a = e[p], a || 0 === a)
if ("object" === Z.type(a)) Z.merge(d, a.nodeType ? [a] : a);
else if (De.test(a)) {
for (r = r || u.appendChild(t.createElement("div")), s = (je.exec(a) || ["", ""])[1].toLowerCase(), o = Re[s] || Re._default, r.innerHTML = o[1] + a.replace(qe, "<$1></$2>") + o[2], c = o[0]; c--;) r = r.lastChild;
Z.merge(d, r.childNodes), r = u.firstChild, r.textContent = ""
} else d.push(t.createTextNode(a));
for (u.textContent = "", p = 0; a = d[p++];)
if ((!i || -1 === Z.inArray(a, i)) && (l = Z.contains(a.ownerDocument, a), r = g(u.appendChild(a), "script"), l && m(r), n))
for (c = 0; a = r[c++];) He.test(a.type || "") && n.push(a);
return u
},
cleanData: function(e) {
for (var t, n, i, a, r = Z.event.special, s = 0; void 0 !== (n = e[s]); s++) {
if (Z.acceptData(n) && (a = n[ge.expando], a && (t = ge.cache[a]))) {
if (t.events)
for (i in t.events) r[i] ? Z.event.remove(n, i) : Z.removeEvent(n, i, t.handle);
ge.cache[a] && delete ge.cache[a]
}
delete ye.cache[n[ye.expando]]
}
}
}), Z.fn.extend({
text: function(e) {
return ve(this, function(e) {
return void 0 === e ? Z.text(this) : this.empty().each(function() {
(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && (this.textContent = e)
})
}, null, e, arguments.length)
},
append: function() {
return this.domManip(arguments, function(e) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var t = p(this, e);
t.appendChild(e)
}
})
},
prepend: function() {
return this.domManip(arguments, function(e) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var t = p(this, e);
t.insertBefore(e, t.firstChild)
}
})
},
before: function() {
return this.domManip(arguments, function(e) {
this.parentNode && this.parentNode.insertBefore(e, this)
})
},
after: function() {
return this.domManip(arguments, function(e) {
this.parentNode && this.parentNode.insertBefore(e, this.nextSibling)
})
},
remove: function(e, t) {
for (var n, i = e ? Z.filter(e, this) : this, a = 0; null != (n = i[a]); a++) t || 1 !== n.nodeType || Z.cleanData(g(n)), n.parentNode && (t && Z.contains(n.ownerDocument, n) && m(g(n, "script")), n.parentNode.removeChild(n));
return this
},
empty: function() {
for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (Z.cleanData(g(e, !1)), e.textContent = "");
return this
},
clone: function(e, t) {
return e = null == e ? !1 : e, t = null == t ? e : t, this.map(function() {
return Z.clone(this, e, t)
})
},
html: function(e) {
return ve(this, function(e) {
var t = this[0] || {},
n = 0,
i = this.length;
if (void 0 === e && 1 === t.nodeType) return t.innerHTML;
if ("string" == typeof e && !Ne.test(e) && !Re[(je.exec(e) || ["", ""])[1].toLowerCase()]) {
e = e.replace(qe, "<$1></$2>");
try {
for (; i > n; n++) t = this[n] || {}, 1 === t.nodeType && (Z.cleanData(g(t, !1)), t.innerHTML = e);
t = 0
} catch (a) {}
}
t && this.empty().append(e)
}, null, e, arguments.length)
},
replaceWith: function() {
var e = arguments[0];
return this.domManip(arguments, function(t) {
e = this.parentNode, Z.cleanData(g(this)), e && e.replaceChild(t, this)
}), e && (e.length || e.nodeType) ? this : this.remove()
},
detach: function(e) {
return this.remove(e, !0)
},
domManip: function(e, t) {
e = B.apply([], e);
var n, i, a, r, s, o, l = 0,
c = this.length,
u = this,
d = c - 1,
p = e[0],
m = Z.isFunction(p);
if (m || c > 1 && "string" == typeof p && !Q.checkClone && Me.test(p)) return this.each(function(n) {
var i = u.eq(n);
m && (e[0] = p.call(this, n, i.html())), i.domManip(e, t)
});
if (c && (n = Z.buildFragment(e, this[0].ownerDocument, !1, this), i = n.firstChild, 1 === n.childNodes.length && (n = i), i)) {
for (a = Z.map(g(n, "script"), f), r = a.length; c > l; l++) s = n, l !== d && (s = Z.clone(s, !0, !0), r && Z.merge(a, g(s, "script"))), t.call(this[l], s, l);
if (r)
for (o = a[a.length - 1].ownerDocument, Z.map(a, h), l = 0; r > l; l++) s = a[l], He.test(s.type || "") && !ge.access(s, "globalEval") && Z.contains(o, s) && (s.src ? Z._evalUrl && Z._evalUrl(s.src) : Z.globalEval(s.textContent.replace(Le, "")))
}
return this
}
}), Z.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(e, t) {
Z.fn[e] = function(e) {
for (var n, i = [], a = Z(e), r = a.length - 1, s = 0; r >= s; s++) n = s === r ? this : this.clone(!0), Z(a[s])[t](n), X.apply(i, n.get());
return this.pushStack(i)
}
});
var Oe, ze = {},
Ie = /^margin/,
We = new RegExp("^(" + _e + ")(?!px)[a-z%]+$", "i"),
$e = function(e) {
return e.ownerDocument.defaultView.getComputedStyle(e, null)
};
! function() {
function t() {
s.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute", s.innerHTML = "", a.appendChild(r);
var t = e.getComputedStyle(s, null);
n = "1%" !== t.top, i = "4px" === t.width, a.removeChild(r)
}
var n, i, a = G.documentElement,
r = G.createElement("div"),
s = G.createElement("div");
s.style && (s.style.backgroundClip = "content-box", s.cloneNode(!0).style.backgroundClip = "", Q.clearCloneStyle = "content-box" === s.style.backgroundClip, r.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute", r.appendChild(s), e.getComputedStyle && Z.extend(Q, {
pixelPosition: function() {
return t(), n
},
boxSizingReliable: function() {
return null == i && t(), i
},
reliableMarginRight: function() {
var t, n = s.appendChild(G.createElement("div"));
return n.style.cssText = s.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", n.style.marginRight = n.style.width = "0", s.style.width = "1px", a.appendChild(r), t = !parseFloat(e.getComputedStyle(n, null).marginRight), a.removeChild(r), t
}
}))
}(), Z.swap = function(e, t, n, i) {
var a, r, s = {};
for (r in t) s[r] = e.style[r], e.style[r] = t[r];
a = n.apply(e, i || []);
for (r in t) e.style[r] = s[r];
return a
};
var Be = /^(none|table(?!-c[ea]).+)/,
Xe = new RegExp("^(" + _e + ")(.*)$", "i"),
Ye = new RegExp("^([+-])=(" + _e + ")", "i"),
Ue = {
position: "absolute",
visibility: "hidden",
display: "block"
},
Je = {
letterSpacing: "0",
fontWeight: "400"
},
Ve = ["Webkit", "O", "Moz", "ms"];
Z.extend({
cssHooks: {
opacity: {
get: function(e, t) {
if (t) {
var n = _(e, "opacity");
return "" === n ? "1" : n
}
}
}
},
cssNumber: {
columnCount: !0,
fillOpacity: !0,
flexGrow: !0,
flexShrink: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": "cssFloat"
},
style: function(e, t, n, i) {
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
var a, r, s, o = Z.camelCase(t),
l = e.style;
return t = Z.cssProps[o] || (Z.cssProps[o] = k(l, o)), s = Z.cssHooks[t] || Z.cssHooks[o], void 0 === n ? s && "get" in s && void 0 !== (a = s.get(e, !1, i)) ? a : l[t] : (r = typeof n, "string" === r && (a = Ye.exec(n)) && (n = (a[1] + 1) * a[2] + parseFloat(Z.css(e, t)), r = "number"), void(null != n && n === n && ("number" !== r || Z.cssNumber[o] || (n += "px"), Q.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), s && "set" in s && void 0 === (n = s.set(e, n, i)) || (l[t] = n))))
}
},
css: function(e, t, n, i) {
var a, r, s, o = Z.camelCase(t);
return t = Z.cssProps[o] || (Z.cssProps[o] = k(e.style, o)), s = Z.cssHooks[t] || Z.cssHooks[o], s && "get" in s && (a = s.get(e, !0, n)), void 0 === a && (a = _(e, t, i)), "normal" === a && t in Je && (a = Je[t]), "" === n || n ? (r = parseFloat(a), n === !0 || Z.isNumeric(r) ? r || 0 : a) : a
}
}), Z.each(["height", "width"], function(e, t) {
Z.cssHooks[t] = {
get: function(e, n, i) {
return n ? Be.test(Z.css(e, "display")) && 0 === e.offsetWidth ? Z.swap(e, Ue, function() {
return S(e, t, i)
}) : S(e, t, i) : void 0
},
set: function(e, n, i) {
var a = i && $e(e);
return C(e, n, i ? T(e, t, i, "border-box" === Z.css(e, "boxSizing", !1, a), a) : 0)
}
}
}), Z.cssHooks.marginRight = w(Q.reliableMarginRight, function(e, t) {
return t ? Z.swap(e, {
display: "inline-block"
}, _, [e, "marginRight"]) : void 0
}), Z.each({
margin: "",
padding: "",
border: "Width"
}, function(e, t) {
Z.cssHooks[e + t] = {
expand: function(n) {
for (var i = 0, a = {}, r = "string" == typeof n ? n.split(" ") : [n]; 4 > i; i++) a[e + we[i] + t] = r[i] || r[i - 2] || r[0];
return a
}
}, Ie.test(e) || (Z.cssHooks[e + t].set = C)
}), Z.fn.extend({
css: function(e, t) {
return ve(this, function(e, t, n) {
var i, a, r = {},
s = 0;
if (Z.isArray(t)) {
for (i = $e(e), a = t.length; a > s; s++) r[t[s]] = Z.css(e, t[s], !1, i);
return r
}
return void 0 !== n ? Z.style(e, t, n) : Z.css(e, t)
}, e, t, arguments.length > 1)
},
show: function() {
return A(this, !0)
},
hide: function() {
return A(this)
},
toggle: function(e) {
return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() {
ke(this) ? Z(this).show() : Z(this).hide()
})
}
}), Z.Tween = F, F.prototype = {
constructor: F,
init: function(e, t, n, i, a, r) {
this.elem = e, this.prop = n, this.easing = a || "swing", this.options = t, this.start = this.now = this.cur(), this.end = i, this.unit = r || (Z.cssNumber[n] ? "" : "px")
},
cur: function() {
var e = F.propHooks[this.prop];
return e && e.get ? e.get(this) : F.propHooks._default.get(this)
},
run: function(e) {
var t, n = F.propHooks[this.prop];
return this.pos = t = this.options.duration ? Z.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : F.propHooks._default.set(this), this
}
}, F.prototype.init.prototype = F.prototype, F.propHooks = {
_default: {
get: function(e) {
var t;
return null == e.elem[e.prop] || e.elem.style && null != e.elem.style[e.prop] ? (t = Z.css(e.elem, e.prop, ""), t && "auto" !== t ? t : 0) : e.elem[e.prop]
},
set: function(e) {
Z.fx.step[e.prop] ? Z.fx.step[e.prop](e) : e.elem.style && (null != e.elem.style[Z.cssProps[e.prop]] || Z.cssHooks[e.prop]) ? Z.style(e.elem, e.prop, e.now + e.unit) : e.elem[e.prop] = e.now
}
}
}, F.propHooks.scrollTop = F.propHooks.scrollLeft = {
set: function(e) {
e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)
}
}, Z.easing = {
linear: function(e) {
return e
},
swing: function(e) {
return .5 - Math.cos(e * Math.PI) / 2
}
}, Z.fx = F.prototype.init, Z.fx.step = {};
var Qe, Ge, Ke = /^(?:toggle|show|hide)$/,
Ze = new RegExp("^(?:([+-])=|)(" + _e + ")([a-z%]*)$", "i"),
et = /queueHooks$/,
tt = [D],
nt = {
"*": [function(e, t) {
var n = this.createTween(e, t),
i = n.cur(),
a = Ze.exec(t),
r = a && a[3] || (Z.cssNumber[e] ? "" : "px"),
s = (Z.cssNumber[e] || "px" !== r && +i) && Ze.exec(Z.css(n.elem, e)),
o = 1,
l = 20;
if (s && s[3] !== r) {
r = r || s[3], a = a || [], s = +i || 1;
do o = o || ".5", s /= o, Z.style(n.elem, e, s + r); while (o !== (o = n.cur() / i) && 1 !== o && --l)
}
return a && (s = n.start = +s || +i || 0, n.unit = r, n.end = a[1] ? s + (a[1] + 1) * a[2] : +a[2]), n
}]
};
Z.Animation = Z.extend(M, {
tweener: function(e, t) {
Z.isFunction(e) ? (t = e, e = ["*"]) : e = e.split(" ");
for (var n, i = 0, a = e.length; a > i; i++) n = e[i], nt[n] = nt[n] || [], nt[n].unshift(t)
},
prefilter: function(e, t) {
t ? tt.unshift(e) : tt.push(e)
}
}), Z.speed = function(e, t, n) {
var i = e && "object" == typeof e ? Z.extend({}, e) : {
complete: n || !n && t || Z.isFunction(e) && e,
duration: e,
easing: n && t || t && !Z.isFunction(t) && t
};
return i.duration = Z.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in Z.fx.speeds ? Z.fx.speeds[i.duration] : Z.fx.speeds._default, (null == i.queue || i.queue === !0) && (i.queue = "fx"), i.old = i.complete, i.complete = function() {
Z.isFunction(i.old) && i.old.call(this), i.queue && Z.dequeue(this, i.queue)
}, i
}, Z.fn.extend({
fadeTo: function(e, t, n, i) {
return this.filter(ke).css("opacity", 0).show().end().animate({
opacity: t
}, e, n, i)
},
animate: function(e, t, n, i) {
var a = Z.isEmptyObject(e),
r = Z.speed(t, n, i),
s = function() {
var t = M(this, Z.extend({}, e), r);
(a || ge.get(this, "finish")) && t.stop(!0)
};
return s.finish = s, a || r.queue === !1 ? this.each(s) : this.queue(r.queue, s)
},
stop: function(e, t, n) {
var i = function(e) {
var t = e.stop;
delete e.stop, t(n)
};
return "string" != typeof e && (n = t, t = e, e = void 0), t && e !== !1 && this.queue(e || "fx", []), this.each(function() {
var t = !0,
a = null != e && e + "queueHooks",
r = Z.timers,
s = ge.get(this);
if (a) s[a] && s[a].stop && i(s[a]);
else
for (a in s) s[a] && s[a].stop && et.test(a) && i(s[a]);
for (a = r.length; a--;) r[a].elem !== this || null != e && r[a].queue !== e || (r[a].anim.stop(n), t = !1, r.splice(a, 1));
(t || !n) && Z.dequeue(this, e)
})
},
finish: function(e) {
return e !== !1 && (e = e || "fx"),
this.each(function() {
var t, n = ge.get(this),
i = n[e + "queue"],
a = n[e + "queueHooks"],
r = Z.timers,
s = i ? i.length : 0;
for (n.finish = !0, Z.queue(this, e, []), a && a.stop && a.stop.call(this, !0), t = r.length; t--;) r[t].elem === this && r[t].queue === e && (r[t].anim.stop(!0), r.splice(t, 1));
for (t = 0; s > t; t++) i[t] && i[t].finish && i[t].finish.call(this);
delete n.finish
})
}
}), Z.each(["toggle", "show", "hide"], function(e, t) {
var n = Z.fn[t];
Z.fn[t] = function(e, i, a) {
return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(q(t, !0), e, i, a)
}
}), Z.each({
slideDown: q("show"),
slideUp: q("hide"),
slideToggle: q("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function(e, t) {
Z.fn[e] = function(e, n, i) {
return this.animate(t, e, n, i)
}
}), Z.timers = [], Z.fx.tick = function() {
var e, t = 0,
n = Z.timers;
for (Qe = Z.now(); t < n.length; t++) e = n[t], e() || n[t] !== e || n.splice(t--, 1);
n.length || Z.fx.stop(), Qe = void 0
}, Z.fx.timer = function(e) {
Z.timers.push(e), e() ? Z.fx.start() : Z.timers.pop()
}, Z.fx.interval = 13, Z.fx.start = function() {
Ge || (Ge = setInterval(Z.fx.tick, Z.fx.interval))
}, Z.fx.stop = function() {
clearInterval(Ge), Ge = null
}, Z.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, Z.fn.delay = function(e, t) {
return e = Z.fx ? Z.fx.speeds[e] || e : e, t = t || "fx", this.queue(t, function(t, n) {
var i = setTimeout(t, e);
n.stop = function() {
clearTimeout(i)
}
})
},
function() {
var e = G.createElement("input"),
t = G.createElement("select"),
n = t.appendChild(G.createElement("option"));
e.type = "checkbox", Q.checkOn = "" !== e.value, Q.optSelected = n.selected, t.disabled = !0, Q.optDisabled = !n.disabled, e = G.createElement("input"), e.value = "t", e.type = "radio", Q.radioValue = "t" === e.value
}();
var it, at, rt = Z.expr.attrHandle;
Z.fn.extend({
attr: function(e, t) {
return ve(this, Z.attr, e, t, arguments.length > 1)
},
removeAttr: function(e) {
return this.each(function() {
Z.removeAttr(this, e)
})
}
}), Z.extend({
attr: function(e, t, n) {
var i, a, r = e.nodeType;
return e && 3 !== r && 8 !== r && 2 !== r ? typeof e.getAttribute === Te ? Z.prop(e, t, n) : (1 === r && Z.isXMLDoc(e) || (t = t.toLowerCase(), i = Z.attrHooks[t] || (Z.expr.match.bool.test(t) ? at : it)), void 0 === n ? i && "get" in i && null !== (a = i.get(e, t)) ? a : (a = Z.find.attr(e, t), null == a ? void 0 : a) : null !== n ? i && "set" in i && void 0 !== (a = i.set(e, n, t)) ? a : (e.setAttribute(t, n + ""), n) : void Z.removeAttr(e, t)) : void 0
},
removeAttr: function(e, t) {
var n, i, a = 0,
r = t && t.match(fe);
if (r && 1 === e.nodeType)
for (; n = r[a++];) i = Z.propFix[n] || n, Z.expr.match.bool.test(n) && (e[i] = !1), e.removeAttribute(n)
},
attrHooks: {
type: {
set: function(e, t) {
if (!Q.radioValue && "radio" === t && Z.nodeName(e, "input")) {
var n = e.value;
return e.setAttribute("type", t), n && (e.value = n), t
}
}
}
}
}), at = {
set: function(e, t, n) {
return t === !1 ? Z.removeAttr(e, n) : e.setAttribute(n, n), n
}
}, Z.each(Z.expr.match.bool.source.match(/\w+/g), function(e, t) {
var n = rt[t] || Z.find.attr;
rt[t] = function(e, t, i) {
var a, r;
return i || (r = rt[t], rt[t] = a, a = null != n(e, t, i) ? t.toLowerCase() : null, rt[t] = r), a
}
});
var st = /^(?:input|select|textarea|button)$/i;
Z.fn.extend({
prop: function(e, t) {
return ve(this, Z.prop, e, t, arguments.length > 1)
},
removeProp: function(e) {
return this.each(function() {
delete this[Z.propFix[e] || e]
})
}
}), Z.extend({
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function(e, t, n) {
var i, a, r, s = e.nodeType;
return e && 3 !== s && 8 !== s && 2 !== s ? (r = 1 !== s || !Z.isXMLDoc(e), r && (t = Z.propFix[t] || t, a = Z.propHooks[t]), void 0 !== n ? a && "set" in a && void 0 !== (i = a.set(e, n, t)) ? i : e[t] = n : a && "get" in a && null !== (i = a.get(e, t)) ? i : e[t]) : void 0
},
propHooks: {
tabIndex: {
get: function(e) {
return e.hasAttribute("tabindex") || st.test(e.nodeName) || e.href ? e.tabIndex : -1
}
}
}
}), Q.optSelected || (Z.propHooks.selected = {
get: function(e) {
var t = e.parentNode;
return t && t.parentNode && t.parentNode.selectedIndex, null
}
}), Z.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
Z.propFix[this.toLowerCase()] = this
});
var ot = /[\t\r\n\f]/g;
Z.fn.extend({
addClass: function(e) {
var t, n, i, a, r, s, o = "string" == typeof e && e,
l = 0,
c = this.length;
if (Z.isFunction(e)) return this.each(function(t) {
Z(this).addClass(e.call(this, t, this.className))
});
if (o)
for (t = (e || "").match(fe) || []; c > l; l++)
if (n = this[l], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(ot, " ") : " ")) {
for (r = 0; a = t[r++];) i.indexOf(" " + a + " ") < 0 && (i += a + " ");
s = Z.trim(i), n.className !== s && (n.className = s)
}
return this
},
removeClass: function(e) {
var t, n, i, a, r, s, o = 0 === arguments.length || "string" == typeof e && e,
l = 0,
c = this.length;
if (Z.isFunction(e)) return this.each(function(t) {
Z(this).removeClass(e.call(this, t, this.className))
});
if (o)
for (t = (e || "").match(fe) || []; c > l; l++)
if (n = this[l], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(ot, " ") : "")) {
for (r = 0; a = t[r++];)
for (; i.indexOf(" " + a + " ") >= 0;) i = i.replace(" " + a + " ", " ");
s = e ? Z.trim(i) : "", n.className !== s && (n.className = s)
}
return this
},
toggleClass: function(e, t) {
var n = typeof e;
return "boolean" == typeof t && "string" === n ? t ? this.addClass(e) : this.removeClass(e) : this.each(Z.isFunction(e) ? function(n) {
Z(this).toggleClass(e.call(this, n, this.className, t), t)
} : function() {
if ("string" === n)
for (var t, i = 0, a = Z(this), r = e.match(fe) || []; t = r[i++];) a.hasClass(t) ? a.removeClass(t) : a.addClass(t);
else(n === Te || "boolean" === n) && (this.className && ge.set(this, "__className__", this.className), this.className = this.className || e === !1 ? "" : ge.get(this, "__className__") || "")
})
},
hasClass: function(e) {
for (var t = " " + e + " ", n = 0, i = this.length; i > n; n++)
if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(ot, " ").indexOf(t) >= 0) return !0;
return !1
}
});
var lt = /\r/g;
Z.fn.extend({
val: function(e) {
var t, n, i, a = this[0];
return arguments.length ? (i = Z.isFunction(e), this.each(function(n) {
var a;
1 === this.nodeType && (a = i ? e.call(this, n, Z(this).val()) : e, null == a ? a = "" : "number" == typeof a ? a += "" : Z.isArray(a) && (a = Z.map(a, function(e) {
return null == e ? "" : e + ""
})), t = Z.valHooks[this.type] || Z.valHooks[this.nodeName.toLowerCase()], t && "set" in t && void 0 !== t.set(this, a, "value") || (this.value = a))
})) : a ? (t = Z.valHooks[a.type] || Z.valHooks[a.nodeName.toLowerCase()], t && "get" in t && void 0 !== (n = t.get(a, "value")) ? n : (n = a.value, "string" == typeof n ? n.replace(lt, "") : null == n ? "" : n)) : void 0
}
}), Z.extend({
valHooks: {
option: {
get: function(e) {
var t = Z.find.attr(e, "value");
return null != t ? t : Z.trim(Z.text(e))
}
},
select: {
get: function(e) {
for (var t, n, i = e.options, a = e.selectedIndex, r = "select-one" === e.type || 0 > a, s = r ? null : [], o = r ? a + 1 : i.length, l = 0 > a ? o : r ? a : 0; o > l; l++)
if (n = i[l], !(!n.selected && l !== a || (Q.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && Z.nodeName(n.parentNode, "optgroup"))) {
if (t = Z(n).val(), r) return t;
s.push(t)
}
return s
},
set: function(e, t) {
for (var n, i, a = e.options, r = Z.makeArray(t), s = a.length; s--;) i = a[s], (i.selected = Z.inArray(i.value, r) >= 0) && (n = !0);
return n || (e.selectedIndex = -1), r
}
}
}
}), Z.each(["radio", "checkbox"], function() {
Z.valHooks[this] = {
set: function(e, t) {
return Z.isArray(t) ? e.checked = Z.inArray(Z(e).val(), t) >= 0 : void 0
}
}, Q.checkOn || (Z.valHooks[this].get = function(e) {
return null === e.getAttribute("value") ? "on" : e.value
})
}), Z.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(e, t) {
Z.fn[t] = function(e, n) {
return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t)
}
}), Z.fn.extend({
hover: function(e, t) {
return this.mouseenter(e).mouseleave(t || e)
},
bind: function(e, t, n) {
return this.on(e, null, t, n)
},
unbind: function(e, t) {
return this.off(e, null, t)
},
delegate: function(e, t, n, i) {
return this.on(t, e, n, i)
},
undelegate: function(e, t, n) {
return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n)
}
});
var ct = Z.now(),
ut = /\?/;
Z.parseJSON = function(e) {
return JSON.parse(e + "")
}, Z.parseXML = function(e) {
var t, n;
if (!e || "string" != typeof e) return null;
try {
n = new DOMParser, t = n.parseFromString(e, "text/xml")
} catch (i) {
t = void 0
}
return (!t || t.getElementsByTagName("parsererror").length) && Z.error("Invalid XML: " + e), t
};
var dt, pt, ft = /#.*$/,
ht = /([?&])_=[^&]*/,
mt = /^(.*?):[ \t]*([^\r\n]*)$/gm,
vt = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
gt = /^(?:GET|HEAD)$/,
yt = /^\/\//,
bt = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
xt = {},
_t = {},
wt = "*/".concat("*");
try {
pt = location.href
} catch (kt) {
pt = G.createElement("a"), pt.href = "", pt = pt.href
}
dt = bt.exec(pt.toLowerCase()) || [], Z.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: pt,
type: "GET",
isLocal: vt.test(dt[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": wt,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": !0,
"text json": Z.parseJSON,
"text xml": Z.parseXML
},
flatOptions: {
url: !0,
context: !0
}
},
ajaxSetup: function(e, t) {
return t ? L(L(e, Z.ajaxSettings), t) : L(Z.ajaxSettings, e)
},
ajaxPrefilter: H(xt),
ajaxTransport: H(_t),
ajax: function(e, t) {
function n(e, t, n, s) {
var l, u, g, y, x, w = t;
2 !== b && (b = 2, o && clearTimeout(o), i = void 0, r = s || "", _.readyState = e > 0 ? 4 : 0, l = e >= 200 && 300 > e || 304 === e, n && (y = R(d, _, n)), y = O(d, y, _, l), l ? (d.ifModified && (x = _.getResponseHeader("Last-Modified"), x && (Z.lastModified[a] = x), x = _.getResponseHeader("etag"), x && (Z.etag[a] = x)), 204 === e || "HEAD" === d.type ? w = "nocontent" : 304 === e ? w = "notmodified" : (w = y.state, u = y.data, g = y.error, l = !g)) : (g = w, (e || !w) && (w = "error", 0 > e && (e = 0))), _.status = e, _.statusText = (t || w) + "", l ? h.resolveWith(p, [u, w, _]) : h.rejectWith(p, [_, w, g]), _.statusCode(v), v = void 0, c && f.trigger(l ? "ajaxSuccess" : "ajaxError", [_, d, l ? u : g]), m.fireWith(p, [_, w]), c && (f.trigger("ajaxComplete", [_, d]), --Z.active || Z.event.trigger("ajaxStop")))
}
"object" == typeof e && (t = e, e = void 0), t = t || {};
var i, a, r, s, o, l, c, u, d = Z.ajaxSetup({}, t),
p = d.context || d,
f = d.context && (p.nodeType || p.jquery) ? Z(p) : Z.event,
h = Z.Deferred(),
m = Z.Callbacks("once memory"),
v = d.statusCode || {},
g = {},
y = {},
b = 0,
x = "canceled",
_ = {
readyState: 0,
getResponseHeader: function(e) {
var t;
if (2 === b) {
if (!s)
for (s = {}; t = mt.exec(r);) s[t[1].toLowerCase()] = t[2];
t = s[e.toLowerCase()]
}
return null == t ? null : t
},
getAllResponseHeaders: function() {
return 2 === b ? r : null
},
setRequestHeader: function(e, t) {
var n = e.toLowerCase();
return b || (e = y[n] = y[n] || e, g[e] = t), this
},
overrideMimeType: function(e) {
return b || (d.mimeType = e), this
},
statusCode: function(e) {
var t;
if (e)
if (2 > b)
for (t in e) v[t] = [v[t], e[t]];
else _.always(e[_.status]);
return this
},
abort: function(e) {
var t = e || x;
return i && i.abort(t), n(0, t), this
}
};
if (h.promise(_).complete = m.add, _.success = _.done, _.error = _.fail, d.url = ((e || d.url || pt) + "").replace(ft, "").replace(yt, dt[1] + "//"), d.type = t.method || t.type || d.method || d.type, d.dataTypes = Z.trim(d.dataType || "*").toLowerCase().match(fe) || [""], null == d.crossDomain && (l = bt.exec(d.url.toLowerCase()), d.crossDomain = !(!l || l[1] === dt[1] && l[2] === dt[2] && (l[3] || ("http:" === l[1] ? "80" : "443")) === (dt[3] || ("http:" === dt[1] ? "80" : "443")))), d.data && d.processData && "string" != typeof d.data && (d.data = Z.param(d.data, d.traditional)), P(xt, d, t, _), 2 === b) return _;
c = d.global, c && 0 === Z.active++ && Z.event.trigger("ajaxStart"), d.type = d.type.toUpperCase(), d.hasContent = !gt.test(d.type), a = d.url, d.hasContent || (d.data && (a = d.url += (ut.test(a) ? "&" : "?") + d.data, delete d.data), d.cache === !1 && (d.url = ht.test(a) ? a.replace(ht, "$1_=" + ct++) : a + (ut.test(a) ? "&" : "?") + "_=" + ct++)), d.ifModified && (Z.lastModified[a] && _.setRequestHeader("If-Modified-Since", Z.lastModified[a]), Z.etag[a] && _.setRequestHeader("If-None-Match", Z.etag[a])), (d.data && d.hasContent && d.contentType !== !1 || t.contentType) && _.setRequestHeader("Content-Type", d.contentType), _.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + ("*" !== d.dataTypes[0] ? ", " + wt + "; q=0.01" : "") : d.accepts["*"]);
for (u in d.headers) _.setRequestHeader(u, d.headers[u]);
if (d.beforeSend && (d.beforeSend.call(p, _, d) === !1 || 2 === b)) return _.abort();
x = "abort";
for (u in {
success: 1,
error: 1,
complete: 1
}) _[u](d[u]);
if (i = P(_t, d, t, _)) {
_.readyState = 1, c && f.trigger("ajaxSend", [_, d]), d.async && d.timeout > 0 && (o = setTimeout(function() {
_.abort("timeout")
}, d.timeout));
try {
b = 1, i.send(g, n)
} catch (w) {
if (!(2 > b)) throw w;
n(-1, w)
}
} else n(-1, "No Transport");
return _
},
getJSON: function(e, t, n) {
return Z.get(e, t, n, "json")
},
getScript: function(e, t) {
return Z.get(e, void 0, t, "script")
}
}), Z.each(["get", "post"], function(e, t) {
Z[t] = function(e, n, i, a) {
return Z.isFunction(n) && (a = a || i, i = n, n = void 0), Z.ajax({
url: e,
type: t,
dataType: a,
data: n,
success: i
})
}
}), Z.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(e, t) {
Z.fn[t] = function(e) {
return this.on(t, e)
}
}), Z._evalUrl = function(e) {
return Z.ajax({
url: e,
type: "GET",
dataType: "script",
async: !1,
global: !1,
"throws": !0
})
}, Z.fn.extend({
wrapAll: function(e) {
var t;
return Z.isFunction(e) ? this.each(function(t) {
Z(this).wrapAll(e.call(this, t))
}) : (this[0] && (t = Z(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() {
for (var e = this; e.firstElementChild;) e = e.firstElementChild;
return e
}).append(this)), this)
},
wrapInner: function(e) {
return this.each(Z.isFunction(e) ? function(t) {
Z(this).wrapInner(e.call(this, t))
} : function() {
var t = Z(this),
n = t.contents();
n.length ? n.wrapAll(e) : t.append(e)
})
},
wrap: function(e) {
var t = Z.isFunction(e);
return this.each(function(n) {
Z(this).wrapAll(t ? e.call(this, n) : e)
})
},
unwrap: function() {
return this.parent().each(function() {
Z.nodeName(this, "body") || Z(this).replaceWith(this.childNodes)
}).end()
}
}), Z.expr.filters.hidden = function(e) {
return e.offsetWidth <= 0 && e.offsetHeight <= 0
}, Z.expr.filters.visible = function(e) {
return !Z.expr.filters.hidden(e)
};
var Ct = /%20/g,
Tt = /\[\]$/,
St = /\r?\n/g,
At = /^(?:submit|button|image|reset|file)$/i,
Ft = /^(?:input|select|textarea|keygen)/i;
Z.param = function(e, t) {
var n, i = [],
a = function(e, t) {
t = Z.isFunction(t) ? t() : null == t ? "" : t, i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t)
};
if (void 0 === t && (t = Z.ajaxSettings && Z.ajaxSettings.traditional), Z.isArray(e) || e.jquery && !Z.isPlainObject(e)) Z.each(e, function() {
a(this.name, this.value)
});
else
for (n in e) z(n, e[n], t, a);
return i.join("&").replace(Ct, "+")
}, Z.fn.extend({
serialize: function() {
return Z.param(this.serializeArray())
},
serializeArray: function() {
return this.map(function() {
var e = Z.prop(this, "elements");
return e ? Z.makeArray(e) : this
}).filter(function() {
var e = this.type;
return this.name && !Z(this).is(":disabled") && Ft.test(this.nodeName) && !At.test(e) && (this.checked || !Ce.test(e))
}).map(function(e, t) {
var n = Z(this).val();
return null == n ? null : Z.isArray(n) ? Z.map(n, function(e) {
return {
name: t.name,
value: e.replace(St, "\r\n")
}
}) : {
name: t.name,
value: n.replace(St, "\r\n")
}
}).get()
}
}), Z.ajaxSettings.xhr = function() {
try {
return new XMLHttpRequest
} catch (e) {}
};
var Et = 0,
qt = {},
jt = {
0: 200,
1223: 204
},
Dt = Z.ajaxSettings.xhr();
e.ActiveXObject && Z(e).on("unload", function() {
for (var e in qt) qt[e]()
}), Q.cors = !!Dt && "withCredentials" in Dt, Q.ajax = Dt = !!Dt, Z.ajaxTransport(function(e) {
var t;
return Q.cors || Dt && !e.crossDomain ? {
send: function(n, i) {
var a, r = e.xhr(),
s = ++Et;
if (r.open(e.type, e.url, e.async, e.username, e.password), e.xhrFields)
for (a in e.xhrFields) r[a] = e.xhrFields[a];
e.mimeType && r.overrideMimeType && r.overrideMimeType(e.mimeType), e.crossDomain || n["X-Requested-With"] || (n["X-Requested-With"] = "XMLHttpRequest");
for (a in n) r.setRequestHeader(a, n[a]);
t = function(e) {
return function() {
t && (delete qt[s], t = r.onload = r.onerror = null, "abort" === e ? r.abort() : "error" === e ? i(r.status, r.statusText) : i(jt[r.status] || r.status, r.statusText, "string" == typeof r.responseText ? {
text: r.responseText
} : void 0, r.getAllResponseHeaders()))
}
}, r.onload = t(), r.onerror = t("error"), t = qt[s] = t("abort");
try {
r.send(e.hasContent && e.data || null)
} catch (o) {
if (t) throw o
}
},
abort: function() {
t && t()
}
} : void 0
}), Z.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function(e) {
return Z.globalEval(e), e
}
}
}), Z.ajaxPrefilter("script", function(e) {
void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET")
}), Z.ajaxTransport("script", function(e) {
if (e.crossDomain) {
var t, n;
return {
send: function(i, a) {
t = Z("<script>").prop({
async: !0,
charset: e.scriptCharset,
src: e.url
}).on("load error", n = function(e) {
t.remove(), n = null, e && a("error" === e.type ? 404 : 200, e.type)
}), G.head.appendChild(t[0])
},
abort: function() {
n && n()
}
}
}
});
var Nt = [],
Mt = /(=)\?(?=&|$)|\?\?/;
Z.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var e = Nt.pop() || Z.expando + "_" + ct++;
return this[e] = !0, e
}
}), Z.ajaxPrefilter("json jsonp", function(t, n, i) {
var a, r, s, o = t.jsonp !== !1 && (Mt.test(t.url) ? "url" : "string" == typeof t.data && !(t.contentType || "").indexOf("application/x-www-form-urlencoded") && Mt.test(t.data) && "data");
return o || "jsonp" === t.dataTypes[0] ? (a = t.jsonpCallback = Z.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, o ? t[o] = t[o].replace(Mt, "$1" + a) : t.jsonp !== !1 && (t.url += (ut.test(t.url) ? "&" : "?") + t.jsonp + "=" + a), t.converters["script json"] = function() {
return s || Z.error(a + " was not called"), s[0]
}, t.dataTypes[0] = "json", r = e[a], e[a] = function() {
s = arguments
}, i.always(function() {
e[a] = r, t[a] && (t.jsonpCallback = n.jsonpCallback, Nt.push(a)), s && Z.isFunction(r) && r(s[0]), s = r = void 0
}), "script") : void 0
}), Z.parseHTML = function(e, t, n) {
if (!e || "string" != typeof e) return null;
"boolean" == typeof t && (n = t, t = !1), t = t || G;
var i = se.exec(e),
a = !n && [];
return i ? [t.createElement(i[1])] : (i = Z.buildFragment([e], t, a), a && a.length && Z(a).remove(), Z.merge([], i.childNodes))
};
var Ht = Z.fn.load;
Z.fn.load = function(e, t, n) {
if ("string" != typeof e && Ht) return Ht.apply(this, arguments);
var i, a, r, s = this,
o = e.indexOf(" ");
return o >= 0 && (i = Z.trim(e.slice(o)), e = e.slice(0, o)), Z.isFunction(t) ? (n = t, t = void 0) : t && "object" == typeof t && (a = "POST"), s.length > 0 && Z.ajax({
url: e,
type: a,
dataType: "html",
data: t
}).done(function(e) {
r = arguments, s.html(i ? Z("<div>").append(Z.parseHTML(e)).find(i) : e)
}).complete(n && function(e, t) {
s.each(n, r || [e.responseText, t, e])
}), this
}, Z.expr.filters.animated = function(e) {
return Z.grep(Z.timers, function(t) {
return e === t.elem
}).length
};
var Pt = e.document.documentElement;
Z.offset = {
setOffset: function(e, t, n) {
var i, a, r, s, o, l, c, u = Z.css(e, "position"),
d = Z(e),
p = {};
"static" === u && (e.style.position = "relative"), o = d.offset(), r = Z.css(e, "top"), l = Z.css(e, "left"), c = ("absolute" === u || "fixed" === u) && (r + l).indexOf("auto") > -1, c ? (i = d.position(), s = i.top, a = i.left) : (s = parseFloat(r) || 0, a = parseFloat(l) || 0), Z.isFunction(t) && (t = t.call(e, n, o)), null != t.top && (p.top = t.top - o.top + s), null != t.left && (p.left = t.left - o.left + a), "using" in t ? t.using.call(e, p) : d.css(p)
}
}, Z.fn.extend({
offset: function(e) {
if (arguments.length) return void 0 === e ? this : this.each(function(t) {
Z.offset.setOffset(this, e, t)
});
var t, n, i = this[0],
a = {
top: 0,
left: 0
},
r = i && i.ownerDocument;
return r ? (t = r.documentElement, Z.contains(t, i) ? (typeof i.getBoundingClientRect !== Te && (a = i.getBoundingClientRect()), n = I(r), {
top: a.top + n.pageYOffset - t.clientTop,
left: a.left + n.pageXOffset - t.clientLeft
}) : a) : void 0
},
position: function() {
if (this[0]) {
var e, t, n = this[0],
i = {
top: 0,
left: 0
};
return "fixed" === Z.css(n, "position") ? t = n.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), Z.nodeName(e[0], "html") || (i = e.offset()), i.top += Z.css(e[0], "borderTopWidth", !0), i.left += Z.css(e[0], "borderLeftWidth", !0)), {
top: t.top - i.top - Z.css(n, "marginTop", !0),
left: t.left - i.left - Z.css(n, "marginLeft", !0)
}
}
},
offsetParent: function() {
return this.map(function() {
for (var e = this.offsetParent || Pt; e && !Z.nodeName(e, "html") && "static" === Z.css(e, "position");) e = e.offsetParent;
return e || Pt
})
}
}), Z.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function(t, n) {
var i = "pageYOffset" === n;
Z.fn[t] = function(a) {
return ve(this, function(t, a, r) {
var s = I(t);
return void 0 === r ? s ? s[n] : t[a] : void(s ? s.scrollTo(i ? e.pageXOffset : r, i ? r : e.pageYOffset) : t[a] = r)
}, t, a, arguments.length, null)
}
}), Z.each(["top", "left"], function(e, t) {
Z.cssHooks[t] = w(Q.pixelPosition, function(e, n) {
return n ? (n = _(e, t), We.test(n) ? Z(e).position()[t] + "px" : n) : void 0
})
}), Z.each({
Height: "height",
Width: "width"
}, function(e, t) {
Z.each({
padding: "inner" + e,
content: t,
"": "outer" + e
}, function(n, i) {
Z.fn[i] = function(i, a) {
var r = arguments.length && (n || "boolean" != typeof i),
s = n || (i === !0 || a === !0 ? "margin" : "border");
return ve(this, function(t, n, i) {
var a;
return Z.isWindow(t) ? t.document.documentElement["client" + e] : 9 === t.nodeType ? (a = t.documentElement, Math.max(t.body["scroll" + e], a["scroll" + e], t.body["offset" + e], a["offset" + e], a["client" + e])) : void 0 === i ? Z.css(t, n, s) : Z.style(t, n, i, s)
}, t, r ? i : void 0, r, null)
}
})
}), Z.fn.size = function() {
return this.length
}, Z.fn.andSelf = Z.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() {
return Z
});
var Lt = e.jQuery,
Rt = e.$;
return Z.noConflict = function(t) {
return e.$ === Z && (e.$ = Rt), t && e.jQuery === Z && (e.jQuery = Lt), Z
}, typeof t === Te && (e.jQuery = e.$ = Z), Z
}),
function(e, t, n, i) {
"use strict";
function a(e) {
return ("string" == typeof e || e instanceof String) && (e = e.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, "")), e
}
function r(e) {
this.selector = e, this.query = ""
}
var s = function(t) {
var n = e("head");
n.prepend(e.map(t, function(e) {
return 0 === n.has("." + e).length ? '<meta class="' + e + '" />' : void 0
}))
};
s(["foundation-mq-small", "foundation-mq-small-only", "foundation-mq-medium", "foundation-mq-medium-only", "foundation-mq-large", "foundation-mq-large-only", "foundation-mq-xlarge", "foundation-mq-xlarge-only", "foundation-mq-xxlarge", "foundation-data-attribute-namespace"]), e(function() {
"undefined" != typeof FastClick && "undefined" != typeof n.body && FastClick.attach(n.body)
});
var o = function(t, i) {
if ("string" == typeof t) {
if (i) {
var a;
if (i.jquery) {
if (a = i[0], !a) return i
} else a = i;
return e(a.querySelectorAll(t))
}
return e(n.querySelectorAll(t))
}
return e(t, i)
},
l = function(e) {
var t = [];
return e || t.push("data"), this.namespace.length > 0 && t.push(this.namespace), t.push(this.name), t.join("-")
},
c = function(e) {
for (var t = e.split("-"), n = t.length, i = []; n--;) 0 !== n ? i.push(t[n]) : this.namespace.length > 0 ? i.push(this.namespace, t[n]) : i.push(t[n]);
return i.reverse().join("-")
},
u = function(t, n) {
var i = this,
a = function() {
var a = o(this),
r = !a.data(i.attr_name(!0) + "-init");
a.data(i.attr_name(!0) + "-init", e.extend({}, i.settings, n || t, i.data_options(a))), r && i.events(this)
};
return o(this.scope).is("[" + this.attr_name() + "]") ? a.call(this.scope) : o("[" + this.attr_name() + "]", this.scope).each(a), "string" == typeof t ? this[t].call(this, n) : void 0
},
d = function(e, t) {
function n() {
t(e[0])
}
function i() {
if (this.one("load", n), /MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
var e = this.attr("src"),
t = e.match(/\?/) ? "&" : "?";
t += "random=" + (new Date).getTime(), this.attr("src", e + t)
}
}
return e.attr("src") ? void(e[0].complete || 4 === e[0].readyState ? n() : i.call(e)) : void n()
};
t.matchMedia || (t.matchMedia = function() {
var e = t.styleMedia || t.media;
if (!e) {
var i = n.createElement("style"),
a = n.getElementsByTagName("script")[0],
r = null;
i.type = "text/css", i.id = "matchmediajs-test", a.parentNode.insertBefore(i, a), r = "getComputedStyle" in t && t.getComputedStyle(i, null) || i.currentStyle, e = {
matchMedium: function(e) {
var t = "@media " + e + "{ #matchmediajs-test { width: 1px; } }";
return i.styleSheet ? i.styleSheet.cssText = t : i.textContent = t, "1px" === r.width
}
}
}
return function(t) {
return {
matches: e.matchMedium(t || "all"),
media: t || "all"
}
}
}()),
function(e) {
function n() {
i && (s(n), l && e.fx.tick())
}
for (var i, a = 0, r = ["webkit", "moz"], s = t.requestAnimationFrame, o = t.cancelAnimationFrame, l = "undefined" != typeof e.fx; a < r.length && !s; a++) s = t[r[a] + "RequestAnimationFrame"], o = o || t[r[a] + "CancelAnimationFrame"] || t[r[a] + "CancelRequestAnimationFrame"];
s ? (t.requestAnimationFrame = s, t.cancelAnimationFrame = o, l && (e.fx.timer = function(t) {
t() && e.timers.push(t) && !i && (i = !0, n())
}, e.fx.stop = function() {
i = !1
})) : (t.requestAnimationFrame = function(e) {
var n = (new Date).getTime(),
i = Math.max(0, 16 - (n - a)),
r = t.setTimeout(function() {
e(n + i)
}, i);
return a = n + i, r
}, t.cancelAnimationFrame = function(e) {
clearTimeout(e)
})
}(e), r.prototype.toString = function() {
return this.query || (this.query = o(this.selector).css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ""))
}, t.Foundation = {
name: "Foundation",
version: "5.5.3",
media_queries: {
small: new r(".foundation-mq-small"),
"small-only": new r(".foundation-mq-small-only"),
medium: new r(".foundation-mq-medium"),
"medium-only": new r(".foundation-mq-medium-only"),
large: new r(".foundation-mq-large"),
"large-only": new r(".foundation-mq-large-only"),
xlarge: new r(".foundation-mq-xlarge"),
"xlarge-only": new r(".foundation-mq-xlarge-only"),
xxlarge: new r(".foundation-mq-xxlarge")
},
stylesheet: e("<style></style>").appendTo("head")[0].sheet,
global: {
namespace: i
},
init: function(e, n, i, a, r) {
var s = [e, i, a, r],
l = [];
if (this.rtl = /rtl/i.test(o("html").attr("dir")), this.scope = e || this.scope, this.set_namespace(), n && "string" == typeof n && !/reflow/i.test(n)) this.libs.hasOwnProperty(n) && l.push(this.init_lib(n, s));
else
for (var c in this.libs) l.push(this.init_lib(c, n));
return o(t).load(function() {
o(t).trigger("resize.fndtn.clearing").trigger("resize.fndtn.dropdown").trigger("resize.fndtn.equalizer").trigger("resize.fndtn.interchange").trigger("resize.fndtn.joyride").trigger("resize.fndtn.magellan").trigger("resize.fndtn.topbar").trigger("resize.fndtn.slider")
}), e
},
init_lib: function(t, n) {
return this.libs.hasOwnProperty(t) ? (this.patch(this.libs[t]), n && n.hasOwnProperty(t) ? ("undefined" != typeof this.libs[t].settings ? e.extend(!0, this.libs[t].settings, n[t]) : "undefined" != typeof this.libs[t].defaults && e.extend(!0, this.libs[t].defaults, n[t]), this.libs[t].init.apply(this.libs[t], [this.scope, n[t]])) : (n = n instanceof Array ? n : new Array(n), this.libs[t].init.apply(this.libs[t], n))) : function() {}
},
patch: function(e) {
e.scope = this.scope, e.namespace = this.global.namespace, e.rtl = this.rtl, e.data_options = this.utils.data_options, e.attr_name = l, e.add_namespace = c, e.bindings = u, e.S = this.utils.S
},
inherit: function(e, t) {
for (var n = t.split(" "), i = n.length; i--;) this.utils.hasOwnProperty(n[i]) && (e[n[i]] = this.utils[n[i]])
},
set_namespace: function() {
var t = this.global.namespace === i ? e(".foundation-data-attribute-namespace").css("font-family") : this.global.namespace;
this.global.namespace = t === i || /false/i.test(t) ? "" : t
},
libs: {},
utils: {
S: o,
throttle: function(e, t) {
var n = null;
return function() {
var i = this,
a = arguments;
null == n && (n = setTimeout(function() {
e.apply(i, a), n = null
}, t))
}
},
debounce: function(e, t, n) {
var i, a;
return function() {
var r = this,
s = arguments,
o = function() {
i = null, n || (a = e.apply(r, s))
},
l = n && !i;
return clearTimeout(i), i = setTimeout(o, t), l && (a = e.apply(r, s)), a
}
},
data_options: function(t, n) {
function i(e) {
return !isNaN(e - 0) && null !== e && "" !== e && e !== !1 && e !== !0
}
function a(t) {
return "string" == typeof t ? e.trim(t) : t
}
n = n || "options";
var r, s, o, l = {},
c = function(e) {
var t = Foundation.global.namespace;
return t.length > 0 ? e.data(t + "-" + n) : e.data(n)
},
u = c(t);
if ("object" == typeof u) return u;
for (o = (u || ":").split(";"), r = o.length; r--;) s = o[r].split(":"), s = [s[0], s.slice(1).join(":")], /true/i.test(s[1]) && (s[1] = !0), /false/i.test(s[1]) && (s[1] = !1), i(s[1]) && (-1 === s[1].indexOf(".") ? s[1] = parseInt(s[1], 10) : s[1] = parseFloat(s[1])), 2 === s.length && s[0].length > 0 && (l[a(s[0])] = a(s[1]));
return l
},
register_media: function(t, n) {
Foundation.media_queries[t] === i && (e("head").append('<meta class="' + n + '"/>'), Foundation.media_queries[t] = a(e("." + n).css("font-family")))
},
add_custom_rule: function(e, t) {
if (t === i && Foundation.stylesheet) Foundation.stylesheet.insertRule(e, Foundation.stylesheet.cssRules.length);
else {
var n = Foundation.media_queries[t];
n !== i && Foundation.stylesheet.insertRule("@media " + Foundation.media_queries[t] + "{ " + e + " }", Foundation.stylesheet.cssRules.length)
}
},
image_loaded: function(e, t) {
function n(e) {
for (var t = e.length, n = t - 1; n >= 0; n--)
if (e.attr("height") === i) return !1;
return !0
}
var a = this,
r = e.length;
(0 === r || n(e)) && t(e), e.each(function() {
d(a.S(this), function() {
r -= 1, 0 === r && t(e)
})
})
},
random_str: function() {
return this.fidx || (this.fidx = 0), this.prefix = this.prefix || [this.name || "F", (+new Date).toString(36)].join("-"), this.prefix + (this.fidx++).toString(36)
},
match: function(e) {
return t.matchMedia(e).matches
},
is_small_up: function() {
return this.match(Foundation.media_queries.small)
},
is_medium_up: function() {
return this.match(Foundation.media_queries.medium)
},
is_large_up: function() {
return this.match(Foundation.media_queries.large)
},
is_xlarge_up: function() {
return this.match(Foundation.media_queries.xlarge)
},
is_xxlarge_up: function() {
return this.match(Foundation.media_queries.xxlarge)
},
is_small_only: function() {
return !(this.is_medium_up() || this.is_large_up() || this.is_xlarge_up() || this.is_xxlarge_up())
},
is_medium_only: function() {
return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up()
},
is_large_only: function() {
return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up()
},
is_xlarge_only: function() {
return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up()
},
is_xxlarge_only: function() {
return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up()
}
}
}, e.fn.foundation = function() {
var e = Array.prototype.slice.call(arguments, 0);
return this.each(function() {
return Foundation.init.apply(Foundation, [this].concat(e)), this
})
}
}(jQuery, window, window.document),
function(e, t, n, i) {
"use strict";
Foundation.libs.topbar = {
name: "topbar",
version: "5.5.3",
settings: {
index: 0,
start_offset: 0,
sticky_class: "sticky",
custom_back_text: !0,
back_text: "Back",
mobile_show_parent_link: !0,
is_hover: !0,
scrolltop: !0,
sticky_on: "all",
dropdown_autoclose: !0
},
init: function(t, n, i) {
Foundation.inherit(this, "add_custom_rule register_media throttle");
var a = this;
a.register_media("topbar", "foundation-mq-topbar"), this.bindings(n, i), a.S("[" + this.attr_name() + "]", this.scope).each(function() {
var t = e(this),
n = t.data(a.attr_name(!0) + "-init");
a.S("section, .top-bar-section", this);
t.data("index", 0);
var i = t.parent();
i.hasClass("fixed") || a.is_sticky(t, i, n) ? (a.settings.sticky_class = n.sticky_class, a.settings.sticky_topbar = t, t.data("height", i.outerHeight()), t.data("stickyoffset", i.offset().top)) : t.data("height", t.outerHeight()), n.assembled || a.assemble(t), n.is_hover ? a.S(".has-dropdown", t).addClass("not-click") : a.S(".has-dropdown", t).removeClass("not-click"), a.add_custom_rule(".f-topbar-fixed { padding-top: " + t.data("height") + "px }"), i.hasClass("fixed") && a.S("body").addClass("f-topbar-fixed")
})
},
is_sticky: function(e, t, n) {
var i = t.hasClass(n.sticky_class),
a = matchMedia(Foundation.media_queries.small).matches,
r = matchMedia(Foundation.media_queries.medium).matches,
s = matchMedia(Foundation.media_queries.large).matches;
return i && "all" === n.sticky_on ? !0 : i && this.small() && -1 !== n.sticky_on.indexOf("small") && a && !r && !s ? !0 : i && this.medium() && -1 !== n.sticky_on.indexOf("medium") && a && r && !s ? !0 : i && this.large() && -1 !== n.sticky_on.indexOf("large") && a && r && s ? !0 : !1
},
toggle: function(n) {
var i, a = this;
i = n ? a.S(n).closest("[" + this.attr_name() + "]") : a.S("[" + this.attr_name() + "]");
var r = i.data(this.attr_name(!0) + "-init"),
s = a.S("section, .top-bar-section", i);
a.breakpoint() && (a.rtl ? (s.css({
right: "0%"
}), e(">.name", s).css({
right: "100%"
})) : (s.css({
left: "0%"
}), e(">.name", s).css({
left: "100%"
})), a.S("li.moved", s).removeClass("moved"), i.data("index", 0), i.toggleClass("expanded").css("height", "")), r.scrolltop ? i.hasClass("expanded") ? i.parent().hasClass("fixed") && (r.scrolltop ? (i.parent().removeClass("fixed"), i.addClass("fixed"), a.S("body").removeClass("f-topbar-fixed"), t.scrollTo(0, 0)) : i.parent().removeClass("expanded")) : i.hasClass("fixed") && (i.parent().addClass("fixed"), i.removeClass("fixed"), a.S("body").addClass("f-topbar-fixed")) : (a.is_sticky(i, i.parent(), r) && i.parent().addClass("fixed"), i.parent().hasClass("fixed") && (i.hasClass("expanded") ? (i.addClass("fixed"), i.parent().addClass("expanded"), a.S("body").addClass("f-topbar-fixed")) : (i.removeClass("fixed"), i.parent().removeClass("expanded"), a.update_sticky_positioning())))
},
timer: null,
events: function(n) {
var i = this,
a = this.S;
a(this.scope).off(".topbar").on("click.fndtn.topbar", "[" + this.attr_name() + "] .toggle-topbar", function(e) {
e.preventDefault(), i.toggle(this)
}).on("click.fndtn.topbar contextmenu.fndtn.topbar", '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function(t) {
var n = e(this).closest("li"),
a = n.closest("[" + i.attr_name() + "]"),
r = a.data(i.attr_name(!0) + "-init");
if (r.dropdown_autoclose && r.is_hover) {
var s = e(this).closest(".hover");
s.removeClass("hover")
}!i.breakpoint() || n.hasClass("back") || n.hasClass("has-dropdown") || i.toggle()
}).on("click.fndtn.topbar", "[" + this.attr_name() + "] li.has-dropdown", function(t) {
var n = a(this),
r = a(t.target),
s = n.closest("[" + i.attr_name() + "]"),
o = s.data(i.attr_name(!0) + "-init");
return r.data("revealId") ? void i.toggle() : void(i.breakpoint() || (!o.is_hover || Modernizr.touch) && (t.stopImmediatePropagation(), n.hasClass("hover") ? (n.removeClass("hover").find("li").removeClass("hover"), n.parents("li.hover").removeClass("hover")) : (n.addClass("hover"), e(n).siblings().removeClass("hover"), "A" === r[0].nodeName && r.parent().hasClass("has-dropdown") && t.preventDefault())))
}).on("click.fndtn.topbar", "[" + this.attr_name() + "] .has-dropdown>a", function(e) {
if (i.breakpoint()) {
e.preventDefault();
var t = a(this),
n = t.closest("[" + i.attr_name() + "]"),
r = n.find("section, .top-bar-section"),
s = (t.next(".dropdown").outerHeight(), t.closest("li"));
n.data("index", n.data("index") + 1), s.addClass("moved"), i.rtl ? (r.css({
right: -(100 * n.data("index")) + "%"
}), r.find(">.name").css({
right: 100 * n.data("index") + "%"
})) : (r.css({
left: -(100 * n.data("index")) + "%"
}), r.find(">.name").css({
left: 100 * n.data("index") + "%"
})), n.css("height", t.siblings("ul").outerHeight(!0) + n.data("height"))
}
}), a(t).off(".topbar").on("resize.fndtn.topbar", i.throttle(function() {
i.resize.call(i)
}, 50)).trigger("resize.fndtn.topbar").load(function() {
a(this).trigger("resize.fndtn.topbar")
}), a("body").off(".topbar").on("click.fndtn.topbar", function(e) {
var t = a(e.target).closest("li").closest("li.hover");
t.length > 0 || a("[" + i.attr_name() + "] li.hover").removeClass("hover")
}), a(this.scope).on("click.fndtn.topbar", "[" + this.attr_name() + "] .has-dropdown .back", function(e) {
e.preventDefault();
var t = a(this),
n = t.closest("[" + i.attr_name() + "]"),
r = n.find("section, .top-bar-section"),
s = (n.data(i.attr_name(!0) + "-init"), t.closest("li.moved")),
o = s.parent();
n.data("index", n.data("index") - 1), i.rtl ? (r.css({
right: -(100 * n.data("index")) + "%"
}), r.find(">.name").css({
right: 100 * n.data("index") + "%"
})) : (r.css({
left: -(100 * n.data("index")) + "%"
}), r.find(">.name").css({
left: 100 * n.data("index") + "%"
})), 0 === n.data("index") ? n.css("height", "") : n.css("height", o.outerHeight(!0) + n.data("height")), setTimeout(function() {
s.removeClass("moved")
}, 300)
}), a(this.scope).find(".dropdown a").focus(function() {
e(this).parents(".has-dropdown").addClass("hover")
}).blur(function() {
e(this).parents(".has-dropdown").removeClass("hover")
})
},
resize: function() {
var e = this;
e.S("[" + this.attr_name() + "]").each(function() {
var t, i = e.S(this),
a = i.data(e.attr_name(!0) + "-init"),
r = i.parent("." + e.settings.sticky_class);
if (!e.breakpoint()) {
var s = i.hasClass("expanded");
i.css("height", "").removeClass("expanded").find("li").removeClass("hover"), s && e.toggle(i)
}
e.is_sticky(i, r, a) && (r.hasClass("fixed") ? (r.removeClass("fixed"), t = r.offset().top, e.S(n.body).hasClass("f-topbar-fixed") && (t -= i.data("height")), i.data("stickyoffset", t), r.addClass("fixed")) : (t = r.offset().top, i.data("stickyoffset", t)))
})
},
breakpoint: function() {
return !matchMedia(Foundation.media_queries.topbar).matches
},
small: function() {
return matchMedia(Foundation.media_queries.small).matches
},
medium: function() {
return matchMedia(Foundation.media_queries.medium).matches
},
large: function() {
return matchMedia(Foundation.media_queries.large).matches
},
assemble: function(t) {
var n = this,
i = t.data(this.attr_name(!0) + "-init"),
a = n.S("section, .top-bar-section", t);
a.detach(), n.S(".has-dropdown>a", a).each(function() {
var t, a = n.S(this),
r = a.siblings(".dropdown"),
s = a.attr("href");
r.find(".title.back").length || (t = e(1 == i.mobile_show_parent_link && s ? '<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="' + s + '">' + a.html() + "</a></li>" : '<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'), 1 == i.custom_back_text ? e("h5>a", t).html(i.back_text) : e("h5>a", t).html("&laquo; " + a.html()), r.prepend(t))
}), a.appendTo(t), this.sticky(), this.assembled(t)
},
assembled: function(t) {
t.data(this.attr_name(!0), e.extend({}, t.data(this.attr_name(!0)), {
assembled: !0
}))
},
height: function(t) {
var n = 0,
i = this;
return e("> li", t).each(function() {
n += i.S(this).outerHeight(!0)
}), n
},
sticky: function() {
var e = this;
this.S(t).on("scroll", function() {
e.update_sticky_positioning()
})
},
update_sticky_positioning: function() {
var e = "." + this.settings.sticky_class,
n = this.S(t),
i = this;
if (i.settings.sticky_topbar && i.is_sticky(this.settings.sticky_topbar, this.settings.sticky_topbar.parent(), this.settings)) {
var a = this.settings.sticky_topbar.data("stickyoffset") + this.settings.start_offset;
i.S(e).hasClass("expanded") || (n.scrollTop() > a ? i.S(e).hasClass("fixed") || (i.S(e).addClass("fixed"), i.S("body").addClass("f-topbar-fixed")) : n.scrollTop() <= a && i.S(e).hasClass("fixed") && (i.S(e).removeClass("fixed"), i.S("body").removeClass("f-topbar-fixed")))
}
},
off: function() {
this.S(this.scope).off(".fndtn.topbar"), this.S(t).off(".fndtn.topbar")
},
reflow: function() {}
}
}(jQuery, window, window.document),
function(e, t, n, i) {
"use strict";
Foundation.libs.offcanvas = {
name: "offcanvas",
version: "5.5.3",
settings: {
open_method: "move",
close_on_click: !1
},
init: function(e, t, n) {
this.bindings(t, n)
},
events: function() {
var t = this,
n = t.S,
i = "",
a = "",
r = "",
s = "",
o = "";
"move" === this.settings.open_method ? (i = "move-", a = "right", r = "left", s = "top", o = "bottom") : "overlap_single" === this.settings.open_method ? (i = "offcanvas-overlap-", a = "right", r = "left", s = "top", o = "bottom") : "overlap" === this.settings.open_method && (i = "offcanvas-overlap"), n(this.scope).off(".offcanvas").on("click.fndtn.offcanvas", ".left-off-canvas-toggle", function(r) {
t.click_toggle_class(r, i + a), "overlap" !== t.settings.open_method && n(".left-submenu").removeClass(i + a), e(".left-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".left-off-canvas-menu a", function(r) {
var s = t.get_settings(r),
o = n(this).parent();
!s.close_on_click || o.hasClass("has-submenu") || o.hasClass("back") ? n(this).parent().hasClass("has-submenu") ? (r.preventDefault(), n(this).siblings(".left-submenu").toggleClass(i + a)) : o.hasClass("back") && (r.preventDefault(), o.parent().removeClass(i + a)) : (t.hide.call(t, i + a, t.get_wrapper(r)), o.parent().removeClass(i + a)), e(".left-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".right-off-canvas-toggle", function(a) {
t.click_toggle_class(a, i + r), "overlap" !== t.settings.open_method && n(".right-submenu").removeClass(i + r), e(".right-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".right-off-canvas-menu a", function(a) {
var s = t.get_settings(a),
o = n(this).parent();
!s.close_on_click || o.hasClass("has-submenu") || o.hasClass("back") ? n(this).parent().hasClass("has-submenu") ? (a.preventDefault(), n(this).siblings(".right-submenu").toggleClass(i + r)) : o.hasClass("back") && (a.preventDefault(), o.parent().removeClass(i + r)) : (t.hide.call(t, i + r, t.get_wrapper(a)), o.parent().removeClass(i + r)), e(".right-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".top-off-canvas-toggle", function(a) {
t.click_toggle_class(a, i + o), "overlap" !== t.settings.open_method && n(".top-submenu").removeClass(i + o), e(".top-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".top-off-canvas-menu a", function(a) {
var r = t.get_settings(a),
s = n(this).parent();
!r.close_on_click || s.hasClass("has-submenu") || s.hasClass("back") ? n(this).parent().hasClass("has-submenu") ? (a.preventDefault(), n(this).siblings(".top-submenu").toggleClass(i + o)) : s.hasClass("back") && (a.preventDefault(), s.parent().removeClass(i + o)) : (t.hide.call(t, i + o, t.get_wrapper(a)), s.parent().removeClass(i + o)), e(".top-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".bottom-off-canvas-toggle", function(a) {
t.click_toggle_class(a, i + s), "overlap" !== t.settings.open_method && n(".bottom-submenu").removeClass(i + s), e(".bottom-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".bottom-off-canvas-menu a", function(a) {
var r = t.get_settings(a),
o = n(this).parent();
!r.close_on_click || o.hasClass("has-submenu") || o.hasClass("back") ? n(this).parent().hasClass("has-submenu") ? (a.preventDefault(), n(this).siblings(".bottom-submenu").toggleClass(i + s)) : o.hasClass("back") && (a.preventDefault(), o.parent().removeClass(i + s)) : (t.hide.call(t, i + s, t.get_wrapper(a)), o.parent().removeClass(i + s)), e(".bottom-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".exit-off-canvas", function(s) {
t.click_remove_class(s, i + r), n(".right-submenu").removeClass(i + r), a && (t.click_remove_class(s, i + a), n(".left-submenu").removeClass(i + r)), e(".right-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".exit-off-canvas", function(n) {
t.click_remove_class(n, i + r), e(".left-off-canvas-toggle").attr("aria-expanded", "false"), a && (t.click_remove_class(n, i + a), e(".right-off-canvas-toggle").attr("aria-expanded", "false"))
}).on("click.fndtn.offcanvas", ".exit-off-canvas", function(a) {
t.click_remove_class(a, i + s), n(".bottom-submenu").removeClass(i + s), o && (t.click_remove_class(a, i + o), n(".top-submenu").removeClass(i + s)), e(".bottom-off-canvas-toggle").attr("aria-expanded", "true")
}).on("click.fndtn.offcanvas", ".exit-off-canvas", function(n) {
t.click_remove_class(n, i + s), e(".top-off-canvas-toggle").attr("aria-expanded", "false"), o && (t.click_remove_class(n, i + o), e(".bottom-off-canvas-toggle").attr("aria-expanded", "false"))
})
},
toggle: function(e, t) {
t = t || this.get_wrapper(), t.is("." + e) ? this.hide(e, t) : this.show(e, t)
},
show: function(e, t) {
t = t || this.get_wrapper(), t.trigger("open.fndtn.offcanvas"), t.addClass(e)
},
hide: function(e, t) {
t = t || this.get_wrapper(), t.trigger("close.fndtn.offcanvas"), t.removeClass(e)
},
click_toggle_class: function(e, t) {
e.preventDefault();
var n = this.get_wrapper(e);
this.toggle(t, n)
},
click_remove_class: function(e, t) {
e.preventDefault();
var n = this.get_wrapper(e);
this.hide(t, n)
},
get_settings: function(e) {
var t = this.S(e.target).closest("[" + this.attr_name() + "]");
return t.data(this.attr_name(!0) + "-init") || this.settings
},
get_wrapper: function(e) {
var t = this.S(e ? e.target : this.scope).closest(".off-canvas-wrap");
return 0 === t.length && (t = this.S(".off-canvas-wrap")), t
},
reflow: function() {}
}
}(jQuery, window, window.document),
function(e, t, n, i) {
"use strict";
Foundation.libs.accordion = {
name: "accordion",
version: "5.5.3",
settings: {
content_class: "content",
active_class: "active",
multi_expand: !1,
toggleable: !0,
callback: function() {}
},
init: function(e, t, n) {
this.bindings(t, n)
},
events: function(t) {
var n = this,
i = this.S;
n.create(this.S(t)), i(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion", "[" + this.attr_name() + "] > dd > a, [" + this.attr_name() + "] > li > a", function(t) {
var a = i(this).closest("[" + n.attr_name() + "]"),
r = n.attr_name() + "=" + a.attr(n.attr_name()),
s = a.data(n.attr_name(!0) + "-init") || n.settings,
o = i("#" + this.href.split("#")[1]),
l = e("> dd, > li", a),
c = l.children("." + s.content_class),
u = c.filter("." + s.active_class);
return t.preventDefault(), a.attr(n.attr_name()) && (c = c.add("[" + r + "] dd > ." + s.content_class + ", [" + r + "] li > ." + s.content_class), l = l.add("[" + r + "] dd, [" + r + "] li")), s.toggleable && o.is(u) ? (o.parent("dd, li").toggleClass(s.active_class, !1), o.toggleClass(s.active_class, !1), i(this).attr("aria-expanded", function(e, t) {
return "true" === t ? "false" : "true"
}), s.callback(o), o.triggerHandler("toggled", [a]), void a.triggerHandler("toggled", [o])) : (s.multi_expand || (c.removeClass(s.active_class), l.removeClass(s.active_class), l.children("a").attr("aria-expanded", "false")), o.addClass(s.active_class).parent().addClass(s.active_class), s.callback(o), o.triggerHandler("toggled", [a]), a.triggerHandler("toggled", [o]), void i(this).attr("aria-expanded", "true"))
})
},
create: function(t) {
var n = this,
i = t,
a = e("> .accordion-navigation", i),
r = i.data(n.attr_name(!0) + "-init") || n.settings;
a.children("a").attr("aria-expanded", "false"), a.has("." + r.content_class + "." + r.active_class).addClass(r.active_class).children("a").attr("aria-expanded", "true"), r.multi_expand && t.attr("aria-multiselectable", "true")
},
toggle: function(e) {
var e = "undefined" != typeof e ? e : {},
n = "undefined" != typeof e.selector ? e.selector : "",
i = "undefined" != typeof e.toggle_state ? e.toggle_state : "",
a = "undefined" != typeof e.$accordion ? e.$accordion : this.S(this.scope).closest("[" + this.attr_name() + "]"),
r = a.find("> dd" + n + ", > li" + n);
if (r.length < 1) return t.console && console.error("Selection not found.", n), !1;
var s = this.S,
o = this.settings.active_class;
r.each(function() {
var e = s(this),
t = e.hasClass(o);
(t && "close" === i || !t && "open" === i || "" === i) && e.find("> a").trigger("click.fndtn.accordion")
})
},
open: function(e) {
var e = "undefined" != typeof e ? e : {};
e.toggle_state = "open", this.toggle(e)
},
close: function(e) {
var e = "undefined" != typeof e ? e : {};
e.toggle_state = "close", this.toggle(e)
},
off: function() {},
reflow: function() {}
}
}(jQuery, window, window.document),
function(e, t, n, i) {
"use strict";
Foundation.libs.dropdown = {
name: "dropdown",
version: "5.5.3",
settings: {
active_class: "open",
disabled_class: "disabled",
mega_class: "mega",
align: "bottom",
is_hover: !1,
hover_timeout: 150,
opened: function() {},
closed: function() {}
},
init: function(t, n, i) {
Foundation.inherit(this, "throttle"), e.extend(!0, this.settings, n, i), this.bindings(n, i)
},
events: function(i) {
var a = this,
r = a.S;
r(this.scope).off(".dropdown").on("click.fndtn.dropdown", "[" + this.attr_name() + "]", function(t) {
var n = r(this).data(a.attr_name(!0) + "-init") || a.settings;
(!n.is_hover || Modernizr.touch) && (t.preventDefault(), r(this).parent("[data-reveal-id]").length && t.stopPropagation(), a.toggle(e(this)))
}).on("mouseenter.fndtn.dropdown", "[" + this.attr_name() + "], [" + this.attr_name() + "-content]", function(e) {
var t, n, i = r(this);
clearTimeout(a.timeout), i.data(a.data_attr()) ? (t = r("#" + i.data(a.data_attr())), n = i) : (t = i, n = r("[" + a.attr_name() + '="' + t.attr("id") + '"]'));
var s = n.data(a.attr_name(!0) + "-init") || a.settings;
r(e.currentTarget).data(a.data_attr()) && s.is_hover && a.closeall.call(a), s.is_hover && a.open.apply(a, [t, n])
}).on("mouseleave.fndtn.dropdown", "[" + this.attr_name() + "], [" + this.attr_name() + "-content]", function(e) {
var t, n = r(this);
if (n.data(a.data_attr())) t = n.data(a.data_attr(!0) + "-init") || a.settings;
else var i = r("[" + a.attr_name() + '="' + r(this).attr("id") + '"]'),
t = i.data(a.attr_name(!0) + "-init") || a.settings;
a.timeout = setTimeout(function() {
n.data(a.data_attr()) ? t.is_hover && a.close.call(a, r("#" + n.data(a.data_attr()))) : t.is_hover && a.close.call(a, n)
}.bind(this), t.hover_timeout)
}).on("click.fndtn.dropdown", function(t) {
var i = r(t.target).closest("[" + a.attr_name() + "-content]"),
s = i.find("a");
return s.length > 0 && "false" !== i.attr("aria-autoclose") && a.close.call(a, r("[" + a.attr_name() + "-content]")), t.target !== n && !e.contains(n.documentElement, t.target) || r(t.target).closest("[" + a.attr_name() + "]").length > 0 ? void 0 : !r(t.target).data("revealId") && i.length > 0 && (r(t.target).is("[" + a.attr_name() + "-content]") || e.contains(i.first()[0], t.target)) ? void t.stopPropagation() : void a.close.call(a, r("[" + a.attr_name() + "-content]"))
}).on("opened.fndtn.dropdown", "[" + a.attr_name() + "-content]", function() {
a.settings.opened.call(this)
}).on("closed.fndtn.dropdown", "[" + a.attr_name() + "-content]", function() {
a.settings.closed.call(this)
}), r(t).off(".dropdown").on("resize.fndtn.dropdown", a.throttle(function() {
a.resize.call(a)
}, 50)), this.resize()
},
close: function(t) {
var n = this;
t.each(function(i) {
var a = e("[" + n.attr_name() + "=" + t[i].id + "]") || e("aria-controls=" + t[i].id + "]");
a.attr("aria-expanded", "false"), n.S(this).hasClass(n.settings.active_class) && (n.S(this).css(Foundation.rtl ? "right" : "left", "-99999px").attr("aria-hidden", "true").removeClass(n.settings.active_class).prev("[" + n.attr_name() + "]").removeClass(n.settings.active_class).removeData("target"), n.S(this).trigger("closed.fndtn.dropdown", [t]))
}), t.removeClass("f-open-" + this.attr_name(!0))
},
closeall: function() {
var t = this;
e.each(t.S(".f-open-" + this.attr_name(!0)), function() {
t.close.call(t, t.S(this))
})
},
open: function(e, t) {
this.css(e.addClass(this.settings.active_class), t), e.prev("[" + this.attr_name() + "]").addClass(this.settings.active_class), e.data("target", t.get(0)).trigger("opened.fndtn.dropdown", [e, t]), e.attr("aria-hidden", "false"), t.attr("aria-expanded", "true"), e.focus(), e.addClass("f-open-" + this.attr_name(!0))
},
data_attr: function() {
return this.namespace.length > 0 ? this.namespace + "-" + this.name : this.name
},
toggle: function(e) {
if (!e.hasClass(this.settings.disabled_class)) {
var t = this.S("#" + e.data(this.data_attr()));
0 !== t.length && (this.close.call(this, this.S("[" + this.attr_name() + "-content]").not(t)), t.hasClass(this.settings.active_class) ? (this.close.call(this, t), t.data("target") !== e.get(0) && this.open.call(this, t, e)) : this.open.call(this, t, e))
}
},
resize: function() {
var t = this.S("[" + this.attr_name() + "-content].open"),
n = e(t.data("target"));
t.length && n.length && this.css(t, n)
},
css: function(e, t) {
var n = Math.max((t.width() - e.width()) / 2, 8),
i = t.data(this.attr_name(!0) + "-init") || this.settings,
a = e.parent().css("overflow-y") || e.parent().css("overflow");
if (this.clear_idx(), this.small()) {
var r = this.dirs.bottom.call(e, t, i);
e.attr("style", "").removeClass("drop-left drop-right drop-top").css({
position: "absolute",
width: "95%",
"max-width": "none",
top: r.top
}), e.css(Foundation.rtl ? "right" : "left", n)
} else if ("visible" !== a) {
var s = t[0].offsetTop + t[0].offsetHeight;
e.attr("style", "").css({
position: "absolute",
top: s
}), e.css(Foundation.rtl ? "right" : "left", n)
} else this.style(e, t, i);
return e
},
style: function(t, n, i) {
var a = e.extend({
position: "absolute"
}, this.dirs[i.align].call(t, n, i));
t.attr("style", "").css(a)
},
dirs: {
_base: function(e, i) {
var a = this.offsetParent(),
r = a.offset(),
s = e.offset();
s.top -= r.top, s.left -= r.left, s.missRight = !1, s.missTop = !1, s.missLeft = !1, s.leftRightFlag = !1;
var o, l = t.innerWidth;
o = n.getElementsByClassName("row")[0] ? n.getElementsByClassName("row")[0].clientWidth : l;
var c = (l - o) / 2,
u = o;
if (!this.hasClass("mega") && !i.ignore_repositioning) {
var d = this.outerWidth(),
p = e.offset().left;
e.offset().top <= this.outerHeight() && (s.missTop = !0, u = l - c, s.leftRightFlag = !0), p + d > p + c && p - c > d && (s.missRight = !0, s.missLeft = !1), 0 >= p - d && (s.missLeft = !0, s.missRight = !1)
}
return s
},
top: function(e, t) {
var n = Foundation.libs.dropdown,
i = n.dirs._base.call(this, e, t);
return this.addClass("drop-top"), 1 == i.missTop && (i.top = i.top + e.outerHeight() + this.outerHeight(), this.removeClass("drop-top")), 1 == i.missRight && (i.left = i.left - this.outerWidth() + e.outerWidth()), (e.outerWidth() < this.outerWidth() || n.small() || this.hasClass(t.mega_menu)) && n.adjust_pip(this, e, t, i), Foundation.rtl ? {
left: i.left - this.outerWidth() + e.outerWidth(),
top: i.top - this.outerHeight()
} : {
left: i.left,
top: i.top - this.outerHeight()
}
},
bottom: function(e, t) {
var n = Foundation.libs.dropdown,
i = n.dirs._base.call(this, e, t);
return 1 == i.missRight && (i.left = i.left - this.outerWidth() + e.outerWidth()), (e.outerWidth() < this.outerWidth() || n.small() || this.hasClass(t.mega_menu)) && n.adjust_pip(this, e, t, i), n.rtl ? {
left: i.left - this.outerWidth() + e.outerWidth(),
top: i.top + e.outerHeight()
} : {
left: i.left,
top: i.top + e.outerHeight()
}
},
left: function(e, t) {
var n = Foundation.libs.dropdown.dirs._base.call(this, e, t);
return this.addClass("drop-left"), 1 == n.missLeft && (n.left = n.left + this.outerWidth(), n.top = n.top + e.outerHeight(), this.removeClass("drop-left")), {
left: n.left - this.outerWidth(),
top: n.top
}
},
right: function(e, t) {
var n = Foundation.libs.dropdown.dirs._base.call(this, e, t);
this.addClass("drop-right"), 1 == n.missRight ? (n.left = n.left - this.outerWidth(), n.top = n.top + e.outerHeight(), this.removeClass("drop-right")) : n.triggeredRight = !0;
var i = Foundation.libs.dropdown;
return (e.outerWidth() < this.outerWidth() || i.small() || this.hasClass(t.mega_menu)) && i.adjust_pip(this, e, t, n), {
left: n.left + e.outerWidth(),
top: n.top
}
}
},
adjust_pip: function(e, t, n, i) {
var a = Foundation.stylesheet,
r = 8;
e.hasClass(n.mega_class) ? r = i.left + t.outerWidth() / 2 - 8 : this.small() && (r += i.left - 8), this.rule_idx = a.cssRules.length;
var s = ".f-dropdown.open:before",
o = ".f-dropdown.open:after",
l = "left: " + r + "px;",
c = "left: " + (r - 1) + "px;";
1 == i.missRight && (r = e.outerWidth() - 23, s = ".f-dropdown.open:before", o = ".f-dropdown.open:after", l = "left: " + r + "px;", c = "left: " + (r - 1) + "px;"), 1 == i.triggeredRight && (s = ".f-dropdown.open:before", o = ".f-dropdown.open:after", l = "left:-12px;", c = "left:-14px;"), a.insertRule ? (a.insertRule([s, "{", l, "}"].join(" "), this.rule_idx), a.insertRule([o, "{", c, "}"].join(" "), this.rule_idx + 1)) : (a.addRule(s, l, this.rule_idx), a.addRule(o, c, this.rule_idx + 1))
},
clear_idx: function() {
var e = Foundation.stylesheet;
"undefined" != typeof this.rule_idx && (e.deleteRule(this.rule_idx), e.deleteRule(this.rule_idx), delete this.rule_idx)
},
small: function() {
return matchMedia(Foundation.media_queries.small).matches && !matchMedia(Foundation.media_queries.medium).matches
},
off: function() {
this.S(this.scope).off(".fndtn.dropdown"), this.S("html, body").off(".fndtn.dropdown"), this.S(t).off(".fndtn.dropdown"), this.S("[data-dropdown-content]").off(".fndtn.dropdown")
},
reflow: function() {}
}
}(jQuery, window, window.document),
function(e, t, n, i) {
"use strict";
Foundation.libs.slider = {
name: "slider",
version: "5.5.3",
settings: {
start: 0,
end: 100,
step: 1,
precision: 2,
initial: null,
display_selector: "",
vertical: !1,
trigger_input_change: !1,
on_change: function() {}
},
cache: {},
init: function(e, t, n) {
Foundation.inherit(this, "throttle"), this.bindings(t, n), this.reflow()
},
events: function() {
var n = this;
e(this.scope).off(".slider").on("mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider", "[" + n.attr_name() + "]:not(.disabled, [disabled]) .range-slider-handle", function(t) {
n.cache.active || (t.preventDefault(), n.set_active_slider(e(t.target)))
}).on("mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider", function(i) {
if (n.cache.active)
if (i.preventDefault(), e.data(n.cache.active[0], "settings").vertical) {
var a = 0;
i.pageY || (a = t.scrollY), n.calculate_position(n.cache.active, n.get_cursor_position(i, "y") + a)
} else n.calculate_position(n.cache.active, n.get_cursor_position(i, "x"))
}).on("mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider", function(i) {
if (!n.cache.active) {
var a = "slider" === e(i.target).attr("role") ? e(i.target) : e(i.target).closest(".range-slider").find("[role='slider']");
if (a.length && !a.parent().hasClass("disabled") && !a.parent().attr("disabled"))
if (n.set_active_slider(a), e.data(n.cache.active[0], "settings").vertical) {
var r = 0;
i.pageY || (r = t.scrollY), n.calculate_position(n.cache.active, n.get_cursor_position(i, "y") + r)
} else n.calculate_position(n.cache.active, n.get_cursor_position(i, "x"))
}
n.remove_active_slider()
}).on("change.fndtn.slider", function(e) {
n.settings.on_change()
}), n.S(t).on("resize.fndtn.slider", n.throttle(function(e) {
n.reflow()
}, 300)), this.S("[" + this.attr_name() + "]").each(function() {
var t = e(this),
i = t.children(".range-slider-handle")[0],
a = n.initialize_settings(i);
"" != a.display_selector && e(a.display_selector).each(function() {
e(this).attr("value") && e(this).off("change").on("change", function() {
t.foundation("slider", "set_value", e(this).val())
})
})
})
},
get_cursor_position: function(e, t) {
var n, i = "page" + t.toUpperCase(),
a = "client" + t.toUpperCase();
return "undefined" != typeof e[i] ? n = e[i] : "undefined" != typeof e.originalEvent[a] ? n = e.originalEvent[a] : e.originalEvent.touches && e.originalEvent.touches[0] && "undefined" != typeof e.originalEvent.touches[0][a] ? n = e.originalEvent.touches[0][a] : e.currentPoint && "undefined" != typeof e.currentPoint[t] && (n = e.currentPoint[t]), n
},
set_active_slider: function(e) {
this.cache.active = e
},
remove_active_slider: function() {
this.cache.active = null
},
calculate_position: function(t, n) {
var i = this,
a = e.data(t[0], "settings"),
r = (e.data(t[0], "handle_l"), e.data(t[0], "handle_o"), e.data(t[0], "bar_l")),
s = e.data(t[0], "bar_o");
requestAnimationFrame(function() {
var e;
e = Foundation.rtl && !a.vertical ? i.limit_to((s + r - n) / r, 0, 1) : i.limit_to((n - s) / r, 0, 1), e = a.vertical ? 1 - e : e;
var o = i.normalized_value(e, a.start, a.end, a.step, a.precision);
i.set_ui(t, o)
})
},
set_ui: function(t, n) {
var i = e.data(t[0], "settings"),
a = e.data(t[0], "handle_l"),
r = e.data(t[0], "bar_l"),
s = this.normalized_percentage(n, i.start, i.end),
o = s * (r - a) - 1,
l = 100 * s,
c = t.parent(),
u = t.parent().children("input[type=hidden]");
Foundation.rtl && !i.vertical && (o = -o), o = i.vertical ? -o + r - a + 1 : o, this.set_translate(t, o, i.vertical), i.vertical ? t.siblings(".range-slider-active-segment").css("height", l + "%") : t.siblings(".range-slider-active-segment").css("width", l + "%"), c.attr(this.attr_name(), n).trigger("change.fndtn.slider"), u.val(n), i.trigger_input_change && u.trigger("change.fndtn.slider"), t[0].hasAttribute("aria-valuemin") || t.attr({
"aria-valuemin": i.start,
"aria-valuemax": i.end
}), t.attr("aria-valuenow", n), "" != i.display_selector && e(i.display_selector).each(function() {
this.hasAttribute("value") ? e(this).val(n) : e(this).text(n)
})
},
normalized_percentage: function(e, t, n) {
return Math.min(1, (e - t) / (n - t))
},
normalized_value: function(e, t, n, i, a) {
var r = n - t,
s = e * r,
o = (s - s % i) / i,
l = s % i,
c = l >= .5 * i ? i : 0;
return (o * i + c + t).toFixed(a)
},
set_translate: function(t, n, i) {
i ? e(t).css("-webkit-transform", "translateY(" + n + "px)").css("-moz-transform", "translateY(" + n + "px)").css("-ms-transform", "translateY(" + n + "px)").css("-o-transform", "translateY(" + n + "px)").css("transform", "translateY(" + n + "px)") : e(t).css("-webkit-transform", "translateX(" + n + "px)").css("-moz-transform", "translateX(" + n + "px)").css("-ms-transform", "translateX(" + n + "px)").css("-o-transform", "translateX(" + n + "px)").css("transform", "translateX(" + n + "px)")
},
limit_to: function(e, t, n) {
return Math.min(Math.max(e, t), n)
},
initialize_settings: function(t) {
var n, i = e.extend({}, this.settings, this.data_options(e(t).parent()));
return null === i.precision && (n = ("" + i.step).match(/\.([\d]*)/), i.precision = n && n[1] ? n[1].length : 0), i.vertical ? (e.data(t, "bar_o", e(t).parent().offset().top), e.data(t, "bar_l", e(t).parent().outerHeight()), e.data(t, "handle_o", e(t).offset().top), e.data(t, "handle_l", e(t).outerHeight())) : (e.data(t, "bar_o", e(t).parent().offset().left), e.data(t, "bar_l", e(t).parent().outerWidth()), e.data(t, "handle_o", e(t).offset().left), e.data(t, "handle_l", e(t).outerWidth())), e.data(t, "bar", e(t).parent()), e.data(t, "settings", i)
},
set_initial_position: function(t) {
var n = e.data(t.children(".range-slider-handle")[0], "settings"),
i = "number" != typeof n.initial || isNaN(n.initial) ? Math.floor(.5 * (n.end - n.start) / n.step) * n.step + n.start : n.initial,
a = t.children(".range-slider-handle");
this.set_ui(a, i)
},
set_value: function(t) {
var n = this;
e("[" + n.attr_name() + "]", this.scope).each(function() {
e(this).attr(n.attr_name(), t)
}), e(this.scope).attr(n.attr_name()) && e(this.scope).attr(n.attr_name(), t), n.reflow()
},
reflow: function() {
var t = this;
t.S("[" + this.attr_name() + "]").each(function() {
var n = e(this).children(".range-slider-handle")[0],
i = e(this).attr(t.attr_name());
t.initialize_settings(n), i ? t.set_ui(e(n), parseFloat(i)) : t.set_initial_position(e(this))
})
}
}
}(jQuery, window, window.document),
function(e, t, n, i) {
"use strict";
Foundation.libs.tooltip = {
name: "tooltip",
version: "5.5.3",
settings: {
additional_inheritable_classes: [],
tooltip_class: ".tooltip",
append_to: "body",
touch_close_text: "Tap To Close",
disable_for_touch: !1,
hover_delay: 200,
fade_in_duration: 150,
fade_out_duration: 150,
show_on: "all",
tip_template: function(e, t) {
return '<span data-selector="' + e + '" id="' + e + '" class="' + Foundation.libs.tooltip.settings.tooltip_class.substring(1) + '" role="tooltip">' + t + '<span class="nub"></span></span>'
}
},
cache: {},
init: function(e, t, n) {
Foundation.inherit(this, "random_str"), this.bindings(t, n)
},
should_show: function(t, n) {
var i = e.extend({}, this.settings, this.data_options(t));
return "all" === i.show_on ? !0 : this.small() && "small" === i.show_on ? !0 : this.medium() && "medium" === i.show_on ? !0 : this.large() && "large" === i.show_on ? !0 : !1
},
medium: function() {
return matchMedia(Foundation.media_queries.medium).matches
},
large: function() {
return matchMedia(Foundation.media_queries.large).matches
},
events: function(t) {
function n(e, t, n) {
e.timer || (n ? (e.timer = null, a.showTip(t)) : e.timer = setTimeout(function() {
e.timer = null, a.showTip(t)
}.bind(e), a.settings.hover_delay))
}
function i(e, t) {
e.timer && (clearTimeout(e.timer), e.timer = null), a.hide(t)
}
var a = this,
r = a.S;
a.create(this.S(t)), e(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip", "[" + this.attr_name() + "]", function(t) {
var s = r(this),
o = e.extend({}, a.settings, a.data_options(s)),
l = !1;
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(t.type) && r(t.target).is("a")) return !1;
if (/mouse/i.test(t.type) && a.ie_touch(t)) return !1;
if (s.hasClass("open")) Modernizr.touch && /touchstart|MSPointerDown/i.test(t.type) && t.preventDefault(), a.hide(s);
else {
if (o.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(t.type)) return;
if (!o.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(t.type) && (t.preventDefault(), r(o.tooltip_class + ".open").hide(), l = !0, e(".open[" + a.attr_name() + "]").length > 0)) {
var c = r(e(".open[" + a.attr_name() + "]")[0]);
a.hide(c)
}
/enter|over/i.test(t.type) ? n(this, s) : "mouseout" === t.type || "mouseleave" === t.type ? i(this, s) : n(this, s, !0)
}
}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip", "[" + this.attr_name() + "].open", function(t) {
return /mouse/i.test(t.type) && a.ie_touch(t) ? !1 : void(("touch" != e(this).data("tooltip-open-event-type") || "mouseleave" != t.type) && ("mouse" == e(this).data("tooltip-open-event-type") && /MSPointerDown|touchstart/i.test(t.type) ? a.convert_to_touch(e(this)) : i(this, e(this))))
}).on("DOMNodeRemoved DOMAttrModified", "[" + this.attr_name() + "]:not(a)", function(e) {
i(this, r(this))
})
},
ie_touch: function(e) {
return !1
},
showTip: function(e) {
var t = this.getTip(e);
return this.should_show(e, t) ? this.show(e) : void 0
},
getTip: function(t) {
var n = this.selector(t),
i = e.extend({}, this.settings, this.data_options(t)),
a = null;
return n && (a = this.S('span[data-selector="' + n + '"]' + i.tooltip_class)), "object" == typeof a ? a : !1
},
selector: function(e) {
var t = e.attr(this.attr_name()) || e.attr("data-selector");
return "string" != typeof t && (t = this.random_str(6), e.attr("data-selector", t).attr("aria-describedby", t)), t
},
create: function(n) {
var i = this,
a = e.extend({}, this.settings, this.data_options(n)),
r = this.settings.tip_template;
"string" == typeof a.tip_template && t.hasOwnProperty(a.tip_template) && (r = t[a.tip_template]);
var s = e(r(this.selector(n), e("<div></div>").html(n.attr("title")).html())),
o = this.inheritable_classes(n);
s.addClass(o).appendTo(a.append_to), Modernizr.touch && (s.append('<span class="tap-to-close">' + a.touch_close_text + "</span>"), s.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip", function(e) {
i.hide(n)
})), n.removeAttr("title").attr("title", "")
},
reposition: function(t, n, i) {
var a, r, s, o, l;
n.css("visibility", "hidden").show(), a = t.data("width"), r = n.children(".nub"), s = r.outerHeight(), o = r.outerWidth(), this.small() ? n.css({
width: "100%"
}) : n.css({
width: a ? a : "auto"
}), l = function(e, t, n, i, a, r) {
return e.css({
top: t ? t : "auto",
bottom: i ? i : "auto",
left: a ? a : "auto",
right: n ? n : "auto"
}).end()
};
var c = t.offset().top,
u = t.offset().left,
d = t.outerHeight();
if (l(n, c + d + 10, "auto", "auto", u), this.small()) l(n, c + d + 10, "auto", "auto", 12.5, e(this.scope).width()), n.addClass("tip-override"), l(r, -s, "auto", "auto", u);
else {
Foundation.rtl && (r.addClass("rtl"), u = u + t.outerWidth() - n.outerWidth()), l(n, c + d + 10, "auto", "auto", u), r.attr("style") && r.removeAttr("style"), n.removeClass("tip-override");
var p = n.outerHeight();
i && i.indexOf("tip-top") > -1 ? (Foundation.rtl && r.addClass("rtl"), l(n, c - p, "auto", "auto", u).removeClass("tip-override")) : i && i.indexOf("tip-left") > -1 ? (l(n, c + d / 2 - p / 2, "auto", "auto", u - n.outerWidth() - s).removeClass("tip-override"), r.removeClass("rtl")) : i && i.indexOf("tip-right") > -1 && (l(n, c + d / 2 - p / 2, "auto", "auto", u + t.outerWidth() + s).removeClass("tip-override"), r.removeClass("rtl"))
}
n.css("visibility", "visible").hide()
},
small: function() {
return matchMedia(Foundation.media_queries.small).matches && !matchMedia(Foundation.media_queries.medium).matches
},
inheritable_classes: function(t) {
var n = e.extend({}, this.settings, this.data_options(t)),
i = ["tip-top", "tip-left", "tip-bottom", "tip-right", "radius", "round"].concat(n.additional_inheritable_classes),
a = t.attr("class"),
r = a ? e.map(a.split(" "), function(t, n) {
return -1 !== e.inArray(t, i) ? t : void 0
}).join(" ") : "";
return e.trim(r)
},
convert_to_touch: function(t) {
var n = this,
i = n.getTip(t),
a = e.extend({}, n.settings, n.data_options(t));
0 === i.find(".tap-to-close").length && (i.append('<span class="tap-to-close">' + a.touch_close_text + "</span>"), i.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose", function(e) {
n.hide(t)
})), t.data("tooltip-open-event-type", "touch")
},
show: function(e) {
var t = this.getTip(e);
"touch" == e.data("tooltip-open-event-type") && this.convert_to_touch(e), this.reposition(e, t, e.attr("class")), e.addClass("open"), t.fadeIn(this.settings.fade_in_duration)
},
hide: function(e) {
var t = this.getTip(e);
t.fadeOut(this.settings.fade_out_duration, function() {
t.find(".tap-to-close").remove(), t.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"), e.removeClass("open")
})
},
off: function() {
var t = this;
this.S(this.scope).off(".fndtn.tooltip"), this.S(this.settings.tooltip_class).each(function(n) {
e("[" + t.attr_name() + "]").eq(n).attr("title", e(this).text())
}).remove()
},
reflow: function() {}
}
}(jQuery, window, window.document);
var pJS = function(e, t) {
var n = document.querySelector("#" + e + " > .particles-js-canvas-el");
this.pJS = {
canvas: {
el: n,
w: n.offsetWidth,
h: n.offsetHeight
},
particles: {
number: {
value: 400,
density: {
enable: !0,
value_area: 800
}
},
color: {
value: "#fff"
},
shape: {
type: "circle",
stroke: {
width: 0,
color: "#ff0000"
},
polygon: {
nb_sides: 5
},
image: {
src: "",
width: 100,
height: 100
}
},
opacity: {
value: 1,
random: !1,
anim: {
enable: !1,
speed: 2,
opacity_min: 0,
sync: !1
}
},
size: {
value: 20,
random: !1,
anim: {
enable: !1,
speed: 20,
size_min: 0,
sync: !1
}
},
line_linked: {
enable: !0,
distance: 100,
color: "#fff",
opacity: 1,
width: 1
},
move: {
enable: !0,
speed: 2,
direction: "none",
random: !1,
straight: !1,
out_mode: "out",
bounce: !1,
attract: {
enable: !1,
rotateX: 3e3,
rotateY: 3e3
}
},
array: []
},
interactivity: {
detect_on: "canvas",
events: {
onhover: {
enable: !0,
mode: "grab"
},
onclick: {
enable: !0,
mode: "push"
},
resize: !0
},
modes: {
grab: {
distance: 100,
line_linked: {
opacity: 1
}
},
bubble: {
distance: 200,
size: 80,
duration: .4
},
repulse: {
distance: 200,
duration: .4
},
push: {
particles_nb: 4
},
remove: {
particles_nb: 2
}
},
mouse: {}
},
retina_detect: !1,
fn: {
interact: {},
modes: {},
vendors: {}
},
tmp: {}
};
var i = this.pJS;
t && Object.deepExtend(i, t), i.tmp.obj = {
size_value: i.particles.size.value,
size_anim_speed: i.particles.size.anim.speed,
move_speed: i.particles.move.speed,
line_linked_distance: i.particles.line_linked.distance,
line_linked_width: i.particles.line_linked.width,
mode_grab_distance: i.interactivity.modes.grab.distance,
mode_bubble_distance: i.interactivity.modes.bubble.distance,
mode_bubble_size: i.interactivity.modes.bubble.size,
mode_repulse_distance: i.interactivity.modes.repulse.distance
}, i.fn.retinaInit = function() {
i.retina_detect && window.devicePixelRatio > 1 ? (i.canvas.pxratio = window.devicePixelRatio, i.tmp.retina = !0) : (i.canvas.pxratio = 1, i.tmp.retina = !1), i.canvas.w = i.canvas.el.offsetWidth * i.canvas.pxratio, i.canvas.h = i.canvas.el.offsetHeight * i.canvas.pxratio, i.particles.size.value = i.tmp.obj.size_value * i.canvas.pxratio, i.particles.size.anim.speed = i.tmp.obj.size_anim_speed * i.canvas.pxratio, i.particles.move.speed = i.tmp.obj.move_speed * i.canvas.pxratio, i.particles.line_linked.distance = i.tmp.obj.line_linked_distance * i.canvas.pxratio, i.interactivity.modes.grab.distance = i.tmp.obj.mode_grab_distance * i.canvas.pxratio, i.interactivity.modes.bubble.distance = i.tmp.obj.mode_bubble_distance * i.canvas.pxratio, i.particles.line_linked.width = i.tmp.obj.line_linked_width * i.canvas.pxratio, i.interactivity.modes.bubble.size = i.tmp.obj.mode_bubble_size * i.canvas.pxratio, i.interactivity.modes.repulse.distance = i.tmp.obj.mode_repulse_distance * i.canvas.pxratio
}, i.fn.canvasInit = function() {
i.canvas.ctx = i.canvas.el.getContext("2d")
}, i.fn.canvasSize = function() {
i.canvas.el.width = i.canvas.w, i.canvas.el.height = i.canvas.h, i && i.interactivity.events.resize && window.addEventListener("resize", function() {
i.canvas.w = i.canvas.el.offsetWidth, i.canvas.h = i.canvas.el.offsetHeight, i.tmp.retina && (i.canvas.w *= i.canvas.pxratio, i.canvas.h *= i.canvas.pxratio), i.canvas.el.width = i.canvas.w, i.canvas.el.height = i.canvas.h, i.particles.move.enable || (i.fn.particlesEmpty(), i.fn.particlesCreate(), i.fn.particlesDraw(), i.fn.vendors.densityAutoParticles()), i.fn.vendors.densityAutoParticles()
})
}, i.fn.canvasPaint = function() {
i.canvas.ctx.fillRect(0, 0, i.canvas.w, i.canvas.h)
}, i.fn.canvasClear = function() {
i.canvas.ctx.clearRect(0, 0, i.canvas.w, i.canvas.h)
}, i.fn.particle = function(e, t, n) {
if (this.radius = (i.particles.size.random ? Math.random() : 1) * i.particles.size.value, i.particles.size.anim.enable && (this.size_status = !1, this.vs = i.particles.size.anim.speed / 100, i.particles.size.anim.sync || (this.vs = this.vs * Math.random())), this.x = n ? n.x : Math.random() * i.canvas.w, this.y = n ? n.y : Math.random() * i.canvas.h, this.x > i.canvas.w - 2 * this.radius ? this.x = this.x - this.radius : this.x < 2 * this.radius && (this.x = this.x + this.radius), this.y > i.canvas.h - 2 * this.radius ? this.y = this.y - this.radius : this.y < 2 * this.radius && (this.y = this.y + this.radius), i.particles.move.bounce && i.fn.vendors.checkOverlap(this, n), this.color = {}, "object" == typeof e.value)
if (e.value instanceof Array) {
var a = e.value[Math.floor(Math.random() * i.particles.color.value.length)];
this.color.rgb = hexToRgb(a)
} else void 0 != e.value.r && void 0 != e.value.g && void 0 != e.value.b && (this.color.rgb = {
r: e.value.r,
g: e.value.g,
b: e.value.b
}), void 0 != e.value.h && void 0 != e.value.s && void 0 != e.value.l && (this.color.hsl = {
h: e.value.h,
s: e.value.s,
l: e.value.l
});
else "random" == e.value ? this.color.rgb = {
r: Math.floor(256 * Math.random()) + 0,
g: Math.floor(256 * Math.random()) + 0,
b: Math.floor(256 * Math.random()) + 0
} : "string" == typeof e.value && (this.color = e, this.color.rgb = hexToRgb(this.color.value));
this.opacity = (i.particles.opacity.random ? Math.random() : 1) * i.particles.opacity.value, i.particles.opacity.anim.enable && (this.opacity_status = !1, this.vo = i.particles.opacity.anim.speed / 100, i.particles.opacity.anim.sync || (this.vo = this.vo * Math.random()));
var r = {};
switch (i.particles.move.direction) {
case "top":
r = {
x: 0,
y: -1
};
break;
case "top-right":
r = {
x: .5,
y: -.5
};
break;
case "right":
r = {
x: 1,
y: -0
};
break;
case "bottom-right":
r = {
x: .5,
y: .5
};
break;
case "bottom":
r = {
x: 0,
y: 1
};
break;
case "bottom-left":
r = {
x: -.5,
y: 1
};
break;
case "left":
r = {
x: -1,
y: 0
};
break;
case "top-left":
r = {
x: -.5,
y: -.5
};
break;
default:
r = {
x: 0,
y: 0
}
}
i.particles.move.straight ? (this.vx = r.x, this.vy = r.y, i.particles.move.random && (this.vx = this.vx * Math.random(), this.vy = this.vy * Math.random())) : (this.vx = r.x + Math.random() - .5, this.vy = r.y + Math.random() - .5), this.vx_i = this.vx, this.vy_i = this.vy;
var s = i.particles.shape.type;
if ("object" == typeof s) {
if (s instanceof Array) {
var o = s[Math.floor(Math.random() * s.length)];
this.shape = o
}
} else this.shape = s;
if ("image" == this.shape) {
var l = i.particles.shape;
this.img = {
src: l.image.src,
ratio: l.image.width / l.image.height
}, this.img.ratio || (this.img.ratio = 1), "svg" == i.tmp.img_type && void 0 != i.tmp.source_svg && (i.fn.vendors.createSvgImg(this), i.tmp.pushing && (this.img.loaded = !1))
}
}, i.fn.particle.prototype.draw = function() {
function e() {
i.canvas.ctx.drawImage(s, t.x - n, t.y - n, 2 * n, 2 * n / t.img.ratio)
}
var t = this;
if (void 0 != t.radius_bubble) var n = t.radius_bubble;
else var n = t.radius;
if (void 0 != t.opacity_bubble) var a = t.opacity_bubble;
else var a = t.opacity;
if (t.color.rgb) var r = "rgba(" + t.color.rgb.r + "," + t.color.rgb.g + "," + t.color.rgb.b + "," + a + ")";
else var r = "hsla(" + t.color.hsl.h + "," + t.color.hsl.s + "%," + t.color.hsl.l + "%," + a + ")";
switch (i.canvas.ctx.fillStyle = r, i.canvas.ctx.beginPath(), t.shape) {
case "circle":
i.canvas.ctx.arc(t.x, t.y, n, 0, 2 * Math.PI, !1);
break;
case "edge":
i.canvas.ctx.rect(t.x - n, t.y - n, 2 * n, 2 * n);
break;
case "triangle":
i.fn.vendors.drawShape(i.canvas.ctx, t.x - n, t.y + n / 1.66, 2 * n, 3, 2);
break;
case "polygon":
i.fn.vendors.drawShape(i.canvas.ctx, t.x - n / (i.particles.shape.polygon.nb_sides / 3.5), t.y - n / .76, 2.66 * n / (i.particles.shape.polygon.nb_sides / 3), i.particles.shape.polygon.nb_sides, 1);
break;
case "star":
i.fn.vendors.drawShape(i.canvas.ctx, t.x - 2 * n / (i.particles.shape.polygon.nb_sides / 4), t.y - n / 1.52, 2 * n * 2.66 / (i.particles.shape.polygon.nb_sides / 3), i.particles.shape.polygon.nb_sides, 2);
break;
case "image":
if ("svg" == i.tmp.img_type) var s = t.img.obj;
else var s = i.tmp.img_obj;
s && e()
}
i.canvas.ctx.closePath(), i.particles.shape.stroke.width > 0 && (i.canvas.ctx.strokeStyle = i.particles.shape.stroke.color, i.canvas.ctx.lineWidth = i.particles.shape.stroke.width, i.canvas.ctx.stroke()), i.canvas.ctx.fill()
}, i.fn.particlesCreate = function() {
for (var e = 0; e < i.particles.number.value; e++) i.particles.array.push(new i.fn.particle(i.particles.color, i.particles.opacity.value))
}, i.fn.particlesUpdate = function() {
for (var e = 0; e < i.particles.array.length; e++) {
var t = i.particles.array[e];
if (i.particles.move.enable) {
var n = i.particles.move.speed / 2;
t.x += t.vx * n, t.y += t.vy * n
}
if (i.particles.opacity.anim.enable && (1 == t.opacity_status ? (t.opacity >= i.particles.opacity.value && (t.opacity_status = !1), t.opacity += t.vo) : (t.opacity <= i.particles.opacity.anim.opacity_min && (t.opacity_status = !0), t.opacity -= t.vo), t.opacity < 0 && (t.opacity = 0)), i.particles.size.anim.enable && (1 == t.size_status ? (t.radius >= i.particles.size.value && (t.size_status = !1), t.radius += t.vs) : (t.radius <= i.particles.size.anim.size_min && (t.size_status = !0), t.radius -= t.vs), t.radius < 0 && (t.radius = 0)), "bounce" == i.particles.move.out_mode) var a = {
x_left: t.radius,
x_right: i.canvas.w,
y_top: t.radius,
y_bottom: i.canvas.h
};
else var a = {
x_left: -t.radius,
x_right: i.canvas.w + t.radius,
y_top: -t.radius,
y_bottom: i.canvas.h + t.radius
};
switch (t.x - t.radius > i.canvas.w ? (t.x = a.x_left, t.y = Math.random() * i.canvas.h) : t.x + t.radius < 0 && (t.x = a.x_right, t.y = Math.random() * i.canvas.h), t.y - t.radius > i.canvas.h ? (t.y = a.y_top, t.x = Math.random() * i.canvas.w) : t.y + t.radius < 0 && (t.y = a.y_bottom, t.x = Math.random() * i.canvas.w), i.particles.move.out_mode) {
case "bounce":
t.x + t.radius > i.canvas.w ? t.vx = -t.vx : t.x - t.radius < 0 && (t.vx = -t.vx), t.y + t.radius > i.canvas.h ? t.vy = -t.vy : t.y - t.radius < 0 && (t.vy = -t.vy)
}
if (isInArray("grab", i.interactivity.events.onhover.mode) && i.fn.modes.grabParticle(t), (isInArray("bubble", i.interactivity.events.onhover.mode) || isInArray("bubble", i.interactivity.events.onclick.mode)) && i.fn.modes.bubbleParticle(t), (isInArray("repulse", i.interactivity.events.onhover.mode) || isInArray("repulse", i.interactivity.events.onclick.mode)) && i.fn.modes.repulseParticle(t), i.particles.line_linked.enable || i.particles.move.attract.enable)
for (var r = e + 1; r < i.particles.array.length; r++) {
var s = i.particles.array[r];
i.particles.line_linked.enable && i.fn.interact.linkParticles(t, s), i.particles.move.attract.enable && i.fn.interact.attractParticles(t, s), i.particles.move.bounce && i.fn.interact.bounceParticles(t, s)
}
}
}, i.fn.particlesDraw = function() {
i.canvas.ctx.clearRect(0, 0, i.canvas.w, i.canvas.h), i.fn.particlesUpdate();
for (var e = 0; e < i.particles.array.length; e++) {
var t = i.particles.array[e];
t.draw()
}
}, i.fn.particlesEmpty = function() {
i.particles.array = []
}, i.fn.particlesRefresh = function() {
cancelRequestAnimFrame(i.fn.checkAnimFrame), cancelRequestAnimFrame(i.fn.drawAnimFrame), i.tmp.source_svg = void 0, i.tmp.img_obj = void 0, i.tmp.count_svg = 0, i.fn.particlesEmpty(), i.fn.canvasClear(), i.fn.vendors.start()
}, i.fn.interact.linkParticles = function(e, t) {
var n = e.x - t.x,
a = e.y - t.y,
r = Math.sqrt(n * n + a * a);
if (r <= i.particles.line_linked.distance) {
var s = i.particles.line_linked.opacity - r / (1 / i.particles.line_linked.opacity) / i.particles.line_linked.distance;
if (s > 0) {
var o = i.particles.line_linked.color_rgb_line;
i.canvas.ctx.strokeStyle = "rgba(" + o.r + "," + o.g + "," + o.b + "," + s + ")", i.canvas.ctx.lineWidth = i.particles.line_linked.width, i.canvas.ctx.beginPath(), i.canvas.ctx.moveTo(e.x, e.y), i.canvas.ctx.lineTo(t.x, t.y), i.canvas.ctx.stroke(), i.canvas.ctx.closePath()
}
}
}, i.fn.interact.attractParticles = function(e, t) {
var n = e.x - t.x,
a = e.y - t.y,
r = Math.sqrt(n * n + a * a);
if (r <= i.particles.line_linked.distance) {
var s = n / (1e3 * i.particles.move.attract.rotateX),
o = a / (1e3 * i.particles.move.attract.rotateY);
e.vx -= s, e.vy -= o, t.vx += s, t.vy += o
}
}, i.fn.interact.bounceParticles = function(e, t) {
var n = e.x - t.x,
i = e.y - t.y,
a = Math.sqrt(n * n + i * i),
r = e.radius + t.radius;
r >= a && (e.vx = -e.vx, e.vy = -e.vy, t.vx = -t.vx, t.vy = -t.vy)
}, i.fn.modes.pushParticles = function(e, t) {
i.tmp.pushing = !0;
for (var n = 0; e > n; n++) i.particles.array.push(new i.fn.particle(i.particles.color, i.particles.opacity.value, {
x: t ? t.pos_x : Math.random() * i.canvas.w,
y: t ? t.pos_y : Math.random() * i.canvas.h
})), n == e - 1 && (i.particles.move.enable || i.fn.particlesDraw(), i.tmp.pushing = !1)
}, i.fn.modes.removeParticles = function(e) {
i.particles.array.splice(0, e), i.particles.move.enable || i.fn.particlesDraw()
}, i.fn.modes.bubbleParticle = function(e) {
function t() {
e.opacity_bubble = e.opacity, e.radius_bubble = e.radius
}
function n(t, n, a, r, o) {
if (t != n)
if (i.tmp.bubble_duration_end) {
if (void 0 != a) {
var l = r - d * (r - t) / i.interactivity.modes.bubble.duration,
c = t - l;
p = t + c, "size" == o && (e.radius_bubble = p), "opacity" == o && (e.opacity_bubble = p)
}
} else if (s <= i.interactivity.modes.bubble.distance) {
if (void 0 != a) var u = a;
else var u = r;
if (u != t) {
var p = r - d * (r - t) / i.interactivity.modes.bubble.duration;
"size" == o && (e.radius_bubble = p), "opacity" == o && (e.opacity_bubble = p)
}
} else "size" == o && (e.radius_bubble = void 0), "opacity" == o && (e.opacity_bubble = void 0)
}
if (i.interactivity.events.onhover.enable && isInArray("bubble", i.interactivity.events.onhover.mode)) {
var a = e.x - i.interactivity.mouse.pos_x,
r = e.y - i.interactivity.mouse.pos_y,
s = Math.sqrt(a * a + r * r),
o = 1 - s / i.interactivity.modes.bubble.distance;
if (s <= i.interactivity.modes.bubble.distance) {
if (o >= 0 && "mousemove" == i.interactivity.status) {
if (i.interactivity.modes.bubble.size != i.particles.size.value)
if (i.interactivity.modes.bubble.size > i.particles.size.value) {
var l = e.radius + i.interactivity.modes.bubble.size * o;
l >= 0 && (e.radius_bubble = l)
} else {
var c = e.radius - i.interactivity.modes.bubble.size,
l = e.radius - c * o;
l > 0 ? e.radius_bubble = l : e.radius_bubble = 0
}
if (i.interactivity.modes.bubble.opacity != i.particles.opacity.value)
if (i.interactivity.modes.bubble.opacity > i.particles.opacity.value) {
var u = i.interactivity.modes.bubble.opacity * o;
u > e.opacity && u <= i.interactivity.modes.bubble.opacity && (e.opacity_bubble = u)
} else {
var u = e.opacity - (i.particles.opacity.value - i.interactivity.modes.bubble.opacity) * o;
u < e.opacity && u >= i.interactivity.modes.bubble.opacity && (e.opacity_bubble = u)
}
}
} else t();
"mouseleave" == i.interactivity.status && t()
} else if (i.interactivity.events.onclick.enable && isInArray("bubble", i.interactivity.events.onclick.mode)) {
if (i.tmp.bubble_clicking) {
var a = e.x - i.interactivity.mouse.click_pos_x,
r = e.y - i.interactivity.mouse.click_pos_y,
s = Math.sqrt(a * a + r * r),
d = ((new Date).getTime() - i.interactivity.mouse.click_time) / 1e3;
d > i.interactivity.modes.bubble.duration && (i.tmp.bubble_duration_end = !0), d > 2 * i.interactivity.modes.bubble.duration && (i.tmp.bubble_clicking = !1, i.tmp.bubble_duration_end = !1)
}
i.tmp.bubble_clicking && (n(i.interactivity.modes.bubble.size, i.particles.size.value, e.radius_bubble, e.radius, "size"), n(i.interactivity.modes.bubble.opacity, i.particles.opacity.value, e.opacity_bubble, e.opacity, "opacity"))
}
}, i.fn.modes.repulseParticle = function(e) {
function t() {
var t = Math.atan2(p, d);
if (e.vx = h * Math.cos(t), e.vy = h * Math.sin(t), "bounce" == i.particles.move.out_mode) {
var n = {
x: e.x + e.vx,
y: e.y + e.vy
};
n.x + e.radius > i.canvas.w ? e.vx = -e.vx : n.x - e.radius < 0 && (e.vx = -e.vx), n.y + e.radius > i.canvas.h ? e.vy = -e.vy : n.y - e.radius < 0 && (e.vy = -e.vy)
}
}
if (i.interactivity.events.onhover.enable && isInArray("repulse", i.interactivity.events.onhover.mode) && "mousemove" == i.interactivity.status) {
var n = e.x - i.interactivity.mouse.pos_x,
a = e.y - i.interactivity.mouse.pos_y,
r = Math.sqrt(n * n + a * a),
s = {
x: n / r,
y: a / r
},
o = i.interactivity.modes.repulse.distance,
l = 100,
c = clamp(1 / o * (-1 * Math.pow(r / o, 2) + 1) * o * l, 0, 50),
u = {
x: e.x + s.x * c,
y: e.y + s.y * c
};
"bounce" == i.particles.move.out_mode ? (u.x - e.radius > 0 && u.x + e.radius < i.canvas.w && (e.x = u.x), u.y - e.radius > 0 && u.y + e.radius < i.canvas.h && (e.y = u.y)) : (e.x = u.x, e.y = u.y)
} else if (i.interactivity.events.onclick.enable && isInArray("repulse", i.interactivity.events.onclick.mode))
if (i.tmp.repulse_finish || (i.tmp.repulse_count++, i.tmp.repulse_count == i.particles.array.length && (i.tmp.repulse_finish = !0)), i.tmp.repulse_clicking) {
var o = Math.pow(i.interactivity.modes.repulse.distance / 6, 3),
d = i.interactivity.mouse.click_pos_x - e.x,
p = i.interactivity.mouse.click_pos_y - e.y,
f = d * d + p * p,
h = -o / f * 1;
o >= f && t()
} else 0 == i.tmp.repulse_clicking && (e.vx = e.vx_i, e.vy = e.vy_i)
}, i.fn.modes.grabParticle = function(e) {
if (i.interactivity.events.onhover.enable && "mousemove" == i.interactivity.status) {
var t = e.x - i.interactivity.mouse.pos_x,
n = e.y - i.interactivity.mouse.pos_y,
a = Math.sqrt(t * t + n * n);
if (a <= i.interactivity.modes.grab.distance) {
var r = i.interactivity.modes.grab.line_linked.opacity - a / (1 / i.interactivity.modes.grab.line_linked.opacity) / i.interactivity.modes.grab.distance;
if (r > 0) {
var s = i.particles.line_linked.color_rgb_line;
i.canvas.ctx.strokeStyle = "rgba(" + s.r + "," + s.g + "," + s.b + "," + r + ")", i.canvas.ctx.lineWidth = i.particles.line_linked.width, i.canvas.ctx.beginPath(), i.canvas.ctx.moveTo(e.x, e.y), i.canvas.ctx.lineTo(i.interactivity.mouse.pos_x, i.interactivity.mouse.pos_y), i.canvas.ctx.stroke(), i.canvas.ctx.closePath()
}
}
}
}, i.fn.vendors.eventsListeners = function() {
"window" == i.interactivity.detect_on ? i.interactivity.el = window : i.interactivity.el = i.canvas.el, (i.interactivity.events.onhover.enable || i.interactivity.events.onclick.enable) && (i.interactivity.el.addEventListener("mousemove", function(e) {
if (i.interactivity.el == window) var t = e.clientX,
n = e.clientY;
else var t = e.offsetX || e.clientX,
n = e.offsetY || e.clientY;
i.interactivity.mouse.pos_x = t, i.interactivity.mouse.pos_y = n, i.tmp.retina && (i.interactivity.mouse.pos_x *= i.canvas.pxratio, i.interactivity.mouse.pos_y *= i.canvas.pxratio), i.interactivity.status = "mousemove"
}), i.interactivity.el.addEventListener("mouseleave", function(e) {
i.interactivity.mouse.pos_x = null, i.interactivity.mouse.pos_y = null, i.interactivity.status = "mouseleave"
})), i.interactivity.events.onclick.enable && i.interactivity.el.addEventListener("click", function() {
if (i.interactivity.mouse.click_pos_x = i.interactivity.mouse.pos_x, i.interactivity.mouse.click_pos_y = i.interactivity.mouse.pos_y, i.interactivity.mouse.click_time = (new Date).getTime(), i.interactivity.events.onclick.enable) switch (i.interactivity.events.onclick.mode) {
case "push":
i.particles.move.enable ? i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb, i.interactivity.mouse) : 1 == i.interactivity.modes.push.particles_nb ? i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb, i.interactivity.mouse) : i.interactivity.modes.push.particles_nb > 1 && i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb);
break;
case "remove":
i.fn.modes.removeParticles(i.interactivity.modes.remove.particles_nb);
break;
case "bubble":
i.tmp.bubble_clicking = !0;
break;
case "repulse":
i.tmp.repulse_clicking = !0, i.tmp.repulse_count = 0, i.tmp.repulse_finish = !1, setTimeout(function() {
i.tmp.repulse_clicking = !1
}, 1e3 * i.interactivity.modes.repulse.duration)
}
})
}, i.fn.vendors.densityAutoParticles = function() {
if (i.particles.number.density.enable) {
var e = i.canvas.el.width * i.canvas.el.height / 1e3;
i.tmp.retina && (e /= 2 * i.canvas.pxratio);
var t = e * i.particles.number.value / i.particles.number.density.value_area,
n = i.particles.array.length - t;
0 > n ? i.fn.modes.pushParticles(Math.abs(n)) : i.fn.modes.removeParticles(n)
}
}, i.fn.vendors.checkOverlap = function(e, t) {
for (var n = 0; n < i.particles.array.length; n++) {
var a = i.particles.array[n],
r = e.x - a.x,
s = e.y - a.y,
o = Math.sqrt(r * r + s * s);
o <= e.radius + a.radius && (e.x = t ? t.x : Math.random() * i.canvas.w, e.y = t ? t.y : Math.random() * i.canvas.h, i.fn.vendors.checkOverlap(e))
}
}, i.fn.vendors.createSvgImg = function(e) {
var t = i.tmp.source_svg,
n = /#([0-9A-F]{3,6})/gi,
a = t.replace(n, function(t, n, i, a) {
if (e.color.rgb) var r = "rgba(" + e.color.rgb.r + "," + e.color.rgb.g + "," + e.color.rgb.b + "," + e.opacity + ")";
else var r = "hsla(" + e.color.hsl.h + "," + e.color.hsl.s + "%," + e.color.hsl.l + "%," + e.opacity + ")";
return r
}),
r = new Blob([a], {
type: "image/svg+xml;charset=utf-8"
}),
s = window.URL || window.webkitURL || window,
o = s.createObjectURL(r),
l = new Image;
l.addEventListener("load", function() {
e.img.obj = l, e.img.loaded = !0, s.revokeObjectURL(o), i.tmp.count_svg++
}), l.src = o
}, i.fn.vendors.destroypJS = function() {
cancelAnimationFrame(i.fn.drawAnimFrame), n.remove(), pJSDom = null
}, i.fn.vendors.drawShape = function(e, t, n, i, a, r) {
var s = a * r,
o = a / r,
l = 180 * (o - 2) / o,
c = Math.PI - Math.PI * l / 180;
e.save(), e.beginPath(), e.translate(t, n), e.moveTo(0, 0);
for (var u = 0; s > u; u++) e.lineTo(i, 0), e.translate(i, 0), e.rotate(c);
e.fill(), e.restore()
}, i.fn.vendors.exportImg = function() {
window.open(i.canvas.el.toDataURL("image/png"), "_blank")
}, i.fn.vendors.loadImg = function(e) {
if (i.tmp.img_error = void 0, "" != i.particles.shape.image.src)
if ("svg" == e) {
var t = new XMLHttpRequest;
t.open("GET", i.particles.shape.image.src), t.onreadystatechange = function(e) {
4 == t.readyState && (200 == t.status ? (i.tmp.source_svg = e.currentTarget.response, i.fn.vendors.checkBeforeDraw()) : (console.log("Error pJS - Image not found"), i.tmp.img_error = !0))
}, t.send()
} else {
var n = new Image;
n.addEventListener("load", function() {
i.tmp.img_obj = n, i.fn.vendors.checkBeforeDraw()
}), n.src = i.particles.shape.image.src
} else console.log("Error pJS - No image.src"), i.tmp.img_error = !0
}, i.fn.vendors.draw = function() {
"image" == i.particles.shape.type ? "svg" == i.tmp.img_type ? i.tmp.count_svg >= i.particles.number.value ? (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame)) : i.tmp.img_error || (i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw)) : void 0 != i.tmp.img_obj ? (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame)) : i.tmp.img_error || (i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw)) : (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame))
}, i.fn.vendors.checkBeforeDraw = function() {
"image" == i.particles.shape.type ? "svg" == i.tmp.img_type && void 0 == i.tmp.source_svg ? i.tmp.checkAnimFrame = requestAnimFrame(check) : (cancelRequestAnimFrame(i.tmp.checkAnimFrame), i.tmp.img_error || (i.fn.vendors.init(), i.fn.vendors.draw())) : (i.fn.vendors.init(), i.fn.vendors.draw())
}, i.fn.vendors.init = function() {
i.fn.retinaInit(), i.fn.canvasInit(), i.fn.canvasSize(), i.fn.canvasPaint(), i.fn.particlesCreate(), i.fn.vendors.densityAutoParticles(), i.particles.line_linked.color_rgb_line = hexToRgb(i.particles.line_linked.color)
}, i.fn.vendors.start = function() {
isInArray("image", i.particles.shape.type) ? (i.tmp.img_type = i.particles.shape.image.src.substr(i.particles.shape.image.src.length - 3), i.fn.vendors.loadImg(i.tmp.img_type)) : i.fn.vendors.checkBeforeDraw()
}, i.fn.vendors.eventsListeners(), i.fn.vendors.start()
};
Object.deepExtend = function(e, t) {
for (var n in t) t[n] && t[n].constructor && t[n].constructor === Object ? (e[n] = e[n] || {}, arguments.callee(e[n], t[n])) : e[n] = t[n];
return e
}, window.requestAnimFrame = function() {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e) {
window.setTimeout(e, 1e3 / 60)
}
}(), window.cancelRequestAnimFrame = function() {
return window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout
}(), window.pJSDom = [], window.particlesJS = function(e, t) {
"string" != typeof e && (t = e, e = "particles-js"), e || (e = "particles-js");
var n = document.getElementById(e),
i = "particles-js-canvas-el",
a = n.getElementsByClassName(i);
if (a.length)
for (; a.length > 0;) n.removeChild(a[0]);
var r = document.createElement("canvas");
r.className = i, r.style.width = "100%", r.style.height = "100%";
var s = document.getElementById(e).appendChild(r);
null != s && pJSDom.push(new pJS(e, t))
}, window.particlesJS.load = function(e, t, n) {
var i = new XMLHttpRequest;
i.open("GET", t), i.onreadystatechange = function(t) {
if (4 == i.readyState)
if (200 == i.status) {
var a = JSON.parse(t.currentTarget.response);
window.particlesJS(e, a), n && n()
} else console.log("Error pJS - XMLHttpRequest status: " + i.status), console.log("Error pJS - File config not found")
}, i.send()
}, ! function(e, t) {
"use strict";
function n(e) {
this.callback = e, this.ticking = !1
}
function i(t) {
return t && "undefined" != typeof e && (t === e || t.nodeType)
}
function a(e) {
if (arguments.length <= 0) throw new Error("Missing arguments in extend function");
var t, n, r = e || {};
for (n = 1; n < arguments.length; n++) {
var s = arguments[n] || {};
for (t in s) r[t] = "object" != typeof r[t] || i(r[t]) ? r[t] || s[t] : a(r[t], s[t])
}
return r
}
function r(e) {
return e === Object(e) ? e : {
down: e,
up: e
}
}
function s(e, t) {
t = a(t, s.options), this.lastKnownScrollY = 0, this.elem = e, this.debouncer = new n(this.update.bind(this)), this.tolerance = r(t.tolerance), this.classes = t.classes, this.offset = t.offset, this.scroller = t.scroller, this.initialised = !1, this.onPin = t.onPin, this.onUnpin = t.onUnpin, this.onTop = t.onTop, this.onNotTop = t.onNotTop
}
var o = {
bind: !! function() {}.bind,
classList: "classList" in t.documentElement,
rAF: !!(e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame)
};
e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame, n.prototype = {
constructor: n,
update: function() {
this.callback && this.callback(), this.ticking = !1
},
requestTick: function() {
this.ticking || (requestAnimationFrame(this.rafCallback || (this.rafCallback = this.update.bind(this))), this.ticking = !0)
},
handleEvent: function() {
this.requestTick()
}
}, s.prototype = {
constructor: s,
init: function() {
return s.cutsTheMustard ? (this.elem.classList.add(this.classes.initial), setTimeout(this.attachEvent.bind(this), 100), this) : void 0
},
destroy: function() {
var e = this.classes;
this.initialised = !1, this.elem.classList.remove(e.unpinned, e.pinned, e.top, e.initial), this.scroller.removeEventListener("scroll", this.debouncer, !1)
},
attachEvent: function() {
this.initialised || (this.lastKnownScrollY = this.getScrollY(), this.initialised = !0, this.scroller.addEventListener("scroll", this.debouncer, !1), this.debouncer.handleEvent())
},
unpin: function() {
var e = this.elem.classList,
t = this.classes;
(e.contains(t.pinned) || !e.contains(t.unpinned)) && (e.add(t.unpinned), e.remove(t.pinned), this.onUnpin && this.onUnpin.call(this))
},
pin: function() {
var e = this.elem.classList,
t = this.classes;
e.contains(t.unpinned) && (e.remove(t.unpinned), e.add(t.pinned), this.onPin && this.onPin.call(this))
},
top: function() {
var e = this.elem.classList,
t = this.classes;
e.contains(t.top) || (e.add(t.top), e.remove(t.notTop), this.onTop && this.onTop.call(this))
},
notTop: function() {
var e = this.elem.classList,
t = this.classes;
e.contains(t.notTop) || (e.add(t.notTop), e.remove(t.top), this.onNotTop && this.onNotTop.call(this))
},
getScrollY: function() {
return void 0 !== this.scroller.pageYOffset ? this.scroller.pageYOffset : void 0 !== this.scroller.scrollTop ? this.scroller.scrollTop : (t.documentElement || t.body.parentNode || t.body).scrollTop
},
getViewportHeight: function() {
return e.innerHeight || t.documentElement.clientHeight || t.body.clientHeight
},
getDocumentHeight: function() {
var e = t.body,
n = t.documentElement;
return Math.max(e.scrollHeight, n.scrollHeight, e.offsetHeight, n.offsetHeight, e.clientHeight, n.clientHeight)
},
getElementHeight: function(e) {
return Math.max(e.scrollHeight, e.offsetHeight, e.clientHeight)
},
getScrollerHeight: function() {
return this.scroller === e || this.scroller === t.body ? this.getDocumentHeight() : this.getElementHeight(this.scroller)
},
isOutOfBounds: function(e) {
var t = 0 > e,
n = e + this.getViewportHeight() > this.getScrollerHeight();
return t || n
},
toleranceExceeded: function(e, t) {
return Math.abs(e - this.lastKnownScrollY) >= this.tolerance[t]
},
shouldUnpin: function(e, t) {
var n = e > this.lastKnownScrollY,
i = e >= this.offset;
return n && i && t
},
shouldPin: function(e, t) {
var n = e < this.lastKnownScrollY,
i = e <= this.offset;
return n && t || i
},
update: function() {
var e = this.getScrollY(),
t = e > this.lastKnownScrollY ? "down" : "up",
n = this.toleranceExceeded(e, t);
this.isOutOfBounds(e) || (e <= this.offset ? this.top() : this.notTop(), this.shouldUnpin(e, n) ? this.unpin() : this.shouldPin(e, n) && this.pin(), this.lastKnownScrollY = e)
}
}, s.options = {
tolerance: {
up: 0,
down: 0
},
offset: 0,
scroller: e,
classes: {
pinned: "headroom--pinned",
unpinned: "headroom--unpinned",
top: "headroom--top",
notTop: "headroom--not-top",
initial: "headroom"
}
}, s.cutsTheMustard = "undefined" != typeof o && o.rAF && o.bind && o.classList, e.Headroom = s
}(window, document), $(document).ready(function() {
function e(e, t) {
if (e) return void console.error(e);
var n = $("#articles");
n.empty();
for (var i = 0; i < t.hits.length; i++) n.append("<li>" + t.hits[i].name + "</li>")
}
$(document).foundation(), $(document).unbind("keyup"), $(document).keyup(function(e) {
27 == e.keyCode && $("#searchBar").click()
}), $("#searchBar, .search-overlay-bg, .search-trigger").click(function() {
$("#searchOverlay").hasClass("active") ? $("#searchOverlay").removeClass("active") : ($("#searchOverlay").addClass("active"), $('#searchOverlay input[type="text"]').focus())
});
var t = algoliasearch("QM91V2H4QL", "edeebf1c9a5e14c6dfb24911a629e27c"),
n = t.initIndex("test_index"),
i = $("#agolia-input");
i.keyup(function() {
n.search(i.val(), {
hitsPerPage: 10,
facets: "*"
}, e)
}).focus(), $(".footer-reveal").click(function() {
$(".styleguide-footer").toggleClass("footer-expanded"), $(".container-full").toggleClass("footer-expanded")
}), $("article a").each(function() {
"https://barricade.io/about#contact-info" == $(this).attr("href") && ($(this).attr("href", ""), $(this).attr("class", "intercom-trigger"))
})
}),
function() {
var e = document.querySelector(".top-bar");
new Headroom(e, {
offset: 50,
classes: {
initial: "headroom",
pinned: "headroom--pinned",
unpinned: "headroom--unpinned",
top: "headroom--top",
notTop: "headroom--not-top"
}
}).init()
}();
var lastId, topMenu = $(".sidebar ul ul"),
topMenuHeight = topMenu.outerHeight() + 15,
menuItems = topMenu.find("a"),
scrollItems = menuItems.map(function() {
var e = $($(this).attr("href"));
return e.length ? e : void 0
});
menuItems.click(function(e) {
var t = $(this).attr("href"),
n = "#" === t ? 0 : $(t).offset().top - topMenuHeight + 1;
$("html, body").stop().animate({
scrollTop: n
}, 300)
}), $(function() {
$("a[href*=#]:not([href=#])").click(function() {
if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) {
var e = $(this.hash);
e = e.length ? e : $("[name=" + this.hash.slice(1) + "]"), e.length && $("html,body").animate({
scrollTop: e.offset().top
}, 400)
}
})
}), $(window).scroll(function() {
var e = $(this).scrollTop() + topMenuHeight,
t = scrollItems.map(function() {
return $(this).offset().top < e ? this : void 0
});
t = t[t.length - 1];
var n = t && t.length ? t[0].id : "";
lastId !== n && (lastId = n, menuItems.parent().removeClass("active").end().filter("[href=#" + n + "]").parent().addClass("active"))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment