Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ ! 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(t, n) {
- var m = [],
- f = m.slice,
- ue = m.concat,
- X = m.push,
- de = m.indexOf,
- F = {}, Gt = F.toString,
- k = F.hasOwnProperty,
- r = {}, Re = "1.11.1",
- e = function(t, n) {
- return new e.fn.init(t, n)
- }, sn = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
- un = /^-ms-/,
- cn = /-([\da-z])/gi,
- dn = function(e, t) {
- return t.toUpperCase()
- };
- e.fn = e.prototype = {
- jquery: Re,
- constructor: e,
- selector: "",
- length: 0,
- toArray: function() {
- return f.call(this)
- },
- get: function(e) {
- return null != e ? 0 > e ? this[e + this.length] : this[e] : f.call(this)
- },
- pushStack: function(t) {
- var n = e.merge(this.constructor(), t);
- return n.prevObject = this, n.context = this.context, n
- },
- each: function(t, n) {
- return e.each(this, t, n)
- },
- map: function(t) {
- return this.pushStack(e.map(this, function(e, n) {
- return t.call(e, n, e)
- }))
- },
- slice: function() {
- return this.pushStack(f.apply(this, arguments))
- },
- first: function() {
- return this.eq(0)
- },
- last: function() {
- return this.eq(-1)
- },
- eq: function(e) {
- var n = this.length,
- t = +e + (0 > e ? n : 0);
- return this.pushStack(t >= 0 && n > t ? [this[t]] : [])
- },
- end: function() {
- return this.prevObject || this.constructor(null)
- },
- push: X,
- sort: m.sort,
- splice: m.splice
- }, e.extend = e.fn.extend = function() {
- var i, u, n, o, s, l, t = arguments[0] || {}, r = 1,
- c = arguments.length,
- a = !1;
- for ("boolean" == typeof t && (a = t, t = arguments[r] || {}, r++), "object" == typeof t || e.isFunction(t) || (t = {}), r === c && (t = this, r--); c > r; r++)
- if (null != (s = arguments[r]))
- for (o in s) i = t[o], n = s[o], t !== n && (a && n && (e.isPlainObject(n) || (u = e.isArray(n))) ? (u ? (u = !1, l = i && e.isArray(i) ? i : []) : l = i && e.isPlainObject(i) ? i : {}, t[o] = e.extend(a, l, n)) : void 0 !== n && (t[o] = n));
- return t
- }, e.extend({
- expando: "jQuery" + (Re + Math.random()).replace(/\D/g, ""),
- isReady: !0,
- error: function(e) {
- throw new Error(e);
- },
- noop: function() {},
- isFunction: function(t) {
- return "function" === e.type(t)
- },
- isArray: Array.isArray || function(t) {
- return "array" === e.type(t)
- },
- isWindow: function(e) {
- return null != e && e == e.window
- },
- isNumeric: function(t) {
- return !e.isArray(t) && t - parseFloat(t) >= 0
- },
- isEmptyObject: function(e) {
- var t;
- for (t in e) return !1;
- return !0
- },
- isPlainObject: function(t) {
- var i;
- if (!t || "object" !== e.type(t) || t.nodeType || e.isWindow(t)) return !1;
- try {
- if (t.constructor && !k.call(t, "constructor") && !k.call(t.constructor.prototype, "isPrototypeOf")) return !1
- } catch (n) {
- return !1
- };
- if (r.ownLast)
- for (i in t) return k.call(t, i);
- for (i in t);
- return void 0 === i || k.call(t, i)
- },
- type: function(e) {
- return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? F[Gt.call(e)] || "object" : typeof e
- },
- globalEval: function(n) {
- n && e.trim(n) && (t.execScript || function(e) {
- t.eval.call(t, e)
- })(n)
- },
- camelCase: function(e) {
- return e.replace(un, "ms-").replace(cn, dn)
- },
- nodeName: function(e, t) {
- return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()
- },
- each: function(e, t, n) {
- var i, r = 0,
- a = e.length,
- o = J(e);
- if (n) {
- if (o) {
- for (; a > r; r++)
- if (i = t.apply(e[r], n), i === !1) break
- } else
- for (r in e)
- if (i = t.apply(e[r], n), i === !1) break
- } else if (o) {
- for (; a > r; r++)
- if (i = t.call(e[r], r, e[r]), i === !1) break
- } else
- for (r in e)
- if (i = t.call(e[r], r, e[r]), i === !1) break; return e
- },
- trim: function(e) {
- return null == e ? "" : (e + "").replace(sn, "")
- },
- makeArray: function(t, n) {
- var r = n || [];
- return null != t && (J(Object(t)) ? e.merge(r, "string" == typeof t ? [t] : t) : X.call(r, t)), r
- },
- inArray: function(e, t, n) {
- var r;
- if (t) {
- if (de) return de.call(t, e, n);
- for (r = t.length, n = n ? 0 > n ? Math.max(0, r + n) : n : 0; r > n; n++)
- if (n in t && t[n] === e) return n
- };
- return -1
- },
- merge: function(e, t) {
- var i = +t.length,
- n = 0,
- r = e.length;
- while (i > n) e[r++] = t[n++];
- if (i !== i)
- while (void 0 !== t[n]) e[r++] = t[n++];
- return e.length = r, e
- },
- grep: function(e, t, n) {
- for (var i, o = [], r = 0, s = e.length, a = !n; s > r; r++) i = !t(e[r], r), i !== a && o.push(e[r]);
- return o
- },
- map: function(e, t, n) {
- var i, r = 0,
- s = e.length,
- a = J(e),
- o = [];
- if (a)
- for (; s > r; r++) i = t(e[r], r, n), null != i && o.push(i);
- else
- for (r in e) i = t(e[r], r, n), null != i && o.push(i);
- return ue.apply([], o)
- },
- guid: 1,
- proxy: function(t, n) {
- var o, r, i;
- return "string" == typeof n && (i = t[n], n = t, t = i), e.isFunction(t) ? (o = f.call(arguments, 2), r = function() {
- return t.apply(n || this, o.concat(f.call(arguments)))
- }, r.guid = t.guid = t.guid || e.guid++, r) : void 0
- },
- now: function() {
- return +new Date
- },
- support: r
- }), e.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t) {
- F["[object " + t + "]"] = t.toLowerCase()
- });
- function J(t) {
- var n = t.length,
- r = e.type(t);
- return "function" === r || e.isWindow(t) ? !1 : 1 === t.nodeType && n ? !0 : "array" === r || 0 === n || "number" == typeof n && n > 0 && n - 1 in t
- };
- var N = function(e) {
- var k, i, t, L, ae, D, Q, se, O, b, N, g, s, p, h, l, w, F, A, a = "sizzle" + -new Date,
- d = e.document,
- f = 0,
- fe = 0,
- ie = P(),
- ne = P(),
- re = P(),
- z = function(e, t) {
- return e === t && (N = !0), 0
- }, S = "undefined",
- oe = 1 << 31,
- ue = {}.hasOwnProperty,
- v = [],
- pe = v.pop,
- Ee = v.push,
- y = v.push,
- te = v.slice,
- C = v.indexOf || function(e) {
- for (var t = 0, n = this.length; n > t; t++)
- if (this[t] === e) return t;
- return -1
- }, J = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
- n = "[\\x20\\t\\r\\n\\f]",
- E = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
- ee = E.replace("w", "w#"),
- le = "\\[" + n + "*(" + E + ")(?:" + n + "*([*^$|!~]?=)" + n + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + ee + "))|)" + n + "*\\]",
- R = ":(" + E + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + le + ")*)|.*)\\)|)",
- H = new RegExp("^" + n + "+|((?:^|[^\\\\])(?:\\\\.)*)" + n + "+$", "g"),
- Ce = new RegExp("^" + n + "*," + n + "*"),
- Ne = new RegExp("^" + n + "*([>+~]|" + n + ")" + n + "*"),
- be = new RegExp("=" + n + "*([^\\]'\"]*?)" + n + "*\\]", "g"),
- xe = new RegExp(R),
- me = new RegExp("^" + ee + "$"),
- B = {
- ID: new RegExp("^#(" + E + ")"),
- CLASS: new RegExp("^\\.(" + E + ")"),
- TAG: new RegExp("^(" + E.replace("w", "w*") + ")"),
- ATTR: new RegExp("^" + le),
- PSEUDO: new RegExp("^" + R),
- CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + n + "*(even|odd|(([+-]|)(\\d*)n|)" + n + "*(?:([+-]|)" + n + "*(\\d+)|))" + n + "*\\)|)", "i"),
- bool: new RegExp("^(?:" + J + ")$", "i"),
- needsContext: new RegExp("^" + n + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + n + "*((?:-\\d)?\\d*)" + n + "*\\)|)(?=[^-]|$)", "i")
- }, ge = /^(?:input|select|textarea|button)$/i,
- ye = /^h\d$/i,
- j = /^[^{]+\{\s*\[native \w/,
- we = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
- W = /[+~]/,
- ve = /'|\\/g,
- x = new RegExp("\\\\([\\da-f]{1,6}" + n + "?|(" + n + ")|.)", "ig"),
- m = function(e, t, n) {
- var r = "0x" + t - 65536;
- return r !== r || n ? t : 0 > r ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
- };
- try {
- y.apply(v = te.call(d.childNodes), d.childNodes), v[d.childNodes.length].nodeType
- } catch (o) {
- y = {
- apply: v.length ? function(e, t) {
- Ee.apply(e, te.call(t))
- } : function(e, t) {
- var n = e.length,
- r = 0;
- while (e[n++] = t[r++]);
- e.length = n - 1
- }
- }
- };
- function r(e, t, n, r) {
- var w, u, c, m, b, p, x, f, T, v;
- if ((t ? t.ownerDocument || t : d) !== s && g(t), t = t || s, n = n || [], !e || "string" != typeof e) return n;
- if (1 !== (m = t.nodeType) && 9 !== m) return [];
- if (h && !r) {
- if (w = we.exec(e))
- if (c = w[1]) {
- if (9 === m) {
- if (u = t.getElementById(c), !u || !u.parentNode) return n;
- if (u.id === c) return n.push(u), n
- } else if (t.ownerDocument && (u = t.ownerDocument.getElementById(c)) && A(t, u) && u.id === c) return n.push(u), n
- } else {
- if (w[2]) return y.apply(n, t.getElementsByTagName(e)), n;
- if ((c = w[3]) && i.getElementsByClassName && t.getElementsByClassName) return y.apply(n, t.getElementsByClassName(c)), n
- };
- if (i.qsa && (!l || !l.test(e))) {
- if (f = x = a, T = t, v = 9 === m && e, 1 === m && "object" !== t.nodeName.toLowerCase()) {
- p = D(e), (x = t.getAttribute("id")) ? f = x.replace(ve, "\\$&") : t.setAttribute("id", f), f = "[id='" + f + "'] ", b = p.length;
- while (b--) p[b] = f + M(p[b]);
- T = W.test(e) && Y(t.parentNode) || t, v = p.join(",")
- };
- if (v) try {
- return y.apply(n, T.querySelectorAll(v)), n
- } catch (o) {} finally {
- x || t.removeAttribute("id")
- }
- }
- };
- return se(e.replace(H, "$1"), t, n, r)
- };
- function P() {
- var n = [];
- function e(r, i) {
- return n.push(r + " ") > t.cacheLength && delete e[n.shift()], e[r + " "] = i
- };
- return e
- };
- function c(e) {
- return e[a] = !0, e
- };
- function u(e) {
- var n = s.createElement("div");
- try {
- return !!e(n)
- } catch (t) {
- return !1
- } finally {
- n.parentNode && n.parentNode.removeChild(n), n = null
- }
- };
- function U(e, n) {
- var i = e.split("|"),
- r = e.length;
- while (r--) t.attrHandle[i[r]] = n
- };
- function Z(e, t) {
- var n = t && e,
- r = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || oe) - (~e.sourceIndex || oe);
- if (r) return r;
- if (n)
- while (n = n.nextSibling)
- if (n === t) return -1;
- return e ? 1 : -1
- };
- function Te(e) {
- return function(t) {
- var n = t.nodeName.toLowerCase();
- return "input" === n && t.type === e
- }
- };
- function he(e) {
- return function(t) {
- var n = t.nodeName.toLowerCase();
- return ("input" === n || "button" === n) && t.type === e
- }
- };
- function T(e) {
- return c(function(t) {
- return t = +t, c(function(n, r) {
- var i, a = e([], n.length, t),
- o = a.length;
- while (o--) n[i = a[o]] && (n[i] = !(r[i] = n[i]))
- })
- })
- };
- function Y(e) {
- return e && typeof e.getElementsByTagName !== S && e
- };
- i = r.support = {}, ae = r.isXML = function(e) {
- var t = e && (e.ownerDocument || e).documentElement;
- return t ? "HTML" !== t.nodeName : !1
- }, g = r.setDocument = function(e) {
- var c, r = e ? e.ownerDocument || e : d,
- o = r.defaultView;
- return r !== s && 9 === r.nodeType && r.documentElement ? (s = r, p = r.documentElement, h = !ae(r), o && o !== o.top && (o.addEventListener ? o.addEventListener("unload", function() {
- g()
- }, !1) : o.attachEvent && o.attachEvent("onunload", function() {
- g()
- })), i.attributes = u(function(e) {
- return e.className = "i", !e.getAttribute("className")
- }), i.getElementsByTagName = u(function(e) {
- return e.appendChild(r.createComment("")), !e.getElementsByTagName("*").length
- }), i.getElementsByClassName = j.test(r.getElementsByClassName) && u(function(e) {
- return e.innerHTML = "<div class='a'></div><div class='a i'></div>", e.firstChild.className = "i", 2 === e.getElementsByClassName("i").length
- }), i.getById = u(function(e) {
- return p.appendChild(e).id = a, !r.getElementsByName || !r.getElementsByName(a).length
- }), i.getById ? (t.find.ID = function(e, t) {
- if (typeof t.getElementById !== S && h) {
- var n = t.getElementById(e);
- return n && n.parentNode ? [n] : []
- }
- }, t.filter.ID = function(e) {
- var t = e.replace(x, m);
- return function(e) {
- return e.getAttribute("id") === t
- }
- }) : (delete t.find.ID, t.filter.ID = function(e) {
- var t = e.replace(x, m);
- return function(e) {
- var n = typeof e.getAttributeNode !== S && e.getAttributeNode("id");
- return n && n.value === t
- }
- }), t.find.TAG = i.getElementsByTagName ? function(e, t) {
- return typeof t.getElementsByTagName !== S ? t.getElementsByTagName(e) : void 0
- } : function(e, t) {
- var n, r = [],
- o = 0,
- i = t.getElementsByTagName(e);
- if ("*" === e) {
- while (n = i[o++]) 1 === n.nodeType && r.push(n);
- return r
- };
- return i
- }, t.find.CLASS = i.getElementsByClassName && function(e, t) {
- return typeof t.getElementsByClassName !== S && h ? t.getElementsByClassName(e) : void 0
- }, w = [], l = [], (i.qsa = j.test(r.querySelectorAll)) && (u(function(e) {
- e.innerHTML = "<select msallowclip=''><option selected=''></option></select>", e.querySelectorAll("[msallowclip^='']").length && l.push("[*^$]=" + n + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || l.push("\\[" + n + "*(?:value|" + J + ")"), e.querySelectorAll(":checked").length || l.push(":checked")
- }), u(function(e) {
- var t = r.createElement("input");
- t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && l.push("name" + n + "*[*^$|!~]?="), e.querySelectorAll(":enabled").length || l.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), l.push(",.*:")
- })), (i.matchesSelector = j.test(F = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.oMatchesSelector || p.msMatchesSelector)) && u(function(e) {
- i.disconnectedMatch = F.call(e, "div"), F.call(e, "[s!='']:x"), w.push("!=", R)
- }), l = l.length && new RegExp(l.join("|")), w = w.length && new RegExp(w.join("|")), c = j.test(p.compareDocumentPosition), A = c || j.test(p.contains) ? function(e, t) {
- var r = 9 === e.nodeType ? e.documentElement : e,
- n = t && t.parentNode;
- return e === n || !(!n || 1 !== n.nodeType || !(r.contains ? r.contains(n) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(n)))
- } : function(e, t) {
- if (t)
- while (t = t.parentNode)
- if (t === e) return !0;
- return !1
- }, z = c ? function(e, t) {
- if (e === t) return N = !0, 0;
- var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
- return n ? n : (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1, 1 & n || !i.sortDetached && t.compareDocumentPosition(e) === n ? e === r || e.ownerDocument === d && A(d, e) ? -1 : t === r || t.ownerDocument === d && A(d, t) ? 1 : b ? C.call(b, e) - C.call(b, t) : 0 : 4 & n ? -1 : 1)
- } : function(e, t) {
- if (e === t) return N = !0, 0;
- var i, n = 0,
- l = e.parentNode,
- s = t.parentNode,
- a = [e],
- o = [t];
- if (!l || !s) return e === r ? -1 : t === r ? 1 : l ? -1 : s ? 1 : b ? C.call(b, e) - C.call(b, t) : 0;
- if (l === s) return Z(e, t);
- i = e;
- while (i = i.parentNode) a.unshift(i);
- i = t;
- while (i = i.parentNode) o.unshift(i);
- while (a[n] === o[n]) n++;
- return n ? Z(a[n], o[n]) : a[n] === d ? -1 : o[n] === d ? 1 : 0
- }, r) : s
- }, r.matches = function(e, t) {
- return r(e, null, null, t)
- }, r.matchesSelector = function(e, t) {
- if ((e.ownerDocument || e) !== s && g(e), t = t.replace(be, "='$1']"), !(!i.matchesSelector || !h || w && w.test(t) || l && l.test(t))) try {
- var o = F.call(e, t);
- if (o || i.disconnectedMatch || e.document && 11 !== e.document.nodeType) return o
- } catch (n) {};
- return r(t, s, null, [e]).length > 0
- }, r.contains = function(e, t) {
- return (e.ownerDocument || e) !== s && g(e), A(e, t)
- }, r.attr = function(e, n) {
- (e.ownerDocument || e) !== s && g(e);
- var o = t.attrHandle[n.toLowerCase()],
- r = o && ue.call(t.attrHandle, n.toLowerCase()) ? o(e, n, !h) : void 0;
- return void 0 !== r ? r : i.attributes || !h ? e.getAttribute(n) : (r = e.getAttributeNode(n)) && r.specified ? r.value : null
- }, r.error = function(e) {
- throw new Error("Syntax error, unrecognized expression: " + e);
- }, r.uniqueSort = function(e) {
- var o, r = [],
- n = 0,
- t = 0;
- if (N = !i.detectDuplicates, b = !i.sortStable && e.slice(0), e.sort(z), N) {
- while (o = e[t++]) o === e[t] && (n = r.push(t));
- while (n--) e.splice(r[n], 1)
- };
- return b = null, e
- }, L = r.getText = function(e) {
- var r, n = "",
- i = 0,
- t = e.nodeType;
- if (t) {
- if (1 === t || 9 === t || 11 === t) {
- if ("string" == typeof e.textContent) return e.textContent;
- for (e = e.firstChild; e; e = e.nextSibling) n += L(e)
- } else if (3 === t || 4 === t) return e.nodeValue
- } else
- while (r = e[i++]) n += L(r);
- return n
- }, t = r.selectors = {
- cacheLength: 50,
- createPseudo: c,
- match: B,
- 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(x, m), e[3] = (e[3] || e[4] || e[5] || "").replace(x, m), "~=" === 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] || r.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] && r.error(e[0]), e
- },
- PSEUDO: function(e) {
- var n, t = !e[6] && e[2];
- return B.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : t && xe.test(t) && (n = D(t, !0)) && (n = t.indexOf(")", t.length - n) - t.length) && (e[0] = e[0].slice(0, n), e[2] = t.slice(0, n)), e.slice(0, 3))
- }
- },
- filter: {
- TAG: function(e) {
- var t = e.replace(x, m).toLowerCase();
- return "*" === e ? function() {
- return !0
- } : function(e) {
- return e.nodeName && e.nodeName.toLowerCase() === t
- }
- },
- CLASS: function(e) {
- var t = ie[e + " "];
- return t || (t = new RegExp("(^|" + n + ")" + e + "(" + n + "|$)")) && ie(e, function(e) {
- return t.test("string" == typeof e.className && e.className || typeof e.getAttribute !== S && e.getAttribute("class") || "")
- })
- },
- ATTR: function(e, t, n) {
- return function(i) {
- var o = r.attr(i, e);
- return null == o ? "!=" === t : t ? (o += "", "=" === t ? o === n : "!=" === t ? o !== n : "^=" === t ? n && 0 === o.indexOf(n) : "*=" === t ? n && o.indexOf(n) > -1 : "$=" === t ? n && o.slice(-n.length) === n : "~=" === t ? (" " + o + " ").indexOf(n) > -1 : "|=" === t ? o === n || o.slice(0, n.length + 1) === n + "-" : !1) : !0
- }
- },
- CHILD: function(e, t, n, r, i) {
- var l = "nth" !== e.slice(0, 3),
- s = "last" !== e.slice(-4),
- o = "of-type" === t;
- return 1 === r && 0 === i ? function(e) {
- return !!e.parentNode
- } : function(t, n, u) {
- var h, y, c, d, p, v, g = l !== s ? "nextSibling" : "previousSibling",
- m = t.parentNode,
- b = o && t.nodeName.toLowerCase(),
- x = !u && !o;
- if (m) {
- if (l) {
- while (g) {
- c = t;
- while (c = c[g])
- if (o ? c.nodeName.toLowerCase() === b : 1 === c.nodeType) return !1;
- v = g = "only" === e && !v && "nextSibling"
- };
- return !0
- };
- if (v = [s ? m.firstChild : m.lastChild], s && x) {
- y = m[a] || (m[a] = {}), h = y[e] || [], p = h[0] === f && h[1], d = h[0] === f && h[2], c = p && m.childNodes[p];
- while (c = ++p && c && c[g] || (d = p = 0) || v.pop())
- if (1 === c.nodeType && ++d && c === t) {
- y[e] = [f, p, d];
- break
- }
- } else if (x && (h = (t[a] || (t[a] = {}))[e]) && h[0] === f) d = h[1];
- else
- while (c = ++p && c && c[g] || (d = p = 0) || v.pop())
- if ((o ? c.nodeName.toLowerCase() === b : 1 === c.nodeType) && ++d && (x && ((c[a] || (c[a] = {}))[e] = [f, d]), c === t)) break; return d -= i, d === r || d % r === 0 && d / r >= 0
- }
- }
- },
- PSEUDO: function(e, n) {
- var o, i = t.pseudos[e] || t.setFilters[e.toLowerCase()] || r.error("unsupported pseudo: " + e);
- return i[a] ? i(n) : i.length > 1 ? (o = [e, e, "", n], t.setFilters.hasOwnProperty(e.toLowerCase()) ? c(function(e, t) {
- var o, a = i(e, n),
- r = a.length;
- while (r--) o = C.call(e, a[r]), e[o] = !(t[o] = a[r])
- }) : function(e) {
- return i(e, 0, o)
- }) : i
- }
- },
- pseudos: {
- not: c(function(e) {
- var n = [],
- r = [],
- t = Q(e.replace(H, "$1"));
- return t[a] ? c(function(e, n, r, i) {
- var a, s = t(e, null, i, []),
- o = e.length;
- while (o--)(a = s[o]) && (e[o] = !(n[o] = a))
- }) : function(e, i, o) {
- return n[0] = e, t(n, null, o, r), !r.pop()
- }
- }),
- has: c(function(e) {
- return function(t) {
- return r(e, t).length > 0
- }
- }),
- contains: c(function(e) {
- return function(t) {
- return (t.textContent || t.innerText || L(t)).indexOf(e) > -1
- }
- }),
- lang: c(function(e) {
- return me.test(e || "") || r.error("unsupported lang: " + e), e = e.replace(x, m).toLowerCase(),
- function(t) {
- var n;
- do
- if (n = h ? 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 === p
- },
- focus: function(e) {
- return e === s.activeElement && (!s.hasFocus || s.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 !t.pseudos.empty(e)
- },
- header: function(e) {
- return ye.test(e.nodeName)
- },
- input: function(e) {
- return ge.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: T(function() {
- return [0]
- }),
- last: T(function(e, t) {
- return [t - 1]
- }),
- eq: T(function(e, t, n) {
- return [0 > n ? n + t : n]
- }),
- even: T(function(e, t) {
- for (var n = 0; t > n; n += 2) e.push(n);
- return e
- }),
- odd: T(function(e, t) {
- for (var n = 1; t > n; n += 2) e.push(n);
- return e
- }),
- lt: T(function(e, t, n) {
- for (var r = 0 > n ? n + t : n; --r >= 0;) e.push(r);
- return e
- }),
- gt: T(function(e, t, n) {
- for (var r = 0 > n ? n + t : n; ++r < t;) e.push(r);
- return e
- })
- }
- }, t.pseudos.nth = t.pseudos.eq;
- for (k in {
- radio: !0,
- checkbox: !0,
- file: !0,
- password: !0,
- image: !0
- }) t.pseudos[k] = Te(k);
- for (k in {
- submit: !0,
- reset: !0
- }) t.pseudos[k] = he(k);
- function K() {};
- K.prototype = t.filters = t.pseudos, t.setFilters = new K, D = r.tokenize = function(e, n) {
- var a, o, u, s, i, c, l, d = ne[e + " "];
- if (d) return n ? 0 : d.slice(0);
- i = e, c = [], l = t.preFilter;
- while (i) {
- (!a || (o = Ce.exec(i))) && (o && (i = i.slice(o[0].length) || i), c.push(u = [])), a = !1, (o = Ne.exec(i)) && (a = o.shift(), u.push({
- value: a,
- type: o[0].replace(H, " ")
- }), i = i.slice(a.length));
- for (s in t.filter)!(o = B[s].exec(i)) || l[s] && !(o = l[s](o)) || (a = o.shift(), u.push({
- value: a,
- type: s,
- matches: o
- }), i = i.slice(a.length));
- if (!a) break
- };
- return n ? i.length : i ? r.error(e) : ne(e, c).slice(0)
- };
- function M(e) {
- for (var t = 0, r = e.length, n = ""; r > t; t++) n += e[t].value;
- return n
- };
- function I(e, t, n) {
- var r = t.dir,
- i = n && "parentNode" === r,
- o = fe++;
- return t.first ? function(t, n, o) {
- while (t = t[r])
- if (1 === t.nodeType || i) return e(t, n, o)
- } : function(t, n, s) {
- var l, c, u = [f, o];
- if (s) {
- while (t = t[r])
- if ((1 === t.nodeType || i) && e(t, n, s)) return !0
- } else
- while (t = t[r])
- if (1 === t.nodeType || i) {
- if (c = t[a] || (t[a] = {}), (l = c[r]) && l[0] === f && l[1] === o) return u[2] = l[2];
- if (c[r] = u, u[2] = e(t, n, s)) return !0
- }
- }
- };
- function X(e) {
- return e.length > 1 ? function(t, n, r) {
- var i = e.length;
- while (i--)
- if (!e[i](t, n, r)) return !1;
- return !0
- } : e[0]
- };
- function ce(e, t, n) {
- for (var i = 0, o = t.length; o > i; i++) r(e, t[i], n);
- return n
- };
- function q(e, t, n, r, i) {
- for (var a, s = [], o = 0, u = e.length, l = null != t; u > o; o++)(a = e[o]) && (!n || n(a, r, i)) && (s.push(a), l && t.push(o));
- return s
- };
- function V(e, t, n, r, i, o) {
- return r && !r[a] && (r = V(r)), i && !i[a] && (i = V(i, o)), c(function(o, a, s, l) {
- var d, c, f, m = [],
- h = [],
- v = a.length,
- g = o || ce(t || "*", s.nodeType ? [s] : s, []),
- p = !e || !o && t ? g : q(g, m, e, s, l),
- u = n ? i || (o ? e : v || r) ? [] : a : p;
- if (n && n(p, u, s, l), r) {
- d = q(u, h), r(d, [], s, l), c = d.length;
- while (c--)(f = d[c]) && (u[h[c]] = !(p[h[c]] = f))
- };
- if (o) {
- if (i || e) {
- if (i) {
- d = [], c = u.length;
- while (c--)(f = u[c]) && d.push(p[c] = f);
- i(null, u = [], d, l)
- };
- c = u.length;
- while (c--)(f = u[c]) && (d = i ? C.call(o, f) : m[c]) > -1 && (o[d] = !(a[d] = f))
- }
- } else u = q(u === a ? u.splice(v, u.length) : u), i ? i(null, a, u, l) : y.apply(a, u)
- })
- };
- function G(e) {
- for (var u, i, r, s = e.length, l = t.relative[e[0].type], c = l || t.relative[" "], n = l ? 1 : 0, d = I(function(e) {
- return e === u
- }, c, !0), f = I(function(e) {
- return C.call(u, e) > -1
- }, c, !0), o = [
- function(e, t, n) {
- return !l && (n || t !== O) || ((u = t).nodeType ? d(e, t, n) : f(e, t, n))
- }
- ]; s > n; n++)
- if (i = t.relative[e[n].type]) o = [I(X(o), i)];
- else {
- if (i = t.filter[e[n].type].apply(null, e[n].matches), i[a]) {
- for (r = ++n; s > r; r++)
- if (t.relative[e[r].type]) break;
- return V(n > 1 && X(o), n > 1 && M(e.slice(0, n - 1).concat({
- value: " " === e[n - 2].type ? "*" : ""
- })).replace(H, "$1"), i, r > n && G(e.slice(n, r)), s > r && G(e = e.slice(r)), s > r && M(e))
- };
- o.push(i)
- };
- return X(o)
- };
- function de(e, n) {
- var i = n.length > 0,
- a = e.length > 0,
- o = function(o, l, u, c, d) {
- var h, x, g, v = 0,
- p = "0",
- b = o && [],
- m = [],
- T = O,
- C = o || a && t.find.TAG("*", d),
- w = f += null == T ? 1 : Math.random() || .1,
- N = C.length;
- for (d && (O = l !== s && l); p !== N && null != (h = C[p]); p++) {
- if (a && h) {
- x = 0;
- while (g = e[x++])
- if (g(h, l, u)) {
- c.push(h);
- break
- };
- d && (f = w)
- };
- i && ((h = !g && h) && v--, o && b.push(h))
- };
- if (v += p, i && p !== v) {
- x = 0;
- while (g = n[x++]) g(b, m, l, u);
- if (o) {
- if (v > 0)
- while (p--) b[p] || m[p] || (m[p] = pe.call(c));
- m = q(m)
- };
- y.apply(c, m), d && !o && m.length > 0 && v + n.length > 1 && r.uniqueSort(c)
- };
- return d && (f = w, O = T), b
- };
- return i ? c(o) : o
- };
- return Q = r.compile = function(e, t) {
- var r, i = [],
- o = [],
- n = re[e + " "];
- if (!n) {
- t || (t = D(e)), r = t.length;
- while (r--) n = G(t[r]), n[a] ? i.push(n) : o.push(n);
- n = re(e, de(o, i)), n.selector = e
- };
- return n
- }, se = r.select = function(e, n, r, o) {
- var u, a, s, d, f, c = "function" == typeof e && e,
- l = !o && D(e = c.selector || e);
- if (r = r || [], 1 === l.length) {
- if (a = l[0] = l[0].slice(0), a.length > 2 && "ID" === (s = a[0]).type && i.getById && 9 === n.nodeType && h && t.relative[a[1].type]) {
- if (n = (t.find.ID(s.matches[0].replace(x, m), n) || [])[0], !n) return r;
- c && (n = n.parentNode), e = e.slice(a.shift().value.length)
- };
- u = B.needsContext.test(e) ? 0 : a.length;
- while (u--) {
- if (s = a[u], t.relative[d = s.type]) break;
- if ((f = t.find[d]) && (o = f(s.matches[0].replace(x, m), W.test(a[0].type) && Y(n.parentNode) || n))) {
- if (a.splice(u, 1), e = o.length && M(a), !e) return y.apply(r, o), r;
- break
- }
- }
- };
- return (c || Q(e, l))(o, n, !h, r, W.test(e) && Y(n.parentNode) || n), r
- }, i.sortStable = a.split("").sort(z).join("") === a, i.detectDuplicates = !! N, g(), i.sortDetached = u(function(e) {
- return 1 & e.compareDocumentPosition(s.createElement("div"))
- }), u(function(e) {
- return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
- }) || U("type|href|height|width", function(e, t, n) {
- return n ? void 0 : e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
- }), i.attributes && u(function(e) {
- return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
- }) || U("value", function(e, t, n) {
- return n || "input" !== e.nodeName.toLowerCase() ? void 0 : e.defaultValue
- }), u(function(e) {
- return null == e.getAttribute("disabled")
- }) || U(J, function(e, t, n) {
- var r;
- return n ? void 0 : e[t] === !0 ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
- }), r
- }(t);
- e.find = N, e.expr = N.selectors, e.expr[":"] = e.expr.pseudos, e.unique = N.uniqueSort, e.text = N.getText, e.isXMLDoc = N.isXML, e.contains = N.contains;
- var fe = e.expr.match.needsContext,
- ce = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
- Mt = /^.[^:#\[\.,]*$/;
- function U(t, n, r) {
- if (e.isFunction(n)) return e.grep(t, function(e, t) {
- return !!n.call(e, t, e) !== r
- });
- if (n.nodeType) return e.grep(t, function(e) {
- return e === n !== r
- });
- if ("string" == typeof n) {
- if (Mt.test(n)) return e.filter(n, t, r);
- n = e.filter(n, t)
- };
- return e.grep(t, function(t) {
- return e.inArray(t, n) >= 0 !== r
- })
- };
- e.filter = function(t, n, r) {
- var i = n[0];
- return r && (t = ":not(" + t + ")"), 1 === n.length && 1 === i.nodeType ? e.find.matchesSelector(i, t) ? [i] : [] : e.find.matches(t, e.grep(n, function(e) {
- return 1 === e.nodeType
- }))
- }, e.fn.extend({
- find: function(t) {
- var n, r = [],
- o = this,
- i = o.length;
- if ("string" != typeof t) return this.pushStack(e(t).filter(function() {
- for (n = 0; i > n; n++)
- if (e.contains(o[n], this)) return !0
- }));
- for (n = 0; i > n; n++) e.find(t, o[n], r);
- return r = this.pushStack(i > 1 ? e.unique(r) : r), r.selector = this.selector ? this.selector + " " + t : t, r
- },
- filter: function(e) {
- return this.pushStack(U(this, e || [], !1))
- },
- not: function(e) {
- return this.pushStack(U(this, e || [], !0))
- },
- is: function(t) {
- return !!U(this, "string" == typeof t && fe.test(t) ? e(t) : t || [], !1).length
- }
- });
- var D, i = t.document,
- Yt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
- zt = e.fn.init = function(t, n) {
- var r, o;
- if (!t) return this;
- if ("string" == typeof t) {
- if (r = "<" === t.charAt(0) && ">" === t.charAt(t.length - 1) && t.length >= 3 ? [null, t, null] : Yt.exec(t), !r || !r[1] && n) return !n || n.jquery ? (n || D).find(t) : this.constructor(n).find(t);
- if (r[1]) {
- if (n = n instanceof e ? n[0] : n, e.merge(this, e.parseHTML(r[1], n && n.nodeType ? n.ownerDocument || n : i, !0)), ce.test(r[1]) && e.isPlainObject(n))
- for (r in n) e.isFunction(this[r]) ? this[r](n[r]) : this.attr(r, n[r]);
- return this
- };
- if (o = i.getElementById(r[2]), o && o.parentNode) {
- if (o.id !== r[2]) return D.find(t);
- this.length = 1, this[0] = o
- };
- return this.context = i, this.selector = t, this
- };
- return t.nodeType ? (this.context = this[0] = t, this.length = 1, this) : e.isFunction(t) ? "undefined" != typeof D.ready ? D.ready(t) : t(e) : (void 0 !== t.selector && (this.selector = t.selector, this.context = t.context), e.makeArray(t, this))
- };
- zt.prototype = e.fn, D = e(i);
- var Vt = /^(?:parents|prev(?:Until|All))/,
- Ut = {
- children: !0,
- contents: !0,
- next: !0,
- prev: !0
- };
- e.extend({
- dir: function(t, n, r) {
- var o = [],
- i = t[n];
- while (i && 9 !== i.nodeType && (void 0 === r || 1 !== i.nodeType || !e(i).is(r))) 1 === i.nodeType && o.push(i), i = i[n];
- return o
- },
- sibling: function(e, t) {
- for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
- return n
- }
- }), e.fn.extend({
- has: function(t) {
- var n, r = e(t, this),
- i = r.length;
- return this.filter(function() {
- for (n = 0; i > n; n++)
- if (e.contains(this, r[n])) return !0
- })
- },
- closest: function(t, n) {
- for (var r, o = 0, s = this.length, i = [], a = fe.test(t) || "string" != typeof t ? e(t, n || this.context) : 0; s > o; o++)
- for (r = this[o]; r && r !== n; r = r.parentNode)
- if (r.nodeType < 11 && (a ? a.index(r) > -1 : 1 === r.nodeType && e.find.matchesSelector(r, t))) {
- i.push(r);
- break
- };
- return this.pushStack(i.length > 1 ? e.unique(i) : i)
- },
- index: function(t) {
- return t ? "string" == typeof t ? e.inArray(this[0], e(t)) : e.inArray(t.jquery ? t[0] : t, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
- },
- add: function(t, n) {
- return this.pushStack(e.unique(e.merge(this.get(), e(t, n))))
- },
- addBack: function(e) {
- return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
- }
- });
- function He(e, t) {
- do e = e[t]; while (e && 1 !== e.nodeType);
- return e
- };
- e.each({
- parent: function(e) {
- var t = e.parentNode;
- return t && 11 !== t.nodeType ? t : null
- },
- parents: function(t) {
- return e.dir(t, "parentNode")
- },
- parentsUntil: function(t, n, r) {
- return e.dir(t, "parentNode", r)
- },
- next: function(e) {
- return He(e, "nextSibling")
- },
- prev: function(e) {
- return He(e, "previousSibling")
- },
- nextAll: function(t) {
- return e.dir(t, "nextSibling")
- },
- prevAll: function(t) {
- return e.dir(t, "previousSibling")
- },
- nextUntil: function(t, n, r) {
- return e.dir(t, "nextSibling", r)
- },
- prevUntil: function(t, n, r) {
- return e.dir(t, "previousSibling", r)
- },
- siblings: function(t) {
- return e.sibling((t.parentNode || {}).firstChild, t)
- },
- children: function(t) {
- return e.sibling(t.firstChild)
- },
- contents: function(t) {
- return e.nodeName(t, "iframe") ? t.contentDocument || t.contentWindow.document : e.merge([], t.childNodes)
- }
- }, function(t, n) {
- e.fn[t] = function(r, i) {
- var o = e.map(this, n, r);
- return "Until" !== t.slice(-5) && (i = r), i && "string" == typeof i && (o = e.filter(i, o)), this.length > 1 && (Ut[t] || (o = e.unique(o)), Vt.test(t) && (o = o.reverse())), this.pushStack(o)
- }
- });
- var c = /\S+/g,
- pe = {};
- function on(t) {
- var n = pe[t] = {};
- return e.each(t.match(c) || [], function(e, t) {
- n[t] = !0
- }), n
- };
- e.Callbacks = function(t) {
- t = "string" == typeof t ? pe[t] || on(t) : e.extend({}, t);
- var s, i, c, a, o, d, n = [],
- r = !t.once && [],
- u = function(e) {
- for (i = t.memory && e, c = !0, o = d || 0, d = 0, a = n.length, s = !0; n && a > o; o++)
- if (n[o].apply(e[0], e[1]) === !1 && t.stopOnFalse) {
- i = !1;
- break
- };
- s = !1, n && (r ? r.length && u(r.shift()) : i ? n = [] : l.disable())
- }, l = {
- add: function() {
- if (n) {
- var r = n.length;
- ! function o(r) {
- e.each(r, function(r, i) {
- var a = e.type(i);
- "function" === a ? t.unique && l.has(i) || n.push(i) : i && i.length && "string" !== a && o(i)
- })
- }(arguments), s ? a = n.length : i && (d = r, u(i))
- };
- return this
- },
- remove: function() {
- return n && e.each(arguments, function(t, r) {
- var i;
- while ((i = e.inArray(r, n, i)) > -1) n.splice(i, 1), s && (a >= i && a--, o >= i && o--)
- }), this
- },
- has: function(t) {
- return t ? e.inArray(t, n) > -1 : !(!n || !n.length)
- },
- empty: function() {
- return n = [], a = 0, this
- },
- disable: function() {
- return n = r = i = void 0, this
- },
- disabled: function() {
- return !n
- },
- lock: function() {
- return r = void 0, i || l.disable(), this
- },
- locked: function() {
- return !r
- },
- fireWith: function(e, t) {
- return !n || c && !r || (t = t || [], t = [e, t.slice ? t.slice() : t], s ? r.push(t) : u(t)), this
- },
- fire: function() {
- return l.fireWith(this, arguments), this
- },
- fired: function() {
- return !!c
- }
- };
- return l
- }, e.extend({
- Deferred: function(t) {
- var i = [
- ["resolve", "done", e.Callbacks("once memory"), "resolved"],
- ["reject", "fail", e.Callbacks("once memory"), "rejected"],
- ["notify", "progress", e.Callbacks("memory")]
- ],
- o = "pending",
- r = {
- state: function() {
- return o
- },
- always: function() {
- return n.done(arguments).fail(arguments), this
- },
- then: function() {
- var t = arguments;
- return e.Deferred(function(o) {
- e.each(i, function(i, a) {
- var s = e.isFunction(t[i]) && t[i];
- n[a[1]](function() {
- var t = s && s.apply(this, arguments);
- t && e.isFunction(t.promise) ? t.promise().done(o.resolve).fail(o.reject).progress(o.notify) : o[a[0] + "With"](this === r ? o.promise() : this, s ? [t] : arguments)
- })
- }), t = null
- }).promise()
- },
- promise: function(t) {
- return null != t ? e.extend(t, r) : r
- }
- }, n = {};
- return r.pipe = r.then, e.each(i, function(e, t) {
- var a = t[2],
- s = t[3];
- r[t[1]] = a.add, s && a.add(function() {
- o = s
- }, i[1 ^ e][2].disable, i[2][2].lock), n[t[0]] = function() {
- return n[t[0] + "With"](this === n ? r : this, arguments), this
- }, n[t[0] + "With"] = a.fireWith
- }), r.promise(n), t && t.call(n, n), n
- },
- when: function(t) {
- var n = 0,
- i = f.call(arguments),
- r = i.length,
- a = 1 !== r || t && e.isFunction(t.promise) ? r : 0,
- o = 1 === a ? t : e.Deferred(),
- u = function(e, t, n) {
- return function(r) {
- t[e] = this, n[e] = arguments.length > 1 ? f.call(arguments) : r, n === l ? o.notifyWith(t, n) : --a || o.resolveWith(t, n)
- }
- }, l, c, s;
- if (r > 1)
- for (l = new Array(r), c = new Array(r), s = new Array(r); r > n; n++) i[n] && e.isFunction(i[n].promise) ? i[n].promise().done(u(n, s, i)).fail(o.reject).progress(u(n, c, l)) : --a;
- return a || o.resolveWith(s, i), o.promise()
- }
- });
- var O;
- e.fn.ready = function(t) {
- return e.ready.promise().done(t), this
- }, e.extend({
- isReady: !1,
- readyWait: 1,
- holdReady: function(t) {
- t ? e.readyWait++ : e.ready(!0)
- },
- ready: function(t) {
- if (t === !0 ? !--e.readyWait : !e.isReady) {
- if (!i.body) return setTimeout(e.ready);
- e.isReady = !0, t !== !0 && --e.readyWait > 0 || (O.resolveWith(i, [e]), e.fn.triggerHandler && (e(i).triggerHandler("ready"), e(i).off("ready")))
- }
- }
- });
- function Le() {
- i.addEventListener ? (i.removeEventListener("DOMContentLoaded", h, !1), t.removeEventListener("load", h, !1)) : (i.detachEvent("onreadystatechange", h), t.detachEvent("onload", h))
- };
- function h() {
- (i.addEventListener || "load" === event.type || "complete" === i.readyState) && (Le(), e.ready())
- };
- e.ready.promise = function(n) {
- if (!O)
- if (O = e.Deferred(), "complete" === i.readyState) setTimeout(e.ready);
- else if (i.addEventListener) i.addEventListener("DOMContentLoaded", h, !1), t.addEventListener("load", h, !1);
- else {
- i.attachEvent("onreadystatechange", h), t.attachEvent("onload", h);
- var o = !1;
- try {
- o = null == t.frameElement && i.documentElement
- } catch (r) {};
- o && o.doScroll && ! function a() {
- if (!e.isReady) {
- try {
- o.doScroll("left")
- } catch (t) {
- return setTimeout(a, 50)
- };
- Le(), e.ready()
- }
- }()
- };
- return O.promise(n)
- };
- var u = "undefined",
- et;
- for (et in e(r)) break;
- r.ownLast = "0" !== et, r.inlineBlockNeedsLayout = !1, e(function() {
- var o, t, e, n;
- e = i.getElementsByTagName("body")[0], e && e.style && (t = i.createElement("div"), n = i.createElement("div"), n.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", e.appendChild(n).appendChild(t), typeof t.style.zoom !== u && (t.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1", r.inlineBlockNeedsLayout = o = 3 === t.offsetWidth, o && (e.style.zoom = 1)), e.removeChild(n))
- }),
- function() {
- var t = i.createElement("div");
- if (null == r.deleteExpando) {
- r.deleteExpando = !0;
- try {
- delete t.test
- } catch (e) {
- r.deleteExpando = !1
- }
- };
- t = null
- }(), e.acceptData = function(t) {
- var n = e.noData[(t.nodeName + " ").toLowerCase()],
- r = +t.nodeType || 1;
- return 1 !== r && 9 !== r ? !1 : !n || n !== !0 && t.getAttribute("classid") === n
- };
- var It = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- Xt = /([A-Z])/g;
- function De(t, n, r) {
- if (void 0 === r && 1 === t.nodeType) {
- var o = "data-" + n.replace(Xt, "-$1").toLowerCase();
- if (r = t.getAttribute(o), "string" == typeof r) {
- try {
- r = "true" === r ? !0 : "false" === r ? !1 : "null" === r ? null : +r + "" === r ? +r : It.test(r) ? e.parseJSON(r) : r
- } catch (i) {};
- e.data(t, n, r)
- } else r = void 0
- };
- return r
- };
- function Y(t) {
- var n;
- for (n in t)
- if (("data" !== n || !e.isEmptyObject(t[n])) && "toJSON" !== n) return !1;
- return !0
- };
- function Ae(t, n, r, i) {
- if (e.acceptData(t)) {
- var l, a, u = e.expando,
- c = t.nodeType,
- s = c ? e.cache : t,
- o = c ? t[u] : t[u] && u;
- if (o && s[o] && (i || s[o].data) || void 0 !== r || "string" != typeof n) return o || (o = c ? t[u] = m.pop() || e.guid++ : u), s[o] || (s[o] = c ? {} : {
- toJSON: e.noop
- }), ("object" == typeof n || "function" == typeof n) && (i ? s[o] = e.extend(s[o], n) : s[o].data = e.extend(s[o].data, n)), a = s[o], i || (a.data || (a.data = {}), a = a.data), void 0 !== r && (a[e.camelCase(n)] = r), "string" == typeof n ? (l = a[n], null == l && (l = a[e.camelCase(n)])) : l = a, l
- }
- };
- function je(t, n, i) {
- if (e.acceptData(t)) {
- var s, l, u = t.nodeType,
- o = u ? e.cache : t,
- a = u ? t[e.expando] : e.expando;
- if (o[a]) {
- if (n && (s = i ? o[a] : o[a].data)) {
- e.isArray(n) ? n = n.concat(e.map(n, e.camelCase)) : n in s ? n = [n] : (n = e.camelCase(n), n = n in s ? [n] : n.split(" ")), l = n.length;
- while (l--) delete s[n[l]];
- if (i ? !Y(s) : !e.isEmptyObject(s)) return
- }(i || (delete o[a].data, Y(o[a]))) && (u ? e.cleanData([t], !0) : r.deleteExpando || o != o.window ? delete o[a] : o[a] = null)
- }
- }
- };
- e.extend({
- cache: {},
- noData: {
- "applet ": !0,
- "embed ": !0,
- "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
- },
- hasData: function(t) {
- return t = t.nodeType ? e.cache[t[e.expando]] : t[e.expando], !! t && !Y(t)
- },
- data: function(e, t, n) {
- return Ae(e, t, n)
- },
- removeData: function(e, t) {
- return je(e, t)
- },
- e$: function(e, t, n) {
- return Ae(e, t, n, !0)
- },
- n$: function(e, t) {
- return je(e, t, !0)
- }
- }), e.fn.extend({
- data: function(t, n) {
- var o, i, s, r = this[0],
- a = r && r.attributes;
- if (void 0 === t) {
- if (this.length && (s = e.data(r), 1 === r.nodeType && !e.e$(r, "parsedAttrs"))) {
- o = a.length;
- while (o--) a[o] && (i = a[o].name, 0 === i.indexOf("data-") && (i = e.camelCase(i.slice(5)), De(r, i, s[i])));
- e.e$(r, "parsedAttrs", !0)
- };
- return s
- };
- return "object" == typeof t ? this.each(function() {
- e.data(this, t)
- }) : arguments.length > 1 ? this.each(function() {
- e.data(this, t, n)
- }) : r ? De(r, t, e.data(r, t)) : void 0
- },
- removeData: function(t) {
- return this.each(function() {
- e.removeData(this, t)
- })
- }
- }), e.extend({
- queue: function(t, n, r) {
- var i;
- return t ? (n = (n || "fx") + "queue", i = e.e$(t, n), r && (!i || e.isArray(r) ? i = e.e$(t, n, e.makeArray(r)) : i.push(r)), i || []) : void 0
- },
- dequeue: function(t, n) {
- n = n || "fx";
- var i = e.queue(t, n),
- a = i.length,
- r = i.shift(),
- o = e.r$(t, n),
- s = function() {
- e.dequeue(t, n)
- };
- "inprogress" === r && (r = i.shift(), a--), r && ("fx" === n && i.unshift("inprogress"), delete o.stop, r.call(t, s, o)), !a && o && o.empty.fire()
- },
- r$: function(t, n) {
- var r = n + "queueHooks";
- return e.e$(t, r) || e.e$(t, r, {
- empty: e.Callbacks("once memory").add(function() {
- e.n$(t, n + "queue"), e.n$(t, r)
- })
- })
- }
- }), e.fn.extend({
- queue: function(t, n) {
- var r = 2;
- return "string" != typeof t && (n = t, t = "fx", r--), arguments.length < r ? e.queue(this[0], t) : void 0 === n ? this : this.each(function() {
- var r = e.queue(this, t, n);
- e.r$(this, t), "fx" === t && "inprogress" !== r[0] && e.dequeue(this, t)
- })
- },
- dequeue: function(t) {
- return this.each(function() {
- e.dequeue(this, t)
- })
- },
- clearQueue: function(e) {
- return this.queue(e || "fx", [])
- },
- promise: function(t, n) {
- var r, s = 1,
- l = e.Deferred(),
- i = this,
- a = this.length,
- o = function() {
- --s || l.resolveWith(i, [i])
- };
- "string" != typeof t && (n = t, t = void 0), t = t || "fx";
- while (a--) r = e.e$(i[a], t + "queueHooks"), r && r.empty && (s++, r.empty.add(o));
- return o(), l.promise(n)
- }
- });
- var W = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- b = ["Top", "Right", "Bottom", "Left"],
- L = function(t, n) {
- return t = n || t, "none" === e.css(t, "display") || !e.contains(t.ownerDocument, t)
- }, v = e.access = function(t, n, r, i, o, l, u) {
- var a = 0,
- c = t.length,
- s = null == r;
- if ("object" === e.type(r)) {
- o = !0;
- for (a in r) e.access(t, n, a, r[a], !0, l, u)
- } else if (void 0 !== i && (o = !0, e.isFunction(i) || (u = !0), s && (u ? (n.call(t, i), n = null) : (s = n, n = function(t, n, r) {
- return s.call(e(t), r)
- })), n))
- for (; c > a; a++) n(t[a], r, u ? i : i.call(t[a], a, n(t[a], r)));
- return o ? t : s ? n.call(t) : c ? n(t[0], r) : l
- }, Z = /^(?:checkbox|radio)$/i;
- ! function() {
- var n = i.createElement("input"),
- t = i.createElement("div"),
- o = i.createDocumentFragment();
- if (t.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", r.leadingWhitespace = 3 === t.firstChild.nodeType, r.tbody = !t.getElementsByTagName("tbody").length, r.htmlSerialize = !! t.getElementsByTagName("link").length, r.html5Clone = "<:nav></:nav>" !== i.createElement("nav").cloneNode(!0).outerHTML, n.type = "checkbox", n.checked = !0, o.appendChild(n), r.appendChecked = n.checked, t.innerHTML = "<textarea>x</textarea>", r.noCloneChecked = !! t.cloneNode(!0).lastChild.defaultValue, o.appendChild(t), t.innerHTML = "<input type='radio' checked='checked' name='t'/>", r.checkClone = t.cloneNode(!0).cloneNode(!0).lastChild.checked, r.noCloneEvent = !0, t.attachEvent && (t.attachEvent("onclick", function() {
- r.noCloneEvent = !1
- }), t.cloneNode(!0).click()), null == r.deleteExpando) {
- r.deleteExpando = !0;
- try {
- delete t.test
- } catch (e) {
- r.deleteExpando = !1
- }
- }
- }(),
- function() {
- var e, n, o = i.createElement("div");
- for (e in {
- submit: !0,
- change: !0,
- focusin: !0
- }) n = "on" + e, (r[e + "Bubbles"] = n in t) || (o.setAttribute(n, "t"), r[e + "Bubbles"] = o.attributes[n].expando === !1);
- o = null
- }();
- var G = /^(?:input|select|textarea)$/i,
- Wt = /^key/,
- Jt = /^(?:mouse|pointer|contextmenu)|click/,
- at = /^(?:focusinfocus|focusoutblur)$/,
- We = /^([^.]*)(?:\.(.+)|)$/;
- function P() {
- return !0
- };
- function E() {
- return !1
- };
- function he() {
- try {
- return i.activeElement
- } catch (e) {}
- };
- e.event = {
- global: {},
- add: function(t, n, r, i, o) {
- var g, m, y, h, s, l, f, d, a, v, x, p = e.e$(t);
- if (p) {
- r.handler && (h = r, r = h.handler, o = h.selector), r.guid || (r.guid = e.guid++), (m = p.events) || (m = p.events = {}), (l = p.handle) || (l = p.handle = function(t) {
- return typeof e === u || t && e.event.triggered === t.type ? void 0 : e.event.dispatch.apply(l.elem, arguments)
- }, l.elem = t), n = (n || "").match(c) || [""], y = n.length;
- while (y--) g = We.exec(n[y]) || [], a = x = g[1], v = (g[2] || "").split(".").sort(), a && (s = e.event.special[a] || {}, a = (o ? s.delegateType : s.bindType) || a, s = e.event.special[a] || {}, f = e.extend({
- type: a,
- origType: x,
- data: i,
- handler: r,
- guid: r.guid,
- selector: o,
- needsContext: o && e.expr.match.needsContext.test(o),
- namespace: v.join(".")
- }, h), (d = m[a]) || (d = m[a] = [], d.delegateCount = 0, s.setup && s.setup.call(t, i, v, l) !== !1 || (t.addEventListener ? t.addEventListener(a, l, !1) : t.attachEvent && t.attachEvent("on" + a, l))), s.add && (s.add.call(t, f), f.handler.guid || (f.handler.guid = r.guid)), o ? d.splice(d.delegateCount++, 0, f) : d.push(f), e.event.global[a] = !0);
- t = null
- }
- },
- remove: function(t, n, r, i, o) {
- var m, s, u, v, h, p, l, d, a, g, y, f = e.hasData(t) && e.e$(t);
- if (f && (p = f.events)) {
- n = (n || "").match(c) || [""], h = n.length;
- while (h--)
- if (u = We.exec(n[h]) || [], a = y = u[1], g = (u[2] || "").split(".").sort(), a) {
- l = e.event.special[a] || {}, a = (i ? l.delegateType : l.bindType) || a, d = p[a] || [], u = u[2] && new RegExp("(^|\\.)" + g.join("\\.(?:.*\\.|)") + "(\\.|$)"), v = m = d.length;
- while (m--) s = d[m], !o && y !== s.origType || r && r.guid !== s.guid || u && !u.test(s.namespace) || i && i !== s.selector && ("**" !== i || !s.selector) || (d.splice(m, 1), s.selector && d.delegateCount--, l.remove && l.remove.call(t, s));
- v && !d.length && (l.teardown && l.teardown.call(t, g, f.handle) !== !1 || e.removeEvent(t, a, f.handle), delete p[a])
- } else
- for (a in p) e.event.remove(t, a + n[h], r, i, !0);
- e.isEmptyObject(p) && (delete f.handle, e.n$(t, "events"))
- }
- },
- trigger: function(n, r, o, a) {
- var f, p, u, g, d, c, v, m = [o || i],
- l = k.call(n, "type") ? n.type : n,
- h = k.call(n, "namespace") ? n.namespace.split(".") : [];
- if (u = c = o = o || i, 3 !== o.nodeType && 8 !== o.nodeType && !at.test(l + e.event.triggered) && (l.indexOf(".") >= 0 && (h = l.split("."), l = h.shift(), h.sort()), p = l.indexOf(":") < 0 && "on" + l, n = n[e.expando] ? n : new e.Event(l, "object" == typeof n && n), n.isTrigger = a ? 2 : 3, n.namespace = h.join("."), n.namespace_re = n.namespace ? new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, n.result = void 0, n.target || (n.target = o), r = null == r ? [n] : e.makeArray(r, [n]), d = e.event.special[l] || {}, a || !d.trigger || d.trigger.apply(o, r) !== !1)) {
- if (!a && !d.noBubble && !e.isWindow(o)) {
- for (g = d.delegateType || l, at.test(g + l) || (u = u.parentNode); u; u = u.parentNode) m.push(u), c = u;
- c === (o.ownerDocument || i) && m.push(c.defaultView || c.parentWindow || t)
- };
- v = 0;
- while ((u = m[v++]) && !n.isPropagationStopped()) n.type = v > 1 ? g : d.bindType || l, f = (e.e$(u, "events") || {})[n.type] && e.e$(u, "handle"), f && f.apply(u, r), f = p && u[p], f && f.apply && e.acceptData(u) && (n.result = f.apply(u, r), n.result === !1 && n.preventDefault());
- if (n.type = l, !a && !n.isDefaultPrevented() && (!d.t$ || d.t$.apply(m.pop(), r) === !1) && e.acceptData(o) && p && o[l] && !e.isWindow(o)) {
- c = o[p], c && (o[p] = null), e.event.triggered = l;
- try {
- o[l]()
- } catch (s) {};
- e.event.triggered = void 0, c && (o[p] = c)
- };
- return n.result
- }
- },
- dispatch: function(t) {
- t = e.event.fix(t);
- var a, o, n, i, u, l = [],
- s = f.call(arguments),
- c = (e.e$(this, "events") || {})[t.type] || [],
- r = e.event.special[t.type] || {};
- if (s[0] = t, t.delegateTarget = this, !r.preDispatch || r.preDispatch.call(this, t) !== !1) {
- l = e.event.handlers.call(this, t, c), a = 0;
- while ((i = l[a++]) && !t.isPropagationStopped()) {
- t.currentTarget = i.elem, u = 0;
- while ((n = i.handlers[u++]) && !t.isImmediatePropagationStopped())(!t.namespace_re || t.namespace_re.test(n.namespace)) && (t.handleObj = n, t.data = n.data, o = ((e.event.special[n.origType] || {}).handle || n.handler).apply(i.elem, s), void 0 !== o && (t.result = o) === !1 && (t.preventDefault(), t.stopPropagation()))
- };
- return r.postDispatch && r.postDispatch.call(this, t), t.result
- }
- },
- handlers: function(t, n) {
- var o, l, i, s, u = [],
- a = n.delegateCount,
- r = t.target;
- if (a && r.nodeType && (!t.button || "click" !== t.type))
- for (; r != this; r = r.parentNode || this)
- if (1 === r.nodeType && (r.disabled !== !0 || "click" !== t.type)) {
- for (i = [], s = 0; a > s; s++) l = n[s], o = l.selector + " ", void 0 === i[o] && (i[o] = l.needsContext ? e(o, this).index(r) >= 0 : e.find(o, this, null, [r]).length), i[o] && i.push(l);
- i.length && u.push({
- elem: r,
- handlers: i
- })
- };
- return a < n.length && u.push({
- elem: this,
- handlers: n.slice(a)
- }), u
- },
- fix: function(t) {
- if (t[e.expando]) return t;
- var s, l, a, r = t.type,
- o = t,
- n = this.fixHooks[r];
- n || (this.fixHooks[r] = n = Jt.test(r) ? this.mouseHooks : Wt.test(r) ? this.keyHooks : {}), a = n.props ? this.props.concat(n.props) : this.props, t = new e.Event(o), s = a.length;
- while (s--) l = a[s], t[l] = o[l];
- return t.target || (t.target = o.srcElement || i), 3 === t.target.nodeType && (t.target = t.target.parentNode), t.metaKey = !! t.metaKey, n.filter ? n.filter(t, o) : t
- },
- 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 fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function(e, t) {
- var r, s, n, o = t.button,
- a = t.fromElement;
- return null == e.pageX && null != t.clientX && (s = e.target.ownerDocument || i, n = s.documentElement, r = s.body, e.pageX = t.clientX + (n && n.scrollLeft || r && r.scrollLeft || 0) - (n && n.clientLeft || r && r.clientLeft || 0), e.pageY = t.clientY + (n && n.scrollTop || r && r.scrollTop || 0) - (n && n.clientTop || r && r.clientTop || 0)), !e.relatedTarget && a && (e.relatedTarget = a === e.target ? t.toElement : a), e.which || void 0 === o || (e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0), e
- }
- },
- special: {
- load: {
- noBubble: !0
- },
- focus: {
- trigger: function() {
- if (this !== he() && this.focus) try {
- return this.focus(), !1
- } catch (e) {}
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- return this === he() && this.blur ? (this.blur(), !1) : void 0
- },
- delegateType: "focusout"
- },
- click: {
- trigger: function() {
- return e.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : void 0
- },
- t$: function(t) {
- return e.nodeName(t.target, "a")
- }
- },
- beforeunload: {
- postDispatch: function(e) {
- void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result)
- }
- }
- },
- simulate: function(t, n, r, i) {
- var o = e.extend(new e.Event, r, {
- type: t,
- isSimulated: !0,
- originalEvent: {}
- });
- i ? e.event.trigger(o, null, n) : e.event.dispatch.call(n, o), o.isDefaultPrevented() && r.preventDefault()
- }
- }, e.removeEvent = i.removeEventListener ? function(e, t, n) {
- e.removeEventListener && e.removeEventListener(t, n, !1)
- } : function(e, t, n) {
- var r = "on" + t;
- e.detachEvent && (typeof e[r] === u && (e[r] = null), e.detachEvent(r, n))
- }, e.Event = function(t, n) {
- return this instanceof e.Event ? (t && t.type ? (this.originalEvent = t, this.type = t.type, this.isDefaultPrevented = t.defaultPrevented || void 0 === t.defaultPrevented && t.returnValue === !1 ? P : E) : this.type = t, n && e.extend(this, n), this.timeStamp = t && t.timeStamp || e.now(), void(this[e.expando] = !0)) : new e.Event(t, n)
- }, e.Event.prototype = {
- isDefaultPrevented: E,
- isPropagationStopped: E,
- isImmediatePropagationStopped: E,
- preventDefault: function() {
- var e = this.originalEvent;
- this.isDefaultPrevented = P, e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
- },
- stopPropagation: function() {
- var e = this.originalEvent;
- this.isPropagationStopped = P, e && (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0)
- },
- stopImmediatePropagation: function() {
- var e = this.originalEvent;
- this.isImmediatePropagationStopped = P, e && e.stopImmediatePropagation && e.stopImmediatePropagation(), this.stopPropagation()
- }
- }, e.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
- }, function(t, n) {
- e.event.special[t] = {
- delegateType: n,
- bindType: n,
- handle: function(t) {
- var a, o = this,
- r = t.relatedTarget,
- i = t.handleObj;
- return (!r || r !== o && !e.contains(o, r)) && (t.type = i.origType, a = i.handler.apply(this, arguments), t.type = n), a
- }
- }
- }), r.submitBubbles || (e.event.special.submit = {
- setup: function() {
- return e.nodeName(this, "form") ? !1 : void e.event.add(this, "click._submit keypress._submit", function(t) {
- var r = t.target,
- n = e.nodeName(r, "input") || e.nodeName(r, "button") ? r.form : void 0;
- n && !e.e$(n, "submitBubbles") && (e.event.add(n, "submit._submit", function(e) {
- e.i$ = !0
- }), e.e$(n, "submitBubbles", !0))
- })
- },
- postDispatch: function(t) {
- t.i$ && (delete t.i$, this.parentNode && !t.isTrigger && e.event.simulate("submit", this.parentNode, t, !0))
- },
- teardown: function() {
- return e.nodeName(this, "form") ? !1 : void e.event.remove(this, "._submit")
- }
- }), r.changeBubbles || (e.event.special.change = {
- setup: function() {
- return G.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (e.event.add(this, "propertychange._change", function(e) {
- "checked" === e.originalEvent.propertyName && (this.o$ = !0)
- }), e.event.add(this, "click._change", function(t) {
- this.o$ && !t.isTrigger && (this.o$ = !1), e.event.simulate("change", this, t, !0)
- })), !1) : void e.event.add(this, "beforeactivate._change", function(t) {
- var n = t.target;
- G.test(n.nodeName) && !e.e$(n, "changeBubbles") && (e.event.add(n, "change._change", function(t) {
- !this.parentNode || t.isSimulated || t.isTrigger || e.event.simulate("change", this.parentNode, t, !0)
- }), e.e$(n, "changeBubbles", !0))
- })
- },
- handle: function(e) {
- var t = e.target;
- return this !== t || e.isSimulated || e.isTrigger || "radio" !== t.type && "checkbox" !== t.type ? e.handleObj.handler.apply(this, arguments) : void 0
- },
- teardown: function() {
- return e.event.remove(this, "._change"), !G.test(this.nodeName)
- }
- }), r.focusinBubbles || e.each({
- focus: "focusin",
- blur: "focusout"
- }, function(t, n) {
- var r = function(t) {
- e.event.simulate(n, t.target, e.event.fix(t), !0)
- };
- e.event.special[n] = {
- setup: function() {
- var i = this.ownerDocument || this,
- o = e.e$(i, n);
- o || i.addEventListener(t, r, !0), e.e$(i, n, (o || 0) + 1)
- },
- teardown: function() {
- var i = this.ownerDocument || this,
- o = e.e$(i, n) - 1;
- o ? e.e$(i, n, o) : (i.removeEventListener(t, r, !0), e.n$(i, n))
- }
- }
- }), e.fn.extend({
- on: function(t, n, r, i, o) {
- var s, a;
- if ("object" == typeof t) {
- "string" != typeof n && (r = r || n, n = void 0);
- for (s in t) this.on(s, n, r, t[s], o);
- return this
- };
- if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), i === !1) i = E;
- else if (!i) return this;
- return 1 === o && (a = i, i = function(t) {
- return e().off(t), a.apply(this, arguments)
- }, i.guid = a.guid || (a.guid = e.guid++)), this.each(function() {
- e.event.add(this, t, i, r, n)
- })
- },
- one: function(e, t, n, r) {
- return this.on(e, t, n, r, 1)
- },
- off: function(t, n, r) {
- var i, o;
- if (t && t.preventDefault && t.handleObj) return i = t.handleObj, e(t.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this;
- if ("object" == typeof t) {
- for (o in t) this.off(o, n, t[o]);
- return this
- };
- return (n === !1 || "function" == typeof n) && (r = n, n = void 0), r === !1 && (r = E), this.each(function() {
- e.event.remove(this, t, r, n)
- })
- },
- trigger: function(t, n) {
- return this.each(function() {
- e.event.trigger(t, n, this)
- })
- },
- triggerHandler: function(t, n) {
- var r = this[0];
- return r ? e.event.trigger(t, n, r, !0) : void 0
- }
- });
- function qe(e) {
- var n = ze.split("|"),
- t = e.createDocumentFragment();
- if (t.createElement)
- while (n.length) t.createElement(n.pop());
- return t
- };
- var ze = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- ln = / jQuery\d+="(?:null|\d+)"/g,
- Ue = new RegExp("<(?:" + ze + ")[\\s/>]", "i"),
- se = /^\s+/,
- ot = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- Je = /<([\w:]+)/,
- Ye = /<tbody/i,
- Qt = /<|&#?\w+;/,
- Pt = /<(?:script|style|link)/i,
- Rt = /checked\s*(?:[^=]|=\s*.checked.)/i,
- ct = /^$|\/(?:java|ecma)script/i,
- Bt = /^true\/(.*)/,
- Ft = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
- l = {
- option: [1, "<select multiple='multiple'>", "</select>"],
- legend: [1, "<fieldset>", "</fieldset>"],
- area: [1, "<map>", "</map>"],
- param: [1, "<object>", "</object>"],
- thead: [1, "<table>", "</table>"],
- tr: [2, "<table><tbody>", "</tbody></table>"],
- col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
- td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
- t$: r.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
- }, Ot = qe(i),
- ie = Ot.appendChild(i.createElement("div"));
- l.optgroup = l.option, l.tbody = l.tfoot = l.colgroup = l.caption = l.thead, l.th = l.td;
- function a(t, n) {
- var o, i, s = 0,
- r = typeof t.getElementsByTagName !== u ? t.getElementsByTagName(n || "*") : typeof t.querySelectorAll !== u ? t.querySelectorAll(n || "*") : void 0;
- if (!r)
- for (r = [], o = t.childNodes || t; null != (i = o[s]); s++)!n || e.nodeName(i, n) ? r.push(i) : e.merge(r, a(i, n));
- return void 0 === n || n && e.nodeName(t, n) ? e.merge([t], r) : r
- };
- function fn(e) {
- Z.test(e.type) && (e.defaultChecked = e.checked)
- };
- function Me(t, n) {
- return e.nodeName(t, "table") && e.nodeName(11 !== n.nodeType ? n : n.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
- };
- function Pe(t) {
- return t.type = (null !== e.find.attr(t, "type")) + "/" + t.type, t
- };
- function Be(e) {
- var t = Bt.exec(e.type);
- return t ? e.type = t[1] : e.removeAttribute("type"), e
- };
- function Q(t, n) {
- for (var i, r = 0; null != (i = t[r]); r++) e.e$(i, "globalEval", !n || e.e$(n[r], "globalEval"))
- };
- function Fe(t, n) {
- if (1 === n.nodeType && e.hasData(t)) {
- var a, o, s, l = e.e$(t),
- r = e.e$(n, l),
- i = l.events;
- if (i) {
- delete r.handle, r.events = {};
- for (a in i)
- for (o = 0, s = i[a].length; s > o; o++) e.event.add(n, a, i[a][o])
- };
- r.data && (r.data = e.extend({}, r.data))
- }
- };
- function xt(t, n) {
- var i, a, o;
- if (1 === n.nodeType) {
- if (i = n.nodeName.toLowerCase(), !r.noCloneEvent && n[e.expando]) {
- o = e.e$(n);
- for (a in o.events) e.removeEvent(n, a, o.handle);
- n.removeAttribute(e.expando)
- };
- "script" === i && n.text !== t.text ? (Pe(n).text = t.text, Be(n)) : "object" === i ? (n.parentNode && (n.outerHTML = t.outerHTML), r.html5Clone && t.innerHTML && !e.trim(n.innerHTML) && (n.innerHTML = t.innerHTML)) : "input" === i && Z.test(t.type) ? (n.defaultChecked = n.checked = t.checked, n.value !== t.value && (n.value = t.value)) : "option" === i ? n.defaultSelected = n.selected = t.defaultSelected : ("input" === i || "textarea" === i) && (n.defaultValue = t.defaultValue)
- }
- };
- e.extend({
- clone: function(t, n, i) {
- var o, c, l, s, u, d = e.contains(t.ownerDocument, t);
- if (r.html5Clone || e.isXMLDoc(t) || !Ue.test("<" + t.nodeName + ">") ? l = t.cloneNode(!0) : (ie.innerHTML = t.outerHTML, ie.removeChild(l = ie.firstChild)), !(r.noCloneEvent && r.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || e.isXMLDoc(t)))
- for (o = a(l), u = a(t), s = 0; null != (c = u[s]); ++s) o[s] && xt(c, o[s]);
- if (n)
- if (i)
- for (u = u || a(t), o = o || a(l), s = 0; null != (c = u[s]); s++) Fe(c, o[s]);
- else Fe(t, l);
- return o = a(l, "script"), o.length > 0 && Q(o, !d && a(t, "script")), o = u = c = null, l
- },
- buildFragment: function(t, n, i, o) {
- for (var c, s, v, u, m, g, h, y = t.length, p = qe(n), d = [], f = 0; y > f; f++)
- if (s = t[f], s || 0 === s)
- if ("object" === e.type(s)) e.merge(d, s.nodeType ? [s] : s);
- else if (Qt.test(s)) {
- u = u || p.appendChild(n.createElement("div")), m = (Je.exec(s) || ["", ""])[1].toLowerCase(), h = l[m] || l.t$, u.innerHTML = h[1] + s.replace(ot, "<$1></$2>") + h[2], c = h[0];
- while (c--) u = u.lastChild;
- if (!r.leadingWhitespace && se.test(s) && d.push(n.createTextNode(se.exec(s)[0])), !r.tbody) {
- s = "table" !== m || Ye.test(s) ? "<table>" !== h[1] || Ye.test(s) ? 0 : u : u.firstChild, c = s && s.childNodes.length;
- while (c--) e.nodeName(g = s.childNodes[c], "tbody") && !g.childNodes.length && s.removeChild(g)
- };
- e.merge(d, u.childNodes), u.textContent = "";
- while (u.firstChild) u.removeChild(u.firstChild);
- u = p.lastChild
- } else d.push(n.createTextNode(s));
- u && p.removeChild(u), r.appendChecked || e.grep(a(d, "input"), fn), f = 0;
- while (s = d[f++])
- if ((!o || -1 === e.inArray(s, o)) && (v = e.contains(s.ownerDocument, s), u = a(p.appendChild(s), "script"), v && Q(u), i)) {
- c = 0;
- while (s = u[c++]) ct.test(s.type || "") && i.push(s)
- };
- return u = null, p
- },
- cleanData: function(t, n) {
- for (var i, l, o, s, d = 0, a = e.expando, c = e.cache, p = r.deleteExpando, f = e.event.special; null != (i = t[d]); d++)
- if ((n || e.acceptData(i)) && (o = i[a], s = o && c[o])) {
- if (s.events)
- for (l in s.events) f[l] ? e.event.remove(i, l) : e.removeEvent(i, l, s.handle);
- c[o] && (delete c[o], p ? delete i[a] : typeof i.removeAttribute !== u ? i.removeAttribute(a) : i[a] = null, m.push(o))
- }
- }
- }), e.fn.extend({
- text: function(t) {
- return v(this, function(t) {
- return void 0 === t ? e.text(this) : this.empty().append((this[0] && this[0].ownerDocument || i).createTextNode(t))
- }, null, t, arguments.length)
- },
- append: function() {
- return this.domManip(arguments, function(e) {
- if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
- var t = Me(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 = Me(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(t, n) {
- for (var r, o = t ? e.filter(t, this) : this, i = 0; null != (r = o[i]); i++) n || 1 !== r.nodeType || e.cleanData(a(r)), r.parentNode && (n && e.contains(r.ownerDocument, r) && Q(a(r, "script")), r.parentNode.removeChild(r));
- return this
- },
- empty: function() {
- for (var t, n = 0; null != (t = this[n]); n++) {
- 1 === t.nodeType && e.cleanData(a(t, !1));
- while (t.firstChild) t.removeChild(t.firstChild);
- t.options && e.nodeName(t, "select") && (t.options.length = 0)
- };
- return this
- },
- clone: function(t, n) {
- return t = null == t ? !1 : t, n = null == n ? t : n, this.map(function() {
- return e.clone(this, t, n)
- })
- },
- html: function(t) {
- return v(this, function(t) {
- var i = this[0] || {}, o = 0,
- s = this.length;
- if (void 0 === t) return 1 === i.nodeType ? i.innerHTML.replace(ln, "") : void 0;
- if (!("string" != typeof t || Pt.test(t) || !r.htmlSerialize && Ue.test(t) || !r.leadingWhitespace && se.test(t) || l[(Je.exec(t) || ["", ""])[1].toLowerCase()])) {
- t = t.replace(ot, "<$1></$2>");
- try {
- for (; s > o; o++) i = this[o] || {}, 1 === i.nodeType && (e.cleanData(a(i, !1)), i.innerHTML = t);
- i = 0
- } catch (n) {}
- };
- i && this.empty().append(t)
- }, null, t, arguments.length)
- },
- replaceWith: function() {
- var t = arguments[0];
- return this.domManip(arguments, function(n) {
- t = this.parentNode, e.cleanData(a(this)), t && t.replaceChild(n, this)
- }), t && (t.length || t.nodeType) ? this : this.remove()
- },
- detach: function(e) {
- return this.remove(e, !0)
- },
- domManip: function(t, n) {
- t = ue.apply([], t);
- var d, i, f, l, h, s, o = 0,
- u = this.length,
- m = this,
- g = u - 1,
- c = t[0],
- p = e.isFunction(c);
- if (p || u > 1 && "string" == typeof c && !r.checkClone && Rt.test(c)) return this.each(function(e) {
- var r = m.eq(e);
- p && (t[0] = c.call(this, e, r.html())), r.domManip(t, n)
- });
- if (u && (s = e.buildFragment(t, this[0].ownerDocument, !1, this), d = s.firstChild, 1 === s.childNodes.length && (s = d), d)) {
- for (l = e.map(a(s, "script"), Pe), f = l.length; u > o; o++) i = s, o !== g && (i = e.clone(i, !0, !0), f && e.merge(l, a(i, "script"))), n.call(this[o], i, o);
- if (f)
- for (h = l[l.length - 1].ownerDocument, e.map(l, Be), o = 0; f > o; o++) i = l[o], ct.test(i.type || "") && !e.e$(i, "globalEval") && e.contains(h, i) && (i.src ? e.a$ && e.a$(i.src) : e.globalEval((i.text || i.textContent || i.innerHTML || "").replace(Ft, "")));
- s = d = null
- };
- return this
- }
- }), e.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
- }, function(t, n) {
- e.fn[t] = function(t) {
- for (var i, r = 0, a = [], s = e(t), o = s.length - 1; o >= r; r++) i = r === o ? this : this.clone(!0), e(s[r])[n](i), X.apply(a, i.get());
- return this.pushStack(a)
- }
- });
- var S, Ie = {};
- function Oe(n, r) {
- var o, i = e(r.createElement(n)).appendTo(r.body),
- a = t.getDefaultComputedStyle && (o = t.getDefaultComputedStyle(i[0])) ? o.display : e.css(i[0], "display");
- return i.detach(), a
- };
- function q(t) {
- var r = i,
- n = Ie[t];
- return n || (n = Oe(t, r), "none" !== n && n || (S = (S || e("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement), r = (S[0].contentWindow || S[0].contentDocument).document, r.write(), r.close(), n = Oe(t, r), S.detach()), Ie[t] = n), n
- };
- ! function() {
- var e;
- r.shrinkWrapBlocks = function() {
- if (null != e) return e;
- e = !1;
- var t, n, r;
- return n = i.getElementsByTagName("body")[0], n && n.style ? (t = i.createElement("div"), r = i.createElement("div"), r.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(r).appendChild(t), typeof t.style.zoom !== u && (t.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1", t.appendChild(i.createElement("div")).style.width = "5px", e = 3 !== t.offsetWidth), n.removeChild(r), e) : void 0
- }
- }();
- var Qe = /^margin/,
- I = new RegExp("^(" + W + ")(?!px)[a-z%]+$", "i"),
- w, g, an = /^(top|right|bottom|left)$/;
- t.getComputedStyle ? (w = function(e) {
- return e.ownerDocument.defaultView.getComputedStyle(e, null)
- }, g = function(t, n, r) {
- var a, s, l, o, i = t.style;
- return r = r || w(t), o = r ? r.getPropertyValue(n) || r[n] : void 0, r && ("" !== o || e.contains(t.ownerDocument, t) || (o = e.style(t, n)), I.test(o) && Qe.test(n) && (a = i.width, s = i.minWidth, l = i.maxWidth, i.minWidth = i.maxWidth = i.width = o, o = r.width, i.width = a, i.minWidth = s, i.maxWidth = l)), void 0 === o ? o : o + ""
- }) : i.documentElement.currentStyle && (w = function(e) {
- return e.currentStyle
- }, g = function(e, t, n) {
- var s, o, a, r, i = e.style;
- return n = n || w(e), r = n ? n[t] : void 0, null == r && i && i[t] && (r = i[t]), I.test(r) && !an.test(t) && (s = i.left, o = e.runtimeStyle, a = o && o.left, a && (o.left = e.currentStyle.left), i.left = "fontSize" === t ? "1em" : r, r = i.pixelLeft + "px", i.left = s, a && (o.left = a)), void 0 === r ? r : r + "" || "auto"
- });
- function Se(e, t) {
- return {
- get: function() {
- var n = e();
- if (null != n) return n ? void delete this.get : (this.get = t).apply(this, arguments)
- }
- }
- };
- ! function() {
- var o, n, d, u, c, a, s;
- if (o = i.createElement("div"), o.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", d = o.getElementsByTagName("a")[0], n = d && d.style) {
- n.cssText = "float:left;opacity:.5", r.opacity = "0.5" === n.opacity, r.cssFloat = !! n.cssFloat, o.style.backgroundClip = "content-box", o.cloneNode(!0).style.backgroundClip = "", r.clearCloneStyle = "content-box" === o.style.backgroundClip, r.boxSizing = "" === n.boxSizing || "" === n.MozBoxSizing || "" === n.WebkitBoxSizing, e.extend(r, {
- reliableHiddenOffsets: function() {
- return null == a && l(), a
- },
- boxSizingReliable: function() {
- return null == c && l(), c
- },
- pixelPosition: function() {
- return null == u && l(), u
- },
- reliableMarginRight: function() {
- return null == s && l(), s
- }
- });
- function l() {
- var n, r, o, e;
- r = i.getElementsByTagName("body")[0], r && r.style && (n = i.createElement("div"), o = i.createElement("div"), o.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", r.appendChild(o).appendChild(n), n.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", u = c = !1, s = !0, t.getComputedStyle && (u = "1%" !== (t.getComputedStyle(n, null) || {}).top, c = "4px" === (t.getComputedStyle(n, null) || {
- width: "4px"
- }).width, e = n.appendChild(i.createElement("div")), e.style.cssText = n.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", e.style.marginRight = e.style.width = "0", n.style.width = "1px", s = !parseFloat((t.getComputedStyle(e, null) || {}).marginRight)), n.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", e = n.getElementsByTagName("td"), e[0].style.cssText = "margin:0;border:0;padding:0;display:none", a = 0 === e[0].offsetHeight, a && (e[0].style.display = "", e[1].style.display = "none", a = 0 === e[0].offsetHeight), r.removeChild(o))
- }
- }
- }(), e.swap = function(e, t, n, r) {
- var a, i, o = {};
- for (i in t) o[i] = e.style[i], e.style[i] = t[i];
- a = n.apply(e, r || []);
- for (i in t) e.style[i] = o[i];
- return a
- };
- var V = /alpha\([^)]*\)/i,
- tn = /opacity\s*=\s*([^)]*)/,
- en = /^(none|table(?!-c[ea]).+)/,
- qt = new RegExp("^(" + W + ")(.*)$", "i"),
- Kt = new RegExp("^([+-])=(" + W + ")", "i"),
- Zt = {
- position: "absolute",
- visibility: "hidden",
- display: "block"
- }, nt = {
- letterSpacing: "0",
- fontWeight: "400"
- }, Ge = ["Webkit", "O", "Moz", "ms"];
- function ke(e, t) {
- if (t in e) return t;
- var r = t.charAt(0).toUpperCase() + t.slice(1),
- i = t,
- n = Ge.length;
- while (n--)
- if (t = Ge[n] + r, t in e) return t;
- return i
- };
- function xe(t, n) {
- for (var o, r, s, a = [], i = 0, l = t.length; l > i; i++) r = t[i], r.style && (a[i] = e.e$(r, "olddisplay"), o = r.style.display, n ? (a[i] || "none" !== o || (r.style.display = ""), "" === r.style.display && L(r) && (a[i] = e.e$(r, "olddisplay", q(r.nodeName)))) : (s = L(r), (o && "none" !== o || !s) && e.e$(r, "olddisplay", s ? o : e.css(r, "display"))));
- for (i = 0; l > i; i++) r = t[i], r.style && (n && "none" !== r.style.display && "" !== r.style.display || (r.style.display = n ? a[i] || "" : "none"));
- return t
- };
- function ye(e, t, n) {
- var r = qt.exec(t);
- return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t
- };
- function ve(t, n, r, i, o) {
- for (var a = r === (i ? "border" : "content") ? 4 : "width" === n ? 1 : 0, s = 0; 4 > a; a += 2) "margin" === r && (s += e.css(t, r + b[a], !0, o)), i ? ("content" === r && (s -= e.css(t, "padding" + b[a], !0, o)), "margin" !== r && (s -= e.css(t, "border" + b[a] + "Width", !0, o))) : (s += e.css(t, "padding" + b[a], !0, o), "padding" !== r && (s += e.css(t, "border" + b[a] + "Width", !0, o)));
- return s
- };
- function me(t, n, i) {
- var l = !0,
- o = "width" === n ? t.offsetWidth : t.offsetHeight,
- a = w(t),
- s = r.boxSizing && "border-box" === e.css(t, "boxSizing", !1, a);
- if (0 >= o || null == o) {
- if (o = g(t, n, a), (0 > o || null == o) && (o = t.style[n]), I.test(o)) return o;
- l = s && (r.boxSizingReliable() || o === t.style[n]), o = parseFloat(o) || 0
- };
- return o + ve(t, n, i || (s ? "border" : "content"), l, a) + "px"
- };
- e.extend({
- cssHooks: {
- opacity: {
- get: function(e, t) {
- if (t) {
- var n = g(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": r.cssFloat ? "cssFloat" : "styleFloat"
- },
- style: function(t, n, i, o) {
- if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
- var u, c, s, l = e.camelCase(n),
- d = t.style;
- if (n = e.cssProps[l] || (e.cssProps[l] = ke(d, l)), s = e.cssHooks[n] || e.cssHooks[l], void 0 === i) return s && "get" in s && void 0 !== (u = s.get(t, !1, o)) ? u : d[n];
- if (c = typeof i, "string" === c && (u = Kt.exec(i)) && (i = (u[1] + 1) * u[2] + parseFloat(e.css(t, n)), c = "number"), null != i && i === i && ("number" !== c || e.cssNumber[l] || (i += "px"), r.clearCloneStyle || "" !== i || 0 !== n.indexOf("background") || (d[n] = "inherit"), !(s && "set" in s && void 0 === (i = s.set(t, i, o))))) try {
- d[n] = i
- } catch (a) {}
- }
- },
- css: function(t, n, r, i) {
- var l, o, s, a = e.camelCase(n);
- return n = e.cssProps[a] || (e.cssProps[a] = ke(t.style, a)), s = e.cssHooks[n] || e.cssHooks[a], s && "get" in s && (o = s.get(t, !0, r)), void 0 === o && (o = g(t, n, i)), "normal" === o && n in nt && (o = nt[n]), "" === r || r ? (l = parseFloat(o), r === !0 || e.isNumeric(l) ? l || 0 : o) : o
- }
- }), e.each(["height", "width"], function(t, n) {
- e.cssHooks[n] = {
- get: function(t, r, i) {
- return r ? en.test(e.css(t, "display")) && 0 === t.offsetWidth ? e.swap(t, Zt, function() {
- return me(t, n, i)
- }) : me(t, n, i) : void 0
- },
- set: function(t, i, o) {
- var a = o && w(t);
- return ye(t, i, o ? ve(t, n, o, r.boxSizing && "border-box" === e.css(t, "boxSizing", !1, a), a) : 0)
- }
- }
- }), r.opacity || (e.cssHooks.opacity = {
- get: function(e, t) {
- return tn.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : ""
- },
- set: function(t, n) {
- var r = t.style,
- i = t.currentStyle,
- a = e.isNumeric(n) ? "alpha(opacity=" + 100 * n + ")" : "",
- o = i && i.filter || r.filter || "";
- r.zoom = 1, (n >= 1 || "" === n) && "" === e.trim(o.replace(V, "")) && r.removeAttribute && (r.removeAttribute("filter"), "" === n || i && !i.filter) || (r.filter = V.test(o) ? o.replace(V, a) : o + " " + a)
- }
- }), e.cssHooks.marginRight = Se(r.reliableMarginRight, function(t, n) {
- return n ? e.swap(t, {
- display: "inline-block"
- }, g, [t, "marginRight"]) : void 0
- }), e.each({
- margin: "",
- padding: "",
- border: "Width"
- }, function(t, n) {
- e.cssHooks[t + n] = {
- expand: function(e) {
- for (var r = 0, o = {}, i = "string" == typeof e ? e.split(" ") : [e]; 4 > r; r++) o[t + b[r] + n] = i[r] || i[r - 2] || i[0];
- return o
- }
- }, Qe.test(t) || (e.cssHooks[t + n].set = ye)
- }), e.fn.extend({
- css: function(t, n) {
- return v(this, function(t, n, r) {
- var a, s, o = {}, i = 0;
- if (e.isArray(n)) {
- for (a = w(t), s = n.length; s > i; i++) o[n[i]] = e.css(t, n[i], !1, a);
- return o
- };
- return void 0 !== r ? e.style(t, n, r) : e.css(t, n)
- }, t, n, arguments.length > 1)
- },
- show: function() {
- return xe(this, !0)
- },
- hide: function() {
- return xe(this)
- },
- toggle: function(t) {
- return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function() {
- L(this) ? e(this).show() : e(this).hide()
- })
- }
- });
- function s(e, t, n, r, i) {
- return new s.prototype.init(e, t, n, r, i)
- };
- e.Tween = s, s.prototype = {
- constructor: s,
- init: function(t, n, r, i, o, a) {
- this.elem = t, this.prop = r, this.easing = o || "swing", this.options = n, this.start = this.now = this.cur(), this.end = i, this.unit = a || (e.cssNumber[r] ? "" : "px")
- },
- cur: function() {
- var e = s.propHooks[this.prop];
- return e && e.get ? e.get(this) : s.propHooks.t$.get(this)
- },
- run: function(t) {
- var r, n = s.propHooks[this.prop];
- return this.pos = r = this.options.duration ? e.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : t, this.now = (this.end - this.start) * r + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : s.propHooks.t$.set(this), this
- }
- }, s.prototype.init.prototype = s.prototype, s.propHooks = {
- t$: {
- get: function(t) {
- var n;
- return null == t.elem[t.prop] || t.elem.style && null != t.elem.style[t.prop] ? (n = e.css(t.elem, t.prop, ""), n && "auto" !== n ? n : 0) : t.elem[t.prop]
- },
- set: function(t) {
- e.fx.step[t.prop] ? e.fx.step[t.prop](t) : t.elem.style && (null != t.elem.style[e.cssProps[t.prop]] || e.cssHooks[t.prop]) ? e.style(t.elem, t.prop, t.now + t.unit) : t.elem[t.prop] = t.now
- }
- }
- }, s.propHooks.scrollTop = s.propHooks.scrollLeft = {
- set: function(e) {
- e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)
- }
- }, e.easing = {
- linear: function(e) {
- return e
- },
- swing: function(e) {
- return .5 - Math.cos(e * Math.PI) / 2
- }
- }, e.fx = s.prototype.init, e.fx.step = {};
- var T, M, nn = /^(?:toggle|show|hide)$/,
- Ke = new RegExp("^(?:([+-])=|)(" + W + ")([a-z%]*)$", "i"),
- rn = /queueHooks$/,
- B = [Et],
- j = {
- "*": [
- function(t, n) {
- var o = this.createTween(t, n),
- l = o.cur(),
- i = Ke.exec(n),
- a = i && i[3] || (e.cssNumber[t] ? "" : "px"),
- r = (e.cssNumber[t] || "px" !== a && +l) && Ke.exec(e.css(o.elem, t)),
- s = 1,
- u = 20;
- if (r && r[3] !== a) {
- a = a || r[3], i = i || [], r = +l || 1;
- do s = s || ".5", r /= s, e.style(o.elem, t, r + a); while (s !== (s = o.cur() / l) && 1 !== s && --u)
- };
- return i && (r = o.start = +r || +l || 0, o.unit = a, o.end = i[1] ? r + (i[1] + 1) * i[2] : +i[2]), o
- }
- ]
- };
- function ge() {
- return setTimeout(function() {
- T = void 0
- }), T = e.now()
- };
- function z(e, t) {
- var i, n = {
- height: e
- }, r = 0;
- for (t = t ? 1 : 0; 4 > r; r += 2 - t) i = b[r], n["margin" + i] = n["padding" + i] = e;
- return t && (n.opacity = n.width = e), n
- };
- function be(e, t, n) {
- for (var i, o = (j[t] || []).concat(j["*"]), r = 0, a = o.length; a > r; r++)
- if (i = o[r].call(n, t, e)) return i
- };
- function Et(t, n, i) {
- var o, f, m, h, l, v, c, g, d = this,
- p = {}, s = t.style,
- u = t.nodeType && L(t),
- a = e.e$(t, "fxshow");
- i.queue || (l = e.r$(t, "fx"), null == l.unqueued && (l.unqueued = 0, v = l.empty.fire, l.empty.fire = function() {
- l.unqueued || v()
- }), l.unqueued++, d.always(function() {
- d.always(function() {
- l.unqueued--, e.queue(t, "fx").length || l.empty.fire()
- })
- })), 1 === t.nodeType && ("height" in n || "width" in n) && (i.overflow = [s.overflow, s.overflowX, s.overflowY], c = e.css(t, "display"), g = "none" === c ? e.e$(t, "olddisplay") || q(t.nodeName) : c, "inline" === g && "none" === e.css(t, "float") && (r.inlineBlockNeedsLayout && "inline" !== q(t.nodeName) ? s.zoom = 1 : s.display = "inline-block")), i.overflow && (s.overflow = "hidden", r.shrinkWrapBlocks() || d.always(function() {
- s.overflow = i.overflow[0], s.overflowX = i.overflow[1], s.overflowY = i.overflow[2]
- }));
- for (o in n)
- if (f = n[o], nn.exec(f)) {
- if (delete n[o], m = m || "toggle" === f, f === (u ? "hide" : "show")) {
- if ("show" !== f || !a || void 0 === a[o]) continue;
- u = !0
- };
- p[o] = a && a[o] || e.style(t, o)
- } else c = void 0;
- if (e.isEmptyObject(p)) "inline" === ("none" === c ? q(t.nodeName) : c) && (s.display = c);
- else {
- a ? "hidden" in a && (u = a.hidden) : a = e.e$(t, "fxshow", {}), m && (a.hidden = !u), u ? e(t).show() : d.done(function() {
- e(t).hide()
- }), d.done(function() {
- var n;
- e.n$(t, "fxshow");
- for (n in p) e.style(t, n, p[n])
- });
- for (o in p) h = be(u ? a[o] : 0, o, d), o in a || (a[o] = h.start, u && (h.end = h.start, h.start = "width" === o || "height" === o ? 1 : 0))
- }
- };
- function wt(t, n) {
- var r, o, s, i, a;
- for (r in t)
- if (o = e.camelCase(r), s = n[o], i = t[r], e.isArray(i) && (s = i[1], i = t[r] = i[0]), r !== o && (t[o] = i, delete t[r]), a = e.cssHooks[o], a && "expand" in a) {
- i = a.expand(i), delete t[o];
- for (r in i) r in t || (t[r] = i[r], n[r] = s)
- } else n[o] = s
- };
- function we(t, n, r) {
- var u, l, s = 0,
- d = B.length,
- o = e.Deferred().always(function() {
- delete c.elem
- }),
- c = function() {
- if (l) return !1;
- for (var u = T || ge(), n = Math.max(0, i.startTime + i.duration - u), s = n / i.duration || 0, e = 1 - s, r = 0, a = i.tweens.length; a > r; r++) i.tweens[r].run(e);
- return o.notifyWith(t, [i, e, n]), 1 > e && a ? n : (o.resolveWith(t, [i]), !1)
- }, i = o.promise({
- elem: t,
- props: e.extend({}, n),
- opts: e.extend(!0, {
- specialEasing: {}
- }, r),
- originalProperties: n,
- originalOptions: r,
- startTime: T || ge(),
- duration: r.duration,
- tweens: [],
- createTween: function(n, r) {
- var o = e.Tween(t, i.opts, n, r, i.opts.specialEasing[n] || i.opts.easing);
- return i.tweens.push(o), o
- },
- stop: function(e) {
- var n = 0,
- r = e ? i.tweens.length : 0;
- if (l) return this;
- for (l = !0; r > n; n++) i.tweens[n].run(1);
- return e ? o.resolveWith(t, [i, e]) : o.rejectWith(t, [i, e]), this
- }
- }),
- a = i.props;
- for (wt(a, i.opts.specialEasing); d > s; s++)
- if (u = B[s].call(i, t, a, i.opts)) return u;
- return e.map(a, be, i), e.isFunction(i.opts.start) && i.opts.start.call(t, i), e.fx.timer(e.extend(c, {
- elem: t,
- anim: i,
- queue: i.opts.queue
- })), i.progress(i.opts.progress).done(i.opts.done, i.opts.complete).fail(i.opts.fail).always(i.opts.always)
- };
- e.Animation = e.extend(we, {
- tweener: function(t, n) {
- e.isFunction(t) ? (n = t, t = ["*"]) : t = t.split(" ");
- for (var r, i = 0, o = t.length; o > i; i++) r = t[i], j[r] = j[r] || [], j[r].unshift(n)
- },
- prefilter: function(e, t) {
- t ? B.unshift(e) : B.push(e)
- }
- }), e.speed = function(t, n, r) {
- var i = t && "object" == typeof t ? e.extend({}, t) : {
- complete: r || !r && n || e.isFunction(t) && t,
- duration: t,
- easing: r && n || n && !e.isFunction(n) && n
- };
- return i.duration = e.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in e.fx.speeds ? e.fx.speeds[i.duration] : e.fx.speeds.t$, (null == i.queue || i.queue === !0) && (i.queue = "fx"), i.old = i.complete, i.complete = function() {
- e.isFunction(i.old) && i.old.call(this), i.queue && e.dequeue(this, i.queue)
- }, i
- }, e.fn.extend({
- fadeTo: function(e, t, n, r) {
- return this.filter(L).css("opacity", 0).show().end().animate({
- opacity: t
- }, e, n, r)
- },
- animate: function(t, n, r, i) {
- var s = e.isEmptyObject(t),
- a = e.speed(n, r, i),
- o = function() {
- var n = we(this, e.extend({}, t), a);
- (s || e.e$(this, "finish")) && n.stop(!0)
- };
- return o.finish = o, s || a.queue === !1 ? this.each(o) : this.queue(a.queue, o)
- },
- stop: function(t, n, r) {
- var i = function(e) {
- var t = e.stop;
- delete e.stop, t(r)
- };
- return "string" != typeof t && (r = n, n = t, t = void 0), n && t !== !1 && this.queue(t || "fx", []), this.each(function() {
- var s = !0,
- n = null != t && t + "queueHooks",
- a = e.timers,
- o = e.e$(this);
- if (n) o[n] && o[n].stop && i(o[n]);
- else
- for (n in o) o[n] && o[n].stop && rn.test(n) && i(o[n]);
- for (n = a.length; n--;) a[n].elem !== this || null != t && a[n].queue !== t || (a[n].anim.stop(r), s = !1, a.splice(n, 1));
- (s || !r) && e.dequeue(this, t)
- })
- },
- finish: function(t) {
- return t !== !1 && (t = t || "fx"), this.each(function() {
- var n, o = e.e$(this),
- i = o[t + "queue"],
- a = o[t + "queueHooks"],
- r = e.timers,
- s = i ? i.length : 0;
- for (o.finish = !0, e.queue(this, t, []), a && a.stop && a.stop.call(this, !0), n = r.length; n--;) r[n].elem === this && r[n].queue === t && (r[n].anim.stop(!0), r.splice(n, 1));
- for (n = 0; s > n; n++) i[n] && i[n].finish && i[n].finish.call(this);
- delete o.finish
- })
- }
- }), e.each(["toggle", "show", "hide"], function(t, n) {
- var r = e.fn[n];
- e.fn[n] = function(e, t, i) {
- return null == e || "boolean" == typeof e ? r.apply(this, arguments) : this.animate(z(n, !0), e, t, i)
- }
- }), e.each({
- slideDown: z("show"),
- slideUp: z("hide"),
- slideToggle: z("toggle"),
- fadeIn: {
- opacity: "show"
- },
- fadeOut: {
- opacity: "hide"
- },
- fadeToggle: {
- opacity: "toggle"
- }
- }, function(t, n) {
- e.fn[t] = function(e, t, r) {
- return this.animate(n, e, t, r)
- }
- }), e.timers = [], e.fx.tick = function() {
- var r, n = e.timers,
- t = 0;
- for (T = e.now(); t < n.length; t++) r = n[t], r() || n[t] !== r || n.splice(t--, 1);
- n.length || e.fx.stop(), T = void 0
- }, e.fx.timer = function(t) {
- e.timers.push(t), t() ? e.fx.start() : e.timers.pop()
- }, e.fx.interval = 13, e.fx.start = function() {
- M || (M = setInterval(e.fx.tick, e.fx.interval))
- }, e.fx.stop = function() {
- clearInterval(M), M = null
- }, e.fx.speeds = {
- slow: 600,
- fast: 200,
- t$: 400
- }, e.fn.delay = function(t, n) {
- return t = e.fx ? e.fx.speeds[t] || t : t, n = n || "fx", this.queue(n, function(e, n) {
- var r = setTimeout(e, t);
- n.stop = function() {
- clearTimeout(r)
- }
- })
- },
- function() {
- var e, t, a, n, o;
- t = i.createElement("div"), t.setAttribute("className", "t"), t.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", n = t.getElementsByTagName("a")[0], a = i.createElement("select"), o = a.appendChild(i.createElement("option")), e = t.getElementsByTagName("input")[0], n.style.cssText = "top:1px", r.getSetAttribute = "t" !== t.className, r.style = /top/.test(n.getAttribute("style")), r.hrefNormalized = "/a" === n.getAttribute("href"), r.checkOn = !! e.value, r.optSelected = o.selected, r.enctype = !! i.createElement("form").enctype, a.disabled = !0, r.optDisabled = !o.disabled, e = i.createElement("input"), e.setAttribute("value", ""), r.input = "" === e.getAttribute("value"), e.value = "t", e.setAttribute("type", "radio"), r.radioValue = "t" === e.value
- }();
- var Ct = /\r/g;
- e.fn.extend({
- val: function(t) {
- var n, r, o, i = this[0]; {
- if (arguments.length) return o = e.isFunction(t), this.each(function(r) {
- var i;
- 1 === this.nodeType && (i = o ? t.call(this, r, e(this).val()) : t, null == i ? i = "" : "number" == typeof i ? i += "" : e.isArray(i) && (i = e.map(i, function(e) {
- return null == e ? "" : e + ""
- })), n = e.valHooks[this.type] || e.valHooks[this.nodeName.toLowerCase()], n && "set" in n && void 0 !== n.set(this, i, "value") || (this.value = i))
- });
- if (i) return n = e.valHooks[i.type] || e.valHooks[i.nodeName.toLowerCase()], n && "get" in n && void 0 !== (r = n.get(i, "value")) ? r : (r = i.value, "string" == typeof r ? r.replace(Ct, "") : null == r ? "" : r)
- }
- }
- }), e.extend({
- valHooks: {
- option: {
- get: function(t) {
- var n = e.find.attr(t, "value");
- return null != n ? n : e.trim(e.text(t))
- }
- },
- select: {
- get: function(t) {
- for (var s, n, c = t.options, i = t.selectedIndex, a = "select-one" === t.type || 0 > i, u = a ? null : [], l = a ? i + 1 : c.length, o = 0 > i ? l : a ? i : 0; l > o; o++)
- if (n = c[o], !(!n.selected && o !== i || (r.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && e.nodeName(n.parentNode, "optgroup"))) {
- if (s = e(n).val(), a) return s;
- u.push(s)
- };
- return u
- },
- set: function(t, n) {
- var s, i, o = t.options,
- l = e.makeArray(n),
- a = o.length;
- while (a--)
- if (i = o[a], e.inArray(e.valHooks.option.get(i), l) >= 0) try {
- i.selected = s = !0
- } catch (r) {
- i.scrollHeight
- } else i.selected = !1;
- return s || (t.selectedIndex = -1), o
- }
- }
- }
- }), e.each(["radio", "checkbox"], function() {
- e.valHooks[this] = {
- set: function(t, n) {
- return e.isArray(n) ? t.checked = e.inArray(e(t).val(), n) >= 0 : void 0
- }
- }, r.checkOn || (e.valHooks[this].get = function(e) {
- return null === e.getAttribute("value") ? "on" : e.value
- })
- });
- var C, Ze, d = e.expr.attrHandle,
- re = /^(?:checked|selected)$/i,
- y = r.getSetAttribute,
- R = r.input;
- e.fn.extend({
- attr: function(t, n) {
- return v(this, e.attr, t, n, arguments.length > 1)
- },
- removeAttr: function(t) {
- return this.each(function() {
- e.removeAttr(this, t)
- })
- }
- }), e.extend({
- attr: function(t, n, r) {
- var i, o, a = t.nodeType;
- if (t && 3 !== a && 8 !== a && 2 !== a) return typeof t.getAttribute === u ? e.prop(t, n, r) : (1 === a && e.isXMLDoc(t) || (n = n.toLowerCase(), i = e.attrHooks[n] || (e.expr.match.bool.test(n) ? Ze : C)), void 0 === r ? i && "get" in i && null !== (o = i.get(t, n)) ? o : (o = e.find.attr(t, n), null == o ? void 0 : o) : null !== r ? i && "set" in i && void 0 !== (o = i.set(t, r, n)) ? o : (t.setAttribute(n, r + ""), r) : void e.removeAttr(t, n))
- },
- removeAttr: function(t, n) {
- var r, i, a = 0,
- o = n && n.match(c);
- if (o && 1 === t.nodeType)
- while (r = o[a++]) i = e.propFix[r] || r, e.expr.match.bool.test(r) ? R && y || !re.test(r) ? t[i] = !1 : t[e.camelCase("default-" + r)] = t[i] = !1 : e.attr(t, r, ""), t.removeAttribute(y ? r : i)
- },
- attrHooks: {
- type: {
- set: function(t, n) {
- if (!r.radioValue && "radio" === n && e.nodeName(t, "input")) {
- var i = t.value;
- return t.setAttribute("type", n), i && (t.value = i), n
- }
- }
- }
- }
- }), Ze = {
- set: function(t, n, r) {
- return n === !1 ? e.removeAttr(t, r) : R && y || !re.test(r) ? t.setAttribute(!y && e.propFix[r] || r, r) : t[e.camelCase("default-" + r)] = t[r] = !0, r
- }
- }, e.each(e.expr.match.bool.source.match(/\w+/g), function(t, n) {
- var r = d[n] || e.find.attr;
- d[n] = R && y || !re.test(n) ? function(e, t, n) {
- var i, o;
- return n || (o = d[t], d[t] = i, i = null != r(e, t, n) ? t.toLowerCase() : null, d[t] = o), i
- } : function(t, n, r) {
- return r ? void 0 : t[e.camelCase("default-" + n)] ? n.toLowerCase() : null
- }
- }), R && y || (e.attrHooks.value = {
- set: function(t, n, r) {
- return e.nodeName(t, "input") ? void(t.defaultValue = n) : C && C.set(t, n, r)
- }
- }), y || (C = {
- set: function(e, t, n) {
- var r = e.getAttributeNode(n);
- return r || e.setAttributeNode(r = e.ownerDocument.createAttribute(n)), r.value = t += "", "value" === n || t === e.getAttribute(n) ? t : void 0
- }
- }, d.id = d.name = d.coords = function(e, t, n) {
- var r;
- return n ? void 0 : (r = e.getAttributeNode(t)) && "" !== r.value ? r.value : null
- }, e.valHooks.button = {
- get: function(e, t) {
- var n = e.getAttributeNode(t);
- return n && n.specified ? n.value : void 0
- },
- set: C.set
- }, e.attrHooks.contenteditable = {
- set: function(e, t, n) {
- C.set(e, "" === t ? !1 : t, n)
- }
- }, e.each(["width", "height"], function(t, n) {
- e.attrHooks[n] = {
- set: function(e, t) {
- return "" === t ? (e.setAttribute(n, "auto"), t) : void 0
- }
- }
- })), r.style || (e.attrHooks.style = {
- get: function(e) {
- return e.style.cssText || void 0
- },
- set: function(e, t) {
- return e.style.cssText = t + ""
- }
- });
- var yt = /^(?:input|select|textarea|button|object)$/i,
- gt = /^(?:a|area)$/i;
- e.fn.extend({
- prop: function(t, n) {
- return v(this, e.prop, t, n, arguments.length > 1)
- },
- removeProp: function(t) {
- return t = e.propFix[t] || t, this.each(function() {
- try {
- this[t] = void 0, delete this[t]
- } catch (e) {}
- })
- }
- }), e.extend({
- propFix: {
- "for": "htmlFor",
- "class": "className"
- },
- prop: function(t, n, r) {
- var a, i, s, o = t.nodeType;
- if (t && 3 !== o && 8 !== o && 2 !== o) return s = 1 !== o || !e.isXMLDoc(t), s && (n = e.propFix[n] || n, i = e.propHooks[n]), void 0 !== r ? i && "set" in i && void 0 !== (a = i.set(t, r, n)) ? a : t[n] = r : i && "get" in i && null !== (a = i.get(t, n)) ? a : t[n]
- },
- propHooks: {
- tabIndex: {
- get: function(t) {
- var n = e.find.attr(t, "tabindex");
- return n ? parseInt(n, 10) : yt.test(t.nodeName) || gt.test(t.nodeName) && t.href ? 0 : -1
- }
- }
- }
- }), r.hrefNormalized || e.each(["href", "src"], function(t, n) {
- e.propHooks[n] = {
- get: function(e) {
- return e.getAttribute(n, 4)
- }
- }
- }), r.optSelected || (e.propHooks.selected = {
- get: function(e) {
- var t = e.parentNode;
- return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null
- }
- }), e.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
- e.propFix[this.toLowerCase()] = this
- }), r.enctype || (e.propFix.enctype = "encoding");
- var ae = /[\t\r\n\f]/g;
- e.fn.extend({
- addClass: function(t) {
- var l, n, r, a, s, o, i = 0,
- d = this.length,
- u = "string" == typeof t && t;
- if (e.isFunction(t)) return this.each(function(n) {
- e(this).addClass(t.call(this, n, this.className))
- });
- if (u)
- for (l = (t || "").match(c) || []; d > i; i++)
- if (n = this[i], r = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(ae, " ") : " ")) {
- s = 0;
- while (a = l[s++]) r.indexOf(" " + a + " ") < 0 && (r += a + " ");
- o = e.trim(r), n.className !== o && (n.className = o)
- };
- return this
- },
- removeClass: function(t) {
- var l, n, r, a, s, o, i = 0,
- d = this.length,
- u = 0 === arguments.length || "string" == typeof t && t;
- if (e.isFunction(t)) return this.each(function(n) {
- e(this).removeClass(t.call(this, n, this.className))
- });
- if (u)
- for (l = (t || "").match(c) || []; d > i; i++)
- if (n = this[i], r = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(ae, " ") : "")) {
- s = 0;
- while (a = l[s++])
- while (r.indexOf(" " + a + " ") >= 0) r = r.replace(" " + a + " ", " ");
- o = t ? e.trim(r) : "", n.className !== o && (n.className = o)
- };
- return this
- },
- toggleClass: function(t, n) {
- var r = typeof t;
- return "boolean" == typeof n && "string" === r ? n ? this.addClass(t) : this.removeClass(t) : this.each(e.isFunction(t) ? function(r) {
- e(this).toggleClass(t.call(this, r, this.className, n), n)
- } : function() {
- if ("string" === r) {
- var n, a = 0,
- i = e(this),
- o = t.match(c) || [];
- while (n = o[a++]) i.hasClass(n) ? i.removeClass(n) : i.addClass(n)
- } else(r === u || "boolean" === r) && (this.className && e.e$(this, "__className__", this.className), this.className = this.className || t === !1 ? "" : e.e$(this, "__className__") || "")
- })
- },
- hasClass: function(e) {
- for (var r = " " + e + " ", t = 0, n = this.length; n > t; t++)
- if (1 === this[t].nodeType && (" " + this[t].className + " ").replace(ae, " ").indexOf(r) >= 0) return !0;
- return !1
- }
- }), e.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(t, n) {
- e.fn[n] = function(e, t) {
- return arguments.length > 0 ? this.on(n, null, e, t) : this.trigger(n)
- }
- }), e.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, r) {
- return this.on(t, e, n, r)
- },
- undelegate: function(e, t, n) {
- return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n)
- }
- });
- var oe = e.now(),
- le = /\?/,
- ht = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
- e.parseJSON = function(n) {
- if (t.JSON && t.JSON.parse) return t.JSON.parse(n + "");
- var o, r = null,
- i = e.trim(n + "");
- return i && !e.trim(i.replace(ht, function(e, t, n, i) {
- return o && t && (r = 0), 0 === r ? e : (o = n || t, r += !i - !n, "")
- })) ? Function("return " + i)() : e.error("Invalid JSON: " + n)
- }, e.parseXML = function(n) {
- var i, o;
- if (!n || "string" != typeof n) return null;
- try {
- t.DOMParser ? (o = new DOMParser, i = o.parseFromString(n, "text/xml")) : (i = new ActiveXObject("Microsoft.XMLDOM"), i.async = "false", i.loadXML(n))
- } catch (r) {
- i = void 0
- };
- return i && i.documentElement && !i.getElementsByTagName("parsererror").length || e.error("Invalid XML: " + n), i
- };
- var x, p, Tt = /#.*$/,
- Ve = /([?&])_=[^&]*/,
- St = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
- Lt = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- Dt = /^(?:GET|HEAD)$/,
- bt = /^\/\//,
- Xe = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
- rt = {}, K = {}, tt = "*/".concat("*");
- try {
- p = location.href
- } catch (o) {
- p = i.createElement("a"), p.href = "", p = p.href
- };
- x = Xe.exec(p.toLowerCase()) || [];
- function Ee(t) {
- return function(n, r) {
- "string" != typeof n && (r = n, n = "*");
- var i, a = 0,
- o = n.toLowerCase().match(c) || [];
- if (e.isFunction(r))
- while (i = o[a++]) "+" === i.charAt(0) ? (i = i.slice(1) || "*", (t[i] = t[i] || []).unshift(r)) : (t[i] = t[i] || []).push(r)
- }
- };
- function Ne(t, n, r, i) {
- var o = {}, s = t === K;
- function a(l) {
- var u;
- return o[l] = !0, e.each(t[l] || [], function(e, t) {
- var l = t(n, r, i);
- return "string" != typeof l || s || o[l] ? s ? !(u = l) : void 0 : (n.dataTypes.unshift(l), a(l), !1)
- }), u
- };
- return a(n.dataTypes[0]) || !o["*"] && a("*")
- };
- function ne(t, n) {
- var i, r, o = e.ajaxSettings.flatOptions || {};
- for (r in n) void 0 !== n[r] && ((o[r] ? t : i || (i = {}))[r] = n[r]);
- return i && e.extend(!0, t, i), t
- };
- function dt(e, t, n) {
- var s, a, i, o, l = e.contents,
- r = e.dataTypes;
- while ("*" === r[0]) r.shift(), void 0 === a && (a = e.mimeType || t.getResponseHeader("Content-Type"));
- if (a)
- for (o in l)
- if (l[o] && l[o].test(a)) {
- r.unshift(o);
- break
- };
- if (r[0] in n) i = r[0];
- else {
- for (o in n) {
- if (!r[0] || e.converters[o + " " + r[0]]) {
- i = o;
- break
- };
- s || (s = o)
- };
- i = i || s
- };
- return i ? (i !== r[0] && r.unshift(i), n[i]) : void 0
- };
- function ft(e, t, n, r) {
- var c, o, a, u, l, s = {}, d = e.dataTypes.slice();
- if (d[1])
- for (a in e.converters) s[a.toLowerCase()] = e.converters[a];
- o = d.shift();
- while (o)
- if (e.responseFields[o] && (n[e.responseFields[o]] = t), !l && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = o, o = d.shift())
- if ("*" === o) o = l;
- else if ("*" !== l && l !== o) {
- if (a = s[l + " " + o] || s["* " + o], !a)
- for (c in s)
- if (u = c.split(" "), u[1] === o && (a = s[l + " " + u[0]] || s["* " + u[0]])) {
- a === !0 ? a = s[c] : s[c] !== !0 && (o = u[0], d.unshift(u[1]));
- break
- };
- if (a !== !0)
- if (a && e["throws"]) t = a(t);
- else try {
- t = a(t)
- } catch (i) {
- return {
- state: "parsererror",
- error: a ? i : "No conversion from " + l + " to " + o
- }
- }
- };
- return {
- state: "success",
- data: t
- }
- };
- e.extend({
- active: 0,
- lastModified: {},
- etag: {},
- ajaxSettings: {
- url: p,
- type: "GET",
- isLocal: Lt.test(x[1]),
- global: !0,
- processData: !0,
- async: !0,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- accepts: {
- "*": tt,
- 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": e.parseJSON,
- "text xml": e.parseXML
- },
- flatOptions: {
- url: !0,
- context: !0
- }
- },
- ajaxSetup: function(t, n) {
- return n ? ne(ne(t, e.ajaxSettings), n) : ne(e.ajaxSettings, t)
- },
- ajaxPrefilter: Ee(rt),
- ajaxTransport: Ee(K),
- ajax: function(t, n) {
- "object" == typeof t && (n = t, t = void 0), n = n || {};
- var u, d, a, w, y, f, h, v, r = e.ajaxSetup({}, n),
- l = r.context || r,
- b = r.context && (l.nodeType || l.jquery) ? e(l) : e.event,
- T = e.Deferred(),
- k = e.Callbacks("once memory"),
- g = r.statusCode || {}, C = {}, N = {}, s = 0,
- E = "canceled",
- i = {
- readyState: 0,
- getResponseHeader: function(e) {
- var t;
- if (2 === s) {
- if (!v) {
- v = {};
- while (t = St.exec(w)) v[t[1].toLowerCase()] = t[2]
- };
- t = v[e.toLowerCase()]
- };
- return null == t ? null : t
- },
- getAllResponseHeaders: function() {
- return 2 === s ? w : null
- },
- setRequestHeader: function(e, t) {
- var n = e.toLowerCase();
- return s || (e = N[n] = N[n] || e, C[e] = t), this
- },
- overrideMimeType: function(e) {
- return s || (r.mimeType = e), this
- },
- statusCode: function(e) {
- var t;
- if (e)
- if (2 > s)
- for (t in e) g[t] = [g[t], e[t]];
- else i.always(e[i.status]);
- return this
- },
- abort: function(e) {
- var t = e || E;
- return h && h.abort(t), m(0, t), this
- }
- };
- if (T.promise(i).complete = k.add, i.success = i.done, i.error = i.fail, r.url = ((t || r.url || p) + "").replace(Tt, "").replace(bt, x[1] + "//"), r.type = n.method || n.type || r.method || r.type, r.dataTypes = e.trim(r.dataType || "*").toLowerCase().match(c) || [""], null == r.crossDomain && (u = Xe.exec(r.url.toLowerCase()), r.crossDomain = !(!u || u[1] === x[1] && u[2] === x[2] && (u[3] || ("http:" === u[1] ? "80" : "443")) === (x[3] || ("http:" === x[1] ? "80" : "443")))), r.data && r.processData && "string" != typeof r.data && (r.data = e.param(r.data, r.traditional)), Ne(rt, r, n, i), 2 === s) return i;
- f = r.global, f && 0 === e.active++ && e.event.trigger("ajaxStart"), r.type = r.type.toUpperCase(), r.hasContent = !Dt.test(r.type), a = r.url, r.hasContent || (r.data && (a = r.url += (le.test(a) ? "&" : "?") + r.data, delete r.data), r.cache === !1 && (r.url = Ve.test(a) ? a.replace(Ve, "$1_=" + oe++) : a + (le.test(a) ? "&" : "?") + "_=" + oe++)), r.ifModified && (e.lastModified[a] && i.setRequestHeader("If-Modified-Since", e.lastModified[a]), e.etag[a] && i.setRequestHeader("If-None-Match", e.etag[a])), (r.data && r.hasContent && r.contentType !== !1 || n.contentType) && i.setRequestHeader("Content-Type", r.contentType), i.setRequestHeader("Accept", r.dataTypes[0] && r.accepts[r.dataTypes[0]] ? r.accepts[r.dataTypes[0]] + ("*" !== r.dataTypes[0] ? ", " + tt + "; q=0.01" : "") : r.accepts["*"]);
- for (d in r.headers) i.setRequestHeader(d, r.headers[d]);
- if (r.beforeSend && (r.beforeSend.call(l, i, r) === !1 || 2 === s)) return i.abort();
- E = "abort";
- for (d in {
- success: 1,
- error: 1,
- complete: 1
- }) i[d](r[d]);
- if (h = Ne(K, r, n, i)) {
- i.readyState = 1, f && b.trigger("ajaxSend", [i, r]), r.async && r.timeout > 0 && (y = setTimeout(function() {
- i.abort("timeout")
- }, r.timeout));
- try {
- s = 1, h.send(C, m)
- } catch (o) {
- if (!(2 > s)) throw o;
- m(-1, o)
- }
- } else m(-1, "No Transport");
- function m(t, n, o, u) {
- var d, x, v, m, p, c = n;
- 2 !== s && (s = 2, y && clearTimeout(y), h = void 0, w = u || "", i.readyState = t > 0 ? 4 : 0, d = t >= 200 && 300 > t || 304 === t, o && (m = dt(r, i, o)), m = ft(r, m, i, d), d ? (r.ifModified && (p = i.getResponseHeader("Last-Modified"), p && (e.lastModified[a] = p), p = i.getResponseHeader("etag"), p && (e.etag[a] = p)), 204 === t || "HEAD" === r.type ? c = "nocontent" : 304 === t ? c = "notmodified" : (c = m.state, x = m.data, v = m.error, d = !v)) : (v = c, (t || !c) && (c = "error", 0 > t && (t = 0))), i.status = t, i.statusText = (n || c) + "", d ? T.resolveWith(l, [x, c, i]) : T.rejectWith(l, [i, c, v]), i.statusCode(g), g = void 0, f && b.trigger(d ? "ajaxSuccess" : "ajaxError", [i, r, d ? x : v]), k.fireWith(l, [i, c]), f && (b.trigger("ajaxComplete", [i, r]), --e.active || e.event.trigger("ajaxStop")))
- };
- return i
- },
- getJSON: function(t, n, r) {
- return e.get(t, n, r, "json")
- },
- getScript: function(t, n) {
- return e.get(t, void 0, n, "script")
- }
- }), e.each(["get", "post"], function(t, n) {
- e[n] = function(t, r, i, o) {
- return e.isFunction(r) && (o = o || i, i = r, r = void 0), e.ajax({
- url: t,
- type: n,
- dataType: o,
- data: r,
- success: i
- })
- }
- }), e.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(t, n) {
- e.fn[n] = function(e) {
- return this.on(n, e)
- }
- }), e.a$ = function(t) {
- return e.ajax({
- url: t,
- type: "GET",
- dataType: "script",
- async: !1,
- global: !1,
- "throws": !0
- })
- }, e.fn.extend({
- wrapAll: function(t) {
- if (e.isFunction(t)) return this.each(function(n) {
- e(this).wrapAll(t.call(this, n))
- });
- if (this[0]) {
- var n = e(t, this[0].ownerDocument).eq(0).clone(!0);
- this[0].parentNode && n.insertBefore(this[0]), n.map(function() {
- var e = this;
- while (e.firstChild && 1 === e.firstChild.nodeType) e = e.firstChild;
- return e
- }).append(this)
- };
- return this
- },
- wrapInner: function(t) {
- return this.each(e.isFunction(t) ? function(n) {
- e(this).wrapInner(t.call(this, n))
- } : function() {
- var r = e(this),
- n = r.contents();
- n.length ? n.wrapAll(t) : r.append(t)
- })
- },
- wrap: function(t) {
- var n = e.isFunction(t);
- return this.each(function(r) {
- e(this).wrapAll(n ? t.call(this, r) : t)
- })
- },
- unwrap: function() {
- return this.parent().each(function() {
- e.nodeName(this, "body") || e(this).replaceWith(this.childNodes)
- }).end()
- }
- }), e.expr.filters.hidden = function(t) {
- return t.offsetWidth <= 0 && t.offsetHeight <= 0 || !r.reliableHiddenOffsets() && "none" === (t.style && t.style.display || e.css(t, "display"))
- }, e.expr.filters.visible = function(t) {
- return !e.expr.filters.hidden(t)
- };
- var jt = /%20/g,
- kt = /\[\]$/,
- it = /\r?\n/g,
- Ht = /^(?:submit|button|image|reset|file)$/i,
- Nt = /^(?:input|select|textarea|keygen)/i;
- function te(t, n, r, i) {
- var o;
- if (e.isArray(n)) e.each(n, function(e, n) {
- r || kt.test(t) ? i(t, n) : te(t + "[" + ("object" == typeof n ? e : "") + "]", n, r, i)
- });
- else if (r || "object" !== e.type(n)) i(t, n);
- else
- for (o in n) te(t + "[" + o + "]", n[o], r, i)
- };
- e.param = function(t, n) {
- var i, r = [],
- o = function(t, n) {
- n = e.isFunction(n) ? n() : null == n ? "" : n, r[r.length] = encodeURIComponent(t) + "=" + encodeURIComponent(n)
- };
- if (void 0 === n && (n = e.ajaxSettings && e.ajaxSettings.traditional), e.isArray(t) || t.jquery && !e.isPlainObject(t)) e.each(t, function() {
- o(this.name, this.value)
- });
- else
- for (i in t) te(i, t[i], n, o);
- return r.join("&").replace(jt, "+")
- }, e.fn.extend({
- serialize: function() {
- return e.param(this.serializeArray())
- },
- serializeArray: function() {
- return this.map(function() {
- var t = e.prop(this, "elements");
- return t ? e.makeArray(t) : this
- }).filter(function() {
- var t = this.type;
- return this.name && !e(this).is(":disabled") && Nt.test(this.nodeName) && !Ht.test(t) && (this.checked || !Z.test(t))
- }).map(function(t, n) {
- var r = e(this).val();
- return null == r ? null : e.isArray(r) ? e.map(r, function(e) {
- return {
- name: n.name,
- value: e.replace(it, "\r\n")
- }
- }) : {
- name: n.name,
- value: r.replace(it, "\r\n")
- }
- }).get()
- }
- }), e.ajaxSettings.xhr = void 0 !== t.ActiveXObject ? function() {
- return !this.isLocal && /^(get|post|head|put|delete|options)$/i.test(this.type) && Ce() || pt()
- } : Ce;
- var At = 0,
- H = {}, A = e.ajaxSettings.xhr();
- t.ActiveXObject && e(t).on("unload", function() {
- for (var e in H) H[e](void 0, !0)
- }), r.cors = !! A && "withCredentials" in A, A = r.ajax = !! A, A && e.ajaxTransport(function(t) {
- if (!t.crossDomain || r.cors) {
- var n;
- return {
- send: function(r, i) {
- var a, o = t.xhr(),
- s = ++At;
- if (o.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields)
- for (a in t.xhrFields) o[a] = t.xhrFields[a];
- t.mimeType && o.overrideMimeType && o.overrideMimeType(t.mimeType), t.crossDomain || r["X-Requested-With"] || (r["X-Requested-With"] = "XMLHttpRequest");
- for (a in r) void 0 !== r[a] && o.setRequestHeader(a, r[a] + "");
- o.send(t.hasContent && t.data || null), n = function(r, a) {
- var u, d, c;
- if (n && (a || 4 === o.readyState))
- if (delete H[s], n = void 0, o.onreadystatechange = e.noop, a) 4 !== o.readyState && o.abort();
- else {
- c = {}, u = o.status, "string" == typeof o.responseText && (c.text = o.responseText);
- try {
- d = o.statusText
- } catch (l) {
- d = ""
- };
- u || !t.isLocal || t.crossDomain ? 1223 === u && (u = 204) : u = c.text ? 200 : 404
- };
- c && i(u, d, c, o.getAllResponseHeaders())
- }, t.async ? 4 === o.readyState ? setTimeout(n) : o.onreadystatechange = H[s] = n : n()
- },
- abort: function() {
- n && n(void 0, !0)
- }
- }
- }
- });
- function Ce() {
- try {
- return new t.XMLHttpRequest
- } catch (e) {}
- };
- function pt() {
- try {
- return new t.ActiveXObject("Microsoft.XMLHTTP")
- } catch (e) {}
- };
- e.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function(t) {
- return e.globalEval(t), t
- }
- }
- }), e.ajaxPrefilter("script", function(e) {
- void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1)
- }), e.ajaxTransport("script", function(t) {
- if (t.crossDomain) {
- var n, r = i.head || e("head")[0] || i.documentElement;
- return {
- send: function(e, o) {
- n = i.createElement("script"), n.async = !0, t.scriptCharset && (n.charset = t.scriptCharset), n.src = t.url, n.onload = n.onreadystatechange = function(e, t) {
- (t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, n.parentNode && n.parentNode.removeChild(n), n = null, t || o(200, "success"))
- }, r.insertBefore(n, r.firstChild)
- },
- abort: function() {
- n && n.onload(void 0, !0)
- }
- }
- }
- });
- var st = [],
- ee = /(=)\?(?=&|$)|\?\?/;
- e.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var t = st.pop() || e.expando + "_" + oe++;
- return this[t] = !0, t
- }
- }), e.ajaxPrefilter("json jsonp", function(n, r, i) {
- var o, s, a, l = n.jsonp !== !1 && (ee.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && ee.test(n.data) && "data");
- return l || "jsonp" === n.dataTypes[0] ? (o = n.jsonpCallback = e.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, l ? n[l] = n[l].replace(ee, "$1" + o) : n.jsonp !== !1 && (n.url += (le.test(n.url) ? "&" : "?") + n.jsonp + "=" + o), n.converters["script json"] = function() {
- return a || e.error(o + " was not called"), a[0]
- }, n.dataTypes[0] = "json", s = t[o], t[o] = function() {
- a = arguments
- }, i.always(function() {
- t[o] = s, n[o] && (n.jsonpCallback = r.jsonpCallback, st.push(o)), a && e.isFunction(s) && s(a[0]), a = s = void 0
- }), "script") : void 0
- }), e.parseHTML = function(t, n, r) {
- if (!t || "string" != typeof t) return null;
- "boolean" == typeof n && (r = n, n = !1), n = n || i;
- var a = ce.exec(t),
- o = !r && [];
- return a ? [n.createElement(a[1])] : (a = e.buildFragment([t], n, o), o && o.length && e(o).remove(), e.merge([], a.childNodes))
- };
- var ut = e.fn.load;
- e.fn.load = function(t, n, r) {
- if ("string" != typeof t && ut) return ut.apply(this, arguments);
- var a, s, l, o = this,
- i = t.indexOf(" ");
- return i >= 0 && (a = e.trim(t.slice(i, t.length)), t = t.slice(0, i)), e.isFunction(n) ? (r = n, n = void 0) : n && "object" == typeof n && (l = "POST"), o.length > 0 && e.ajax({
- url: t,
- type: l,
- dataType: "html",
- data: n
- }).done(function(t) {
- s = arguments, o.html(a ? e("<div>").append(e.parseHTML(t)).find(a) : t)
- }).complete(r && function(e, t) {
- o.each(r, s || [e.responseText, t, e])
- }), this
- }, e.expr.filters.animated = function(t) {
- return e.grep(e.timers, function(e) {
- return t === e.elem
- }).length
- };
- var lt = t.document.documentElement;
- function Te(t) {
- return e.isWindow(t) ? t : 9 === t.nodeType ? t.defaultView || t.parentWindow : !1
- };
- e.offset = {
- setOffset: function(t, n, r) {
- var c, d, f, u, i, a, p, l = e.css(t, "position"),
- s = e(t),
- o = {};
- "static" === l && (t.style.position = "relative"), i = s.offset(), f = e.css(t, "top"), a = e.css(t, "left"), p = ("absolute" === l || "fixed" === l) && e.inArray("auto", [f, a]) > -1, p ? (c = s.position(), u = c.top, d = c.left) : (u = parseFloat(f) || 0, d = parseFloat(a) || 0), e.isFunction(n) && (n = n.call(t, r, i)), null != n.top && (o.top = n.top - i.top + u), null != n.left && (o.left = n.left - i.left + d), "using" in n ? n.using.call(t, o) : s.css(o)
- }
- }, e.fn.extend({
- offset: function(t) {
- if (arguments.length) return void 0 === t ? this : this.each(function(n) {
- e.offset.setOffset(this, t, n)
- });
- var n, a, i = {
- top: 0,
- left: 0
- }, r = this[0],
- o = r && r.ownerDocument;
- if (o) return n = o.documentElement, e.contains(n, r) ? (typeof r.getBoundingClientRect !== u && (i = r.getBoundingClientRect()), a = Te(o), {
- top: i.top + (a.pageYOffset || n.scrollTop) - (n.clientTop || 0),
- left: i.left + (a.pageXOffset || n.scrollLeft) - (n.clientLeft || 0)
- }) : i
- },
- position: function() {
- if (this[0]) {
- var n, i, t = {
- top: 0,
- left: 0
- }, r = this[0];
- return "fixed" === e.css(r, "position") ? i = r.getBoundingClientRect() : (n = this.offsetParent(), i = this.offset(), e.nodeName(n[0], "html") || (t = n.offset()), t.top += e.css(n[0], "borderTopWidth", !0), t.left += e.css(n[0], "borderLeftWidth", !0)), {
- top: i.top - t.top - e.css(r, "marginTop", !0),
- left: i.left - t.left - e.css(r, "marginLeft", !0)
- }
- }
- },
- offsetParent: function() {
- return this.map(function() {
- var t = this.offsetParent || lt;
- while (t && !e.nodeName(t, "html") && "static" === e.css(t, "position")) t = t.offsetParent;
- return t || lt
- })
- }
- }), e.each({
- scrollLeft: "pageXOffset",
- scrollTop: "pageYOffset"
- }, function(t, n) {
- var r = /Y/.test(n);
- e.fn[t] = function(i) {
- return v(this, function(t, i, o) {
- var a = Te(t);
- return void 0 === o ? a ? n in a ? a[n] : a.document.documentElement[i] : t[i] : void(a ? a.scrollTo(r ? e(a).scrollLeft() : o, r ? o : e(a).scrollTop()) : t[i] = o)
- }, t, i, arguments.length, null)
- }
- }), e.each(["top", "left"], function(t, n) {
- e.cssHooks[n] = Se(r.pixelPosition, function(t, r) {
- return r ? (r = g(t, n), I.test(r) ? e(t).position()[n] + "px" : r) : void 0
- })
- }), e.each({
- Height: "height",
- Width: "width"
- }, function(t, n) {
- e.each({
- padding: "inner" + t,
- content: n,
- "": "outer" + t
- }, function(r, i) {
- e.fn[i] = function(i, o) {
- var s = arguments.length && (r || "boolean" != typeof i),
- a = r || (i === !0 || o === !0 ? "margin" : "border");
- return v(this, function(n, r, i) {
- var o;
- return e.isWindow(n) ? n.document.documentElement["client" + t] : 9 === n.nodeType ? (o = n.documentElement, Math.max(n.body["scroll" + t], o["scroll" + t], n.body["offset" + t], o["offset" + t], o["client" + t])) : void 0 === i ? e.css(n, r, a) : e.style(n, r, i, a)
- }, n, s ? i : void 0, s, null)
- }
- })
- }), e.fn.size = function() {
- return this.length
- }, e.fn.andSelf = e.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() {
- return e
- });
- var mt = t.jQuery,
- vt = t.$;
- return e.noConflict = function(n) {
- return t.$ === e && (t.$ = vt), n && t.jQuery === e && (t.jQuery = mt), e
- }, typeof n === u && (t.jQuery = t.$ = e), e
- });
- /*!
- * jQuery Cookie Plugin v1.4.1
- * https://github.com/carhartl/jquery-cookie
- *
- * Copyright 2013 Klaus Hartl
- * Released under the MIT license
- */
- (function(e) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery'], e)
- } else if (typeof exports === 'object') {
- e(require('jquery'))
- } else {
- e(jQuery)
- }
- }(function(e) {
- var o = /\+/g;
- function r(e) {
- return n.raw ? e : encodeURIComponent(e)
- };
- function c(e) {
- return n.raw ? e : decodeURIComponent(e)
- };
- function u(e) {
- return r(n.json ? JSON.stringify(e) : String(e))
- };
- function t(e) {
- if (e.indexOf('"') === 0) {
- e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\')
- };
- try {
- e = decodeURIComponent(e.replace(o, ' '));
- return n.json ? JSON.parse(e) : e
- } catch (i) {}
- };
- function i(i, r) {
- var o = n.raw ? i : t(i);
- return e.isFunction(r) ? r(o) : o
- };
- var n = e.cookie = function(o, f, t) {
- if (f !== undefined && !e.isFunction(f)) {
- t = e.extend({}, n.defaults, t);
- if (typeof t.expires === 'number') {
- var k = t.expires,
- y = t.expires = new Date();
- y.setTime(+y + k * 864e+5)
- };
- return (document.cookie = [r(o), '=', u(f), t.expires ? '; expires=' + t.expires.toUTCString() : '', t.path ? '; path=' + t.path : '', t.domain ? '; domain=' + t.domain : '', t.secure ? '; secure' : ''].join(''))
- };
- var d = o ? undefined : {};
- var l = document.cookie ? document.cookie.split('; ') : [];
- for (var s = 0, h = l.length; s < h; s++) {
- var p = l[s].split('='),
- m = c(p.shift()),
- a = p.join('=');
- if (o && o === m) {
- d = i(a, f);
- break
- };
- if (!o && (a = i(a)) !== undefined) {
- d[m] = a
- }
- };
- return d
- };
- n.defaults = {};
- e.removeCookie = function(n, i) {
- if (e.cookie(n) === undefined) {
- return !1
- };
- e.cookie(n, '', e.extend({}, i, {
- expires: -1
- }));
- return !e.cookie(n)
- }
- }));
- (function() {
- 'use strict';
- function e(t, i) {
- var c;
- i = i || {};
- this.trackingClick = !1;
- this.trackingClickStart = 0;
- this.targetElement = null;
- this.touchStartX = 0;
- this.touchStartY = 0;
- this.lastTouchIdentifier = 0;
- this.touchBoundary = i.touchBoundary || 10;
- this.layer = t;
- this.tapDelay = i.tapDelay || 200;
- this.tapTimeout = i.tapTimeout || 700;
- if (e.notNeeded(t)) {
- return
- };
- function s(e, t) {
- return function() {
- return e.apply(t, arguments)
- }
- };
- var r = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'],
- a = this;
- for (var o = 0, u = r.length; o < u; o++) {
- a[r[o]] = s(a[r[o]], a)
- };
- if (n) {
- t.addEventListener('mouseover', this.onMouse, !0);
- t.addEventListener('mousedown', this.onMouse, !0);
- t.addEventListener('mouseup', this.onMouse, !0)
- };
- t.addEventListener('click', this.onClick, !0);
- t.addEventListener('touchstart', this.onTouchStart, !1);
- t.addEventListener('touchmove', this.onTouchMove, !1);
- t.addEventListener('touchend', this.onTouchEnd, !1);
- t.addEventListener('touchcancel', this.onTouchCancel, !1);
- if (!Event.prototype.stopImmediatePropagation) {
- t.removeEventListener = function(e, n, i) {
- var o = Node.prototype.removeEventListener;
- if (e === 'click') {
- o.call(t, e, n.hijacked || n, i)
- } else {
- o.call(t, e, n, i)
- }
- };
- t.addEventListener = function(e, n, i) {
- var o = Node.prototype.addEventListener;
- if (e === 'click') {
- o.call(t, e, n.hijacked || (n.hijacked = function(e) {
- if (!e.propagationStopped) {
- n(e)
- }
- }), i)
- } else {
- o.call(t, e, n, i)
- }
- }
- };
- if (typeof t.onclick === 'function') {
- c = t.onclick;
- t.addEventListener('click', function(e) {
- c(e)
- }, !1);
- t.onclick = null
- }
- };
- var o = navigator.userAgent.indexOf('Windows Phone') >= 0,
- n = navigator.userAgent.indexOf('Android') > 0 && !o,
- t = /iP(ad|hone|od)/.test(navigator.userAgent) && !o,
- i = t && (/OS 4_\d(_\d)?/).test(navigator.userAgent),
- a = t && (/OS [6-7]_\d/).test(navigator.userAgent),
- r = navigator.userAgent.indexOf('BB10') > 0;
- e.prototype.needsClick = function(e) {
- switch (e.nodeName.toLowerCase()) {
- case 'button':
- case 'select':
- case 'textarea':
- if (e.disabled) {
- return !0
- };
- break;
- case 'input':
- if ((t && e.type === 'file') || e.disabled) {
- return !0
- };
- break;
- case 'label':
- case 'iframe':
- case 'video':
- return !0
- };
- return (/\bneedsclick\b/).test(e.className)
- };
- e.prototype.needsFocus = function(e) {
- switch (e.nodeName.toLowerCase()) {
- case 'textarea':
- return !0;
- case 'select':
- return !n;
- case 'input':
- switch (e.type) {
- case 'button':
- case 'checkbox':
- case 'file':
- case 'image':
- case 'radio':
- case 'submit':
- return !1
- };
- return !e.disabled && !e.readOnly;
- default:
- return (/\bneedsfocus\b/).test(e.className)
- }
- };
- e.prototype.sendClick = function(e, t) {
- var i, n;
- if (document.activeElement && document.activeElement !== e) {
- document.activeElement.blur()
- };
- n = t.changedTouches[0];
- i = document.createEvent('MouseEvents');
- i.initMouseEvent(this.determineEventType(e), !0, !0, window, 1, n.screenX, n.screenY, n.clientX, n.clientY, !1, !1, !1, !1, 0, null);
- i.forwardedTouchEvent = !0;
- e.dispatchEvent(i)
- };
- e.prototype.determineEventType = function(e) {
- if (n && e.tagName.toLowerCase() === 'select') {
- return 'mousedown'
- };
- return 'click'
- };
- e.prototype.focus = function(e) {
- var n;
- if (t && e.setSelectionRange && e.type.indexOf('date') !== 0 && e.type !== 'time' && e.type !== 'month') {
- n = e.value.length;
- e.setSelectionRange(n, n)
- } else {
- e.focus()
- }
- };
- e.prototype.updateScrollParent = function(e) {
- var n, t;
- n = e.fastClickScrollParent;
- if (!n || !n.contains(e)) {
- t = e;
- do {
- if (t.scrollHeight > t.offsetHeight) {
- n = t;
- e.fastClickScrollParent = t;
- break
- };
- t = t.parentElement
- } while (t);
- };
- if (n) {
- n.fastClickLastScrollTop = n.scrollTop
- }
- };
- e.prototype.getTargetElementFromEventTarget = function(e) {
- if (e.nodeType === Node.TEXT_NODE) {
- return e.parentNode
- };
- return e
- };
- e.prototype.onTouchStart = function(e) {
- var r, n, o;
- if (e.targetTouches.length > 1) {
- return !0
- };
- r = this.getTargetElementFromEventTarget(e.target);
- n = e.targetTouches[0];
- if (t) {
- o = window.getSelection();
- if (o.rangeCount && !o.isCollapsed) {
- return !0
- };
- if (!i) {
- if (n.identifier && n.identifier === this.lastTouchIdentifier) {
- e.preventDefault();
- return !1
- };
- this.lastTouchIdentifier = n.identifier;
- this.updateScrollParent(r)
- }
- };
- this.trackingClick = !0;
- this.trackingClickStart = e.timeStamp;
- this.targetElement = r;
- this.touchStartX = n.pageX;
- this.touchStartY = n.pageY;
- if ((e.timeStamp - this.lastClickTime) < this.tapDelay) {
- e.preventDefault()
- };
- return !0
- };
- e.prototype.touchHasMoved = function(e) {
- var n = e.changedTouches[0],
- t = this.touchBoundary;
- if (Math.abs(n.pageX - this.touchStartX) > t || Math.abs(n.pageY - this.touchStartY) > t) {
- return !0
- };
- return !1
- };
- e.prototype.onTouchMove = function(e) {
- if (!this.trackingClick) {
- return !0
- };
- if (this.targetElement !== this.getTargetElementFromEventTarget(e.target) || this.touchHasMoved(e)) {
- this.trackingClick = !1;
- this.targetElement = null
- };
- return !0
- };
- e.prototype.findControl = function(e) {
- if (e.control !== undefined) {
- return e.control
- };
- if (e.htmlFor) {
- return document.getElementById(e.htmlFor)
- };
- return e.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea')
- };
- e.prototype.onTouchEnd = function(e) {
- var s, l, c, r, u, o = this.targetElement;
- if (!this.trackingClick) {
- return !0
- };
- if ((e.timeStamp - this.lastClickTime) < this.tapDelay) {
- this.cancelNextClick = !0;
- return !0
- };
- if ((e.timeStamp - this.trackingClickStart) > this.tapTimeout) {
- return !0
- };
- this.cancelNextClick = !1;
- this.lastClickTime = e.timeStamp;
- l = this.trackingClickStart;
- this.trackingClick = !1;
- this.trackingClickStart = 0;
- if (a) {
- u = e.changedTouches[0];
- o = document.elementFromPoint(u.pageX - window.pageXOffset, u.pageY - window.pageYOffset) || o;
- o.fastClickScrollParent = this.targetElement.fastClickScrollParent
- };
- c = o.tagName.toLowerCase();
- if (c === 'label') {
- s = this.findControl(o);
- if (s) {
- this.focus(o);
- if (n) {
- return !1
- };
- o = s
- }
- } else if (this.needsFocus(o)) {
- if ((e.timeStamp - l) > 100 || (t && window.top !== window && c === 'input')) {
- this.targetElement = null;
- return !1
- };
- this.focus(o);
- this.sendClick(o, e);
- if (!t || c !== 'select') {
- this.targetElement = null;
- e.preventDefault()
- };
- return !1
- };
- if (t && !i) {
- r = o.fastClickScrollParent;
- if (r && r.fastClickLastScrollTop !== r.scrollTop) {
- return !0
- }
- };
- if (!this.needsClick(o)) {
- e.preventDefault();
- this.sendClick(o, e)
- };
- return !1
- };
- e.prototype.onTouchCancel = function() {
- this.trackingClick = !1;
- this.targetElement = null
- };
- e.prototype.onMouse = function(e) {
- if (!this.targetElement) {
- return !0
- };
- if (e.forwardedTouchEvent) {
- return !0
- };
- if (!e.cancelable) {
- return !0
- };
- if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
- if (e.stopImmediatePropagation) {
- e.stopImmediatePropagation()
- } else {
- e.propagationStopped = !0
- };
- e.stopPropagation();
- e.preventDefault();
- return !1
- };
- return !0
- };
- e.prototype.onClick = function(e) {
- var t;
- if (this.trackingClick) {
- this.targetElement = null;
- this.trackingClick = !1;
- return !0
- };
- if (e.target.type === 'submit' && e.detail === 0) {
- return !0
- };
- t = this.onMouse(e);
- if (!t) {
- this.targetElement = null
- };
- return t
- };
- e.prototype.destroy = function() {
- var e = this.layer;
- if (n) {
- e.removeEventListener('mouseover', this.onMouse, !0);
- e.removeEventListener('mousedown', this.onMouse, !0);
- e.removeEventListener('mouseup', this.onMouse, !0)
- };
- e.removeEventListener('click', this.onClick, !0);
- e.removeEventListener('touchstart', this.onTouchStart, !1);
- e.removeEventListener('touchmove', this.onTouchMove, !1);
- e.removeEventListener('touchend', this.onTouchEnd, !1);
- e.removeEventListener('touchcancel', this.onTouchCancel, !1)
- };
- e.notNeeded = function(e) {
- var t, o, i, a;
- if (typeof window.ontouchstart === 'undefined') {
- return !0
- };
- o = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
- if (o) {
- if (n) {
- t = document.querySelector('meta[name=viewport]');
- if (t) {
- if (t.content.indexOf('user-scalable=no') !== -1) {
- return !0
- };
- if (o > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
- return !0
- }
- }
- } else {
- return !0
- }
- };
- if (r) {
- i = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
- if (i[1] >= 10 && i[2] >= 3) {
- t = document.querySelector('meta[name=viewport]');
- if (t) {
- if (t.content.indexOf('user-scalable=no') !== -1) {
- return !0
- };
- if (document.documentElement.scrollWidth <= window.outerWidth) {
- return !0
- }
- }
- }
- };
- if (e.style.msTouchAction === 'none' || e.style.touchAction === 'manipulation') {
- return !0
- };
- a = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
- if (a >= 27) {
- t = document.querySelector('meta[name=viewport]');
- if (t && (t.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
- return !0
- }
- };
- if (e.style.touchAction === 'none' || e.style.touchAction === 'manipulation') {
- return !0
- };
- return !1
- };
- e.attach = function(t, n) {
- return new e(t, n)
- };
- if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
- define(function() {
- return e
- })
- } else if (typeof module !== 'undefined' && module.exports) {
- module.exports = e.attach;
- module.exports.FastClick = e
- } else {
- window.FastClick = e
- }
- }());;
- $(document).ready(function() {
- $(".fd").click(function() {
- window.location.href = "/ad/usenet"
- });
- if ("ontouchstart" in window) {
- window.addEventListener("load", function() {
- FastClick.attach(document.body)
- }, !1)
- };
- if ("createTouch" in document) {
- var o = jQuery("body");
- o.removeClass("non-touch");
- $("table").removeClass("table-hover")
- };
- if ($(".notice-flash").length > 0) {
- $(".notice-flash").delay(2300).slideUp()
- };
- if ($("noscript").length > 0) {
- $("noscript").remove()
- };
- if ($.cookie("yts_lang") === undefined) {
- $.ajax({
- url: "/languages/detect",
- type: "GET"
- })
- };
- document.body.addEventListener("touchstart", function(e) {
- var t = jQuery("body");
- $(document).on("focus", "input", function(e) {
- t.addClass("fixfixed")
- }).on("blur", "input", function(e) {
- t.removeClass("fixfixed")
- });
- $(document).on("focus", "textarea", function(e) {
- t.addClass("fixfixed")
- }).on("blur", "textarea", function(e) {
- t.removeClass("fixfixed")
- })
- }, !1);
- $(".delete").click(function() {
- var t = $(this).data("confirm-msg"),
- e = confirm(t);
- if (e == !0) {
- return !0
- } else {
- return !1
- }
- });
- $("#mobile-search-btn").click(function() {
- if ($(window).scrollTop() > 25) {
- $("html, body").animate({
- scrollTop: 0
- }, "slow", function() {
- if (!$("#mobile-search-input").is(":visible")) {
- $("#mobile-search-input").delay(150).slideDown("fast")
- }
- })
- } else {
- if ($("#mobile-search-input").is(":visible")) {
- $("#mobile-search-input").slideUp("fast")
- } else {
- $("#mobile-search-input").slideDown("fast")
- }
- }
- });
- $("#quick-search").submit(function() {
- return !1
- });
- $("#quick-search-input").click(function() {
- $(".ac-results").css({
- left: $("#quick-search").position().left
- })
- });
- var a = $("#quick-search-input").val();
- $("#quick-search-input").focus(function() {
- if (a == $("#quick-search-input").val()) {
- $("#quick-search-input").val("")
- } else if ($("#quick-search-input").val().length > 2 && $(".ac-results ul").not(":empty")) {
- $(".ac-results").slideDown()
- };
- $(".ac-results").css({
- left: $("#quick-search").position().left
- })
- });
- $("#quick-search-input").blur(function() {
- if ($("#quick-search-input").val().trim() === "") {
- $("#quick-search-input").val(a)
- }
- });
- $("#quick-search-input").keyup(function(e) {
- var t = e.keyCode || e.which,
- a = {
- up: 38,
- down: 40,
- left: 37,
- right: 39,
- esc: 27,
- enter: 13
- };
- if (t === a.enter || t === a.esc || t === a.up || t === a.down || t === a.left || t === a.right) {
- return !1
- };
- var o = $("#quick-search-input").val();
- if (o.length >= 3) {
- s(function() {
- $(".ajax-spinner").fadeIn("fast");
- $.ajax({
- url: "/ajax/search",
- data: {
- "q": o
- },
- type: "GET",
- success: function(e) {
- var t = "";
- if (e.status === "ok") {
- e.data.forEach(function(e) {
- t += "<li><a href=\"" + e.url + "\"><img src=\"" + e.img + "\"><span>" + e.title + "</span><p>" + e.year + "</p></a></li>"
- })
- } else {
- t = "<li class=\"ac-no-results\">" + e.message + "</li>"
- };
- $(".ac-results ul").html(t);
- if (!$(".ac-results").is(":visible")) {
- $(".ac-results").slideDown()
- };
- $(".ac-results ul li:first-child").addClass("ac-item-hover");
- $(".ac-results ul li:first-child").addClass("ac-item-selected");
- $(".ajax-spinner").fadeOut("fast")
- },
- error: function(e) {
- var t = "";
- t = "<li class=\"ac-no-results\">Error: " + e.statusText + " (Code " + e.status + ")</li>";
- $(".ac-results ul").html(t);
- if ($(".ac-results").not(":visible")) {
- $(".ac-results").slideDown()
- };
- $(".ac-results ul li:first-child").addClass("ac-item-selected");
- $(".ajax-spinner").fadeOut("fast")
- }
- })
- }, 500)
- }
- });
- $(document).keydown(function(e) {
- if ($(".ac-results").is(":visible")) {
- var o = e.keyCode || e.which,
- a = {
- up: 38,
- down: 40,
- esc: 27,
- enter: 13
- };
- if (o === a.esc) {
- $(".ac-results").slideUp();
- return !1
- };
- if (!$(".ac-results li").hasClass("ac-no-results")) {
- var t = $(".ac-results"),
- s = $(".ac-results ul li").hasClass("ac-item-selected"),
- n = $(".ac-results ul li").first().hasClass("ac-item-selected"),
- i = $(".ac-results ul li").last().hasClass("ac-item-selected");
- switch (o) {
- case a.up:
- if (s) {
- if (n) {
- $("li.ac-item-selected", t).removeClass("ac-item-selected");
- $("ul li", t).last().addClass("ac-item-selected");
- break
- };
- $("li.ac-item-selected", t).prev().addClass("ac-item-selected");
- $("li.ac-item-selected", t).next().removeClass("ac-item-selected")
- } else {
- $("ul li", t).last().addClass("ac-item-selected")
- };
- break;
- case a.down:
- if (s) {
- if (i) {
- $("li.ac-item-selected", t).removeClass("ac-item-selected");
- $("ul li", t).first().addClass("ac-item-selected");
- break
- };
- $("li.ac-item-selected", t).next().addClass("ac-item-selected");
- $("li.ac-item-selected", t).prev().removeClass("ac-item-selected")
- } else {
- $("ul li", t).first().addClass("ac-item-selected")
- };
- break;
- case a.enter:
- window.location.href = $("li.ac-item-selected a", t).attr("href");
- break
- }
- }
- }
- });
- $(document).click(function(e) {
- var t = $(e.target);
- if ($(".ac-results").is(":visible") && (0 in t) && t[0].id != "quick-search-input" && e.target.tagName.toLowerCase() !== "a") {
- $(".ac-results").slideUp()
- }
- });
- $(".ac-results ul").on("mouseover", "li", function() {
- $(this).addClass("ac-item-selected").siblings().removeClass("ac-item-selected")
- });
- var s = (function() {
- var e = 0;
- return function(t, a) {
- clearTimeout(e);
- e = setTimeout(t, a)
- }
- })(),
- e = 0;
- setInterval(function() {
- var s = 12,
- a = 16,
- t = e * -a;
- $(".ajax-spinner").css({
- "backgroundPosition": t + "px 0px"
- });
- e++;
- if (e >= s) e = 0
- }, 100);
- $(".modal form").submit(function(e) {
- e.preventDefault()
- });
- $(".modal").click(function(e) {
- if (!$(this).hasClass("modal-busy") && ($(e.target).is(".modal") || $(e.target).is(".modal-close"))) {
- $(this).removeClass("modal-active")
- }
- });
- $(".torrent-modal-download").click(function() {
- $(".modal-download").addClass("modal-active")
- });
- $(".parental-guide-modal").click(function() {
- $(".modal-loading-content").show();
- $(".modal-parental-guide").addClass("modal-active");
- var e = $("#movie-info").data("movie-id");
- if ($(".modal-parental-guide .modal-content .modal-loading-content").length < 1) {
- return
- };
- $.ajax({
- type: "GET",
- url: "/api/v2/movie_parental_guides.json?movie_id=" + e,
- dataType: "json",
- success: function(e) {
- $(".modal-parental-guide .modal-content").text("");
- if (e.data.parental_guide_count > 0) {
- $.each(e.data.parental_guides, function(e, t) {
- $(".modal-parental-guide .modal-content").append("<p><strong>" + t.type + "</strong>: " + t.parental_guide_text + "</p>")
- })
- } else {
- $(".modal-parental-guide .modal-content").text("No parental guides found")
- }
- },
- error: function(e) {
- $(".modal-parental-guide .modal-loading-content").hide();
- if (e.status == 0) {
- e.statusText = "Page did not respond"
- };
- $(".modal-parental-guide .modal-content").text("Error: " + e.statusText + " (Code " + e.status + ")")
- }
- })
- });
- $(".magnet-download").click(function() {
- $.ajax({
- url: "/ajax/download/" + $(this).data("torrent-id"),
- type: "POST"
- })
- });
- $(".login-nav-btn").click(function() {
- $(".modal-auth").addClass("modal-active");
- $("#modal-login").addClass("selected").siblings().removeClass("selected");
- $(".modal-login-content").show().siblings().hide()
- });
- $(".register-nav-btn").click(function() {
- $(".modal-auth").addClass("modal-active");
- $("#modal-register").addClass("selected").siblings().removeClass("selected");
- $(".modal-register-content").show().siblings().hide()
- });
- $(".forgotpassword-nav-btn").click(function() {
- if (!$(".modal-auth").hasClass("modal-busy")) {
- $(".modal-forgotpass-content").show().siblings().hide()
- }
- });
- $("#modal-login").click(function() {
- if (!$(".modal-auth").hasClass("modal-busy")) {
- $(this).addClass("selected").siblings().removeClass("selected");
- $(".modal-login-content").show().siblings().hide()
- }
- });
- $("#modal-register").click(function() {
- if (!$(".modal-auth").hasClass("modal-busy")) {
- $(this).addClass("selected").siblings().removeClass("selected");
- $(".modal-register-content").show().siblings().hide()
- }
- });
- $(".modal-login-content input").keydown(function(e) {
- if (e.keyCode == 13) {
- $(".modal-login-content button").trigger("click")
- }
- });
- $(".modal-login-content button").click(function() {
- $(".modal-auth").addClass("modal-busy");
- $(".modal-login-content .error-msg").text("");
- $(".modal-loading-content").show().siblings().hide();
- var e = {
- "username": $(".modal-login-content input[name='username']").val(),
- "password": $(".modal-login-content input[name='password']").val(),
- "_token": $(".modal-login-content input[name='_token']").val()
- };
- $.ajax({
- url: "/ajax/login",
- data: e,
- type: "POST",
- success: function(e) {
- if (e.status == "ok") {
- window.location.reload()
- } else {
- $(".modal-auth").removeClass("modal-busy");
- $(".modal-login-content input[name='password']").val(""), $(".modal-login-content .error-msg").text("Error: " + e.message);
- $(".modal-login-content").show().siblings().hide()
- }
- },
- error: function(e) {
- if (e.status == 0) {
- e.statusText = "Page did not respond"
- };
- $(".modal-auth").removeClass("modal-busy");
- $(".modal-login-content input[name='password']").val(""), $(".modal-login-content .error-msg").text("Error: " + e.statusText + " (Code " + e.status + ")");
- $(".modal-login-content").show().siblings().hide()
- }
- })
- });
- $(".modal-register-content input").keydown(function(e) {
- if (e.keyCode == 13) {
- $(".modal-register-content button").trigger("click")
- }
- });
- $(".modal-register-content button").click(function() {
- $(".modal-auth").addClass("modal-busy");
- $(".modal-register-content .error-msg").text("");
- $(".modal-loading-content").show().siblings().hide();
- var e = {
- "username": $(".modal-register-content input[name='username']").val(),
- "email": $(".modal-register-content input[name='email']").val(),
- "password": $(".modal-register-content input[name='password']").val(),
- "password_confirmation": $(".modal-register-content input[name='password_confirmation']").val(),
- "_token": $(".modal-register-content input[name='_token']").val()
- };
- $.ajax({
- url: "/ajax/register",
- data: e,
- type: "POST",
- success: function(e) {
- if (e.status == "ok") {
- window.location.reload()
- } else {
- $(".modal-auth").removeClass("modal-busy");
- $(".modal-register-content input[name='password']").val(""), $(".modal-register-content input[name='password_confirmation']").val(""), $(".modal-register-content .error-msg").text("Error: " + e.message);
- $(".modal-register-content").show().siblings().hide()
- }
- },
- error: function(e) {
- $(".modal-auth").removeClass("modal-busy");
- $(".modal-register-content input[name='password']").val(""), $(".modal-register-content input[name='password_confirmation']").val(""), $(".modal-register-content .error-msg").text("Error: " + e.statusText + " (Code " + e.status + ")");
- $(".modal-register-content").show().siblings().hide()
- }
- })
- });
- $(".modal-forgotpass-content input").keydown(function(e) {
- if (e.keyCode == 13) {
- $(".modal-forgotpass-content button").trigger("click")
- }
- });
- $(".modal-forgotpass-content button").click(function() {
- $(".modal-auth").addClass("modal-busy");
- $(".modal-forgotpass-content .error-msg").text("");
- $(".modal-loading-content").show().siblings().hide();
- var e = {
- "email": $(".modal-forgotpass-content input[name='email']").val(),
- "_token": $(".modal-forgotpass-content input[name='_token']").val()
- };
- $.ajax({
- url: "/ajax/forgot-password",
- data: e,
- type: "POST",
- success: function(e) {
- if (e.status == "ok") {
- window.location.reload()
- } else {
- $(".modal-auth").removeClass("modal-busy");
- $(".modal-forgotpass-content .error-msg").text("Error: " + e.message);
- $(".modal-forgotpass-content").show().siblings().hide()
- }
- },
- error: function(e) {
- $(".modal-auth").removeClass("modal-busy");
- $(".modal-forgotpass-content .error-msg").text("Error: " + e.statusText + " (Code " + e.status + ")");
- $(".modal-forgotpass-content").show().siblings().hide()
- }
- })
- });
- $("#movie-info").on("click", ".icon-heart2", function() {
- $.ajax({
- url: "/ajax/like/movie/" + $("#movie-info").data("movie-id"),
- type: "POST"
- });
- $(this).removeClass("icon-heart2").addClass("icon-heart");
- var e = parseInt($("#movie-info #movie-likes").text());
- $("#movie-info #movie-likes").text(e + 1)
- });
- $(".youtube").colorbox({
- iframe: !0,
- innerWidth: 640,
- innerHeight: 390
- });
- $(".screenshot-group").colorbox({
- rel: "screenshot-group",
- maxWidth: "95%",
- maxHeight: "95%"
- });
- $("#movie-tech-specs .tech-quality").click(function() {
- $(this).addClass("selected").siblings().removeClass("selected");
- var e = $(this).index() - 1;
- $("#movie-tech-specs .tech-spec-info").eq(e).removeClass("hidden-tech-info").siblings("div").addClass("hidden-tech-info")
- });
- $(".download-torrent").click(function() {
- $(".modal-download").removeClass("modal-active");
- $(".bookmark").removeClass("bookmarked")
- });
- $("#movie-reviews article").readmore({
- maxHeight: 125
- });
- if (!("createTouch" in document)) {
- $("#comments").addClass("comments-scroll");
- $(".comments-scroll").perfectScrollbar({
- wheelPropagation: !0
- })
- };
- if ($("#movie-comments").length) {
- t()
- };
- $("#comments #load-comments a").click(function() {
- t()
- });
- function t() {
- var a = $("#movie-info").data("movie-id"),
- e = $("#comments .comment").length,
- t = {
- offset: e
- };
- $("#comments #load-comments a").hide();
- $("#comments #load-comments .ajax-spinner").show();
- $.ajax({
- type: "GET",
- url: "/ajax/comments/" + a,
- data: t,
- dataType: "html",
- success: function(t) {
- if (t != "") {
- if (e == 0) {
- $("#comments #no-comments").remove()
- };
- $("#comments #load-comments").before(t);
- if (!("createTouch" in document)) {
- $(".comments-scroll").perfectScrollbar("update")
- };
- $("#comments #load-comments .ajax-spinner").hide();
- var a = $(t).filter(".comment").length;
- if (a == 30 && parseInt($("#comment-count").text()) != 30) {
- $("#comments #load-comments a").show()
- } else {
- $("#comments #load-comments").hide()
- }
- } else {
- $("#comments #load-comments").hide()
- }
- },
- error: function(e) {
- $("#comments #load-comments").hide()
- }
- })
- };
- if (("createTouch" in document)) {
- $("#comments").on("click", ".comment-likes", function() {
- $.ajax({
- url: "/ajax/like/comment/" + $(this).closest(".comment").data("comment-id"),
- type: "POST"
- });
- $(this).find("span.icon-heart2").removeClass("icon-heart2").addClass("icon-heart");
- var e = parseInt($(this).find(".comment-like-count").text());
- $(this).find(".comment-like-count").text(e + 1)
- })
- } else {
- $("#comments").on("click", ".comment-likes span.icon-heart2", function() {
- $.ajax({
- url: "/ajax/like/comment/" + $(this).closest(".comment").data("comment-id"),
- type: "POST"
- });
- $(this).removeClass("icon-heart2").addClass("icon-heart");
- var e = parseInt($(this).siblings(".comment-like-count").text());
- $(this).siblings(".comment-like-count").text(e + 1)
- })
- };
- $("#comments").on("click", ".comment .report-btn", function() {
- var t = $(this).data("confirm-msg"),
- e = confirm(t);
- if (e == !0) {
- $.ajax({
- url: "/ajax/report/comment/" + $(this).closest(".comment").data("comment-id"),
- type: "POST",
- dataType: "json",
- success: function(e) {
- alert(e.message)
- }
- })
- }
- });
- $("#comments").on("click", ".comment .delete-btn", function() {
- var t = $(this).data("confirm-msg"),
- e = confirm(t);
- if (e == !0) {
- $.ajax({
- url: "/ajax/delete/comment/" + $(this).closest(".comment").data("comment-id"),
- type: "POST"
- });
- $(this).closest(".comment").remove()
- }
- });
- $("textarea").not(".tinymce").autogrow();
- $("#comments-box input").click(function() {
- $("#comments-box .error-msg").text("");
- $("#comments-box input").hide();
- $("#comments-box textarea").hide();
- $("#comments-box .ajax-spinner").show();
- var a = $("#movie-info").data("movie-id"),
- e = {
- comment_text: $("#comments-box textarea").val()
- };
- $.ajax({
- type: "POST",
- url: "/ajax/comments/" + a,
- data: e,
- dataType: "json",
- success: function(e) {
- if (e.status == "error") {
- $("#comments-box .error-msg").text(e.message);
- $("#comments-box input").show();
- $("#comments-box textarea").show();
- $("#comments-box .ajax-spinner").hide()
- } else {
- $("#comments-box").text(e.message);
- $("#comment-count").text(parseInt($("#comment-count").text()) + 1);
- t()
- }
- },
- error: function(e) {
- $("#comments-box .error-msg").text("Error: " + e.statusText + " (Code " + e.status + ")");
- $("#comments-box input").show();
- $("#comments-box textarea").show();
- $("#comments-box .ajax-spinner").hide()
- }
- })
- });
- $(".rss-generate").click(function() {
- var t = $("[name=\"rss_keyword\"]").val(),
- o = $("[name=\"rss_quality\"]").val(),
- s = $("[name=\"rss_genre\"]").val(),
- a = $("[name=\"rss_rating\"]").val(),
- e = rssBaseUrl + "/";
- if (t.trim().length < 1) {
- e += "0/"
- } else {
- e += encodeURIComponent(t) + "/"
- };
- e += o + "/" + s + "/" + a;
- $("[name=\"generated_link\"]").val(e);
- $(".generated-rss").fadeIn()
- });
- $(".bookmark").on("click", function() {
- var e = $("#movie-info").data("movie-id");
- if ($(".bookmark").attr("class").indexOf("bookmarked") < 0) {
- $(this).addClass("bookmarked");
- $.ajax({
- type: "POST",
- url: "/ajax/bookmark/add/" + e,
- dataType: "json",
- success: function(e) {
- if ($(".notice-flash").length) {
- $(".notice-flash").text(e.message)
- } else {
- var t = "<div class=\"notice-flash\" style=\"display:none\">" + e.message + "</div>";
- $(".main-content").prepend(t)
- };
- $(".notice-flash").slideDown().delay(2500).slideUp(function() {
- if (e.status != "ok") {
- $(".bookmark").removeClass("bookmarked")
- }
- })
- },
- error: function(e) {
- if ($(".notice-flash").length) {
- $(".notice-flash").text("Error: " + e.statusText + " (Code " + e.status + ")")
- } else {
- var t = "<div class=\"notice-flash\" style=\"display:none\">Error: " + e.statusText + " (Code " + e.status + ")</div>";
- $(".main-content").prepend(t)
- };
- $(".notice-flash").slideDown().delay(2500).slideUp(function() {
- $(".bookmark").removeClass("bookmarked")
- })
- }
- })
- } else {
- $(this).removeClass("bookmarked");
- $.ajax({
- type: "POST",
- url: "/ajax/bookmark/delete/" + e,
- dataType: "json",
- success: function(e) {
- if ($(".notice-flash").length) {
- $(".notice-flash").text(e.message)
- } else {
- var t = "<div class=\"notice-flash\" style=\"display:none\">" + e.message + "</div>";
- $(".main-content").prepend(t)
- };
- $(".notice-flash").slideDown().delay(2500).slideUp()
- }
- })
- }
- });
- $(".delete-bookmark").click(function() {
- var e = $(this).data("movie-id");
- $(this).closest(".browse-movie-wrap").fadeTo(400, 0.1);
- $.ajax({
- type: "POST",
- url: "/ajax/bookmark/delete/" + e,
- dataType: "json"
- })
- });
- $(".mark-suggestion").click(function() {
- var e = $(this).data("movie-id");
- $(this).closest(".browse-movie-wrap").fadeTo(400, 0.1);
- $.ajax({
- type: "POST",
- url: "/ajax/suggestions/mark/" + e,
- dataType: "json"
- })
- });
- $(".admin-search input").focus(function() {
- $(this).val("")
- })
- });
- /*!
- Colorbox v1.5.10 - 2014-06-26
- jQuery lightbox and modal window plugin
- (c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
- license: http://www.opensource.org/licenses/mit-license.php
- */
- (function(t, a, x) {
- var Q = {
- html: !1,
- photo: !1,
- iframe: !1,
- inline: !1,
- transition: 'elastic',
- speed: 300,
- fadeOut: 300,
- width: !1,
- initialWidth: '600',
- innerWidth: !1,
- maxWidth: !1,
- height: !1,
- initialHeight: '450',
- innerHeight: !1,
- maxHeight: !1,
- scalePhotos: !0,
- scrolling: !0,
- opacity: 0.9,
- preloading: !0,
- className: !1,
- overlayClose: !0,
- escKey: !0,
- arrowKey: !0,
- top: !1,
- bottom: !1,
- left: !1,
- right: !1,
- fixed: !1,
- data: undefined,
- closeButton: !0,
- fastIframe: !0,
- open: !1,
- reposition: !0,
- loop: !0,
- slideshow: !1,
- slideshowAuto: !0,
- slideshowSpeed: 2500,
- slideshowStart: 'start slideshow',
- slideshowStop: 'stop slideshow',
- photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
- retinaImage: !1,
- retinaUrl: !1,
- retinaSuffix: '@2x.$1',
- current: 'image {current} of {total}',
- previous: 'previous',
- next: 'next',
- close: 'close',
- xhrError: 'This content failed to load.',
- imgError: 'This image failed to load.',
- returnFocus: !0,
- trapFocus: !0,
- onOpen: !1,
- onLoad: !1,
- onComplete: !1,
- onCleanup: !1,
- onClosed: !1,
- rel: function() {
- return this.rel
- },
- href: function() {
- return t(this).attr('href')
- },
- title: function() {
- return this.title
- }
- }, g = 'colorbox',
- h = 'cbox',
- W = h + 'Element',
- pe = h + '_open',
- N = h + '_load',
- A = h + '_complete',
- J = h + '_cleanup',
- ee = h + '_closed',
- j = h + '_purge',
- C, i, k, u, se, re, oe, te, f, v, l, I, D, ie, ne, E, K, R, O, U, m = t('<a/>'),
- e, w, p, y, b, c, n, T, L, S, fe, s, r = 'div',
- G = 0,
- de = {}, z;
- function o(e, i, o) {
- var n = a.createElement(e);
- if (i) {
- n.id = h + i
- };
- if (o) {
- n.style.cssText = o
- };
- return t(n)
- };
- function q() {
- return x.innerHeight ? x.innerHeight : t(x).height()
- };
- function P(e, i) {
- if (i !== Object(i)) {
- i = {}
- };
- this.cache = {};
- this.el = e;
- this.value = function(e) {
- var n;
- if (this.cache[e] === undefined) {
- n = t(this.el).attr('data-cbox-' + e);
- if (n !== undefined) {
- this.cache[e] = n
- } else if (i[e] !== undefined) {
- this.cache[e] = i[e]
- } else if (Q[e] !== undefined) {
- this.cache[e] = Q[e]
- }
- };
- return this.cache[e]
- };
- this.get = function(e) {
- var i = this.value(e);
- return t.isFunction(i) ? i.call(this.el, this) : i
- }
- };
- function B(e) {
- var i = f.length,
- t = (c + e) % i;
- return (t < 0) ? i + t : t
- };
- function d(e, t) {
- return Math.round((/%/.test(e) ? ((t === 'x' ? v.width() : q()) / 100) : 1) * parseInt(e, 10))
- };
- function ce(e, t) {
- return e.get('photo') || e.get('photoRegex').test(t)
- };
- function le(e, t) {
- return e.get('retinaUrl') && x.devicePixelRatio > 1 ? t.replace(e.get('photoRegex'), e.get('retinaSuffix')) : t
- };
- function ae(e) {
- if ('contains' in i[0] && !i[0].contains(e.target) && e.target !== C[0]) {
- e.stopPropagation();
- i.focus()
- }
- };
- function M(e) {
- if (M.str !== e) {
- i.add(C).removeClass(M.str).addClass(e);
- M.str = e
- }
- };
- function we(i) {
- c = 0;
- if (i && i !== !1 && i !== 'nofollow') {
- f = t('.' + W).filter(function() {
- var n = t.data(this, g),
- e = new P(this, n);
- return (e.get('rel') === i)
- });
- c = f.index(e.el);
- if (c === -1) {
- f = f.add(e.el);
- c = f.length - 1
- }
- } else {
- f = t(e.el)
- }
- };
- function H(e) {
- t(a).trigger(e);
- m.triggerHandler(e)
- };
- var me = (function() {
- var l, t = h + 'Slideshow_',
- o = 'click.' + h,
- d;
- function n() {
- clearTimeout(d)
- };
- function a() {
- if (e.get('loop') || f[c + 1]) {
- n();
- d = setTimeout(s.next, e.get('slideshowSpeed'))
- }
- };
- function u() {
- E.html(e.get('slideshowStop')).unbind(o).one(o, g);
- m.bind(A, a).bind(N, n);
- i.removeClass(t + 'off').addClass(t + 'on')
- };
- function g() {
- n();
- m.unbind(A, a).unbind(N, n);
- E.html(e.get('slideshowStart')).unbind(o).one(o, function() {
- s.next();
- u()
- });
- i.removeClass(t + 'on').addClass(t + 'off')
- };
- function r() {
- l = !1;
- E.hide();
- n();
- m.unbind(A, a).unbind(N, n);
- i.removeClass(t + 'off ' + t + 'on')
- };
- return function() {
- if (l) {
- if (!e.get('slideshow')) {
- m.unbind(J, r);
- r()
- }
- } else {
- if (e.get('slideshow') && f[1]) {
- l = !0;
- m.one(J, r);
- if (e.get('slideshowAuto')) {
- u()
- } else {
- g()
- };
- E.show()
- }
- }
- }
- }());
- function F(n) {
- var h;
- if (!S) {
- h = t(n).data(g);
- e = new P(n, h);
- we(e.get('rel'));
- if (!T) {
- T = L = !0;
- M(e.get('className'));
- i.css({
- visibility: 'hidden',
- display: 'block',
- opacity: ''
- });
- l = o(r, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
- u.css({
- width: '',
- height: ''
- }).append(l);
- w = se.height() + te.height() + u.outerHeight(!0) - u.height();
- p = re.width() + oe.width() + u.outerWidth(!0) - u.width();
- y = l.outerHeight(!0);
- b = l.outerWidth(!0);
- var v = d(e.get('initialWidth'), 'x'),
- c = d(e.get('initialHeight'), 'y'),
- x = e.get('maxWidth'),
- f = e.get('maxHeight');
- e.w = (x !== !1 ? Math.min(v, d(x, 'x')) : v) - b - p;
- e.h = (f !== !1 ? Math.min(c, d(f, 'y')) : c) - y - w;
- l.css({
- width: '',
- height: e.h
- });
- s.position();
- H(pe);
- e.get('onOpen');
- U.add(ie).hide();
- i.focus();
- if (e.get('trapFocus')) {
- if (a.addEventListener) {
- a.addEventListener('focus', ae, !0);
- m.one(ee, function() {
- a.removeEventListener('focus', ae, !0)
- })
- }
- };
- if (e.get('returnFocus')) {
- m.one(ee, function() {
- t(e.el).focus()
- })
- }
- };
- C.css({
- opacity: parseFloat(e.get('opacity')) || '',
- cursor: e.get('overlayClose') ? 'pointer' : '',
- visibility: 'visible'
- }).show();
- if (e.get('closeButton')) {
- O.html(e.get('close')).appendTo(u)
- } else {
- O.appendTo('<div/>')
- };
- ue()
- }
- };
- function he() {
- if (!i && a.body) {
- z = !1;
- v = t(x);
- i = o(r).attr({
- id: g,
- 'class': t.support.opacity === !1 ? h + 'IE' : '',
- role: 'dialog',
- tabindex: '-1'
- }).hide();
- C = o(r, 'Overlay').hide();
- D = t([o(r, 'LoadingOverlay')[0], o(r, 'LoadingGraphic')[0]]);
- k = o(r, 'Wrapper');
- u = o(r, 'Content').append(ie = o(r, 'Title'), ne = o(r, 'Current'), R = t('<button type="button"/>').attr({
- id: h + 'Previous'
- }), K = t('<button type="button"/>').attr({
- id: h + 'Next'
- }), E = o('button', 'Slideshow'), D);
- O = t('<button type="button"/>').attr({
- id: h + 'Close'
- });
- k.append(o(r).append(o(r, 'TopLeft'), se = o(r, 'TopCenter'), o(r, 'TopRight')), o(r, !1, 'clear:left').append(re = o(r, 'MiddleLeft'), u, oe = o(r, 'MiddleRight')), o(r, !1, 'clear:left').append(o(r, 'BottomLeft'), te = o(r, 'BottomCenter'), o(r, 'BottomRight'))).find('div div').css({
- 'float': 'left'
- });
- I = o(r, !1, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
- U = K.add(R).add(ne).add(E);
- t(a.body).append(C, i.append(k, I))
- }
- };
- function ge() {
- function n(e) {
- if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
- e.preventDefault();
- F(this)
- }
- };
- if (i) {
- if (!z) {
- z = !0;
- K.click(function() {
- s.next()
- });
- R.click(function() {
- s.prev()
- });
- O.click(function() {
- s.close()
- });
- C.click(function() {
- if (e.get('overlayClose')) {
- s.close()
- }
- });
- t(a).bind('keydown.' + h, function(t) {
- var i = t.keyCode;
- if (T && e.get('escKey') && i === 27) {
- t.preventDefault();
- s.close()
- };
- if (T && e.get('arrowKey') && f[1] && !t.altKey) {
- if (i === 37) {
- t.preventDefault();
- R.click()
- } else if (i === 39) {
- t.preventDefault();
- K.click()
- }
- }
- });
- if (t.isFunction(t.fn.on)) {
- t(a).on('click.' + h, '.' + W, n)
- } else {
- t('.' + W).live('click.' + h, n)
- }
- };
- return !0
- };
- return !1
- };
- if (t[g]) {
- return
- };
- t(he);
- s = t.fn[g] = t[g] = function(e, i) {
- var o, n = this;
- e = e || {};
- if (t.isFunction(n)) {
- n = t('<a/>');
- e.open = !0
- } else if (!n[0]) {
- return n
- };
- if (!n[0]) {
- return n
- };
- he();
- if (ge()) {
- if (i) {
- e.onComplete = i
- };
- n.each(function() {
- var i = t.data(this, g) || {};
- t.data(this, g, t.extend(i, e))
- }).addClass(W);
- o = new P(n[0], e);
- if (o.get('open')) {
- F(n[0])
- }
- };
- return n
- };
- s.position = function(n, o) {
- var r, l = 0,
- a = 0,
- f = i.offset(),
- g, c;
- v.unbind('resize.' + h);
- i.css({
- top: -9e4,
- left: -9e4
- });
- g = v.scrollTop();
- c = v.scrollLeft();
- if (e.get('fixed')) {
- f.top -= g;
- f.left -= c;
- i.css({
- position: 'fixed'
- })
- } else {
- l = g;
- a = c;
- i.css({
- position: 'absolute'
- })
- }; if (e.get('right') !== !1) {
- a += Math.max(v.width() - e.w - b - p - d(e.get('right'), 'x'), 0)
- } else if (e.get('left') !== !1) {
- a += d(e.get('left'), 'x')
- } else {
- a += Math.round(Math.max(v.width() - e.w - b - p, 0) / 2)
- }; if (e.get('bottom') !== !1) {
- l += Math.max(q() - e.h - y - w - d(e.get('bottom'), 'y'), 0)
- } else if (e.get('top') !== !1) {
- l += d(e.get('top'), 'y')
- } else {
- l += Math.round(Math.max(q() - e.h - y - w, 0) / 2)
- };
- i.css({
- top: f.top,
- left: f.left,
- visibility: 'visible'
- });
- k[0].style.width = k[0].style.height = '9999px';
- function m() {
- se[0].style.width = te[0].style.width = u[0].style.width = (parseInt(i[0].style.width, 10) - p) + 'px';
- u[0].style.height = re[0].style.height = oe[0].style.height = (parseInt(i[0].style.height, 10) - w) + 'px'
- };
- r = {
- width: e.w + b + p,
- height: e.h + y + w,
- top: l,
- left: a
- };
- if (n) {
- var x = 0;
- t.each(r, function(e) {
- if (r[e] !== de[e]) {
- x = n;
- return
- }
- });
- n = x
- };
- de = r;
- if (!n) {
- i.css(r)
- };
- i.dequeue().animate(r, {
- duration: n || 0,
- complete: function() {
- m();
- L = !1;
- k[0].style.width = (e.w + b + p) + 'px';
- k[0].style.height = (e.h + y + w) + 'px';
- if (e.get('reposition')) {
- setTimeout(function() {
- v.bind('resize.' + h, s.position)
- }, 1)
- };
- if (o) {
- o()
- }
- },
- step: m
- })
- };
- s.resize = function(t) {
- var i;
- if (T) {
- t = t || {};
- if (t.width) {
- e.w = d(t.width, 'x') - b - p
- };
- if (t.innerWidth) {
- e.w = d(t.innerWidth, 'x')
- };
- l.css({
- width: e.w
- });
- if (t.height) {
- e.h = d(t.height, 'y') - y - w
- };
- if (t.innerHeight) {
- e.h = d(t.innerHeight, 'y')
- };
- if (!t.innerHeight && !t.height) {
- i = l.scrollTop();
- l.css({
- height: 'auto'
- });
- e.h = l.height()
- };
- l.css({
- height: e.h
- });
- if (i) {
- l.scrollTop(i)
- };
- s.position(e.get('transition') === 'none' ? 0 : e.get('speed'))
- }
- };
- s.prep = function(d) {
- if (!T) {
- return
- };
- var w, p = e.get('transition') === 'none' ? 0 : e.get('speed');
- l.remove();
- l = o(r, 'LoadedContent').append(d);
- function y() {
- e.w = e.w || l.width();
- e.w = e.mw && e.mw < e.w ? e.mw : e.w;
- return e.w
- };
- function v() {
- e.h = e.h || l.height();
- e.h = e.mh && e.mh < e.h ? e.mh : e.h;
- return e.h
- };
- l.hide().appendTo(I.show()).css({
- width: y(),
- overflow: e.get('scrolling') ? 'auto' : 'hidden'
- }).css({
- height: v()
- }).prependTo(u);
- I.hide();
- t(n).css({
- 'float': 'none'
- });
- M(e.get('className'));
- w = function() {
- var o = f.length,
- n, r;
- if (!T) {
- return
- };
- function s() {
- if (t.support.opacity === !1) {
- i[0].style.removeAttribute('filter')
- }
- };
- r = function() {
- clearTimeout(fe);
- D.hide();
- H(A);
- e.get('onComplete')
- };
- ie.html(e.get('title')).show();
- l.show();
- if (o > 1) {
- if (typeof e.get('current') === 'string') {
- ne.html(e.get('current').replace('{current}', c + 1).replace('{total}', o)).show()
- };
- K[(e.get('loop') || c < o - 1) ? 'show' : 'hide']().html(e.get('next'));
- R[(e.get('loop') || c) ? 'show' : 'hide']().html(e.get('previous'));
- me();
- if (e.get('preloading')) {
- t.each([B(-1), B(1)], function() {
- var o, n = f[this],
- i = new P(n, t.data(n, g)),
- e = i.get('href');
- if (e && ce(i, e)) {
- e = le(i, e);
- o = a.createElement('img');
- o.src = e
- }
- })
- }
- } else {
- U.hide()
- }; if (e.get('iframe')) {
- n = a.createElement('iframe');
- if ('frameBorder' in n) {
- n.frameBorder = 0
- };
- if ('allowTransparency' in n) {
- n.allowTransparency = 'true'
- };
- if (!e.get('scrolling')) {
- n.scrolling = 'no'
- };
- t(n).attr({
- src: e.get('href'),
- name: (new Date()).getTime(),
- 'class': h + 'Iframe',
- allowFullScreen: !0
- }).one('load', r).appendTo(l);
- m.one(j, function() {
- n.src = '//about:blank'
- });
- if (e.get('fastIframe')) {
- t(n).trigger('load')
- }
- } else {
- r()
- }; if (e.get('transition') === 'fade') {
- i.fadeTo(p, 1, s)
- } else {
- s()
- }
- };
- if (e.get('transition') === 'fade') {
- i.fadeTo(p, 0, function() {
- s.position(0, w)
- })
- } else {
- s.position(p, w)
- }
- };
- function ue() {
- var i, l, a = s.prep,
- v, g = ++G;
- L = !0;
- n = !1;
- H(j);
- H(N);
- e.get('onLoad');
- e.h = e.get('height') ? d(e.get('height'), 'y') - y - w : e.get('innerHeight') && d(e.get('innerHeight'), 'y');
- e.w = e.get('width') ? d(e.get('width'), 'x') - b - p : e.get('innerWidth') && d(e.get('innerWidth'), 'x');
- e.mw = e.w;
- e.mh = e.h;
- if (e.get('maxWidth')) {
- e.mw = d(e.get('maxWidth'), 'x') - b - p;
- e.mw = e.w && e.w < e.mw ? e.w : e.mw
- };
- if (e.get('maxHeight')) {
- e.mh = d(e.get('maxHeight'), 'y') - y - w;
- e.mh = e.h && e.h < e.mh ? e.h : e.mh
- };
- i = e.get('href');
- fe = setTimeout(function() {
- D.show()
- }, 100);
- if (e.get('inline')) {
- var u = t(i);
- v = t('<div>').hide().insertBefore(u);
- m.one(j, function() {
- v.replaceWith(u)
- });
- a(u)
- } else if (e.get('iframe')) {
- a(' ')
- } else if (e.get('html')) {
- a(e.get('html'))
- } else if (ce(e, i)) {
- i = le(e, i);
- n = new Image();
- t(n).addClass(h + 'Photo').bind('error', function() {
- a(o(r, 'Error').html(e.get('imgError')))
- }).one('load', function() {
- if (g !== G) {
- return
- };
- setTimeout(function() {
- var i;
- t.each(['alt', 'longdesc', 'aria-describedby'], function(i, o) {
- var r = t(e.el).attr(o) || t(e.el).attr('data-' + o);
- if (r) {
- n.setAttribute(o, r)
- }
- });
- if (e.get('retinaImage') && x.devicePixelRatio > 1) {
- n.height = n.height / x.devicePixelRatio;
- n.width = n.width / x.devicePixelRatio
- };
- if (e.get('scalePhotos')) {
- l = function() {
- n.height -= n.height * i;
- n.width -= n.width * i
- };
- if (e.mw && n.width > e.mw) {
- i = (n.width - e.mw) / n.width;
- l()
- };
- if (e.mh && n.height > e.mh) {
- i = (n.height - e.mh) / n.height;
- l()
- }
- };
- if (e.h) {
- n.style.marginTop = Math.max(e.mh - n.height, 0) / 2 + 'px'
- };
- if (f[1] && (e.get('loop') || f[c + 1])) {
- n.style.cursor = 'pointer';
- n.onclick = function() {
- s.next()
- }
- };
- n.style.width = n.width + 'px';
- n.style.height = n.height + 'px';
- a(n)
- }, 1)
- });
- n.src = i
- } else if (i) {
- I.load(i, e.get('data'), function(i, n) {
- if (g === G) {
- a(n === 'error' ? o(r, 'Error').html(e.get('xhrError')) : t(this).contents())
- }
- })
- }
- };
- s.next = function() {
- if (!L && f[1] && (e.get('loop') || f[c + 1])) {
- c = B(1);
- F(f[c])
- }
- };
- s.prev = function() {
- if (!L && f[1] && (e.get('loop') || c)) {
- c = B(-1);
- F(f[c])
- }
- };
- s.close = function() {
- if (T && !S) {
- S = !0;
- T = !1;
- H(J);
- e.get('onCleanup');
- v.unbind('.' + h);
- C.fadeTo(e.get('fadeOut') || 0, 0);
- i.stop().fadeTo(e.get('fadeOut') || 0, 0, function() {
- i.hide();
- C.hide();
- H(j);
- l.remove();
- setTimeout(function() {
- S = !1;
- H(ee);
- e.get('onClosed')
- }, 1)
- })
- }
- };
- s.remove = function() {
- if (!i) {
- return
- };
- i.stop();
- t[g].close();
- i.stop(!1, !0).remove();
- C.remove();
- S = !1;
- i = null;
- t('.' + W).removeData(g).removeClass(W);
- t(a).unbind('click.' + h).unbind('keydown.' + h)
- };
- s.element = function() {
- return t(e.el)
- };
- s.settings = Q
- }(jQuery, document, window));
- /*!
- * Readmore.js jQuery plugin
- * Author: @jed_foster
- * Project home: jedfoster.github.io/Readmore.js
- * Licensed under the MIT license
- */
- ;
- (function(e) {
- var t = 'readmore',
- i = {
- speed: 100,
- maxHeight: 200,
- heightMargin: 16,
- moreLink: '<a href="#">Read More</a>',
- lessLink: '<a href="#">Close</a>',
- embedCSS: !0,
- sectionCSS: 'display: block; width: 100%;',
- startOpen: !1,
- expandedClass: 'readmore-js-expanded',
- collapsedClass: 'readmore-js-collapsed',
- beforeToggle: function() {},
- afterToggle: function() {}
- }, o = !1;
- function s(s, a) {
- this.element = s;
- this.options = e.extend({}, i, a);
- e(this.element).data('max-height', this.options.maxHeight);
- e(this.element).data('height-margin', this.options.heightMargin);
- delete(this.options.maxHeight);
- if (this.options.embedCSS && !o) {
- var n = '.readmore-js-toggle, .readmore-js-section { ' + this.options.sectionCSS + ' } .readmore-js-section { overflow: hidden; }';
- (function(e, s) {
- var t = e.createElement('style');
- t.type = 'text/css';
- if (t.styleSheet) {
- t.styleSheet.cssText = s
- } else {
- t.appendChild(e.createTextNode(s))
- };
- e.getElementsByTagName('head')[0].appendChild(t)
- }(document, n));
- o = !0
- };
- this.e$ = i;
- this.t$ = t;
- this.init()
- };
- s.prototype = {
- init: function() {
- var t = this;
- e(this.element).each(function() {
- var s = e(this),
- i = (s.css('max-height').replace(/[^-\d\.]/g, '') > s.data('max-height')) ? s.css('max-height').replace(/[^-\d\.]/g, '') : s.data('max-height'),
- o = s.data('height-margin');
- if (s.css('max-height') != 'none') {
- s.css('max-height', 'none')
- };
- t.setBoxHeight(s);
- if (s.outerHeight(!0) <= i + o) {
- return !0
- } else {
- s.addClass('readmore-js-section ' + t.options.collapsedClass).data('collapsedHeight', i);
- var a = t.options.startOpen ? t.options.lessLink : t.options.moreLink;
- s.after(e(a).on('click', function(e) {
- t.toggleSlider(this, s, e)
- }).addClass('readmore-js-toggle'));
- if (!t.options.startOpen) {
- s.css({
- height: i
- })
- }
- }
- });
- e(window).on('resize', function(e) {
- t.resizeBoxes()
- })
- },
- toggleSlider: function(t, i, h) {
- h.preventDefault();
- var s = this,
- a = newLink = sectionClass = '',
- o = !1,
- n = e(i).data('collapsedHeight');
- if (e(i).height() <= n) {
- a = e(i).data('expandedHeight') + 'px';
- newLink = 'lessLink';
- o = !0;
- sectionClass = s.options.expandedClass
- } else {
- a = n;
- newLink = 'moreLink';
- sectionClass = s.options.collapsedClass
- };
- s.options.beforeToggle(t, i, o);
- e(i).animate({
- 'height': a
- }, {
- duration: s.options.speed,
- complete: function() {
- s.options.afterToggle(t, i, o);
- e(t).replaceWith(e(s.options[newLink]).on('click', function(e) {
- s.toggleSlider(this, i, e)
- }).addClass('readmore-js-toggle'));
- e(this).removeClass(s.options.collapsedClass + ' ' + s.options.expandedClass).addClass(sectionClass)
- }
- })
- },
- setBoxHeight: function(e) {
- var t = e.clone().css({
- 'height': 'auto',
- 'width': e.width(),
- 'overflow': 'hidden'
- }).insertAfter(e),
- s = t.outerHeight(!0);
- t.remove();
- e.data('expandedHeight', s)
- },
- resizeBoxes: function() {
- var t = this;
- e('.readmore-js-section').each(function() {
- var s = e(this);
- t.setBoxHeight(s);
- if (s.height() > s.data('expandedHeight') || (s.hasClass(t.options.expandedClass) && s.height() < s.data('expandedHeight'))) {
- s.css('height', s.data('expandedHeight'))
- }
- })
- },
- destroy: function() {
- var t = this;
- e(this.element).each(function() {
- var s = e(this);
- s.removeClass('readmore-js-section ' + t.options.collapsedClass + ' ' + t.options.expandedClass).css({
- 'max-height': '',
- 'height': 'auto'
- }).next('.readmore-js-toggle').remove();
- s.removeData()
- })
- }
- };
- e.fn[t] = function(i) {
- var o = arguments;
- if (i === undefined || typeof i === 'object') {
- return this.each(function() {
- if (e.data(this, 'plugin_' + t)) {
- var o = e.data(this, 'plugin_' + t);
- o['destroy'].apply(o)
- };
- e.data(this, 'plugin_' + t, new s(this, i))
- })
- } else if (typeof i === 'string' && i[0] !== '_' && i !== 'init') {
- return this.each(function() {
- var a = e.data(this, 'plugin_' + t);
- if (a instanceof s && typeof a[i] === 'function') {
- a[i].apply(a, Array.prototype.slice.call(o, 1))
- }
- })
- }
- }
- })(jQuery);
- /*! perfect-scrollbar - v0.5.8
- * http://noraesae.github.com/perfect-scrollbar/
- * Copyright (c) 2014 Hyunje Alex Jun; Licensed MIT */
- (function(e) {
- "use strict";
- "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? e(require("jquery")) : e(jQuery)
- })(function(e) {
- "use strict";
- function t(e) {
- return "string" == typeof e ? parseInt(e, 10) : ~~e
- };
- var r = {
- wheelSpeed: 1,
- wheelPropagation: !1,
- swipePropagation: !0,
- minScrollbarLength: null,
- maxScrollbarLength: null,
- useBothWheelAxes: !1,
- useKeyboard: !0,
- suppressScrollX: !1,
- suppressScrollY: !1,
- scrollXMarginOffset: 0,
- scrollYMarginOffset: 0,
- includePadding: !1
- }, n = 0,
- l = function() {
- var e = n++;
- return function(t) {
- var o = ".perfect-scrollbar-" + e;
- return t === void 0 ? o : t + o
- }
- }, o = "WebkitAppearance" in document.documentElement.style;
- e.fn.perfectScrollbar = function(n, i) {
- return this.each(function() {
- function ne(e, o) {
- var n = e + o,
- r = p - b;
- y = 0 > n ? 0 : n > r ? r : n;
- var l = t(y * (h - p) / (p - b));
- a.scrollTop(l)
- };
- function ie(e, o) {
- var n = e + o,
- r = f - g;
- L = 0 > n ? 0 : n > r ? r : n;
- var l = t(L * (v - f) / (f - g));
- a.scrollLeft(l)
- };
- function R(e) {
- return s.minScrollbarLength && (e = Math.max(e, s.minScrollbarLength)), s.maxScrollbarLength && (e = Math.min(e, s.maxScrollbarLength)), e
- };
- function ae() {
- var e = {
- width: x
- };
- e.left = C ? a.scrollLeft() + f - v : a.scrollLeft(), W ? e.bottom = Y - a.scrollTop() : e.top = I + a.scrollTop(), d.css(e);
- var t = {
- top: a.scrollTop(),
- height: E
- };
- k ? t.right = C ? v - a.scrollLeft() - D - T.outerWidth() : D - a.scrollLeft() : t.left = C ? a.scrollLeft() + 2 * f - v - X - T.outerWidth() : X + a.scrollLeft(), u.css(t), M.css({
- left: L,
- width: g - re
- }), T.css({
- top: y,
- height: b - se
- })
- };
- function m() {
- a.removeClass("ps-active-x"), a.removeClass("ps-active-y"), f = s.includePadding ? a.innerWidth() : a.width(), p = s.includePadding ? a.innerHeight() : a.height(), v = a.prop("scrollWidth"), h = a.prop("scrollHeight"), !s.suppressScrollX && v > f + s.scrollXMarginOffset ? (S = !0, x = f - oe, g = R(t(x * f / v)), L = t(a.scrollLeft() * (x - g) / (v - f))) : (S = !1, g = 0, L = 0, a.scrollLeft(0)), !s.suppressScrollY && h > p + s.scrollYMarginOffset ? (P = !0, E = p - le, b = R(t(E * p / h)), y = t(a.scrollTop() * (E - b) / (h - p))) : (P = !1, b = 0, y = 0, a.scrollTop(0)), L >= x - g && (L = x - g), y >= E - b && (y = E - b), ae(), S && a.addClass("ps-active-x"), P && a.addClass("ps-active-y")
- };
- function ce() {
- var t, o, n = function(e) {
- ie(t, e.pageX - o), m(), e.stopPropagation(), e.preventDefault()
- }, r = function() {
- d.removeClass("in-scrolling"), e(w).unbind(c("mousemove"), n)
- };
- M.bind(c("mousedown"), function(l) {
- o = l.pageX, t = M.position().left, d.addClass("in-scrolling"), e(w).bind(c("mousemove"), n), e(w).one(c("mouseup"), r), l.stopPropagation(), l.preventDefault()
- }), t = o = null
- };
- function ue() {
- var t, o, n = function(e) {
- ne(t, e.pageY - o), m(), e.stopPropagation(), e.preventDefault()
- }, r = function() {
- u.removeClass("in-scrolling"), e(w).unbind(c("mousemove"), n)
- };
- T.bind(c("mousedown"), function(l) {
- o = l.pageY, t = T.position().top, u.addClass("in-scrolling"), e(w).bind(c("mousemove"), n), e(w).one(c("mouseup"), r), l.stopPropagation(), l.preventDefault()
- }), t = o = null
- };
- function j(e, t) {
- var o = a.scrollTop();
- if (0 === e) {
- if (!P) return !1;
- if (0 === o && t > 0 || o >= h - p && 0 > t) return !s.wheelPropagation
- };
- var n = a.scrollLeft();
- if (0 === t) {
- if (!S) return !1;
- if (0 === n && 0 > e || n >= v - f && e > 0) return !s.wheelPropagation
- };
- return !0
- };
- function ee(e, t) {
- var r = a.scrollTop(),
- l = a.scrollLeft(),
- n = Math.abs(e),
- o = Math.abs(t);
- if (o > n) {
- if (0 > t && r === h - p || t > 0 && 0 === r) return !s.swipePropagation
- } else if (n > o && (0 > e && l === v - f || e > 0 && 0 === l)) return !s.swipePropagation;
- return !0
- };
- function K() {
- function n(e) {
- var o = e.originalEvent.deltaX,
- t = -1 * e.originalEvent.deltaY;
- return (o === void 0 || t === void 0) && (o = -1 * e.originalEvent.wheelDeltaX / 6, t = e.originalEvent.wheelDeltaY / 6), e.originalEvent.deltaMode && 1 === e.originalEvent.deltaMode && (o *= 10, t *= 10), o !== o && t !== t && (o = 0, t = e.originalEvent.wheelDelta), [o, t]
- };
- function t(t) {
- if (o || !(a.find("select:focus").length > 0)) {
- var i = n(t),
- r = i[0],
- l = i[1];
- e = !1, s.useBothWheelAxes ? P && !S ? (l ? a.scrollTop(a.scrollTop() - l * s.wheelSpeed) : a.scrollTop(a.scrollTop() + r * s.wheelSpeed), e = !0) : S && !P && (r ? a.scrollLeft(a.scrollLeft() + r * s.wheelSpeed) : a.scrollLeft(a.scrollLeft() - l * s.wheelSpeed), e = !0) : (a.scrollTop(a.scrollTop() - l * s.wheelSpeed), a.scrollLeft(a.scrollLeft() + r * s.wheelSpeed)), m(), e = e || j(r, l), e && (t.stopPropagation(), t.preventDefault())
- }
- };
- var e = !1;
- window.onwheel !== void 0 ? a.bind(c("wheel"), t) : window.onmousewheel !== void 0 && a.bind(c("mousewheel"), t)
- };
- function q() {
- var t = !1;
- a.bind(c("mouseenter"), function() {
- t = !0
- }), a.bind(c("mouseleave"), function() {
- t = !1
- });
- var o = !1;
- e(w).bind(c("keydown"), function(n) {
- if ((!n.isDefaultPrevented || !n.isDefaultPrevented()) && t) {
- for (var l = document.activeElement ? document.activeElement : w.activeElement; l.shadowRoot;) l = l.shadowRoot.activeElement;
- if (!e(l).is(":input,[contenteditable]")) {
- var i = 0,
- r = 0;
- switch (n.which) {
- case 37:
- i = -30;
- break;
- case 38:
- r = 30;
- break;
- case 39:
- i = 30;
- break;
- case 40:
- r = -30;
- break;
- case 33:
- r = 90;
- break;
- case 32:
- case 34:
- r = -90;
- break;
- case 35:
- r = n.ctrlKey ? -h : -p;
- break;
- case 36:
- r = n.ctrlKey ? a.scrollTop() : p;
- break;
- default:
- return
- };
- a.scrollTop(a.scrollTop() - r), a.scrollLeft(a.scrollLeft() + i), o = j(i, r), o && n.preventDefault()
- }
- }
- })
- };
- function H() {
- function e(e) {
- e.stopPropagation()
- };
- T.bind(c("click"), e), u.bind(c("click"), function(e) {
- var l = t(b / 2),
- r = e.pageY - u.offset().top - l,
- n = p - b,
- o = r / n;
- 0 > o ? o = 0 : o > 1 && (o = 1), a.scrollTop((h - p) * o)
- }), M.bind(c("click"), e), d.bind(c("click"), function(e) {
- var l = t(g / 2),
- r = e.pageX - d.offset().left - l,
- n = f - g,
- o = r / n;
- 0 > o ? o = 0 : o > 1 && (o = 1), a.scrollLeft((v - f) * o)
- })
- };
- function U() {
- function i() {
- var e = window.getSelection ? window.getSelection() : document.getSlection ? document.getSlection() : {
- rangeCount: 0
- };
- return 0 === e.rangeCount ? null : e.getRangeAt(0).commonAncestorContainer
- };
- function l() {
- o || (o = setInterval(function() {
- return O() ? (a.scrollTop(a.scrollTop() + t.top), a.scrollLeft(a.scrollLeft() + t.left), m(), void 0) : (clearInterval(o), void 0)
- }, 50))
- };
- function r() {
- o && (clearInterval(o), o = null), d.removeClass("in-scrolling"), u.removeClass("in-scrolling")
- };
- var o = null,
- t = {
- top: 0,
- left: 0
- }, n = !1;
- e(w).bind(c("selectionchange"), function() {
- e.contains(a[0], i()) ? n = !0 : (n = !1, r())
- }), e(window).bind(c("mouseup"), function() {
- n && (n = !1, r())
- }), e(window).bind(c("mousemove"), function(e) {
- if (n) {
- var i = {
- x: e.pageX,
- y: e.pageY
- }, c = a.offset(),
- o = {
- left: c.left,
- right: c.left + a.outerWidth(),
- top: c.top,
- bottom: c.top + a.outerHeight()
- };
- i.x < o.left + 3 ? (t.left = -5, d.addClass("in-scrolling")) : i.x > o.right - 3 ? (t.left = 5, d.addClass("in-scrolling")) : t.left = 0, i.y < o.top + 3 ? (t.top = 5 > o.top + 3 - i.y ? -5 : -20, u.addClass("in-scrolling")) : i.y > o.bottom - 3 ? (t.top = 5 > i.y - o.bottom + 3 ? 5 : 20, u.addClass("in-scrolling")) : t.top = 0, 0 === t.top && 0 === t.left ? r() : l()
- }
- })
- };
- function te(t, n) {
- function h(e, t) {
- a.scrollTop(a.scrollTop() - t), a.scrollLeft(a.scrollLeft() - e), m()
- };
- function f() {
- i = !0
- };
- function p() {
- i = !1
- };
- function b(e) {
- return e.originalEvent.targetTouches ? e.originalEvent.targetTouches[0] : e.originalEvent
- };
- function w(e) {
- var t = e.originalEvent;
- return t.targetTouches && 1 === t.targetTouches.length ? !0 : t.pointerType && "mouse" !== t.pointerType && t.pointerType !== t.MSPOINTER_TYPE_MOUSE ? !0 : !1
- };
- function g(e) {
- if (w(e)) {
- s = !0;
- var t = b(e);
- l.pageX = t.pageX, l.pageY = t.pageY, u = (new Date).getTime(), null !== r && clearInterval(r), e.stopPropagation()
- }
- };
- function d(e) {
- if (!i && s && w(e)) {
- var c = b(e),
- t = {
- pageX: c.pageX,
- pageY: c.pageY
- }, a = t.pageX - l.pageX,
- r = t.pageY - l.pageY;
- h(a, r), l = t;
- var d = (new Date).getTime(),
- n = d - u;
- n > 0 && (o.x = a / n, o.y = r / n, u = d), ee(a, r) && (e.stopPropagation(), e.preventDefault())
- }
- };
- function v() {
- !i && s && (s = !1, clearInterval(r), r = setInterval(function() {
- return O() ? .01 > Math.abs(o.x) && .01 > Math.abs(o.y) ? (clearInterval(r), void 0) : (h(30 * o.x, 30 * o.y), o.x *= .8, o.y *= .8, void 0) : (clearInterval(r), void 0)
- }, 10))
- };
- var l = {}, u = 0,
- o = {}, r = null,
- i = !1,
- s = !1;
- t && (e(window).bind(c("touchstart"), f), e(window).bind(c("touchend"), p), a.bind(c("touchstart"), g), a.bind(c("touchmove"), d), a.bind(c("touchend"), v)), n && (window.PointerEvent ? (e(window).bind(c("pointerdown"), f), e(window).bind(c("pointerup"), p), a.bind(c("pointerdown"), g), a.bind(c("pointermove"), d), a.bind(c("pointerup"), v)) : window.MSPointerEvent && (e(window).bind(c("MSPointerDown"), f), e(window).bind(c("MSPointerUp"), p), a.bind(c("MSPointerDown"), g), a.bind(c("MSPointerMove"), d), a.bind(c("MSPointerUp"), v)))
- };
- function N() {
- a.bind(c("scroll"), function() {
- m()
- })
- };
- function Q() {
- a.unbind(c()), e(window).unbind(c()), e(w).unbind(c()), a.data("perfect-scrollbar", null), a.data("perfect-scrollbar-update", null), a.data("perfect-scrollbar-destroy", null), M.remove(), T.remove(), d.remove(), u.remove(), a = d = u = M = T = S = P = f = p = v = h = g = L = Y = W = I = b = y = D = k = X = C = c = null
- };
- function J() {
- m(), N(), ce(), ue(), H(), U(), K(), (B || A) && te(B, A), s.useKeyboard && q(), a.data("perfect-scrollbar", a), a.data("perfect-scrollbar-update", m), a.data("perfect-scrollbar-destroy", Q)
- };
- var s = e.extend(!0, {}, r),
- a = e(this),
- O = function() {
- return !!a
- };
- if ("object" == typeof n ? e.extend(!0, s, n) : i = n, "update" === i) return a.data("perfect-scrollbar-update") && a.data("perfect-scrollbar-update")(), a;
- if ("destroy" === i) return a.data("perfect-scrollbar-destroy") && a.data("perfect-scrollbar-destroy")(), a;
- if (a.data("perfect-scrollbar")) return a.data("perfect-scrollbar");
- a.addClass("ps-container");
- var f, p, v, h, S, g, L, x, P, b, y, E, C = "rtl" === a.css("direction"),
- c = l(),
- w = this.ownerDocument || document,
- d = e("<div class='ps-scrollbar-x-rail'>").appendTo(a),
- M = e("<div class='ps-scrollbar-x'>").appendTo(d),
- Y = t(d.css("bottom")),
- W = Y === Y,
- I = W ? null : t(d.css("top")),
- re = t(d.css("borderLeftWidth")) + t(d.css("borderRightWidth")),
- oe = t(d.css("marginLeft")) + t(d.css("marginRight")),
- u = e("<div class='ps-scrollbar-y-rail'>").appendTo(a),
- T = e("<div class='ps-scrollbar-y'>").appendTo(u),
- D = t(u.css("right")),
- k = D === D,
- X = k ? null : t(u.css("left")),
- se = t(u.css("borderTopWidth")) + t(u.css("borderBottomWidth")),
- le = t(u.css("marginTop")) + t(u.css("marginBottom")),
- B = "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch,
- A = null !== window.navigator.msMaxTouchPoints;
- return J(), a
- })
- }
- });
- (function(e) {
- e.fn.autogrow = function(i) {
- function n(s) {
- var n = e(this),
- h = n.innerHeight(),
- t = this.scrollHeight,
- a = n.data('autogrow-start-height') || 0,
- o;
- if (h < t) {
- this.scrollTop = 0;
- i.animate ? n.stop().animate({
- height: t
- }, i.speed) : n.innerHeight(t)
- } else if (!s || s.which == 8 || s.which == 46 || s.ctrlKey && s.which == 88) {
- if (h > a) {
- o = n.clone().addClass(i.cloneClass).css({
- position: 'absolute',
- zIndex: -10,
- height: ''
- }).val(n.val());
- n.after(o);
- do {
- t = o[0].scrollHeight - 1;
- o.innerHeight(t)
- } while (t === o[0].scrollHeight);
- t++;
- o.remove();
- n.focus();
- t < a && (t = a);
- h > t && i.animate ? n.stop().animate({
- height: t
- }, i.speed) : n.innerHeight(t)
- } else {
- n.innerHeight(a)
- }
- }
- };
- var t = e(this).css({
- overflow: 'hidden',
- resize: 'none'
- }),
- s = t.selector,
- o = {
- context: e(document),
- animate: !0,
- speed: 200,
- fixMinHeight: !0,
- cloneClass: 'autogrowclone',
- onInitialize: !1
- };
- i = e.isPlainObject(i) ? i : {
- context: i ? i : e(document)
- };
- i = e.extend({}, o, i);
- t.each(function(a, t) {
- var o, s;
- t = e(t);
- if (t.is(':visible') || parseInt(t.css('height'), 10) > 0) {
- o = parseInt(t.css('height'), 10) || t.innerHeight()
- } else {
- s = t.clone().addClass(i.cloneClass).val(t.val()).css({
- position: 'absolute',
- visibility: 'hidden',
- display: 'block'
- });
- e('body').append(s);
- o = s.innerHeight();
- s.remove()
- }; if (i.fixMinHeight) {
- t.data('autogrow-start-height', o)
- };
- t.css('height', o);
- if (i.onInitialize && t.length) {
- n.call(t[0])
- }
- });
- i.context.on('keyup paste', s, n);
- return t
- }
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement