!function(a, b) {
var c, d, e = typeof b, f = a.location, g = a.document, h = g.documentElement, i = a.jQuery, j = a.$, k = {}, l = [], m = "1.10.2", n = l.concat, o = l.push, p = l.slice, q = l.indexOf, r = k.toString, s = k.hasOwnProperty, t = m.trim, u = function(a, b) {
return new u.fn.init(a, b, d);
}, v = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, w = /\S+/g, x = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, y = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, z = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, A = /^[\],:{}\s]*$/, B = /(?:^|:|,)(?:\s*\[)+/g, C = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, D = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, E = /^-ms-/, F = /-([\da-z])/gi, G = function(a, b) {
return b.toUpperCase();
}, H = function(a) {
if (g.addEventListener || "load" === a.type || "complete" === g.readyState) {
I();
u.ready();
}
}, I = function() {
if (g.addEventListener) {
g.removeEventListener("DOMContentLoaded", H, false);
a.removeEventListener("load", H, false);
} else {
g.detachEvent("onreadystatechange", H);
a.detachEvent("onload", H);
}
};
u.fn = u.prototype = {
jquery: m,
constructor: u,
init: function(a, c, d) {
var e, f;
if (!a) return this;
if ("string" === typeof a) {
if ("<" === a.charAt(0) && ">" === a.charAt(a.length - 1) && a.length >= 3) e = [ null, a, null ]; else e = y.exec(a);
if (e && (e[1] || !c)) if (e[1]) {
c = c instanceof u ? c[0] : c;
u.merge(this, u.parseHTML(e[1], c && c.nodeType ? c.ownerDocument || c : g, true));
if (z.test(e[1]) && u.isPlainObject(c)) for (e in c) if (u.isFunction(this[e])) this[e](c[e]); else this.attr(e, c[e]);
return this;
} else {
f = g.getElementById(e[2]);
if (f && f.parentNode) {
if (f.id !== e[2]) return d.find(a);
this.length = 1;
this[0] = f;
}
this.context = g;
this.selector = a;
return this;
} else if (!c || c.jquery) return (c || d).find(a); else return this.constructor(c).find(a);
} else if (a.nodeType) {
this.context = this[0] = a;
this.length = 1;
return this;
} else if (u.isFunction(a)) return d.ready(a);
if (a.selector !== b) {
this.selector = a.selector;
this.context = a.context;
}
return u.makeArray(a, this);
},
selector: "",
length: 0,
toArray: function() {
return p.call(this);
},
get: function(a) {
return null == a ? this.toArray() : a < 0 ? this[this.length + a] : this[a];
},
pushStack: function(a) {
var b = u.merge(this.constructor(), a);
b.prevObject = this;
b.context = this.context;
return b;
},
each: function(a, b) {
return u.each(this, a, b);
},
ready: function(a) {
u.ready.promise().done(a);
return this;
},
slice: function() {
return this.pushStack(p.apply(this, arguments));
},
first: function() {
return this.eq(0);
},
last: function() {
return this.eq(-1);
},
eq: function(a) {
var b = this.length, c = +a + (a < 0 ? b : 0);
return this.pushStack(c >= 0 && c < b ? [ this[c] ] : []);
},
map: function(a) {
return this.pushStack(u.map(this, function(b, c) {
return a.call(b, c, b);
}));
},
end: function() {
return this.prevObject || this.constructor(null);
},
push: o,
sort: [].sort,
splice: [].splice
};
u.fn.init.prototype = u.fn;
u.extend = u.fn.extend = function() {
var a, c, d, e, f, g, h = arguments[0] || {}, i = 1, j = arguments.length, k = false;
if ("boolean" === typeof h) {
k = h;
h = arguments[1] || {};
i = 2;
}
if ("object" !== typeof h && !u.isFunction(h)) h = {};
if (j === i) {
h = this;
--i;
}
for (;i < j; i++) if (null != (f = arguments[i])) for (e in f) {
a = h[e];
d = f[e];
if (h === d) continue;
if (k && d && (u.isPlainObject(d) || (c = u.isArray(d)))) {
if (c) {
c = false;
g = a && u.isArray(a) ? a : [];
} else g = a && u.isPlainObject(a) ? a : {};
h[e] = u.extend(k, g, d);
} else if (d !== b) h[e] = d;
}
return h;
};
u.extend({
expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""),
noConflict: function(b) {
if (a.$ === u) a.$ = j;
if (b && a.jQuery === u) a.jQuery = i;
return u;
},
isReady: false,
readyWait: 1,
holdReady: function(a) {
if (a) u.readyWait++; else u.ready(true);
},
ready: function(a) {
if (true === a ? --u.readyWait : u.isReady) return;
if (!g.body) return setTimeout(u.ready);
u.isReady = true;
if (true !== a && --u.readyWait > 0) return;
c.resolveWith(g, [ u ]);
if (u.fn.trigger) u(g).trigger("ready").off("ready");
},
isFunction: function(a) {
return "function" === u.type(a);
},
isArray: Array.isArray || function(a) {
return "array" === u.type(a);
},
isWindow: function(a) {
return null != a && a == a.window;
},
isNumeric: function(a) {
return !isNaN(parseFloat(a)) && isFinite(a);
},
type: function(a) {
if (null == a) return String(a);
return "object" === typeof a || "function" === typeof a ? k[r.call(a)] || "object" : typeof a;
},
isPlainObject: function(a) {
var c;
if (!a || "object" !== u.type(a) || a.nodeType || u.isWindow(a)) return false;
try {
if (a.constructor && !s.call(a, "constructor") && !s.call(a.constructor.prototype, "isPrototypeOf")) return false;
} catch (d) {
return false;
}
if (u.support.ownLast) for (c in a) return s.call(a, c);
for (c in a) ;
return c === b || s.call(a, c);
},
isEmptyObject: function(a) {
var b;
for (b in a) return false;
return true;
},
error: function(a) {
throw new Error(a);
},
parseHTML: function(a, b, c) {
if (!a || "string" !== typeof a) return null;
if ("boolean" === typeof b) {
c = b;
b = false;
}
b = b || g;
var d = z.exec(a), e = !c && [];
if (d) return [ b.createElement(d[1]) ];
d = u.buildFragment([ a ], b, e);
if (e) u(e).remove();
return u.merge([], d.childNodes);
},
parseJSON: function(b) {
if (a.JSON && a.JSON.parse) return a.JSON.parse(b);
if (null === b) return b;
if ("string" === typeof b) {
b = u.trim(b);
if (b) if (A.test(b.replace(C, "@").replace(D, "]").replace(B, ""))) return new Function("return " + b)();
}
u.error("Invalid JSON: " + b);
},
parseXML: function(c) {
var d, e;
if (!c || "string" !== typeof c) return null;
try {
if (a.DOMParser) {
e = new DOMParser();
d = e.parseFromString(c, "text/xml");
} else {
d = new ActiveXObject("Microsoft.XMLDOM");
d.async = "false";
d.loadXML(c);
}
} catch (f) {
d = b;
}
if (!d || !d.documentElement || d.getElementsByTagName("parsererror").length) u.error("Invalid XML: " + c);
return d;
},
noop: function() {},
globalEval: function(b) {
if (b && u.trim(b)) (a.execScript || function(b) {
a["eval"].call(a, b);
})(b);
},
camelCase: function(a) {
return a.replace(E, "ms-").replace(F, G);
},
nodeName: function(a, b) {
return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase();
},
each: function(a, b, c) {
var d, e = 0, f = a.length, g = J(a);
if (c) if (g) for (;e < f; e++) {
d = b.apply(a[e], c);
if (false === d) break;
} else for (e in a) {
d = b.apply(a[e], c);
if (false === d) break;
} else if (g) for (;e < f; e++) {
d = b.call(a[e], e, a[e]);
if (false === d) break;
} else for (e in a) {
d = b.call(a[e], e, a[e]);
if (false === d) break;
}
return a;
},
trim: t && !t.call(" ") ? function(a) {
return null == a ? "" : t.call(a);
} : function(a) {
return null == a ? "" : (a + "").replace(x, "");
},
makeArray: function(a, b) {
var c = b || [];
if (null != a) if (J(Object(a))) u.merge(c, "string" === typeof a ? [ a ] : a); else o.call(c, a);
return c;
},
inArray: function(a, b, c) {
var d;
if (b) {
if (q) return q.call(b, a, c);
d = b.length;
c = c ? c < 0 ? Math.max(0, d + c) : c : 0;
for (;c < d; c++) if (c in b && b[c] === a) return c;
}
return -1;
},
merge: function(a, c) {
var d = c.length, e = a.length, f = 0;
if ("number" === typeof d) for (;f < d; f++) a[e++] = c[f]; else while (c[f] !== b) a[e++] = c[f++];
a.length = e;
return a;
},
grep: function(a, b, c) {
var d, e = [], f = 0, g = a.length;
c = !!c;
for (;f < g; f++) {
d = !!b(a[f], f);
if (c !== d) e.push(a[f]);
}
return e;
},
map: function(a, b, c) {
var d, e = 0, f = a.length, g = J(a), h = [];
if (g) for (;e < f; e++) {
d = b(a[e], e, c);
if (null != d) h[h.length] = d;
} else for (e in a) {
d = b(a[e], e, c);
if (null != d) h[h.length] = d;
}
return n.apply([], h);
},
guid: 1,
proxy: function(a, c) {
var d, e, f;
if ("string" === typeof c) {
f = a[c];
c = a;
a = f;
}
if (!u.isFunction(a)) return b;
d = p.call(arguments, 2);
e = function() {
return a.apply(c || this, d.concat(p.call(arguments)));
};
e.guid = a.guid = a.guid || u.guid++;
return e;
},
access: function(a, c, d, e, f, g, h) {
var i = 0, j = a.length, k = null == d;
if ("object" === u.type(d)) {
f = true;
for (i in d) u.access(a, c, i, d[i], true, g, h);
} else if (e !== b) {
f = true;
if (!u.isFunction(e)) h = true;
if (k) if (h) {
c.call(a, e);
c = null;
} else {
k = c;
c = function(a, b, c) {
return k.call(u(a), c);
};
}
if (c) for (;i < j; i++) c(a[i], d, h ? e : e.call(a[i], i, c(a[i], d)));
}
return f ? a : k ? c.call(a) : j ? c(a[0], d) : g;
},
now: function() {
return new Date().getTime();
},
swap: function(a, b, c, d) {
var e, f, g = {};
for (f in b) {
g[f] = a.style[f];
a.style[f] = b[f];
}
e = c.apply(a, d || []);
for (f in b) a.style[f] = g[f];
return e;
}
});
u.ready.promise = function(b) {
if (!c) {
c = u.Deferred();
if ("complete" === g.readyState) setTimeout(u.ready); else if (g.addEventListener) {
g.addEventListener("DOMContentLoaded", H, false);
a.addEventListener("load", H, false);
} else {
g.attachEvent("onreadystatechange", H);
a.attachEvent("onload", H);
var d = false;
try {
d = null == a.frameElement && g.documentElement;
} catch (e) {}
if (d && d.doScroll) !function f() {
if (!u.isReady) {
try {
d.doScroll("left");
} catch (a) {
return setTimeout(f, 50);
}
I();
u.ready();
}
}();
}
}
return c.promise(b);
};
u.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(a, b) {
k["[object " + b + "]"] = b.toLowerCase();
});
function J(a) {
var b = a.length, c = u.type(a);
if (u.isWindow(a)) return false;
if (1 === a.nodeType && b) return true;
return "array" === c || "function" !== c && (0 === b || "number" === typeof b && b > 0 && b - 1 in a);
}
d = u(g);
!function(a, b) {
var c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t = "sizzle" + -new Date(), v = a.document, w = 0, x = 0, y = hb(), z = hb(), A = hb(), B = false, C = function(a, b) {
if (a === b) {
B = true;
return 0;
}
return 0;
}, D = typeof b, E = 1 << 31, F = {}.hasOwnProperty, G = [], H = G.pop, I = G.push, J = G.push, K = G.slice, L = G.indexOf || function(a) {
var b = 0, c = this.length;
for (;b < c; b++) if (this[b] === a) return b;
return -1;
}, M = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", N = "[\\x20\\t\\r\\n\\f]", O = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", P = O.replace("w", "w#"), Q = "\\[" + N + "*(" + O + ")" + N + "*(?:([*^$|!~]?=)" + N + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + P + ")|)|)" + N + "*\\]", R = ":(" + O + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + Q.replace(3, 8) + ")*)|.*)\\)|)", S = new RegExp("^" + N + "+|((?:^|[^\\\\])(?:\\\\.)*)" + N + "+$", "g"), T = new RegExp("^" + N + "*," + N + "*"), U = new RegExp("^" + N + "*([>+~]|" + N + ")" + N + "*"), V = new RegExp(N + "*[+~]"), W = new RegExp("=" + N + "*([^\\]'\"]*)" + N + "*\\]", "g"), X = new RegExp(R), Y = new RegExp("^" + P + "$"), Z = {
ID: new RegExp("^#(" + O + ")"),
CLASS: new RegExp("^\\.(" + O + ")"),
TAG: new RegExp("^(" + O.replace("w", "w*") + ")"),
ATTR: new RegExp("^" + Q),
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("^(?:" + M + ")$", "i"),
needsContext: new RegExp("^" + N + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + N + "*((?:-\\d)?\\d*)" + N + "*\\)|)(?=[^-]|$)", "i")
}, $ = /^[^{]+\{\s*\[native \w/, _ = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ab = /^(?:input|select|textarea|button)$/i, bb = /^h\d$/i, cb = /'|\\/g, db = new RegExp("\\\\([\\da-f]{1,6}" + N + "?|(" + N + ")|.)", "ig"), eb = function(a, b, c) {
var d = "0x" + b - 65536;
return d !== d || c ? b : d < 0 ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320);
};
try {
J.apply(G = K.call(v.childNodes), v.childNodes);
G[v.childNodes.length].nodeType;
} catch (fb) {
J = {
apply: G.length ? function(a, b) {
I.apply(a, K.call(b));
} : function(a, b) {
var c = a.length, d = 0;
while (a[c++] = b[d++]) ;
a.length = c - 1;
}
};
}
function gb(a, b, c, e) {
var f, g, h, i, j, k, n, q, r, u;
if ((b ? b.ownerDocument || b : v) !== m) l(b);
b = b || m;
c = c || [];
if (!a || "string" !== typeof a) return c;
if (1 !== (i = b.nodeType) && 9 !== i) return [];
if (o && !e) {
if (f = _.exec(a)) if (h = f[1]) {
if (9 === i) {
g = b.getElementById(h);
if (g && g.parentNode) {
if (g.id === h) {
c.push(g);
return c;
}
} else return c;
} else if (b.ownerDocument && (g = b.ownerDocument.getElementById(h)) && s(b, g) && g.id === h) {
c.push(g);
return c;
}
} else if (f[2]) {
J.apply(c, b.getElementsByTagName(a));
return c;
} else if ((h = f[3]) && d.getElementsByClassName && b.getElementsByClassName) {
J.apply(c, b.getElementsByClassName(h));
return c;
}
if (d.qsa && (!p || !p.test(a))) {
q = n = t;
r = b;
u = 9 === i && a;
if (1 === i && "object" !== b.nodeName.toLowerCase()) {
k = qb(a);
if (n = b.getAttribute("id")) q = n.replace(cb, "\\$&"); else b.setAttribute("id", q);
q = "[id='" + q + "'] ";
j = k.length;
while (j--) k[j] = q + rb(k[j]);
r = V.test(a) && b.parentNode || b;
u = k.join(",");
}
if (u) try {
J.apply(c, r.querySelectorAll(u));
return c;
} catch (w) {} finally {
if (!n) b.removeAttribute("id");
}
}
}
return zb(a.replace(S, "$1"), b, c, e);
}
function hb() {
var a = [];
function b(c, d) {
if (a.push(c += " ") > f.cacheLength) delete b[a.shift()];
return b[c] = d;
}
return b;
}
function ib(a) {
a[t] = true;
return a;
}
function jb(a) {
var b = m.createElement("div");
try {
return !!a(b);
} catch (c) {
return false;
} finally {
if (b.parentNode) b.parentNode.removeChild(b);
b = null;
}
}
function kb(a, b) {
var c = a.split("|"), d = a.length;
while (d--) f.attrHandle[c[d]] = b;
}
function lb(a, b) {
var c = b && a, d = c && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || E) - (~a.sourceIndex || E);
if (d) return d;
if (c) while (c = c.nextSibling) if (c === b) return -1;
return a ? 1 : -1;
}
function mb(a) {
return function(b) {
var c = b.nodeName.toLowerCase();
return "input" === c && b.type === a;
};
}
function nb(a) {
return function(b) {
var c = b.nodeName.toLowerCase();
return ("input" === c || "button" === c) && b.type === a;
};
}
function ob(a) {
return ib(function(b) {
b = +b;
return ib(function(c, d) {
var e, f = a([], c.length, b), g = f.length;
while (g--) if (c[e = f[g]]) c[e] = !(d[e] = c[e]);
});
});
}
h = gb.isXML = function(a) {
var b = a && (a.ownerDocument || a).documentElement;
return b ? "HTML" !== b.nodeName : false;
};
d = gb.support = {};
l = gb.setDocument = function(a) {
var b = a ? a.ownerDocument || a : v, c = b.defaultView;
if (b === m || 9 !== b.nodeType || !b.documentElement) return m;
m = b;
n = b.documentElement;
o = !h(b);
if (c && c.attachEvent && c !== c.top) c.attachEvent("onbeforeunload", function() {
l();
});
d.attributes = jb(function(a) {
a.className = "i";
return !a.getAttribute("className");
});
d.getElementsByTagName = jb(function(a) {
a.appendChild(b.createComment(""));
return !a.getElementsByTagName("*").length;
});
d.getElementsByClassName = jb(function(a) {
a.innerHTML = "
";
a.firstChild.className = "i";
return 2 === a.getElementsByClassName("i").length;
});
d.getById = jb(function(a) {
n.appendChild(a).id = t;
return !b.getElementsByName || !b.getElementsByName(t).length;
});
if (d.getById) {
f.find["ID"] = function(a, b) {
if (typeof b.getElementById !== D && o) {
var c = b.getElementById(a);
return c && c.parentNode ? [ c ] : [];
}
};
f.filter["ID"] = function(a) {
var b = a.replace(db, eb);
return function(a) {
return a.getAttribute("id") === b;
};
};
} else {
delete f.find["ID"];
f.filter["ID"] = function(a) {
var b = a.replace(db, eb);
return function(a) {
var c = typeof a.getAttributeNode !== D && a.getAttributeNode("id");
return c && c.value === b;
};
};
}
f.find["TAG"] = d.getElementsByTagName ? function(a, b) {
if (typeof b.getElementsByTagName !== D) return b.getElementsByTagName(a);
} : function(a, b) {
var c, d = [], e = 0, f = b.getElementsByTagName(a);
if ("*" === a) {
while (c = f[e++]) if (1 === c.nodeType) d.push(c);
return d;
}
return f;
};
f.find["CLASS"] = d.getElementsByClassName && function(a, b) {
if (typeof b.getElementsByClassName !== D && o) return b.getElementsByClassName(a);
};
q = [];
p = [];
if (d.qsa = $.test(b.querySelectorAll)) {
jb(function(a) {
a.innerHTML = "";
if (!a.querySelectorAll("[selected]").length) p.push("\\[" + N + "*(?:value|" + M + ")");
if (!a.querySelectorAll(":checked").length) p.push(":checked");
});
jb(function(a) {
var c = b.createElement("input");
c.setAttribute("type", "hidden");
a.appendChild(c).setAttribute("t", "");
if (a.querySelectorAll("[t^='']").length) p.push("[*^$]=" + N + "*(?:''|\"\")");
if (!a.querySelectorAll(":enabled").length) p.push(":enabled", ":disabled");
a.querySelectorAll("*,:x");
p.push(",.*:");
});
}
if (d.matchesSelector = $.test(r = n.webkitMatchesSelector || n.mozMatchesSelector || n.oMatchesSelector || n.msMatchesSelector)) jb(function(a) {
d.disconnectedMatch = r.call(a, "div");
r.call(a, "[s!='']:x");
q.push("!=", R);
});
p = p.length && new RegExp(p.join("|"));
q = q.length && new RegExp(q.join("|"));
s = $.test(n.contains) || n.compareDocumentPosition ? function(a, b) {
var c = 9 === a.nodeType ? a.documentElement : a, d = b && b.parentNode;
return a === d || !!(d && 1 === d.nodeType && (c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)));
} : function(a, b) {
if (b) while (b = b.parentNode) if (b === a) return true;
return false;
};
C = n.compareDocumentPosition ? function(a, c) {
if (a === c) {
B = true;
return 0;
}
var e = c.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition(c);
if (e) {
if (1 & e || !d.sortDetached && c.compareDocumentPosition(a) === e) {
if (a === b || s(v, a)) return -1;
if (c === b || s(v, c)) return 1;
return k ? L.call(k, a) - L.call(k, c) : 0;
}
return 4 & e ? -1 : 1;
}
return a.compareDocumentPosition ? -1 : 1;
} : function(a, c) {
var d, e = 0, f = a.parentNode, g = c.parentNode, h = [ a ], i = [ c ];
if (a === c) {
B = true;
return 0;
} else if (!f || !g) return a === b ? -1 : c === b ? 1 : f ? -1 : g ? 1 : k ? L.call(k, a) - L.call(k, c) : 0; else if (f === g) return lb(a, c);
d = a;
while (d = d.parentNode) h.unshift(d);
d = c;
while (d = d.parentNode) i.unshift(d);
while (h[e] === i[e]) e++;
return e ? lb(h[e], i[e]) : h[e] === v ? -1 : i[e] === v ? 1 : 0;
};
return b;
};
gb.matches = function(a, b) {
return gb(a, null, null, b);
};
gb.matchesSelector = function(a, b) {
if ((a.ownerDocument || a) !== m) l(a);
b = b.replace(W, "='$1']");
if (d.matchesSelector && o && (!q || !q.test(b)) && (!p || !p.test(b))) try {
var c = r.call(a, b);
if (c || d.disconnectedMatch || a.document && 11 !== a.document.nodeType) return c;
} catch (e) {}
return gb(b, m, null, [ a ]).length > 0;
};
gb.contains = function(a, b) {
if ((a.ownerDocument || a) !== m) l(a);
return s(a, b);
};
gb.attr = function(a, c) {
if ((a.ownerDocument || a) !== m) l(a);
var e = f.attrHandle[c.toLowerCase()], g = e && F.call(f.attrHandle, c.toLowerCase()) ? e(a, c, !o) : b;
return g === b ? d.attributes || !o ? a.getAttribute(c) : (g = a.getAttributeNode(c)) && g.specified ? g.value : null : g;
};
gb.error = function(a) {
throw new Error("Syntax error, unrecognized expression: " + a);
};
gb.uniqueSort = function(a) {
var b, c = [], e = 0, f = 0;
B = !d.detectDuplicates;
k = !d.sortStable && a.slice(0);
a.sort(C);
if (B) {
while (b = a[f++]) if (b === a[f]) e = c.push(f);
while (e--) a.splice(c[e], 1);
}
return a;
};
g = gb.getText = function(a) {
var b, c = "", d = 0, e = a.nodeType;
if (!e) for (;b = a[d]; d++) c += g(b); else if (1 === e || 9 === e || 11 === e) if ("string" === typeof a.textContent) return a.textContent; else for (a = a.firstChild; a; a = a.nextSibling) c += g(a); else if (3 === e || 4 === e) return a.nodeValue;
return c;
};
f = gb.selectors = {
cacheLength: 50,
createPseudo: ib,
match: Z,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: true
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: true
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
ATTR: function(a) {
a[1] = a[1].replace(db, eb);
a[3] = (a[4] || a[5] || "").replace(db, eb);
if ("~=" === a[2]) a[3] = " " + a[3] + " ";
return a.slice(0, 4);
},
CHILD: function(a) {
a[1] = a[1].toLowerCase();
if ("nth" === a[1].slice(0, 3)) {
if (!a[3]) gb.error(a[0]);
a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3]));
a[5] = +(a[7] + a[8] || "odd" === a[3]);
} else if (a[3]) gb.error(a[0]);
return a;
},
PSEUDO: function(a) {
var c, d = !a[5] && a[2];
if (Z["CHILD"].test(a[0])) return null;
if (a[3] && a[4] !== b) a[2] = a[4]; else if (d && X.test(d) && (c = qb(d, true)) && (c = d.indexOf(")", d.length - c) - d.length)) {
a[0] = a[0].slice(0, c);
a[2] = d.slice(0, c);
}
return a.slice(0, 3);
}
},
filter: {
TAG: function(a) {
var b = a.replace(db, eb).toLowerCase();
return "*" === a ? function() {
return true;
} : function(a) {
return a.nodeName && a.nodeName.toLowerCase() === b;
};
},
CLASS: function(a) {
var b = y[a + " "];
return b || (b = new RegExp("(^|" + N + ")" + a + "(" + N + "|$)")) && y(a, function(a) {
return b.test("string" === typeof a.className && a.className || typeof a.getAttribute !== D && a.getAttribute("class") || "");
});
},
ATTR: function(a, b, c) {
return function(d) {
var e = gb.attr(d, a);
if (null == e) return "!=" === b;
if (!b) return true;
e += "";
return "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e + " ").indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : false;
};
},
CHILD: function(a, b, c, d, e) {
var f = "nth" !== a.slice(0, 3), g = "last" !== a.slice(-4), h = "of-type" === b;
return 1 === d && 0 === e ? function(a) {
return !!a.parentNode;
} : function(b, c, i) {
var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling", q = b.parentNode, r = h && b.nodeName.toLowerCase(), s = !i && !h;
if (q) {
if (f) {
while (p) {
l = b;
while (l = l[p]) if (h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) return false;
o = p = "only" === a && !o && "nextSibling";
}
return true;
}
o = [ g ? q.firstChild : q.lastChild ];
if (g && s) {
k = q[t] || (q[t] = {});
j = k[a] || [];
n = j[0] === w && j[1];
m = j[0] === w && j[2];
l = n && q.childNodes[n];
while (l = ++n && l && l[p] || (m = n = 0) || o.pop()) if (1 === l.nodeType && ++m && l === b) {
k[a] = [ w, n, m ];
break;
}
} else if (s && (j = (b[t] || (b[t] = {}))[a]) && j[0] === w) m = j[1]; else while (l = ++n && l && l[p] || (m = n = 0) || o.pop()) if ((h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) && ++m) {
if (s) (l[t] || (l[t] = {}))[a] = [ w, m ];
if (l === b) break;
}
m -= e;
return m === d || m % d === 0 && m / d >= 0;
}
};
},
PSEUDO: function(a, b) {
var c, d = f.pseudos[a] || f.setFilters[a.toLowerCase()] || gb.error("unsupported pseudo: " + a);
if (d[t]) return d(b);
if (d.length > 1) {
c = [ a, a, "", b ];
return f.setFilters.hasOwnProperty(a.toLowerCase()) ? ib(function(a, c) {
var e, f = d(a, b), g = f.length;
while (g--) {
e = L.call(a, f[g]);
a[e] = !(c[e] = f[g]);
}
}) : function(a) {
return d(a, 0, c);
};
}
return d;
}
},
pseudos: {
not: ib(function(a) {
var b = [], c = [], d = i(a.replace(S, "$1"));
return d[t] ? ib(function(a, b, c, e) {
var f, g = d(a, null, e, []), h = a.length;
while (h--) if (f = g[h]) a[h] = !(b[h] = f);
}) : function(a, e, f) {
b[0] = a;
d(b, null, f, c);
return !c.pop();
};
}),
has: ib(function(a) {
return function(b) {
return gb(a, b).length > 0;
};
}),
contains: ib(function(a) {
return function(b) {
return (b.textContent || b.innerText || g(b)).indexOf(a) > -1;
};
}),
lang: ib(function(a) {
if (!Y.test(a || "")) gb.error("unsupported lang: " + a);
a = a.replace(db, eb).toLowerCase();
return function(b) {
var c;
do if (c = o ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) {
c = c.toLowerCase();
return c === a || 0 === c.indexOf(a + "-");
} while ((b = b.parentNode) && 1 === b.nodeType);
return false;
};
}),
target: function(b) {
var c = a.location && a.location.hash;
return c && c.slice(1) === b.id;
},
root: function(a) {
return a === n;
},
focus: function(a) {
return a === m.activeElement && (!m.hasFocus || m.hasFocus()) && !!(a.type || a.href || ~a.tabIndex);
},
enabled: function(a) {
return false === a.disabled;
},
disabled: function(a) {
return true === a.disabled;
},
checked: function(a) {
var b = a.nodeName.toLowerCase();
return "input" === b && !!a.checked || "option" === b && !!a.selected;
},
selected: function(a) {
if (a.parentNode) a.parentNode.selectedIndex;
return true === a.selected;
},
empty: function(a) {
for (a = a.firstChild; a; a = a.nextSibling) if (a.nodeName > "@" || 3 === a.nodeType || 4 === a.nodeType) return false;
return true;
},
parent: function(a) {
return !f.pseudos["empty"](a);
},
header: function(a) {
return bb.test(a.nodeName);
},
input: function(a) {
return ab.test(a.nodeName);
},
button: function(a) {
var b = a.nodeName.toLowerCase();
return "input" === b && "button" === a.type || "button" === b;
},
text: function(a) {
var b;
return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || b.toLowerCase() === a.type);
},
first: ob(function() {
return [ 0 ];
}),
last: ob(function(a, b) {
return [ b - 1 ];
}),
eq: ob(function(a, b, c) {
return [ c < 0 ? c + b : c ];
}),
even: ob(function(a, b) {
var c = 0;
for (;c < b; c += 2) a.push(c);
return a;
}),
odd: ob(function(a, b) {
var c = 1;
for (;c < b; c += 2) a.push(c);
return a;
}),
lt: ob(function(a, b, c) {
var d = c < 0 ? c + b : c;
for (;--d >= 0; ) a.push(d);
return a;
}),
gt: ob(function(a, b, c) {
var d = c < 0 ? c + b : c;
for (;++d < b; ) a.push(d);
return a;
})
}
};
f.pseudos["nth"] = f.pseudos["eq"];
for (c in {
radio: true,
checkbox: true,
file: true,
password: true,
image: true
}) f.pseudos[c] = mb(c);
for (c in {
submit: true,
reset: true
}) f.pseudos[c] = nb(c);
function pb() {}
pb.prototype = f.filters = f.pseudos;
f.setFilters = new pb();
function qb(a, b) {
var c, d, e, g, h, i, j, k = z[a + " "];
if (k) return b ? 0 : k.slice(0);
h = a;
i = [];
j = f.preFilter;
while (h) {
if (!c || (d = T.exec(h))) {
if (d) h = h.slice(d[0].length) || h;
i.push(e = []);
}
c = false;
if (d = U.exec(h)) {
c = d.shift();
e.push({
value: c,
type: d[0].replace(S, " ")
});
h = h.slice(c.length);
}
for (g in f.filter) if ((d = Z[g].exec(h)) && (!j[g] || (d = j[g](d)))) {
c = d.shift();
e.push({
value: c,
type: g,
matches: d
});
h = h.slice(c.length);
}
if (!c) break;
}
return b ? h.length : h ? gb.error(a) : z(a, i).slice(0);
}
function rb(a) {
var b = 0, c = a.length, d = "";
for (;b < c; b++) d += a[b].value;
return d;
}
function sb(a, b, c) {
var d = b.dir, f = c && "parentNode" === d, g = x++;
return b.first ? function(b, c, e) {
while (b = b[d]) if (1 === b.nodeType || f) return a(b, c, e);
} : function(b, c, h) {
var i, j, k, l = w + " " + g;
if (h) {
while (b = b[d]) if (1 === b.nodeType || f) if (a(b, c, h)) return true;
} else while (b = b[d]) if (1 === b.nodeType || f) {
k = b[t] || (b[t] = {});
if ((j = k[d]) && j[0] === l) {
if (true === (i = j[1]) || i === e) return true === i;
} else {
j = k[d] = [ l ];
j[1] = a(b, c, h) || e;
if (true === j[1]) return true;
}
}
};
}
function tb(a) {
return a.length > 1 ? function(b, c, d) {
var e = a.length;
while (e--) if (!a[e](b, c, d)) return false;
return true;
} : a[0];
}
function ub(a, b, c, d, e) {
var f, g = [], h = 0, i = a.length, j = null != b;
for (;h < i; h++) if (f = a[h]) if (!c || c(f, d, e)) {
g.push(f);
if (j) b.push(h);
}
return g;
}
function vb(a, b, c, d, e, f) {
if (d && !d[t]) d = vb(d);
if (e && !e[t]) e = vb(e, f);
return ib(function(f, g, h, i) {
var j, k, l, m = [], n = [], o = g.length, p = f || yb(b || "*", h.nodeType ? [ h ] : h, []), q = a && (f || !b) ? ub(p, m, a, h, i) : p, r = c ? e || (f ? a : o || d) ? [] : g : q;
if (c) c(q, r, h, i);
if (d) {
j = ub(r, n);
d(j, [], h, i);
k = j.length;
while (k--) if (l = j[k]) r[n[k]] = !(q[n[k]] = l);
}
if (f) {
if (e || a) {
if (e) {
j = [];
k = r.length;
while (k--) if (l = r[k]) j.push(q[k] = l);
e(null, r = [], j, i);
}
k = r.length;
while (k--) if ((l = r[k]) && (j = e ? L.call(f, l) : m[k]) > -1) f[j] = !(g[j] = l);
}
} else {
r = ub(r === g ? r.splice(o, r.length) : r);
if (e) e(null, g, r, i); else J.apply(g, r);
}
});
}
function wb(a) {
var b, c, d, e = a.length, g = f.relative[a[0].type], h = g || f.relative[" "], i = g ? 1 : 0, k = sb(function(a) {
return a === b;
}, h, true), l = sb(function(a) {
return L.call(b, a) > -1;
}, h, true), m = [ function(a, c, d) {
return !g && (d || c !== j) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d));
} ];
for (;i < e; i++) if (c = f.relative[a[i].type]) m = [ sb(tb(m), c) ]; else {
c = f.filter[a[i].type].apply(null, a[i].matches);
if (c[t]) {
d = ++i;
for (;d < e; d++) if (f.relative[a[d].type]) break;
return vb(i > 1 && tb(m), i > 1 && rb(a.slice(0, i - 1).concat({
value: " " === a[i - 2].type ? "*" : ""
})).replace(S, "$1"), c, i < d && wb(a.slice(i, d)), d < e && wb(a = a.slice(d)), d < e && rb(a));
}
m.push(c);
}
return tb(m);
}
function xb(a, b) {
var c = 0, d = b.length > 0, g = a.length > 0, h = function(h, i, k, l, n) {
var o, p, q, r = [], s = 0, t = "0", u = h && [], v = null != n, x = j, y = h || g && f.find["TAG"]("*", n && i.parentNode || i), z = w += null == x ? 1 : Math.random() || .1;
if (v) {
j = i !== m && i;
e = c;
}
for (;null != (o = y[t]); t++) {
if (g && o) {
p = 0;
while (q = a[p++]) if (q(o, i, k)) {
l.push(o);
break;
}
if (v) {
w = z;
e = ++c;
}
}
if (d) {
if (o = !q && o) s--;
if (h) u.push(o);
}
}
s += t;
if (d && t !== s) {
p = 0;
while (q = b[p++]) q(u, r, i, k);
if (h) {
if (s > 0) while (t--) if (!(u[t] || r[t])) r[t] = H.call(l);
r = ub(r);
}
J.apply(l, r);
if (v && !h && r.length > 0 && s + b.length > 1) gb.uniqueSort(l);
}
if (v) {
w = z;
j = x;
}
return u;
};
return d ? ib(h) : h;
}
i = gb.compile = function(a, b) {
var c, d = [], e = [], f = A[a + " "];
if (!f) {
if (!b) b = qb(a);
c = b.length;
while (c--) {
f = wb(b[c]);
if (f[t]) d.push(f); else e.push(f);
}
f = A(a, xb(e, d));
}
return f;
};
function yb(a, b, c) {
var d = 0, e = b.length;
for (;d < e; d++) gb(a, b[d], c);
return c;
}
function zb(a, b, c, e) {
var g, h, j, k, l, m = qb(a);
if (!e) if (1 === m.length) {
h = m[0] = m[0].slice(0);
if (h.length > 2 && "ID" === (j = h[0]).type && d.getById && 9 === b.nodeType && o && f.relative[h[1].type]) {
b = (f.find["ID"](j.matches[0].replace(db, eb), b) || [])[0];
if (!b) return c;
a = a.slice(h.shift().value.length);
}
g = Z["needsContext"].test(a) ? 0 : h.length;
while (g--) {
j = h[g];
if (f.relative[k = j.type]) break;
if (l = f.find[k]) if (e = l(j.matches[0].replace(db, eb), V.test(h[0].type) && b.parentNode || b)) {
h.splice(g, 1);
a = e.length && rb(h);
if (!a) {
J.apply(c, e);
return c;
}
break;
}
}
}
i(a, m)(e, b, !o, c, V.test(a));
return c;
}
d.sortStable = t.split("").sort(C).join("") === t;
d.detectDuplicates = B;
l();
d.sortDetached = jb(function(a) {
return 1 & a.compareDocumentPosition(m.createElement("div"));
});
if (!jb(function(a) {
a.innerHTML = "";
return "#" === a.firstChild.getAttribute("href");
})) kb("type|href|height|width", function(a, b, c) {
if (!c) return a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2);
});
if (!d.attributes || !jb(function(a) {
a.innerHTML = "";
a.firstChild.setAttribute("value", "");
return "" === a.firstChild.getAttribute("value");
})) kb("value", function(a, b, c) {
if (!c && "input" === a.nodeName.toLowerCase()) return a.defaultValue;
});
if (!jb(function(a) {
return null == a.getAttribute("disabled");
})) kb(M, function(a, b, c) {
var d;
if (!c) return (d = a.getAttributeNode(b)) && d.specified ? d.value : true === a[b] ? b.toLowerCase() : null;
});
u.find = gb;
u.expr = gb.selectors;
u.expr[":"] = u.expr.pseudos;
u.unique = gb.uniqueSort;
u.text = gb.getText;
u.isXMLDoc = gb.isXML;
u.contains = gb.contains;
}(a);
var K = {};
function L(a) {
var b = K[a] = {};
u.each(a.match(w) || [], function(a, c) {
b[c] = true;
});
return b;
}
u.Callbacks = function(a) {
a = "string" === typeof a ? K[a] || L(a) : u.extend({}, a);
var c, d, e, f, g, h, i = [], j = !a.once && [], k = function(b) {
d = a.memory && b;
e = true;
g = h || 0;
h = 0;
f = i.length;
c = true;
for (;i && g < f; g++) if (false === i[g].apply(b[0], b[1]) && a.stopOnFalse) {
d = false;
break;
}
c = false;
if (i) if (j) {
if (j.length) k(j.shift());
} else if (d) i = []; else l.disable();
}, l = {
add: function() {
if (i) {
var b = i.length;
!function e(b) {
u.each(b, function(b, c) {
var d = u.type(c);
if ("function" === d) {
if (!a.unique || !l.has(c)) i.push(c);
} else if (c && c.length && "string" !== d) e(c);
});
}(arguments);
if (c) f = i.length; else if (d) {
h = b;
k(d);
}
}
return this;
},
remove: function() {
if (i) u.each(arguments, function(a, b) {
var d;
while ((d = u.inArray(b, i, d)) > -1) {
i.splice(d, 1);
if (c) {
if (d <= f) f--;
if (d <= g) g--;
}
}
});
return this;
},
has: function(a) {
return a ? u.inArray(a, i) > -1 : !!(i && i.length);
},
empty: function() {
i = [];
f = 0;
return this;
},
disable: function() {
i = j = d = b;
return this;
},
disabled: function() {
return !i;
},
lock: function() {
j = b;
if (!d) l.disable();
return this;
},
locked: function() {
return !j;
},
fireWith: function(a, b) {
if (i && (!e || j)) {
b = b || [];
b = [ a, b.slice ? b.slice() : b ];
if (c) j.push(b); else k(b);
}
return this;
},
fire: function() {
l.fireWith(this, arguments);
return this;
},
fired: function() {
return !!e;
}
};
return l;
};
u.extend({
Deferred: function(a) {
var b = [ [ "resolve", "done", u.Callbacks("once memory"), "resolved" ], [ "reject", "fail", u.Callbacks("once memory"), "rejected" ], [ "notify", "progress", u.Callbacks("memory") ] ], c = "pending", d = {
state: function() {
return c;
},
always: function() {
e.done(arguments).fail(arguments);
return this;
},
then: function() {
var a = arguments;
return u.Deferred(function(c) {
u.each(b, function(b, f) {
var g = f[0], h = u.isFunction(a[b]) && a[b];
e[f[1]](function() {
var a = h && h.apply(this, arguments);
if (a && u.isFunction(a.promise)) a.promise().done(c.resolve).fail(c.reject).progress(c.notify); else c[g + "With"](this === d ? c.promise() : this, h ? [ a ] : arguments);
});
});
a = null;
}).promise();
},
promise: function(a) {
return null != a ? u.extend(a, d) : d;
}
}, e = {};
d.pipe = d.then;
u.each(b, function(a, f) {
var g = f[2], h = f[3];
d[f[1]] = g.add;
if (h) g.add(function() {
c = h;
}, b[1 ^ a][2].disable, b[2][2].lock);
e[f[0]] = function() {
e[f[0] + "With"](this === e ? d : this, arguments);
return this;
};
e[f[0] + "With"] = g.fireWith;
});
d.promise(e);
if (a) a.call(e, e);
return e;
},
when: function(a) {
var b = 0, c = p.call(arguments), d = c.length, e = 1 !== d || a && u.isFunction(a.promise) ? d : 0, f = 1 === e ? a : u.Deferred(), g = function(a, b, c) {
return function(d) {
b[a] = this;
c[a] = arguments.length > 1 ? p.call(arguments) : d;
if (c === h) f.notifyWith(b, c); else if (!--e) f.resolveWith(b, c);
};
}, h, i, j;
if (d > 1) {
h = new Array(d);
i = new Array(d);
j = new Array(d);
for (;b < d; b++) if (c[b] && u.isFunction(c[b].promise)) c[b].promise().done(g(b, j, c)).fail(f.reject).progress(g(b, i, h)); else --e;
}
if (!e) f.resolveWith(j, c);
return f.promise();
}
});
u.support = function(b) {
var c, d, f, h, i, j, k, l, m, n = g.createElement("div");
n.setAttribute("className", "t");
n.innerHTML = "
" ]
}, Db = nb(g), Eb = Db.appendChild(g.createElement("div"));
Cb.optgroup = Cb.option;
Cb.tbody = Cb.tfoot = Cb.colgroup = Cb.caption = Cb.thead;
Cb.th = Cb.td;
u.fn.extend({
text: function(a) {
return u.access(this, function(a) {
return a === b ? u.text(this) : this.empty().append((this[0] && this[0].ownerDocument || g).createTextNode(a));
}, null, a, arguments.length);
},
append: function() {
return this.domManip(arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = Fb(this, a);
b.appendChild(a);
}
});
},
prepend: function() {
return this.domManip(arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = Fb(this, a);
b.insertBefore(a, b.firstChild);
}
});
},
before: function() {
return this.domManip(arguments, function(a) {
if (this.parentNode) this.parentNode.insertBefore(a, this);
});
},
after: function() {
return this.domManip(arguments, function(a) {
if (this.parentNode) this.parentNode.insertBefore(a, this.nextSibling);
});
},
remove: function(a, b) {
var c, d = a ? u.filter(a, this) : this, e = 0;
for (;null != (c = d[e]); e++) {
if (!b && 1 === c.nodeType) u.cleanData(Lb(c));
if (c.parentNode) {
if (b && u.contains(c.ownerDocument, c)) Ib(Lb(c, "script"));
c.parentNode.removeChild(c);
}
}
return this;
},
empty: function() {
var a, b = 0;
for (;null != (a = this[b]); b++) {
if (1 === a.nodeType) u.cleanData(Lb(a, false));
while (a.firstChild) a.removeChild(a.firstChild);
if (a.options && u.nodeName(a, "select")) a.options.length = 0;
}
return this;
},
clone: function(a, b) {
a = null == a ? false : a;
b = null == b ? a : b;
return this.map(function() {
return u.clone(this, a, b);
});
},
html: function(a) {
return u.access(this, function(a) {
var c = this[0] || {}, d = 0, e = this.length;
if (a === b) return 1 === c.nodeType ? c.innerHTML.replace(pb, "") : b;
if ("string" === typeof a && !wb.test(a) && (u.support.htmlSerialize || !qb.test(a)) && (u.support.leadingWhitespace || !rb.test(a)) && !Cb[(tb.exec(a) || [ "", "" ])[1].toLowerCase()]) {
a = a.replace(sb, "<$1>$2>");
try {
for (;d < e; d++) {
c = this[d] || {};
if (1 === c.nodeType) {
u.cleanData(Lb(c, false));
c.innerHTML = a;
}
}
c = 0;
} catch (f) {}
}
if (c) this.empty().append(a);
}, null, a, arguments.length);
},
replaceWith: function() {
var a = u.map(this, function(a) {
return [ a.nextSibling, a.parentNode ];
}), b = 0;
this.domManip(arguments, function(c) {
var d = a[b++], e = a[b++];
if (e) {
if (d && d.parentNode !== e) d = this.nextSibling;
u(this).remove();
e.insertBefore(c, d);
}
}, true);
return b ? this : this.remove();
},
detach: function(a) {
return this.remove(a, true);
},
domManip: function(a, b, c) {
a = n.apply([], a);
var d, e, f, g, h, i, j = 0, k = this.length, l = this, m = k - 1, o = a[0], p = u.isFunction(o);
if (p || !(k <= 1 || "string" !== typeof o || u.support.checkClone || !yb.test(o))) return this.each(function(d) {
var e = l.eq(d);
if (p) a[0] = o.call(this, d, e.html());
e.domManip(a, b, c);
});
if (k) {
i = u.buildFragment(a, this[0].ownerDocument, false, !c && this);
d = i.firstChild;
if (1 === i.childNodes.length) i = d;
if (d) {
g = u.map(Lb(i, "script"), Gb);
f = g.length;
for (;j < k; j++) {
e = i;
if (j !== m) {
e = u.clone(e, true, true);
if (f) u.merge(g, Lb(e, "script"));
}
b.call(this[j], e, j);
}
if (f) {
h = g[g.length - 1].ownerDocument;
u.map(g, Hb);
for (j = 0; j < f; j++) {
e = g[j];
if (zb.test(e.type || "") && !u._data(e, "globalEval") && u.contains(h, e)) if (e.src) u._evalUrl(e.src); else u.globalEval((e.text || e.textContent || e.innerHTML || "").replace(Bb, ""));
}
}
i = d = null;
}
}
return this;
}
});
function Fb(a, b) {
return u.nodeName(a, "table") && u.nodeName(1 === b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a;
}
function Gb(a) {
a.type = (null !== u.find.attr(a, "type")) + "/" + a.type;
return a;
}
function Hb(a) {
var b = Ab.exec(a.type);
if (b) a.type = b[1]; else a.removeAttribute("type");
return a;
}
function Ib(a, b) {
var c, d = 0;
for (;null != (c = a[d]); d++) u._data(c, "globalEval", !b || u._data(b[d], "globalEval"));
}
function Jb(a, b) {
if (1 !== b.nodeType || !u.hasData(a)) return;
var c, d, e, f = u._data(a), g = u._data(b, f), h = f.events;
if (h) {
delete g.handle;
g.events = {};
for (c in h) for (d = 0, e = h[c].length; d < e; d++) u.event.add(b, c, h[c][d]);
}
if (g.data) g.data = u.extend({}, g.data);
}
function Kb(a, b) {
var c, d, e;
if (1 !== b.nodeType) return;
c = b.nodeName.toLowerCase();
if (!u.support.noCloneEvent && b[u.expando]) {
e = u._data(b);
for (d in e.events) u.removeEvent(b, d, e.handle);
b.removeAttribute(u.expando);
}
if ("script" === c && b.text !== a.text) {
Gb(b).text = a.text;
Hb(b);
} else if ("object" === c) {
if (b.parentNode) b.outerHTML = a.outerHTML;
if (u.support.html5Clone && a.innerHTML && !u.trim(b.innerHTML)) b.innerHTML = a.innerHTML;
} else if ("input" === c && xb.test(a.type)) {
b.defaultChecked = b.checked = a.checked;
if (b.value !== a.value) b.value = a.value;
} else if ("option" === c) b.defaultSelected = b.selected = a.defaultSelected; else if ("input" === c || "textarea" === c) b.defaultValue = a.defaultValue;
}
u.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(a, b) {
u.fn[a] = function(a) {
var c, d = 0, e = [], f = u(a), g = f.length - 1;
for (;d <= g; d++) {
c = d === g ? this : this.clone(true);
u(f[d])[b](c);
o.apply(e, c.get());
}
return this.pushStack(e);
};
});
function Lb(a, c) {
var d, f, g = 0, h = typeof a.getElementsByTagName !== e ? a.getElementsByTagName(c || "*") : typeof a.querySelectorAll !== e ? a.querySelectorAll(c || "*") : b;
if (!h) for (h = [], d = a.childNodes || a; null != (f = d[g]); g++) if (!c || u.nodeName(f, c)) h.push(f); else u.merge(h, Lb(f, c));
return c === b || c && u.nodeName(a, c) ? u.merge([ a ], h) : h;
}
function Mb(a) {
if (xb.test(a.type)) a.defaultChecked = a.checked;
}
u.extend({
clone: function(a, b, c) {
var d, e, f, g, h, i = u.contains(a.ownerDocument, a);
if (u.support.html5Clone || u.isXMLDoc(a) || !qb.test("<" + a.nodeName + ">")) f = a.cloneNode(true); else {
Eb.innerHTML = a.outerHTML;
Eb.removeChild(f = Eb.firstChild);
}
if ((!u.support.noCloneEvent || !u.support.noCloneChecked) && (1 === a.nodeType || 11 === a.nodeType) && !u.isXMLDoc(a)) {
d = Lb(f);
h = Lb(a);
for (g = 0; null != (e = h[g]); ++g) if (d[g]) Kb(e, d[g]);
}
if (b) if (c) {
h = h || Lb(a);
d = d || Lb(f);
for (g = 0; null != (e = h[g]); g++) Jb(e, d[g]);
} else Jb(a, f);
d = Lb(f, "script");
if (d.length > 0) Ib(d, !i && Lb(a, "script"));
d = h = e = null;
return f;
},
buildFragment: function(a, b, c, d) {
var e, f, g, h, i, j, k, l = a.length, m = nb(b), n = [], o = 0;
for (;o < l; o++) {
f = a[o];
if (f || 0 === f) if ("object" === u.type(f)) u.merge(n, f.nodeType ? [ f ] : f); else if (!vb.test(f)) n.push(b.createTextNode(f)); else {
h = h || m.appendChild(b.createElement("div"));
i = (tb.exec(f) || [ "", "" ])[1].toLowerCase();
k = Cb[i] || Cb._default;
h.innerHTML = k[1] + f.replace(sb, "<$1>$2>") + k[2];
e = k[0];
while (e--) h = h.lastChild;
if (!u.support.leadingWhitespace && rb.test(f)) n.push(b.createTextNode(rb.exec(f)[0]));
if (!u.support.tbody) {
f = "table" === i && !ub.test(f) ? h.firstChild : "
" === k[1] && !ub.test(f) ? h : 0;
e = f && f.childNodes.length;
while (e--) if (u.nodeName(j = f.childNodes[e], "tbody") && !j.childNodes.length) f.removeChild(j);
}
u.merge(n, h.childNodes);
h.textContent = "";
while (h.firstChild) h.removeChild(h.firstChild);
h = m.lastChild;
}
}
if (h) m.removeChild(h);
if (!u.support.appendChecked) u.grep(Lb(n, "input"), Mb);
o = 0;
while (f = n[o++]) {
if (d && u.inArray(f, d) !== -1) continue;
g = u.contains(f.ownerDocument, f);
h = Lb(m.appendChild(f), "script");
if (g) Ib(h);
if (c) {
e = 0;
while (f = h[e++]) if (zb.test(f.type || "")) c.push(f);
}
}
h = null;
return m;
},
cleanData: function(a, b) {
var c, d, f, g, h = 0, i = u.expando, j = u.cache, k = u.support.deleteExpando, m = u.event.special;
for (;null != (c = a[h]); h++) if (b || u.acceptData(c)) {
f = c[i];
g = f && j[f];
if (g) {
if (g.events) for (d in g.events) if (m[d]) u.event.remove(c, d); else u.removeEvent(c, d, g.handle);
if (j[f]) {
delete j[f];
if (k) delete c[i]; else if (typeof c.removeAttribute !== e) c.removeAttribute(i); else c[i] = null;
l.push(f);
}
}
}
},
_evalUrl: function(a) {
return u.ajax({
url: a,
type: "GET",
dataType: "script",
async: false,
global: false,
"throws": true
});
}
});
u.fn.extend({
wrapAll: function(a) {
if (u.isFunction(a)) return this.each(function(b) {
u(this).wrapAll(a.call(this, b));
});
if (this[0]) {
var b = u(a, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) b.insertBefore(this[0]);
b.map(function() {
var a = this;
while (a.firstChild && 1 === a.firstChild.nodeType) a = a.firstChild;
return a;
}).append(this);
}
return this;
},
wrapInner: function(a) {
if (u.isFunction(a)) return this.each(function(b) {
u(this).wrapInner(a.call(this, b));
});
return this.each(function() {
var b = u(this), c = b.contents();
if (c.length) c.wrapAll(a); else b.append(a);
});
},
wrap: function(a) {
var b = u.isFunction(a);
return this.each(function(c) {
u(this).wrapAll(b ? a.call(this, c) : a);
});
},
unwrap: function() {
return this.parent().each(function() {
if (!u.nodeName(this, "body")) u(this).replaceWith(this.childNodes);
}).end();
}
});
var Nb, Ob, Pb, Qb = /alpha\([^)]*\)/i, Rb = /opacity\s*=\s*([^)]*)/, Sb = /^(top|right|bottom|left)$/, Tb = /^(none|table(?!-c[ea]).+)/, Ub = /^margin/, Vb = new RegExp("^(" + v + ")(.*)$", "i"), Wb = new RegExp("^(" + v + ")(?!px)[a-z%]+$", "i"), Xb = new RegExp("^([+-])=(" + v + ")", "i"), Yb = {
BODY: "block"
}, Zb = {
position: "absolute",
visibility: "hidden",
display: "block"
}, $b = {
letterSpacing: 0,
fontWeight: 400
}, _b = [ "Top", "Right", "Bottom", "Left" ], ac = [ "Webkit", "O", "Moz", "ms" ];
function bc(a, b) {
if (b in a) return b;
var c = b.charAt(0).toUpperCase() + b.slice(1), d = b, e = ac.length;
while (e--) {
b = ac[e] + c;
if (b in a) return b;
}
return d;
}
function cc(a, b) {
a = b || a;
return "none" === u.css(a, "display") || !u.contains(a.ownerDocument, a);
}
function dc(a, b) {
var c, d, e, f = [], g = 0, h = a.length;
for (;g < h; g++) {
d = a[g];
if (!d.style) continue;
f[g] = u._data(d, "olddisplay");
c = d.style.display;
if (b) {
if (!f[g] && "none" === c) d.style.display = "";
if ("" === d.style.display && cc(d)) f[g] = u._data(d, "olddisplay", hc(d.nodeName));
} else if (!f[g]) {
e = cc(d);
if (c && "none" !== c || !e) u._data(d, "olddisplay", e ? c : u.css(d, "display"));
}
}
for (g = 0; g < h; g++) {
d = a[g];
if (!d.style) continue;
if (!b || "none" === d.style.display || "" === d.style.display) d.style.display = b ? f[g] || "" : "none";
}
return a;
}
u.fn.extend({
css: function(a, c) {
return u.access(this, function(a, c, d) {
var e, f, g = {}, h = 0;
if (u.isArray(c)) {
f = Ob(a);
e = c.length;
for (;h < e; h++) g[c[h]] = u.css(a, c[h], false, f);
return g;
}
return d !== b ? u.style(a, c, d) : u.css(a, c);
}, a, c, arguments.length > 1);
},
show: function() {
return dc(this, true);
},
hide: function() {
return dc(this);
},
toggle: function(a) {
if ("boolean" === typeof a) return a ? this.show() : this.hide();
return this.each(function() {
if (cc(this)) u(this).show(); else u(this).hide();
});
}
});
u.extend({
cssHooks: {
opacity: {
get: function(a, b) {
if (b) {
var c = Pb(a, "opacity");
return "" === c ? "1" : c;
}
}
}
},
cssNumber: {
columnCount: true,
fillOpacity: true,
fontWeight: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
widows: true,
zIndex: true,
zoom: true
},
cssProps: {
"float": u.support.cssFloat ? "cssFloat" : "styleFloat"
},
style: function(a, c, d, e) {
if (!a || 3 === a.nodeType || 8 === a.nodeType || !a.style) return;
var f, g, h, i = u.camelCase(c), j = a.style;
c = u.cssProps[i] || (u.cssProps[i] = bc(j, i));
h = u.cssHooks[c] || u.cssHooks[i];
if (d !== b) {
g = typeof d;
if ("string" === g && (f = Xb.exec(d))) {
d = (f[1] + 1) * f[2] + parseFloat(u.css(a, c));
g = "number";
}
if (null == d || "number" === g && isNaN(d)) return;
if ("number" === g && !u.cssNumber[i]) d += "px";
if (!u.support.clearCloneStyle && "" === d && 0 === c.indexOf("background")) j[c] = "inherit";
if (!h || !("set" in h) || (d = h.set(a, d, e)) !== b) try {
j[c] = d;
} catch (k) {}
} else {
if (h && "get" in h && (f = h.get(a, false, e)) !== b) return f;
return j[c];
}
},
css: function(a, c, d, e) {
var f, g, h, i = u.camelCase(c);
c = u.cssProps[i] || (u.cssProps[i] = bc(a.style, i));
h = u.cssHooks[c] || u.cssHooks[i];
if (h && "get" in h) g = h.get(a, true, d);
if (g === b) g = Pb(a, c, e);
if ("normal" === g && c in $b) g = $b[c];
if ("" === d || d) {
f = parseFloat(g);
return true === d || u.isNumeric(f) ? f || 0 : g;
}
return g;
}
});
if (a.getComputedStyle) {
Ob = function(b) {
return a.getComputedStyle(b, null);
};
Pb = function(a, c, d) {
var e, f, g, h = d || Ob(a), i = h ? h.getPropertyValue(c) || h[c] : b, j = a.style;
if (h) {
if ("" === i && !u.contains(a.ownerDocument, a)) i = u.style(a, c);
if (Wb.test(i) && Ub.test(c)) {
e = j.width;
f = j.minWidth;
g = j.maxWidth;
j.minWidth = j.maxWidth = j.width = i;
i = h.width;
j.width = e;
j.minWidth = f;
j.maxWidth = g;
}
}
return i;
};
} else if (g.documentElement.currentStyle) {
Ob = function(a) {
return a.currentStyle;
};
Pb = function(a, c, d) {
var e, f, g, h = d || Ob(a), i = h ? h[c] : b, j = a.style;
if (null == i && j && j[c]) i = j[c];
if (Wb.test(i) && !Sb.test(c)) {
e = j.left;
f = a.runtimeStyle;
g = f && f.left;
if (g) f.left = a.currentStyle.left;
j.left = "fontSize" === c ? "1em" : i;
i = j.pixelLeft + "px";
j.left = e;
if (g) f.left = g;
}
return "" === i ? "auto" : i;
};
}
function ec(a, b, c) {
var d = Vb.exec(b);
return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b;
}
function fc(a, b, c, d, e) {
var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0;
for (;f < 4; f += 2) {
if ("margin" === c) g += u.css(a, c + _b[f], true, e);
if (d) {
if ("content" === c) g -= u.css(a, "padding" + _b[f], true, e);
if ("margin" !== c) g -= u.css(a, "border" + _b[f] + "Width", true, e);
} else {
g += u.css(a, "padding" + _b[f], true, e);
if ("padding" !== c) g += u.css(a, "border" + _b[f] + "Width", true, e);
}
}
return g;
}
function gc(a, b, c) {
var d = true, e = "width" === b ? a.offsetWidth : a.offsetHeight, f = Ob(a), g = u.support.boxSizing && "border-box" === u.css(a, "boxSizing", false, f);
if (e <= 0 || null == e) {
e = Pb(a, b, f);
if (e < 0 || null == e) e = a.style[b];
if (Wb.test(e)) return e;
d = g && (u.support.boxSizingReliable || e === a.style[b]);
e = parseFloat(e) || 0;
}
return e + fc(a, b, c || (g ? "border" : "content"), d, f) + "px";
}
function hc(a) {
var b = g, c = Yb[a];
if (!c) {
c = ic(a, b);
if ("none" === c || !c) {
Nb = (Nb || u("").css("cssText", "display:block !important")).appendTo(b.documentElement);
b = (Nb[0].contentWindow || Nb[0].contentDocument).document;
b.write("");
b.close();
c = ic(a, b);
Nb.detach();
}
Yb[a] = c;
}
return c;
}
function ic(a, b) {
var c = u(b.createElement(a)).appendTo(b.body), d = u.css(c[0], "display");
c.remove();
return d;
}
u.each([ "height", "width" ], function(a, b) {
u.cssHooks[b] = {
get: function(a, c, d) {
if (c) return 0 === a.offsetWidth && Tb.test(u.css(a, "display")) ? u.swap(a, Zb, function() {
return gc(a, b, d);
}) : gc(a, b, d);
},
set: function(a, c, d) {
var e = d && Ob(a);
return ec(a, c, d ? fc(a, b, d, u.support.boxSizing && "border-box" === u.css(a, "boxSizing", false, e), e) : 0);
}
};
});
if (!u.support.opacity) u.cssHooks.opacity = {
get: function(a, b) {
return Rb.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : b ? "1" : "";
},
set: function(a, b) {
var c = a.style, d = a.currentStyle, e = u.isNumeric(b) ? "alpha(opacity=" + 100 * b + ")" : "", f = d && d.filter || c.filter || "";
c.zoom = 1;
if ((b >= 1 || "" === b) && "" === u.trim(f.replace(Qb, "")) && c.removeAttribute) {
c.removeAttribute("filter");
if ("" === b || d && !d.filter) return;
}
c.filter = Qb.test(f) ? f.replace(Qb, e) : f + " " + e;
}
};
u(function() {
if (!u.support.reliableMarginRight) u.cssHooks.marginRight = {
get: function(a, b) {
if (b) return u.swap(a, {
display: "inline-block"
}, Pb, [ a, "marginRight" ]);
}
};
if (!u.support.pixelPosition && u.fn.position) u.each([ "top", "left" ], function(a, b) {
u.cssHooks[b] = {
get: function(a, c) {
if (c) {
c = Pb(a, b);
return Wb.test(c) ? u(a).position()[b] + "px" : c;
}
}
};
});
});
if (u.expr && u.expr.filters) {
u.expr.filters.hidden = function(a) {
return a.offsetWidth <= 0 && a.offsetHeight <= 0 || !u.support.reliableHiddenOffsets && "none" === (a.style && a.style.display || u.css(a, "display"));
};
u.expr.filters.visible = function(a) {
return !u.expr.filters.hidden(a);
};
}
u.each({
margin: "",
padding: "",
border: "Width"
}, function(a, b) {
u.cssHooks[a + b] = {
expand: function(c) {
var d = 0, e = {}, f = "string" === typeof c ? c.split(" ") : [ c ];
for (;d < 4; d++) e[a + _b[d] + b] = f[d] || f[d - 2] || f[0];
return e;
}
};
if (!Ub.test(a)) u.cssHooks[a + b].set = ec;
});
var jc = /%20/g, kc = /\[\]$/, lc = /\r?\n/g, mc = /^(?:submit|button|image|reset|file)$/i, nc = /^(?:input|select|textarea|keygen)/i;
u.fn.extend({
serialize: function() {
return u.param(this.serializeArray());
},
serializeArray: function() {
return this.map(function() {
var a = u.prop(this, "elements");
return a ? u.makeArray(a) : this;
}).filter(function() {
var a = this.type;
return this.name && !u(this).is(":disabled") && nc.test(this.nodeName) && !mc.test(a) && (this.checked || !xb.test(a));
}).map(function(a, b) {
var c = u(this).val();
return null == c ? null : u.isArray(c) ? u.map(c, function(a) {
return {
name: b.name,
value: a.replace(lc, "\r\n")
};
}) : {
name: b.name,
value: c.replace(lc, "\r\n")
};
}).get();
}
});
u.param = function(a, c) {
var d, e = [], f = function(a, b) {
b = u.isFunction(b) ? b() : null == b ? "" : b;
e[e.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b);
};
if (c === b) c = u.ajaxSettings && u.ajaxSettings.traditional;
if (u.isArray(a) || a.jquery && !u.isPlainObject(a)) u.each(a, function() {
f(this.name, this.value);
}); else for (d in a) oc(d, a[d], c, f);
return e.join("&").replace(jc, "+");
};
function oc(a, b, c, d) {
var e;
if (u.isArray(b)) u.each(b, function(b, e) {
if (c || kc.test(a)) d(a, e); else oc(a + "[" + ("object" === typeof e ? b : "") + "]", e, c, d);
}); else if (!c && "object" === u.type(b)) for (e in b) oc(a + "[" + e + "]", b[e], c, d); else d(a, b);
}
u.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(a, b) {
u.fn[b] = function(a, c) {
return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b);
};
});
u.fn.extend({
hover: function(a, b) {
return this.mouseenter(a).mouseleave(b || a);
},
bind: function(a, b, c) {
return this.on(a, null, b, c);
},
unbind: function(a, b) {
return this.off(a, null, b);
},
delegate: function(a, b, c, d) {
return this.on(b, a, c, d);
},
undelegate: function(a, b, c) {
return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c);
}
});
var pc, qc, rc = u.now(), sc = /\?/, tc = /#.*$/, uc = /([?&])_=[^&]*/, vc = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm, wc = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, xc = /^(?:GET|HEAD)$/, yc = /^\/\//, zc = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, Ac = u.fn.load, Bc = {}, Cc = {}, Dc = "*/".concat("*");
try {
qc = f.href;
} catch (Ec) {
qc = g.createElement("a");
qc.href = "";
qc = qc.href;
}
pc = zc.exec(qc.toLowerCase()) || [];
function Fc(a) {
return function(b, c) {
if ("string" !== typeof b) {
c = b;
b = "*";
}
var d, e = 0, f = b.toLowerCase().match(w) || [];
if (u.isFunction(c)) while (d = f[e++]) if ("+" === d[0]) {
d = d.slice(1) || "*";
(a[d] = a[d] || []).unshift(c);
} else (a[d] = a[d] || []).push(c);
};
}
function Gc(a, b, c, d) {
var e = {}, f = a === Cc;
function g(h) {
var i;
e[h] = true;
u.each(a[h] || [], function(a, h) {
var j = h(b, c, d);
if ("string" === typeof j && !f && !e[j]) {
b.dataTypes.unshift(j);
g(j);
return false;
} else if (f) return !(i = j);
});
return i;
}
return g(b.dataTypes[0]) || !e["*"] && g("*");
}
function Hc(a, c) {
var d, e, f = u.ajaxSettings.flatOptions || {};
for (e in c) if (c[e] !== b) (f[e] ? a : d || (d = {}))[e] = c[e];
if (d) u.extend(true, a, d);
return a;
}
u.fn.load = function(a, c, d) {
if ("string" !== typeof a && Ac) return Ac.apply(this, arguments);
var e, f, g, h = this, i = a.indexOf(" ");
if (i >= 0) {
e = a.slice(i, a.length);
a = a.slice(0, i);
}
if (u.isFunction(c)) {
d = c;
c = b;
} else if (c && "object" === typeof c) g = "POST";
if (h.length > 0) u.ajax({
url: a,
type: g,
dataType: "html",
data: c
}).done(function(a) {
f = arguments;
h.html(e ? u("
").append(u.parseHTML(a)).find(e) : a);
}).complete(d && function(a, b) {
h.each(d, f || [ a.responseText, b, a ]);
});
return this;
};
u.each([ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function(a, b) {
u.fn[b] = function(a) {
return this.on(b, a);
};
});
u.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: qc,
type: "GET",
isLocal: wc.test(pc[1]),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": Dc,
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": true,
"text json": u.parseJSON,
"text xml": u.parseXML
},
flatOptions: {
url: true,
context: true
}
},
ajaxSetup: function(a, b) {
return b ? Hc(Hc(a, u.ajaxSettings), b) : Hc(u.ajaxSettings, a);
},
ajaxPrefilter: Fc(Bc),
ajaxTransport: Fc(Cc),
ajax: function(a, c) {
if ("object" === typeof a) {
c = a;
a = b;
}
c = c || {};
var d, e, f, g, h, i, j, k, l = u.ajaxSetup({}, c), m = l.context || l, n = l.context && (m.nodeType || m.jquery) ? u(m) : u.event, o = u.Deferred(), p = u.Callbacks("once memory"), q = l.statusCode || {}, r = {}, s = {}, t = 0, v = "canceled", x = {
readyState: 0,
getResponseHeader: function(a) {
var b;
if (2 === t) {
if (!k) {
k = {};
while (b = vc.exec(g)) k[b[1].toLowerCase()] = b[2];
}
b = k[a.toLowerCase()];
}
return null == b ? null : b;
},
getAllResponseHeaders: function() {
return 2 === t ? g : null;
},
setRequestHeader: function(a, b) {
var c = a.toLowerCase();
if (!t) {
a = s[c] = s[c] || a;
r[a] = b;
}
return this;
},
overrideMimeType: function(a) {
if (!t) l.mimeType = a;
return this;
},
statusCode: function(a) {
var b;
if (a) if (t < 2) for (b in a) q[b] = [ q[b], a[b] ]; else x.always(a[x.status]);
return this;
},
abort: function(a) {
var b = a || v;
if (j) j.abort(b);
z(0, b);
return this;
}
};
o.promise(x).complete = p.add;
x.success = x.done;
x.error = x.fail;
l.url = ((a || l.url || qc) + "").replace(tc, "").replace(yc, pc[1] + "//");
l.type = c.method || c.type || l.method || l.type;
l.dataTypes = u.trim(l.dataType || "*").toLowerCase().match(w) || [ "" ];
if (null == l.crossDomain) {
d = zc.exec(l.url.toLowerCase());
l.crossDomain = !!(d && (d[1] !== pc[1] || d[2] !== pc[2] || (d[3] || ("http:" === d[1] ? "80" : "443")) !== (pc[3] || ("http:" === pc[1] ? "80" : "443"))));
}
if (l.data && l.processData && "string" !== typeof l.data) l.data = u.param(l.data, l.traditional);
Gc(Bc, l, c, x);
if (2 === t) return x;
i = l.global;
if (i && 0 === u.active++) u.event.trigger("ajaxStart");
l.type = l.type.toUpperCase();
l.hasContent = !xc.test(l.type);
f = l.url;
if (!l.hasContent) {
if (l.data) {
f = l.url += (sc.test(f) ? "&" : "?") + l.data;
delete l.data;
}
if (false === l.cache) l.url = uc.test(f) ? f.replace(uc, "$1_=" + rc++) : f + (sc.test(f) ? "&" : "?") + "_=" + rc++;
}
if (l.ifModified) {
if (u.lastModified[f]) x.setRequestHeader("If-Modified-Since", u.lastModified[f]);
if (u.etag[f]) x.setRequestHeader("If-None-Match", u.etag[f]);
}
if (l.data && l.hasContent && false !== l.contentType || c.contentType) x.setRequestHeader("Content-Type", l.contentType);
x.setRequestHeader("Accept", l.dataTypes[0] && l.accepts[l.dataTypes[0]] ? l.accepts[l.dataTypes[0]] + ("*" !== l.dataTypes[0] ? ", " + Dc + "; q=0.01" : "") : l.accepts["*"]);
for (e in l.headers) x.setRequestHeader(e, l.headers[e]);
if (l.beforeSend && (false === l.beforeSend.call(m, x, l) || 2 === t)) return x.abort();
v = "abort";
for (e in {
success: 1,
error: 1,
complete: 1
}) x[e](l[e]);
j = Gc(Cc, l, c, x);
if (!j) z(-1, "No Transport"); else {
x.readyState = 1;
if (i) n.trigger("ajaxSend", [ x, l ]);
if (l.async && l.timeout > 0) h = setTimeout(function() {
x.abort("timeout");
}, l.timeout);
try {
t = 1;
j.send(r, z);
} catch (y) {
if (t < 2) z(-1, y); else throw y;
}
}
function z(a, c, d, e) {
var k, r, s, v, w, y = c;
if (2 === t) return;
t = 2;
if (h) clearTimeout(h);
j = b;
g = e || "";
x.readyState = a > 0 ? 4 : 0;
k = a >= 200 && a < 300 || 304 === a;
if (d) v = Ic(l, x, d);
v = Jc(l, v, x, k);
if (k) {
if (l.ifModified) {
w = x.getResponseHeader("Last-Modified");
if (w) u.lastModified[f] = w;
w = x.getResponseHeader("etag");
if (w) u.etag[f] = w;
}
if (204 === a || "HEAD" === l.type) y = "nocontent"; else if (304 === a) y = "notmodified"; else {
y = v.state;
r = v.data;
s = v.error;
k = !s;
}
} else {
s = y;
if (a || !y) {
y = "error";
if (a < 0) a = 0;
}
}
x.status = a;
x.statusText = (c || y) + "";
if (k) o.resolveWith(m, [ r, y, x ]); else o.rejectWith(m, [ x, y, s ]);
x.statusCode(q);
q = b;
if (i) n.trigger(k ? "ajaxSuccess" : "ajaxError", [ x, l, k ? r : s ]);
p.fireWith(m, [ x, y ]);
if (i) {
n.trigger("ajaxComplete", [ x, l ]);
if (!--u.active) u.event.trigger("ajaxStop");
}
}
return x;
},
getJSON: function(a, b, c) {
return u.get(a, b, c, "json");
},
getScript: function(a, c) {
return u.get(a, b, c, "script");
}
});
u.each([ "get", "post" ], function(a, c) {
u[c] = function(a, d, e, f) {
if (u.isFunction(d)) {
f = f || e;
e = d;
d = b;
}
return u.ajax({
url: a,
type: c,
dataType: f,
data: d,
success: e
});
};
});
function Ic(a, c, d) {
var e, f, g, h, i = a.contents, j = a.dataTypes;
while ("*" === j[0]) {
j.shift();
if (f === b) f = a.mimeType || c.getResponseHeader("Content-Type");
}
if (f) for (h in i) if (i[h] && i[h].test(f)) {
j.unshift(h);
break;
}
if (j[0] in d) g = j[0]; else {
for (h in d) {
if (!j[0] || a.converters[h + " " + j[0]]) {
g = h;
break;
}
if (!e) e = h;
}
g = g || e;
}
if (g) {
if (g !== j[0]) j.unshift(g);
return d[g];
}
}
function Jc(a, b, c, d) {
var e, f, g, h, i, j = {}, k = a.dataTypes.slice();
if (k[1]) for (g in a.converters) j[g.toLowerCase()] = a.converters[g];
f = k.shift();
while (f) {
if (a.responseFields[f]) c[a.responseFields[f]] = b;
if (!i && d && a.dataFilter) b = a.dataFilter(b, a.dataType);
i = f;
f = k.shift();
if (f) if ("*" === f) f = i; else if ("*" !== i && i !== f) {
g = j[i + " " + f] || j["* " + f];
if (!g) for (e in j) {
h = e.split(" ");
if (h[1] === f) {
g = j[i + " " + h[0]] || j["* " + h[0]];
if (g) {
if (true === g) g = j[e]; else if (true !== j[e]) {
f = h[0];
k.unshift(h[1]);
}
break;
}
}
}
if (true !== g) if (g && a["throws"]) b = g(b); else try {
b = g(b);
} catch (l) {
return {
state: "parsererror",
error: g ? l : "No conversion from " + i + " to " + f
};
}
}
}
return {
state: "success",
data: b
};
}
u.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function(a) {
u.globalEval(a);
return a;
}
}
});
u.ajaxPrefilter("script", function(a) {
if (a.cache === b) a.cache = false;
if (a.crossDomain) {
a.type = "GET";
a.global = false;
}
});
u.ajaxTransport("script", function(a) {
if (a.crossDomain) {
var c, d = g.head || u("head")[0] || g.documentElement;
return {
send: function(b, e) {
c = g.createElement("script");
c.async = true;
if (a.scriptCharset) c.charset = a.scriptCharset;
c.src = a.url;
c.onload = c.onreadystatechange = function(a, b) {
if (b || !c.readyState || /loaded|complete/.test(c.readyState)) {
c.onload = c.onreadystatechange = null;
if (c.parentNode) c.parentNode.removeChild(c);
c = null;
if (!b) e(200, "success");
}
};
d.insertBefore(c, d.firstChild);
},
abort: function() {
if (c) c.onload(b, true);
}
};
}
});
var Kc = [], Lc = /(=)\?(?=&|$)|\?\?/;
u.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var a = Kc.pop() || u.expando + "_" + rc++;
this[a] = true;
return a;
}
});
u.ajaxPrefilter("json jsonp", function(c, d, e) {
var f, g, h, i = false !== c.jsonp && (Lc.test(c.url) ? "url" : "string" === typeof c.data && !(c.contentType || "").indexOf("application/x-www-form-urlencoded") && Lc.test(c.data) && "data");
if (i || "jsonp" === c.dataTypes[0]) {
f = c.jsonpCallback = u.isFunction(c.jsonpCallback) ? c.jsonpCallback() : c.jsonpCallback;
if (i) c[i] = c[i].replace(Lc, "$1" + f); else if (false !== c.jsonp) c.url += (sc.test(c.url) ? "&" : "?") + c.jsonp + "=" + f;
c.converters["script json"] = function() {
if (!h) u.error(f + " was not called");
return h[0];
};
c.dataTypes[0] = "json";
g = a[f];
a[f] = function() {
h = arguments;
};
e.always(function() {
a[f] = g;
if (c[f]) {
c.jsonpCallback = d.jsonpCallback;
Kc.push(f);
}
if (h && u.isFunction(g)) g(h[0]);
h = g = b;
});
return "script";
}
});
var Mc, Nc, Oc = 0, Pc = a.ActiveXObject && function() {
var a;
for (a in Mc) Mc[a](b, true);
};
function Qc() {
try {
return new a.XMLHttpRequest();
} catch (b) {}
}
function Rc() {
try {
return new a.ActiveXObject("Microsoft.XMLHTTP");
} catch (b) {}
}
u.ajaxSettings.xhr = a.ActiveXObject ? function() {
return !this.isLocal && Qc() || Rc();
} : Qc;
Nc = u.ajaxSettings.xhr();
u.support.cors = !!Nc && "withCredentials" in Nc;
Nc = u.support.ajax = !!Nc;
if (Nc) u.ajaxTransport(function(c) {
if (!c.crossDomain || u.support.cors) {
var d;
return {
send: function(e, f) {
var g, h, i = c.xhr();
if (c.username) i.open(c.type, c.url, c.async, c.username, c.password); else i.open(c.type, c.url, c.async);
if (c.xhrFields) for (h in c.xhrFields) i[h] = c.xhrFields[h];
if (c.mimeType && i.overrideMimeType) i.overrideMimeType(c.mimeType);
if (!c.crossDomain && !e["X-Requested-With"]) e["X-Requested-With"] = "XMLHttpRequest";
try {
for (h in e) i.setRequestHeader(h, e[h]);
} catch (j) {}
i.send(c.hasContent && c.data || null);
d = function(a, e) {
var h, j, k, l;
try {
if (d && (e || 4 === i.readyState)) {
d = b;
if (g) {
i.onreadystatechange = u.noop;
if (Pc) delete Mc[g];
}
if (e) {
if (4 !== i.readyState) i.abort();
} else {
l = {};
h = i.status;
j = i.getAllResponseHeaders();
if ("string" === typeof i.responseText) l.text = i.responseText;
try {
k = i.statusText;
} catch (m) {
k = "";
}
if (!h && c.isLocal && !c.crossDomain) h = l.text ? 200 : 404; else if (1223 === h) h = 204;
}
}
} catch (n) {
if (!e) f(-1, n);
}
if (l) f(h, k, l, j);
};
if (!c.async) d(); else if (4 === i.readyState) setTimeout(d); else {
g = ++Oc;
if (Pc) {
if (!Mc) {
Mc = {};
u(a).unload(Pc);
}
Mc[g] = d;
}
i.onreadystatechange = d;
}
},
abort: function() {
if (d) d(b, true);
}
};
}
});
var Sc, Tc, Uc = /^(?:toggle|show|hide)$/, Vc = new RegExp("^(?:([+-])=|)(" + v + ")([a-z%]*)$", "i"), Wc = /queueHooks$/, Xc = [ bd ], Yc = {
"*": [ function(a, b) {
var c = this.createTween(a, b), d = c.cur(), e = Vc.exec(b), f = e && e[3] || (u.cssNumber[a] ? "" : "px"), g = (u.cssNumber[a] || "px" !== f && +d) && Vc.exec(u.css(c.elem, a)), h = 1, i = 20;
if (g && g[3] !== f) {
f = f || g[3];
e = e || [];
g = +d || 1;
do {
h = h || ".5";
g /= h;
u.style(c.elem, a, g + f);
} while (h !== (h = c.cur() / d) && 1 !== h && --i);
}
if (e) {
g = c.start = +g || +d || 0;
c.unit = f;
c.end = e[1] ? g + (e[1] + 1) * e[2] : +e[2];
}
return c;
} ]
};
function Zc() {
setTimeout(function() {
Sc = b;
});
return Sc = u.now();
}
function $c(a, b, c) {
var d, e = (Yc[b] || []).concat(Yc["*"]), f = 0, g = e.length;
for (;f < g; f++) if (d = e[f].call(c, b, a)) return d;
}
function _c(a, b, c) {
var d, e, f = 0, g = Xc.length, h = u.Deferred().always(function() {
delete i.elem;
}), i = function() {
if (e) return false;
var b = Sc || Zc(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length;
for (;g < i; g++) j.tweens[g].run(f);
h.notifyWith(a, [ j, f, c ]);
if (f < 1 && i) return c; else {
h.resolveWith(a, [ j ]);
return false;
}
}, j = h.promise({
elem: a,
props: u.extend({}, b),
opts: u.extend(true, {
specialEasing: {}
}, c),
originalProperties: b,
originalOptions: c,
startTime: Sc || Zc(),
duration: c.duration,
tweens: [],
createTween: function(b, c) {
var d = u.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
j.tweens.push(d);
return d;
},
stop: function(b) {
var c = 0, d = b ? j.tweens.length : 0;
if (e) return this;
e = true;
for (;c < d; c++) j.tweens[c].run(1);
if (b) h.resolveWith(a, [ j, b ]); else h.rejectWith(a, [ j, b ]);
return this;
}
}), k = j.props;
ad(k, j.opts.specialEasing);
for (;f < g; f++) {
d = Xc[f].call(j, a, k, j.opts);
if (d) return d;
}
u.map(k, $c, j);
if (u.isFunction(j.opts.start)) j.opts.start.call(a, j);
u.fx.timer(u.extend(i, {
elem: a,
anim: j,
queue: j.opts.queue
}));
return j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always);
}
function ad(a, b) {
var c, d, e, f, g;
for (c in a) {
d = u.camelCase(c);
e = b[d];
f = a[c];
if (u.isArray(f)) {
e = f[1];
f = a[c] = f[0];
}
if (c !== d) {
a[d] = f;
delete a[c];
}
g = u.cssHooks[d];
if (g && "expand" in g) {
f = g.expand(f);
delete a[d];
for (c in f) if (!(c in a)) {
a[c] = f[c];
b[c] = e;
}
} else b[d] = e;
}
}
u.Animation = u.extend(_c, {
tweener: function(a, b) {
if (u.isFunction(a)) {
b = a;
a = [ "*" ];
} else a = a.split(" ");
var c, d = 0, e = a.length;
for (;d < e; d++) {
c = a[d];
Yc[c] = Yc[c] || [];
Yc[c].unshift(b);
}
},
prefilter: function(a, b) {
if (b) Xc.unshift(a); else Xc.push(a);
}
});
function bd(a, b, c) {
var d, e, f, g, h, i, j = this, k = {}, l = a.style, m = a.nodeType && cc(a), n = u._data(a, "fxshow");
if (!c.queue) {
h = u._queueHooks(a, "fx");
if (null == h.unqueued) {
h.unqueued = 0;
i = h.empty.fire;
h.empty.fire = function() {
if (!h.unqueued) i();
};
}
h.unqueued++;
j.always(function() {
j.always(function() {
h.unqueued--;
if (!u.queue(a, "fx").length) h.empty.fire();
});
});
}
if (1 === a.nodeType && ("height" in b || "width" in b)) {
c.overflow = [ l.overflow, l.overflowX, l.overflowY ];
if ("inline" === u.css(a, "display") && "none" === u.css(a, "float")) if (!u.support.inlineBlockNeedsLayout || "inline" === hc(a.nodeName)) l.display = "inline-block"; else l.zoom = 1;
}
if (c.overflow) {
l.overflow = "hidden";
if (!u.support.shrinkWrapBlocks) j.always(function() {
l.overflow = c.overflow[0];
l.overflowX = c.overflow[1];
l.overflowY = c.overflow[2];
});
}
for (d in b) {
e = b[d];
if (Uc.exec(e)) {
delete b[d];
f = f || "toggle" === e;
if (e === (m ? "hide" : "show")) continue;
k[d] = n && n[d] || u.style(a, d);
}
}
if (!u.isEmptyObject(k)) {
if (n) {
if ("hidden" in n) m = n.hidden;
} else n = u._data(a, "fxshow", {});
if (f) n.hidden = !m;
if (m) u(a).show(); else j.done(function() {
u(a).hide();
});
j.done(function() {
var b;
u._removeData(a, "fxshow");
for (b in k) u.style(a, b, k[b]);
});
for (d in k) {
g = $c(m ? n[d] : 0, d, j);
if (!(d in n)) {
n[d] = g.start;
if (m) {
g.end = g.start;
g.start = "width" === d || "height" === d ? 1 : 0;
}
}
}
}
}
function cd(a, b, c, d, e) {
return new cd.prototype.init(a, b, c, d, e);
}
u.Tween = cd;
cd.prototype = {
constructor: cd,
init: function(a, b, c, d, e, f) {
this.elem = a;
this.prop = c;
this.easing = e || "swing";
this.options = b;
this.start = this.now = this.cur();
this.end = d;
this.unit = f || (u.cssNumber[c] ? "" : "px");
},
cur: function() {
var a = cd.propHooks[this.prop];
return a && a.get ? a.get(this) : cd.propHooks._default.get(this);
},
run: function(a) {
var b, c = cd.propHooks[this.prop];
if (this.options.duration) this.pos = b = u.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration); else this.pos = b = a;
this.now = (this.end - this.start) * b + this.start;
if (this.options.step) this.options.step.call(this.elem, this.now, this);
if (c && c.set) c.set(this); else cd.propHooks._default.set(this);
return this;
}
};
cd.prototype.init.prototype = cd.prototype;
cd.propHooks = {
_default: {
get: function(a) {
var b;
if (null != a.elem[a.prop] && (!a.elem.style || null == a.elem.style[a.prop])) return a.elem[a.prop];
b = u.css(a.elem, a.prop, "");
return !b || "auto" === b ? 0 : b;
},
set: function(a) {
if (u.fx.step[a.prop]) u.fx.step[a.prop](a); else if (a.elem.style && (null != a.elem.style[u.cssProps[a.prop]] || u.cssHooks[a.prop])) u.style(a.elem, a.prop, a.now + a.unit); else a.elem[a.prop] = a.now;
}
}
};
cd.propHooks.scrollTop = cd.propHooks.scrollLeft = {
set: function(a) {
if (a.elem.nodeType && a.elem.parentNode) a.elem[a.prop] = a.now;
}
};
u.each([ "toggle", "show", "hide" ], function(a, b) {
var c = u.fn[b];
u.fn[b] = function(a, d, e) {
return null == a || "boolean" === typeof a ? c.apply(this, arguments) : this.animate(dd(b, true), a, d, e);
};
});
u.fn.extend({
fadeTo: function(a, b, c, d) {
return this.filter(cc).css("opacity", 0).show().end().animate({
opacity: b
}, a, c, d);
},
animate: function(a, b, c, d) {
var e = u.isEmptyObject(a), f = u.speed(b, c, d), g = function() {
var b = _c(this, u.extend({}, a), f);
if (e || u._data(this, "finish")) b.stop(true);
};
g.finish = g;
return e || false === f.queue ? this.each(g) : this.queue(f.queue, g);
},
stop: function(a, c, d) {
var e = function(a) {
var b = a.stop;
delete a.stop;
b(d);
};
if ("string" !== typeof a) {
d = c;
c = a;
a = b;
}
if (c && false !== a) this.queue(a || "fx", []);
return this.each(function() {
var b = true, c = null != a && a + "queueHooks", f = u.timers, g = u._data(this);
if (c) {
if (g[c] && g[c].stop) e(g[c]);
} else for (c in g) if (g[c] && g[c].stop && Wc.test(c)) e(g[c]);
for (c = f.length; c--; ) if (f[c].elem === this && (null == a || f[c].queue === a)) {
f[c].anim.stop(d);
b = false;
f.splice(c, 1);
}
if (b || !d) u.dequeue(this, a);
});
},
finish: function(a) {
if (false !== a) a = a || "fx";
return this.each(function() {
var b, c = u._data(this), d = c[a + "queue"], e = c[a + "queueHooks"], f = u.timers, g = d ? d.length : 0;
c.finish = true;
u.queue(this, a, []);
if (e && e.stop) e.stop.call(this, true);
for (b = f.length; b--; ) if (f[b].elem === this && f[b].queue === a) {
f[b].anim.stop(true);
f.splice(b, 1);
}
for (b = 0; b < g; b++) if (d[b] && d[b].finish) d[b].finish.call(this);
delete c.finish;
});
}
});
function dd(a, b) {
var c, d = {
height: a
}, e = 0;
b = b ? 1 : 0;
for (;e < 4; e += 2 - b) {
c = _b[e];
d["margin" + c] = d["padding" + c] = a;
}
if (b) d.opacity = d.width = a;
return d;
}
u.each({
slideDown: dd("show"),
slideUp: dd("hide"),
slideToggle: dd("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function(a, b) {
u.fn[a] = function(a, c, d) {
return this.animate(b, a, c, d);
};
});
u.speed = function(a, b, c) {
var d = a && "object" === typeof a ? u.extend({}, a) : {
complete: c || !c && b || u.isFunction(a) && a,
duration: a,
easing: c && b || b && !u.isFunction(b) && b
};
d.duration = u.fx.off ? 0 : "number" === typeof d.duration ? d.duration : d.duration in u.fx.speeds ? u.fx.speeds[d.duration] : u.fx.speeds._default;
if (null == d.queue || true === d.queue) d.queue = "fx";
d.old = d.complete;
d.complete = function() {
if (u.isFunction(d.old)) d.old.call(this);
if (d.queue) u.dequeue(this, d.queue);
};
return d;
};
u.easing = {
linear: function(a) {
return a;
},
swing: function(a) {
return .5 - Math.cos(a * Math.PI) / 2;
}
};
u.timers = [];
u.fx = cd.prototype.init;
u.fx.tick = function() {
var a, c = u.timers, d = 0;
Sc = u.now();
for (;d < c.length; d++) {
a = c[d];
if (!a() && c[d] === a) c.splice(d--, 1);
}
if (!c.length) u.fx.stop();
Sc = b;
};
u.fx.timer = function(a) {
if (a() && u.timers.push(a)) u.fx.start();
};
u.fx.interval = 13;
u.fx.start = function() {
if (!Tc) Tc = setInterval(u.fx.tick, u.fx.interval);
};
u.fx.stop = function() {
clearInterval(Tc);
Tc = null;
};
u.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
};
u.fx.step = {};
if (u.expr && u.expr.filters) u.expr.filters.animated = function(a) {
return u.grep(u.timers, function(b) {
return a === b.elem;
}).length;
};
u.fn.offset = function(a) {
if (arguments.length) return a === b ? this : this.each(function(b) {
u.offset.setOffset(this, a, b);
});
var c, d, f = {
top: 0,
left: 0
}, g = this[0], h = g && g.ownerDocument;
if (!h) return;
c = h.documentElement;
if (!u.contains(c, g)) return f;
if (typeof g.getBoundingClientRect !== e) f = g.getBoundingClientRect();
d = ed(h);
return {
top: f.top + (d.pageYOffset || c.scrollTop) - (c.clientTop || 0),
left: f.left + (d.pageXOffset || c.scrollLeft) - (c.clientLeft || 0)
};
};
u.offset = {
setOffset: function(a, b, c) {
var d = u.css(a, "position");
if ("static" === d) a.style.position = "relative";
var e = u(a), f = e.offset(), g = u.css(a, "top"), h = u.css(a, "left"), i = ("absolute" === d || "fixed" === d) && u.inArray("auto", [ g, h ]) > -1, j = {}, k = {}, l, m;
if (i) {
k = e.position();
l = k.top;
m = k.left;
} else {
l = parseFloat(g) || 0;
m = parseFloat(h) || 0;
}
if (u.isFunction(b)) b = b.call(a, c, f);
if (null != b.top) j.top = b.top - f.top + l;
if (null != b.left) j.left = b.left - f.left + m;
if ("using" in b) b.using.call(a, j); else e.css(j);
}
};
u.fn.extend({
position: function() {
if (!this[0]) return;
var a, b, c = {
top: 0,
left: 0
}, d = this[0];
if ("fixed" === u.css(d, "position")) b = d.getBoundingClientRect(); else {
a = this.offsetParent();
b = this.offset();
if (!u.nodeName(a[0], "html")) c = a.offset();
c.top += u.css(a[0], "borderTopWidth", true);
c.left += u.css(a[0], "borderLeftWidth", true);
}
return {
top: b.top - c.top - u.css(d, "marginTop", true),
left: b.left - c.left - u.css(d, "marginLeft", true)
};
},
offsetParent: function() {
return this.map(function() {
var a = this.offsetParent || h;
while (a && !u.nodeName(a, "html") && "static" === u.css(a, "position")) a = a.offsetParent;
return a || h;
});
}
});
u.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function(a, c) {
var d = /Y/.test(c);
u.fn[a] = function(e) {
return u.access(this, function(a, e, f) {
var g = ed(a);
if (f === b) return g ? c in g ? g[c] : g.document.documentElement[e] : a[e];
if (g) g.scrollTo(!d ? f : u(g).scrollLeft(), d ? f : u(g).scrollTop()); else a[e] = f;
}, a, e, arguments.length, null);
};
});
function ed(a) {
return u.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : false;
}
u.each({
Height: "height",
Width: "width"
}, function(a, c) {
u.each({
padding: "inner" + a,
content: c,
"": "outer" + a
}, function(d, e) {
u.fn[e] = function(e, f) {
var g = arguments.length && (d || "boolean" !== typeof e), h = d || (true === e || true === f ? "margin" : "border");
return u.access(this, function(c, d, e) {
var f;
if (u.isWindow(c)) return c.document.documentElement["client" + a];
if (9 === c.nodeType) {
f = c.documentElement;
return Math.max(c.body["scroll" + a], f["scroll" + a], c.body["offset" + a], f["offset" + a], f["client" + a]);
}
return e === b ? u.css(c, d, h) : u.style(c, d, e, h);
}, c, g ? e : b, g, null);
};
});
});
u.fn.size = function() {
return this.length;
};
u.fn.andSelf = u.fn.addBack;
if ("object" === typeof module && module && "object" === typeof module.exports) module.exports = u; else {
a.jQuery = a.$ = u;
if ("function" === typeof define && define.amd) define("jquery", [], function() {
return u;
});
}
}(window);
if ("undefined" === typeof jQuery) throw new Error("Bootstrap requires jQuery");
+function(a) {
"use strict";
function b() {
var a = document.createElement("bootstrap");
var b = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var c in b) if (void 0 !== a.style[c]) return {
end: b[c]
};
}
a.fn.emulateTransitionEnd = function(b) {
var c = false, d = this;
a(this).one(a.support.transition.end, function() {
c = true;
});
var e = function() {
if (!c) a(d).trigger(a.support.transition.end);
};
setTimeout(e, b);
return this;
};
a(function() {
a.support.transition = b();
});
}(jQuery);
+function(a) {
"use strict";
var b = '[data-dismiss="alert"]';
var c = function(c) {
a(c).on("click", b, this.close);
};
c.prototype.close = function(b) {
var c = a(this);
var d = c.attr("data-target");
if (!d) {
d = c.attr("href");
d = d && d.replace(/.*(?=#[^\s]*$)/, "");
}
var e = a(d);
if (b) b.preventDefault();
if (!e.length) e = c.hasClass("alert") ? c : c.parent();
e.trigger(b = a.Event("close.bs.alert"));
if (b.isDefaultPrevented()) return;
e.removeClass("in");
function f() {
e.trigger("closed.bs.alert").remove();
}
a.support.transition && e.hasClass("fade") ? e.one(a.support.transition.end, f).emulateTransitionEnd(150) : f();
};
var d = a.fn.alert;
a.fn.alert = function(b) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.alert");
if (!e) d.data("bs.alert", e = new c(this));
if ("string" == typeof b) e[b].call(d);
});
};
a.fn.alert.Constructor = c;
a.fn.alert.noConflict = function() {
a.fn.alert = d;
return this;
};
a(document).on("click.bs.alert.data-api", b, c.prototype.close);
}(jQuery);
+function(a) {
"use strict";
var b = function(c, d) {
this.$element = a(c);
this.options = a.extend({}, b.DEFAULTS, d);
};
b.DEFAULTS = {
loadingText: "loading..."
};
b.prototype.setState = function(a) {
var b = "disabled";
var c = this.$element;
var d = c.is("input") ? "val" : "html";
var e = c.data();
a += "Text";
if (!e.resetText) c.data("resetText", c[d]());
c[d](e[a] || this.options[a]);
setTimeout(function() {
"loadingText" == a ? c.addClass(b).attr(b, b) : c.removeClass(b).removeAttr(b);
}, 0);
};
b.prototype.toggle = function() {
var a = this.$element.closest('[data-toggle="buttons"]');
var b = true;
if (a.length) {
var c = this.$element.find("input");
if ("radio" === c.prop("type")) if (c.prop("checked") && this.$element.hasClass("active")) b = false; else a.find(".active").removeClass("active");
if (b) c.prop("checked", !this.$element.hasClass("active")).trigger("change");
}
if (b) this.$element.toggleClass("active");
};
var c = a.fn.button;
a.fn.button = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.button");
var f = "object" == typeof c && c;
if (!e) d.data("bs.button", e = new b(this, f));
if ("toggle" == c) e.toggle(); else if (c) e.setState(c);
});
};
a.fn.button.Constructor = b;
a.fn.button.noConflict = function() {
a.fn.button = c;
return this;
};
a(document).on("click.bs.button.data-api", "[data-toggle^=button]", function(b) {
var c = a(b.target);
if (!c.hasClass("btn")) c = c.closest(".btn");
c.button("toggle");
b.preventDefault();
});
}(jQuery);
+function(a) {
"use strict";
var b = function(b, c) {
this.$element = a(b);
this.$indicators = this.$element.find(".carousel-indicators");
this.options = c;
this.paused = this.sliding = this.interval = this.$active = this.$items = null;
"hover" == this.options.pause && this.$element.on("mouseenter", a.proxy(this.pause, this)).on("mouseleave", a.proxy(this.cycle, this));
};
b.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: true
};
b.prototype.cycle = function(b) {
b || (this.paused = false);
this.interval && clearInterval(this.interval);
this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval));
return this;
};
b.prototype.getActiveIndex = function() {
this.$active = this.$element.find(".item.active");
this.$items = this.$active.parent().children();
return this.$items.index(this.$active);
};
b.prototype.to = function(b) {
var c = this;
var d = this.getActiveIndex();
if (b > this.$items.length - 1 || b < 0) return;
if (this.sliding) return this.$element.one("slid.bs.carousel", function() {
c.to(b);
});
if (d == b) return this.pause().cycle();
return this.slide(b > d ? "next" : "prev", a(this.$items[b]));
};
b.prototype.pause = function(b) {
b || (this.paused = true);
if (this.$element.find(".next, .prev").length && a.support.transition.end) {
this.$element.trigger(a.support.transition.end);
this.cycle(true);
}
this.interval = clearInterval(this.interval);
return this;
};
b.prototype.next = function() {
if (this.sliding) return;
return this.slide("next");
};
b.prototype.prev = function() {
if (this.sliding) return;
return this.slide("prev");
};
b.prototype.slide = function(b, c) {
var d = this.$element.find(".item.active");
var e = c || d[b]();
var f = this.interval;
var g = "next" == b ? "left" : "right";
var h = "next" == b ? "first" : "last";
var i = this;
if (!e.length) {
if (!this.options.wrap) return;
e = this.$element.find(".item")[h]();
}
this.sliding = true;
f && this.pause();
var j = a.Event("slide.bs.carousel", {
relatedTarget: e[0],
direction: g
});
if (e.hasClass("active")) return;
if (this.$indicators.length) {
this.$indicators.find(".active").removeClass("active");
this.$element.one("slid.bs.carousel", function() {
var b = a(i.$indicators.children()[i.getActiveIndex()]);
b && b.addClass("active");
});
}
if (a.support.transition && this.$element.hasClass("slide")) {
this.$element.trigger(j);
if (j.isDefaultPrevented()) return;
e.addClass(b);
e[0].offsetWidth;
d.addClass(g);
e.addClass(g);
d.one(a.support.transition.end, function() {
e.removeClass([ b, g ].join(" ")).addClass("active");
d.removeClass([ "active", g ].join(" "));
i.sliding = false;
setTimeout(function() {
i.$element.trigger("slid.bs.carousel");
}, 0);
}).emulateTransitionEnd(600);
} else {
this.$element.trigger(j);
if (j.isDefaultPrevented()) return;
d.removeClass("active");
e.addClass("active");
this.sliding = false;
this.$element.trigger("slid.bs.carousel");
}
f && this.cycle();
return this;
};
var c = a.fn.carousel;
a.fn.carousel = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.carousel");
var f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c);
var g = "string" == typeof c ? c : f.slide;
if (!e) d.data("bs.carousel", e = new b(this, f));
if ("number" == typeof c) e.to(c); else if (g) e[g](); else if (f.interval) e.pause().cycle();
});
};
a.fn.carousel.Constructor = b;
a.fn.carousel.noConflict = function() {
a.fn.carousel = c;
return this;
};
a(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", function(b) {
var c = a(this), d;
var e = a(c.attr("data-target") || (d = c.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
var f = a.extend({}, e.data(), c.data());
var g = c.attr("data-slide-to");
if (g) f.interval = false;
e.carousel(f);
if (g = c.attr("data-slide-to")) e.data("bs.carousel").to(g);
b.preventDefault();
});
a(window).on("load", function() {
a('[data-ride="carousel"]').each(function() {
var b = a(this);
b.carousel(b.data());
});
});
}(jQuery);
+function(a) {
"use strict";
var b = function(c, d) {
this.$element = a(c);
this.options = a.extend({}, b.DEFAULTS, d);
this.transitioning = null;
if (this.options.parent) this.$parent = a(this.options.parent);
if (this.options.toggle) this.toggle();
};
b.DEFAULTS = {
toggle: true
};
b.prototype.dimension = function() {
var a = this.$element.hasClass("width");
return a ? "width" : "height";
};
b.prototype.show = function() {
if (this.transitioning || this.$element.hasClass("in")) return;
var b = a.Event("show.bs.collapse");
this.$element.trigger(b);
if (b.isDefaultPrevented()) return;
var c = this.$parent && this.$parent.find("> .panel > .in");
if (c && c.length) {
var d = c.data("bs.collapse");
if (d && d.transitioning) return;
c.collapse("hide");
d || c.data("bs.collapse", null);
}
var e = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[e](0);
this.transitioning = 1;
var f = function() {
this.$element.removeClass("collapsing").addClass("in")[e]("auto");
this.transitioning = 0;
this.$element.trigger("shown.bs.collapse");
};
if (!a.support.transition) return f.call(this);
var g = a.camelCase([ "scroll", e ].join("-"));
this.$element.one(a.support.transition.end, a.proxy(f, this)).emulateTransitionEnd(350)[e](this.$element[0][g]);
};
b.prototype.hide = function() {
if (this.transitioning || !this.$element.hasClass("in")) return;
var b = a.Event("hide.bs.collapse");
this.$element.trigger(b);
if (b.isDefaultPrevented()) return;
var c = this.dimension();
this.$element[c](this.$element[c]())[0].offsetHeight;
this.$element.addClass("collapsing").removeClass("collapse").removeClass("in");
this.transitioning = 1;
var d = function() {
this.transitioning = 0;
this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse");
};
if (!a.support.transition) return d.call(this);
this.$element[c](0).one(a.support.transition.end, a.proxy(d, this)).emulateTransitionEnd(350);
};
b.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]();
};
var c = a.fn.collapse;
a.fn.collapse = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.collapse");
var f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c);
if (!e) d.data("bs.collapse", e = new b(this, f));
if ("string" == typeof c) e[c]();
});
};
a.fn.collapse.Constructor = b;
a.fn.collapse.noConflict = function() {
a.fn.collapse = c;
return this;
};
a(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function(b) {
var c = a(this), d;
var e = c.attr("data-target") || b.preventDefault() || (d = c.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, "");
var f = a(e);
var g = f.data("bs.collapse");
var h = g ? "toggle" : c.data();
var i = c.attr("data-parent");
var j = i && a(i);
if (!g || !g.transitioning) {
if (j) j.find('[data-toggle=collapse][data-parent="' + i + '"]').not(c).addClass("collapsed");
c[f.hasClass("in") ? "addClass" : "removeClass"]("collapsed");
}
f.collapse(h);
});
}(jQuery);
+function(a) {
"use strict";
var b = ".dropdown-backdrop";
var c = "[data-toggle=dropdown]";
var d = function(b) {
a(b).on("click.bs.dropdown", this.toggle);
};
d.prototype.toggle = function(b) {
var c = a(this);
if (c.is(".disabled, :disabled")) return;
var d = f(c);
var g = d.hasClass("open");
e();
if (!g) {
if ("ontouchstart" in document.documentElement && !d.closest(".navbar-nav").length) a('').insertAfter(a(this)).on("click", e);
d.trigger(b = a.Event("show.bs.dropdown"));
if (b.isDefaultPrevented()) return;
d.toggleClass("open").trigger("shown.bs.dropdown");
c.focus();
}
return false;
};
d.prototype.keydown = function(b) {
if (!/(38|40|27)/.test(b.keyCode)) return;
var d = a(this);
b.preventDefault();
b.stopPropagation();
if (d.is(".disabled, :disabled")) return;
var e = f(d);
var g = e.hasClass("open");
if (!g || g && 27 == b.keyCode) {
if (27 == b.which) e.find(c).focus();
return d.click();
}
var h = a("[role=menu] li:not(.divider):visible a", e);
if (!h.length) return;
var i = h.index(h.filter(":focus"));
if (38 == b.keyCode && i > 0) i--;
if (40 == b.keyCode && i < h.length - 1) i++;
if (!~i) i = 0;
h.eq(i).focus();
};
function e() {
a(b).remove();
a(c).each(function(b) {
var c = f(a(this));
if (!c.hasClass("open")) return;
c.trigger(b = a.Event("hide.bs.dropdown"));
if (b.isDefaultPrevented()) return;
c.removeClass("open").trigger("hidden.bs.dropdown");
});
}
function f(b) {
var c = b.attr("data-target");
if (!c) {
c = b.attr("href");
c = c && /#/.test(c) && c.replace(/.*(?=#[^\s]*$)/, "");
}
var d = c && a(c);
return d && d.length ? d : b.parent();
}
var g = a.fn.dropdown;
a.fn.dropdown = function(b) {
return this.each(function() {
var c = a(this);
var e = c.data("bs.dropdown");
if (!e) c.data("bs.dropdown", e = new d(this));
if ("string" == typeof b) e[b].call(c);
});
};
a.fn.dropdown.Constructor = d;
a.fn.dropdown.noConflict = function() {
a.fn.dropdown = g;
return this;
};
a(document).on("click.bs.dropdown.data-api", e).on("click.bs.dropdown.data-api", ".dropdown form", function(a) {
a.stopPropagation();
}).on("click.bs.dropdown.data-api", c, d.prototype.toggle).on("keydown.bs.dropdown.data-api", c + ", [role=menu]", d.prototype.keydown);
}(jQuery);
+function(a) {
"use strict";
var b = function(b, c) {
this.options = c;
this.$element = a(b);
this.$backdrop = this.isShown = null;
if (this.options.remote) this.$element.load(this.options.remote);
};
b.DEFAULTS = {
backdrop: true,
keyboard: true,
show: true
};
b.prototype.toggle = function(a) {
return this[!this.isShown ? "show" : "hide"](a);
};
b.prototype.show = function(b) {
var c = this;
var d = a.Event("show.bs.modal", {
relatedTarget: b
});
this.$element.trigger(d);
if (this.isShown || d.isDefaultPrevented()) return;
this.isShown = true;
this.escape();
this.$element.on("click.dismiss.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this));
this.backdrop(function() {
var d = a.support.transition && c.$element.hasClass("fade");
if (!c.$element.parent().length) c.$element.appendTo(document.body);
c.$element.show();
if (d) c.$element[0].offsetWidth;
c.$element.addClass("in").attr("aria-hidden", false);
c.enforceFocus();
var e = a.Event("shown.bs.modal", {
relatedTarget: b
});
d ? c.$element.find(".modal-dialog").one(a.support.transition.end, function() {
c.$element.focus().trigger(e);
}).emulateTransitionEnd(300) : c.$element.focus().trigger(e);
});
};
b.prototype.hide = function(b) {
if (b) b.preventDefault();
b = a.Event("hide.bs.modal");
this.$element.trigger(b);
if (!this.isShown || b.isDefaultPrevented()) return;
this.isShown = false;
this.escape();
a(document).off("focusin.bs.modal");
this.$element.removeClass("in").attr("aria-hidden", true).off("click.dismiss.modal");
a.support.transition && this.$element.hasClass("fade") ? this.$element.one(a.support.transition.end, a.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal();
};
b.prototype.enforceFocus = function() {
a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function(a) {
if (this.$element[0] !== a.target && !this.$element.has(a.target).length) this.$element.focus();
}, this));
};
b.prototype.escape = function() {
if (this.isShown && this.options.keyboard) this.$element.on("keyup.dismiss.bs.modal", a.proxy(function(a) {
27 == a.which && this.hide();
}, this)); else if (!this.isShown) this.$element.off("keyup.dismiss.bs.modal");
};
b.prototype.hideModal = function() {
var a = this;
this.$element.hide();
this.backdrop(function() {
a.removeBackdrop();
a.$element.trigger("hidden.bs.modal");
});
};
b.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove();
this.$backdrop = null;
};
b.prototype.backdrop = function(b) {
var c = this;
var d = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var e = a.support.transition && d;
this.$backdrop = a('').appendTo(document.body);
this.$element.on("click.dismiss.modal", a.proxy(function(a) {
if (a.target !== a.currentTarget) return;
"static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this);
}, this));
if (e) this.$backdrop[0].offsetWidth;
this.$backdrop.addClass("in");
if (!b) return;
e ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b();
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass("in");
a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b();
} else if (b) b();
};
var c = a.fn.modal;
a.fn.modal = function(c, d) {
return this.each(function() {
var e = a(this);
var f = e.data("bs.modal");
var g = a.extend({}, b.DEFAULTS, e.data(), "object" == typeof c && c);
if (!f) e.data("bs.modal", f = new b(this, g));
if ("string" == typeof c) f[c](d); else if (g.show) f.show(d);
});
};
a.fn.modal.Constructor = b;
a.fn.modal.noConflict = function() {
a.fn.modal = c;
return this;
};
a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(b) {
var c = a(this);
var d = c.attr("href");
var e = a(c.attr("data-target") || d && d.replace(/.*(?=#[^\s]+$)/, ""));
var f = e.data("modal") ? "toggle" : a.extend({
remote: !/#/.test(d) && d
}, e.data(), c.data());
b.preventDefault();
e.modal(f, this).one("hide", function() {
c.is(":visible") && c.focus();
});
});
a(document).on("show.bs.modal", ".modal", function() {
a(document.body).addClass("modal-open");
}).on("hidden.bs.modal", ".modal", function() {
a(document.body).removeClass("modal-open");
});
}(jQuery);
+function(a) {
"use strict";
var b = function(a, b) {
this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null;
this.init("tooltip", a, b);
};
b.DEFAULTS = {
animation: true,
placement: "bottom",
selector: false,
template: '
',
trigger: "hover focus",
title: "",
delay: 0,
html: false,
container: false
};
b.prototype.init = function(b, c, d) {
this.enabled = true;
this.type = b;
this.$element = a(c);
this.options = this.getOptions(d);
var e = this.options.trigger.split(" ");
for (var f = e.length; f--; ) {
var g = e[f];
if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) {
var h = "hover" == g ? "mouseenter" : "focus";
var i = "hover" == g ? "mouseleave" : "blur";
this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this));
this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this));
}
}
this.options.selector ? this._options = a.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle();
};
b.prototype.getDefaults = function() {
return b.DEFAULTS;
};
b.prototype.getOptions = function(b) {
b = a.extend({}, this.getDefaults(), this.$element.data(), b);
if (b.delay && "number" == typeof b.delay) b.delay = {
show: b.delay,
hide: b.delay
};
return b;
};
b.prototype.getDelegateOptions = function() {
var b = {};
var c = this.getDefaults();
this._options && a.each(this._options, function(a, d) {
if (c[a] != d) b[a] = d;
});
return b;
};
b.prototype.enter = function(b) {
var c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
clearTimeout(c.timeout);
c.hoverState = "in";
if (!c.options.delay || !c.options.delay.show) return c.show();
c.timeout = setTimeout(function() {
if ("in" == c.hoverState) c.show();
}, c.options.delay.show);
};
b.prototype.leave = function(b) {
var c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
clearTimeout(c.timeout);
c.hoverState = "out";
if (!c.options.delay || !c.options.delay.hide) return c.hide();
c.timeout = setTimeout(function() {
if ("out" == c.hoverState) c.hide();
}, c.options.delay.hide);
};
b.prototype.show = function() {
var b = a.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
this.$element.trigger(b);
if (b.isDefaultPrevented()) return;
var c = this.tip();
this.setContent();
if (this.options.animation) c.addClass("fade");
var d = "function" == typeof this.options.placement ? this.options.placement.call(this, c[0], this.$element[0]) : this.options.placement;
var e = /\s?auto?\s?/i;
var f = e.test(d);
if (f) d = d.replace(e, "") || "top";
c.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(d);
this.options.container ? c.appendTo(this.options.container) : c.insertAfter(this.$element);
var g = this.getPosition();
var h = c[0].offsetWidth;
var i = c[0].offsetHeight;
if (f) {
var j = this.$element.parent();
var k = d;
var l = document.documentElement.scrollTop || document.body.scrollTop;
var m = "body" == this.options.container ? window.innerWidth : j.outerWidth();
var n = "body" == this.options.container ? window.innerHeight : j.outerHeight();
var o = "body" == this.options.container ? 0 : j.offset().left;
d = "bottom" == d && g.top + g.height + i - l > n ? "top" : "top" == d && g.top - l - i < 0 ? "bottom" : "right" == d && g.right + h > m ? "left" : "left" == d && g.left - h < o ? "right" : d;
c.removeClass(k).addClass(d);
}
var p = this.getCalculatedOffset(d, g, h, i);
this.applyPlacement(p, d);
this.$element.trigger("shown.bs." + this.type);
}
};
b.prototype.applyPlacement = function(a, b) {
var c;
var d = this.tip();
var e = d[0].offsetWidth;
var f = d[0].offsetHeight;
var g = parseInt(d.css("margin-top"), 10);
var h = parseInt(d.css("margin-left"), 10);
if (isNaN(g)) g = 0;
if (isNaN(h)) h = 0;
a.top = a.top + g;
a.left = a.left + h;
d.offset(a).addClass("in");
var i = d[0].offsetWidth;
var j = d[0].offsetHeight;
if ("top" == b && j != f) {
c = true;
a.top = a.top + f - j;
}
if (/bottom|top/.test(b)) {
var k = 0;
if (a.left < 0) {
k = a.left * -2;
a.left = 0;
d.offset(a);
i = d[0].offsetWidth;
j = d[0].offsetHeight;
}
this.replaceArrow(k - e + i, i, "left");
} else this.replaceArrow(j - f, j, "top");
if (c) d.offset(a);
};
b.prototype.replaceArrow = function(a, b, c) {
this.arrow().css(c, a ? 50 * (1 - a / b) + "%" : "");
};
b.prototype.setContent = function() {
var a = this.tip();
var b = this.getTitle();
a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b);
a.removeClass("fade in top bottom left right");
};
b.prototype.hide = function() {
var b = this;
var c = this.tip();
var d = a.Event("hide.bs." + this.type);
function e() {
if ("in" != b.hoverState) c.detach();
}
this.$element.trigger(d);
if (d.isDefaultPrevented()) return;
c.removeClass("in");
a.support.transition && this.$tip.hasClass("fade") ? c.one(a.support.transition.end, e).emulateTransitionEnd(150) : e();
this.$element.trigger("hidden.bs." + this.type);
return this;
};
b.prototype.fixTitle = function() {
var a = this.$element;
if (a.attr("title") || "string" != typeof a.attr("data-original-title")) a.attr("data-original-title", a.attr("title") || "").attr("title", "");
};
b.prototype.hasContent = function() {
return this.getTitle();
};
b.prototype.getPosition = function() {
var b = this.$element[0];
return a.extend({}, "function" == typeof b.getBoundingClientRect ? b.getBoundingClientRect() : {
width: b.offsetWidth,
height: b.offsetHeight
}, this.$element.offset());
};
b.prototype.getCalculatedOffset = function(a, b, c, d) {
return "bottom" == a ? {
top: b.top + b.height,
left: b.left + b.width / 2 - c / 2
} : "top" == a ? {
top: b.top - d,
left: b.left + b.width / 2 - c / 2
} : "left" == a ? {
top: b.top + b.height / 2 - d / 2,
left: b.left - c
} : {
top: b.top + b.height / 2 - d / 2,
left: b.left + b.width
};
};
b.prototype.getTitle = function() {
var a;
var b = this.$element;
var c = this.options;
a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title);
return a;
};
b.prototype.tip = function() {
return this.$tip = this.$tip || a(this.options.template);
};
b.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow");
};
b.prototype.validate = function() {
if (!this.$element[0].parentNode) {
this.hide();
this.$element = null;
this.options = null;
}
};
b.prototype.enable = function() {
this.enabled = true;
};
b.prototype.disable = function() {
this.enabled = false;
};
b.prototype.toggleEnabled = function() {
this.enabled = !this.enabled;
};
b.prototype.toggle = function(b) {
var c = b ? a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
c.tip().hasClass("in") ? c.leave(c) : c.enter(c);
};
b.prototype.destroy = function() {
this.hide().$element.off("." + this.type).removeData("bs." + this.type);
};
var c = a.fn.tooltip;
a.fn.tooltip = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.tooltip");
var f = "object" == typeof c && c;
if (!e) d.data("bs.tooltip", e = new b(this, f));
if ("string" == typeof c) e[c]();
});
};
a.fn.tooltip.Constructor = b;
a.fn.tooltip.noConflict = function() {
a.fn.tooltip = c;
return this;
};
}(jQuery);
+function(a) {
"use strict";
var b = function(a, b) {
this.init("popover", a, b);
};
if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");
b.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: '
'
});
b.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype);
b.prototype.constructor = b;
b.prototype.getDefaults = function() {
return b.DEFAULTS;
};
b.prototype.setContent = function() {
var a = this.tip();
var b = this.getTitle();
var c = this.getContent();
a.find(".popover-title")[this.options.html ? "html" : "text"](b);
a.find(".popover-content")[this.options.html ? "html" : "text"](c);
a.removeClass("fade top bottom left right in");
if (!a.find(".popover-title").html()) a.find(".popover-title").hide();
};
b.prototype.hasContent = function() {
return this.getTitle() || this.getContent();
};
b.prototype.getContent = function() {
var a = this.$element;
var b = this.options;
return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content);
};
b.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow");
};
b.prototype.tip = function() {
if (!this.$tip) this.$tip = a(this.options.template);
return this.$tip;
};
var c = a.fn.popover;
a.fn.popover = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.popover");
var f = "object" == typeof c && c;
if (!e) d.data("bs.popover", e = new b(this, f));
if ("string" == typeof c) e[c]();
});
};
a.fn.popover.Constructor = b;
a.fn.popover.noConflict = function() {
a.fn.popover = c;
return this;
};
}(jQuery);
+function(a) {
"use strict";
function b(c, d) {
var e;
var f = a.proxy(this.process, this);
this.$element = a(c).is("body") ? a(window) : a(c);
this.$body = a("body");
this.$scrollElement = this.$element.on("scroll.bs.scroll-spy.data-api", f);
this.options = a.extend({}, b.DEFAULTS, d);
this.selector = (this.options.target || (e = a(c).attr("href")) && e.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a";
this.offsets = a([]);
this.targets = a([]);
this.activeTarget = null;
this.refresh();
this.process();
}
b.DEFAULTS = {
offset: 10
};
b.prototype.refresh = function() {
var b = this.$element[0] == window ? "offset" : "position";
this.offsets = a([]);
this.targets = a([]);
var c = this;
var d = this.$body.find(this.selector).map(function() {
var d = a(this);
var e = d.data("target") || d.attr("href");
var f = /^#\w/.test(e) && a(e);
return f && f.length && [ [ f[b]().top + (!a.isWindow(c.$scrollElement.get(0)) && c.$scrollElement.scrollTop()), e ] ] || null;
}).sort(function(a, b) {
return a[0] - b[0];
}).each(function() {
c.offsets.push(this[0]);
c.targets.push(this[1]);
});
};
b.prototype.process = function() {
var a = this.$scrollElement.scrollTop() + this.options.offset;
var b = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight;
var c = b - this.$scrollElement.height();
var d = this.offsets;
var e = this.targets;
var f = this.activeTarget;
var g;
if (a >= c) return f != (g = e.last()[0]) && this.activate(g);
for (g = d.length; g--; ) f != e[g] && a >= d[g] && (!d[g + 1] || a <= d[g + 1]) && this.activate(e[g]);
};
b.prototype.activate = function(b) {
this.activeTarget = b;
a(this.selector).parents(".active").removeClass("active");
var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]';
var d = a(c).parents("li").addClass("active");
if (d.parent(".dropdown-menu").length) d = d.closest("li.dropdown").addClass("active");
d.trigger("activate.bs.scrollspy");
};
var c = a.fn.scrollspy;
a.fn.scrollspy = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.scrollspy");
var f = "object" == typeof c && c;
if (!e) d.data("bs.scrollspy", e = new b(this, f));
if ("string" == typeof c) e[c]();
});
};
a.fn.scrollspy.Constructor = b;
a.fn.scrollspy.noConflict = function() {
a.fn.scrollspy = c;
return this;
};
a(window).on("load", function() {
a('[data-spy="scroll"]').each(function() {
var b = a(this);
b.scrollspy(b.data());
});
});
}(jQuery);
+function(a) {
"use strict";
var b = function(b) {
this.element = a(b);
};
b.prototype.show = function() {
var b = this.element;
var c = b.closest("ul:not(.dropdown-menu)");
var d = b.data("target");
if (!d) {
d = b.attr("href");
d = d && d.replace(/.*(?=#[^\s]*$)/, "");
}
if (b.parent("li").hasClass("active")) return;
var e = c.find(".active:last a")[0];
var f = a.Event("show.bs.tab", {
relatedTarget: e
});
b.trigger(f);
if (f.isDefaultPrevented()) return;
var g = a(d);
this.activate(b.parent("li"), c);
this.activate(g, g.parent(), function() {
b.trigger({
type: "shown.bs.tab",
relatedTarget: e
});
});
};
b.prototype.activate = function(b, c, d) {
var e = c.find("> .active");
var f = d && a.support.transition && e.hasClass("fade");
function g() {
e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");
b.addClass("active");
if (f) {
b[0].offsetWidth;
b.addClass("in");
} else b.removeClass("fade");
if (b.parent(".dropdown-menu")) b.closest("li.dropdown").addClass("active");
d && d();
}
f ? e.one(a.support.transition.end, g).emulateTransitionEnd(150) : g();
e.removeClass("in");
};
var c = a.fn.tab;
a.fn.tab = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.tab");
if (!e) d.data("bs.tab", e = new b(this));
if ("string" == typeof c) e[c]();
});
};
a.fn.tab.Constructor = b;
a.fn.tab.noConflict = function() {
a.fn.tab = c;
return this;
};
a(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function(b) {
b.preventDefault();
a(this).tab("show");
});
}(jQuery);
+function(a) {
"use strict";
var b = function(c, d) {
this.options = a.extend({}, b.DEFAULTS, d);
this.$window = a(window).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this));
this.$element = a(c);
this.affixed = this.unpin = null;
this.checkPosition();
};
b.RESET = "affix affix-top affix-bottom";
b.DEFAULTS = {
offset: 0
};
b.prototype.checkPositionWithEventLoop = function() {
setTimeout(a.proxy(this.checkPosition, this), 1);
};
b.prototype.checkPosition = function() {
if (!this.$element.is(":visible")) return;
var c = a(document).height();
var d = this.$window.scrollTop();
var e = this.$element.offset();
var f = this.options.offset;
var g = f.top;
var h = f.bottom;
if ("object" != typeof f) h = g = f;
if ("function" == typeof g) g = f.top();
if ("function" == typeof h) h = f.bottom();
var i = null != this.unpin && d + this.unpin <= e.top ? false : null != h && e.top + this.$element.height() >= c - h ? "bottom" : null != g && d <= g ? "top" : false;
if (this.affixed === i) return;
if (this.unpin) this.$element.css("top", "");
this.affixed = i;
this.unpin = "bottom" == i ? e.top - d : null;
this.$element.removeClass(b.RESET).addClass("affix" + (i ? "-" + i : ""));
if ("bottom" == i) this.$element.offset({
top: document.body.offsetHeight - h - this.$element.height()
});
};
var c = a.fn.affix;
a.fn.affix = function(c) {
return this.each(function() {
var d = a(this);
var e = d.data("bs.affix");
var f = "object" == typeof c && c;
if (!e) d.data("bs.affix", e = new b(this, f));
if ("string" == typeof c) e[c]();
});
};
a.fn.affix.Constructor = b;
a.fn.affix.noConflict = function() {
a.fn.affix = c;
return this;
};
a(window).on("load", function() {
a('[data-spy="affix"]').each(function() {
var b = a(this);
var c = b.data();
c.offset = c.offset || {};
if (c.offsetBottom) c.offset.bottom = c.offsetBottom;
if (c.offsetTop) c.offset.top = c.offsetTop;
b.affix(c);
});
});
}(jQuery);
!function(a) {
a.expr[":"].icontains = function(b, c, d) {
return a(b).text().toUpperCase().indexOf(d[3].toUpperCase()) >= 0;
};
var b = function(c, d, e) {
if (e) {
e.stopPropagation();
e.preventDefault();
}
this.$element = a(c);
this.$newElement = null;
this.$button = null;
this.$menu = null;
this.options = a.extend({}, a.fn.selectpicker.defaults, this.$element.data(), "object" == typeof d && d);
if (null === this.options.title) this.options.title = this.$element.attr("title");
this.val = b.prototype.val;
this.render = b.prototype.render;
this.refresh = b.prototype.refresh;
this.setStyle = b.prototype.setStyle;
this.selectAll = b.prototype.selectAll;
this.deselectAll = b.prototype.deselectAll;
this.init();
};
b.prototype = {
constructor: b,
init: function() {
this.$element.hide();
this.multiple = this.$element.prop("multiple");
var b = this.$element.attr("id");
this.$newElement = this.createView();
this.$element.after(this.$newElement);
this.$menu = this.$newElement.find("> .dropdown-menu");
this.$button = this.$newElement.find("> button");
this.$searchbox = this.$newElement.find("input");
if (void 0 !== b) {
var c = this;
this.$button.attr("data-id", b);
a('label[for="' + b + '"]').click(function(a) {
a.preventDefault();
c.$button.focus();
});
}
this.checkDisabled();
this.clickListener();
if (this.options.liveSearch) this.liveSearchListener();
this.render();
this.liHeight();
this.setStyle();
this.setWidth();
if (this.options.container) this.selectPosition();
this.$menu.data("this", this);
this.$newElement.data("this", this);
},
createDropdown: function() {
var b = this.multiple ? " show-tick" : "";
var c = this.options.header ? '
' + this.options.header + "
" : "";
var d = this.options.liveSearch ? '' : "";
var e = '
' + c + d + '
';
return a(e);
},
createView: function() {
var a = this.createDropdown();
var b = this.createLi();
a.find("ul").append(b);
return a;
},
reloadLi: function() {
this.destroyLi();
var a = this.createLi();
this.$menu.find("ul").append(a);
},
destroyLi: function() {
this.$menu.find("li").remove();
},
createLi: function() {
var b = this, c = [], d = "";
this.$element.find("option").each(function() {
var d = a(this);
var e = d.attr("class") || "";
var f = d.attr("style") || "";
var g = d.data("content") ? d.data("content") : d.html();
var h = void 0 !== d.data("subtext") ? '' + d.data("subtext") + "" : "";
var i = void 0 !== d.data("icon") ? ' ' : "";
if ("" !== i && (d.is(":disabled") || d.parent().is(":disabled"))) i = "" + i + "";
if (!d.data("content")) g = i + '' + g + h + "";
if (b.options.hideDisabled && (d.is(":disabled") || d.parent().is(":disabled"))) c.push(''); else if (d.parent().is("optgroup") && true !== d.data("divider")) if (0 === d.index()) {
var j = d.parent().attr("label");
var k = void 0 !== d.parent().data("subtext") ? '' + d.parent().data("subtext") + "" : "";
var l = d.parent().data("icon") ? ' ' : "";
j = l + '' + j + k + "";
if (0 !== d[0].index) c.push('
' + j + "
" + b.createA(g, "opt " + e, f)); else c.push("
" + j + "
" + b.createA(g, "opt " + e, f));
} else c.push(b.createA(g, "opt " + e, f)); else if (true === d.data("divider")) c.push('
'); else if (true === a(this).data("hidden")) c.push(""); else c.push(b.createA(g, e, f));
});
a.each(c, function(a, b) {
d += "
" + b + "
";
});
if (!this.multiple && 0 === this.$element.find("option:selected").length && !this.options.title) this.$element.find("option").eq(0).prop("selected", true).attr("selected", "selected");
return a(d);
},
createA: function(a, b, c) {
return '' + a + '';
},
render: function() {
var b = this;
this.$element.find("option").each(function(c) {
b.setDisabled(c, a(this).is(":disabled") || a(this).parent().is(":disabled"));
b.setSelected(c, a(this).is(":selected"));
});
this.tabIndex();
var c = this.$element.find("option:selected").map(function() {
var c = a(this);
var d = c.data("icon") && b.options.showIcon ? ' ' : "";
var e;
if (b.options.showSubtext && c.attr("data-subtext") && !b.multiple) e = ' ' + c.data("subtext") + ""; else e = "";
if (c.data("content") && b.options.showContent) return c.data("content"); else if (void 0 !== c.attr("title")) return c.attr("title"); else return d + c.html() + e;
}).toArray();
var d = !this.multiple ? c[0] : c.join(this.options.multipleSeparator);
if (this.multiple && this.options.selectedTextFormat.indexOf("count") > -1) {
var e = this.options.selectedTextFormat.split(">");
var f = this.options.hideDisabled ? ":not([disabled])" : "";
if (e.length > 1 && c.length > e[1] || 1 == e.length && c.length >= 2) d = this.options.countSelectedText.replace("{0}", c.length).replace("{1}", this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])' + f).length);
}
if (!d) d = void 0 !== this.options.title ? this.options.title : this.options.noneSelectedText;
this.$button.attr("title", a.trim(d));
this.$newElement.find(".filter-option").html(d);
},
setStyle: function(a, b) {
if (this.$element.attr("class")) this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi, ""));
var c = a ? a : this.options.style;
if ("add" == b) this.$button.addClass(c); else if ("remove" == b) this.$button.removeClass(c); else {
this.$button.removeClass(this.options.style);
this.$button.addClass(c);
}
},
liHeight: function() {
var a = this.$menu.parent().clone().appendTo("body"), b = a.addClass("open").find("> .dropdown-menu"), c = b.find("li > a").outerHeight(), d = this.options.header ? b.find(".popover-title").outerHeight() : 0, e = this.options.liveSearch ? b.find(".bootstrap-select-searchbox").outerHeight() : 0;
a.remove();
this.$newElement.data("liHeight", c).data("headerHeight", d).data("searchHeight", e);
},
setSize: function() {
var b = this, c = this.$menu, d = c.find(".inner"), e = this.$newElement.outerHeight(), f = this.$newElement.data("liHeight"), g = this.$newElement.data("headerHeight"), h = this.$newElement.data("searchHeight"), i = c.find("li .divider").outerHeight(true), j = parseInt(c.css("padding-top")) + parseInt(c.css("padding-bottom")) + parseInt(c.css("border-top-width")) + parseInt(c.css("border-bottom-width")), k = this.options.hideDisabled ? ":not(.disabled)" : "", l = a(window), m = j + parseInt(c.css("margin-top")) + parseInt(c.css("margin-bottom")) + 2, n, o, p, q = function() {
o = b.$newElement.offset().top - l.scrollTop();
p = l.height() - o - e;
};
q();
if (this.options.header) c.css("padding-top", 0);
if ("auto" == this.options.size) {
var r = function() {
var a;
q();
n = p - m;
if (b.options.dropupAuto) b.$newElement.toggleClass("dropup", o > p && n - m < c.height());
if (b.$newElement.hasClass("dropup")) n = o - m;
if (c.find("li").length + c.find("dt").length > 3) a = 3 * f + m - 2; else a = 0;
c.css({
"max-height": n + "px",
overflow: "hidden",
"min-height": a + "px"
});
d.css({
"max-height": n - g - h - j + "px",
"overflow-y": "auto",
"min-height": a - j + "px"
});
};
r();
a(window).resize(r);
a(window).scroll(r);
} else if (this.options.size && "auto" != this.options.size && c.find("li" + k).length > this.options.size) {
var s = c.find("li" + k + " > *").filter(":not(.div-contain)").slice(0, this.options.size).last().parent().index();
var t = c.find("li").slice(0, s + 1).find(".div-contain").length;
n = f * this.options.size + t * i + j;
if (b.options.dropupAuto) this.$newElement.toggleClass("dropup", o > p && n < c.height());
c.css({
"max-height": n + g + h + "px",
overflow: "hidden"
});
d.css({
"max-height": n - j + "px",
"overflow-y": "auto"
});
}
},
setWidth: function() {
if ("auto" == this.options.width) {
this.$menu.css("min-width", "0");
var a = this.$newElement.clone().appendTo("body");
var b = a.find("> .dropdown-menu").css("width");
a.remove();
this.$newElement.css("width", b);
} else if ("fit" == this.options.width) {
this.$menu.css("min-width", "");
this.$newElement.css("width", "").addClass("fit-width");
} else if (this.options.width) {
this.$menu.css("min-width", "");
this.$newElement.css("width", this.options.width);
} else {
this.$menu.css("min-width", "");
this.$newElement.css("width", "");
}
if (this.$newElement.hasClass("fit-width") && "fit" !== this.options.width) this.$newElement.removeClass("fit-width");
},
selectPosition: function() {
var b = this, c = "", d = a(c), e, f, g = function(a) {
d.addClass(a.attr("class")).toggleClass("dropup", a.hasClass("dropup"));
e = a.offset();
f = a.hasClass("dropup") ? 0 : a[0].offsetHeight;
d.css({
top: e.top + f,
left: e.left,
width: a[0].offsetWidth,
position: "absolute"
});
};
this.$newElement.on("click", function() {
g(a(this));
d.appendTo(b.options.container);
d.toggleClass("open", !a(this).hasClass("open"));
d.append(b.$menu);
});
a(window).resize(function() {
g(b.$newElement);
});
a(window).on("scroll", function() {
g(b.$newElement);
});
a("html").on("click", function(c) {
if (a(c.target).closest(b.$newElement).length < 1) d.removeClass("open");
});
},
mobile: function() {
this.$element.addClass("mobile-device").appendTo(this.$newElement);
if (this.options.container) this.$menu.hide();
},
refresh: function() {
this.reloadLi();
this.render();
this.setWidth();
this.setStyle();
this.checkDisabled();
this.liHeight();
},
update: function() {
this.reloadLi();
this.setWidth();
this.setStyle();
this.checkDisabled();
this.liHeight();
},
setSelected: function(a, b) {
this.$menu.find("li").eq(a).toggleClass("selected", b);
},
setDisabled: function(a, b) {
if (b) this.$menu.find("li").eq(a).addClass("disabled").find("a").attr("href", "#").attr("tabindex", -1); else this.$menu.find("li").eq(a).removeClass("disabled").find("a").removeAttr("href").attr("tabindex", 0);
},
isDisabled: function() {
return this.$element.is(":disabled");
},
checkDisabled: function() {
var a = this;
if (this.isDisabled()) this.$button.addClass("disabled").attr("tabindex", -1); else {
if (this.$button.hasClass("disabled")) this.$button.removeClass("disabled");
if (this.$button.attr("tabindex") == -1) if (!this.$element.data("tabindex")) this.$button.removeAttr("tabindex");
}
this.$button.click(function() {
return !a.isDisabled();
});
},
tabIndex: function() {
if (this.$element.is("[tabindex]")) {
this.$element.data("tabindex", this.$element.attr("tabindex"));
this.$button.attr("tabindex", this.$element.data("tabindex"));
}
},
clickListener: function() {
var b = this;
a("body").on("touchstart.dropdown", ".dropdown-menu", function(a) {
a.stopPropagation();
});
this.$newElement.on("click", function() {
b.setSize();
if (!b.options.liveSearch && !b.multiple) setTimeout(function() {
b.$menu.find(".selected a").focus();
}, 10);
});
this.$menu.on("click", "li a", function(c) {
var d = a(this).parent().index(), e = b.$element.val(), f = b.$element.prop("selectedIndex");
if (b.multiple) c.stopPropagation();
c.preventDefault();
if (!b.isDisabled() && !a(this).parent().hasClass("disabled")) {
var g = b.$element.find("option");
var h = g.eq(d);
if (!b.multiple) {
g.prop("selected", false);
h.prop("selected", true);
} else {
var i = h.prop("selected");
h.prop("selected", !i);
}
if (!b.multiple) b.$button.focus(); else if (b.options.liveSearch) b.$searchbox.focus();
if (e != b.$element.val() && b.multiple || f != b.$element.prop("selectedIndex") && !b.multiple) b.$element.change();
}
});
this.$menu.on("click", "li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)", function(a) {
if (a.target == this) {
a.preventDefault();
a.stopPropagation();
if (!b.options.liveSearch) b.$button.focus(); else b.$searchbox.focus();
}
});
this.$menu.on("click", ".popover-title .close", function() {
b.$button.focus();
});
this.$searchbox.on("click", function(a) {
a.stopPropagation();
});
this.$element.change(function() {
b.render();
});
},
liveSearchListener: function() {
var b = this, c = a('');
this.$newElement.on("click.dropdown.data-api", function() {
b.$menu.find(".active").removeClass("active");
if (!!b.$searchbox.val()) {
b.$searchbox.val("");
b.$menu.find("li").show();
if (!!c.parent().length) c.remove();
}
if (!b.multiple) b.$menu.find(".selected").addClass("active");
setTimeout(function() {
b.$searchbox.focus();
}, 10);
});
this.$searchbox.on("input propertychange", function() {
if (b.$searchbox.val()) {
b.$menu.find("li").show().not(":icontains(" + b.$searchbox.val() + ")").hide();
if (!b.$menu.find("li").filter(":visible:not(.no-results)").length) {
if (!!c.parent().length) c.remove();
c.html('No results match "' + b.$searchbox.val() + '"').show();
b.$menu.find("li").last().after(c);
} else if (!!c.parent().length) c.remove();
} else {
b.$menu.find("li").show();
if (!!c.parent().length) c.remove();
}
b.$menu.find("li.active").removeClass("active");
b.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus();
a(this).focus();
});
this.$menu.on("mouseenter", "a", function(c) {
b.$menu.find(".active").removeClass("active");
a(c.currentTarget).parent().not(".disabled").addClass("active");
});
this.$menu.on("mouseleave", "a", function() {
b.$menu.find(".active").removeClass("active");
});
},
val: function(a) {
if (void 0 !== a) {
this.$element.val(a);
this.$element.change();
return this.$element;
} else return this.$element.val();
},
selectAll: function() {
this.$element.find("option").prop("selected", true).attr("selected", "selected");
this.render();
},
deselectAll: function() {
this.$element.find("option").prop("selected", false).removeAttr("selected");
this.render();
},
keydown: function(b) {
var c, d, e, f, g, h, i, j, k, l, m, n, o = {
32: " ",
48: "0",
49: "1",
50: "2",
51: "3",
52: "4",
53: "5",
54: "6",
55: "7",
56: "8",
57: "9",
59: ";",
65: "a",
66: "b",
67: "c",
68: "d",
69: "e",
70: "f",
71: "g",
72: "h",
73: "i",
74: "j",
75: "k",
76: "l",
77: "m",
78: "n",
79: "o",
80: "p",
81: "q",
82: "r",
83: "s",
84: "t",
85: "u",
86: "v",
87: "w",
88: "x",
89: "y",
90: "z",
96: "0",
97: "1",
98: "2",
99: "3",
100: "4",
101: "5",
102: "6",
103: "7",
104: "8",
105: "9"
};
c = a(this);
e = c.parent();
if (c.is("input")) e = c.parent().parent();
l = e.data("this");
if (l.options.liveSearch) e = c.parent().parent();
if (l.options.container) e = l.$menu;
d = a("[role=menu] li:not(.divider) a", e);
n = l.$menu.parent().hasClass("open");
if (l.options.liveSearch) {
if (/(^9$|27)/.test(b.keyCode) && n && 0 === l.$menu.find(".active").length) {
b.preventDefault();
l.$menu.parent().removeClass("open");
l.$button.focus();
}
d = a("[role=menu] li:not(.divider):visible", e);
if (!c.val() && !/(38|40)/.test(b.keyCode)) if (0 === d.filter(".active").length) d = l.$newElement.find("li").filter(":icontains(" + o[b.keyCode] + ")");
}
if (!d.length) return;
if (/(38|40)/.test(b.keyCode)) {
if (!n) l.$menu.parent().addClass("open");
f = d.index(d.filter(":focus"));
h = d.parent(":not(.disabled):visible").first().index();
i = d.parent(":not(.disabled):visible").last().index();
g = d.eq(f).parent().nextAll(":not(.disabled):visible").eq(0).index();
j = d.eq(f).parent().prevAll(":not(.disabled):visible").eq(0).index();
k = d.eq(g).parent().prevAll(":not(.disabled):visible").eq(0).index();
if (l.options.liveSearch) {
d.each(function(b) {
if (a(this).is(":not(.disabled)")) a(this).data("index", b);
});
f = d.index(d.filter(".active"));
h = d.filter(":not(.disabled):visible").first().data("index");
i = d.filter(":not(.disabled):visible").last().data("index");
g = d.eq(f).nextAll(":not(.disabled):visible").eq(0).data("index");
j = d.eq(f).prevAll(":not(.disabled):visible").eq(0).data("index");
k = d.eq(g).prevAll(":not(.disabled):visible").eq(0).data("index");
}
m = c.data("prevIndex");
if (38 == b.keyCode) {
if (l.options.liveSearch) f -= 1;
if (f != k && f > j) f = j;
if (f < h) f = h;
if (f == m) f = i;
}
if (40 == b.keyCode) {
if (l.options.liveSearch) f += 1;
if (f == -1) f = 0;
if (f != k && f < g) f = g;
if (f > i) f = i;
if (f == m) f = h;
}
c.data("prevIndex", f);
if (!l.options.liveSearch) d.eq(f).focus(); else {
b.preventDefault();
if (!c.is(".dropdown-toggle")) {
d.removeClass("active");
d.eq(f).addClass("active").find("a").focus();
c.focus();
}
}
} else if (!c.is("input")) {
var p = [], q, r;
d.each(function() {
if (a(this).parent().is(":not(.disabled)")) if (a.trim(a(this).text().toLowerCase()).substring(0, 1) == o[b.keyCode]) p.push(a(this).parent().index());
});
q = a(document).data("keycount");
q++;
a(document).data("keycount", q);
r = a.trim(a(":focus").text().toLowerCase()).substring(0, 1);
if (r != o[b.keyCode]) {
q = 1;
a(document).data("keycount", q);
} else if (q >= p.length) {
a(document).data("keycount", 0);
if (q > p.length) q = 1;
}
d.eq(p[q - 1]).focus();
}
if (/(13|32|^9$)/.test(b.keyCode) && n) {
if (!/(32)/.test(b.keyCode)) b.preventDefault();
if (!l.options.liveSearch) a(":focus").click(); else if (!/(32)/.test(b.keyCode)) {
l.$menu.find(".active a").click();
c.focus();
}
a(document).data("keycount", 0);
}
if (/(^9$|27)/.test(b.keyCode) && n && (l.multiple || l.options.liveSearch) || /(27)/.test(b.keyCode) && !n) {
l.$menu.parent().removeClass("open");
l.$button.focus();
}
},
hide: function() {
this.$newElement.hide();
},
show: function() {
this.$newElement.show();
},
destroy: function() {
this.$newElement.remove();
this.$element.remove();
}
};
a.fn.selectpicker = function(c, d) {
var e = arguments;
var f;
var g = this.each(function() {
if (a(this).is("select")) {
var g = a(this), h = g.data("selectpicker"), i = "object" == typeof c && c;
if (!h) g.data("selectpicker", h = new b(this, i, d)); else if (i) for (var j in i) h.options[j] = i[j];
if ("string" == typeof c) {
var k = c;
if (h[k] instanceof Function) {
[].shift.apply(e);
f = h[k].apply(h, e);
} else f = h.options[k];
}
}
});
if (void 0 !== f) return f; else return g;
};
a.fn.selectpicker.defaults = {
style: "btn-default",
size: "auto",
title: null,
selectedTextFormat: "values",
noneSelectedText: "Nothing selected",
countSelectedText: "{0} of {1} selected",
width: false,
container: false,
hideDisabled: false,
showSubtext: false,
showIcon: true,
showContent: true,
dropupAuto: true,
header: false,
liveSearch: false,
multipleSeparator: ", ",
iconBase: "glyphicon",
tickIcon: "glyphicon-ok"
};
a(document).data("keycount", 0).on("keydown", ".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input", b.prototype.keydown).on("focusin.modal", ".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input", function(a) {
a.stopPropagation();
});
}(window.jQuery);
!function(a, b) {
a.MixItUp = function() {
var b = this;
b._execAction("_constructor", 0);
a.extend(b, {
selectors: {
target: ".mix",
filter: ".filter",
sort: ".sort"
},
animation: {
enable: true,
effects: "fade scale",
duration: 600,
easing: "ease",
perspectiveDistance: "3000",
perspectiveOrigin: "50% 50%",
queue: true,
queueLimit: 1,
animateChangeLayout: false,
animateResizeContainer: true,
animateResizeTargets: false,
staggerSequence: false,
reverseOut: false
},
callbacks: {
onMixLoad: false,
onMixStart: false,
onMixBusy: false,
onMixEnd: false,
onMixFail: false,
_user: false
},
controls: {
enable: true,
live: false,
toggleFilterButtons: false,
toggleLogic: "or",
activeClass: "active"
},
layout: {
display: "inline-block",
containerClass: "",
containerClassFail: "fail"
},
load: {
filter: "all",
sort: false
},
_$body: null,
_$container: null,
_$targets: null,
_$parent: null,
_$sortButtons: null,
_$filterButtons: null,
_suckMode: false,
_mixing: false,
_sorting: false,
_clicking: false,
_loading: true,
_changingLayout: false,
_changingClass: false,
_changingDisplay: false,
_origOrder: [],
_startOrder: [],
_newOrder: [],
_activeFilter: null,
_toggleArray: [],
_toggleString: "",
_activeSort: "default:asc",
_newSort: null,
_startHeight: null,
_newHeight: null,
_incPadding: true,
_newDisplay: null,
_newClass: null,
_targetsBound: 0,
_targetsDone: 0,
_queue: [],
_$show: a(),
_$hide: a()
});
b._execAction("_constructor", 1);
};
a.MixItUp.prototype = {
constructor: a.MixItUp,
_instances: {},
_handled: {
_filter: {},
_sort: {}
},
_bound: {
_filter: {},
_sort: {}
},
_actions: {},
_filters: {},
extend: function(b) {
for (var c in b) a.MixItUp.prototype[c] = b[c];
},
addAction: function(b, c, d, e) {
a.MixItUp.prototype._addHook("_actions", b, c, d, e);
},
addFilter: function(b, c, d, e) {
a.MixItUp.prototype._addHook("_filters", b, c, d, e);
},
_addHook: function(b, c, d, e, f) {
var g = a.MixItUp.prototype[b], h = {};
f = 1 === f || "post" === f ? "post" : "pre";
h[c] = {};
h[c][f] = {};
h[c][f][d] = e;
a.extend(true, g, h);
},
_init: function(b, c) {
var d = this;
d._execAction("_init", 0, arguments);
c && a.extend(true, d, c);
d._$body = a("body");
d._domNode = b;
d._$container = a(b);
d._$container.addClass(d.layout.containerClass);
d._id = b.id;
d._platformDetect();
d._brake = d._getPrefixedCSS("transition", "none");
d._refresh(true);
d._$parent = d._$targets.parent().length ? d._$targets.parent() : d._$container;
if (d.load.sort) {
d._newSort = d._parseSort(d.load.sort);
d._newSortString = d.load.sort;
d._activeSort = d.load.sort;
d._sort();
d._printSort();
}
d._activeFilter = "all" === d.load.filter ? d.selectors.target : "none" === d.load.filter ? "" : d.load.filter;
d.controls.enable && d._bindHandlers();
if (d.controls.toggleFilterButtons) {
d._buildToggleArray();
for (var e = 0; e < d._toggleArray.length; e++) d._updateControls({
filter: d._toggleArray[e],
sort: d._activeSort
}, true);
} else if (d.controls.enable) d._updateControls({
filter: d._activeFilter,
sort: d._activeSort
});
d._filter();
d._init = true;
d._$container.data("mixItUp", d);
d._execAction("_init", 1, arguments);
d._buildState();
d._$targets.css(d._brake);
d._goMix(d.animation.enable);
},
_platformDetect: function() {
var a = this, c = [ "Webkit", "Moz", "O", "ms" ], d = [ "webkit", "moz" ], e = window.navigator.appVersion.match(/Chrome\/(\d+)\./) || false, f = "undefined" !== typeof InstallTrigger, g = function(a) {
for (var b = 0; b < c.length; b++) if (c[b] + "Transition" in a.style) return {
prefix: "-" + c[b].toLowerCase() + "-",
vendor: c[b]
};
return "transition" in a.style ? "" : false;
}, h = g(a._domNode);
a._execAction("_platformDetect", 0);
a._chrome = e ? parseInt(e[1], 10) : false;
a._ff = f ? parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]) : false;
a._prefix = h.prefix;
a._vendor = h.vendor;
a._suckMode = window.atob && a._prefix ? false : true;
a._suckMode && (a.animation.enable = false);
a._ff && a._ff <= 4 && (a.animation.enable = false);
for (var i = 0; i < d.length && !window.requestAnimationFrame; i++) window.requestAnimationFrame = window[d[i] + "RequestAnimationFrame"];
if ("function" !== typeof Object.getPrototypeOf) if ("object" === typeof "test".__proto__) Object.getPrototypeOf = function(a) {
return a.__proto__;
}; else Object.getPrototypeOf = function(a) {
return a.constructor.prototype;
};
if (a._domNode.nextElementSibling === b) Object.defineProperty(Element.prototype, "nextElementSibling", {
get: function() {
var a = this.nextSibling;
while (a) {
if (1 === a.nodeType) return a;
a = a.nextSibling;
}
return null;
}
});
a._execAction("_platformDetect", 1);
},
_refresh: function(a, c) {
var d = this;
d._execAction("_refresh", 0, arguments);
d._$targets = d._$container.find(d.selectors.target);
for (var e = 0; e < d._$targets.length; e++) {
var f = d._$targets[e];
if (f.dataset === b || c) {
f.dataset = {};
for (var g = 0; g < f.attributes.length; g++) {
var h = f.attributes[g], i = h.name, j = h.value;
if (i.indexOf("data-") > -1) {
var k = d._helpers._camelCase(i.substring(5, i.length));
f.dataset[k] = j;
}
}
}
if (f.mixParent === b) f.mixParent = d._id;
}
if (d._$targets.length && a || !d._origOrder.length && d._$targets.length) {
d._origOrder = [];
for (var e = 0; e < d._$targets.length; e++) {
var f = d._$targets[e];
d._origOrder.push(f);
}
}
d._execAction("_refresh", 1, arguments);
},
_bindHandlers: function() {
var c = this, d = a.MixItUp.prototype._bound._filter, e = a.MixItUp.prototype._bound._sort;
c._execAction("_bindHandlers", 0);
if (c.controls.live) c._$body.on("click.mixItUp." + c._id, c.selectors.sort, function() {
c._processClick(a(this), "sort");
}).on("click.mixItUp." + c._id, c.selectors.filter, function() {
c._processClick(a(this), "filter");
}); else {
c._$sortButtons = a(c.selectors.sort);
c._$filterButtons = a(c.selectors.filter);
c._$sortButtons.on("click.mixItUp." + c._id, function() {
c._processClick(a(this), "sort");
});
c._$filterButtons.on("click.mixItUp." + c._id, function() {
c._processClick(a(this), "filter");
});
}
d[c.selectors.filter] = d[c.selectors.filter] === b ? 1 : d[c.selectors.filter] + 1;
e[c.selectors.sort] = e[c.selectors.sort] === b ? 1 : e[c.selectors.sort] + 1;
c._execAction("_bindHandlers", 1);
},
_processClick: function(c, d) {
var e = this, f = function(c, d, f) {
var g = a.MixItUp.prototype;
g._handled["_" + d][e.selectors[d]] = g._handled["_" + d][e.selectors[d]] === b ? 1 : g._handled["_" + d][e.selectors[d]] + 1;
if (g._handled["_" + d][e.selectors[d]] === g._bound["_" + d][e.selectors[d]]) {
c[(f ? "remove" : "add") + "Class"](e.controls.activeClass);
delete g._handled["_" + d][e.selectors[d]];
}
};
e._execAction("_processClick", 0, arguments);
if (!e._mixing || e.animation.queue && e._queue.length < e.animation.queueLimit) {
e._clicking = true;
if ("sort" === d) {
var g = c.attr("data-sort");
if (!c.hasClass(e.controls.activeClass) || g.indexOf("random") > -1) {
a(e.selectors.sort).removeClass(e.controls.activeClass);
f(c, d);
e.sort(g);
}
}
if ("filter" === d) {
var h = c.attr("data-filter"), i, j = "or" === e.controls.toggleLogic ? "," : "";
if (!e.controls.toggleFilterButtons) {
if (!c.hasClass(e.controls.activeClass)) {
a(e.selectors.filter).removeClass(e.controls.activeClass);
f(c, d);
e.filter(h);
}
} else {
e._buildToggleArray();
if (!c.hasClass(e.controls.activeClass)) {
f(c, d);
e._toggleArray.push(h);
} else {
f(c, d, true);
i = e._toggleArray.indexOf(h);
e._toggleArray.splice(i, 1);
}
e._toggleArray = a.grep(e._toggleArray, function(a) {
return a;
});
e._toggleString = e._toggleArray.join(j);
e.filter(e._toggleString);
}
}
e._execAction("_processClick", 1, arguments);
} else {
if ("function" === typeof e.callbacks.onMixBusy) e.callbacks.onMixBusy.call(e._domNode, e._state, e);
e._execAction("_processClickBusy", 1, arguments);
}
},
_buildToggleArray: function() {
var a = this, b = a._activeFilter.replace(/\s/g, "");
a._execAction("_buildToggleArray", 0, arguments);
if ("or" === a.controls.toggleLogic) a._toggleArray = b.split(","); else {
a._toggleArray = b.split(".");
!a._toggleArray[0] && a._toggleArray.shift();
for (var c = 0, d; d = a._toggleArray[c]; c++) a._toggleArray[c] = "." + d;
}
a._execAction("_buildToggleArray", 1, arguments);
},
_updateControls: function(c, d) {
var e = this, f = {
filter: c.filter,
sort: c.sort
}, g = function(a, b) {
d && "filter" === h && !("none" === f.filter || "" === f.filter) ? a.filter(b).addClass(e.controls.activeClass) : a.removeClass(e.controls.activeClass).filter(b).addClass(e.controls.activeClass);
}, h = "filter", i = null;
e._execAction("_updateControls", 0, arguments);
c.filter === b && (f.filter = e._activeFilter);
c.sort === b && (f.sort = e._activeSort);
f.filter === e.selectors.target && (f.filter = "all");
for (var j = 0; j < 2; j++) {
i = e.controls.live ? a(e.selectors[h]) : e["_$" + h + "Buttons"];
i && g(i, "[data-" + h + '="' + f[h] + '"]');
h = "sort";
}
e._execAction("_updateControls", 1, arguments);
},
_filter: function() {
var b = this;
b._execAction("_filter", 0);
for (var c = 0; c < b._$targets.length; c++) {
var d = a(b._$targets[c]);
if (d.is(b._activeFilter)) b._$show = b._$show.add(d); else b._$hide = b._$hide.add(d);
}
b._execAction("_filter", 1);
},
_sort: function() {
var a = this, b = function(a) {
var b = a.slice(), c = b.length, d = c;
while (d--) {
var e = parseInt(Math.random() * c);
var f = b[d];
b[d] = b[e];
b[e] = f;
}
return b;
};
a._execAction("_sort", 0);
a._startOrder = [];
for (var c = 0; c < a._$targets.length; c++) {
var d = a._$targets[c];
a._startOrder.push(d);
}
switch (a._newSort[0].sortBy) {
case "default":
a._newOrder = a._origOrder;
break;
case "random":
a._newOrder = b(a._startOrder);
break;
case "custom":
a._newOrder = a._newSort[0].order;
break;
default:
a._newOrder = a._startOrder.concat().sort(function(b, c) {
return a._compare(b, c);
});
}
a._execAction("_sort", 1);
},
_compare: function(a, b, c) {
c = c ? c : 0;
var d = this, e = d._newSort[c].order, f = function(a) {
return a.dataset[d._newSort[c].sortBy] || 0;
}, g = isNaN(1 * f(a)) ? f(a).toLowerCase() : 1 * f(a), h = isNaN(1 * f(b)) ? f(b).toLowerCase() : 1 * f(b);
if (g < h) return "asc" === e ? -1 : 1;
if (g > h) return "asc" === e ? 1 : -1;
if (g === h && d._newSort.length > c + 1) return d._compare(a, b, c + 1);
return 0;
},
_printSort: function(a) {
var b = this, c = a ? b._startOrder : b._newOrder, d = b._$parent[0].querySelectorAll(b.selectors.target), e = d.length ? d[d.length - 1].nextElementSibling : null, f = document.createDocumentFragment();
b._execAction("_printSort", 0, arguments);
for (var g = 0; g < d.length; g++) {
var h = d[g], i = h.nextSibling;
if ("absolute" === h.style.position) continue;
if (i && "#text" === i.nodeName) b._$parent[0].removeChild(i);
b._$parent[0].removeChild(h);
}
for (var g = 0; g < c.length; g++) {
var j = c[g];
if ("default" === b._newSort[0].sortBy && "desc" === b._newSort[0].order && !a) {
var k = f.firstChild;
f.insertBefore(j, k);
f.insertBefore(document.createTextNode(" "), j);
} else {
f.appendChild(j);
f.appendChild(document.createTextNode(" "));
}
}
e ? b._$parent[0].insertBefore(f, e) : b._$parent[0].appendChild(f);
b._execAction("_printSort", 1, arguments);
},
_parseSort: function(a) {
var b = this, c = "string" === typeof a ? a.split(" ") : [ a ], d = [];
for (var e = 0; e < c.length; e++) {
var f = "string" === typeof a ? c[e].split(":") : [ "custom", c[e] ], g = {
sortBy: b._helpers._camelCase(f[0]),
order: f[1] || "asc"
};
d.push(g);
if ("default" === g.sortBy || "random" === g.sortBy) break;
}
return b._execFilter("_parseSort", d, arguments);
},
_parseEffects: function() {
var a = this, b = {
opacity: "",
transformIn: "",
transformOut: "",
filter: ""
}, c = function(b, c, d) {
if (a.animation.effects.indexOf(b) > -1) {
if (c) {
var e = a.animation.effects.indexOf(b + "(");
if (e > -1) {
var f = a.animation.effects.substring(e), g = /\(([^)]+)\)/.exec(f), h = g[1];
return {
val: h
};
}
}
return true;
} else return false;
}, d = function(a, b) {
if (b) return "-" === a.charAt(0) ? a.substr(1, a.length) : "-" + a; else return a;
}, e = function(a, e) {
var f = [ [ "scale", ".01" ], [ "translateX", "20px" ], [ "translateY", "20px" ], [ "translateZ", "20px" ], [ "rotateX", "90deg" ], [ "rotateY", "90deg" ], [ "rotateZ", "180deg" ] ];
for (var g = 0; g < f.length; g++) {
var h = f[g][0], i = f[g][1], j = e && "scale" !== h;
b[a] += c(h) ? h + "(" + d(c(h, true).val || i, j) + ") " : "";
}
};
b.opacity = c("fade") ? c("fade", true).val || "0" : "1";
e("transformIn");
a.animation.reverseOut ? e("transformOut", true) : b.transformOut = b.transformIn;
b.transition = {};
b.transition = a._getPrefixedCSS("transition", "all " + a.animation.duration + "ms " + a.animation.easing + ", opacity " + a.animation.duration + "ms linear");
a.animation.stagger = c("stagger") ? true : false;
a.animation.staggerDuration = parseInt(c("stagger") ? c("stagger", true).val ? c("stagger", true).val : 100 : 100);
return a._execFilter("_parseEffects", b);
},
_buildState: function(a) {
var b = this, c = {};
b._execAction("_buildState", 0);
c = {
activeFilter: "" === b._activeFilter ? "none" : b._activeFilter,
activeSort: a && b._newSortString ? b._newSortString : b._activeSort,
fail: !b._$show.length && "" !== b._activeFilter,
$targets: b._$targets,
$show: b._$show,
$hide: b._$hide,
totalTargets: b._$targets.length,
totalShow: b._$show.length,
totalHide: b._$hide.length,
display: a && b._newDisplay ? b._newDisplay : b.layout.display
};
if (a) return b._execFilter("_buildState", c); else {
b._state = c;
b._execAction("_buildState", 1);
}
},
_goMix: function(a) {
var b = this, c = function() {
if (b._chrome && 31 === b._chrome) f(b._$parent[0]);
b._setInter();
d();
}, d = function() {
var a = window.pageYOffset, c = window.pageXOffset, d = document.documentElement.scrollHeight;
b._getInterMixData();
b._setFinal();
b._getFinalMixData();
window.pageYOffset !== a && window.scrollTo(c, a);
b._prepTargets();
if (window.requestAnimationFrame) requestAnimationFrame(e); else setTimeout(function() {
e();
}, 20);
}, e = function() {
b._animateTargets();
if (0 === b._targetsBound) b._cleanUp();
}, f = function(a) {
var b = a.parentElement, c = document.createElement("div"), d = document.createDocumentFragment();
b.insertBefore(c, a);
d.appendChild(a);
b.replaceChild(a, c);
}, g = b._buildState(true);
b._execAction("_goMix", 0, arguments);
!b.animation.duration && (a = false);
b._mixing = true;
b._$container.removeClass(b.layout.containerClassFail);
if ("function" === typeof b.callbacks.onMixStart) b.callbacks.onMixStart.call(b._domNode, b._state, g, b);
b._$container.trigger("mixStart", [ b._state, g, b ]);
b._getOrigMixData();
if (a && !b._suckMode) window.requestAnimationFrame ? requestAnimationFrame(c) : c(); else b._cleanUp();
b._execAction("_goMix", 1, arguments);
},
_getTargetData: function(a, b) {
var c = this, d;
a.dataset[b + "PosX"] = a.offsetLeft;
a.dataset[b + "PosY"] = a.offsetTop;
if (c.animation.animateResizeTargets) {
d = window.getComputedStyle(a);
a.dataset[b + "MarginBottom"] = parseInt(d.marginBottom);
a.dataset[b + "MarginRight"] = parseInt(d.marginRight);
a.dataset[b + "Width"] = a.offsetWidth;
a.dataset[b + "Height"] = a.offsetHeight;
}
},
_getOrigMixData: function() {
var a = this, b = !a._suckMode ? window.getComputedStyle(a._$parent[0]) : {
boxSizing: ""
}, c = b.boxSizing || b[a._vendor + "BoxSizing"];
a._incPadding = "border-box" === c;
a._execAction("_getOrigMixData", 0);
!a._suckMode && (a.effects = a._parseEffects());
a._$toHide = a._$hide.filter(":visible");
a._$toShow = a._$show.filter(":hidden");
a._$pre = a._$targets.filter(":visible");
a._startHeight = a._incPadding ? a._$parent.outerHeight() : a._$parent.height();
for (var d = 0; d < a._$pre.length; d++) {
var e = a._$pre[d];
a._getTargetData(e, "orig");
}
a._execAction("_getOrigMixData", 1);
},
_setInter: function() {
var a = this;
a._execAction("_setInter", 0);
if (a._changingLayout && a.animation.animateChangeLayout) {
a._$toShow.css("display", a._newDisplay);
if (a._changingClass) a._$container.removeClass(a.layout.containerClass).addClass(a._newClass);
} else a._$toShow.css("display", a.layout.display);
a._execAction("_setInter", 1);
},
_getInterMixData: function() {
var a = this;
a._execAction("_getInterMixData", 0);
for (var b = 0; b < a._$toShow.length; b++) {
var c = a._$toShow[b];
a._getTargetData(c, "inter");
}
for (var b = 0; b < a._$pre.length; b++) {
var c = a._$pre[b];
a._getTargetData(c, "inter");
}
a._execAction("_getInterMixData", 1);
},
_setFinal: function() {
var a = this;
a._execAction("_setFinal", 0);
a._sorting && a._printSort();
a._$toHide.removeStyle("display");
if (a._changingLayout && a.animation.animateChangeLayout) a._$pre.css("display", a._newDisplay);
a._execAction("_setFinal", 1);
},
_getFinalMixData: function() {
var a = this;
a._execAction("_getFinalMixData", 0);
for (var b = 0; b < a._$toShow.length; b++) {
var c = a._$toShow[b];
a._getTargetData(c, "final");
}
for (var b = 0; b < a._$pre.length; b++) {
var c = a._$pre[b];
a._getTargetData(c, "final");
}
a._newHeight = a._incPadding ? a._$parent.outerHeight() : a._$parent.height();
a._sorting && a._printSort(true);
a._$toShow.removeStyle("display");
a._$pre.css("display", a.layout.display);
if (a._changingClass && a.animation.animateChangeLayout) a._$container.removeClass(a._newClass).addClass(a.layout.containerClass);
a._execAction("_getFinalMixData", 1);
},
_prepTargets: function() {
var b = this, c = {
_in: b._getPrefixedCSS("transform", b.effects.transformIn),
_out: b._getPrefixedCSS("transform", b.effects.transformOut)
};
b._execAction("_prepTargets", 0);
if (b.animation.animateResizeContainer) b._$parent.css("height", b._startHeight + "px");
for (var d = 0; d < b._$toShow.length; d++) {
var e = b._$toShow[d], f = a(e);
e.style.opacity = b.effects.opacity;
e.style.display = b._changingLayout && b.animation.animateChangeLayout ? b._newDisplay : b.layout.display;
f.css(c._in);
if (b.animation.animateResizeTargets) {
e.style.width = e.dataset.finalWidth + "px";
e.style.height = e.dataset.finalHeight + "px";
e.style.marginRight = -(e.dataset.finalWidth - e.dataset.interWidth) + 1 * e.dataset.finalMarginRight + "px";
e.style.marginBottom = -(e.dataset.finalHeight - e.dataset.interHeight) + 1 * e.dataset.finalMarginBottom + "px";
}
}
for (var d = 0; d < b._$pre.length; d++) {
var e = b._$pre[d], f = a(e), g = {
x: e.dataset.origPosX - e.dataset.interPosX,
y: e.dataset.origPosY - e.dataset.interPosY
}, c = b._getPrefixedCSS("transform", "translate(" + g.x + "px," + g.y + "px)");
f.css(c);
if (b.animation.animateResizeTargets) {
e.style.width = e.dataset.origWidth + "px";
e.style.height = e.dataset.origHeight + "px";
if (e.dataset.origWidth - e.dataset.finalWidth) e.style.marginRight = -(e.dataset.origWidth - e.dataset.interWidth) + 1 * e.dataset.origMarginRight + "px";
if (e.dataset.origHeight - e.dataset.finalHeight) e.style.marginBottom = -(e.dataset.origHeight - e.dataset.interHeight) + 1 * e.dataset.origMarginBottom + "px";
}
}
b._execAction("_prepTargets", 1);
},
_animateTargets: function() {
var b = this;
b._execAction("_animateTargets", 0);
b._targetsDone = 0;
b._targetsBound = 0;
b._$parent.css(b._getPrefixedCSS("perspective", b.animation.perspectiveDistance + "px")).css(b._getPrefixedCSS("perspective-origin", b.animation.perspectiveOrigin));
if (b.animation.animateResizeContainer) b._$parent.css(b._getPrefixedCSS("transition", "height " + b.animation.duration + "ms ease")).css("height", b._newHeight + "px");
for (var c = 0; c < b._$toShow.length; c++) {
var d = b._$toShow[c], e = a(d), f = {
x: d.dataset.finalPosX - d.dataset.interPosX,
y: d.dataset.finalPosY - d.dataset.interPosY
}, g = b._getDelay(c), h = {};
d.style.opacity = "";
for (var i = 0; i < 2; i++) {
var j = 0 === i ? j = b._prefix : "";
if (b._ff && b._ff <= 20) {
h[j + "transition-property"] = "all";
h[j + "transition-timing-function"] = b.animation.easing + "ms";
h[j + "transition-duration"] = b.animation.duration + "ms";
}
h[j + "transition-delay"] = g + "ms";
h[j + "transform"] = "translate(" + f.x + "px," + f.y + "px)";
}
if (b.effects.transform || b.effects.opacity) b._bindTargetDone(e);
b._ff && b._ff <= 20 ? e.css(h) : e.css(b.effects.transition).css(h);
}
for (var c = 0; c < b._$pre.length; c++) {
var d = b._$pre[c], e = a(d), f = {
x: d.dataset.finalPosX - d.dataset.interPosX,
y: d.dataset.finalPosY - d.dataset.interPosY
}, g = b._getDelay(c);
if (!(d.dataset.finalPosX === d.dataset.origPosX && d.dataset.finalPosY === d.dataset.origPosY)) b._bindTargetDone(e);
e.css(b._getPrefixedCSS("transition", "all " + b.animation.duration + "ms " + b.animation.easing + " " + g + "ms"));
e.css(b._getPrefixedCSS("transform", "translate(" + f.x + "px," + f.y + "px)"));
if (b.animation.animateResizeTargets) {
if (d.dataset.origWidth - d.dataset.finalWidth && 1 * d.dataset.finalWidth) {
d.style.width = d.dataset.finalWidth + "px";
d.style.marginRight = -(d.dataset.finalWidth - d.dataset.interWidth) + 1 * d.dataset.finalMarginRight + "px";
}
if (d.dataset.origHeight - d.dataset.finalHeight && 1 * d.dataset.finalHeight) {
d.style.height = d.dataset.finalHeight + "px";
d.style.marginBottom = -(d.dataset.finalHeight - d.dataset.interHeight) + 1 * d.dataset.finalMarginBottom + "px";
}
}
}
if (b._changingClass) b._$container.removeClass(b.layout.containerClass).addClass(b._newClass);
for (var c = 0; c < b._$toHide.length; c++) {
var d = b._$toHide[c], e = a(d), g = b._getDelay(c), k = {};
for (var i = 0; i < 2; i++) {
var j = 0 === i ? j = b._prefix : "";
k[j + "transition-delay"] = g + "ms";
k[j + "transform"] = b.effects.transformOut;
k.opacity = b.effects.opacity;
}
e.css(b.effects.transition).css(k);
if (b.effects.transform || b.effects.opacity) b._bindTargetDone(e);
}
b._execAction("_animateTargets", 1);
},
_bindTargetDone: function(b) {
var c = this, d = b[0];
c._execAction("_bindTargetDone", 0, arguments);
if (!d.dataset.bound) {
d.dataset.bound = true;
c._targetsBound++;
b.on("webkitTransitionEnd.mixItUp transitionend.mixItUp", function(e) {
if ((e.originalEvent.propertyName.indexOf("transform") > -1 || e.originalEvent.propertyName.indexOf("opacity") > -1) && a(e.originalEvent.target).is(c.selectors.target)) {
b.off(".mixItUp");
delete d.dataset.bound;
c._targetDone();
}
});
}
c._execAction("_bindTargetDone", 1, arguments);
},
_targetDone: function() {
var a = this;
a._execAction("_targetDone", 0);
a._targetsDone++;
a._targetsDone === a._targetsBound && a._cleanUp();
a._execAction("_targetDone", 1);
},
_cleanUp: function() {
var b = this, c = b.animation.animateResizeTargets ? "transform opacity width height margin-bottom margin-right" : "transform opacity";
unBrake = function() {
b._$targets.removeStyle("transition", b._prefix);
};
b._execAction("_cleanUp", 0);
!b._changingLayout ? b._$show.css("display", b.layout.display) : b._$show.css("display", b._newDisplay);
b._$targets.css(b._brake);
b._$targets.removeStyle(c, b._prefix).removeAttr("data-inter-pos-x data-inter-pos-y data-final-pos-x data-final-pos-y data-orig-pos-x data-orig-pos-y data-orig-height data-orig-width data-final-height data-final-width data-inter-width data-inter-height data-orig-margin-right data-orig-margin-bottom data-inter-margin-right data-inter-margin-bottom data-final-margin-right data-final-margin-bottom");
b._$hide.removeStyle("display");
b._$parent.removeStyle("height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin", b._prefix);
if (b._sorting) {
b._printSort();
b._activeSort = b._newSortString;
b._sorting = false;
}
if (b._changingLayout) {
if (b._changingDisplay) {
b.layout.display = b._newDisplay;
b._changingDisplay = false;
}
if (b._changingClass) {
b._$parent.removeClass(b.layout.containerClass).addClass(b._newClass);
b.layout.containerClass = b._newClass;
b._changingClass = false;
}
b._changingLayout = false;
}
b._refresh();
b._buildState();
if (b._state.fail) b._$container.addClass(b.layout.containerClassFail);
b._$show = a();
b._$hide = a();
if (window.requestAnimationFrame) requestAnimationFrame(unBrake);
b._mixing = false;
if ("function" === typeof b.callbacks._user) b.callbacks._user.call(b._domNode, b._state, b);
if ("function" === typeof b.callbacks.onMixEnd) b.callbacks.onMixEnd.call(b._domNode, b._state, b);
b._$container.trigger("mixEnd", [ b._state, b ]);
if (b._state.fail) {
"function" === typeof b.callbacks.onMixFail && b.callbacks.onMixFail.call(b._domNode, b._state, b);
b._$container.trigger("mixFail", [ b._state, b ]);
}
if (b._loading) {
"function" === typeof b.callbacks.onMixLoad && b.callbacks.onMixLoad.call(b._domNode, b._state, b);
b._$container.trigger("mixLoad", [ b._state, b ]);
}
if (b._queue.length) {
b._execAction("_queue", 0);
b.multiMix(b._queue[0][0], b._queue[0][1], b._queue[0][2]);
b._queue.splice(0, 1);
}
b._execAction("_cleanUp", 1);
b._loading = false;
},
_getPrefixedCSS: function(a, b, c) {
var d = this, e = {};
for (i = 0; i < 2; i++) {
var f = 0 === i ? d._prefix : "";
c ? e[f + a] = f + b : e[f + a] = b;
}
return d._execFilter("_getPrefixedCSS", e, arguments);
},
_getDelay: function(a) {
var b = this, c = "function" === typeof b.animation.staggerSequence ? b.animation.staggerSequence.call(b._domNode, a, b._state) : a, d = b.animation.stagger ? c * b.animation.staggerDuration : 0;
return b._execFilter("_getDelay", d, arguments);
},
_parseMultiMixArgs: function(a) {
var b = this, c = {
command: null,
animate: b.animation.enable,
callback: null
};
for (var d = 0; d < a.length; d++) {
var e = a[d];
if (null !== e) if ("object" === typeof e || "string" === typeof e) c.command = e; else if ("boolean" === typeof e) c.animate = e; else if ("function" === typeof e) c.callback = e;
}
return b._execFilter("_parseMultiMixArgs", c, arguments);
},
_parseInsertArgs: function(b) {
var c = this, d = {
index: 0,
$object: a(),
multiMix: {
filter: c._state.activeFilter
},
callback: null
};
for (var e = 0; e < b.length; e++) {
var f = b[e];
if ("number" === typeof f) d.index = f; else if ("object" === typeof f && f instanceof a) d.$object = f; else if ("object" === typeof f && c._helpers._isElement(f)) d.$object = a(f); else if ("object" === typeof f && null !== f) d.multiMix = f; else if ("boolean" === typeof f && !f) d.multiMix = false; else if ("function" === typeof f) d.callback = f;
}
return c._execFilter("_parseInsertArgs", d, arguments);
},
_execAction: function(a, b, c) {
var d = this, e = b ? "post" : "pre";
if (!d._actions.isEmptyObject && d._actions.hasOwnProperty(a)) for (var f in d._actions[a][e]) d._actions[a][e][f].call(d, c);
},
_execFilter: function(a, b, c) {
var d = this;
if (!d._filters.isEmptyObject && d._filters.hasOwnProperty(a)) for (var e in d._filters[a]) return d._filters[a][e].call(d, c); else return b;
},
_helpers: {
_camelCase: function(a) {
return a.replace(/-([a-z])/g, function(a) {
return a[1].toUpperCase();
});
},
_isElement: function(a) {
if (window.HTMLElement) return a instanceof HTMLElement; else return null !== a && 1 === a.nodeType && "string" === a.nodeName;
}
},
isMixing: function() {
var a = this;
return a._execFilter("isMixing", a._mixing);
},
filter: function() {
var a = this, b = a._parseMultiMixArgs(arguments);
a._clicking && (a._toggleString = "");
a.multiMix({
filter: b.command
}, b.animate, b.callback);
},
sort: function() {
var a = this, b = a._parseMultiMixArgs(arguments);
a.multiMix({
sort: b.command
}, b.animate, b.callback);
},
changeLayout: function() {
var a = this, b = a._parseMultiMixArgs(arguments);
a.multiMix({
changeLayout: b.command
}, b.animate, b.callback);
},
multiMix: function() {
var a = this, c = a._parseMultiMixArgs(arguments);
a._execAction("multiMix", 0, arguments);
if (!a._mixing) {
if (a.controls.enable && !a._clicking) {
a.controls.toggleFilterButtons && a._buildToggleArray();
a._updateControls(c.command, a.controls.toggleFilterButtons);
}
a._queue.length < 2 && (a._clicking = false);
delete a.callbacks._user;
if (c.callback) a.callbacks._user = c.callback;
var d = c.command.sort, e = c.command.filter, f = c.command.changeLayout;
a._refresh();
if (d) {
a._newSort = a._parseSort(d);
a._newSortString = d;
a._sorting = true;
a._sort();
}
if (e !== b) {
e = "all" === e ? a.selectors.target : e;
a._activeFilter = e;
}
a._filter();
if (f) {
a._newDisplay = "string" === typeof f ? f : f.display || a.layout.display;
a._newClass = f.containerClass || "";
if (a._newDisplay !== a.layout.display || a._newClass !== a.layout.containerClass) {
a._changingLayout = true;
a._changingClass = a._newClass !== a.layout.containerClass;
a._changingDisplay = a._newDisplay !== a.layout.display;
}
}
a._$targets.css(a._brake);
a._goMix(c.animate ^ a.animation.enable ? c.animate : a.animation.enable);
a._execAction("multiMix", 1, arguments);
} else if (a.animation.queue && a._queue.length < a.animation.queueLimit) {
a._queue.push(arguments);
a.controls.enable && !a._clicking && a._updateControls(c.command);
a._execAction("multiMixQueue", 1, arguments);
} else {
if ("function" === typeof a.callbacks.onMixBusy) a.callbacks.onMixBusy.call(a._domNode, a._state, a);
a._$container.trigger("mixBusy", [ a._state, a ]);
a._execAction("multiMixBusy", 1, arguments);
}
},
insert: function() {
var a = this, b = a._parseInsertArgs(arguments), c = "function" === typeof b.callback ? b.callback : null, d = document.createDocumentFragment(), e = function() {
a._refresh();
if (a._$targets.length) return b.index < a._$targets.length || !a._$targets.length ? a._$targets[b.index] : a._$targets[a._$targets.length - 1].nextElementSibling; else return a._$parent[0].children[0];
}();
a._execAction("insert", 0, arguments);
if (b.$object) {
for (var f = 0; f < b.$object.length; f++) {
var g = b.$object[f];
d.appendChild(g);
d.appendChild(document.createTextNode(" "));
}
a._$parent[0].insertBefore(d, e);
}
a._execAction("insert", 1, arguments);
if ("object" === typeof b.multiMix) a.multiMix(b.multiMix, c);
},
prepend: function() {
var a = this, b = a._parseInsertArgs(arguments);
a.insert(0, b.$object, b.multiMix, b.callback);
},
append: function() {
var a = this, b = a._parseInsertArgs(arguments);
a.insert(a._state.totalTargets, b.$object, b.multiMix, b.callback);
},
getOption: function(a) {
var c = this, d = function(a, c) {
var d = c.split("."), e = d.pop(), f = d.length, g = 1, h = d[0] || c;
while ((a = a[h]) && g < f) {
h = d[g];
g++;
}
if (a !== b) return a[e] !== b ? a[e] : a;
};
return a ? c._execFilter("getOption", d(c, a), arguments) : c;
},
setOptions: function(b) {
var c = this;
c._execAction("setOptions", 0, arguments);
"object" === typeof b && a.extend(true, c, b);
c._execAction("setOptions", 1, arguments);
},
getState: function() {
var a = this;
return a._execFilter("getState", a._state, a);
},
forceRefresh: function() {
var a = this;
a._refresh(false, true);
},
destroy: function(b) {
var c = this;
c._execAction("destroy", 0, arguments);
c._$body.add(a(c.selectors.sort)).add(a(c.selectors.filter)).off(".mixItUp");
for (var d = 0; d < c._$targets.length; d++) {
var e = c._$targets[d];
b && (e.style.display = "");
delete e.mixParent;
}
c._execAction("destroy", 1, arguments);
delete a.MixItUp.prototype._instances[c._id];
}
};
a.fn.mixItUp = function() {
var c = arguments, d = [], e, f = function(b, c) {
var d = new a.MixItUp(), e = function() {
return ("00000" + (16777216 * Math.random() << 0).toString(16)).substr(-6).toUpperCase();
};
d._execAction("_instantiate", 0, arguments);
b.id = !b.id ? "MixItUp" + e() : b.id;
if (!d._instances[b.id]) {
d._instances[b.id] = d;
d._init(b, c);
}
d._execAction("_instantiate", 1, arguments);
};
e = this.each(function() {
if (c && "string" === typeof c[0]) {
var e = a.MixItUp.prototype._instances[this.id];
if ("isLoaded" === c[0]) d.push(e ? true : false); else {
var g = e[c[0]](c[1], c[2], c[3]);
if (g !== b) d.push(g);
}
} else f(this, c[0]);
});
if (d.length) return d.length > 1 ? d : d[0]; else return e;
};
a.fn.removeStyle = function(c, d) {
d = d ? d : "";
return this.each(function() {
var e = this, f = c.split(" ");
for (var g = 0; g < f.length; g++) for (var h = 0; h < 4; h++) {
switch (h) {
case 0:
var i = f[g];
break;
case 1:
var i = a.MixItUp.prototype._helpers._camelCase(i);
break;
case 2:
var i = d + f[g];
break;
case 3:
var i = a.MixItUp.prototype._helpers._camelCase(d + f[g]);
}
if (e.style[i] !== b && "unknown" !== typeof e.style[i] && e.style[i].length > 0) e.style[i] = "";
if (!d && 1 === h) break;
}
if (e.attributes && e.attributes.style && e.attributes.style !== b && "" === e.attributes.style.value) e.attributes.removeNamedItem("style");
});
};
}(jQuery);
!function(a) {
"use strict";
var b = "20130725";
a.fn.cycle = function(b) {
var d;
if (0 === this.length && !a.isReady) {
d = {
s: this.selector,
c: this.context
};
a.fn.cycle.log("requeuing slideshow (dom not ready)");
a(function() {
a(d.s, d.c).cycle(b);
});
return this;
}
return this.each(function() {
var d, e, f, g;
var h = a(this);
var i = a.fn.cycle.log;
if (h.data("cycle.opts")) return;
if (false === h.data("cycle-log") || b && false === b.log || e && false === e.log) i = a.noop;
i("--c2 init--");
d = h.data();
for (var j in d) if (d.hasOwnProperty(j) && /^cycle[A-Z]+/.test(j)) {
g = d[j];
f = j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, c);
i(f + ":", g, "(" + typeof g + ")");
d[f] = g;
}
e = a.extend({}, a.fn.cycle.defaults, d, b || {});
e.timeoutId = 0;
e.paused = e.paused || false;
e.container = h;
e._maxZ = e.maxZ;
e.API = a.extend({
_container: h
}, a.fn.cycle.API);
e.API.log = i;
e.API.trigger = function(a, b) {
e.container.trigger(a, b);
return e.API;
};
h.data("cycle.opts", e);
h.data("cycle.API", e.API);
e.API.trigger("cycle-bootstrap", [ e, e.API ]);
e.API.addInitialSlides();
e.API.preInitSlideshow();
if (e.slides.length) e.API.initSlideshow();
});
};
a.fn.cycle.API = {
opts: function() {
return this._container.data("cycle.opts");
},
addInitialSlides: function() {
var b = this.opts();
var c = b.slides;
b.slideCount = 0;
b.slides = a();
c = c.jquery ? c : b.container.find(c);
if (b.random) c.sort(function() {
return Math.random() - .5;
});
b.API.add(c);
},
preInitSlideshow: function() {
var b = this.opts();
b.API.trigger("cycle-pre-initialize", [ b ]);
var c = a.fn.cycle.transitions[b.fx];
if (c && a.isFunction(c.preInit)) c.preInit(b);
b._preInitialized = true;
},
postInitSlideshow: function() {
var b = this.opts();
b.API.trigger("cycle-post-initialize", [ b ]);
var c = a.fn.cycle.transitions[b.fx];
if (c && a.isFunction(c.postInit)) c.postInit(b);
},
initSlideshow: function() {
var b = this.opts();
var c = b.container;
var d;
b.API.calcFirstSlide();
if ("static" == b.container.css("position")) b.container.css("position", "relative");
a(b.slides[b.currSlide]).css("opacity", 1).show();
b.API.stackSlides(b.slides[b.currSlide], b.slides[b.nextSlide], !b.reverse);
if (b.pauseOnHover) {
if (true !== b.pauseOnHover) c = a(b.pauseOnHover);
c.hover(function() {
b.API.pause(true);
}, function() {
b.API.resume(true);
});
}
if (b.timeout) {
d = b.API.getSlideOpts(b.nextSlide);
b.API.queueTransition(d, d.timeout + b.delay);
}
b._initialized = true;
b.API.updateView(true);
b.API.trigger("cycle-initialized", [ b ]);
b.API.postInitSlideshow();
},
pause: function(b) {
var c = this.opts(), d = c.API.getSlideOpts(), e = c.hoverPaused || c.paused;
if (b) c.hoverPaused = true; else c.paused = true;
if (!e) {
c.container.addClass("cycle-paused");
c.API.trigger("cycle-paused", [ c ]).log("cycle-paused");
if (d.timeout) {
clearTimeout(c.timeoutId);
c.timeoutId = 0;
c._remainingTimeout -= a.now() - c._lastQueue;
if (c._remainingTimeout < 0 || isNaN(c._remainingTimeout)) c._remainingTimeout = void 0;
}
}
},
resume: function(a) {
var b = this.opts(), c = !b.hoverPaused && !b.paused, d;
if (a) b.hoverPaused = false; else b.paused = false;
if (!c) {
b.container.removeClass("cycle-paused");
if (0 === b.slides.filter(":animated").length) b.API.queueTransition(b.API.getSlideOpts(), b._remainingTimeout);
b.API.trigger("cycle-resumed", [ b, b._remainingTimeout ]).log("cycle-resumed");
}
},
add: function(b, c) {
var d = this.opts();
var e = d.slideCount;
var f = false;
var g;
if ("string" == a.type(b)) b = a.trim(b);
a(b).each(function(b) {
var e;
var f = a(this);
if (c) d.container.prepend(f); else d.container.append(f);
d.slideCount++;
e = d.API.buildSlideOpts(f);
if (c) d.slides = a(f).add(d.slides); else d.slides = d.slides.add(f);
d.API.initSlide(e, f, --d._maxZ);
f.data("cycle.opts", e);
d.API.trigger("cycle-slide-added", [ d, e, f ]);
});
d.API.updateView(true);
f = d._preInitialized && e < 2 && d.slideCount >= 1;
if (f) if (!d._initialized) d.API.initSlideshow(); else if (d.timeout) {
g = d.slides.length;
d.nextSlide = d.reverse ? g - 1 : 1;
if (!d.timeoutId) d.API.queueTransition(d);
}
},
calcFirstSlide: function() {
var a = this.opts();
var b;
b = parseInt(a.startingSlide || 0, 10);
if (b >= a.slides.length || b < 0) b = 0;
a.currSlide = b;
if (a.reverse) {
a.nextSlide = b - 1;
if (a.nextSlide < 0) a.nextSlide = a.slides.length - 1;
} else {
a.nextSlide = b + 1;
if (a.nextSlide == a.slides.length) a.nextSlide = 0;
}
},
calcNextSlide: function() {
var a = this.opts();
var b;
if (a.reverse) {
b = a.nextSlide - 1 < 0;
a.nextSlide = b ? a.slideCount - 1 : a.nextSlide - 1;
a.currSlide = b ? 0 : a.nextSlide + 1;
} else {
b = a.nextSlide + 1 == a.slides.length;
a.nextSlide = b ? 0 : a.nextSlide + 1;
a.currSlide = b ? a.slides.length - 1 : a.nextSlide - 1;
}
},
calcTx: function(b, c) {
var d = b;
var e;
if (c && d.manualFx) e = a.fn.cycle.transitions[d.manualFx];
if (!e) e = a.fn.cycle.transitions[d.fx];
if (!e) {
e = a.fn.cycle.transitions.fade;
d.API.log('Transition "' + d.fx + '" not found. Using fade.');
}
return e;
},
prepareTx: function(a, b) {
var c = this.opts();
var d, e, f, g, h;
if (c.slideCount < 2) {
c.timeoutId = 0;
return;
}
if (a && (!c.busy || c.manualTrump)) {
c.API.stopTransition();
c.busy = false;
clearTimeout(c.timeoutId);
c.timeoutId = 0;
}
if (c.busy) return;
if (0 === c.timeoutId && !a) return;
e = c.slides[c.currSlide];
f = c.slides[c.nextSlide];
g = c.API.getSlideOpts(c.nextSlide);
h = c.API.calcTx(g, a);
c._tx = h;
if (a && void 0 !== g.manualSpeed) g.speed = g.manualSpeed;
if (c.nextSlide != c.currSlide && (a || !c.paused && !c.hoverPaused && c.timeout)) {
c.API.trigger("cycle-before", [ g, e, f, b ]);
if (h.before) h.before(g, e, f, b);
d = function() {
c.busy = false;
if (!c.container.data("cycle.opts")) return;
if (h.after) h.after(g, e, f, b);
c.API.trigger("cycle-after", [ g, e, f, b ]);
c.API.queueTransition(g);
c.API.updateView(true);
};
c.busy = true;
if (h.transition) h.transition(g, e, f, b, d); else c.API.doTransition(g, e, f, b, d);
c.API.calcNextSlide();
c.API.updateView();
} else c.API.queueTransition(g);
},
doTransition: function(b, c, d, e, f) {
var g = b;
var h = a(c), i = a(d);
var j = function() {
i.animate(g.animIn || {
opacity: 1
}, g.speed, g.easeIn || g.easing, f);
};
i.css(g.cssBefore || {});
h.animate(g.animOut || {}, g.speed, g.easeOut || g.easing, function() {
h.css(g.cssAfter || {});
if (!g.sync) j();
});
if (g.sync) j();
},
queueTransition: function(b, c) {
var d = this.opts();
var e = void 0 !== c ? c : b.timeout;
if (0 === d.nextSlide && 0 === --d.loop) {
d.API.log("terminating; loop=0");
d.timeout = 0;
if (e) setTimeout(function() {
d.API.trigger("cycle-finished", [ d ]);
}, e); else d.API.trigger("cycle-finished", [ d ]);
d.nextSlide = d.currSlide;
return;
}
if (e) {
d._lastQueue = a.now();
if (void 0 === c) d._remainingTimeout = b.timeout;
if (!d.paused && !d.hoverPaused) d.timeoutId = setTimeout(function() {
d.API.prepareTx(false, !d.reverse);
}, e);
}
},
stopTransition: function() {
var a = this.opts();
if (a.slides.filter(":animated").length) {
a.slides.stop(false, true);
a.API.trigger("cycle-transition-stopped", [ a ]);
}
if (a._tx && a._tx.stopTransition) a._tx.stopTransition(a);
},
advanceSlide: function(a) {
var b = this.opts();
clearTimeout(b.timeoutId);
b.timeoutId = 0;
b.nextSlide = b.currSlide + a;
if (b.nextSlide < 0) b.nextSlide = b.slides.length - 1; else if (b.nextSlide >= b.slides.length) b.nextSlide = 0;
b.API.prepareTx(true, a >= 0);
return false;
},
buildSlideOpts: function(b) {
var d = this.opts();
var e, f;
var g = b.data() || {};
for (var h in g) if (g.hasOwnProperty(h) && /^cycle[A-Z]+/.test(h)) {
e = g[h];
f = h.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, c);
d.API.log("[" + (d.slideCount - 1) + "]", f + ":", e, "(" + typeof e + ")");
g[f] = e;
}
g = a.extend({}, a.fn.cycle.defaults, d, g);
g.slideNum = d.slideCount;
try {
delete g.API;
delete g.slideCount;
delete g.currSlide;
delete g.nextSlide;
delete g.slides;
} catch (i) {}
return g;
},
getSlideOpts: function(b) {
var c = this.opts();
if (void 0 === b) b = c.currSlide;
var d = c.slides[b];
var e = a(d).data("cycle.opts");
return a.extend({}, c, e);
},
initSlide: function(b, c, d) {
var e = this.opts();
c.css(b.slideCss || {});
if (d > 0) c.css("zIndex", d);
if (isNaN(b.speed)) b.speed = a.fx.speeds[b.speed] || a.fx.speeds._default;
if (!b.sync) b.speed = b.speed / 2;
c.addClass(e.slideClass);
},
updateView: function(a, b) {
var c = this.opts();
if (!c._initialized) return;
var d = c.API.getSlideOpts();
var e = c.slides[c.currSlide];
if (!a && true !== b) {
c.API.trigger("cycle-update-view-before", [ c, d, e ]);
if (c.updateView < 0) return;
}
if (c.slideActiveClass) c.slides.removeClass(c.slideActiveClass).eq(c.currSlide).addClass(c.slideActiveClass);
if (a && c.hideNonActive) c.slides.filter(":not(." + c.slideActiveClass + ")").hide();
c.API.trigger("cycle-update-view", [ c, d, e, a ]);
if (a) c.API.trigger("cycle-update-view-after", [ c, d, e ]);
},
getComponent: function(b) {
var c = this.opts();
var d = c[b];
if ("string" === typeof d) return /^\s*[\>|\+|~]/.test(d) ? c.container.find(d) : a(d);
if (d.jquery) return d;
return a(d);
},
stackSlides: function(b, c, d) {
var e = this.opts();
if (!b) {
b = e.slides[e.currSlide];
c = e.slides[e.nextSlide];
d = !e.reverse;
}
a(b).css("zIndex", e.maxZ);
var f;
var g = e.maxZ - 2;
var h = e.slideCount;
if (d) {
for (f = e.currSlide + 1; f < h; f++) a(e.slides[f]).css("zIndex", g--);
for (f = 0; f < e.currSlide; f++) a(e.slides[f]).css("zIndex", g--);
} else {
for (f = e.currSlide - 1; f >= 0; f--) a(e.slides[f]).css("zIndex", g--);
for (f = h - 1; f > e.currSlide; f--) a(e.slides[f]).css("zIndex", g--);
}
a(c).css("zIndex", e.maxZ - 1);
},
getSlideIndex: function(a) {
return this.opts().slides.index(a);
}
};
a.fn.cycle.log = function d() {
if (window.console && console.log) console.log("[cycle2] " + Array.prototype.join.call(arguments, " "));
};
a.fn.cycle.version = function() {
return "Cycle2: " + b;
};
function c(a) {
return (a || "").toLowerCase();
}
a.fn.cycle.transitions = {
custom: {},
none: {
before: function(a, b, c, d) {
a.API.stackSlides(c, b, d);
a.cssBefore = {
opacity: 1,
display: "block"
};
}
},
fade: {
before: function(b, c, d, e) {
var f = b.API.getSlideOpts(b.nextSlide).slideCss || {};
b.API.stackSlides(c, d, e);
b.cssBefore = a.extend(f, {
opacity: 0,
display: "block"
});
b.animIn = {
opacity: 1
};
b.animOut = {
opacity: 0
};
}
},
fadeout: {
before: function(b, c, d, e) {
var f = b.API.getSlideOpts(b.nextSlide).slideCss || {};
b.API.stackSlides(c, d, e);
b.cssBefore = a.extend(f, {
opacity: 1,
display: "block"
});
b.animOut = {
opacity: 0
};
}
},
scrollHorz: {
before: function(a, b, c, d) {
a.API.stackSlides(b, c, d);
var e = a.container.css("overflow", "hidden").width();
a.cssBefore = {
left: d ? e : -e,
top: 0,
opacity: 1,
display: "block"
};
a.cssAfter = {
zIndex: a._maxZ - 2,
left: 0
};
a.animIn = {
left: 0
};
a.animOut = {
left: d ? -e : e
};
}
}
};
a.fn.cycle.defaults = {
allowWrap: true,
autoSelector: ".cycle-slideshow[data-cycle-auto-init!=false]",
delay: 0,
easing: null,
fx: "fade",
hideNonActive: true,
loop: 0,
manualFx: void 0,
manualSpeed: void 0,
manualTrump: true,
maxZ: 100,
pauseOnHover: false,
reverse: false,
slideActiveClass: "cycle-slide-active",
slideClass: "cycle-slide",
slideCss: {
position: "absolute",
top: 0,
left: 0
},
slides: "> img",
speed: 500,
startingSlide: 0,
sync: true,
timeout: 4e3,
updateView: -1
};
a(document).ready(function() {
a(a.fn.cycle.defaults.autoSelector).cycle();
});
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
autoHeight: 0
});
a(document).on("cycle-initialized", function(c, f) {
var g = f.autoHeight;
var h = a.type(g);
var i = null;
var j;
if ("string" !== h && "number" !== h) return;
f.container.on("cycle-slide-added cycle-slide-removed", b);
f.container.on("cycle-destroyed", e);
if ("container" == g) f.container.on("cycle-before", d); else if ("string" === h && /\d+\:\d+/.test(g)) {
j = g.match(/(\d+)\:(\d+)/);
j = j[1] / j[2];
f._autoHeightRatio = j;
}
if ("number" !== h) {
f._autoHeightOnResize = function() {
clearTimeout(i);
i = setTimeout(k, 50);
};
a(window).on("resize orientationchange", f._autoHeightOnResize);
}
setTimeout(k, 30);
function k() {
b(c, f);
}
});
function b(b, d) {
var e, f, g;
var h = d.autoHeight;
if ("container" == h) {
f = a(d.slides[d.currSlide]).outerHeight();
d.container.height(f);
} else if (d._autoHeightRatio) d.container.height(d.container.width() / d._autoHeightRatio); else if ("calc" === h || "number" == a.type(h) && h >= 0) {
if ("calc" === h) g = c(b, d); else if (h >= d.slides.length) g = 0; else g = h;
if (g == d._sentinelIndex) return;
d._sentinelIndex = g;
if (d._sentinel) d._sentinel.remove();
e = a(d.slides[g].cloneNode(true));
e.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel");
e.css({
position: "static",
visibility: "hidden",
display: "block"
}).prependTo(d.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active");
e.find("*").css("visibility", "hidden");
d._sentinel = e;
}
}
function c(b, c) {
var d = 0, e = -1;
c.slides.each(function(b) {
var c = a(this).height();
if (c > e) {
e = c;
d = b;
}
});
return d;
}
function d(b, c, d, e, f) {
var g = a(e).outerHeight();
var h = c.sync ? c.speed / 2 : c.speed;
c.container.animate({
height: g
}, h);
}
function e(c, f) {
if (f._autoHeightOnResize) {
a(window).off("resize orientationchange", f._autoHeightOnResize);
f._autoHeightOnResize = null;
}
f.container.off("cycle-slide-added cycle-slide-removed", b);
f.container.off("cycle-destroyed", e);
f.container.off("cycle-before", d);
if (f._sentinel) {
f._sentinel.remove();
f._sentinel = null;
}
}
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
caption: "> .cycle-caption",
captionTemplate: "{{slideNum}} / {{slideCount}}",
overlay: "> .cycle-overlay",
overlayTemplate: "
{{title}}
{{desc}}
",
captionModule: "caption"
});
a(document).on("cycle-update-view", function(b, c, d, e) {
if ("caption" !== c.captionModule) return;
var f;
a.each([ "caption", "overlay" ], function() {
var a = this;
var b = d[a + "Template"];
var f = c.API.getComponent(a);
if (f.length && b) {
f.html(c.API.tmpl(b, d, c, e));
f.show();
} else f.hide();
});
});
a(document).on("cycle-destroyed", function(b, c) {
var d;
a.each([ "caption", "overlay" ], function() {
var a = this, b = c[a + "Template"];
if (c[a] && b) {
d = c.API.getComponent("caption");
d.empty();
}
});
});
}(jQuery);
!function(a) {
"use strict";
var b = a.fn.cycle;
a.fn.cycle = function(c) {
var d, e, f;
var g = a.makeArray(arguments);
if ("number" == a.type(c)) return this.cycle("goto", c);
if ("string" == a.type(c)) return this.each(function() {
var h;
d = c;
f = a(this).data("cycle.opts");
if (void 0 === f) {
b.log('slideshow must be initialized before sending commands; "' + d + '" ignored');
return;
} else {
d = "goto" == d ? "jump" : d;
e = f.API[d];
if (a.isFunction(e)) {
h = a.makeArray(g);
h.shift();
return e.apply(f.API, h);
} else b.log("unknown command: ", d);
}
}); else return b.apply(this, arguments);
};
a.extend(a.fn.cycle, b);
a.extend(b.API, {
next: function() {
var a = this.opts();
if (a.busy && !a.manualTrump) return;
var b = a.reverse ? -1 : 1;
if (false === a.allowWrap && a.currSlide + b >= a.slideCount) return;
a.API.advanceSlide(b);
a.API.trigger("cycle-next", [ a ]).log("cycle-next");
},
prev: function() {
var a = this.opts();
if (a.busy && !a.manualTrump) return;
var b = a.reverse ? 1 : -1;
if (false === a.allowWrap && a.currSlide + b < 0) return;
a.API.advanceSlide(b);
a.API.trigger("cycle-prev", [ a ]).log("cycle-prev");
},
destroy: function() {
this.stop();
var b = this.opts();
var c = a.isFunction(a._data) ? a._data : a.noop;
clearTimeout(b.timeoutId);
b.timeoutId = 0;
b.API.stop();
b.API.trigger("cycle-destroyed", [ b ]).log("cycle-destroyed");
b.container.removeData();
c(b.container[0], "parsedAttrs", false);
if (!b.retainStylesOnDestroy) {
b.container.removeAttr("style");
b.slides.removeAttr("style");
b.slides.removeClass(b.slideActiveClass);
}
b.slides.each(function() {
a(this).removeData();
c(this, "parsedAttrs", false);
});
},
jump: function(a) {
var b;
var c = this.opts();
if (c.busy && !c.manualTrump) return;
var d = parseInt(a, 10);
if (isNaN(d) || d < 0 || d >= c.slides.length) {
c.API.log("goto: invalid slide index: " + d);
return;
}
if (d == c.currSlide) {
c.API.log("goto: skipping, already on slide", d);
return;
}
c.nextSlide = d;
clearTimeout(c.timeoutId);
c.timeoutId = 0;
c.API.log("goto: ", d, " (zero-index)");
b = c.currSlide < c.nextSlide;
c.API.prepareTx(true, b);
},
stop: function() {
var b = this.opts();
var c = b.container;
clearTimeout(b.timeoutId);
b.timeoutId = 0;
b.API.stopTransition();
if (b.pauseOnHover) {
if (true !== b.pauseOnHover) c = a(b.pauseOnHover);
c.off("mouseenter mouseleave");
}
b.API.trigger("cycle-stopped", [ b ]).log("cycle-stopped");
},
reinit: function() {
var a = this.opts();
a.API.destroy();
a.container.cycle();
},
remove: function(b) {
var c = this.opts();
var d, e, f = [], g = 1;
for (var h = 0; h < c.slides.length; h++) {
d = c.slides[h];
if (h == b) e = d; else {
f.push(d);
a(d).data("cycle.opts").slideNum = g;
g++;
}
}
if (e) {
c.slides = a(f);
c.slideCount--;
a(e).remove();
if (b == c.currSlide) c.API.advanceSlide(1); else if (b < c.currSlide) c.currSlide--; else c.currSlide++;
c.API.trigger("cycle-slide-removed", [ c, b, e ]).log("cycle-slide-removed");
c.API.updateView();
}
}
});
a(document).on("click.cycle", "[data-cycle-cmd]", function(b) {
b.preventDefault();
var c = a(this);
var d = c.data("cycle-cmd");
var e = c.data("cycle-context") || ".cycle-slideshow";
a(e).cycle(d, c.data("cycle-arg"));
});
}(jQuery);
!function(a) {
"use strict";
a(document).on("cycle-pre-initialize", function(c, d) {
b(d, true);
d._onHashChange = function() {
b(d, false);
};
a(window).on("hashchange", d._onHashChange);
});
a(document).on("cycle-update-view", function(a, b, c) {
if (c.hash && "#" + c.hash != window.location.hash) {
b._hashFence = true;
window.location.hash = c.hash;
}
});
a(document).on("cycle-destroyed", function(b, c) {
if (c._onHashChange) a(window).off("hashchange", c._onHashChange);
});
function b(b, c) {
var d;
if (b._hashFence) {
b._hashFence = false;
return;
}
d = window.location.hash.substring(1);
b.slides.each(function(e) {
if (a(this).data("cycle-hash") == d) {
if (true === c) b.startingSlide = e; else {
var f = b.currSlide < e;
b.nextSlide = e;
b.API.prepareTx(true, f);
}
return false;
}
});
}
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
loader: false
});
a(document).on("cycle-bootstrap", function(b, c) {
var d;
if (!c.loader) return;
d = c.API.add;
c.API.add = e;
function e(b, e) {
var f = [];
if ("string" == a.type(b)) b = a.trim(b); else if ("array" === a.type(b)) for (var g = 0; g < b.length; g++) b[g] = a(b[g])[0];
b = a(b);
var h = b.length;
if (!h) return;
b.hide().appendTo("body").each(function(b) {
var g = 0;
var j = a(this);
var k = j.is("img") ? j : j.find("img");
j.data("index", b);
k = k.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])');
if (!k.length) {
--h;
f.push(j);
return;
}
g = k.length;
k.each(function() {
if (this.complete) l(); else a(this).load(function() {
l();
}).error(function() {
if (0 === --g) {
c.API.log("slide skipped; img not loaded:", this.src);
if (0 === --h && "wait" == c.loader) d.apply(c.API, [ f, e ]);
}
});
});
function l() {
if (0 === --g) {
--h;
i(j);
}
}
});
if (h) c.container.addClass("cycle-loading");
function i(b) {
var g;
if ("wait" == c.loader) {
f.push(b);
if (0 === h) {
f.sort(j);
d.apply(c.API, [ f, e ]);
c.container.removeClass("cycle-loading");
}
} else {
g = a(c.slides[c.currSlide]);
d.apply(c.API, [ b, e ]);
g.show();
c.container.removeClass("cycle-loading");
}
}
function j(a, b) {
return a.data("index") - b.data("index");
}
}
});
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
pager: "> .cycle-pager",
pagerActiveClass: "cycle-pager-active",
pagerEvent: "click.cycle",
pagerTemplate: "•"
});
a(document).on("cycle-bootstrap", function(a, c, d) {
d.buildPagerLink = b;
});
a(document).on("cycle-slide-added", function(a, b, d, e) {
if (b.pager) {
b.API.buildPagerLink(b, d, e);
b.API.page = c;
}
});
a(document).on("cycle-slide-removed", function(b, c, d, e) {
if (c.pager) {
var f = c.API.getComponent("pager");
f.each(function() {
var b = a(this);
a(b.children()[d]).remove();
});
}
});
a(document).on("cycle-update-view", function(b, c, d) {
var e;
if (c.pager) {
e = c.API.getComponent("pager");
e.each(function() {
a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass);
});
}
});
a(document).on("cycle-destroyed", function(a, b) {
var c = b.API.getComponent("pager");
if (c) {
c.children().off(b.pagerEvent);
if (b.pagerTemplate) c.empty();
}
});
function b(b, c, d) {
var e;
var f = b.API.getComponent("pager");
f.each(function() {
var f = a(this);
if (c.pagerTemplate) {
var g = b.API.tmpl(c.pagerTemplate, c, b, d[0]);
e = a(g).appendTo(f);
} else e = f.children().eq(b.slideCount - 1);
e.on(b.pagerEvent, function(a) {
a.preventDefault();
b.API.page(f, a.currentTarget);
});
});
}
function c(a, b) {
var c = this.opts();
if (c.busy && !c.manualTrump) return;
var d = a.children().index(b);
var e = d;
var f = c.currSlide < e;
if (c.currSlide == e) return;
c.nextSlide = e;
c.API.prepareTx(true, f);
c.API.trigger("cycle-pager-activated", [ c, a, b ]);
}
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
next: "> .cycle-next",
nextEvent: "click.cycle",
disabledClass: "disabled",
prev: "> .cycle-prev",
prevEvent: "click.cycle",
swipe: false
});
a(document).on("cycle-initialized", function(a, b) {
b.API.getComponent("next").on(b.nextEvent, function(a) {
a.preventDefault();
b.API.next();
});
b.API.getComponent("prev").on(b.prevEvent, function(a) {
a.preventDefault();
b.API.prev();
});
if (b.swipe) {
var c = b.swipeVert ? "swipeUp.cycle" : "swipeLeft.cycle swipeleft.cycle";
var d = b.swipeVert ? "swipeDown.cycle" : "swipeRight.cycle swiperight.cycle";
b.container.on(c, function(a) {
b.API.next();
});
b.container.on(d, function() {
b.API.prev();
});
}
});
a(document).on("cycle-update-view", function(a, b, c, d) {
if (b.allowWrap) return;
var e = b.disabledClass;
var f = b.API.getComponent("next");
var g = b.API.getComponent("prev");
var h = b._prevBoundry || 0;
var i = void 0 !== b._nextBoundry ? b._nextBoundry : b.slideCount - 1;
if (b.currSlide == i) f.addClass(e).prop("disabled", true); else f.removeClass(e).prop("disabled", false);
if (b.currSlide === h) g.addClass(e).prop("disabled", true); else g.removeClass(e).prop("disabled", false);
});
a(document).on("cycle-destroyed", function(a, b) {
b.API.getComponent("prev").off(b.nextEvent);
b.API.getComponent("next").off(b.prevEvent);
b.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle");
});
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
progressive: false
});
a(document).on("cycle-pre-initialize", function(b, c) {
if (!c.progressive) return;
var d = c.API;
var e = d.next;
var f = d.prev;
var g = d.prepareTx;
var h = a.type(c.progressive);
var i, j;
if ("array" == h) i = c.progressive; else if (a.isFunction(c.progressive)) i = c.progressive(c); else if ("string" == h) {
j = a(c.progressive);
i = a.trim(j.html());
if (!i) return;
if (/^(\[)/.test(i)) try {
i = a.parseJSON(i);
} catch (k) {
d.log("error parsing progressive slides", k);
return;
} else {
i = i.split(new RegExp(j.data("cycle-split") || "\n"));
if (!i[i.length - 1]) i.pop();
}
}
if (g) d.prepareTx = function(a, b) {
var d, e;
if (a || 0 === i.length) {
g.apply(c.API, [ a, b ]);
return;
}
if (b && c.currSlide == c.slideCount - 1) {
e = i[0];
i = i.slice(1);
c.container.one("cycle-slide-added", function(a, b) {
setTimeout(function() {
b.API.advanceSlide(1);
}, 50);
});
c.API.add(e);
} else if (!b && 0 === c.currSlide) {
d = i.length - 1;
e = i[d];
i = i.slice(0, d);
c.container.one("cycle-slide-added", function(a, b) {
setTimeout(function() {
b.currSlide = 1;
b.API.advanceSlide(-1);
}, 50);
});
c.API.add(e, true);
} else g.apply(c.API, [ a, b ]);
};
if (e) d.next = function() {
var a = this.opts();
if (i.length && a.currSlide == a.slideCount - 1) {
var b = i[0];
i = i.slice(1);
a.container.one("cycle-slide-added", function(a, b) {
e.apply(b.API);
b.container.removeClass("cycle-loading");
});
a.container.addClass("cycle-loading");
a.API.add(b);
} else e.apply(a.API);
};
if (f) d.prev = function() {
var a = this.opts();
if (i.length && 0 === a.currSlide) {
var b = i.length - 1;
var c = i[b];
i = i.slice(0, b);
a.container.one("cycle-slide-added", function(a, b) {
b.currSlide = 1;
b.API.advanceSlide(-1);
b.container.removeClass("cycle-loading");
});
a.container.addClass("cycle-loading");
a.API.add(c, true);
} else f.apply(a.API);
};
});
}(jQuery);
!function(a) {
"use strict";
a.extend(a.fn.cycle.defaults, {
tmplRegex: "{{((.)?.*?)}}"
});
a.extend(a.fn.cycle.API, {
tmpl: function(b, c) {
var d = new RegExp(c.tmplRegex || a.fn.cycle.defaults.tmplRegex, "g");
var e = a.makeArray(arguments);
e.shift();
return b.replace(d, function(b, c) {
var d, f, g, h, i = c.split(".");
for (d = 0; d < e.length; d++) {
g = e[d];
if (!g) continue;
if (i.length > 1) {
h = g;
for (f = 0; f < i.length; f++) {
g = h;
h = h[i[f]] || c;
}
} else h = g[c];
if (a.isFunction(h)) return h.apply(g, e);
if (void 0 !== h && null !== h && h != c) return h;
}
return c;
});
}
});
}(jQuery);
!function(a) {
"use strict";
var b = "ontouchend" in document;
a.event.special.swipe = a.event.special.swipe || {
scrollSupressionThreshold: 10,
durationThreshold: 1e3,
horizontalDistanceThreshold: 30,
verticalDistanceThreshold: 75,
setup: function() {
var b = a(this);
b.bind("touchstart", function(c) {
var d = c.originalEvent.touches ? c.originalEvent.touches[0] : c;
var e, f = {
time: new Date().getTime(),
coords: [ d.pageX, d.pageY ],
origin: a(c.target)
};
function g(b) {
if (!f) return;
var c = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
e = {
time: new Date().getTime(),
coords: [ c.pageX, c.pageY ]
};
if (Math.abs(f.coords[0] - e.coords[0]) > a.event.special.swipe.scrollSupressionThreshold) b.preventDefault();
}
b.bind("touchmove", g).one("touchend", function(c) {
b.unbind("touchmove", g);
if (f && e) if (e.time - f.time < a.event.special.swipe.durationThreshold && Math.abs(f.coords[0] - e.coords[0]) > a.event.special.swipe.horizontalDistanceThreshold && Math.abs(f.coords[1] - e.coords[1]) < a.event.special.swipe.verticalDistanceThreshold) f.origin.trigger("swipe").trigger(f.coords[0] > e.coords[0] ? "swipeleft" : "swiperight");
f = e = void 0;
});
});
}
};
a.event.special.swipeleft = a.event.special.swipeleft || {
setup: function() {
a(this).bind("swipe", a.noop);
}
};
a.event.special.swiperight = a.event.special.swiperight || a.event.special.swipeleft;
}(jQuery);
!function(a) {
"use strict";
a(document).on("cycle-bootstrap", function(a, b, c) {
if ("carousel" !== b.fx) return;
c.getSlideIndex = function(a) {
var b = this.opts()._carouselWrap.children();
var c = b.index(a);
return c % b.length;
};
c.next = function() {
var a = b.reverse ? -1 : 1;
if (false === b.allowWrap && b.currSlide + a > b.slideCount - b.carouselVisible) return;
b.API.advanceSlide(a);
b.API.trigger("cycle-next", [ b ]).log("cycle-next");
};
});
a.fn.cycle.transitions.carousel = {
preInit: function(b) {
b.hideNonActive = false;
b.container.on("cycle-destroyed", a.proxy(this.onDestroy, b.API));
b.API.stopTransition = this.stopTransition;
for (var c = 0; c < b.startingSlide; c++) b.container.append(b.slides[0]);
},
postInit: function(b) {
var c, d, e, f, g;
var h = b.carouselVertical;
if (b.carouselVisible && b.carouselVisible > b.slideCount) b.carouselVisible = b.slideCount - 1;
var i = b.carouselVisible || b.slides.length;
var j = {
display: h ? "block" : "inline-block",
position: "static"
};
b.container.css({
position: "relative",
overflow: "hidden"
});
b.slides.css(j);
b._currSlide = b.currSlide;
g = a('').prependTo(b.container).css({
margin: 0,
padding: 0,
top: 0,
left: 0,
position: "absolute"
}).append(b.slides);
b._carouselWrap = g;
if (!h) g.css("white-space", "nowrap");
if (false !== b.allowWrap) {
for (d = 0; d < (void 0 === b.carouselVisible ? 2 : 1); d++) {
for (c = 0; c < b.slideCount; c++) g.append(b.slides[c].cloneNode(true));
c = b.slideCount;
while (c--) g.prepend(b.slides[c].cloneNode(true));
}
g.find(".cycle-slide-active").removeClass("cycle-slide-active");
b.slides.eq(b.startingSlide).addClass("cycle-slide-active");
}
if (b.pager && false === b.allowWrap) {
f = b.slideCount - i;
a(b.pager).children().filter(":gt(" + f + ")").hide();
}
b._nextBoundry = b.slideCount - b.carouselVisible;
this.prepareDimensions(b);
},
prepareDimensions: function(b) {
var c, d, e, f;
var g = b.carouselVertical;
var h = b.carouselVisible || b.slides.length;
if (b.carouselFluid && b.carouselVisible) {
if (!b._carouselResizeThrottle) this.fluidSlides(b);
} else if (b.carouselVisible && b.carouselSlideDimension) {
c = h * b.carouselSlideDimension;
b.container[g ? "height" : "width"](c);
} else if (b.carouselVisible) {
c = h * a(b.slides[0])[g ? "outerHeight" : "outerWidth"](true);
b.container[g ? "height" : "width"](c);
}
d = b.carouselOffset || 0;
if (false !== b.allowWrap) if (b.carouselSlideDimension) d -= (b.slideCount + b.currSlide) * b.carouselSlideDimension; else {
f = b._carouselWrap.children();
for (var i = 0; i < b.slideCount + b.currSlide; i++) d -= a(f[i])[g ? "outerHeight" : "outerWidth"](true);
}
b._carouselWrap.css(g ? "top" : "left", d);
},
fluidSlides: function(b) {
var c;
var d = b.slides.eq(0);
var e = d.outerWidth() - d.width();
var f = this.prepareDimensions;
a(window).on("resize", g);
b._carouselResizeThrottle = g;
h();
function g() {
clearTimeout(c);
c = setTimeout(h, 20);
}
function h() {
b._carouselWrap.stop(false, true);
var a = b.container.width() / b.carouselVisible;
a = Math.ceil(a - e);
b._carouselWrap.children().width(a);
if (b._sentinel) b._sentinel.width(a);
f(b);
}
},
transition: function(b, c, d, e, f) {
var g, h = {};
var i = b.nextSlide - b.currSlide;
var j = b.carouselVertical;
var k = b.speed;
if (false === b.allowWrap) {
e = i > 0;
var l = b._currSlide;
var m = b.slideCount - b.carouselVisible;
if (i > 0 && b.nextSlide > m && l == m) i = 0; else if (i > 0 && b.nextSlide > m) i = b.nextSlide - l - (b.nextSlide - m); else if (i < 0 && b.currSlide > m && b.nextSlide > m) i = 0; else if (i < 0 && b.currSlide > m) i += b.currSlide - m; else l = b.currSlide;
g = this.getScroll(b, j, l, i);
b.API.opts()._currSlide = b.nextSlide > m ? m : b.nextSlide;
} else if (e && 0 === b.nextSlide) {
g = this.getDim(b, b.currSlide, j);
f = this.genCallback(b, e, j, f);
} else if (!e && b.nextSlide == b.slideCount - 1) {
g = this.getDim(b, b.currSlide, j);
f = this.genCallback(b, e, j, f);
} else g = this.getScroll(b, j, b.currSlide, i);
h[j ? "top" : "left"] = e ? "-=" + g : "+=" + g;
if (b.throttleSpeed) k = g / a(b.slides[0])[j ? "height" : "width"]() * b.speed;
b._carouselWrap.animate(h, k, b.easing, f);
},
getDim: function(b, c, d) {
var e = a(b.slides[c]);
return e[d ? "outerHeight" : "outerWidth"](true);
},
getScroll: function(a, b, c, d) {
var e, f = 0;
if (d > 0) for (e = c; e < c + d; e++) f += this.getDim(a, e, b); else for (e = c; e > c + d; e--) f += this.getDim(a, e, b);
return f;
},
genCallback: function(b, c, d, e) {
return function() {
var c = a(b.slides[b.nextSlide]).position();
var f = 0 - c[d ? "top" : "left"] + (b.carouselOffset || 0);
b._carouselWrap.css(b.carouselVertical ? "top" : "left", f);
e();
};
},
stopTransition: function() {
var a = this.opts();
a.slides.stop(false, true);
a._carouselWrap.stop(false, true);
},
onDestroy: function(b) {
var c = this.opts();
if (c._carouselResizeThrottle) a(window).off("resize", c._carouselResizeThrottle);
c.slides.prependTo(c.container);
c._carouselWrap.remove();
}
};
}(jQuery);
!function() {
function a(a) {
this.path = a;
var b = this.path.split("."), c = b.slice(0, b.length - 1).join("."), d = b[b.length - 1];
this.at_2x_path = c + "@2x." + d;
}
function b(b) {
this.el = b, this.path = new a(this.el.getAttribute("src"));
var c = this;
this.path.check_2x_variant(function(a) {
a && c.swap();
});
}
var c = "undefined" == typeof exports ? window : exports;
c.RetinaImagePath = a, a.confirmed_paths = [], a.prototype.is_external = function() {
return !!this.path.match(/^https?\:/i) && !this.path.match("//" + document.domain);
}, a.prototype.check_2x_variant = function(b) {
var c, d = this;
if (this.is_external()) return b(!1);
if (this.at_2x_path in a.confirmed_paths) return b(!0);
c = new XMLHttpRequest(), c.open("HEAD", this.at_2x_path), c.onreadystatechange = function() {
return 4 != c.readyState ? b(!1) : c.status >= 200 && c.status <= 399 ? (a.confirmed_paths.push(d.at_2x_path),
b(!0)) : b(!1);
}, c.send();
}, c.RetinaImage = b, b.prototype.swap = function(a) {
function b() {
c.el.complete ? (c.el.setAttribute("width", c.el.offsetWidth), c.el.setAttribute("height", c.el.offsetHeight),
c.el.setAttribute("src", a)) : setTimeout(b, 5);
}
"undefined" == typeof a && (a = this.path.at_2x_path);
var c = this;
b();
}, c.devicePixelRatio > 1 && (window.onload = function() {
var a = document.getElementsByTagName("img"), c = [], d, e;
for (d = 0; d < a.length; d++) e = a[d], c.push(new b(e));
});
}();
!function(a) {
"use strict";
function b(a) {
return new RegExp("(^|\\s+)" + a + "(\\s+|$)");
}
var c, d, e;
if ("classList" in document.documentElement) {
c = function(a, b) {
return a.classList.contains(b);
};
d = function(a, b) {
a.classList.add(b);
};
e = function(a, b) {
a.classList.remove(b);
};
} else {
c = function(a, c) {
return b(c).test(a.className);
};
d = function(a, b) {
if (!c(a, b)) a.className = a.className + " " + b;
};
e = function(a, c) {
a.className = a.className.replace(b(c), " ");
};
}
function f(a, b) {
var f = c(a, b) ? e : d;
f(a, b);
}
a.classie = {
hasClass: c,
addClass: d,
removeClass: e,
toggleClass: f,
has: c,
add: d,
remove: e,
toggle: f
};
}(window);
(function() {
var a, b;
a = this.jQuery || window.jQuery;
b = a(window);
a.fn.stick_in_parent = function(c) {
var d, e, f, g, h, i, j, k, l, m, n;
if (null == c) c = {};
k = c.sticky_class, f = c.inner_scrolling, j = c.recalc_every, i = c.parent, h = c.offset_top,
g = c.spacer, e = c.bottoming;
if (null == h) h = 0;
if (null == i) i = void 0;
if (null == f) f = true;
if (null == k) k = "is_stuck";
if (null == e) e = true;
l = function(c, d, l, m, n, o, p, q) {
var r, s, t, u, v, w, x, y, z, A, B;
if (c.data("sticky_kit")) return;
c.data("sticky_kit", true);
w = c.parent();
if (null != i) w = w.closest(i);
if (!w.length) throw "failed to find stick parent";
t = false;
r = false;
A = null != g ? g && c.closest(g) : a("");
if (A) A.css("position", c.css("position"));
x = function() {
var a, b, e;
if (q) return;
a = parseInt(w.css("border-top-width"), 10);
b = parseInt(w.css("padding-top"), 10);
d = parseInt(w.css("padding-bottom"), 10);
l = w.offset().top + a + b;
m = w.height();
if (t) {
t = false;
r = false;
if (null == g) {
c.insertAfter(A);
A.detach();
}
c.css({
position: "",
top: "",
width: "",
bottom: ""
}).removeClass(k);
e = true;
}
n = c.offset().top - (parseInt(c.css("margin-top"), 10) || 0) - h;
o = c.outerHeight(true);
p = c.css("float");
if (A) A.css({
width: c.outerWidth(true),
height: o,
display: c.css("display"),
"vertical-align": c.css("vertical-align"),
"float": p
});
if (e) return B();
};
x();
if (o === m) return;
u = void 0;
v = h;
z = j;
B = function() {
var a, i, s, y, B;
if (q) return;
if (null != z) {
z -= 1;
if (z <= 0) {
z = j;
x();
}
}
s = b.scrollTop();
if (null != u) i = s - u;
u = s;
if (t) {
if (e) {
y = s + o + v > m + l;
if (r && !y) {
r = false;
c.css({
position: "fixed",
bottom: "",
top: v
}).trigger("sticky_kit:unbottom");
}
}
if (s < n) {
t = false;
v = h;
if (null == g) {
if ("left" === p || "right" === p) c.insertAfter(A);
A.detach();
}
a = {
position: "",
width: "",
top: ""
};
c.css(a).removeClass(k).trigger("sticky_kit:unstick");
}
if (f) {
B = b.height();
if (o + h > B) if (!r) {
v -= i;
v = Math.max(B - o, v);
v = Math.min(h, v);
if (t) c.css({
top: v + "px"
});
}
}
} else if (s > n) {
t = true;
a = {
position: "fixed",
top: v
};
a.width = "border-box" === c.css("box-sizing") ? c.outerWidth() + "px" : c.width() + "px";
c.css(a).addClass(k);
if (null == g) {
c.after(A);
if ("left" === p || "right" === p) A.append(c);
}
c.trigger("sticky_kit:stick");
}
if (t && e) {
if (null == y) y = s + o + v > m + l;
if (!r && y) {
r = true;
if ("static" === w.css("position")) w.css({
position: "relative"
});
return c.css({
position: "absolute",
bottom: d,
top: "auto"
}).trigger("sticky_kit:bottom");
}
}
};
y = function() {
x();
return B();
};
s = function() {
q = true;
b.off("touchmove", B);
b.off("scroll", B);
b.off("resize", y);
a(document.body).off("sticky_kit:recalc", y);
c.off("sticky_kit:detach", s);
c.removeData("sticky_kit");
c.css({
position: "",
bottom: "",
top: "",
width: ""
});
w.position("position", "");
if (t) {
if (null == g) {
if ("left" === p || "right" === p) c.insertAfter(A);
A.remove();
}
return c.removeClass(k);
}
};
b.on("touchmove", B);
b.on("scroll", B);
b.on("resize", y);
a(document.body).on("sticky_kit:recalc", y);
c.on("sticky_kit:detach", s);
return setTimeout(B, 0);
};
for (m = 0, n = this.length; m < n; m++) {
d = this[m];
l(a(d));
}
return this;
};
}).call(this);
!function(a, b, c, d) {
"use strict";
var e = c("html"), f = c(a), g = c(b), h = c.fancybox = function() {
h.open.apply(this, arguments);
}, i = navigator.userAgent.match(/msie/i), j = null, k = b.createTouch !== d, l = function(a) {
return a && a.hasOwnProperty && a instanceof c;
}, m = function(a) {
return a && "string" === c.type(a);
}, n = function(a) {
return m(a) && a.indexOf("%") > 0;
}, o = function(a) {
return a && !(a.style.overflow && "hidden" === a.style.overflow) && (a.clientWidth && a.scrollWidth > a.clientWidth || a.clientHeight && a.scrollHeight > a.clientHeight);
}, p = function(a, b) {
var c = parseInt(a, 10) || 0;
if (b && n(a)) c = h.getViewport()[b] / 100 * c;
return Math.ceil(c);
}, q = function(a, b) {
return p(a, b) + "px";
};
c.extend(h, {
version: "2.1.5",
defaults: {
padding: 15,
margin: 20,
width: 800,
height: 600,
minWidth: 100,
minHeight: 100,
maxWidth: 9999,
maxHeight: 9999,
pixelRatio: 1,
autoSize: true,
autoHeight: false,
autoWidth: false,
autoResize: true,
autoCenter: !k,
fitToView: true,
aspectRatio: false,
topRatio: .5,
leftRatio: .5,
scrolling: "auto",
wrapCSS: "",
arrows: true,
closeBtn: true,
closeClick: false,
nextClick: false,
mouseWheel: true,
autoPlay: false,
playSpeed: 3e3,
preload: 3,
modal: false,
loop: true,
ajax: {
dataType: "html",
headers: {
"X-fancyBox": true
}
},
iframe: {
scrolling: "auto",
preload: true
},
swf: {
wmode: "transparent",
allowfullscreen: "true",
allowscriptaccess: "always"
},
keys: {
next: {
13: "left",
34: "up",
39: "left",
40: "up"
},
prev: {
8: "right",
33: "down",
37: "right",
38: "down"
},
close: [ 27 ],
play: [ 32 ],
toggle: [ 70 ]
},
direction: {
next: "left",
prev: "right"
},
scrollOutside: true,
index: 0,
type: null,
href: null,
content: null,
title: null,
tpl: {
wrap: '
',
image: '',
iframe: '",
error: '
The requested content cannot be loaded. Please try again later.
',
closeBtn: '',
next: '',
prev: ''
},
openEffect: "fade",
openSpeed: 250,
openEasing: "swing",
openOpacity: true,
openMethod: "zoomIn",
closeEffect: "fade",
closeSpeed: 250,
closeEasing: "swing",
closeOpacity: true,
closeMethod: "zoomOut",
nextEffect: "elastic",
nextSpeed: 250,
nextEasing: "swing",
nextMethod: "changeIn",
prevEffect: "elastic",
prevSpeed: 250,
prevEasing: "swing",
prevMethod: "changeOut",
helpers: {
overlay: true,
title: true
},
onCancel: c.noop,
beforeLoad: c.noop,
afterLoad: c.noop,
beforeShow: c.noop,
afterShow: c.noop,
beforeChange: c.noop,
beforeClose: c.noop,
afterClose: c.noop
},
group: {},
opts: {},
previous: null,
coming: null,
current: null,
isActive: false,
isOpen: false,
isOpened: false,
wrap: null,
skin: null,
outer: null,
inner: null,
player: {
timer: null,
isActive: false
},
ajaxLoad: null,
imgPreload: null,
transitions: {},
helpers: {},
open: function(a, b) {
if (!a) return;
if (!c.isPlainObject(b)) b = {};
if (false === h.close(true)) return;
if (!c.isArray(a)) a = l(a) ? c(a).get() : [ a ];
c.each(a, function(e, f) {
var g = {}, i, j, k, n, o, p, q;
if ("object" === c.type(f)) {
if (f.nodeType) f = c(f);
if (l(f)) {
g = {
href: f.data("fancybox-href") || f.attr("href"),
title: f.data("fancybox-title") || f.attr("title"),
isDom: true,
element: f
};
if (c.metadata) c.extend(true, g, f.metadata());
} else g = f;
}
i = b.href || g.href || (m(f) ? f : null);
j = b.title !== d ? b.title : g.title || "";
k = b.content || g.content;
n = k ? "html" : b.type || g.type;
if (!n && g.isDom) {
n = f.data("fancybox-type");
if (!n) {
o = f.prop("class").match(/fancybox\.(\w+)/);
n = o ? o[1] : null;
}
}
if (m(i)) {
if (!n) if (h.isImage(i)) n = "image"; else if (h.isSWF(i)) n = "swf"; else if ("#" === i.charAt(0)) n = "inline"; else if (m(f)) {
n = "html";
k = f;
}
if ("ajax" === n) {
p = i.split(/\s+/, 2);
i = p.shift();
q = p.shift();
}
}
if (!k) if ("inline" === n) {
if (i) k = c(m(i) ? i.replace(/.*(?=#[^\s]+$)/, "") : i); else if (g.isDom) k = f;
} else if ("html" === n) k = i; else if (!n && !i && g.isDom) {
n = "inline";
k = f;
}
c.extend(g, {
href: i,
type: n,
content: k,
title: j,
selector: q
});
a[e] = g;
});
h.opts = c.extend(true, {}, h.defaults, b);
if (b.keys !== d) h.opts.keys = b.keys ? c.extend({}, h.defaults.keys, b.keys) : false;
h.group = a;
return h._start(h.opts.index);
},
cancel: function() {
var a = h.coming;
if (!a || false === h.trigger("onCancel")) return;
h.hideLoading();
if (h.ajaxLoad) h.ajaxLoad.abort();
h.ajaxLoad = null;
if (h.imgPreload) h.imgPreload.onload = h.imgPreload.onerror = null;
if (a.wrap) a.wrap.stop(true, true).trigger("onReset").remove();
h.coming = null;
if (!h.current) h._afterZoomOut(a);
},
close: function(a) {
h.cancel();
if (false === h.trigger("beforeClose")) return;
h.unbindEvents();
if (!h.isActive) return;
if (!h.isOpen || true === a) {
c(".fancybox-wrap").stop(true).trigger("onReset").remove();
h._afterZoomOut();
} else {
h.isOpen = h.isOpened = false;
h.isClosing = true;
c(".fancybox-item, .fancybox-nav").remove();
h.wrap.stop(true, true).removeClass("fancybox-opened");
h.transitions[h.current.closeMethod]();
}
},
play: function(a) {
var b = function() {
clearTimeout(h.player.timer);
}, c = function() {
b();
if (h.current && h.player.isActive) h.player.timer = setTimeout(h.next, h.current.playSpeed);
}, d = function() {
b();
g.unbind(".player");
h.player.isActive = false;
h.trigger("onPlayEnd");
}, e = function() {
if (h.current && (h.current.loop || h.current.index < h.group.length - 1)) {
h.player.isActive = true;
g.bind({
"onCancel.player beforeClose.player": d,
"onUpdate.player": c,
"beforeLoad.player": b
});
c();
h.trigger("onPlayStart");
}
};
if (true === a || !h.player.isActive && false !== a) e(); else d();
},
next: function(a) {
var b = h.current;
if (b) {
if (!m(a)) a = b.direction.next;
h.jumpto(b.index + 1, a, "next");
}
},
prev: function(a) {
var b = h.current;
if (b) {
if (!m(a)) a = b.direction.prev;
h.jumpto(b.index - 1, a, "prev");
}
},
jumpto: function(a, b, c) {
var e = h.current;
if (!e) return;
a = p(a);
h.direction = b || e.direction[a >= e.index ? "next" : "prev"];
h.router = c || "jumpto";
if (e.loop) {
if (a < 0) a = e.group.length + a % e.group.length;
a %= e.group.length;
}
if (e.group[a] !== d) {
h.cancel();
h._start(a);
}
},
reposition: function(a, b) {
var d = h.current, e = d ? d.wrap : null, f;
if (e) {
f = h._getPosition(b);
if (a && "scroll" === a.type) {
delete f.position;
e.stop(true, true).animate(f, 200);
} else {
e.css(f);
d.pos = c.extend({}, d.dim, f);
}
}
},
update: function(a) {
var b = a && a.type, c = !b || "orientationchange" === b;
if (c) {
clearTimeout(j);
j = null;
}
if (!h.isOpen || j) return;
j = setTimeout(function() {
var d = h.current;
if (!d || h.isClosing) return;
h.wrap.removeClass("fancybox-tmp");
if (c || "load" === b || "resize" === b && d.autoResize) h._setDimension();
if (!("scroll" === b && d.canShrink)) h.reposition(a);
h.trigger("onUpdate");
j = null;
}, c && !k ? 0 : 300);
},
toggle: function(a) {
if (h.isOpen) {
h.current.fitToView = "boolean" === c.type(a) ? a : !h.current.fitToView;
if (k) {
h.wrap.removeAttr("style").addClass("fancybox-tmp");
h.trigger("onUpdate");
}
h.update();
}
},
hideLoading: function() {
g.unbind(".loading");
c("#fancybox-loading").remove();
},
showLoading: function() {
var a, b;
h.hideLoading();
a = c('
').click(h.cancel).appendTo("body");
g.bind("keydown.loading", function(a) {
if (27 === (a.which || a.keyCode)) {
a.preventDefault();
h.cancel();
}
});
if (!h.defaults.fixed) {
b = h.getViewport();
a.css({
position: "absolute",
top: .5 * b.h + b.y,
left: .5 * b.w + b.x
});
}
},
getViewport: function() {
var b = h.current && h.current.locked || false, c = {
x: f.scrollLeft(),
y: f.scrollTop()
};
if (b) {
c.w = b[0].clientWidth;
c.h = b[0].clientHeight;
} else {
c.w = k && a.innerWidth ? a.innerWidth : f.width();
c.h = k && a.innerHeight ? a.innerHeight : f.height();
}
return c;
},
unbindEvents: function() {
if (h.wrap && l(h.wrap)) h.wrap.unbind(".fb");
g.unbind(".fb");
f.unbind(".fb");
},
bindEvents: function() {
var a = h.current, b;
if (!a) return;
f.bind("orientationchange.fb" + (k ? "" : " resize.fb") + (a.autoCenter && !a.locked ? " scroll.fb" : ""), h.update);
b = a.keys;
if (b) g.bind("keydown.fb", function(e) {
var f = e.which || e.keyCode, g = e.target || e.srcElement;
if (27 === f && h.coming) return false;
if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(g && (g.type || c(g).is("[contenteditable]")))) c.each(b, function(b, g) {
if (a.group.length > 1 && g[f] !== d) {
h[b](g[f]);
e.preventDefault();
return false;
}
if (c.inArray(f, g) > -1) {
h[b]();
e.preventDefault();
return false;
}
});
});
if (c.fn.mousewheel && a.mouseWheel) h.wrap.bind("mousewheel.fb", function(b, d, e, f) {
var g = b.target || null, i = c(g), j = false;
while (i.length) {
if (j || i.is(".fancybox-skin") || i.is(".fancybox-wrap")) break;
j = o(i[0]);
i = c(i).parent();
}
if (0 !== d && !j) if (h.group.length > 1 && !a.canShrink) {
if (f > 0 || e > 0) h.prev(f > 0 ? "down" : "left"); else if (f < 0 || e < 0) h.next(f < 0 ? "up" : "right");
b.preventDefault();
}
});
},
trigger: function(a, b) {
var d, e = b || h.coming || h.current;
if (!e) return;
if (c.isFunction(e[a])) d = e[a].apply(e, Array.prototype.slice.call(arguments, 1));
if (false === d) return false;
if (e.helpers) c.each(e.helpers, function(b, d) {
if (d && h.helpers[b] && c.isFunction(h.helpers[b][a])) h.helpers[b][a](c.extend(true, {}, h.helpers[b].defaults, d), e);
});
g.trigger(a);
},
isImage: function(a) {
return m(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
},
isSWF: function(a) {
return m(a) && a.match(/\.(swf)((\?|#).*)?$/i);
},
_start: function(a) {
var b = {}, d, e, f, g, i;
a = p(a);
d = h.group[a] || null;
if (!d) return false;
b = c.extend(true, {}, h.opts, d);
g = b.margin;
i = b.padding;
if ("number" === c.type(g)) b.margin = [ g, g, g, g ];
if ("number" === c.type(i)) b.padding = [ i, i, i, i ];
if (b.modal) c.extend(true, b, {
closeBtn: false,
closeClick: false,
nextClick: false,
arrows: false,
mouseWheel: false,
keys: null,
helpers: {
overlay: {
closeClick: false
}
}
});
if (b.autoSize) b.autoWidth = b.autoHeight = true;
if ("auto" === b.width) b.autoWidth = true;
if ("auto" === b.height) b.autoHeight = true;
b.group = h.group;
b.index = a;
h.coming = b;
if (false === h.trigger("beforeLoad")) {
h.coming = null;
return;
}
f = b.type;
e = b.href;
if (!f) {
h.coming = null;
if (h.current && h.router && "jumpto" !== h.router) {
h.current.index = a;
return h[h.router](h.direction);
}
return false;
}
h.isActive = true;
if ("image" === f || "swf" === f) {
b.autoHeight = b.autoWidth = false;
b.scrolling = "visible";
}
if ("image" === f) b.aspectRatio = true;
if ("iframe" === f && k) b.scrolling = "scroll";
b.wrap = c(b.tpl.wrap).addClass("fancybox-" + (k ? "mobile" : "desktop") + " fancybox-type-" + f + " fancybox-tmp " + b.wrapCSS).appendTo(b.parent || "body");
c.extend(b, {
skin: c(".fancybox-skin", b.wrap),
outer: c(".fancybox-outer", b.wrap),
inner: c(".fancybox-inner", b.wrap)
});
c.each([ "Top", "Right", "Bottom", "Left" ], function(a, c) {
b.skin.css("padding" + c, q(b.padding[a]));
});
h.trigger("onReady");
if ("inline" === f || "html" === f) {
if (!b.content || !b.content.length) return h._error("content");
} else if (!e) return h._error("href");
if ("image" === f) h._loadImage(); else if ("ajax" === f) h._loadAjax(); else if ("iframe" === f) h._loadIframe(); else h._afterLoad();
},
_error: function(a) {
c.extend(h.coming, {
type: "html",
autoWidth: true,
autoHeight: true,
minWidth: 0,
minHeight: 0,
scrolling: "no",
hasError: a,
content: h.coming.tpl.error
});
h._afterLoad();
},
_loadImage: function() {
var a = h.imgPreload = new Image();
a.onload = function() {
this.onload = this.onerror = null;
h.coming.width = this.width / h.opts.pixelRatio;
h.coming.height = this.height / h.opts.pixelRatio;
h._afterLoad();
};
a.onerror = function() {
this.onload = this.onerror = null;
h._error("image");
};
a.src = h.coming.href;
if (true !== a.complete) h.showLoading();
},
_loadAjax: function() {
var a = h.coming;
h.showLoading();
h.ajaxLoad = c.ajax(c.extend({}, a.ajax, {
url: a.href,
error: function(a, b) {
if (h.coming && "abort" !== b) h._error("ajax", a); else h.hideLoading();
},
success: function(b, c) {
if ("success" === c) {
a.content = b;
h._afterLoad();
}
}
}));
},
_loadIframe: function() {
var a = h.coming, b = c(a.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())).attr("scrolling", k ? "auto" : a.iframe.scrolling).attr("src", a.href);
c(a.wrap).bind("onReset", function() {
try {
c(this).find("iframe").hide().attr("src", "//about:blank").end().empty();
} catch (a) {}
});
if (a.iframe.preload) {
h.showLoading();
b.one("load", function() {
c(this).data("ready", 1);
if (!k) c(this).bind("load.fb", h.update);
c(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();
h._afterLoad();
});
}
a.content = b.appendTo(a.inner);
if (!a.iframe.preload) h._afterLoad();
},
_preloadImages: function() {
var a = h.group, b = h.current, c = a.length, d = b.preload ? Math.min(b.preload, c - 1) : 0, e, f;
for (f = 1; f <= d; f += 1) {
e = a[(b.index + f) % c];
if ("image" === e.type && e.href) new Image().src = e.href;
}
},
_afterLoad: function() {
var a = h.coming, b = h.current, d = "fancybox-placeholder", e, f, g, i, j, k;
h.hideLoading();
if (!a || false === h.isActive) return;
if (false === h.trigger("afterLoad", a, b)) {
a.wrap.stop(true).trigger("onReset").remove();
h.coming = null;
return;
}
if (b) {
h.trigger("beforeChange", b);
b.wrap.stop(true).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove();
}
h.unbindEvents();
e = a;
f = a.content;
g = a.type;
i = a.scrolling;
c.extend(h, {
wrap: e.wrap,
skin: e.skin,
outer: e.outer,
inner: e.inner,
current: e,
previous: b
});
j = e.href;
switch (g) {
case "inline":
case "ajax":
case "html":
if (e.selector) f = c("
").html(f).find(e.selector); else if (l(f)) {
if (!f.data(d)) f.data(d, c('').insertAfter(f).hide());
f = f.show().detach();
e.wrap.bind("onReset", function() {
if (c(this).find(f).length) f.hide().replaceAll(f.data(d)).data(d, false);
});
}
break;
case "image":
f = e.tpl.image.replace("{href}", j);
break;
case "swf":
f = '";
}
if (!(l(f) && f.parent().is(e.inner))) e.inner.append(f);
h.trigger("beforeShow");
e.inner.css("overflow", "yes" === i ? "scroll" : "no" === i ? "hidden" : i);
h._setDimension();
h.reposition();
h.isOpen = false;
h.coming = null;
h.bindEvents();
if (!h.isOpened) c(".fancybox-wrap").not(e.wrap).stop(true).trigger("onReset").remove(); else if (b.prevMethod) h.transitions[b.prevMethod]();
h.transitions[h.isOpened ? e.nextMethod : e.openMethod]();
h._preloadImages();
},
_setDimension: function() {
var a = h.getViewport(), b = 0, d = false, e = false, f = h.wrap, g = h.skin, i = h.inner, j = h.current, k = j.width, l = j.height, m = j.minWidth, o = j.minHeight, r = j.maxWidth, s = j.maxHeight, t = j.scrolling, u = j.scrollOutside ? j.scrollbarWidth : 0, v = j.margin, w = p(v[1] + v[3]), x = p(v[0] + v[2]), y, z, A, B, C, D, E, F, G, H, I, J, K, L, M;
f.add(g).add(i).width("auto").height("auto").removeClass("fancybox-tmp");
y = p(g.outerWidth(true) - g.width());
z = p(g.outerHeight(true) - g.height());
A = w + y;
B = x + z;
C = n(k) ? (a.w - A) * p(k) / 100 : k;
D = n(l) ? (a.h - B) * p(l) / 100 : l;
if ("iframe" === j.type) {
L = j.content;
if (j.autoHeight && 1 === L.data("ready")) try {
if (L[0].contentWindow.document.location) {
i.width(C).height(9999);
M = L.contents().find("body");
if (u) M.css("overflow-x", "hidden");
D = M.outerHeight(true);
}
} catch (N) {}
} else if (j.autoWidth || j.autoHeight) {
i.addClass("fancybox-tmp");
if (!j.autoWidth) i.width(C);
if (!j.autoHeight) i.height(D);
if (j.autoWidth) C = i.width();
if (j.autoHeight) D = i.height();
i.removeClass("fancybox-tmp");
}
k = p(C);
l = p(D);
G = C / D;
m = p(n(m) ? p(m, "w") - A : m);
r = p(n(r) ? p(r, "w") - A : r);
o = p(n(o) ? p(o, "h") - B : o);
s = p(n(s) ? p(s, "h") - B : s);
E = r;
F = s;
if (j.fitToView) {
r = Math.min(a.w - A, r);
s = Math.min(a.h - B, s);
}
J = a.w - w;
K = a.h - x;
if (j.aspectRatio) {
if (k > r) {
k = r;
l = p(k / G);
}
if (l > s) {
l = s;
k = p(l * G);
}
if (k < m) {
k = m;
l = p(k / G);
}
if (l < o) {
l = o;
k = p(l * G);
}
} else {
k = Math.max(m, Math.min(k, r));
if (j.autoHeight && "iframe" !== j.type) {
i.width(k);
l = i.height();
}
l = Math.max(o, Math.min(l, s));
}
if (j.fitToView) {
i.width(k).height(l);
f.width(k + y);
H = f.width();
I = f.height();
if (j.aspectRatio) while ((H > J || I > K) && k > m && l > o) {
if (b++ > 19) break;
l = Math.max(o, Math.min(s, l - 10));
k = p(l * G);
if (k < m) {
k = m;
l = p(k / G);
}
if (k > r) {
k = r;
l = p(k / G);
}
i.width(k).height(l);
f.width(k + y);
H = f.width();
I = f.height();
} else {
k = Math.max(m, Math.min(k, k - (H - J)));
l = Math.max(o, Math.min(l, l - (I - K)));
}
}
if (u && "auto" === t && l < D && k + y + u < J) k += u;
i.width(k).height(l);
f.width(k + y);
H = f.width();
I = f.height();
d = (H > J || I > K) && k > m && l > o;
e = j.aspectRatio ? k < E && l < F && k < C && l < D : (k < E || l < F) && (k < C || l < D);
c.extend(j, {
dim: {
width: q(H),
height: q(I)
},
origWidth: C,
origHeight: D,
canShrink: d,
canExpand: e,
wPadding: y,
hPadding: z,
wrapSpace: I - g.outerHeight(true),
skinSpace: g.height() - l
});
if (!L && j.autoHeight && l > o && l < s && !e) i.height("auto");
},
_getPosition: function(a) {
var b = h.current, c = h.getViewport(), d = b.margin, e = h.wrap.width() + d[1] + d[3], f = h.wrap.height() + d[0] + d[2], g = {
position: "absolute",
top: d[0],
left: d[3]
};
if (b.autoCenter && b.fixed && !a && f <= c.h && e <= c.w) g.position = "fixed"; else if (!b.locked) {
g.top += c.y;
g.left += c.x;
}
g.top = q(Math.max(g.top, g.top + (c.h - f) * b.topRatio));
g.left = q(Math.max(g.left, g.left + (c.w - e) * b.leftRatio));
return g;
},
_afterZoomIn: function() {
var a = h.current;
if (!a) return;
h.isOpen = h.isOpened = true;
h.wrap.css("overflow", "visible").addClass("fancybox-opened");
h.update();
if (a.closeClick || a.nextClick && h.group.length > 1) h.inner.css("cursor", "pointer").bind("click.fb", function(b) {
if (!c(b.target).is("a") && !c(b.target).parent().is("a")) {
b.preventDefault();
h[a.closeClick ? "close" : "next"]();
}
});
if (a.closeBtn) c(a.tpl.closeBtn).appendTo(h.skin).bind("click.fb", function(a) {
a.preventDefault();
h.close();
});
if (a.arrows && h.group.length > 1) {
if (a.loop || a.index > 0) c(a.tpl.prev).appendTo(h.outer).bind("click.fb", h.prev);
if (a.loop || a.index < h.group.length - 1) c(a.tpl.next).appendTo(h.outer).bind("click.fb", h.next);
}
h.trigger("afterShow");
if (!a.loop && a.index === a.group.length - 1) h.play(false); else if (h.opts.autoPlay && !h.player.isActive) {
h.opts.autoPlay = false;
h.play();
}
},
_afterZoomOut: function(a) {
a = a || h.current;
c(".fancybox-wrap").trigger("onReset").remove();
c.extend(h, {
group: {},
opts: {},
router: false,
current: null,
isActive: false,
isOpened: false,
isOpen: false,
isClosing: false,
wrap: null,
skin: null,
outer: null,
inner: null
});
h.trigger("afterClose", a);
}
});
h.transitions = {
getOrigPosition: function() {
var a = h.current, b = a.element, c = a.orig, d = {}, e = 50, f = 50, g = a.hPadding, i = a.wPadding, j = h.getViewport();
if (!c && a.isDom && b.is(":visible")) {
c = b.find("img:first");
if (!c.length) c = b;
}
if (l(c)) {
d = c.offset();
if (c.is("img")) {
e = c.outerWidth();
f = c.outerHeight();
}
} else {
d.top = j.y + (j.h - f) * a.topRatio;
d.left = j.x + (j.w - e) * a.leftRatio;
}
if ("fixed" === h.wrap.css("position") || a.locked) {
d.top -= j.y;
d.left -= j.x;
}
d = {
top: q(d.top - g * a.topRatio),
left: q(d.left - i * a.leftRatio),
width: q(e + i),
height: q(f + g)
};
return d;
},
step: function(a, b) {
var c, d, e, f = b.prop, g = h.current, i = g.wrapSpace, j = g.skinSpace;
if ("width" === f || "height" === f) {
c = b.end === b.start ? 1 : (a - b.start) / (b.end - b.start);
if (h.isClosing) c = 1 - c;
d = "width" === f ? g.wPadding : g.hPadding;
e = a - d;
h.skin[f](p("width" === f ? e : e - i * c));
h.inner[f](p("width" === f ? e : e - i * c - j * c));
}
},
zoomIn: function() {
var a = h.current, b = a.pos, d = a.openEffect, e = "elastic" === d, f = c.extend({
opacity: 1
}, b);
delete f.position;
if (e) {
b = this.getOrigPosition();
if (a.openOpacity) b.opacity = .1;
} else if ("fade" === d) b.opacity = .1;
h.wrap.css(b).animate(f, {
duration: "none" === d ? 0 : a.openSpeed,
easing: a.openEasing,
step: e ? this.step : null,
complete: h._afterZoomIn
});
},
zoomOut: function() {
var a = h.current, b = a.closeEffect, c = "elastic" === b, d = {
opacity: .1
};
if (c) {
d = this.getOrigPosition();
if (a.closeOpacity) d.opacity = .1;
}
h.wrap.animate(d, {
duration: "none" === b ? 0 : a.closeSpeed,
easing: a.closeEasing,
step: c ? this.step : null,
complete: h._afterZoomOut
});
},
changeIn: function() {
var a = h.current, b = a.nextEffect, c = a.pos, d = {
opacity: 1
}, e = h.direction, f = 200, g;
c.opacity = .1;
if ("elastic" === b) {
g = "down" === e || "up" === e ? "top" : "left";
if ("down" === e || "right" === e) {
c[g] = q(p(c[g]) - f);
d[g] = "+=" + f + "px";
} else {
c[g] = q(p(c[g]) + f);
d[g] = "-=" + f + "px";
}
}
if ("none" === b) h._afterZoomIn(); else h.wrap.css(c).animate(d, {
duration: a.nextSpeed,
easing: a.nextEasing,
complete: h._afterZoomIn
});
},
changeOut: function() {
var a = h.previous, b = a.prevEffect, d = {
opacity: .1
}, e = h.direction, f = 200;
if ("elastic" === b) d["down" === e || "up" === e ? "top" : "left"] = ("up" === e || "left" === e ? "-" : "+") + "=" + f + "px";
a.wrap.animate(d, {
duration: "none" === b ? 0 : a.prevSpeed,
easing: a.prevEasing,
complete: function() {
c(this).trigger("onReset").remove();
}
});
}
};
h.helpers.overlay = {
defaults: {
closeClick: true,
speedOut: 200,
showEarly: true,
css: {},
locked: !k,
fixed: true
},
overlay: null,
fixed: false,
el: c("html"),
create: function(a) {
a = c.extend({}, this.defaults, a);
if (this.overlay) this.close();
this.overlay = c('').appendTo(h.coming ? h.coming.parent : a.parent);
this.fixed = false;
if (a.fixed && h.defaults.fixed) {
this.overlay.addClass("fancybox-overlay-fixed");
this.fixed = true;
}
},
open: function(a) {
var b = this;
a = c.extend({}, this.defaults, a);
if (this.overlay) this.overlay.unbind(".overlay").width("auto").height("auto"); else this.create(a);
if (!this.fixed) {
f.bind("resize.overlay", c.proxy(this.update, this));
this.update();
}
if (a.closeClick) this.overlay.bind("click.overlay", function(a) {
if (c(a.target).hasClass("fancybox-overlay")) {
if (h.isActive) h.close(); else b.close();
return false;
}
});
this.overlay.css(a.css).show();
},
close: function() {
var a, b;
f.unbind("resize.overlay");
if (this.el.hasClass("fancybox-lock")) {
c(".fancybox-margin").removeClass("fancybox-margin");
a = f.scrollTop();
b = f.scrollLeft();
this.el.removeClass("fancybox-lock");
f.scrollTop(a).scrollLeft(b);
}
c(".fancybox-overlay").remove().hide();
c.extend(this, {
overlay: null,
fixed: false
});
},
update: function() {
var a = "100%", c;
this.overlay.width(a).height("100%");
if (i) {
c = Math.max(b.documentElement.offsetWidth, b.body.offsetWidth);
if (g.width() > c) a = g.width();
} else if (g.width() > f.width()) a = g.width();
this.overlay.width(a).height(g.height());
},
onReady: function(a, b) {
var d = this.overlay;
c(".fancybox-overlay").stop(true, true);
if (!d) this.create(a);
if (a.locked && this.fixed && b.fixed) {
if (!d) this.margin = g.height() > f.height() ? c("html").css("margin-right").replace("px", "") : false;
b.locked = this.overlay.append(b.wrap);
b.fixed = false;
}
if (true === a.showEarly) this.beforeShow.apply(this, arguments);
},
beforeShow: function(a, b) {
var d, e;
if (b.locked) {
if (false !== this.margin) {
c("*").filter(function() {
return "fixed" === c(this).css("position") && !c(this).hasClass("fancybox-overlay") && !c(this).hasClass("fancybox-wrap");
}).addClass("fancybox-margin");
this.el.addClass("fancybox-margin");
}
d = f.scrollTop();
e = f.scrollLeft();
this.el.addClass("fancybox-lock");
f.scrollTop(d).scrollLeft(e);
}
this.open(a);
},
onUpdate: function() {
if (!this.fixed) this.update();
},
afterClose: function(a) {
if (this.overlay && !h.coming) this.overlay.fadeOut(a.speedOut, c.proxy(this.close, this));
}
};
h.helpers.title = {
defaults: {
type: "float",
position: "bottom"
},
beforeShow: function(a) {
var b = h.current, d = b.title, e = a.type, f, g;
if (c.isFunction(d)) d = d.call(b.element, b);
if (!m(d) || "" === c.trim(d)) return;
f = c('
' + d + "
");
switch (e) {
case "inside":
g = h.skin;
break;
case "outside":
g = h.wrap;
break;
case "over":
g = h.inner;
break;
default:
g = h.skin;
f.appendTo("body");
if (i) f.width(f.width());
f.wrapInner('');
h.current.margin[2] += Math.abs(p(f.css("margin-bottom")));
}
f["top" === a.position ? "prependTo" : "appendTo"](g);
}
};
c.fn.fancybox = function(a) {
var b, d = c(this), e = this.selector || "", f = function(f) {
var g = c(this).blur(), i = b, j, k;
if (!(f.ctrlKey || f.altKey || f.shiftKey || f.metaKey) && !g.is(".fancybox-wrap")) {
j = a.groupAttr || "data-fancybox-group";
k = g.attr(j);
if (!k) {
j = "rel";
k = g.get(0)[j];
}
if (k && "" !== k && "nofollow" !== k) {
g = e.length ? c(e) : d;
g = g.filter("[" + j + '="' + k + '"]');
i = g.index(this);
}
a.index = i;
if (false !== h.open(g, a)) f.preventDefault();
}
};
a = a || {};
b = a.index || 0;
if (!e || false === a.live) d.unbind("click.fb-start").bind("click.fb-start", f); else g.undelegate(e, "click.fb-start").delegate(e + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", f);
this.filter("[data-fancybox-start=1]").trigger("click");
return this;
};
g.ready(function() {
var b, f;
if (c.scrollbarWidth === d) c.scrollbarWidth = function() {
var a = c('
').appendTo("body"), b = a.children(), d = b.innerWidth() - b.height(99).innerWidth();
a.remove();
return d;
};
if (c.support.fixedPosition === d) c.support.fixedPosition = function() {
var a = c('').appendTo("body"), b = 20 === a[0].offsetTop || 15 === a[0].offsetTop;
a.remove();
return b;
}();
c.extend(h.defaults, {
scrollbarWidth: c.scrollbarWidth(),
fixed: c.support.fixedPosition,
parent: c("body")
});
b = c(a).width();
e.addClass("fancybox-lock-test");
f = c(a).width();
e.removeClass("fancybox-lock-test");
c("").appendTo("head");
});
}(window, document, jQuery);
(function() {
var a = [].indexOf || function(a) {
for (var b = 0, c = this.length; b < c; b++) if (b in this && this[b] === a) return b;
return -1;
}, b = [].slice;
!function(a, b) {
if ("function" === typeof define && define.amd) return define("waypoints", [ "jquery" ], function(c) {
return b(c, a);
}); else return b(a.jQuery, a);
}(window, function(c, d) {
var e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t;
e = c(d);
l = a.call(d, "ontouchstart") >= 0;
h = {
horizontal: {},
vertical: {}
};
i = 1;
k = {};
j = "waypoints-context-id";
o = "resize.waypoints";
p = "scroll.waypoints";
q = 1;
r = "waypoints-waypoint-ids";
s = "waypoint";
t = "waypoints";
f = function() {
function a(a) {
var b = this;
this.$element = a;
this.element = a[0];
this.didResize = false;
this.didScroll = false;
this.id = "context" + i++;
this.oldScroll = {
x: a.scrollLeft(),
y: a.scrollTop()
};
this.waypoints = {
horizontal: {},
vertical: {}
};
this.element[j] = this.id;
k[this.id] = this;
a.bind(p, function() {
var a;
if (!(b.didScroll || l)) {
b.didScroll = true;
a = function() {
b.doScroll();
return b.didScroll = false;
};
return d.setTimeout(a, c[t].settings.scrollThrottle);
}
});
a.bind(o, function() {
var a;
if (!b.didResize) {
b.didResize = true;
a = function() {
c[t]("refresh");
return b.didResize = false;
};
return d.setTimeout(a, c[t].settings.resizeThrottle);
}
});
}
a.prototype.doScroll = function() {
var a, b = this;
a = {
horizontal: {
newScroll: this.$element.scrollLeft(),
oldScroll: this.oldScroll.x,
forward: "right",
backward: "left"
},
vertical: {
newScroll: this.$element.scrollTop(),
oldScroll: this.oldScroll.y,
forward: "down",
backward: "up"
}
};
if (l && (!a.vertical.oldScroll || !a.vertical.newScroll)) c[t]("refresh");
c.each(a, function(a, d) {
var e, f, g;
g = [];
f = d.newScroll > d.oldScroll;
e = f ? d.forward : d.backward;
c.each(b.waypoints[a], function(a, b) {
var c, e;
if (d.oldScroll < (c = b.offset) && c <= d.newScroll) return g.push(b); else if (d.newScroll < (e = b.offset) && e <= d.oldScroll) return g.push(b);
});
g.sort(function(a, b) {
return a.offset - b.offset;
});
if (!f) g.reverse();
return c.each(g, function(a, b) {
if (b.options.continuous || a === g.length - 1) return b.trigger([ e ]);
});
});
return this.oldScroll = {
x: a.horizontal.newScroll,
y: a.vertical.newScroll
};
};
a.prototype.refresh = function() {
var a, b, d, e = this;
d = c.isWindow(this.element);
b = this.$element.offset();
this.doScroll();
a = {
horizontal: {
contextOffset: d ? 0 : b.left,
contextScroll: d ? 0 : this.oldScroll.x,
contextDimension: this.$element.width(),
oldScroll: this.oldScroll.x,
forward: "right",
backward: "left",
offsetProp: "left"
},
vertical: {
contextOffset: d ? 0 : b.top,
contextScroll: d ? 0 : this.oldScroll.y,
contextDimension: d ? c[t]("viewportHeight") : this.$element.height(),
oldScroll: this.oldScroll.y,
forward: "down",
backward: "up",
offsetProp: "top"
}
};
return c.each(a, function(a, b) {
return c.each(e.waypoints[a], function(a, d) {
var e, f, g, h, i;
e = d.options.offset;
g = d.offset;
f = c.isWindow(d.element) ? 0 : d.$element.offset()[b.offsetProp];
if (c.isFunction(e)) e = e.apply(d.element); else if ("string" === typeof e) {
e = parseFloat(e);
if (d.options.offset.indexOf("%") > -1) e = Math.ceil(b.contextDimension * e / 100);
}
d.offset = f - b.contextOffset + b.contextScroll - e;
if (d.options.onlyOnScroll && null != g || !d.enabled) return;
if (null !== g && g < (h = b.oldScroll) && h <= d.offset) return d.trigger([ b.backward ]); else if (null !== g && g > (i = b.oldScroll) && i >= d.offset) return d.trigger([ b.forward ]); else if (null === g && b.oldScroll >= d.offset) return d.trigger([ b.forward ]);
});
});
};
a.prototype.checkEmpty = function() {
if (c.isEmptyObject(this.waypoints.horizontal) && c.isEmptyObject(this.waypoints.vertical)) {
this.$element.unbind([ o, p ].join(" "));
return delete k[this.id];
}
};
return a;
}();
g = function() {
function a(a, b, d) {
var e, f;
if ("bottom-in-view" === d.offset) d.offset = function() {
var a;
a = c[t]("viewportHeight");
if (!c.isWindow(b.element)) a = b.$element.height();
return a - c(this).outerHeight();
};
this.$element = a;
this.element = a[0];
this.axis = d.horizontal ? "horizontal" : "vertical";
this.callback = d.handler;
this.context = b;
this.enabled = d.enabled;
this.id = "waypoints" + q++;
this.offset = null;
this.options = d;
b.waypoints[this.axis][this.id] = this;
h[this.axis][this.id] = this;
e = null != (f = this.element[r]) ? f : [];
e.push(this.id);
this.element[r] = e;
}
a.prototype.trigger = function(a) {
if (!this.enabled) return;
if (null != this.callback) this.callback.apply(this.element, a);
if (this.options.triggerOnce) return this.destroy();
};
a.prototype.disable = function() {
return this.enabled = false;
};
a.prototype.enable = function() {
this.context.refresh();
return this.enabled = true;
};
a.prototype.destroy = function() {
delete h[this.axis][this.id];
delete this.context.waypoints[this.axis][this.id];
return this.context.checkEmpty();
};
a.getWaypointsByElement = function(a) {
var b, d;
d = a[r];
if (!d) return [];
b = c.extend({}, h.horizontal, h.vertical);
return c.map(d, function(a) {
return b[a];
});
};
return a;
}();
n = {
init: function(a, b) {
var d;
b = c.extend({}, c.fn[s].defaults, b);
if (null == (d = b.handler)) b.handler = a;
this.each(function() {
var a, d, e, h;
a = c(this);
e = null != (h = b.context) ? h : c.fn[s].defaults.context;
if (!c.isWindow(e)) e = a.closest(e);
e = c(e);
d = k[e[0][j]];
if (!d) d = new f(e);
return new g(a, d, b);
});
c[t]("refresh");
return this;
},
disable: function() {
return n._invoke.call(this, "disable");
},
enable: function() {
return n._invoke.call(this, "enable");
},
destroy: function() {
return n._invoke.call(this, "destroy");
},
prev: function(a, b) {
return n._traverse.call(this, a, b, function(a, b, c) {
if (b > 0) return a.push(c[b - 1]);
});
},
next: function(a, b) {
return n._traverse.call(this, a, b, function(a, b, c) {
if (b < c.length - 1) return a.push(c[b + 1]);
});
},
_traverse: function(a, b, e) {
var f, g;
if (null == a) a = "vertical";
if (null == b) b = d;
g = m.aggregate(b);
f = [];
this.each(function() {
var b;
b = c.inArray(this, g[a]);
return e(f, b, g[a]);
});
return this.pushStack(f);
},
_invoke: function(a) {
this.each(function() {
var b;
b = g.getWaypointsByElement(this);
return c.each(b, function(b, c) {
c[a]();
return true;
});
});
return this;
}
};
c.fn[s] = function() {
var a, d;
d = arguments[0], a = 2 <= arguments.length ? b.call(arguments, 1) : [];
if (n[d]) return n[d].apply(this, a); else if (c.isFunction(d)) return n.init.apply(this, arguments); else if (c.isPlainObject(d)) return n.init.apply(this, [ null, d ]); else if (!d) return c.error("jQuery Waypoints needs a callback function or handler option."); else return c.error("The " + d + " method does not exist in jQuery Waypoints.");
};
c.fn[s].defaults = {
context: d,
continuous: true,
enabled: true,
horizontal: false,
offset: 0,
triggerOnce: false
};
m = {
refresh: function() {
return c.each(k, function(a, b) {
return b.refresh();
});
},
viewportHeight: function() {
var a;
return null != (a = d.innerHeight) ? a : e.height();
},
aggregate: function(a) {
var b, d, e;
b = h;
if (a) b = null != (e = k[c(a)[0][j]]) ? e.waypoints : void 0;
if (!b) return [];
d = {
horizontal: [],
vertical: []
};
c.each(d, function(a, e) {
c.each(b[a], function(a, b) {
return e.push(b);
});
e.sort(function(a, b) {
return a.offset - b.offset;
});
d[a] = c.map(e, function(a) {
return a.element;
});
return d[a] = c.unique(d[a]);
});
return d;
},
above: function(a) {
if (null == a) a = d;
return m._filter(a, "vertical", function(a, b) {
return b.offset <= a.oldScroll.y;
});
},
below: function(a) {
if (null == a) a = d;
return m._filter(a, "vertical", function(a, b) {
return b.offset > a.oldScroll.y;
});
},
left: function(a) {
if (null == a) a = d;
return m._filter(a, "horizontal", function(a, b) {
return b.offset <= a.oldScroll.x;
});
},
right: function(a) {
if (null == a) a = d;
return m._filter(a, "horizontal", function(a, b) {
return b.offset > a.oldScroll.x;
});
},
enable: function() {
return m._invoke("enable");
},
disable: function() {
return m._invoke("disable");
},
destroy: function() {
return m._invoke("destroy");
},
extendFn: function(a, b) {
return n[a] = b;
},
_invoke: function(a) {
var b;
b = c.extend({}, h.vertical, h.horizontal);
return c.each(b, function(b, c) {
c[a]();
return true;
});
},
_filter: function(a, b, d) {
var e, f;
e = k[c(a)[0][j]];
if (!e) return [];
f = [];
c.each(e.waypoints[b], function(a, b) {
if (d(e, b)) return f.push(b);
});
f.sort(function(a, b) {
return a.offset - b.offset;
});
return c.map(f, function(a) {
return a.element;
});
}
};
c[t] = function() {
var a, c;
c = arguments[0], a = 2 <= arguments.length ? b.call(arguments, 1) : [];
if (m[c]) return m[c].apply(null, a); else return m.aggregate.call(null, c);
};
c[t].settings = {
resizeThrottle: 100,
scrollThrottle: 30
};
return e.on("load.waypoints", function() {
return c[t]("refresh");
});
});
}).call(this);
!function(a) {
a.extend(a.fn, {
validate: function(b) {
if (!this.length) {
b && b.debug && window.console && console.warn("nothing selected, can't validate, returning nothing");
return;
}
var c = a.data(this[0], "validator");
return c ? c : (this.attr("novalidate", "novalidate"), c = new a.validator(b, this[0]),
a.data(this[0], "validator", c), c.settings.onsubmit && (this.validateDelegate(":submit", "click", function(b) {
c.settings.submitHandler && (c.submitButton = b.target), a(b.target).hasClass("cancel") && (c.cancelSubmit = !0);
}), this.submit(function(b) {
function d() {
var d;
return c.settings.submitHandler ? (c.submitButton && (d = a("").attr("name", c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)),
c.settings.submitHandler.call(c, c.currentForm, b), c.submitButton && d.remove(),
!1) : !0;
}
return c.settings.debug && b.preventDefault(), c.cancelSubmit ? (c.cancelSubmit = !1,
d()) : c.form() ? c.pendingRequest ? (c.formSubmitted = !0, !1) : d() : (c.focusInvalid(),
!1);
})), c);
},
valid: function() {
if (a(this[0]).is("form")) return this.validate().form();
var b = !0, c = a(this[0].form).validate();
return this.each(function() {
b &= c.element(this);
}), b;
},
removeAttrs: function(b) {
var c = {}, d = this;
return a.each(b.split(/\s/), function(a, b) {
c[b] = d.attr(b), d.removeAttr(b);
}), c;
},
rules: function(b, c) {
var d = this[0];
if (b) {
var e = a.data(d.form, "validator").settings, f = e.rules, g = a.validator.staticRules(d);
switch (b) {
case "add":
a.extend(g, a.validator.normalizeRule(c)), f[d.name] = g, c.messages && (e.messages[d.name] = a.extend(e.messages[d.name], c.messages));
break;
case "remove":
if (!c) return delete f[d.name], g;
var h = {};
return a.each(c.split(/\s/), function(a, b) {
h[b] = g[b], delete g[b];
}), h;
}
}
var i = a.validator.normalizeRules(a.extend({}, a.validator.metadataRules(d), a.validator.classRules(d), a.validator.attributeRules(d), a.validator.staticRules(d)), d);
if (i.required) {
var j = i.required;
delete i.required, i = a.extend({
required: j
}, i);
}
return i;
}
}), a.extend(a.expr[":"], {
blank: function(b) {
return !a.trim("" + b.value);
},
filled: function(b) {
return !!a.trim("" + b.value);
},
unchecked: function(a) {
return !a.checked;
}
}), a.validator = function(b, c) {
this.settings = a.extend(!0, {}, a.validator.defaults, b), this.currentForm = c,
this.init();
}, a.validator.format = function(b, c) {
return 1 === arguments.length ? function() {
var c = a.makeArray(arguments);
return c.unshift(b), a.validator.format.apply(this, c);
} : (arguments.length > 2 && c.constructor !== Array && (c = a.makeArray(arguments).slice(1)),
c.constructor !== Array && (c = [ c ]), a.each(c, function(a, c) {
b = b.replace(new RegExp("\\{" + a + "\\}", "g"), c);
}), b);
}, a.extend(a.validator, {
defaults: {
messages: {},
groups: {},
rules: {},
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusInvalid: !0,
errorContainer: a([]),
errorLabelContainer: a([]),
onsubmit: !0,
ignore: ":hidden",
ignoreTitle: !1,
onfocusin: function(a, b) {
this.lastActive = a, this.settings.focusCleanup && !this.blockFocusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass, this.settings.validClass),
this.addWrapper(this.errorsFor(a)).hide());
},
onfocusout: function(a, b) {
!this.checkable(a) && (a.name in this.submitted || !this.optional(a)) && this.element(a);
},
onkeyup: function(a, b) {
if (9 === b.which && "" === this.elementValue(a)) return;
(a.name in this.submitted || a === this.lastActive) && this.element(a);
},
onclick: function(a, b) {
a.name in this.submitted ? this.element(a) : a.parentNode.name in this.submitted && this.element(a.parentNode);
},
highlight: function(b, c, d) {
"radio" === b.type ? this.findByName(b.name).addClass(c).removeClass(d) : a(b).addClass(c).removeClass(d);
},
unhighlight: function(b, c, d) {
"radio" === b.type ? this.findByName(b.name).removeClass(c).addClass(d) : a(b).removeClass(c).addClass(d);
}
},
setDefaults: function(b) {
a.extend(a.validator.defaults, b);
},
messages: {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: a.validator.format("Please enter no more than {0} characters."),
minlength: a.validator.format("Please enter at least {0} characters."),
rangelength: a.validator.format("Please enter a value between {0} and {1} characters long."),
range: a.validator.format("Please enter a value between {0} and {1}."),
max: a.validator.format("Please enter a value less than or equal to {0}."),
min: a.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: !1,
prototype: {
init: function() {
function b(b) {
var c = a.data(this[0].form, "validator"), d = "on" + b.type.replace(/^validate/, "");
c.settings[d] && c.settings[d].call(c, this[0], b);
}
this.labelContainer = a(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || a(this.currentForm),
this.containers = a(this.settings.errorContainer).add(this.settings.errorLabelContainer),
this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {},
this.invalid = {}, this.reset();
var c = this.groups = {};
a.each(this.settings.groups, function(b, d) {
a.each(d.split(/\s/), function(a, d) {
c[d] = b;
});
});
var d = this.settings.rules;
a.each(d, function(b, c) {
d[b] = a.validator.normalizeRule(c);
}), a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ", "focusin focusout keyup", b).validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", b),
this.settings.invalidHandler && a(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
},
form: function() {
return this.checkForm(), a.extend(this.submitted, this.errorMap), this.invalid = a.extend({}, this.errorMap),
this.valid() || a(this.currentForm).triggerHandler("invalid-form", [ this ]), this.showErrors(),
this.valid();
},
checkForm: function() {
this.prepareForm();
for (var a = 0, b = this.currentElements = this.elements(); b[a]; a++) this.check(b[a]);
return this.valid();
},
element: function(b) {
b = this.validationTargetFor(this.clean(b)), this.lastElement = b, this.prepareElement(b),
this.currentElements = a(b);
var c = this.check(b) !== !1;
return c ? delete this.invalid[b.name] : this.invalid[b.name] = !0, this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)),
this.showErrors(), c;
},
showErrors: function(b) {
if (b) {
a.extend(this.errorMap, b), this.errorList = [];
for (var c in b) this.errorList.push({
message: b[c],
element: this.findByName(c)[0]
});
this.successList = a.grep(this.successList, function(a) {
return !(a.name in b);
});
}
this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors();
},
resetForm: function() {
a.fn.resetForm && a(this.currentForm).resetForm(), this.submitted = {}, this.lastElement = null,
this.prepareForm(), this.hideErrors(), this.elements().removeClass(this.settings.errorClass).removeData("previousValue");
},
numberOfInvalids: function() {
return this.objectLength(this.invalid);
},
objectLength: function(a) {
var b = 0;
for (var c in a) b++;
return b;
},
hideErrors: function() {
this.addWrapper(this.toHide).hide();
},
valid: function() {
return 0 === this.size();
},
size: function() {
return this.errorList.length;
},
focusInvalid: function() {
if (this.settings.focusInvalid) try {
a(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin");
} catch (b) {}
},
findLastActive: function() {
var b = this.lastActive;
return b && 1 === a.grep(this.errorList, function(a) {
return a.element.name === b.name;
}).length && b;
},
elements: function() {
var b = this, c = {};
return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function() {
return !this.name && b.settings.debug && window.console && console.error("%o has no name assigned", this),
this.name in c || !b.objectLength(a(this).rules()) ? !1 : (c[this.name] = !0, !0);
});
},
clean: function(b) {
return a(b)[0];
},
errors: function() {
var b = this.settings.errorClass.replace(" ", ".");
return a(this.settings.errorElement + "." + b, this.errorContext);
},
reset: function() {
this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = a([]),
this.toHide = a([]), this.currentElements = a([]);
},
prepareForm: function() {
this.reset(), this.toHide = this.errors().add(this.containers);
},
prepareElement: function(a) {
this.reset(), this.toHide = this.errorsFor(a);
},
elementValue: function(b) {
var c = a(b).attr("type"), d = a(b).val();
return "radio" === c || "checkbox" === c ? a('input[name="' + a(b).attr("name") + '"]:checked').val() : "string" == typeof d ? d.replace(/\r/g, "") : d;
},
check: function(b) {
b = this.validationTargetFor(this.clean(b));
var c = a(b).rules(), d = !1, e = this.elementValue(b), f;
for (var g in c) {
var h = {
method: g,
parameters: c[g]
};
try {
f = a.validator.methods[g].call(this, e, b, h.parameters);
if ("dependency-mismatch" === f) {
d = !0;
continue;
}
d = !1;
if ("pending" === f) {
this.toHide = this.toHide.not(this.errorsFor(b));
return;
}
if (!f) return this.formatAndAdd(b, h), !1;
} catch (i) {
throw this.settings.debug && window.console && console.log("exception occured when checking element " + b.id + ", check the '" + h.method + "' method", i),
i;
}
}
if (d) return;
return this.objectLength(c) && this.successList.push(b), !0;
},
customMetaMessage: function(b, c) {
if (!a.metadata) return;
var d = this.settings.meta ? a(b).metadata()[this.settings.meta] : a(b).metadata();
return d && d.messages && d.messages[c];
},
customDataMessage: function(b, c) {
return a(b).data("msg-" + c.toLowerCase()) || b.attributes && a(b).attr("data-msg-" + c.toLowerCase());
},
customMessage: function(a, b) {
var c = this.settings.messages[a];
return c && (c.constructor === String ? c : c[b]);
},
findDefined: function() {
for (var a = 0; a < arguments.length; a++) if (void 0 !== arguments[a]) return arguments[a];
return void 0;
},
defaultMessage: function(b, c) {
return this.findDefined(this.customMessage(b.name, c), this.customDataMessage(b, c), this.customMetaMessage(b, c), !this.settings.ignoreTitle && b.title || void 0, a.validator.messages[c], "Warning: No message defined for " + b.name + "");
},
formatAndAdd: function(b, c) {
var d = this.defaultMessage(b, c.method), e = /\$?\{(\d+)\}/g;
"function" == typeof d ? d = d.call(this, c.parameters, b) : e.test(d) && (d = a.validator.format(d.replace(e, "{$1}"), c.parameters)),
this.errorList.push({
message: d,
element: b
}), this.errorMap[b.name] = d, this.submitted[b.name] = d;
},
addWrapper: function(a) {
return this.settings.wrapper && (a = a.add(a.parent(this.settings.wrapper))), a;
},
defaultShowErrors: function() {
var a, b;
for (a = 0; this.errorList[a]; a++) {
var c = this.errorList[a];
this.settings.highlight && this.settings.highlight.call(this, c.element, this.settings.errorClass, this.settings.validClass),
this.showLabel(c.element, c.message);
}
this.errorList.length && (this.toShow = this.toShow.add(this.containers));
if (this.settings.success) for (a = 0; this.successList[a]; a++) this.showLabel(this.successList[a]);
if (this.settings.unhighlight) for (a = 0, b = this.validElements(); b[a]; a++) this.settings.unhighlight.call(this, b[a], this.settings.errorClass, this.settings.validClass);
this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show();
},
validElements: function() {
return this.currentElements.not(this.invalidElements());
},
invalidElements: function() {
return a(this.errorList).map(function() {
return this.element;
});
},
showLabel: function(b, c) {
var d = this.errorsFor(b);
d.length ? (d.removeClass(this.settings.validClass).addClass(this.settings.errorClass),
d.attr("generated") && d.html(c)) : (d = a("<" + this.settings.errorElement + "/>").attr({
"for": this.idOrName(b),
generated: !0
}).addClass(this.settings.errorClass).html(c || ""), this.settings.wrapper && (d = d.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()),
this.labelContainer.append(d).length || (this.settings.errorPlacement ? this.settings.errorPlacement(d, a(b)) : d.insertAfter(b))),
!c && this.settings.success && (d.text(""), "string" == typeof this.settings.success ? d.addClass(this.settings.success) : this.settings.success(d, b)),
this.toShow = this.toShow.add(d);
},
errorsFor: function(b) {
var c = this.idOrName(b);
return this.errors().filter(function() {
return a(this).attr("for") === c;
});
},
idOrName: function(a) {
return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name);
},
validationTargetFor: function(a) {
return this.checkable(a) && (a = this.findByName(a.name).not(this.settings.ignore)[0]),
a;
},
checkable: function(a) {
return /radio|checkbox/i.test(a.type);
},
findByName: function(b) {
return a(this.currentForm).find('[name="' + b + '"]');
},
getLength: function(b, c) {
switch (c.nodeName.toLowerCase()) {
case "select":
return a("option:selected", c).length;
case "input":
if (this.checkable(c)) return this.findByName(c.name).filter(":checked").length;
}
return b.length;
},
depend: function(a, b) {
return this.dependTypes[typeof a] ? this.dependTypes[typeof a](a, b) : !0;
},
dependTypes: {
"boolean": function(a, b) {
return a;
},
string: function(b, c) {
return !!a(b, c.form).length;
},
"function": function(a, b) {
return a(b);
}
},
optional: function(b) {
var c = this.elementValue(b);
return !a.validator.methods.required.call(this, c, b) && "dependency-mismatch";
},
startRequest: function(a) {
this.pending[a.name] || (this.pendingRequest++, this.pending[a.name] = !0);
},
stopRequest: function(b, c) {
this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[b.name],
c && 0 === this.pendingRequest && this.formSubmitted && this.form() ? (a(this.currentForm).submit(),
this.formSubmitted = !1) : !c && 0 === this.pendingRequest && this.formSubmitted && (a(this.currentForm).triggerHandler("invalid-form", [ this ]),
this.formSubmitted = !1);
},
previousValue: function(b) {
return a.data(b, "previousValue") || a.data(b, "previousValue", {
old: null,
valid: !0,
message: this.defaultMessage(b, "remote")
});
}
},
classRuleSettings: {
required: {
required: !0
},
email: {
email: !0
},
url: {
url: !0
},
date: {
date: !0
},
dateISO: {
dateISO: !0
},
number: {
number: !0
},
digits: {
digits: !0
},
creditcard: {
creditcard: !0
}
},
addClassRules: function(b, c) {
b.constructor === String ? this.classRuleSettings[b] = c : a.extend(this.classRuleSettings, b);
},
classRules: function(b) {
var c = {}, d = a(b).attr("class");
return d && a.each(d.split(" "), function() {
this in a.validator.classRuleSettings && a.extend(c, a.validator.classRuleSettings[this]);
}), c;
},
attributeRules: function(b) {
var c = {}, d = a(b);
for (var e in a.validator.methods) {
var f;
"required" === e ? (f = d.get(0).getAttribute(e), "" === f && (f = !0), f = !!f) : f = d.attr(e),
f ? c[e] = f : d[0].getAttribute("type") === e && (c[e] = !0);
}
return c.maxlength && /-1|2147483647|524288/.test(c.maxlength) && delete c.maxlength,
c;
},
metadataRules: function(b) {
if (!a.metadata) return {};
var c = a.data(b.form, "validator").settings.meta;
return c ? a(b).metadata()[c] : a(b).metadata();
},
staticRules: function(b) {
var c = {}, d = a.data(b.form, "validator");
return d.settings.rules && (c = a.validator.normalizeRule(d.settings.rules[b.name]) || {}),
c;
},
normalizeRules: function(b, c) {
return a.each(b, function(d, e) {
if (e === !1) {
delete b[d];
return;
}
if (e.param || e.depends) {
var f = !0;
switch (typeof e.depends) {
case "string":
f = !!a(e.depends, c.form).length;
break;
case "function":
f = e.depends.call(c, c);
}
f ? b[d] = void 0 !== e.param ? e.param : !0 : delete b[d];
}
}), a.each(b, function(d, e) {
b[d] = a.isFunction(e) ? e(c) : e;
}), a.each([ "minlength", "maxlength", "min", "max" ], function() {
b[this] && (b[this] = Number(b[this]));
}), a.each([ "rangelength", "range" ], function() {
b[this] && (b[this] = [ Number(b[this][0]), Number(b[this][1]) ]);
}), a.validator.autoCreateRanges && (b.min && b.max && (b.range = [ b.min, b.max ],
delete b.min, delete b.max), b.minlength && b.maxlength && (b.rangelength = [ b.minlength, b.maxlength ],
delete b.minlength, delete b.maxlength)), b.messages && delete b.messages, b;
},
normalizeRule: function(b) {
if ("string" == typeof b) {
var c = {};
a.each(b.split(/\s/), function() {
c[this] = !0;
}), b = c;
}
return b;
},
addMethod: function(b, c, d) {
a.validator.methods[b] = c, a.validator.messages[b] = void 0 !== d ? d : a.validator.messages[b],
c.length < 3 && a.validator.addClassRules(b, a.validator.normalizeRule(b));
},
methods: {
required: function(b, c, d) {
if (!this.depend(d, c)) return "dependency-mismatch";
if ("select" === c.nodeName.toLowerCase()) {
var e = a(c).val();
return e && e.length > 0;
}
return this.checkable(c) ? this.getLength(b, c) > 0 : a.trim(b).length > 0;
},
remote: function(b, c, d) {
if (this.optional(c)) return "dependency-mismatch";
var e = this.previousValue(c);
this.settings.messages[c.name] || (this.settings.messages[c.name] = {}), e.originalMessage = this.settings.messages[c.name].remote,
this.settings.messages[c.name].remote = e.message, d = "string" == typeof d && {
url: d
} || d;
if (this.pending[c.name]) return "pending";
if (e.old === b) return e.valid;
e.old = b;
var f = this;
this.startRequest(c);
var g = {};
return g[c.name] = b, a.ajax(a.extend(!0, {
url: d,
mode: "abort",
port: "validate" + c.name,
dataType: "json",
data: g,
success: function(d) {
f.settings.messages[c.name].remote = e.originalMessage;
var g = d === !0 || "true" === d;
if (g) {
var h = f.formSubmitted;
f.prepareElement(c), f.formSubmitted = h, f.successList.push(c), delete f.invalid[c.name],
f.showErrors();
} else {
var i = {}, j = d || f.defaultMessage(c, "remote");
i[c.name] = e.message = a.isFunction(j) ? j(b) : j, f.invalid[c.name] = !0, f.showErrors(i);
}
e.valid = g, f.stopRequest(c, g);
}
}, d)), "pending";
},
minlength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(a.trim(b), c);
return this.optional(c) || e >= d;
},
maxlength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(a.trim(b), c);
return this.optional(c) || e <= d;
},
rangelength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(a.trim(b), c);
return this.optional(c) || e >= d[0] && e <= d[1];
},
min: function(a, b, c) {
return this.optional(b) || a >= c;
},
max: function(a, b, c) {
return this.optional(b) || a <= c;
},
range: function(a, b, c) {
return this.optional(b) || a >= c[0] && a <= c[1];
},
email: function(a, b) {
return this.optional(b) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a);
},
url: function(a, b) {
return this.optional(b) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a);
},
date: function(a, b) {
return this.optional(b) || !/Invalid|NaN/.test(new Date(a));
},
dateISO: function(a, b) {
return this.optional(b) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(a);
},
number: function(a, b) {
return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a);
},
digits: function(a, b) {
return this.optional(b) || /^\d+$/.test(a);
},
creditcard: function(a, b) {
if (this.optional(b)) return "dependency-mismatch";
if (/[^0-9 \-]+/.test(a)) return !1;
var c = 0, d = 0, e = !1;
a = a.replace(/\D/g, "");
for (var f = a.length - 1; f >= 0; f--) {
var g = a.charAt(f);
d = parseInt(g, 10), e && (d *= 2) > 9 && (d -= 9), c += d, e = !e;
}
return c % 10 === 0;
},
equalTo: function(b, c, d) {
var e = a(d);
return this.settings.onfocusout && e.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
a(c).valid();
}), b === e.val();
}
}
}), a.format = a.validator.format;
}(jQuery), function(a) {
var b = {};
if (a.ajaxPrefilter) a.ajaxPrefilter(function(a, c, d) {
var e = a.port;
"abort" === a.mode && (b[e] && b[e].abort(), b[e] = d);
}); else {
var c = a.ajax;
a.ajax = function(d) {
var e = ("mode" in d ? d : a.ajaxSettings).mode, f = ("port" in d ? d : a.ajaxSettings).port;
return "abort" === e ? (b[f] && b[f].abort(), b[f] = c.apply(this, arguments)) : c.apply(this, arguments);
};
}
}(jQuery), function(a) {
!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener && a.each({
focus: "focusin",
blur: "focusout"
}, function(b, c) {
function d(b) {
return b = a.event.fix(b), b.type = c, a.event.handle.call(this, b);
}
a.event.special[c] = {
setup: function() {
this.addEventListener(b, d, !0);
},
teardown: function() {
this.removeEventListener(b, d, !0);
},
handler: function(b) {
var d = arguments;
return d[0] = a.event.fix(b), d[0].type = c, a.event.handle.apply(this, d);
}
};
}), a.extend(a.fn, {
validateDelegate: function(b, c, d) {
return this.bind(c, function(c) {
var e = a(c.target);
if (e.is(b)) return d.apply(e, arguments);
});
}
});
}(jQuery);
$(document).ready(function() {
$(".product-carousel#cs6 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs6 img").attr("src", a);
if(b[1] == undefined){b[1] =""}
$(".carousel-top-image#cs6 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs7 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs7 img").attr("src", a);
if(b[1] == undefined){b[1] =""}
$(".carousel-top-image#cs7 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs8 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs8 img").attr("src", a);
if(b[1] == undefined){b[1] =""}
$(".carousel-top-image#cs8 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs9 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs9 img").attr("src", a);
if(b[1] == undefined){b[1] =""}
$(".carousel-top-image#cs9 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#imp .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#imp img").attr("src", a);
$(".carousel-top-image#imp a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs1 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs1 img").attr("src", a);
$(".carousel-top-image#cs1 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs2 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs2 img").attr("src", a);
$(".carousel-top-image#cs2 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs3 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs3 img").attr("src", a);
$(".carousel-top-image#cs3 a").attr("href", b[0] + b[1]);
});
});
$(".product-carousel#cs4 .slide img").each(function() {
$(this).hover(function() {
var a = $(this).data("alt-src");
var b = a.split("_slide");
$(".carousel-top-image#cs4 img").attr("src", a);
$(".carousel-top-image#cs4 a").attr("href", b[0] + b[1]);
});
});
$(".trigger-fade-in").waypoint(function(a, b) {
$(this).addClass("in ready");
}, {
offset: function() {
return $.waypoints("viewportHeight") - $(this).outerHeight() / 4;
}
});
$(".transitions").each(function() {
$(".transition", this).each(function(a, b) {
$(this).addClass("t-" + (a + 1));
});
});
$(".background").each(function() {
var a = $(this).data("background");
color = $(this).data("color");
if (void 0 !== a) $(this).css("background-image", "url(" + a + ")");
if (void 0 !== color) $(this).css("background-color", color);
});
$(".toggle-button").click(function() {
$(this).toggleClass("open");
});
$("#sub-navigation").stick_in_parent({
offset_top: 176
});
$(".fancybox").fancybox();
$(".fancybox-noclickoff").fancybox({
helpers: {
overlay: {
closeClick: false
}
},
closeClick: false,
maxHeight: 600
});
$(".selectpicker").selectpicker();
if (!Modernizr.touch) $(".video-player").fancybox({
beforeShow: function() {
var a = $(this.element).data("width"), b = $(this.element).data("height");
if (a) this.width = a;
if (b) this.height = b;
}
}); else $(".video-player").each(function(a) {
var b = $(this).data("video");
$(this).attr("href", b);
});
$(".mobile-nav-trigger").click(function() {
$(".main-nav").css("height", "auto");
});
/* per inserire nuovo menu
var a = document.getElementById("mobile-nav"),
b = document.getElementById("showRight"),
c = document.body;
b.onclick = function() {
classie.toggle(this, "active");
$("body").toggleClass("push-to-left");
classie.toggle(a, "cbp-spmenu-open");
d("showRight");
};
function d(a) {
if ("showRight" !== a) classie.toggle(b, "disabled");
}
*/
$(".main-nav .has-children").click(function() {
classie.toggle(this, "open");
});
$(".dropdown").hover(function(){$(this).find(".dropdown-menu").first().stop(true,true).slideToggle(400)},function(){$(this).find(".dropdown-menu").first().stop(true,true).slideToggle(0)});$(".dropdown-click").click(function(){$(this).find(".dropdown-menu").first().stop(true,true).slideToggle(400)},function(){$(this).find(".dropdown-menu").first().stop(true,true).slideToggle(400)});
jQuery(".nav-search").click(function(a) {
a.stopPropagation();
});
eqHeights();
$(".spr-ir-pagination").removeClass(".spr-ir-pagination").find("ul").addClass("pagination").find(".current").removeClass("current").addClass("active");
$(".validate-form, .spr-ir-form").validate({
rules: {
first_name: {
required: true,
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
last_name: {
required: true,
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
email: {
required: true
},
comments: {
required: true,
minlength: 5
},
company: {
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
city: {
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
state: {
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
country: {
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
other: {
minlength: 2,
regex: /^[A-Za-z\s-]+$/
},
xss: {
regex: /^[A-Za-z\s-]+$/
}
}
});
$.validator.addMethod("regex", function(a, b, c) {
var d = false;
var e = new RegExp(c);
return this.optional(b) || e.test(a);
}, "No special Characters allowed here. Use only upper and lowercase letters (A through Z; a through z) and hyphens (-)");
if ($(".media-video-gallery").length) $.get("https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PLhuA58w83Z-HnoCAZsOBbOuLlyFr7XLb5&maxResults=50&key=AIzaSyBLWqTuQUMeV18Ol3ssI7CQBM8clqM1O1g").success(function(a) {
populateVideos(a);
}).fail(function() {
videoError();
});
if ($(".contact-pg").length) if (getQueryVariable("inquiry")) {
$(".contact-form select").val(getQueryVariable("inquiry"));
$(".contact-form select").trigger("change");
}
$(".filter-group .filter").click(function() {
$("html, body").animate({
scrollTop: $(".filter-bar").offset().top - $("header").outerHeight()
}, 400);
});
if ("undefined" != typeof map) $(window).resize(function() {
map.resize();
});
});
$(window).resize(function() {
eqHeights();
});
$(window).load(function() {
eqHeights();
});
function numberWithCommas(a) {
return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function populateQuoteBox(a) {
var b = $('.quote-box[data-symbol="' + a.symbol + '"]');
change = a.change.replace(/[+|\-]/g, "");
theDate = a.last_trade_time.substr(0, a.last_trade_time.indexOf(" "));
while ("0" === theDate.charAt(0)) theDate = theDate.substr(1);
var c = a.last_trade_time.substr(a.last_trade_time.indexOf(" ") + 1);
theHour = c.substr(0, c.indexOf(":"));
theHour = (+theHour + 11) % 12 + 1;
theMinute = c.substr(c.indexOf(":") + 1);
c = theHour + ":" + theMinute;
b.find(".date").html("");
b.find("time").attr("date-time", a.last_trade_time).html(theDate + " • " + c);
b.find(".price .value").html("$" + a.last);
b.find(".volume .value").html(numberWithCommas(a.volume));
if ("N/A" == a.market_cap) b.find(".market-cap").hide(); else b.find(".market-cap .value").html("$" + a.market_cap);
b.find(".change .value").html("$" + change);
if (a.change.indexOf("+") > -1) b.find(".change").addClass("up"); else if (a.change.indexOf("-") > -1) b.find(".change").addClass("down");
}
function eqHeights() {
if ($(window).width() >= 768) {
$(".same-height-row").each(function() {
var a = $(this).find(".height");
var b = 0;
a.css("min-height", "0");
a.each(function() {
b = $(this).outerHeight() > b ? $(this).outerHeight() : b;
});
a.css("min-height", b + "px");
});
var a = 0;
$(".same-height").each(function() {
$(this).css("min-height", "0");
a = $(this).outerHeight() > a ? $(this).outerHeight() : a;
}).css("min-height", a + "px");
$(".height.exact").each(function() {
$(this).css("height", $(this).css("min-height"));
});
} else $(".same-height, .height").css({
height: "auto",
"min-height": "0"
});
if ($(window).width() < 990) $(".right-sidebar").removeClass("height").removeAttr("style"); else $(".right-sidebar").addClass("height");
}
function populateVideos(a) {
if (void 0 !== a && a.items.length > 0) {
$.each(a.items, function(a) {
$(".media-video-gallery .row").append(b(this));
});
if ($(".media-video-gallery .module-media-item").length > 6) {
$(".media-video-gallery .module-media-item:gt(5)").wrapAll('');
$(".additional-videos").hide();
$(".media-video-gallery .row").after('
');
$(".additional-video-toggle").on("click", function() {
$(".additional-videos").slideToggle("slow");
$(".additional-video-toggle").toggleClass("down");
});
}
$(".media-video-gallery .module-media").fadeIn("slow");
eqHeights();
}
function b(a) {
var b = a.snippet.resourceId.videoId;
var c = "//youtube.com/embed/" + b;
var d = a.snippet.thumbnails.high.url;
var e = '
Remember to click at least one option of the Enclosure and Certificates fields before proceeding to submit your request!'})
$("#nav-links a[id=7]").removeAttr("href");
}
$("img.breadcrumbs[id=7]").on("mouseenter", function (e) {
var _this = this;
$(this).popover("show");
$('[data-toggle=popover]').not(this).popover('hide');
$(this).removeClass("hide");
$("button.btn-blue").popover("hide");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
$('[data-toggle=popover]').not(this).popover('hide');
});
})
$("img.breadcrumbs[id=6]").popover({ html: true, animation:false,content: 'Do you have specific needs for certificates and / or compliance to specific technical Standards? Check out the different available options and specify your requirements.
'})
$("img.breadcrumbs[id=6]").on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$('[data-toggle=popover]').not(this).popover('hide');
var $popover = $(this);
$popover.popover('show');
$("button.btn-blue").popover("hide");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
$('[data-toggle=popover]').not(this).popover('hide');
});
})
$("img.breadcrumbs[id=5]").popover({ html: true, animation:false,content: 'All our systems are available with different enclosures, according to the specific installation conditions. From open skids to fully-equipped containers, Biokomp can design and provide the right solution for your project.
'})
$("img.breadcrumbs[id=5]").on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$('[data-toggle=popover]').not(this).popover('hide');
$("button.btn-blue").popover("hide");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
$('[data-toggle=popover]').not(this).popover('hide');
});
})
$("img.breadcrumbs[id=4]").popover({ html: true, animation:false,content: 'Check out our wide range of devices such as flame arrestors, flow meters, shut off valves, piping, gas sensors and analyzers, vibration dampers, and pressure reducers to enhance your compression package with all required accessories.
'})
$("img.breadcrumbs[id=4]").on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$('[data-toggle=popover]').not(this).popover('hide');
$("button.btn-blue").popover("hide");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
$('[data-toggle=popover]').not(this).popover('hide');
});
})
$("img.breadcrumbs[id=3]").popover({ html: true, animation:false,content: 'Our post-compression treatment units include different filters, dryers and chillers with condensate drainers, and liquid-vapour separators to safely remove liquids, dirt, particles, and other impurities from the compressed gas.
'})
$("img.breadcrumbs[id=3]").on("mouseenter", function () {
var _this = this;
$('[data-toggle=popover]').not(this).popover('hide');
$(this).popover("show");
$("button.btn-blue").popover("hide");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
$('[data-toggle=popover]').not(this).popover('hide');
});
})
$("img.breadcrumbs[id=2]").popover({ html: true, animation:false,content: 'Biokomp’s family of compressors ranges from low-pressure (-0.5-1 bar) blowers to medium-pressure (0-25 bar) screw-compressors and high-pressure (0-500 bar) piston-groups.
'})
$("img.breadcrumbs[id=2]").on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$('[data-toggle=popover]').not(this).popover('hide');
$("button.btn-blue").popover("hide");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
$('[data-toggle=popover]').not(this).popover('hide');
});
})
var txt = 'Biokomp’s portfolio of low-pressure gas treatment solutions includes the equipment for purification and dehumidification of the inlet gas, in order to remove contaminants and impurities before compression.';
var noNewLines = txt.replace(/^\s*(\n)\s*$/, '');
$("img.breadcrumbs[id=1]").popover({ html: true, animation:false,content: noNewLines.trim() + '