Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Juicebox Pro 1.0.2
- *
- * Copyright (c) 2012 Juicebox. All rights reserved.
- * http://www.juicebox.net
- *
- * BY USING THIS SOFTWARE, YOU AGREE TO THE JUICEBOX TERMS OF USE
- * http://www.juicebox.net/terms
- *
- * Support and Documentation: http://www.juicebox.net/support
- *
- * Build Time: 05/10/2012 09:28:11 AM
- */
- var juicebox_lib = juicebox_lib ? juicebox_lib : {};
- (function (aq, ap) {
- var an = aq.document,
- bN = aq.navigator,
- bE = aq.location;
- var al = (function () {
- var bT = function (b4, b3) {
- return new bT.fn.init(b4, b3, E)
- },
- bX = aq.jQuery,
- H = aq.$,
- E, b1 = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
- bO = /\S/,
- J = /^\s+/,
- F = /\s+$/,
- I = /\d/,
- B = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
- bP = /^[\],:{}\s]*$/,
- bZ = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
- bR = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
- K = /(?:^|:|,)(?:\s*\[)+/g,
- z = /(webkit)[ \/]([\w.]+)/,
- bU = /(opera)(?:.*version)?[ \/]([\w.]+)/,
- bS = /(msie) ([\w.]+)/,
- bV = /(mozilla)(?:.*? rv:([\w.]+))?/,
- C = /-([a-z]|[0-9])/ig,
- b2 = /^-ms-/,
- bW = function (b4, b3) {
- return (b3 + "").toUpperCase()
- },
- b0 = bN.userAgent,
- bY, D, e, M = Object.prototype.toString,
- G = Object.prototype.hasOwnProperty,
- A = Array.prototype.push,
- L = Array.prototype.slice,
- bQ = String.prototype.trim,
- w = Array.prototype.indexOf,
- y = {};
- bT.fn = bT.prototype = {
- constructor: bT,
- init: function (b4, b3, b9) {
- var b8, b6, b5, b7;
- if (!b4) {
- return this
- }
- if (b4.nodeType) {
- this.context = this[0] = b4;
- this.length = 1;
- return this
- }
- if (b4 === "body" && !b3 && an.body) {
- this.context = an;
- this[0] = an.body;
- this.selector = b4;
- this.length = 1;
- return this
- }
- if (typeof b4 === "string") {
- if (b4.charAt(0) === "<" && b4.charAt(b4.length - 1) === ">" && b4.length >= 3) {
- b8 = [null, b4, null]
- } else {
- b8 = b1.exec(b4)
- } if (b8 && (b8[1] || !b3)) {
- if (b8[1]) {
- b3 = b3 instanceof bT ? b3[0] : b3;
- b7 = (b3 ? b3.ownerDocument || b3 : an);
- b5 = B.exec(b4);
- if (b5) {
- if (bT.isPlainObject(b3)) {
- b4 = [an.createElement(b5[1])];
- bT.fn.attr.call(b4, b3, true)
- } else {
- b4 = [b7.createElement(b5[1])]
- }
- } else {
- b5 = bT.buildFragment([b8[1]], [b7]);
- b4 = (b5.cacheable ? bT.clone(b5.fragment) : b5.fragment).childNodes
- }
- return bT.merge(this, b4)
- } else {
- b6 = an.getElementById(b8[2]);
- if (b6 && b6.parentNode) {
- if (b6.id !== b8[2]) {
- return b9.find(b4)
- }
- this.length = 1;
- this[0] = b6
- }
- this.context = an;
- this.selector = b4;
- return this
- }
- } else {
- if (!b3 || b3.jquery) {
- return (b3 || b9).find(b4)
- } else {
- return this.constructor(b3).find(b4)
- }
- }
- } else {
- if (bT.isFunction(b4)) {
- return b9.ready(b4)
- }
- } if (b4.selector !== ap) {
- this.selector = b4.selector;
- this.context = b4.context
- }
- return bT.makeArray(b4, this)
- },
- selector: "",
- jquery: "1.7",
- length: 0,
- size: function () {
- return this.length
- },
- toArray: function () {
- return L.call(this, 0)
- },
- get: function (b3) {
- return b3 == null ? this.toArray() : (b3 < 0 ? this[this.length + b3] : this[b3])
- },
- pushStack: function (b4, b3, b6) {
- var b5 = this.constructor();
- if (bT.isArray(b4)) {
- A.apply(b5, b4)
- } else {
- bT.merge(b5, b4)
- }
- b5.prevObject = this;
- b5.context = this.context;
- if (b3 === "find") {
- b5.selector = this.selector + (this.selector ? " " : "") + b6
- } else {
- if (b3) {
- b5.selector = this.selector + "." + b3 + "(" + b6 + ")"
- }
- }
- return b5
- },
- each: function (b4, b3) {
- return bT.each(this, b4, b3)
- },
- ready: function (b3) {
- bT.bindReady();
- D.add(b3);
- return this
- },
- eq: function (b3) {
- return b3 === -1 ? this.slice(b3) : this.slice(b3, +b3 + 1)
- },
- first: function () {
- return this.eq(0)
- },
- last: function () {
- return this.eq(-1)
- },
- slice: function () {
- return this.pushStack(L.apply(this, arguments), "slice", L.call(arguments).join(","))
- },
- map: function (b3) {
- return this.pushStack(bT.map(this, function (b4, b5) {
- return b3.call(b4, b5, b4)
- }))
- },
- end: function () {
- return this.prevObject || this.constructor(null)
- },
- push: A,
- sort: [].sort,
- splice: [].splice
- };
- bT.fn.init.prototype = bT.fn;
- bT.extend = bT.fn.extend = function () {
- var cb, b5, b3, b4, b9, ca, b8 = arguments[0] || {},
- b7 = 1,
- b6 = arguments.length,
- cc = false;
- if (typeof b8 === "boolean") {
- cc = b8;
- b8 = arguments[1] || {};
- b7 = 2
- }
- if (typeof b8 !== "object" && !bT.isFunction(b8)) {
- b8 = {}
- }
- if (b6 === b7) {
- b8 = this;
- --b7
- }
- for (; b7 < b6; b7++) {
- if ((cb = arguments[b7]) != null) {
- for (b5 in cb) {
- b3 = b8[b5];
- b4 = cb[b5];
- if (b8 === b4) {
- continue
- }
- if (cc && b4 && (bT.isPlainObject(b4) || (b9 = bT.isArray(b4)))) {
- if (b9) {
- b9 = false;
- ca = b3 && bT.isArray(b3) ? b3 : []
- } else {
- ca = b3 && bT.isPlainObject(b3) ? b3 : {}
- }
- b8[b5] = bT.extend(cc, ca, b4)
- } else {
- if (b4 !== ap) {
- b8[b5] = b4
- }
- }
- }
- }
- }
- return b8
- };
- bT.extend({
- noConflict: function (b3) {
- if (aq.$ === bT) {
- aq.$ = H
- }
- if (b3 && aq.jQuery === bT) {
- aq.jQuery = bX
- }
- return bT
- },
- isReady: false,
- readyWait: 1,
- holdReady: function (b3) {
- if (b3) {
- bT.readyWait++
- } else {
- bT.ready(true)
- }
- },
- ready: function (b3) {
- if ((b3 === true && !--bT.readyWait) || (b3 !== true && !bT.isReady)) {
- if (!an.body) {
- return setTimeout(bT.ready, 1)
- }
- bT.isReady = true;
- if (b3 !== true && --bT.readyWait > 0) {
- return
- }
- D.fireWith(an, [bT]);
- if (bT.fn.trigger) {
- bT(an).trigger("ready").unbind("ready")
- }
- }
- },
- bindReady: function () {
- if (D) {
- return
- }
- D = bT.Callbacks("once memory");
- if (an.readyState === "complete") {
- return setTimeout(bT.ready, 1)
- }
- if (an.addEventListener) {
- an.addEventListener("DOMContentLoaded", e, false);
- aq.addEventListener("load", bT.ready, false)
- } else {
- if (an.attachEvent) {
- an.attachEvent("onreadystatechange", e);
- aq.attachEvent("onload", bT.ready);
- var b3 = false;
- try {
- b3 = aq.frameElement == null
- } catch (b4) {}
- if (an.documentElement.doScroll && b3) {
- x()
- }
- }
- }
- },
- isFunction: function (b3) {
- return bT.type(b3) === "function"
- },
- isArray: Array.isArray || function (b3) {
- return bT.type(b3) === "array"
- },
- isWindow: function (b3) {
- return b3 && typeof b3 === "object" && "setInterval" in b3
- },
- isNumeric: function (b3) {
- return b3 != null && I.test(b3) && !isNaN(b3)
- },
- type: function (b3) {
- return b3 == null ? String(b3) : y[M.call(b3)] || "object"
- },
- isPlainObject: function (b4) {
- if (!b4 || bT.type(b4) !== "object" || b4.nodeType || bT.isWindow(b4)) {
- return false
- }
- try {
- if (b4.constructor && !G.call(b4, "constructor") && !G.call(b4.constructor.prototype, "isPrototypeOf")) {
- return false
- }
- } catch (b5) {
- return false
- }
- var b3;
- for (b3 in b4) {}
- return b3 === ap || G.call(b4, b3)
- },
- isEmptyObject: function (b4) {
- for (var b3 in b4) {
- return false
- }
- return true
- },
- error: function (b3) {
- throw b3
- },
- parseJSON: function (b3) {
- if (typeof b3 !== "string" || !b3) {
- return null
- }
- b3 = bT.trim(b3);
- if (aq.JSON && aq.JSON.parse) {
- return aq.JSON.parse(b3)
- }
- if (bP.test(b3.replace(bZ, "@").replace(bR, "]").replace(K, ""))) {
- return (new Function("return " + b3))()
- }
- bT.error("Invalid JSON: " + b3)
- },
- parseXML: function (b4) {
- var b3, b5;
- try {
- if (aq.DOMParser) {
- b5 = new DOMParser();
- b3 = b5.parseFromString(b4, "text/xml")
- } else {
- b3 = new ActiveXObject("Microsoft.XMLDOM");
- b3.async = "false";
- b3.loadXML(b4)
- }
- } catch (b6) {
- b3 = ap
- }
- if (!b3 || !b3.documentElement || b3.getElementsByTagName("parsererror").length) {
- bT.error("Invalid XML: " + b4)
- }
- return b3
- },
- noop: function () {},
- globalEval: function (b3) {
- if (b3 && bO.test(b3)) {
- (aq.execScript || function (b4) {
- aq["eval"].call(aq, b4)
- })(b3)
- }
- },
- camelCase: function (b3) {
- return b3.replace(b2, "ms-").replace(C, bW)
- },
- nodeName: function (b4, b3) {
- return b4.nodeName && b4.nodeName.toUpperCase() === b3.toUpperCase()
- },
- each: function (b4, b3, b9) {
- var b8, b6 = 0,
- b7 = b4.length,
- b5 = b7 === ap || bT.isFunction(b4);
- if (b9) {
- if (b5) {
- for (b8 in b4) {
- if (b3.apply(b4[b8], b9) === false) {
- break
- }
- }
- } else {
- for (; b6 < b7;) {
- if (b3.apply(b4[b6++], b9) === false) {
- break
- }
- }
- }
- } else {
- if (b5) {
- for (b8 in b4) {
- if (b3.call(b4[b8], b8, b4[b8]) === false) {
- break
- }
- }
- } else {
- for (; b6 < b7;) {
- if (b3.call(b4[b6], b6, b4[b6++]) === false) {
- break
- }
- }
- }
- }
- return b4
- },
- trim: bQ ? function (b3) {
- return b3 == null ? "" : bQ.call(b3)
- } : function (b3) {
- return b3 == null ? "" : b3.toString().replace(J, "").replace(F, "")
- },
- makeArray: function (b4, b3) {
- var b6 = b3 || [];
- if (b4 != null) {
- var b5 = bT.type(b4);
- if (b4.length == null || b5 === "string" || b5 === "function" || b5 === "regexp" || bT.isWindow(b4)) {
- A.call(b6, b4)
- } else {
- bT.merge(b6, b4)
- }
- }
- return b6
- },
- inArray: function (b4, b3, b5) {
- var b6;
- if (b3) {
- if (w) {
- return w.call(b3, b4, b5)
- }
- b6 = b3.length;
- b5 = b5 ? b5 < 0 ? Math.max(0, b6 + b5) : b5 : 0;
- for (; b5 < b6; b5++) {
- if (b5 in b3 && b3[b5] === b4) {
- return b5
- }
- }
- }
- return -1
- },
- merge: function (b5, b3) {
- var b7 = b5.length,
- b6 = 0;
- if (typeof b3.length === "number") {
- for (var b4 = b3.length; b6 < b4; b6++) {
- b5[b7++] = b3[b6]
- }
- } else {
- while (b3[b6] !== ap) {
- b5[b7++] = b3[b6++]
- }
- }
- b5.length = b7;
- return b5
- },
- grep: function (b4, b3, b9) {
- var b8 = [],
- b7;
- b9 = !!b9;
- for (var b5 = 0, b6 = b4.length; b5 < b6; b5++) {
- b7 = !!b3(b4[b5], b5);
- if (b9 !== b7) {
- b8.push(b4[b5])
- }
- }
- return b8
- },
- map: function (ca, b9, b8) {
- var b7, cb, b6 = [],
- b4 = 0,
- b3 = ca.length,
- b5 = ca instanceof bT || b3 !== ap && typeof b3 === "number" && ((b3 > 0 && ca[0] && ca[b3 - 1]) || b3 === 0 || bT.isArray(ca));
- if (b5) {
- for (; b4 < b3; b4++) {
- b7 = b9(ca[b4], b4, b8);
- if (b7 != null) {
- b6[b6.length] = b7
- }
- }
- } else {
- for (cb in ca) {
- b7 = b9(ca[cb], cb, b8);
- if (b7 != null) {
- b6[b6.length] = b7
- }
- }
- }
- return b6.concat.apply([], b6)
- },
- guid: 1,
- proxy: function (b4, b3) {
- if (typeof b3 === "string") {
- var b7 = b4[b3];
- b3 = b4;
- b4 = b7
- }
- if (!bT.isFunction(b4)) {
- return ap
- }
- var b6 = L.call(arguments, 2),
- b5 = function () {
- return b4.apply(b3, b6.concat(L.call(arguments)))
- };
- b5.guid = b4.guid = b4.guid || b5.guid || bT.guid++;
- return b5
- },
- access: function (cb, ca, b9, b8, b7, b6) {
- var b5 = cb.length;
- if (typeof ca === "object") {
- for (var b3 in ca) {
- bT.access(cb, b3, ca[b3], b8, b7, b9)
- }
- return cb
- }
- if (b9 !== ap) {
- b8 = !b6 && b8 && bT.isFunction(b9);
- for (var b4 = 0; b4 < b5; b4++) {
- b7(cb[b4], ca, b8 ? b9.call(cb[b4], b4, b7(cb[b4], ca)) : b9, b6)
- }
- return cb
- }
- return b5 ? b7(cb[0], ca) : ap
- },
- now: function () {
- return (new Date()).getTime()
- },
- uaMatch: function (b4) {
- b4 = b4.toLowerCase();
- var b3 = z.exec(b4) || bU.exec(b4) || bS.exec(b4) || b4.indexOf("compatible") < 0 && bV.exec(b4) || [];
- return {
- browser: b3[1] || "",
- version: b3[2] || "0"
- }
- },
- sub: function () {
- function b3(b7, b6) {
- return new b3.fn.init(b7, b6)
- }
- bT.extend(true, b3, this);
- b3.superclass = this;
- b3.fn = b3.prototype = this();
- b3.fn.constructor = b3;
- b3.sub = this.sub;
- b3.fn.init = function b4(b7, b6) {
- if (b6 && b6 instanceof bT && !(b6 instanceof b3)) {
- b6 = b3(b6)
- }
- return bT.fn.init.call(this, b7, b6, b5)
- };
- b3.fn.init.prototype = b3.fn;
- var b5 = b3(an);
- return b3
- },
- browser: {}
- });
- bT.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (b4, b3) {
- y["[object " + b3 + "]"] = b3.toLowerCase()
- });
- bY = bT.uaMatch(b0);
- if (bY.browser) {
- bT.browser[bY.browser] = true;
- bT.browser.version = bY.version
- }
- if (bT.browser.webkit) {
- bT.browser.safari = true
- }
- if (bO.test("\xA0")) {
- J = /^[\s\xA0]+/;
- F = /[\s\xA0]+$/
- }
- E = bT(an);
- if (an.addEventListener) {
- e = function () {
- an.removeEventListener("DOMContentLoaded", e, false);
- bT.ready()
- }
- } else {
- if (an.attachEvent) {
- e = function () {
- if (an.readyState === "complete") {
- an.detachEvent("onreadystatechange", e);
- bT.ready()
- }
- }
- }
- }
- function x() {
- if (bT.isReady) {
- return
- }
- try {
- an.documentElement.doScroll("left")
- } catch (b3) {
- setTimeout(x, 1);
- return
- }
- bT.ready()
- }
- if (typeof define === "function" && define.amd && define.amd.jQuery) {
- define("jquery", [], function () {
- return bT
- })
- }
- return bT
- })();
- var bc = {};
- function ai(w) {
- var e = bc[w] = {},
- x, y;
- w = w.split(/\s+/);
- for (x = 0, y = w.length; x < y; x++) {
- e[w[x]] = true
- }
- return e
- }
- al.Callbacks = function (C) {
- C = C ? (bc[C] || ai(C)) : {};
- var B = [],
- D = [],
- x, y, w, z, A, F = function (G) {
- var H, K, J, I, L;
- for (H = 0, K = G.length; H < K; H++) {
- J = G[H];
- I = al.type(J);
- if (I === "array") {
- F(J)
- } else {
- if (I === "function") {
- if (!C.unique || !E.has(J)) {
- B.push(J)
- }
- }
- }
- }
- },
- e = function (H, G) {
- G = G || [];
- x = !C.memory || [H, G];
- y = true;
- A = w || 0;
- w = 0;
- z = B.length;
- for (; B && A < z; A++) {
- if (B[A].apply(H, G) === false && C.stopOnFalse) {
- x = true;
- break
- }
- }
- y = false;
- if (B) {
- if (!C.once) {
- if (D && D.length) {
- x = D.shift();
- E.fireWith(x[0], x[1])
- }
- } else {
- if (x === true) {
- E.disable()
- } else {
- B = []
- }
- }
- }
- },
- E = {
- add: function () {
- if (B) {
- var G = B.length;
- F(arguments);
- if (y) {
- z = B.length
- } else {
- if (x && x !== true) {
- w = G;
- e(x[0], x[1])
- }
- }
- }
- return this
- },
- remove: function () {
- if (B) {
- var G = arguments,
- I = 0,
- J = G.length;
- for (; I < J; I++) {
- for (var H = 0; H < B.length; H++) {
- if (G[I] === B[H]) {
- if (y) {
- if (H <= z) {
- z--;
- if (H <= A) {
- A--
- }
- }
- }
- B.splice(H--, 1);
- if (C.unique) {
- break
- }
- }
- }
- }
- }
- return this
- },
- has: function (G) {
- if (B) {
- var H = 0,
- I = B.length;
- for (; H < I; H++) {
- if (G === B[H]) {
- return true
- }
- }
- }
- return false
- },
- empty: function () {
- B = [];
- return this
- },
- disable: function () {
- B = D = x = ap;
- return this
- },
- disabled: function () {
- return !B
- },
- lock: function () {
- D = ap;
- if (!x || x === true) {
- E.disable()
- }
- return this
- },
- locked: function () {
- return !D
- },
- fireWith: function (H, G) {
- if (D) {
- if (y) {
- if (!C.once) {
- D.push([H, G])
- }
- } else {
- if (!(C.once && x)) {
- e(H, G)
- }
- }
- }
- return this
- },
- fire: function () {
- E.fireWith(this, arguments);
- return this
- },
- fired: function () {
- return !!x
- }
- };
- return E
- };
- var bb = [].slice;
- al.extend({
- Deferred: function (z) {
- var y = al.Callbacks("once memory"),
- x = al.Callbacks("once memory"),
- w = al.Callbacks("memory"),
- e = "pending",
- B = {
- resolve: y,
- reject: x,
- notify: w
- },
- D = {
- done: y.add,
- fail: x.add,
- progress: w.add,
- state: function () {
- return e
- },
- isResolved: y.fired,
- isRejected: x.fired,
- then: function (F, E, G) {
- C.done(F).fail(E).progress(G);
- return this
- },
- always: function () {
- return C.done.apply(C, arguments).fail.apply(C, arguments)
- },
- pipe: function (G, F, E) {
- return al.Deferred(function (H) {
- al.each({
- done: [G, "resolve"],
- fail: [F, "reject"],
- progress: [E, "notify"]
- }, function (J, I) {
- var M = I[0],
- L = I[1],
- K;
- if (al.isFunction(M)) {
- C[J](function () {
- K = M.apply(this, arguments);
- if (K && al.isFunction(K.promise)) {
- K.promise().then(H.resolve, H.reject, H.notify)
- } else {
- H[L + "With"](this === C ? H : this, [K])
- }
- })
- } else {
- C[J](H[L])
- }
- })
- }).promise()
- },
- promise: function (F) {
- if (F == null) {
- F = D
- } else {
- for (var E in D) {
- F[E] = D[E]
- }
- }
- return F
- }
- },
- C = D.promise({}),
- A;
- for (A in B) {
- C[A] = B[A].fire;
- C[A + "With"] = B[A].fireWith
- }
- C.done(function () {
- e = "resolved"
- }, x.disable, w.lock).fail(function () {
- e = "rejected"
- }, y.disable, w.lock);
- if (z) {
- z.call(C, C)
- }
- return C
- },
- when: function (B) {
- var y = bb.call(arguments, 0),
- w = 0,
- e = y.length,
- C = new Array(e),
- x = e,
- z = e,
- D = e <= 1 && B && al.isFunction(B.promise) ? B : al.Deferred(),
- F = D.promise();
- function E(G) {
- return function (H) {
- y[G] = arguments.length > 1 ? bb.call(arguments, 0) : H;
- if (!(--x)) {
- D.resolveWith(D, y)
- }
- }
- }
- function A(G) {
- return function (H) {
- C[G] = arguments.length > 1 ? bb.call(arguments, 0) : H;
- D.notifyWith(F, C)
- }
- }
- if (e > 1) {
- for (; w < e; w++) {
- if (y[w] && y[w].promise && al.isFunction(y[w].promise)) {
- y[w].promise().then(E(w), D.reject, A(w))
- } else {
- --x
- }
- }
- if (!x) {
- D.resolveWith(D, y)
- }
- } else {
- if (D !== B) {
- D.resolveWith(D, e ? [B] : [])
- }
- }
- return F
- }
- });
- al.support = (function () {
- var M = an.createElement("div"),
- bO = an.documentElement,
- z, bP, G, x, F, A, D, w, E, H, C, L, J, y, B, I, bQ;
- M.setAttribute("className", "t");
- M.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";
- z = M.getElementsByTagName("*");
- bP = M.getElementsByTagName("a")[0];
- if (!z || !z.length || !bP) {
- return {}
- }
- G = an.createElement("select");
- x = G.appendChild(an.createElement("option"));
- F = M.getElementsByTagName("input")[0];
- D = {
- leadingWhitespace: (M.firstChild.nodeType === 3),
- tbody: !M.getElementsByTagName("tbody").length,
- htmlSerialize: !!M.getElementsByTagName("link").length,
- style: /top/.test(bP.getAttribute("style")),
- hrefNormalized: (bP.getAttribute("href") === "/a"),
- opacity: /^0.55/.test(bP.style.opacity),
- cssFloat: !!bP.style.cssFloat,
- unknownElems: !!M.getElementsByTagName("nav").length,
- checkOn: (F.value === "on"),
- optSelected: x.selected,
- getSetAttribute: M.className !== "t",
- enctype: !!an.createElement("form").enctype,
- submitBubbles: true,
- changeBubbles: true,
- focusinBubbles: false,
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true
- };
- F.checked = true;
- D.noCloneChecked = F.cloneNode(true).checked;
- G.disabled = true;
- D.optDisabled = !x.disabled;
- try {
- delete M.test
- } catch (K) {
- D.deleteExpando = false
- }
- if (!M.addEventListener && M.attachEvent && M.fireEvent) {
- M.attachEvent("onclick", function () {
- D.noCloneEvent = false
- });
- M.cloneNode(true).fireEvent("onclick")
- }
- F = an.createElement("input");
- F.value = "t";
- F.setAttribute("type", "radio");
- D.radioValue = F.value === "t";
- F.setAttribute("checked", "checked");
- M.appendChild(F);
- w = an.createDocumentFragment();
- w.appendChild(M.lastChild);
- D.checkClone = w.cloneNode(true).cloneNode(true).lastChild.checked;
- M.innerHTML = "";
- M.style.width = M.style.paddingLeft = "1px";
- E = an.getElementsByTagName("body")[0];
- C = an.createElement(E ? "div" : "body");
- L = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if (E) {
- al.extend(L, {
- position: "absolute",
- left: "-999px",
- top: "-999px"
- })
- }
- for (I in L) {
- C.style[I] = L[I]
- }
- C.appendChild(M);
- H = E || bO;
- H.insertBefore(C, H.firstChild);
- D.appendChecked = F.checked;
- D.boxModel = M.offsetWidth === 2;
- if ("zoom" in M.style) {
- M.style.display = "inline";
- M.style.zoom = 1;
- D.inlineBlockNeedsLayout = (M.offsetWidth === 2);
- M.style.display = "";
- M.innerHTML = "<div style='width:4px;'></div>";
- D.shrinkWrapBlocks = (M.offsetWidth !== 2)
- }
- M.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
- J = M.getElementsByTagName("td");
- bQ = (J[0].offsetHeight === 0);
- J[0].style.display = "";
- J[1].style.display = "none";
- D.reliableHiddenOffsets = bQ && (J[0].offsetHeight === 0);
- M.innerHTML = "";
- if (an.defaultView && an.defaultView.getComputedStyle) {
- A = an.createElement("div");
- A.style.width = "0";
- A.style.marginRight = "0";
- M.appendChild(A);
- D.reliableMarginRight = (parseInt((an.defaultView.getComputedStyle(A, null) || {
- marginRight: 0
- }).marginRight, 10) || 0) === 0
- }
- if (M.attachEvent) {
- for (I in {
- submit: 1,
- change: 1,
- focusin: 1
- }) {
- B = "on" + I;
- bQ = (B in M);
- if (!bQ) {
- M.setAttribute(B, "return;");
- bQ = (typeof M[B] === "function")
- }
- D[I + "Bubbles"] = bQ
- }
- }
- al(function () {
- var bX, bZ, b0, bY, bS, bT, bR = 1,
- bW = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",
- bV = "visibility:hidden;border:0;",
- e = "style='" + bW + "border:5px solid #000;padding:0;'",
- bU = "<div " + e + "><div></div></div><table " + e + " cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
- E = an.getElementsByTagName("body")[0];
- if (!E) {
- return
- }
- bX = an.createElement("div");
- bX.style.cssText = bV + "width:0;height:0;position:static;top:0;margin-top:" + bR + "px";
- E.insertBefore(bX, E.firstChild);
- C = an.createElement("div");
- C.style.cssText = bW + bV;
- C.innerHTML = bU;
- bX.appendChild(C);
- bZ = C.firstChild;
- b0 = bZ.firstChild;
- bS = bZ.nextSibling.firstChild.firstChild;
- bT = {
- doesNotAddBorder: (b0.offsetTop !== 5),
- doesAddBorderForTableAndCells: (bS.offsetTop === 5)
- };
- b0.style.position = "fixed";
- b0.style.top = "20px";
- bT.fixedPosition = (b0.offsetTop === 20 || b0.offsetTop === 15);
- b0.style.position = b0.style.top = "";
- bZ.style.overflow = "hidden";
- bZ.style.position = "relative";
- bT.subtractsBorderForOverflowNotVisible = (b0.offsetTop === -5);
- bT.doesNotIncludeMarginInBodyOffset = (E.offsetTop !== bR);
- E.removeChild(bX);
- C = bX = null;
- al.extend(D, bT)
- });
- C.innerHTML = "";
- H.removeChild(C);
- C = w = G = x = E = A = M = F = null;
- return D
- })();
- al.boxModel = al.support.boxModel;
- var a9 = /^(?:\{.*\}|\[.*\])$/,
- aL = /([A-Z])/g;
- al.extend({
- cache: {},
- uuid: 0,
- expando: "jQuery" + (al.fn.jquery + Math.random()).replace(/\D/g, ""),
- noData: {
- embed: true,
- object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- applet: true
- },
- hasData: function (e) {
- e = e.nodeType ? al.cache[e[al.expando]] : e[al.expando];
- return !!e && !af(e)
- },
- data: function (H, F, E, D) {
- if (!al.acceptData(H)) {
- return
- }
- var B, y, C, G = al.expando,
- A = typeof F === "string",
- I = H.nodeType,
- w = I ? al.cache : H,
- x = I ? H[al.expando] : H[al.expando] && al.expando,
- z = F === "events";
- if ((!x || !w[x] || (!z && !D && !w[x].data)) && A && E === ap) {
- return
- }
- if (!x) {
- if (I) {
- H[al.expando] = x = ++al.uuid
- } else {
- x = al.expando
- }
- }
- if (!w[x]) {
- w[x] = {};
- if (!I) {
- w[x].toJSON = al.noop
- }
- }
- if (typeof F === "object" || typeof F === "function") {
- if (D) {
- w[x] = al.extend(w[x], F)
- } else {
- w[x].data = al.extend(w[x].data, F)
- }
- }
- B = y = w[x];
- if (!D) {
- if (!y.data) {
- y.data = {}
- }
- y = y.data
- }
- if (E !== ap) {
- y[al.camelCase(F)] = E
- }
- if (z && !y[F]) {
- return B.events
- }
- if (A) {
- C = y[F];
- if (C == null) {
- C = y[al.camelCase(F)]
- }
- } else {
- C = y
- }
- return C
- },
- removeData: function (D, B, A) {
- if (!al.acceptData(D)) {
- return
- }
- var z, y, x, C = al.expando,
- E = D.nodeType,
- e = E ? al.cache : D,
- w = E ? D[al.expando] : al.expando;
- if (!e[w]) {
- return
- }
- if (B) {
- z = A ? e[w] : e[w].data;
- if (z) {
- if (al.isArray(B)) {
- B = B
- } else {
- if (B in z) {
- B = [B]
- } else {
- B = al.camelCase(B);
- if (B in z) {
- B = [B]
- } else {
- B = B.split(" ")
- }
- }
- }
- for (y = 0, x = B.length; y < x; y++) {
- delete z[B[y]]
- }
- if (!(A ? af : al.isEmptyObject)(z)) {
- return
- }
- }
- }
- if (!A) {
- delete e[w].data;
- if (!af(e[w])) {
- return
- }
- }
- if (al.support.deleteExpando || !e.setInterval) {
- delete e[w]
- } else {
- e[w] = null
- } if (E) {
- if (al.support.deleteExpando) {
- delete D[al.expando]
- } else {
- if (D.removeAttribute) {
- D.removeAttribute(al.expando)
- } else {
- D[al.expando] = null
- }
- }
- }
- },
- _data: function (w, e, x) {
- return al.data(w, e, x, true)
- },
- acceptData: function (w) {
- if (w.nodeName) {
- var e = al.noData[w.nodeName.toLowerCase()];
- if (e) {
- return !(e === true || w.getAttribute("classid") !== e)
- }
- }
- return true
- }
- });
- al.fn.extend({
- data: function (w, C) {
- var B, e, y, A = null;
- if (typeof w === "undefined") {
- if (this.length) {
- A = al.data(this[0]);
- if (this[0].nodeType === 1 && !al._data(this[0], "parsedAttrs")) {
- e = this[0].attributes;
- for (var z = 0, x = e.length; z < x; z++) {
- y = e[z].name;
- if (y.indexOf("data-") === 0) {
- y = al.camelCase(y.substring(5));
- bo(this[0], y, A[y])
- }
- }
- al._data(this[0], "parsedAttrs", true)
- }
- }
- return A
- } else {
- if (typeof w === "object") {
- return this.each(function () {
- al.data(this, w)
- })
- }
- }
- B = w.split(".");
- B[1] = B[1] ? "." + B[1] : "";
- if (C === ap) {
- A = this.triggerHandler("getData" + B[1] + "!", [B[0]]);
- if (A === ap && this.length) {
- A = al.data(this[0], w);
- A = bo(this[0], w, A)
- }
- return A === ap && B[1] ? this.data(B[0]) : A
- } else {
- return this.each(function () {
- var D = al(this),
- E = [B[0], C];
- D.triggerHandler("setData" + B[1] + "!", E);
- al.data(this, w, C);
- D.triggerHandler("changeData" + B[1] + "!", E)
- })
- }
- },
- removeData: function (e) {
- return this.each(function () {
- al.removeData(this, e)
- })
- }
- });
- function bo(x, w, A) {
- if (A === ap && x.nodeType === 1) {
- var z = "data-" + w.replace(aL, "-$1").toLowerCase();
- A = x.getAttribute(z);
- if (typeof A === "string") {
- try {
- A = A === "true" ? true : A === "false" ? false : A === "null" ? null : al.isNumeric(A) ? parseFloat(A) : a9.test(A) ? al.parseJSON(A) : A
- } catch (y) {}
- al.data(x, w, A)
- } else {
- A = ap
- }
- }
- return A
- }
- function af(w) {
- for (var e in w) {
- if (e === "data" && al.isEmptyObject(w[e])) {
- continue
- }
- if (e !== "toJSON") {
- return false
- }
- }
- return true
- }
- function bA(y, e, B) {
- var A = e + "defer",
- x = e + "queue",
- w = e + "mark",
- z = al._data(y, A);
- if (z && (B === "queue" || !al._data(y, x)) && (B === "mark" || !al._data(y, w))) {
- setTimeout(function () {
- if (!al._data(y, x) && !al._data(y, w)) {
- al.removeData(y, A, true);
- z.fire()
- }
- }, 0)
- }
- }
- al.extend({
- _mark: function (w, e) {
- if (w) {
- e = (e || "fx") + "mark";
- al._data(w, e, (al._data(w, e) || 0) + 1)
- }
- },
- _unmark: function (w, e, z) {
- if (w !== true) {
- z = e;
- e = w;
- w = false
- }
- if (e) {
- z = z || "fx";
- var y = z + "mark",
- x = w ? 0 : ((al._data(e, y) || 1) - 1);
- if (x) {
- al._data(e, y, x)
- } else {
- al.removeData(e, y, true);
- bA(e, z, "mark")
- }
- }
- },
- queue: function (w, e, y) {
- var x;
- if (w) {
- e = (e || "fx") + "queue";
- x = al._data(w, e);
- if (y) {
- if (!x || al.isArray(y)) {
- x = al._data(w, e, al.makeArray(y))
- } else {
- x.push(y)
- }
- }
- return x || []
- }
- },
- dequeue: function (x, w) {
- w = w || "fx";
- var z = al.queue(x, w),
- y = z.shift(),
- e = {};
- if (y === "inprogress") {
- y = z.shift()
- }
- if (y) {
- if (w === "fx") {
- z.unshift("inprogress")
- }
- al._data(x, w + ".run", e);
- y.call(x, function () {
- al.dequeue(x, w)
- }, e)
- }
- if (!z.length) {
- al.removeData(x, w + "queue " + w + ".run", true);
- bA(x, w, "queue")
- }
- }
- });
- al.fn.extend({
- queue: function (e, w) {
- if (typeof e !== "string") {
- w = e;
- e = "fx"
- }
- if (w === ap) {
- return al.queue(this[0], e)
- }
- return this.each(function () {
- var x = al.queue(this, e, w);
- if (e === "fx" && x[0] !== "inprogress") {
- al.dequeue(this, e)
- }
- })
- },
- dequeue: function (e) {
- return this.each(function () {
- al.dequeue(this, e)
- })
- },
- delay: function (x, w) {
- x = al.fx ? al.fx.speeds[x] || x : x;
- w = w || "fx";
- return this.queue(w, function (y, e) {
- var z = setTimeout(y, x);
- e.stop = function () {
- clearTimeout(z)
- }
- })
- },
- clearQueue: function (e) {
- return this.queue(e || "fx", [])
- },
- promise: function (E, D) {
- if (typeof E !== "string") {
- D = E;
- E = ap
- }
- E = E || "fx";
- var C = al.Deferred(),
- e = this,
- x = e.length,
- A = 1,
- y = E + "defer",
- z = E + "queue",
- B = E + "mark",
- w;
- function F() {
- if (!(--A)) {
- C.resolveWith(e, [e])
- }
- }
- while (x--) {
- if ((w = al.data(e[x], y, ap, true) || (al.data(e[x], z, ap, true) || al.data(e[x], B, ap, true)) && al.data(e[x], y, al.Callbacks("once memory"), true))) {
- A++;
- w.add(F)
- }
- }
- F();
- return C.promise()
- }
- });
- var a8 = /[\n\t\r]/g,
- au = /\s+/,
- be = /\r/g,
- f = /^(?:button|input)$/i,
- R = /^(?:button|input|object|select|textarea)$/i,
- j = /^a(?:rea)?$/i,
- aB = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- T = al.support.getSetAttribute,
- bw, bi, aP;
- al.fn.extend({
- attr: function (w, e) {
- return al.access(this, w, e, true, al.attr)
- },
- removeAttr: function (e) {
- return this.each(function () {
- al.removeAttr(this, e)
- })
- },
- prop: function (w, e) {
- return al.access(this, w, e, true, al.prop)
- },
- removeProp: function (e) {
- e = al.propFix[e] || e;
- return this.each(function () {
- try {
- this[e] = ap;
- delete this[e]
- } catch (w) {}
- })
- },
- addClass: function (y) {
- var e, z, x, A, B, C, w;
- if (al.isFunction(y)) {
- return this.each(function (D) {
- al(this).addClass(y.call(this, D, this.className))
- })
- }
- if (y && typeof y === "string") {
- e = y.split(au);
- for (z = 0, x = this.length; z < x; z++) {
- A = this[z];
- if (A.nodeType === 1) {
- if (!A.className && e.length === 1) {
- A.className = y
- } else {
- B = " " + A.className + " ";
- for (C = 0, w = e.length; C < w; C++) {
- if (!~B.indexOf(" " + e[C] + " ")) {
- B += e[C] + " "
- }
- }
- A.className = al.trim(B)
- }
- }
- }
- }
- return this
- },
- removeClass: function (y) {
- var e, z, x, B, A, C, w;
- if (al.isFunction(y)) {
- return this.each(function (D) {
- al(this).removeClass(y.call(this, D, this.className))
- })
- }
- if ((y && typeof y === "string") || y === ap) {
- e = (y || "").split(au);
- for (z = 0, x = this.length; z < x; z++) {
- B = this[z];
- if (B.nodeType === 1 && B.className) {
- if (y) {
- A = (" " + B.className + " ").replace(a8, " ");
- for (C = 0, w = e.length; C < w; C++) {
- A = A.replace(" " + e[C] + " ", " ")
- }
- B.className = al.trim(A)
- } else {
- B.className = ""
- }
- }
- }
- }
- return this
- },
- toggleClass: function (e, y) {
- var x = typeof e,
- w = typeof y === "boolean";
- if (al.isFunction(e)) {
- return this.each(function (z) {
- al(this).toggleClass(e.call(this, z, this.className, y), y)
- })
- }
- return this.each(function () {
- if (x === "string") {
- var z, B = 0,
- A = al(this),
- C = y,
- D = e.split(au);
- while ((z = D[B++])) {
- C = w ? C : !A.hasClass(z);
- A[C ? "addClass" : "removeClass"](z)
- }
- } else {
- if (x === "undefined" || x === "boolean") {
- if (this.className) {
- al._data(this, "__className__", this.className)
- }
- this.className = this.className || e === false ? "" : al._data(this, "__className__") || ""
- }
- }
- })
- },
- hasClass: function (x) {
- var e = " " + x + " ",
- y = 0,
- w = this.length;
- for (; y < w; y++) {
- if (this[y].nodeType === 1 && (" " + this[y].className + " ").replace(a8, " ").indexOf(e) > -1) {
- return true
- }
- }
- return false
- },
- val: function (z) {
- var y, e, x, w = this[0];
- if (!arguments.length) {
- if (w) {
- y = al.valHooks[w.nodeName.toLowerCase()] || al.valHooks[w.type];
- if (y && "get" in y && (e = y.get(w, "value")) !== ap) {
- return e
- }
- e = w.value;
- return typeof e === "string" ? e.replace(be, "") : e == null ? "" : e
- }
- return ap
- }
- x = al.isFunction(z);
- return this.each(function (B) {
- var A = al(this),
- C;
- if (this.nodeType !== 1) {
- return
- }
- if (x) {
- C = z.call(this, B, A.val())
- } else {
- C = z
- } if (C == null) {
- C = ""
- } else {
- if (typeof C === "number") {
- C += ""
- } else {
- if (al.isArray(C)) {
- C = al.map(C, function (D) {
- return D == null ? "" : D + ""
- })
- }
- }
- }
- y = al.valHooks[this.nodeName.toLowerCase()] || al.valHooks[this.type];
- if (!y || !("set" in y) || y.set(this, C, "value") === ap) {
- this.value = C
- }
- })
- }
- });
- al.extend({
- valHooks: {
- option: {
- get: function (w) {
- var e = w.attributes.value;
- return !e || e.specified ? w.value : w.text
- }
- },
- select: {
- get: function (B) {
- var z, e, A, x, y = B.selectedIndex,
- C = [],
- D = B.options,
- w = B.type === "select-one";
- if (y < 0) {
- return null
- }
- e = w ? y : 0;
- A = w ? y + 1 : D.length;
- for (; e < A; e++) {
- x = D[e];
- if (x.selected && (al.support.optDisabled ? !x.disabled : x.getAttribute("disabled") === null) && (!x.parentNode.disabled || !al.nodeName(x.parentNode, "optgroup"))) {
- z = al(x).val();
- if (w) {
- return z
- }
- C.push(z)
- }
- }
- if (w && !C.length && D.length) {
- return al(D[y]).val()
- }
- return C
- },
- set: function (w, e) {
- var x = al.makeArray(e);
- al(w).find("option").each(function () {
- this.selected = al.inArray(al(this).val(), x) >= 0
- });
- if (!x.length) {
- w.selectedIndex = -1
- }
- return x
- }
- }
- },
- attrFn: {
- val: true,
- css: true,
- html: true,
- text: true,
- data: true,
- width: true,
- height: true,
- offset: true
- },
- attr: function (y, x, D, C) {
- var B, w, A, z = y.nodeType;
- if (!y || z === 3 || z === 8 || z === 2) {
- return ap
- }
- if (C && x in al.attrFn) {
- return al(y)[x](D)
- }
- if (!("getAttribute" in y)) {
- return al.prop(y, x, D)
- }
- A = z !== 1 || !al.isXMLDoc(y);
- if (A) {
- x = x.toLowerCase();
- w = al.attrHooks[x] || (aB.test(x) ? bi : bw)
- }
- if (D !== ap) {
- if (D === null) {
- al.removeAttr(y, x);
- return ap
- } else {
- if (w && "set" in w && A && (B = w.set(y, D, x)) !== ap) {
- return B
- } else {
- y.setAttribute(x, "" + D);
- return D
- }
- }
- } else {
- if (w && "get" in w && A && (B = w.get(y, x)) !== null) {
- return B
- } else {
- B = y.getAttribute(x);
- return B === null ? ap : B
- }
- }
- },
- removeAttr: function (x, e) {
- var B, A, y, w, z = 0;
- if (x.nodeType === 1) {
- A = (e || "").split(au);
- w = A.length;
- for (; z < w; z++) {
- y = A[z].toLowerCase();
- B = al.propFix[y] || y;
- al.attr(x, y, "");
- x.removeAttribute(T ? y : B);
- if (aB.test(y) && B in x) {
- x[B] = false
- }
- }
- }
- },
- attrHooks: {
- type: {
- set: function (w, e) {
- if (f.test(w.nodeName) && w.parentNode) {
- al.error("type property can't be changed")
- } else {
- if (!al.support.radioValue && e === "radio" && al.nodeName(w, "input")) {
- var x = w.value;
- w.setAttribute("type", e);
- if (x) {
- w.value = x
- }
- return e
- }
- }
- }
- },
- value: {
- get: function (w, e) {
- if (bw && al.nodeName(w, "button")) {
- return bw.get(w, e)
- }
- return e in w ? w.value : null
- },
- set: function (w, e, x) {
- if (bw && al.nodeName(w, "button")) {
- return bw.set(w, e, x)
- }
- w.value = e
- }
- }
- },
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
- prop: function (x, w, B) {
- var A, e, z, y = x.nodeType;
- if (!x || y === 3 || y === 8 || y === 2) {
- return ap
- }
- z = y !== 1 || !al.isXMLDoc(x);
- if (z) {
- w = al.propFix[w] || w;
- e = al.propHooks[w]
- }
- if (B !== ap) {
- if (e && "set" in e && (A = e.set(x, B, w)) !== ap) {
- return A
- } else {
- return (x[w] = B)
- }
- } else {
- if (e && "get" in e && (A = e.get(x, w)) !== null) {
- return A
- } else {
- return x[w]
- }
- }
- },
- propHooks: {
- tabIndex: {
- get: function (w) {
- var e = w.getAttributeNode("tabindex");
- return e && e.specified ? parseInt(e.value, 10) : R.test(w.nodeName) || j.test(w.nodeName) && w.href ? 0 : ap
- }
- }
- }
- });
- al.attrHooks.tabindex = al.propHooks.tabIndex;
- bi = {
- get: function (w, e) {
- var y, x = al.prop(w, e);
- return x === true || typeof x !== "boolean" && (y = w.getAttributeNode(e)) && y.nodeValue !== false ? e.toLowerCase() : ap
- },
- set: function (w, e, y) {
- var x;
- if (e === false) {
- al.removeAttr(w, y)
- } else {
- x = al.propFix[y] || y;
- if (x in w) {
- w[x] = true
- }
- w.setAttribute(y, y.toLowerCase())
- }
- return y
- }
- };
- if (!T) {
- aP = {
- name: true,
- id: true
- };
- bw = al.valHooks.button = {
- get: function (w, e) {
- var x;
- x = w.getAttributeNode(e);
- return x && (aP[e] ? x.nodeValue !== "" : x.specified) ? x.nodeValue : ap
- },
- set: function (w, e, y) {
- var x = w.getAttributeNode(y);
- if (!x) {
- x = an.createAttribute(y);
- w.setAttributeNode(x)
- }
- return (x.nodeValue = e + "")
- }
- };
- al.attrHooks.tabindex.set = bw.set;
- al.each(["width", "height"], function (e, w) {
- al.attrHooks[w] = al.extend(al.attrHooks[w], {
- set: function (y, x) {
- if (x === "") {
- y.setAttribute(w, "auto");
- return x
- }
- }
- })
- });
- al.attrHooks.contenteditable = {
- get: bw.get,
- set: function (w, e, x) {
- if (e === "") {
- e = "false"
- }
- bw.set(w, e, x)
- }
- }
- }
- if (!al.support.hrefNormalized) {
- al.each(["href", "src", "width", "height"], function (e, w) {
- al.attrHooks[w] = al.extend(al.attrHooks[w], {
- get: function (y) {
- var x = y.getAttribute(w, 2);
- return x === null ? ap : x
- }
- })
- })
- }
- if (!al.support.style) {
- al.attrHooks.style = {
- get: function (e) {
- return e.style.cssText.toLowerCase() || ap
- },
- set: function (w, e) {
- return (w.style.cssText = "" + e)
- }
- }
- }
- if (!al.support.optSelected) {
- al.propHooks.selected = al.extend(al.propHooks.selected, {
- get: function (w) {
- var e = w.parentNode;
- if (e) {
- e.selectedIndex;
- if (e.parentNode) {
- e.parentNode.selectedIndex
- }
- }
- return null
- }
- })
- }
- if (!al.support.enctype) {
- al.propFix.enctype = "encoding"
- }
- if (!al.support.checkOn) {
- al.each(["radio", "checkbox"], function () {
- al.valHooks[this] = {
- get: function (e) {
- return e.getAttribute("value") === null ? "on" : e.value
- }
- }
- })
- }
- al.each(["radio", "checkbox"], function () {
- al.valHooks[this] = al.extend(al.valHooks[this], {
- set: function (w, e) {
- if (al.isArray(e)) {
- return (w.checked = al.inArray(al(w).val(), e) >= 0)
- }
- }
- })
- });
- var a7 = /\.(.*)$/,
- bv = /^(?:textarea|input|select)$/i,
- ab = /\./g,
- bB = / /g,
- aR = /[^\w\s.|`]/g,
- l = /^([^\.]*)?(?:\.(.+))?$/,
- X = /\bhover(\.\S+)?/,
- a6 = /^key/,
- bx = /^(?:mouse|contextmenu)|click/,
- ag = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
- aj = function (w) {
- var e = ag.exec(w);
- if (e) {
- e[1] = (e[1] || "").toLowerCase();
- e[3] = e[3] && new RegExp("(?:^|\\s)" + e[3] + "(?:\\s|$)")
- }
- return e
- },
- i = function (w, e) {
- return ((!e[1] || w.nodeName.toLowerCase() === e[1]) && (!e[2] || w.id === e[2]) && (!e[3] || e[3].test(w.className)))
- },
- bM = function (e) {
- return al.event.special.hover ? e : e.replace(X, "mouseenter$1 mouseleave$1")
- };
- al.event = {
- add: function (I, G, F, D, B) {
- var z, A, L, K, J, E, e, H, w, y, x, C;
- if (I.nodeType === 3 || I.nodeType === 8 || !G || !F || !(z = al._data(I))) {
- return
- }
- if (F.handler) {
- w = F;
- F = w.handler
- }
- if (!F.guid) {
- F.guid = al.guid++
- }
- L = z.events;
- if (!L) {
- z.events = L = {}
- }
- A = z.handle;
- if (!A) {
- z.handle = A = function (M) {
- return typeof al !== "undefined" && (!M || al.event.triggered !== M.type) ? al.event.dispatch.apply(A.elem, arguments) : ap
- };
- A.elem = I
- }
- G = bM(G).split(" ");
- for (K = 0; K < G.length; K++) {
- J = l.exec(G[K]) || [];
- E = J[1];
- e = (J[2] || "").split(".").sort();
- C = al.event.special[E] || {};
- E = (B ? C.delegateType : C.bindType) || E;
- C = al.event.special[E] || {};
- H = al.extend({
- type: E,
- origType: J[1],
- data: D,
- handler: F,
- guid: F.guid,
- selector: B,
- namespace: e.join(".")
- }, w);
- if (B) {
- H.quick = aj(B);
- if (!H.quick && al.expr.match.POS.test(B)) {
- H.isPositional = true
- }
- }
- x = L[E];
- if (!x) {
- x = L[E] = [];
- x.delegateCount = 0;
- if (!C.setup || C.setup.call(I, D, e, A) === false) {
- if (I.addEventListener) {
- I.addEventListener(E, A, false)
- } else {
- if (I.attachEvent) {
- I.attachEvent("on" + E, A)
- }
- }
- }
- }
- if (C.add) {
- C.add.call(I, H);
- if (!H.handler.guid) {
- H.handler.guid = F.guid
- }
- }
- if (B) {
- x.splice(x.delegateCount++, 0, H)
- } else {
- x.push(H)
- }
- al.event.global[E] = true
- }
- I = null
- },
- global: {},
- remove: function (I, G, E, D) {
- var B = al.hasData(I) && al._data(I),
- K, L, F, x, y, z, J, C, A, w, H;
- if (!B || !(J = B.events)) {
- return
- }
- G = bM(G || "").split(" ");
- for (K = 0; K < G.length; K++) {
- L = l.exec(G[K]) || [];
- F = L[1];
- x = L[2];
- if (!F) {
- x = x ? "." + x : "";
- for (z in J) {
- al.event.remove(I, z + x, E, D)
- }
- return
- }
- C = al.event.special[F] || {};
- F = (D ? C.delegateType : C.bindType) || F;
- w = J[F] || [];
- y = w.length;
- x = x ? new RegExp("(^|\\.)" + x.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
- if (E || x || D || C.remove) {
- for (z = 0; z < w.length; z++) {
- H = w[z];
- if (!E || E.guid === H.guid) {
- if (!x || x.test(H.namespace)) {
- if (!D || D === H.selector || D === "**" && H.selector) {
- w.splice(z--, 1);
- if (H.selector) {
- w.delegateCount--
- }
- if (C.remove) {
- C.remove.call(I, H)
- }
- }
- }
- }
- }
- } else {
- w.length = 0
- } if (w.length === 0 && y !== w.length) {
- if (!C.teardown || C.teardown.call(I, x) === false) {
- al.removeEvent(I, F, B.handle)
- }
- delete J[F]
- }
- }
- if (al.isEmptyObject(J)) {
- A = B.handle;
- if (A) {
- A.elem = null
- }
- al.removeData(I, ["events", "handle"], true)
- }
- },
- customEvent: {
- getData: true,
- setData: true,
- changeData: true
- },
- trigger: function (J, I, H, G) {
- if (H && (H.nodeType === 3 || H.nodeType === 8)) {
- return
- }
- var E = J.type || J,
- y = [],
- w, x, C, K, A, z, F, D, B, L;
- if (E.indexOf("!") >= 0) {
- E = E.slice(0, -1);
- x = true
- }
- if (E.indexOf(".") >= 0) {
- y = E.split(".");
- E = y.shift();
- y.sort()
- }
- if ((!H || al.event.customEvent[E]) && !al.event.global[E]) {
- return
- }
- J = typeof J === "object" ? J[al.expando] ? J : new al.Event(E, J) : new al.Event(E);
- J.type = E;
- J.isTrigger = true;
- J.exclusive = x;
- J.namespace = y.join(".");
- J.namespace_re = J.namespace ? new RegExp("(^|\\.)" + y.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
- z = E.indexOf(":") < 0 ? "on" + E : "";
- if (G || !H) {
- J.preventDefault()
- }
- if (!H) {
- w = al.cache;
- for (C in w) {
- if (w[C].events && w[C].events[E]) {
- al.event.trigger(J, I, w[C].handle.elem, true)
- }
- }
- return
- }
- J.result = ap;
- if (!J.target) {
- J.target = H
- }
- I = I != null ? al.makeArray(I) : [];
- I.unshift(J);
- F = al.event.special[E] || {};
- if (F.trigger && F.trigger.apply(H, I) === false) {
- return
- }
- B = [
- [H, F.bindType || E]
- ];
- if (!G && !F.noBubble && !al.isWindow(H)) {
- L = F.delegateType || E;
- A = null;
- for (K = H.parentNode; K; K = K.parentNode) {
- B.push([K, L]);
- A = K
- }
- if (A && A === H.ownerDocument) {
- B.push([A.defaultView || A.parentWindow || aq, L])
- }
- }
- for (C = 0; C < B.length; C++) {
- K = B[C][0];
- J.type = B[C][1];
- D = (al._data(K, "events") || {})[J.type] && al._data(K, "handle");
- if (D) {
- D.apply(K, I)
- }
- D = z && K[z];
- if (D && al.acceptData(K)) {
- D.apply(K, I)
- }
- if (J.isPropagationStopped()) {
- break
- }
- }
- J.type = E;
- if (!J.isDefaultPrevented()) {
- if ((!F._default || F._default.apply(H.ownerDocument, I) === false) && !(E === "click" && al.nodeName(H, "a")) && al.acceptData(H)) {
- if (z && H[E] && ((E !== "focus" && E !== "blur") || J.target.offsetWidth !== 0) && !al.isWindow(H)) {
- A = H[z];
- if (A) {
- H[z] = null
- }
- al.event.triggered = E;
- H[E]();
- al.event.triggered = ap;
- if (A) {
- H[z] = A
- }
- }
- }
- }
- return J.result
- },
- dispatch: function (K) {
- K = al.event.fix(K || aq.event);
- var J = ((al._data(this, "events") || {})[K.type] || []),
- C = J.delegateCount,
- y = [].slice.call(arguments, 0),
- D = !K.exclusive && !K.namespace,
- A = (al.event.special[K.type] || {}).handle,
- w = [],
- H, F, z, L, G, B, x, e, E, I, M;
- y[0] = K;
- K.delegateTarget = this;
- if (C && !K.target.disabled && !(K.button && K.type === "click")) {
- for (z = K.target; z != this; z = z.parentNode || this) {
- G = {};
- x = [];
- for (H = 0; H < C; H++) {
- e = J[H];
- E = e.selector;
- I = G[E];
- if (e.isPositional) {
- I = (I || (G[E] = al(E))).index(z) >= 0
- } else {
- if (I === ap) {
- I = G[E] = (e.quick ? i(z, e.quick) : al(z).is(E))
- }
- } if (I) {
- x.push(e)
- }
- }
- if (x.length) {
- w.push({
- elem: z,
- matches: x
- })
- }
- }
- }
- if (J.length > C) {
- w.push({
- elem: this,
- matches: J.slice(C)
- })
- }
- for (H = 0; H < w.length && !K.isPropagationStopped(); H++) {
- B = w[H];
- K.currentTarget = B.elem;
- for (F = 0; F < B.matches.length && !K.isImmediatePropagationStopped(); F++) {
- e = B.matches[F];
- if (D || (!K.namespace && !e.namespace) || K.namespace_re && K.namespace_re.test(e.namespace)) {
- K.data = e.data;
- K.handleObj = e;
- L = (A || e.handler).apply(B.elem, y);
- if (L !== ap) {
- K.result = L;
- if (L === false) {
- K.preventDefault();
- K.stopPropagation()
- }
- }
- }
- }
- }
- return K.result
- },
- props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
- fixHooks: {},
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function (w, e) {
- if (w.which == null) {
- w.which = e.charCode != null ? e.charCode : e.keyCode
- }
- return w
- }
- },
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),
- filter: function (x, w) {
- var B, z, e, y = w.button,
- A = w.fromElement;
- if (x.pageX == null && w.clientX != null) {
- B = x.target.ownerDocument || an;
- z = B.documentElement;
- e = B.body;
- x.pageX = w.clientX + (z && z.scrollLeft || e && e.scrollLeft || 0) - (z && z.clientLeft || e && e.clientLeft || 0);
- x.pageY = w.clientY + (z && z.scrollTop || e && e.scrollTop || 0) - (z && z.clientTop || e && e.clientTop || 0)
- }
- if (!x.relatedTarget && A) {
- x.relatedTarget = A === x.target ? w.toElement : A
- }
- if (!x.which && y !== ap) {
- x.which = (y & 1 ? 1 : (y & 2 ? 3 : (y & 4 ? 2 : 0)))
- }
- return x
- }
- },
- fix: function (w) {
- if (w[al.expando]) {
- return w
- }
- var x, A, e = w,
- y = al.event.fixHooks[w.type] || {},
- z = y.props ? this.props.concat(y.props) : this.props;
- w = al.Event(e);
- for (x = z.length; x;) {
- A = z[--x];
- w[A] = e[A]
- }
- if (!w.target) {
- w.target = e.srcElement || an
- }
- if (w.target.nodeType === 3) {
- w.target = w.target.parentNode
- }
- if (w.metaKey === ap) {
- w.metaKey = w.ctrlKey
- }
- return y.filter ? y.filter(w, e) : w
- },
- special: {
- ready: {
- setup: al.bindReady
- },
- focus: {
- delegateType: "focusin",
- noBubble: true
- },
- blur: {
- delegateType: "focusout",
- noBubble: true
- },
- beforeunload: {
- setup: function (w, e, x) {
- if (al.isWindow(this)) {
- this.onbeforeunload = x
- }
- },
- teardown: function (w, e) {
- if (this.onbeforeunload === e) {
- this.onbeforeunload = null
- }
- }
- }
- },
- simulate: function (x, w, A, z) {
- var y = al.extend(new al.Event(), A, {
- type: x,
- isSimulated: true,
- originalEvent: {}
- });
- if (z) {
- al.event.trigger(y, null, w)
- } else {
- al.event.dispatch.call(w, y)
- } if (y.isDefaultPrevented()) {
- A.preventDefault()
- }
- }
- };
- al.event.handle = al.event.dispatch;
- al.removeEvent = an.removeEventListener ? function (w, e, x) {
- if (w.removeEventListener) {
- w.removeEventListener(e, x, false)
- }
- } : function (w, e, x) {
- if (w.detachEvent) {
- w.detachEvent("on" + e, x)
- }
- };
- al.Event = function (w, e) {
- if (!(this instanceof al.Event)) {
- return new al.Event(w, e)
- }
- if (w && w.type) {
- this.originalEvent = w;
- this.type = w.type;
- this.isDefaultPrevented = (w.defaultPrevented || w.returnValue === false || w.getPreventDefault && w.getPreventDefault()) ? h : bD
- } else {
- this.type = w
- } if (e) {
- al.extend(this, e)
- }
- this.timeStamp = w && w.timeStamp || al.now();
- this[al.expando] = true
- };
- function bD() {
- return false
- }
- function h() {
- return true
- }
- al.Event.prototype = {
- preventDefault: function () {
- this.isDefaultPrevented = h;
- var w = this.originalEvent;
- if (!w) {
- return
- }
- if (w.preventDefault) {
- w.preventDefault()
- } else {
- w.returnValue = false
- }
- },
- stopPropagation: function () {
- this.isPropagationStopped = h;
- var w = this.originalEvent;
- if (!w) {
- return
- }
- if (w.stopPropagation) {
- w.stopPropagation()
- }
- w.cancelBubble = true
- },
- stopImmediatePropagation: function () {
- this.isImmediatePropagationStopped = h;
- this.stopPropagation()
- },
- isDefaultPrevented: bD,
- isPropagationStopped: bD,
- isImmediatePropagationStopped: bD
- };
- al.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
- }, function (w, e) {
- al.event.special[w] = al.event.special[e] = {
- delegateType: e,
- bindType: e,
- handle: function (z) {
- var y = this,
- D = z.relatedTarget,
- B = z.handleObj,
- x = B.selector,
- C, A;
- if (!D || B.origType === z.type || (D !== y && !al.contains(y, D))) {
- C = z.type;
- z.type = B.origType;
- A = B.handler.apply(this, arguments);
- z.type = C
- }
- return A
- }
- }
- });
- if (!al.support.submitBubbles) {
- al.event.special.submit = {
- setup: function () {
- if (al.nodeName(this, "form")) {
- return false
- }
- al.event.add(this, "click._submit keypress._submit", function (y) {
- var w = y.target,
- x = al.nodeName(w, "input") || al.nodeName(w, "button") ? w.form : ap;
- if (x && !x._submit_attached) {
- al.event.add(x, "submit._submit", function (e) {
- if (this.parentNode) {
- al.event.simulate("submit", this.parentNode, e, true)
- }
- });
- x._submit_attached = true
- }
- })
- },
- teardown: function () {
- if (al.nodeName(this, "form")) {
- return false
- }
- al.event.remove(this, "._submit")
- }
- }
- }
- if (!al.support.changeBubbles) {
- al.event.special.change = {
- setup: function () {
- if (bv.test(this.nodeName)) {
- if (this.type === "checkbox" || this.type === "radio") {
- al.event.add(this, "propertychange._change", function (e) {
- if (e.originalEvent.propertyName === "checked") {
- this._just_changed = true
- }
- });
- al.event.add(this, "click._change", function (e) {
- if (this._just_changed) {
- this._just_changed = false;
- al.event.simulate("change", this, e, true)
- }
- })
- }
- return false
- }
- al.event.add(this, "beforeactivate._change", function (x) {
- var w = x.target;
- if (bv.test(w.nodeName) && !w._change_attached) {
- al.event.add(w, "change._change", function (e) {
- if (this.parentNode && !e.isSimulated) {
- al.event.simulate("change", this.parentNode, e, true)
- }
- });
- w._change_attached = true
- }
- })
- },
- handle: function (w) {
- var e = w.target;
- if (this !== e || w.isSimulated || w.isTrigger || (e.type !== "radio" && e.type !== "checkbox")) {
- return w.handleObj.handler.apply(this, arguments)
- }
- },
- teardown: function () {
- al.event.remove(this, "._change");
- return bv.test(this.nodeName)
- }
- }
- }
- if (!al.support.focusinBubbles) {
- al.each({
- focus: "focusin",
- blur: "focusout"
- }, function (e, y) {
- var x = 0,
- w = function (z) {
- al.event.simulate(y, z.target, al.event.fix(z), true)
- };
- al.event.special[y] = {
- setup: function () {
- if (x++ === 0) {
- an.addEventListener(e, w, true)
- }
- },
- teardown: function () {
- if (--x === 0) {
- an.removeEventListener(e, w, true)
- }
- }
- }
- })
- }
- al.fn.extend({
- on: function (w, C, B, A, z) {
- var y, x;
- if (typeof w === "object") {
- if (typeof C !== "string") {
- B = C;
- C = ap
- }
- for (x in w) {
- this.on(x, C, B, w[x], z)
- }
- return this
- }
- if (B == null && A == null) {
- A = C;
- B = C = ap
- } else {
- if (A == null) {
- if (typeof C === "string") {
- A = B;
- B = ap
- } else {
- A = B;
- B = C;
- C = ap
- }
- }
- } if (A === false) {
- A = bD
- } else {
- if (!A) {
- return this
- }
- } if (z === 1) {
- y = A;
- A = function (e) {
- al().off(e);
- return y.apply(this, arguments)
- };
- A.guid = y.guid || (y.guid = al.guid++)
- }
- return this.each(function () {
- al.event.add(this, w, A, B, C)
- })
- },
- one: function (w, e, y, x) {
- return this.on.call(this, w, e, y, x, 1)
- },
- off: function (x, w, A) {
- if (x && x.preventDefault && x.handleObj) {
- var z = x.handleObj;
- al(x.delegateTarget).off(z.namespace ? z.type + "." + z.namespace : z.type, z.selector, z.handler);
- return this
- }
- if (typeof x === "object") {
- for (var y in x) {
- this.off(y, w, x[y])
- }
- return this
- }
- if (w === false || typeof w === "function") {
- A = w;
- w = ap
- }
- if (A === false) {
- A = bD
- }
- return this.each(function () {
- al.event.remove(this, x, A, w)
- })
- },
- bind: function (w, e, x) {
- return this.on(w, null, e, x)
- },
- unbind: function (w, e) {
- return this.off(w, null, e)
- },
- live: function (w, e, x) {
- al(this.context).on(w, this.selector, e, x);
- return this
- },
- die: function (w, e) {
- al(this.context).off(w, this.selector || "**", e);
- return this
- },
- delegate: function (w, e, y, x) {
- return this.on(e, w, y, x)
- },
- undelegate: function (w, e, x) {
- return arguments.length == 1 ? this.off(w, "**") : this.off(e, w, x)
- },
- trigger: function (w, e) {
- return this.each(function () {
- al.event.trigger(w, e, this)
- })
- },
- triggerHandler: function (w, e) {
- if (this[0]) {
- return al.event.trigger(w, e, this[0], true)
- }
- },
- toggle: function (z) {
- var y = arguments,
- e = z.guid || al.guid++,
- w = 0,
- x = function (B) {
- var A = (al._data(this, "lastToggle" + z.guid) || 0) % w;
- al._data(this, "lastToggle" + z.guid, A + 1);
- B.preventDefault();
- return y[A].apply(this, arguments) || false
- };
- x.guid = e;
- while (w < y.length) {
- y[w++].guid = e
- }
- return this.click(x)
- },
- hover: function (w, e) {
- return this.mouseenter(w).mouseleave(e || w)
- }
- });
- al.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "), function (e, w) {
- al.fn[w] = function (y, x) {
- if (x == null) {
- x = y;
- y = null
- }
- return arguments.length > 0 ? this.bind(w, y, x) : this.trigger(w)
- };
- if (al.attrFn) {
- al.attrFn[w] = true
- }
- if (a6.test(w)) {
- al.event.fixHooks[w] = al.event.keyHooks
- }
- if (bx.test(w)) {
- al.event.fixHooks[w] = al.event.mouseHooks
- }
- });
- (function () {
- var bO = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
- A = "sizcache" + (Math.random() + "").replace(".", ""),
- G = 0,
- M = Object.prototype.toString,
- z = false,
- y = true,
- K = /\\/g,
- bQ = /\r\n/g,
- bS = /\W/;
- [0, 0].sort(function () {
- y = false;
- return 0
- });
- var L = function (b5, b4, b3, b2) {
- b3 = b3 || [];
- b4 = b4 || an;
- var b1 = b4;
- if (b4.nodeType !== 1 && b4.nodeType !== 9) {
- return []
- }
- if (!b5 || typeof b5 !== "string") {
- return b3
- }
- var bU, b6, b9, bT, b0, b8, b7, bY, bW = true,
- bV = L.isXML(b4),
- bX = [],
- bZ = b5;
- do {
- bO.exec("");
- bU = bO.exec(bZ);
- if (bU) {
- bZ = bU[3];
- bX.push(bU[1]);
- if (bU[2]) {
- bT = bU[3];
- break
- }
- }
- } while (bU);
- if (bX.length > 1 && H.exec(b5)) {
- if (bX.length === 2 && I.relative[bX[0]]) {
- b6 = C(bX[0] + bX[1], b4, b2)
- } else {
- b6 = I.relative[bX[0]] ? [b4] : L(bX.shift(), b4);
- while (bX.length) {
- b5 = bX.shift();
- if (I.relative[b5]) {
- b5 += bX.shift()
- }
- b6 = C(b5, b6, b2)
- }
- }
- } else {
- if (!b2 && bX.length > 1 && b4.nodeType === 9 && !bV && I.match.ID.test(bX[0]) && !I.match.ID.test(bX[bX.length - 1])) {
- b0 = L.find(bX.shift(), b4, bV);
- b4 = b0.expr ? L.filter(b0.expr, b0.set)[0] : b0.set[0]
- }
- if (b4) {
- b0 = b2 ? {
- expr: bX.pop(),
- set: E(b2)
- } : L.find(bX.pop(), bX.length === 1 && (bX[0] === "~" || bX[0] === "+") && b4.parentNode ? b4.parentNode : b4, bV);
- b6 = b0.expr ? L.filter(b0.expr, b0.set) : b0.set;
- if (bX.length > 0) {
- b9 = E(b6)
- } else {
- bW = false
- }
- while (bX.length) {
- b8 = bX.pop();
- b7 = b8;
- if (!I.relative[b8]) {
- b8 = ""
- } else {
- b7 = bX.pop()
- } if (b7 == null) {
- b7 = b4
- }
- I.relative[b8](b9, b7, bV)
- }
- } else {
- b9 = bX = []
- }
- } if (!b9) {
- b9 = b6
- }
- if (!b9) {
- L.error(b8 || b5)
- }
- if (M.call(b9) === "[object Array]") {
- if (!bW) {
- b3.push.apply(b3, b9)
- } else {
- if (b4 && b4.nodeType === 1) {
- for (bY = 0; b9[bY] != null; bY++) {
- if (b9[bY] && (b9[bY] === true || b9[bY].nodeType === 1 && L.contains(b4, b9[bY]))) {
- b3.push(b6[bY])
- }
- }
- } else {
- for (bY = 0; b9[bY] != null; bY++) {
- if (b9[bY] && b9[bY].nodeType === 1) {
- b3.push(b6[bY])
- }
- }
- }
- }
- } else {
- E(b9, b3)
- } if (bT) {
- L(bT, b1, b3, b2);
- L.uniqueSort(b3)
- }
- return b3
- };
- L.uniqueSort = function (e) {
- if (D) {
- z = y;
- e.sort(D);
- if (z) {
- for (var bT = 1; bT < e.length; bT++) {
- if (e[bT] === e[bT - 1]) {
- e.splice(bT--, 1)
- }
- }
- }
- }
- return e
- };
- L.matches = function (bT, e) {
- return L(bT, null, null, e)
- };
- L.matchesSelector = function (bT, e) {
- return L(e, null, null, [bT]).length > 0
- };
- L.find = function (b0, bZ, bY) {
- var bX, bU, bW, bV, e, bT;
- if (!b0) {
- return []
- }
- for (bU = 0, bW = I.order.length; bU < bW; bU++) {
- e = I.order[bU];
- if ((bV = I.leftMatch[e].exec(b0))) {
- bT = bV[1];
- bV.splice(1, 1);
- if (bT.substr(bT.length - 1) !== "\\") {
- bV[1] = (bV[1] || "").replace(K, "");
- bX = I.find[e](bV, bZ, bY);
- if (bX != null) {
- b0 = b0.replace(I.match[e], "");
- break
- }
- }
- }
- }
- if (!bX) {
- bX = typeof bZ.getElementsByTagName !== "undefined" ? bZ.getElementsByTagName("*") : []
- }
- return {
- set: bX,
- expr: b0
- }
- };
- L.filter = function (b5, b4, b3, b2) {
- var b1, bU, bT, b9, b7, bV, bX, bY, b6, bW = b5,
- b8 = [],
- b0 = b4,
- bZ = b4 && b4[0] && L.isXML(b4[0]);
- while (b5 && b4.length) {
- for (bT in I.filter) {
- if ((b1 = I.leftMatch[bT].exec(b5)) != null && b1[2]) {
- bV = I.filter[bT];
- bX = b1[1];
- bU = false;
- b1.splice(1, 1);
- if (bX.substr(bX.length - 1) === "\\") {
- continue
- }
- if (b0 === b8) {
- b8 = []
- }
- if (I.preFilter[bT]) {
- b1 = I.preFilter[bT](b1, b0, b3, b8, b2, bZ);
- if (!b1) {
- bU = b9 = true
- } else {
- if (b1 === true) {
- continue
- }
- }
- }
- if (b1) {
- for (bY = 0;
- (b7 = b0[bY]) != null; bY++) {
- if (b7) {
- b9 = bV(b7, b1, bY, b0);
- b6 = b2 ^ b9;
- if (b3 && b9 != null) {
- if (b6) {
- bU = true
- } else {
- b0[bY] = false
- }
- } else {
- if (b6) {
- b8.push(b7);
- bU = true
- }
- }
- }
- }
- }
- if (b9 !== ap) {
- if (!b3) {
- b0 = b8
- }
- b5 = b5.replace(I.match[bT], "");
- if (!bU) {
- return []
- }
- break
- }
- }
- }
- if (b5 === bW) {
- if (bU == null) {
- L.error(b5)
- } else {
- break
- }
- }
- bW = b5
- }
- return b0
- };
- L.error = function (e) {
- throw "Syntax error, unrecognized expression: " + e
- };
- var J = L.getText = function (bT) {
- var bV, bW, e = bT.nodeType,
- bU = "";
- if (e) {
- if (e === 1) {
- if (typeof bT.textContent === "string") {
- return bT.textContent
- } else {
- if (typeof bT.innerText === "string") {
- return bT.innerText.replace(bQ, "")
- } else {
- for (bT = bT.firstChild; bT; bT = bT.nextSibling) {
- bU += J(bT)
- }
- }
- }
- } else {
- if (e === 3 || e === 4) {
- return bT.nodeValue
- }
- }
- } else {
- for (bV = 0;
- (bW = bT[bV]); bV++) {
- if (bW.nodeType !== 8) {
- bU += J(bW)
- }
- }
- }
- return bU
- };
- var I = L.selectors = {
- order: ["ID", "NAME", "TAG"],
- match: {
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
- },
- leftMatch: {},
- attrMap: {
- "class": "className",
- "for": "htmlFor"
- },
- attrHandle: {
- href: function (e) {
- return e.getAttribute("href")
- },
- type: function (e) {
- return e.getAttribute("type")
- }
- },
- relative: {
- "+": function (bU, e) {
- var bZ = typeof e === "string",
- bX = bZ && !bS.test(e),
- bY = bZ && !bX;
- if (bX) {
- e = e.toLowerCase()
- }
- for (var bV = 0, bT = bU.length, bW; bV < bT; bV++) {
- if ((bW = bU[bV])) {
- while ((bW = bW.previousSibling) && bW.nodeType !== 1) {}
- bU[bV] = bY || bW && bW.nodeName.toLowerCase() === e ? bW || false : bW === e
- }
- }
- if (bY) {
- L.filter(e, bU, true)
- }
- },
- ">": function (bU, e) {
- var bY, bW = typeof e === "string",
- bV = 0,
- bT = bU.length;
- if (bW && !bS.test(e)) {
- e = e.toLowerCase();
- for (; bV < bT; bV++) {
- bY = bU[bV];
- if (bY) {
- var bX = bY.parentNode;
- bU[bV] = bX.nodeName.toLowerCase() === e ? bX : false
- }
- }
- } else {
- for (; bV < bT; bV++) {
- bY = bU[bV];
- if (bY) {
- bU[bV] = bW ? bY.parentNode : bY.parentNode === e
- }
- }
- if (bW) {
- L.filter(e, bU, true)
- }
- }
- },
- "": function (bU, bT, bX) {
- var bW, bV = G++,
- e = bP;
- if (typeof bT === "string" && !bS.test(bT)) {
- bT = bT.toLowerCase();
- bW = bT;
- e = w
- }
- e("parentNode", bT, bV, bU, bW, bX)
- },
- "~": function (bU, bT, bX) {
- var bW, bV = G++,
- e = bP;
- if (typeof bT === "string" && !bS.test(bT)) {
- bT = bT.toLowerCase();
- bW = bT;
- e = w
- }
- e("previousSibling", bT, bV, bU, bW, bX)
- }
- },
- find: {
- ID: function (bU, bT, bV) {
- if (typeof bT.getElementById !== "undefined" && !bV) {
- var e = bT.getElementById(bU[1]);
- return e && e.parentNode ? [e] : []
- }
- },
- NAME: function (bU, e) {
- if (typeof e.getElementsByName !== "undefined") {
- var bX = [],
- bW = e.getElementsByName(bU[1]);
- for (var bV = 0, bT = bW.length; bV < bT; bV++) {
- if (bW[bV].getAttribute("name") === bU[1]) {
- bX.push(bW[bV])
- }
- }
- return bX.length === 0 ? null : bX
- }
- },
- TAG: function (bT, e) {
- if (typeof e.getElementsByTagName !== "undefined") {
- return e.getElementsByTagName(bT[1])
- }
- }
- },
- preFilter: {
- CLASS: function (bU, bT, b0, bZ, bY, bX) {
- bU = " " + bU[1].replace(K, "") + " ";
- if (bX) {
- return bU
- }
- for (var bV = 0, bW;
- (bW = bT[bV]) != null; bV++) {
- if (bW) {
- if (bY ^ (bW.className && (" " + bW.className + " ").replace(/[\t\n\r]/g, " ").indexOf(bU) >= 0)) {
- if (!b0) {
- bZ.push(bW)
- }
- } else {
- if (b0) {
- bT[bV] = false
- }
- }
- }
- }
- return false
- },
- ID: function (e) {
- return e[1].replace(K, "")
- },
- TAG: function (bT, e) {
- return bT[1].replace(K, "").toLowerCase()
- },
- CHILD: function (bT) {
- if (bT[1] === "nth") {
- if (!bT[2]) {
- L.error(bT[0])
- }
- bT[2] = bT[2].replace(/^\+|\s*/g, "");
- var e = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(bT[2] === "even" && "2n" || bT[2] === "odd" && "2n+1" || !/\D/.test(bT[2]) && "0n+" + bT[2] || bT[2]);
- bT[2] = (e[1] + (e[2] || 1)) - 0;
- bT[3] = e[3] - 0
- } else {
- if (bT[2]) {
- L.error(bT[0])
- }
- }
- bT[0] = G++;
- return bT
- },
- ATTR: function (bU, bT, bZ, bY, bX, bW) {
- var bV = bU[1] = bU[1].replace(K, "");
- if (!bW && I.attrMap[bV]) {
- bU[1] = I.attrMap[bV]
- }
- bU[4] = (bU[4] || bU[5] || "").replace(K, "");
- if (bU[2] === "~=") {
- bU[4] = " " + bU[4] + " "
- }
- return bU
- },
- PSEUDO: function (bU, bT, bY, bX, bW) {
- if (bU[1] === "not") {
- if ((bO.exec(bU[3]) || "").length > 1 || /^\w/.test(bU[3])) {
- bU[3] = L(bU[3], null, null, bT)
- } else {
- var bV = L.filter(bU[3], bT, bY, true ^ bW);
- if (!bY) {
- bX.push.apply(bX, bV)
- }
- return false
- }
- } else {
- if (I.match.POS.test(bU[0]) || I.match.CHILD.test(bU[0])) {
- return true
- }
- }
- return bU
- },
- POS: function (e) {
- e.unshift(true);
- return e
- }
- },
- filters: {
- enabled: function (e) {
- return e.disabled === false && e.type !== "hidden"
- },
- disabled: function (e) {
- return e.disabled === true
- },
- checked: function (e) {
- return e.checked === true
- },
- selected: function (e) {
- if (e.parentNode) {
- e.parentNode.selectedIndex
- }
- return e.selected === true
- },
- parent: function (e) {
- return !!e.firstChild
- },
- empty: function (e) {
- return !e.firstChild
- },
- has: function (bT, bU, e) {
- return !!L(e[3], bT).length
- },
- header: function (e) {
- return (/h\d/i).test(e.nodeName)
- },
- text: function (bT) {
- var e = bT.getAttribute("type"),
- bU = bT.type;
- return bT.nodeName.toLowerCase() === "input" && "text" === bU && (e === bU || e === null)
- },
- radio: function (e) {
- return e.nodeName.toLowerCase() === "input" && "radio" === e.type
- },
- checkbox: function (e) {
- return e.nodeName.toLowerCase() === "input" && "checkbox" === e.type
- },
- file: function (e) {
- return e.nodeName.toLowerCase() === "input" && "file" === e.type
- },
- password: function (e) {
- return e.nodeName.toLowerCase() === "input" && "password" === e.type
- },
- submit: function (bT) {
- var e = bT.nodeName.toLowerCase();
- return (e === "input" || e === "button") && "submit" === bT.type
- },
- image: function (e) {
- return e.nodeName.toLowerCase() === "input" && "image" === e.type
- },
- reset: function (bT) {
- var e = bT.nodeName.toLowerCase();
- return (e === "input" || e === "button") && "reset" === bT.type
- },
- button: function (bT) {
- var e = bT.nodeName.toLowerCase();
- return e === "input" && "button" === bT.type || e === "button"
- },
- input: function (e) {
- return (/input|select|textarea|button/i).test(e.nodeName)
- },
- focus: function (e) {
- return e === e.ownerDocument.activeElement
- }
- },
- setFilters: {
- first: function (e, bT) {
- return bT === 0
- },
- last: function (bT, bU, e, bV) {
- return bU === bV.length - 1
- },
- even: function (e, bT) {
- return bT % 2 === 0
- },
- odd: function (e, bT) {
- return bT % 2 === 1
- },
- lt: function (bT, bU, e) {
- return bU < e[3] - 0
- },
- gt: function (bT, bU, e) {
- return bU > e[3] - 0
- },
- nth: function (bT, bU, e) {
- return e[3] - 0 === bU
- },
- eq: function (bT, bU, e) {
- return e[3] - 0 === bU
- }
- },
- filter: {
- PSEUDO: function (b1, b0, bW, bZ) {
- var bY = b0[1],
- bT = I.filters[bY];
- if (bT) {
- return bT(b1, bW, b0, bZ)
- } else {
- if (bY === "contains") {
- return (b1.textContent || b1.innerText || J([b1]) || "").indexOf(b0[3]) >= 0
- } else {
- if (bY === "not") {
- var bX = b0[3];
- for (var bV = 0, bU = bX.length; bV < bU; bV++) {
- if (bX[bV] === b1) {
- return false
- }
- }
- return true
- } else {
- L.error(bY)
- }
- }
- }
- },
- CHILD: function (bZ, bY) {
- var bX, b2, bW, b1, bT, bV, b0, e = bY[1],
- bU = bZ;
- switch (e) {
- case "only":
- case "first":
- while ((bU = bU.previousSibling)) {
- if (bU.nodeType === 1) {
- return false
- }
- }
- if (e === "first") {
- return true
- }
- bU = bZ;
- case "last":
- while ((bU = bU.nextSibling)) {
- if (bU.nodeType === 1) {
- return false
- }
- }
- return true;
- case "nth":
- bX = bY[2];
- b2 = bY[3];
- if (bX === 1 && b2 === 0) {
- return true
- }
- bW = bY[0];
- b1 = bZ.parentNode;
- if (b1 && (b1[A] !== bW || !bZ.nodeIndex)) {
- bV = 0;
- for (bU = b1.firstChild; bU; bU = bU.nextSibling) {
- if (bU.nodeType === 1) {
- bU.nodeIndex = ++bV
- }
- }
- b1[A] = bW
- }
- b0 = bZ.nodeIndex - b2;
- if (bX === 0) {
- return b0 === 0
- } else {
- return (b0 % bX === 0 && b0 / bX >= 0)
- }
- }
- },
- ID: function (bT, e) {
- return bT.nodeType === 1 && bT.getAttribute("id") === e
- },
- TAG: function (bT, e) {
- return (e === "*" && bT.nodeType === 1) || !!bT.nodeName && bT.nodeName.toLowerCase() === e
- },
- CLASS: function (bT, e) {
- return (" " + (bT.className || bT.getAttribute("class")) + " ").indexOf(e) > -1
- },
- ATTR: function (bV, bT) {
- var bY = bT[1],
- e = L.attr ? L.attr(bV, bY) : I.attrHandle[bY] ? I.attrHandle[bY](bV) : bV[bY] != null ? bV[bY] : bV.getAttribute(bY),
- bX = e + "",
- bW = bT[2],
- bU = bT[4];
- return e == null ? bW === "!=" : !bW && L.attr ? e != null : bW === "=" ? bX === bU : bW === "*=" ? bX.indexOf(bU) >= 0 : bW === "~=" ? (" " + bX + " ").indexOf(bU) >= 0 : !bU ? bX && e !== false : bW === "!=" ? bX !== bU : bW === "^=" ? bX.indexOf(bU) === 0 : bW === "$=" ? bX.substr(bX.length - bU.length) === bU : bW === "|=" ? bX === bU || bX.substr(0, bU.length + 1) === bU + "-" : false
- },
- POS: function (bT, e, bU, bX) {
- var bW = e[2],
- bV = I.setFilters[bW];
- if (bV) {
- return bV(bT, bU, e, bX)
- }
- }
- }
- };
- var H = I.match.POS,
- x = function (bT, e) {
- return "\\" + (e - 0 + 1)
- };
- for (var F in I.match) {
- I.match[F] = new RegExp(I.match[F].source + (/(?![^\[]*\])(?![^\(]*\))/.source));
- I.leftMatch[F] = new RegExp(/(^(?:.|\r|\n)*?)/.source + I.match[F].source.replace(/\\(\d+)/g, x))
- }
- var E = function (bT, e) {
- bT = Array.prototype.slice.call(bT, 0);
- if (e) {
- e.push.apply(e, bT);
- return e
- }
- return bT
- };
- try {
- Array.prototype.slice.call(an.documentElement.childNodes, 0)[0].nodeType
- } catch (bR) {
- E = function (bU, e) {
- var bW = 0,
- bV = e || [];
- if (M.call(bU) === "[object Array]") {
- Array.prototype.push.apply(bV, bU)
- } else {
- if (typeof bU.length === "number") {
- for (var bT = bU.length; bW < bT; bW++) {
- bV.push(bU[bW])
- }
- } else {
- for (; bU[bW]; bW++) {
- bV.push(bU[bW])
- }
- }
- }
- return bV
- }
- }
- var D, B;
- if (an.documentElement.compareDocumentPosition) {
- D = function (bT, e) {
- if (bT === e) {
- z = true;
- return 0
- }
- if (!bT.compareDocumentPosition || !e.compareDocumentPosition) {
- return bT.compareDocumentPosition ? -1 : 1
- }
- return bT.compareDocumentPosition(e) & 4 ? -1 : 1
- }
- } else {
- D = function (b0, bZ) {
- if (b0 === bZ) {
- z = true;
- return 0
- } else {
- if (b0.sourceIndex && bZ.sourceIndex) {
- return b0.sourceIndex - bZ.sourceIndex
- }
- }
- var bX, bT, bU = [],
- e = [],
- bW = b0.parentNode,
- bY = bZ.parentNode,
- b1 = bW;
- if (bW === bY) {
- return B(b0, bZ)
- } else {
- if (!bW) {
- return -1
- } else {
- if (!bY) {
- return 1
- }
- }
- }
- while (b1) {
- bU.unshift(b1);
- b1 = b1.parentNode
- }
- b1 = bY;
- while (b1) {
- e.unshift(b1);
- b1 = b1.parentNode
- }
- bX = bU.length;
- bT = e.length;
- for (var bV = 0; bV < bX && bV < bT; bV++) {
- if (bU[bV] !== e[bV]) {
- return B(bU[bV], e[bV])
- }
- }
- return bV === bX ? B(b0, e[bV], -1) : B(bU[bV], bZ, 1)
- };
- B = function (bT, e, bV) {
- if (bT === e) {
- return bV
- }
- var bU = bT.nextSibling;
- while (bU) {
- if (bU === e) {
- return -1
- }
- bU = bU.nextSibling
- }
- return 1
- }
- }(function () {
- var bT = an.createElement("div"),
- bU = "script" + (new Date()).getTime(),
- e = an.documentElement;
- bT.innerHTML = "<a name='" + bU + "'/>";
- e.insertBefore(bT, e.firstChild);
- if (an.getElementById(bU)) {
- I.find.ID = function (bX, bW, bY) {
- if (typeof bW.getElementById !== "undefined" && !bY) {
- var bV = bW.getElementById(bX[1]);
- return bV ? bV.id === bX[1] || typeof bV.getAttributeNode !== "undefined" && bV.getAttributeNode("id").nodeValue === bX[1] ? [bV] : ap : []
- }
- };
- I.filter.ID = function (bW, bV) {
- var bX = typeof bW.getAttributeNode !== "undefined" && bW.getAttributeNode("id");
- return bW.nodeType === 1 && bX && bX.nodeValue === bV
- }
- }
- e.removeChild(bT);
- e = bT = null
- })();
- (function () {
- var bT = an.createElement("div");
- bT.appendChild(an.createComment(""));
- if (bT.getElementsByTagName("*").length > 0) {
- I.find.TAG = function (bU, e) {
- var bX = e.getElementsByTagName(bU[1]);
- if (bU[1] === "*") {
- var bW = [];
- for (var bV = 0; bX[bV]; bV++) {
- if (bX[bV].nodeType === 1) {
- bW.push(bX[bV])
- }
- }
- bX = bW
- }
- return bX
- }
- }
- bT.innerHTML = "<a href='#'></a>";
- if (bT.firstChild && typeof bT.firstChild.getAttribute !== "undefined" && bT.firstChild.getAttribute("href") !== "#") {
- I.attrHandle.href = function (e) {
- return e.getAttribute("href", 2)
- }
- }
- bT = null
- })(); if (an.querySelectorAll) {
- (function () {
- var bT = L,
- bV = an.createElement("div"),
- bU = "__sizzle__";
- bV.innerHTML = "<p class='TEST'></p>";
- if (bV.querySelectorAll && bV.querySelectorAll(".TEST").length === 0) {
- return
- }
- L = function (b7, b5, b4, b3) {
- b5 = b5 || an;
- if (!b3 && !L.isXML(b5)) {
- var b2 = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b7);
- if (b2 && (b5.nodeType === 1 || b5.nodeType === 9)) {
- if (b2[1]) {
- return E(b5.getElementsByTagName(b7), b4)
- } else {
- if (b2[2] && I.find.CLASS && b5.getElementsByClassName) {
- return E(b5.getElementsByClassName(b2[2]), b4)
- }
- }
- }
- if (b5.nodeType === 9) {
- if (b7 === "body" && b5.body) {
- return E([b5.body], b4)
- } else {
- if (b2 && b2[3]) {
- var b1 = b5.getElementById(b2[3]);
- if (b1 && b1.parentNode) {
- if (b1.id === b2[3]) {
- return E([b1], b4)
- }
- } else {
- return E([], b4)
- }
- }
- }
- try {
- return E(b5.querySelectorAll(b7), b4)
- } catch (bY) {}
- } else {
- if (b5.nodeType === 1 && b5.nodeName.toLowerCase() !== "object") {
- var b0 = b5,
- bX = b5.getAttribute("id"),
- bW = bX || bU,
- b8 = b5.parentNode,
- b6 = /^\s*[+~]/.test(b7);
- if (!bX) {
- b5.setAttribute("id", bW)
- } else {
- bW = bW.replace(/'/g, "\\$&")
- } if (b6 && b8) {
- b5 = b5.parentNode
- }
- try {
- if (!b6 || b8) {
- return E(b5.querySelectorAll("[id='" + bW + "'] " + b7), b4)
- }
- } catch (bZ) {} finally {
- if (!bX) {
- b0.removeAttribute("id")
- }
- }
- }
- }
- }
- return bT(b7, b5, b4, b3)
- };
- for (var e in bT) {
- L[e] = bT[e]
- }
- bV = null
- })()
- }(function () {
- var bW = an.documentElement,
- bU = bW.matchesSelector || bW.mozMatchesSelector || bW.webkitMatchesSelector || bW.msMatchesSelector;
- if (bU) {
- var bT = !bU.call(an.createElement("div"), "div"),
- e = false;
- try {
- bU.call(an.documentElement, "[test!='']:sizzle")
- } catch (bV) {
- e = true
- }
- L.matchesSelector = function (bY, bX) {
- bX = bX.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
- if (!L.isXML(bY)) {
- try {
- if (e || !I.match.PSEUDO.test(bX) && !/!=/.test(bX)) {
- var b0 = bU.call(bY, bX);
- if (b0 || !bT || bY.document && bY.document.nodeType !== 11) {
- return b0
- }
- }
- } catch (bZ) {}
- }
- return L(bX, null, null, [bY]).length > 0
- }
- }
- })();
- (function () {
- var e = an.createElement("div");
- e.innerHTML = "<div class='test e'></div><div class='test'></div>";
- if (!e.getElementsByClassName || e.getElementsByClassName("e").length === 0) {
- return
- }
- e.lastChild.className = "e";
- if (e.getElementsByClassName("e").length === 1) {
- return
- }
- I.order.splice(1, 0, "CLASS");
- I.find.CLASS = function (bU, bT, bV) {
- if (typeof bT.getElementsByClassName !== "undefined" && !bV) {
- return bT.getElementsByClassName(bU[1])
- }
- };
- e = null
- })();
- function w(b2, b1, b0, bZ, bY, bX) {
- for (var bU = 0, bT = bZ.length; bU < bT; bU++) {
- var bW = bZ[bU];
- if (bW) {
- var bV = false;
- bW = bW[b2];
- while (bW) {
- if (bW[A] === b0) {
- bV = bZ[bW.sizset];
- break
- }
- if (bW.nodeType === 1 && !bX) {
- bW[A] = b0;
- bW.sizset = bU
- }
- if (bW.nodeName.toLowerCase() === b1) {
- bV = bW;
- break
- }
- bW = bW[b2]
- }
- bZ[bU] = bV
- }
- }
- }
- function bP(b2, b1, b0, bZ, bY, bX) {
- for (var bU = 0, bT = bZ.length; bU < bT; bU++) {
- var bW = bZ[bU];
- if (bW) {
- var bV = false;
- bW = bW[b2];
- while (bW) {
- if (bW[A] === b0) {
- bV = bZ[bW.sizset];
- break
- }
- if (bW.nodeType === 1) {
- if (!bX) {
- bW[A] = b0;
- bW.sizset = bU
- }
- if (typeof b1 !== "string") {
- if (bW === b1) {
- bV = true;
- break
- }
- } else {
- if (L.filter(b1, [bW]).length > 0) {
- bV = bW;
- break
- }
- }
- }
- bW = bW[b2]
- }
- bZ[bU] = bV
- }
- }
- }
- if (an.documentElement.contains) {
- L.contains = function (bT, e) {
- return bT !== e && (bT.contains ? bT.contains(e) : true)
- }
- } else {
- if (an.documentElement.compareDocumentPosition) {
- L.contains = function (bT, e) {
- return !!(bT.compareDocumentPosition(e) & 16)
- }
- } else {
- L.contains = function () {
- return false
- }
- }
- }
- L.isXML = function (bT) {
- var e = (bT ? bT.ownerDocument || bT : 0).documentElement;
- return e ? e.nodeName !== "HTML" : false
- };
- var C = function (b0, bZ, bW) {
- var bV, bX = [],
- bU = "",
- bY = bZ.nodeType ? [bZ] : bZ;
- while ((bV = I.match.PSEUDO.exec(b0))) {
- bU += bV[0];
- b0 = b0.replace(I.match.PSEUDO, "")
- }
- b0 = I.relative[b0] ? b0 + "*" : b0;
- for (var bT = 0, e = bY.length; bT < e; bT++) {
- L(b0, bY[bT], bX, bW)
- }
- return L.filter(bU, bX)
- };
- L.attr = al.attr;
- L.selectors.attrMap = {};
- al.find = L;
- al.expr = L.selectors;
- al.expr[":"] = al.expr.filters;
- al.unique = L.uniqueSort;
- al.text = L.getText;
- al.isXMLDoc = L.isXML;
- al.contains = L.contains
- })();
- var a3 = /Until$/,
- aD = /^(?:parents|prevUntil|prevAll)/,
- bs = /,/,
- bI = /^.[^:#\[\.,]*$/,
- ad = Array.prototype.slice,
- V = al.expr.match.POS,
- aJ = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
- al.fn.extend({
- find: function (x) {
- var e = this,
- y, w;
- if (typeof x !== "string") {
- return al(x).filter(function () {
- for (y = 0, w = e.length; y < w; y++) {
- if (al.contains(e[y], this)) {
- return true
- }
- }
- })
- }
- var C = this.pushStack("", "find", x),
- A, B, z;
- for (y = 0, w = this.length; y < w; y++) {
- A = C.length;
- al.find(x, this[y], C);
- if (y > 0) {
- for (B = A; B < C.length; B++) {
- for (z = 0; z < A; z++) {
- if (C[z] === C[B]) {
- C.splice(B--, 1);
- break
- }
- }
- }
- }
- }
- return C
- },
- has: function (w) {
- var e = al(w);
- return this.filter(function () {
- for (var y = 0, x = e.length; y < x; y++) {
- if (al.contains(this, e[y])) {
- return true
- }
- }
- })
- },
- not: function (e) {
- return this.pushStack(aQ(this, e, false), "not", e)
- },
- filter: function (e) {
- return this.pushStack(aQ(this, e, true), "filter", e)
- },
- is: function (e) {
- return !!e && (typeof e === "string" ? V.test(e) ? al(e, this.context).index(this[0]) >= 0 : al.filter(e, this).length > 0 : this.filter(e).length > 0)
- },
- closest: function (y, w) {
- var D = [],
- z, x, C = this[0];
- if (al.isArray(y)) {
- var B = 1;
- while (C && C.ownerDocument && C !== w) {
- for (z = 0; z < y.length; z++) {
- if (al(C).is(y[z])) {
- D.push({
- selector: y[z],
- elem: C,
- level: B
- })
- }
- }
- C = C.parentNode;
- B++
- }
- return D
- }
- var A = V.test(y) || typeof y !== "string" ? al(y, w || this.context) : 0;
- for (z = 0, x = this.length; z < x; z++) {
- C = this[z];
- while (C) {
- if (A ? A.index(C) > -1 : al.find.matchesSelector(C, y)) {
- D.push(C);
- break
- } else {
- C = C.parentNode;
- if (!C || !C.ownerDocument || C === w || C.nodeType === 11) {
- break
- }
- }
- }
- }
- D = D.length > 1 ? al.unique(D) : D;
- return this.pushStack(D, "closest", y)
- },
- index: function (e) {
- if (!e) {
- return (this[0] && this[0].parentNode) ? this.prevAll().length : -1
- }
- if (typeof e === "string") {
- return al.inArray(this[0], al(e))
- }
- return al.inArray(e.jquery ? e[0] : e, this)
- },
- add: function (w, e) {
- var y = typeof w === "string" ? al(w, e) : al.makeArray(w && w.nodeType ? [w] : w),
- x = al.merge(this.get(), y);
- return this.pushStack(Q(y[0]) || Q(x[0]) ? x : al.unique(x))
- },
- andSelf: function () {
- return this.add(this.prevObject)
- }
- });
- function Q(e) {
- return !e || !e.parentNode || e.parentNode.nodeType === 11
- }
- al.each({
- parent: function (w) {
- var e = w.parentNode;
- return e && e.nodeType !== 11 ? e : null
- },
- parents: function (e) {
- return al.dir(e, "parentNode")
- },
- parentsUntil: function (w, x, e) {
- return al.dir(w, "parentNode", e)
- },
- next: function (e) {
- return al.nth(e, 2, "nextSibling")
- },
- prev: function (e) {
- return al.nth(e, 2, "previousSibling")
- },
- nextAll: function (e) {
- return al.dir(e, "nextSibling")
- },
- prevAll: function (e) {
- return al.dir(e, "previousSibling")
- },
- nextUntil: function (w, x, e) {
- return al.dir(w, "nextSibling", e)
- },
- prevUntil: function (w, x, e) {
- return al.dir(w, "previousSibling", e)
- },
- siblings: function (e) {
- return al.sibling(e.parentNode.firstChild, e)
- },
- children: function (e) {
- return al.sibling(e.firstChild)
- },
- contents: function (e) {
- return al.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : al.makeArray(e.childNodes)
- }
- }, function (x, w) {
- al.fn[x] = function (y, e) {
- var A = al.map(this, w, y),
- z = ad.call(arguments);
- if (!a3.test(x)) {
- e = y
- }
- if (e && typeof e === "string") {
- A = al.filter(e, A)
- }
- A = this.length > 1 && !aJ[x] ? al.unique(A) : A;
- if ((this.length > 1 || bs.test(e)) && aD.test(x)) {
- A = A.reverse()
- }
- return this.pushStack(A, x, z.join(","))
- }
- });
- al.extend({
- filter: function (w, e, x) {
- if (x) {
- w = ":not(" + w + ")"
- }
- return e.length === 1 ? al.find.matchesSelector(e[0], w) ? [e[0]] : [] : al.find.matches(w, e)
- },
- dir: function (w, e, z) {
- var y = [],
- x = w[e];
- while (x && x.nodeType !== 9 && (z === ap || x.nodeType !== 1 || !al(x).is(z))) {
- if (x.nodeType === 1) {
- y.push(x)
- }
- x = x[e]
- }
- return y
- },
- nth: function (x, w, A, z) {
- w = w || 1;
- var y = 0;
- for (; x; x = x[A]) {
- if (x.nodeType === 1 && ++y === w) {
- break
- }
- }
- return x
- },
- sibling: function (x, e) {
- var w = [];
- for (; x; x = x.nextSibling) {
- if (x.nodeType === 1 && x !== e) {
- w.push(x)
- }
- }
- return w
- }
- });
- function aQ(z, y, x) {
- y = y || 0;
- if (al.isFunction(y)) {
- return al.grep(z, function (A, B) {
- var e = !!y.call(A, B, A);
- return e === x
- })
- } else {
- if (y.nodeType) {
- return al.grep(z, function (e, A) {
- return (e === y) === x
- })
- } else {
- if (typeof y === "string") {
- var w = al.grep(z, function (e) {
- return e.nodeType === 1
- });
- if (bI.test(y)) {
- return al.filter(y, w, !x)
- } else {
- y = al.filter(y, w)
- }
- }
- }
- }
- return al.grep(z, function (e, A) {
- return (al.inArray(e, y) >= 0) === x
- })
- }
- function a(w) {
- var e = a2.split(" "),
- x = w.createDocumentFragment();
- if (x.createElement) {
- while (e.length) {
- x.createElement(e.pop())
- }
- }
- return x
- }
- var a2 = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
- av = / jQuery\d+="(?:\d+|null)"/g,
- aE = /^\s+/,
- ae = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
- c = /<([\w:]+)/,
- u = /<tbody/i,
- ah = /<|&#?\w+;/,
- at = /<(?:script|style)/i,
- ac = /<(?:script|object|embed|option|style)/i,
- aw = new RegExp("<(?:" + a2.replace(" ", "|") + ")", "i"),
- m = /checked\s*(?:[^=]|=\s*.checked.)/i,
- bF = /\/(java|ecma)script/i,
- a5 = /^\s*<!(?:\[CDATA\[|\-\-)/,
- aI = {
- option: [1, "<select multiple='multiple'>", "</select>"],
- legend: [1, "<fieldset>", "</fieldset>"],
- thead: [1, "<table>", "</table>"],
- tr: [2, "<table><tbody>", "</tbody></table>"],
- td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
- col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
- area: [1, "<map>", "</map>"],
- _default: [0, "", ""]
- },
- ao = a(an);
- aI.optgroup = aI.option;
- aI.tbody = aI.tfoot = aI.colgroup = aI.caption = aI.thead;
- aI.th = aI.td;
- if (!al.support.htmlSerialize) {
- aI._default = [1, "div<div>", "</div>"]
- }
- al.fn.extend({
- text: function (e) {
- if (al.isFunction(e)) {
- return this.each(function (x) {
- var w = al(this);
- w.text(e.call(this, x, w.text()))
- })
- }
- if (typeof e !== "object" && e !== ap) {
- return this.empty().append((this[0] && this[0].ownerDocument || an).createTextNode(e))
- }
- return al.text(this)
- },
- wrapAll: function (e) {
- if (al.isFunction(e)) {
- return this.each(function (x) {
- al(this).wrapAll(e.call(this, x))
- })
- }
- if (this[0]) {
- var w = al(e, this[0].ownerDocument).eq(0).clone(true);
- if (this[0].parentNode) {
- w.insertBefore(this[0])
- }
- w.map(function () {
- var x = this;
- while (x.firstChild && x.firstChild.nodeType === 1) {
- x = x.firstChild
- }
- return x
- }).append(this)
- }
- return this
- },
- wrapInner: function (e) {
- if (al.isFunction(e)) {
- return this.each(function (w) {
- al(this).wrapInner(e.call(this, w))
- })
- }
- return this.each(function () {
- var w = al(this),
- x = w.contents();
- if (x.length) {
- x.wrapAll(e)
- } else {
- w.append(e)
- }
- })
- },
- wrap: function (e) {
- return this.each(function () {
- al(this).wrapAll(e)
- })
- },
- unwrap: function () {
- return this.parent().each(function () {
- if (!al.nodeName(this, "body")) {
- al(this).replaceWith(this.childNodes)
- }
- }).end()
- },
- append: function () {
- return this.domManip(arguments, true, function (e) {
- if (this.nodeType === 1) {
- this.appendChild(e)
- }
- })
- },
- prepend: function () {
- return this.domManip(arguments, true, function (e) {
- if (this.nodeType === 1) {
- this.insertBefore(e, this.firstChild)
- }
- })
- },
- before: function () {
- if (this[0] && this[0].parentNode) {
- return this.domManip(arguments, false, function (w) {
- this.parentNode.insertBefore(w, this)
- })
- } else {
- if (arguments.length) {
- var e = al(arguments[0]);
- e.push.apply(e, this.toArray());
- return this.pushStack(e, "before", arguments)
- }
- }
- },
- after: function () {
- if (this[0] && this[0].parentNode) {
- return this.domManip(arguments, false, function (w) {
- this.parentNode.insertBefore(w, this.nextSibling)
- })
- } else {
- if (arguments.length) {
- var e = this.pushStack(this, "after", arguments);
- e.push.apply(e, al(arguments[0]).toArray());
- return e
- }
- }
- },
- remove: function (w, e) {
- for (var x = 0, y;
- (y = this[x]) != null; x++) {
- if (!w || al.filter(w, [y]).length) {
- if (!e && y.nodeType === 1) {
- al.cleanData(y.getElementsByTagName("*"));
- al.cleanData([y])
- }
- if (y.parentNode) {
- y.parentNode.removeChild(y)
- }
- }
- }
- return this
- },
- empty: function () {
- for (var e = 0, w;
- (w = this[e]) != null; e++) {
- if (w.nodeType === 1) {
- al.cleanData(w.getElementsByTagName("*"))
- }
- while (w.firstChild) {
- w.removeChild(w.firstChild)
- }
- }
- return this
- },
- clone: function (w, e) {
- w = w == null ? false : w;
- e = e == null ? w : e;
- return this.map(function () {
- return al.clone(this, w, e)
- })
- },
- html: function (w) {
- if (w === ap) {
- return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(av, "") : null
- } else {
- if (typeof w === "string" && !at.test(w) && (al.support.leadingWhitespace || !aE.test(w)) && !aI[(c.exec(w) || ["", ""])[1].toLowerCase()]) {
- w = w.replace(ae, "<$1></$2>");
- try {
- for (var y = 0, x = this.length; y < x; y++) {
- if (this[y].nodeType === 1) {
- al.cleanData(this[y].getElementsByTagName("*"));
- this[y].innerHTML = w
- }
- }
- } catch (z) {
- this.empty().append(w)
- }
- } else {
- if (al.isFunction(w)) {
- this.each(function (A) {
- var e = al(this);
- e.html(w.call(this, A, e.html()))
- })
- } else {
- this.empty().append(w)
- }
- }
- }
- return this
- },
- replaceWith: function (e) {
- if (this[0] && this[0].parentNode) {
- if (al.isFunction(e)) {
- return this.each(function (y) {
- var x = al(this),
- w = x.html();
- x.replaceWith(e.call(this, y, w))
- })
- }
- if (typeof e !== "string") {
- e = al(e).detach()
- }
- return this.each(function () {
- var w = this.nextSibling,
- x = this.parentNode;
- al(this).remove();
- if (w) {
- al(w).before(e)
- } else {
- al(x).append(e)
- }
- })
- } else {
- return this.length ? this.pushStack(al(al.isFunction(e) ? e() : e), "replaceWith", e) : this
- }
- },
- detach: function (e) {
- return this.remove(e, true)
- },
- domManip: function (F, E, D) {
- var B, z, C, H, G = F[0],
- x = [];
- if (!al.support.checkClone && arguments.length === 3 && typeof G === "string" && m.test(G)) {
- return this.each(function () {
- al(this).domManip(F, E, D, true)
- })
- }
- if (al.isFunction(G)) {
- return this.each(function (I) {
- var e = al(this);
- F[0] = G.call(this, I, E ? e.html() : ap);
- e.domManip(F, E, D)
- })
- }
- if (this[0]) {
- H = G && G.parentNode;
- if (al.support.parentNode && H && H.nodeType === 11 && H.childNodes.length === this.length) {
- B = {
- fragment: H
- }
- } else {
- B = al.buildFragment(F, this, x)
- }
- C = B.fragment;
- if (C.childNodes.length === 1) {
- z = C = C.firstChild
- } else {
- z = C.firstChild
- } if (z) {
- E = E && al.nodeName(z, "tr");
- for (var y = 0, w = this.length, A = w - 1; y < w; y++) {
- D.call(E ? bt(this[y], z) : this[y], B.cacheable || (w > 1 && y < A) ? al.clone(C, true, true) : C)
- }
- }
- if (x.length) {
- al.each(x, bH)
- }
- }
- return this
- }
- });
- function bt(w, e) {
- return al.nodeName(w, "table") ? (w.getElementsByTagName("tbody")[0] || w.appendChild(w.ownerDocument.createElement("tbody"))) : w
- }
- function r(x, e) {
- if (e.nodeType !== 1 || !al.hasData(x)) {
- return
- }
- var C, z, w, B = al._data(x),
- A = al._data(e, B),
- y = B.events;
- if (y) {
- delete A.handle;
- A.events = {};
- for (C in y) {
- for (z = 0, w = y[C].length; z < w; z++) {
- al.event.add(e, C + (y[C][z].namespace ? "." : "") + y[C][z].namespace, y[C][z], y[C][z].data)
- }
- }
- }
- if (A.data) {
- A.data = al.extend({}, A.data)
- }
- }
- function ax(w, e) {
- var x;
- if (e.nodeType !== 1) {
- return
- }
- if (e.clearAttributes) {
- e.clearAttributes()
- }
- if (e.mergeAttributes) {
- e.mergeAttributes(w)
- }
- x = e.nodeName.toLowerCase();
- if (x === "object") {
- e.outerHTML = w.outerHTML
- } else {
- if (x === "input" && (w.type === "checkbox" || w.type === "radio")) {
- if (w.checked) {
- e.defaultChecked = e.checked = w.checked
- }
- if (e.value !== w.value) {
- e.value = w.value
- }
- } else {
- if (x === "option") {
- e.selected = w.defaultSelected
- } else {
- if (x === "input" || x === "textarea") {
- e.defaultValue = w.defaultValue
- }
- }
- }
- }
- e.removeAttribute(al.expando)
- }
- al.buildFragment = function (x, w, C) {
- var B, e, y, z, A = x[0];
- if (w && w[0]) {
- z = w[0].ownerDocument || w[0]
- }
- if (!z.createDocumentFragment) {
- z = an
- }
- if (x.length === 1 && typeof A === "string" && A.length < 512 && z === an && A.charAt(0) === "<" && !ac.test(A) && (al.support.checkClone || !m.test(A)) && (!al.support.unknownElems && aw.test(A))) {
- e = true;
- y = al.fragments[A];
- if (y && y !== 1) {
- B = y
- }
- }
- if (!B) {
- B = z.createDocumentFragment();
- al.clean(x, z, B, C)
- }
- if (e) {
- al.fragments[A] = y ? B : 1
- }
- return {
- fragment: B,
- cacheable: e
- }
- };
- al.fragments = {};
- al.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
- }, function (x, w) {
- al.fn[x] = function (z) {
- var e = [],
- C = al(z),
- B = this.length === 1 && this[0].parentNode;
- if (B && B.nodeType === 11 && B.childNodes.length === 1 && C.length === 1) {
- C[w](this[0]);
- return this
- } else {
- for (var A = 0, y = C.length; A < y; A++) {
- var D = (A > 0 ? this.clone(true) : this).get();
- al(C[A])[w](D);
- e = e.concat(D)
- }
- return this.pushStack(e, x, C.selector)
- }
- }
- });
- function by(e) {
- if (typeof e.getElementsByTagName !== "undefined") {
- return e.getElementsByTagName("*")
- } else {
- if (typeof e.querySelectorAll !== "undefined") {
- return e.querySelectorAll("*")
- } else {
- return []
- }
- }
- }
- function aK(e) {
- if (e.type === "checkbox" || e.type === "radio") {
- e.defaultChecked = e.checked
- }
- }
- function S(w) {
- var e = (w.nodeName || "").toLowerCase();
- if (e === "input") {
- aK(w)
- } else {
- if (e !== "script" && typeof w.getElementsByTagName !== "undefined") {
- al.grep(w.getElementsByTagName("input"), aK)
- }
- }
- }
- al.extend({
- clone: function (x, w, B) {
- var A = x.cloneNode(true),
- e, y, z;
- if ((!al.support.noCloneEvent || !al.support.noCloneChecked) && (x.nodeType === 1 || x.nodeType === 11) && !al.isXMLDoc(x)) {
- ax(x, A);
- e = by(x);
- y = by(A);
- for (z = 0; e[z]; ++z) {
- if (y[z]) {
- ax(e[z], y[z])
- }
- }
- }
- if (w) {
- r(x, A);
- if (B) {
- e = by(x);
- y = by(A);
- for (z = 0; e[z]; ++z) {
- r(e[z], y[z])
- }
- }
- }
- e = y = null;
- return A
- },
- clean: function (M, L, K, J) {
- var I;
- L = L || an;
- if (typeof L.createElement === "undefined") {
- L = L.ownerDocument || L[0] && L[0].ownerDocument || an
- }
- var H = [],
- C;
- for (var F = 0, z;
- (z = M[F]) != null; F++) {
- if (typeof z === "number") {
- z += ""
- }
- if (!z) {
- continue
- }
- if (typeof z === "string") {
- if (!ah.test(z)) {
- z = L.createTextNode(z)
- } else {
- z = z.replace(ae, "<$1></$2>");
- var G = (c.exec(z) || ["", ""])[1].toLowerCase(),
- x = aI[G] || aI._default,
- E = x[0],
- w = L.createElement("div");
- if (L === an) {
- ao.appendChild(w)
- } else {
- a(L).appendChild(w)
- }
- w.innerHTML = x[1] + z + x[2];
- while (E--) {
- w = w.lastChild
- }
- if (!al.support.tbody) {
- var B = u.test(z),
- D = G === "table" && !B ? w.firstChild && w.firstChild.childNodes : x[1] === "<table>" && !B ? w.childNodes : [];
- for (C = D.length - 1; C >= 0; --C) {
- if (al.nodeName(D[C], "tbody") && !D[C].childNodes.length) {
- D[C].parentNode.removeChild(D[C])
- }
- }
- }
- if (!al.support.leadingWhitespace && aE.test(z)) {
- w.insertBefore(L.createTextNode(aE.exec(z)[0]), w.firstChild)
- }
- z = w.childNodes
- }
- }
- var A;
- if (!al.support.appendChecked) {
- if (z[0] && typeof (A = z.length) === "number") {
- for (C = 0; C < A; C++) {
- S(z[C])
- }
- } else {
- S(z)
- }
- }
- if (z.nodeType) {
- H.push(z)
- } else {
- H = al.merge(H, z)
- }
- }
- if (K) {
- I = function (e) {
- return !e.type || bF.test(e.type)
- };
- for (F = 0; H[F]; F++) {
- if (J && al.nodeName(H[F], "script") && (!H[F].type || H[F].type.toLowerCase() === "text/javascript")) {
- J.push(H[F].parentNode ? H[F].parentNode.removeChild(H[F]) : H[F])
- } else {
- if (H[F].nodeType === 1) {
- var y = al.grep(H[F].getElementsByTagName("script"), I);
- H.splice.apply(H, [F + 1, 0].concat(y))
- }
- K.appendChild(H[F])
- }
- }
- }
- return H
- },
- cleanData: function (D) {
- var C, w, e = al.cache,
- A = al.event.special,
- z = al.support.deleteExpando;
- for (var y = 0, x;
- (x = D[y]) != null; y++) {
- if (x.nodeName && al.noData[x.nodeName.toLowerCase()]) {
- continue
- }
- w = x[al.expando];
- if (w) {
- C = e[w];
- if (C && C.events) {
- for (var B in C.events) {
- if (A[B]) {
- al.event.remove(x, B)
- } else {
- al.removeEvent(x, B, C.handle)
- }
- }
- if (C.handle) {
- C.handle.elem = null
- }
- }
- if (z) {
- delete x[al.expando]
- } else {
- if (x.removeAttribute) {
- x.removeAttribute(al.expando)
- }
- }
- delete e[w]
- }
- }
- }
- });
- function bH(w, e) {
- if (e.src) {
- al.ajax({
- url: e.src,
- async: false,
- dataType: "script"
- })
- } else {
- al.globalEval((e.text || e.textContent || e.innerHTML || "").replace(a5, "/*$0*/"))
- } if (e.parentNode) {
- e.parentNode.removeChild(e)
- }
- }
- var a1 = /alpha\([^)]*\)/i,
- aG = /opacity=([^)]*)/,
- O = /([A-Z]|^ms)/g,
- bu = /^-?\d+(?:px)?$/i,
- bG = /^-?\d/,
- W = /^([\-+])=([\-+.\de]+)/,
- bq = {
- position: "absolute",
- visibility: "hidden",
- display: "block"
- },
- aA = ["Left", "Right"],
- bl = ["Top", "Bottom"],
- ak, aT, bh;
- al.fn.css = function (x, w) {
- if (arguments.length === 2 && w === ap) {
- return this
- }
- return al.access(this, x, w, true, function (y, e, z) {
- return z !== ap ? al.style(y, e, z) : al.css(y, e)
- })
- };
- al.extend({
- cssHooks: {
- opacity: {
- get: function (w, e) {
- if (e) {
- var x = ak(w, "opacity", "opacity");
- return x === "" ? "1" : x
- } else {
- return w.style.opacity
- }
- }
- }
- },
- cssNumber: {
- fillOpacity: true,
- fontWeight: true,
- lineHeight: true,
- opacity: true,
- orphans: true,
- widows: true,
- zIndex: true,
- zoom: true
- },
- cssProps: {
- "float": al.support.cssFloat ? "cssFloat" : "styleFloat"
- },
- style: function (E, D, B, A) {
- if (!E || E.nodeType === 3 || E.nodeType === 8 || !E.style) {
- return
- }
- var x, C, y = al.camelCase(D),
- w = E.style,
- F = al.cssHooks[y];
- D = al.cssProps[y] || y;
- if (B !== ap) {
- C = typeof B;
- if (C === "string" && (x = W.exec(B))) {
- B = (+(x[1] + 1) * +x[2]) + parseFloat(al.css(E, D));
- C = "number"
- }
- if (B == null || C === "number" && isNaN(B)) {
- return
- }
- if (C === "number" && !al.cssNumber[y]) {
- B += "px"
- }
- if (!F || !("set" in F) || (B = F.set(E, B)) !== ap) {
- try {
- w[D] = B
- } catch (z) {}
- }
- } else {
- if (F && "get" in F && (x = F.get(E, false, A)) !== ap) {
- return x
- }
- return w[D]
- }
- },
- css: function (x, w, z) {
- var y, e;
- w = al.camelCase(w);
- e = al.cssHooks[w];
- w = al.cssProps[w] || w;
- if (w === "cssFloat") {
- w = "float"
- }
- if (e && "get" in e && (y = e.get(x, true, z)) !== ap) {
- return y
- } else {
- if (ak) {
- return ak(x, w)
- }
- }
- },
- swap: function (x, w, A) {
- var z = {};
- for (var y in w) {
- z[y] = x.style[y];
- x.style[y] = w[y]
- }
- A.call(x);
- for (y in w) {
- x.style[y] = z[y]
- }
- }
- });
- al.curCSS = al.css;
- al.each(["height", "width"], function (w, x) {
- al.cssHooks[x] = {
- get: function (y, e, A) {
- var z;
- if (e) {
- if (y.offsetWidth !== 0) {
- return n(y, x, A)
- } else {
- al.swap(y, bq, function () {
- z = n(y, x, A)
- })
- }
- return z
- }
- },
- set: function (y, e) {
- if (bu.test(e)) {
- e = parseFloat(e);
- if (e >= 0) {
- return e + "px"
- }
- } else {
- return e
- }
- }
- }
- });
- if (!al.support.opacity) {
- al.cssHooks.opacity = {
- get: function (w, e) {
- return aG.test((e && w.currentStyle ? w.currentStyle.filter : w.style.filter) || "") ? (parseFloat(RegExp.$1) / 100) + "" : e ? "1" : ""
- },
- set: function (w, e) {
- var A = w.style,
- y = w.currentStyle,
- x = al.isNumeric(e) ? "alpha(opacity=" + e * 100 + ")" : "",
- z = y && y.filter || A.filter || "";
- A.zoom = 1;
- if (e >= 1 && al.trim(z.replace(a1, "")) === "") {
- A.removeAttribute("filter");
- if (y && !y.filter) {
- return
- }
- }
- A.filter = a1.test(z) ? z.replace(a1, x) : z + " " + x
- }
- }
- }
- al(function () {
- if (!al.support.reliableMarginRight) {
- al.cssHooks.marginRight = {
- get: function (w, e) {
- var x;
- al.swap(w, {
- display: "inline-block"
- }, function () {
- if (e) {
- x = ak(w, "margin-right", "marginRight")
- } else {
- x = w.style.marginRight
- }
- });
- return x
- }
- }
- }
- });
- if (an.defaultView && an.defaultView.getComputedStyle) {
- aT = function (w, e) {
- var z, y, x;
- e = e.replace(O, "-$1").toLowerCase();
- if (!(y = w.ownerDocument.defaultView)) {
- return ap
- }
- if ((x = y.getComputedStyle(w, null))) {
- z = x.getPropertyValue(e);
- if (z === "" && !al.contains(w.ownerDocument.documentElement, w)) {
- z = al.style(w, e)
- }
- }
- return z
- }
- }
- if (an.documentElement.currentStyle) {
- bh = function (x, w) {
- var B, e, A, y = x.currentStyle && x.currentStyle[w],
- z = x.style;
- if (y === null && z && (A = z[w])) {
- y = A
- }
- if (!bu.test(y) && bG.test(y)) {
- B = z.left;
- e = x.runtimeStyle && x.runtimeStyle.left;
- if (e) {
- x.runtimeStyle.left = x.currentStyle.left
- }
- z.left = w === "fontSize" ? "1em" : (y || 0);
- y = z.pixelLeft + "px";
- z.left = B;
- if (e) {
- x.runtimeStyle.left = e
- }
- }
- return y === "" ? "auto" : y
- }
- }
- ak = aT || bh;
- function n(w, e, z) {
- var y = e === "width" ? w.offsetWidth : w.offsetHeight,
- x = e === "width" ? aA : bl;
- if (y > 0) {
- if (z !== "border") {
- al.each(x, function () {
- if (!z) {
- y -= parseFloat(al.css(w, "padding" + this)) || 0
- }
- if (z === "margin") {
- y += parseFloat(al.css(w, z + this)) || 0
- } else {
- y -= parseFloat(al.css(w, "border" + this + "Width")) || 0
- }
- })
- }
- return y + "px"
- }
- y = ak(w, e, e);
- if (y < 0 || y == null) {
- y = w.style[e] || 0
- }
- y = parseFloat(y) || 0;
- if (z) {
- al.each(x, function () {
- y += parseFloat(al.css(w, "padding" + this)) || 0;
- if (z !== "padding") {
- y += parseFloat(al.css(w, "border" + this + "Width")) || 0
- }
- if (z === "margin") {
- y += parseFloat(al.css(w, z + this)) || 0
- }
- })
- }
- return y + "px"
- }
- if (al.expr && al.expr.filters) {
- al.expr.filters.hidden = function (x) {
- var w = x.offsetWidth,
- e = x.offsetHeight;
- return (w === 0 && e === 0) || (!al.support.reliableHiddenOffsets && ((x.style && x.style.display) || al.css(x, "display")) === "none")
- };
- al.expr.filters.visible = function (e) {
- return !al.expr.filters.hidden(e)
- }
- }
- var a0 = /%20/g,
- aC = /\[\]$/,
- bL = /\r?\n/g,
- bJ = /#.*$/,
- aN = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
- bj = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
- a4 = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
- ba = /^(?:GET|HEAD)$/,
- b = /^\/\//,
- Z = /\?/,
- bp = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
- o = /^(?:select|textarea)/i,
- g = /\s+/,
- bK = /([?&])_=[^&]*/,
- Y = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
- P = al.fn.load,
- am = {},
- p = {},
- aO, q, bf = ["*/"] + ["*"];
- try {
- aO = bE.href
- } catch (aH) {
- aO = an.createElement("a");
- aO.href = "";
- aO = aO.href
- }
- q = Y.exec(aO.toLowerCase()) || [];
- function d(e) {
- return function (x, w) {
- if (typeof x !== "string") {
- w = x;
- x = "*"
- }
- if (al.isFunction(w)) {
- var D = x.toLowerCase().split(g),
- z = 0,
- A = D.length,
- y, B, C;
- for (; z < A; z++) {
- y = D[z];
- C = /^\+/.test(y);
- if (C) {
- y = y.substr(1) || "*"
- }
- B = e[y] = e[y] || [];
- B[C ? "unshift" : "push"](w)
- }
- }
- }
- }
- function bg(F, E, D, C, B, A) {
- B = B || E.dataTypes[0];
- A = A || {};
- A[B] = true;
- var z = F[B],
- x = 0,
- w = z ? z.length : 0,
- y = (F === am),
- G;
- for (; x < w && (y || !G); x++) {
- G = z[x](E, D, C);
- if (typeof G === "string") {
- if (!y || A[G]) {
- G = ap
- } else {
- E.dataTypes.unshift(G);
- G = bg(F, E, D, C, G, A)
- }
- }
- }
- if ((y || !G) && !A["*"]) {
- G = bg(F, E, D, C, "*", A)
- }
- return G
- }
- function az(x, e) {
- var z, w, y = al.ajaxSettings.flatOptions || {};
- for (z in e) {
- if (e[z] !== ap) {
- (y[z] ? x : (w || (w = {})))[z] = e[z]
- }
- }
- if (w) {
- al.extend(true, x, w)
- }
- }
- al.fn.extend({
- load: function (C, B, A) {
- if (typeof C !== "string" && P) {
- return P.apply(this, arguments)
- } else {
- if (!this.length) {
- return this
- }
- }
- var z = C.indexOf(" ");
- if (z >= 0) {
- var y = C.slice(z, C.length);
- C = C.slice(0, z)
- }
- var x = "GET";
- if (B) {
- if (al.isFunction(B)) {
- A = B;
- B = ap
- } else {
- if (typeof B === "object") {
- B = al.param(B, al.ajaxSettings.traditional);
- x = "POST"
- }
- }
- }
- var w = this;
- al.ajax({
- url: C,
- type: x,
- dataType: "html",
- data: B,
- complete: function (D, e, E) {
- E = D.responseText;
- if (D.isResolved()) {
- D.done(function (F) {
- E = F
- });
- w.html(y ? al("<div>").append(E.replace(bp, "")).find(y) : E)
- }
- if (A) {
- w.each(A, [E, e, D])
- }
- }
- });
- return this
- },
- serialize: function () {
- return al.param(this.serializeArray())
- },
- serializeArray: function () {
- return this.map(function () {
- return this.elements ? al.makeArray(this.elements) : this
- }).filter(function () {
- return this.name && !this.disabled && (this.checked || o.test(this.nodeName) || bj.test(this.type))
- }).map(function (w, e) {
- var x = al(this).val();
- return x == null ? null : al.isArray(x) ? al.map(x, function (y, z) {
- return {
- name: e.name,
- value: y.replace(bL, "\r\n")
- }
- }) : {
- name: e.name,
- value: x.replace(bL, "\r\n")
- }
- }).get()
- }
- });
- al.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (e, w) {
- al.fn[w] = function (x) {
- return this.bind(w, x)
- }
- });
- al.each(["get", "post"], function (w, x) {
- al[x] = function (y, e, A, z) {
- if (al.isFunction(e)) {
- z = z || A;
- A = e;
- e = ap
- }
- return al.ajax({
- type: x,
- url: y,
- data: e,
- success: A,
- dataType: z
- })
- }
- });
- al.extend({
- getScript: function (w, e) {
- return al.get(w, ap, e, "script")
- },
- getJSON: function (w, e, x) {
- return al.get(w, e, x, "json")
- },
- ajaxSetup: function (w, e) {
- if (e) {
- az(w, al.ajaxSettings)
- } else {
- e = w;
- w = al.ajaxSettings
- }
- az(w, e);
- return w
- },
- ajaxSettings: {
- url: aO,
- isLocal: a4.test(q[1]),
- global: true,
- type: "GET",
- contentType: "application/x-www-form-urlencoded",
- processData: true,
- async: true,
- accepts: {
- xml: "application/xml, text/xml",
- html: "text/html",
- text: "text/plain",
- json: "application/json, text/javascript",
- "*": bf
- },
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
- converters: {
- "* text": aq.String,
- "text html": true,
- "text json": al.parseJSON,
- "text xml": al.parseXML
- },
- flatOptions: {
- context: true,
- url: true
- }
- },
- ajaxPrefilter: d(am),
- ajaxTransport: d(p),
- ajax: function (L, K) {
- if (typeof L === "object") {
- K = L;
- L = ap
- }
- K = K || {};
- var B = al.ajaxSetup({}, K),
- bU = B.context || B,
- E = bU !== B && (bU.nodeType || bU instanceof al) ? al(bU) : al.event,
- bT = al.Deferred(),
- bP = al.Callbacks("once memory"),
- z = B.statusCode || {},
- A, F = {},
- bQ = {},
- bS, x, M, C, G, y = 0,
- w, J, H = {
- readyState: 0,
- setRequestHeader: function (bV, e) {
- if (!y) {
- var bW = bV.toLowerCase();
- bV = bQ[bW] = bQ[bW] || bV;
- F[bV] = e
- }
- return this
- },
- getAllResponseHeaders: function () {
- return y === 2 ? bS : null
- },
- getResponseHeader: function (bV) {
- var e;
- if (y === 2) {
- if (!x) {
- x = {};
- while ((e = aN.exec(bS))) {
- x[e[1].toLowerCase()] = e[2]
- }
- }
- e = x[bV.toLowerCase()]
- }
- return e === ap ? null : e
- },
- overrideMimeType: function (e) {
- if (!y) {
- B.mimeType = e
- }
- return this
- },
- abort: function (e) {
- e = e || "abort";
- if (M) {
- M.abort(e)
- }
- D(0, e);
- return this
- }
- };
- function D(b5, b4, b2, b1) {
- if (y === 2) {
- return
- }
- y = 2;
- if (C) {
- clearTimeout(C)
- }
- M = ap;
- bS = b1 || "";
- H.readyState = b5 > 0 ? 4 : 0;
- var bY, b6, b3, bW = b4,
- bX = b2 ? bC(B, H, b2) : ap,
- bV, b0;
- if (b5 >= 200 && b5 < 300 || b5 === 304) {
- if (B.ifModified) {
- if ((bV = H.getResponseHeader("Last-Modified"))) {
- al.lastModified[A] = bV
- }
- if ((b0 = H.getResponseHeader("Etag"))) {
- al.etag[A] = b0
- }
- }
- if (b5 === 304) {
- bW = "notmodified";
- bY = true
- } else {
- try {
- b6 = U(B, bX);
- bW = "success";
- bY = true
- } catch (bZ) {
- bW = "parsererror";
- b3 = bZ
- }
- }
- } else {
- b3 = bW;
- if (!bW || b5) {
- bW = "error";
- if (b5 < 0) {
- b5 = 0
- }
- }
- }
- H.status = b5;
- H.statusText = "" + (b4 || bW);
- if (bY) {
- bT.resolveWith(bU, [b6, bW, H])
- } else {
- bT.rejectWith(bU, [H, bW, b3])
- }
- H.statusCode(z);
- z = ap;
- if (w) {
- E.trigger("ajax" + (bY ? "Success" : "Error"), [H, B, bY ? b6 : b3])
- }
- bP.fireWith(bU, [H, bW]);
- if (w) {
- E.trigger("ajaxComplete", [H, B]);
- if (!(--al.active)) {
- al.event.trigger("ajaxStop")
- }
- }
- }
- bT.promise(H);
- H.success = H.done;
- H.error = H.fail;
- H.complete = bP.add;
- H.statusCode = function (bV) {
- if (bV) {
- var e;
- if (y < 2) {
- for (e in bV) {
- z[e] = [z[e], bV[e]]
- }
- } else {
- e = bV[H.status];
- H.then(e, e)
- }
- }
- return this
- };
- B.url = ((L || B.url) + "").replace(bJ, "").replace(b, q[1] + "//");
- B.dataTypes = al.trim(B.dataType || "*").toLowerCase().split(g);
- if (B.crossDomain == null) {
- G = Y.exec(B.url.toLowerCase());
- B.crossDomain = !!(G && (G[1] != q[1] || G[2] != q[2] || (G[3] || (G[1] === "http:" ? 80 : 443)) != (q[3] || (q[1] === "http:" ? 80 : 443))))
- }
- if (B.data && B.processData && typeof B.data !== "string") {
- B.data = al.param(B.data, B.traditional)
- }
- bg(am, B, K, H);
- if (y === 2) {
- return false
- }
- w = B.global;
- B.type = B.type.toUpperCase();
- B.hasContent = !ba.test(B.type);
- if (w && al.active++ === 0) {
- al.event.trigger("ajaxStart")
- }
- if (!B.hasContent) {
- if (B.data) {
- B.url += (Z.test(B.url) ? "&" : "?") + B.data;
- delete B.data
- }
- A = B.url;
- if (B.cache === false) {
- var I = al.now(),
- bR = B.url.replace(bK, "$1_=" + I);
- B.url = bR + ((bR === B.url) ? (Z.test(B.url) ? "&" : "?") + "_=" + I : "")
- }
- }
- if (B.data && B.hasContent && B.contentType !== false || K.contentType) {
- H.setRequestHeader("Content-Type", B.contentType)
- }
- if (B.ifModified) {
- A = A || B.url;
- if (al.lastModified[A]) {
- H.setRequestHeader("If-Modified-Since", al.lastModified[A])
- }
- if (al.etag[A]) {
- H.setRequestHeader("If-None-Match", al.etag[A])
- }
- }
- H.setRequestHeader("Accept", B.dataTypes[0] && B.accepts[B.dataTypes[0]] ? B.accepts[B.dataTypes[0]] + (B.dataTypes[0] !== "*" ? ", " + bf + "; q=0.01" : "") : B.accepts["*"]);
- for (J in B.headers) {
- H.setRequestHeader(J, B.headers[J])
- }
- if (B.beforeSend && (B.beforeSend.call(bU, H, B) === false || y === 2)) {
- H.abort();
- return false
- }
- for (J in {
- success: 1,
- error: 1,
- complete: 1
- }) {
- H[J](B[J])
- }
- M = bg(p, B, K, H);
- if (!M) {
- D(-1, "No Transport")
- } else {
- H.readyState = 1;
- if (w) {
- E.trigger("ajaxSend", [H, B])
- }
- if (B.async && B.timeout > 0) {
- C = setTimeout(function () {
- H.abort("timeout")
- }, B.timeout)
- }
- try {
- y = 1;
- M.send(F, D)
- } catch (bO) {
- if (y < 2) {
- D(-1, bO)
- } else {
- al.error(bO)
- }
- }
- }
- return H
- },
- param: function (e, z) {
- var w = [],
- x = function (B, A) {
- A = al.isFunction(A) ? A() : A;
- w[w.length] = encodeURIComponent(B) + "=" + encodeURIComponent(A)
- };
- if (z === ap) {
- z = al.ajaxSettings.traditional
- }
- if (al.isArray(e) || (e.jquery && !al.isPlainObject(e))) {
- al.each(e, function () {
- x(this.name, this.value)
- })
- } else {
- for (var y in e) {
- t(y, e[y], z, x)
- }
- }
- return w.join("&").replace(a0, "+")
- }
- });
- function t(x, w, A, z) {
- if (al.isArray(w)) {
- al.each(w, function (B, e) {
- if (A || aC.test(x)) {
- z(x, e)
- } else {
- t(x + "[" + (typeof e === "object" || al.isArray(e) ? B : "") + "]", e, A, z)
- }
- })
- } else {
- if (!A && w != null && typeof w === "object") {
- for (var y in w) {
- t(x + "[" + y + "]", w[y], A, z)
- }
- } else {
- z(x, w)
- }
- }
- }
- al.extend({
- active: 0,
- lastModified: {},
- etag: {}
- });
- function bC(E, D, B) {
- var z = E.contents,
- C = E.dataTypes,
- w = E.responseFields,
- y, A, x, e;
- for (A in w) {
- if (A in B) {
- D[w[A]] = B[A]
- }
- }
- while (C[0] === "*") {
- C.shift();
- if (y === ap) {
- y = E.mimeType || D.getResponseHeader("content-type")
- }
- }
- if (y) {
- for (A in z) {
- if (z[A] && z[A].test(y)) {
- C.unshift(A);
- break
- }
- }
- }
- if (C[0] in B) {
- x = C[0]
- } else {
- for (A in B) {
- if (!C[0] || E.converters[A + " " + C[0]]) {
- x = A;
- break
- }
- if (!e) {
- e = A
- }
- }
- x = x || e
- } if (x) {
- if (x !== C[0]) {
- C.unshift(x)
- }
- return B[x]
- }
- }
- function U(I, E) {
- if (I.dataFilter) {
- E = I.dataFilter(E, I.dataType)
- }
- var D = I.dataTypes,
- H = {},
- A, F, x = D.length,
- B, C = D[0],
- y, z, G, w, e;
- for (A = 1; A < x; A++) {
- if (A === 1) {
- for (F in I.converters) {
- if (typeof F === "string") {
- H[F.toLowerCase()] = I.converters[F]
- }
- }
- }
- y = C;
- C = D[A];
- if (C === "*") {
- C = y
- } else {
- if (y !== "*" && y !== C) {
- z = y + " " + C;
- G = H[z] || H["* " + C];
- if (!G) {
- e = ap;
- for (w in H) {
- B = w.split(" ");
- if (B[0] === y || B[0] === "*") {
- e = H[B[1] + " " + C];
- if (e) {
- w = H[w];
- if (w === true) {
- G = e
- } else {
- if (e === true) {
- G = w
- }
- }
- break
- }
- }
- }
- }
- if (!(G || e)) {
- al.error("No conversion from " + z.replace(" ", " to "))
- }
- if (G !== true) {
- E = G ? G(E) : e(w(E))
- }
- }
- }
- }
- return E
- }
- var aZ = al.now(),
- s = /(\=)\?(&|$)|\?\?/i;
- al.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function () {
- return al.expando + "_" + (aZ++)
- }
- });
- al.ajaxPrefilter("json jsonp", function (F, E, D) {
- var C = F.contentType === "application/x-www-form-urlencoded" && (typeof F.data === "string");
- if (F.dataTypes[0] === "jsonp" || F.jsonp !== false && (s.test(F.url) || C && s.test(F.data))) {
- var B, y = F.jsonpCallback = al.isFunction(F.jsonpCallback) ? F.jsonpCallback() : F.jsonpCallback,
- A = aq[y],
- w = F.url,
- z = F.data,
- x = "$1" + y + "$2";
- if (F.jsonp !== false) {
- w = w.replace(s, x);
- if (F.url === w) {
- if (C) {
- z = z.replace(s, x)
- }
- if (F.data === z) {
- w += (/\?/.test(w) ? "&" : "?") + F.jsonp + "=" + y
- }
- }
- }
- F.url = w;
- F.data = z;
- aq[y] = function (e) {
- B = [e]
- };
- D.always(function () {
- aq[y] = A;
- if (B && al.isFunction(A)) {
- aq[y](B[0])
- }
- });
- F.converters["script json"] = function () {
- if (!B) {
- al.error(y + " was not called")
- }
- return B[0]
- };
- F.dataTypes[0] = "json";
- return "script"
- }
- });
- al.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /javascript|ecmascript/
- },
- converters: {
- "text script": function (e) {
- al.globalEval(e);
- return e
- }
- }
- });
- al.ajaxPrefilter("script", function (e) {
- if (e.cache === ap) {
- e.cache = false
- }
- if (e.crossDomain) {
- e.type = "GET";
- e.global = false
- }
- });
- al.ajaxTransport("script", function (w) {
- if (w.crossDomain) {
- var x, e = an.head || an.getElementsByTagName("head")[0] || an.documentElement;
- return {
- send: function (z, y) {
- x = an.createElement("script");
- x.async = "async";
- if (w.scriptCharset) {
- x.charset = w.scriptCharset
- }
- x.src = w.url;
- x.onload = x.onreadystatechange = function (B, A) {
- if (A || !x.readyState || /loaded|complete/.test(x.readyState)) {
- x.onload = x.onreadystatechange = null;
- if (e && x.parentNode) {
- e.removeChild(x)
- }
- x = ap;
- if (!A) {
- y(200, "success")
- }
- }
- };
- e.insertBefore(x, e.firstChild)
- },
- abort: function () {
- if (x) {
- x.onload(0, 1)
- }
- }
- }
- }
- });
- var aY = aq.ActiveXObject ? function () {
- for (var e in aa) {
- aa[e](0, 1)
- }
- } : false,
- N = 0,
- aa;
- function aX() {
- try {
- return new aq.XMLHttpRequest()
- } catch (w) {}
- }
- function ay() {
- try {
- return new aq.ActiveXObject("Microsoft.XMLHTTP")
- } catch (w) {}
- }
- al.ajaxSettings.xhr = aq.ActiveXObject ? function () {
- return !this.isLocal && aX() || ay()
- } : aX;
- (function (e) {
- al.extend(al.support, {
- ajax: !!e,
- cors: !!e && ("withCredentials" in e)
- })
- })(al.ajaxSettings.xhr());
- if (al.support.ajax) {
- al.ajaxTransport(function (e) {
- if (!e.crossDomain || al.support.cors) {
- var w;
- return {
- send: function (C, B) {
- var A = e.xhr(),
- z, y;
- if (e.username) {
- A.open(e.type, e.url, e.async, e.username, e.password)
- } else {
- A.open(e.type, e.url, e.async)
- } if (e.xhrFields) {
- for (y in e.xhrFields) {
- A[y] = e.xhrFields[y]
- }
- }
- if (e.mimeType && A.overrideMimeType) {
- A.overrideMimeType(e.mimeType)
- }
- if (!e.crossDomain && !C["X-Requested-With"]) {
- C["X-Requested-With"] = "XMLHttpRequest"
- }
- try {
- for (y in C) {
- A.setRequestHeader(y, C[y])
- }
- } catch (x) {}
- A.send((e.hasContent && e.data) || null);
- w = function (L, K) {
- var J, E, D, H, G;
- try {
- if (w && (K || A.readyState === 4)) {
- w = ap;
- if (z) {
- A.onreadystatechange = al.noop;
- if (aY) {
- delete aa[z]
- }
- }
- if (K) {
- if (A.readyState !== 4) {
- A.abort()
- }
- } else {
- J = A.status;
- D = A.getAllResponseHeaders();
- H = {};
- G = A.responseXML;
- if (G && G.documentElement) {
- H.xml = G
- }
- H.text = A.responseText;
- try {
- E = A.statusText
- } catch (I) {
- E = ""
- }
- if (!J && e.isLocal && !e.crossDomain) {
- J = H.text ? 200 : 404
- } else {
- if (J === 1223) {
- J = 204
- }
- }
- }
- }
- } catch (F) {
- if (!K) {
- B(-1, F)
- }
- }
- if (H) {
- B(J, E, H, D)
- }
- };
- if (!e.async || A.readyState === 4) {
- w()
- } else {
- z = ++N;
- if (aY) {
- if (!aa) {
- aa = {};
- al(aq).unload(aY)
- }
- aa[z] = w
- }
- A.onreadystatechange = w
- }
- },
- abort: function () {
- if (w) {
- w(0, 1)
- }
- }
- }
- }
- })
- }
- var aW = {},
- br, k, aM = /^(?:toggle|show|hide)$/,
- bd = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
- bm, aS = [
- ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
- ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
- ["opacity"]
- ],
- bn;
- al.fn.extend({
- show: function (w, e, B) {
- var A, z;
- if (w || w === 0) {
- return this.animate(bk("show", 3), w, e, B)
- } else {
- for (var y = 0, x = this.length; y < x; y++) {
- A = this[y];
- if (A.style) {
- z = A.style.display;
- if (!al._data(A, "olddisplay") && z === "none") {
- z = A.style.display = ""
- }
- if (z === "" && al.css(A, "display") === "none") {
- al._data(A, "olddisplay", v(A.nodeName))
- }
- }
- }
- for (y = 0; y < x; y++) {
- A = this[y];
- if (A.style) {
- z = A.style.display;
- if (z === "" || z === "none") {
- A.style.display = al._data(A, "olddisplay") || ""
- }
- }
- }
- return this
- }
- },
- hide: function (w, e, B) {
- if (w || w === 0) {
- return this.animate(bk("hide", 3), w, e, B)
- } else {
- var A, z, y = 0,
- x = this.length;
- for (; y < x; y++) {
- A = this[y];
- if (A.style) {
- z = al.css(A, "display");
- if (z !== "none" && !al._data(A, "olddisplay")) {
- al._data(A, "olddisplay", z)
- }
- }
- }
- for (y = 0; y < x; y++) {
- if (this[y].style) {
- this[y].style.display = "none"
- }
- }
- return this
- }
- },
- _toggle: al.fn.toggle,
- toggle: function (w, z, y) {
- var x = typeof w === "boolean";
- if (al.isFunction(w) && al.isFunction(z)) {
- this._toggle.apply(this, arguments)
- } else {
- if (w == null || x) {
- this.each(function () {
- var e = x ? w : al(this).is(":hidden");
- al(this)[e ? "show" : "hide"]()
- })
- } else {
- this.animate(bk("toggle", 3), w, z, y)
- }
- }
- return this
- },
- fadeTo: function (w, e, y, x) {
- return this.filter(":hidden").css("opacity", 0).show().end().animate({
- opacity: e
- }, w, y, x)
- },
- animate: function (e, A, z, y) {
- var x = al.speed(A, z, y);
- if (al.isEmptyObject(e)) {
- return this.each(x.complete, [false])
- }
- e = al.extend({}, e);
- function w() {
- if (x.queue === false) {
- al._mark(this)
- }
- var L = al.extend({}, x),
- K = this.nodeType === 1,
- I = K && al(this).is(":hidden"),
- C, F, E, J, H, D, G, M, B;
- L.animatedProperties = {};
- for (E in e) {
- C = al.camelCase(E);
- if (E !== C) {
- e[C] = e[E];
- delete e[E]
- }
- F = e[C];
- if (al.isArray(F)) {
- L.animatedProperties[C] = F[1];
- F = e[C] = F[0]
- } else {
- L.animatedProperties[C] = L.specialEasing && L.specialEasing[C] || L.easing || "swing"
- } if (F === "hide" && I || F === "show" && !I) {
- return L.complete.call(this)
- }
- if (K && (C === "height" || C === "width")) {
- L.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY];
- if (al.css(this, "display") === "inline" && al.css(this, "float") === "none") {
- if (!al.support.inlineBlockNeedsLayout || v(this.nodeName) === "inline") {
- this.style.display = "inline-block"
- } else {
- this.style.zoom = 1
- }
- }
- }
- }
- if (L.overflow != null) {
- this.style.overflow = "hidden"
- }
- for (E in e) {
- J = new al.fx(this, L, E);
- F = e[E];
- if (aM.test(F)) {
- B = al._data(this, "toggle" + E) || (F === "toggle" ? I ? "show" : "hide" : 0);
- if (B) {
- al._data(this, "toggle" + E, B === "show" ? "hide" : "show");
- J[B]()
- } else {
- J[F]()
- }
- } else {
- H = bd.exec(F);
- D = J.cur();
- if (H) {
- G = parseFloat(H[2]);
- M = H[3] || (al.cssNumber[E] ? "" : "px");
- if (M !== "px") {
- al.style(this, E, (G || 1) + M);
- D = ((G || 1) / J.cur()) * D;
- al.style(this, E, D + M)
- }
- if (H[1]) {
- G = ((H[1] === "-=" ? -1 : 1) * G) + D
- }
- J.custom(D, G, M)
- } else {
- J.custom(D, F, "")
- }
- }
- }
- return true
- }
- return x.queue === false ? this.each(w) : this.queue(x.queue, w)
- },
- stop: function (y, x, w) {
- if (typeof y !== "string") {
- w = x;
- x = y;
- y = ap
- }
- if (x && y !== false) {
- this.queue(y || "fx", [])
- }
- return this.each(function () {
- var z, e = false,
- B = al.timers,
- A = al._data(this);
- if (!w) {
- al._unmark(true, this)
- }
- function C(E, D, F) {
- var G = D[F];
- al.removeData(E, F, true);
- G.stop(w)
- }
- if (y == null) {
- for (z in A) {
- if (A[z].stop && z.indexOf(".run") === z.length - 4) {
- C(this, A, z)
- }
- }
- } else {
- if (A[z = y + ".run"] && A[z].stop) {
- C(this, A, z)
- }
- }
- for (z = B.length; z--;) {
- if (B[z].elem === this && (y == null || B[z].queue === y)) {
- if (w) {
- B[z](true)
- } else {
- B[z].saveState()
- }
- e = true;
- B.splice(z, 1)
- }
- }
- if (!(w && e)) {
- al.dequeue(this, y)
- }
- })
- }
- });
- function bz() {
- setTimeout(aF, 0);
- return (bn = al.now())
- }
- function aF() {
- bn = ap
- }
- function bk(w, e) {
- var x = {};
- al.each(aS.concat.apply([], aS.slice(0, e)), function () {
- x[this] = w
- });
- return x
- }
- al.each({
- slideDown: bk("show", 1),
- slideUp: bk("hide", 1),
- slideToggle: bk("toggle", 1),
- fadeIn: {
- opacity: "show"
- },
- fadeOut: {
- opacity: "hide"
- },
- fadeToggle: {
- opacity: "toggle"
- }
- }, function (x, w) {
- al.fn[x] = function (y, e, z) {
- return this.animate(w, y, e, z)
- }
- });
- al.extend({
- speed: function (w, z, y) {
- var x = w && typeof w === "object" ? al.extend({}, w) : {
- complete: y || !y && z || al.isFunction(w) && w,
- duration: w,
- easing: y && z || z && !al.isFunction(z) && z
- };
- x.duration = al.fx.off ? 0 : typeof x.duration === "number" ? x.duration : x.duration in al.fx.speeds ? al.fx.speeds[x.duration] : al.fx.speeds._default;
- if (x.queue == null || x.queue === true) {
- x.queue = "fx"
- }
- x.old = x.complete;
- x.complete = function (e) {
- if (al.isFunction(x.old)) {
- x.old.call(this)
- }
- if (x.queue) {
- al.dequeue(this, x.queue)
- } else {
- if (e !== false) {
- al._unmark(this)
- }
- }
- };
- return x
- },
- easing: {
- linear: function (x, y, w, e) {
- return w + e * x
- },
- swing: function (x, y, w, e) {
- return ((-Math.cos(x * Math.PI) / 2) + 0.5) * e + w
- }
- },
- timers: [],
- fx: function (w, e, x) {
- this.options = e;
- this.elem = w;
- this.prop = x;
- e.orig = e.orig || {}
- }
- });
- al.fx.prototype = {
- update: function () {
- if (this.options.step) {
- this.options.step.call(this.elem, this.now, this)
- }(al.fx.step[this.prop] || al.fx.step._default)(this)
- },
- cur: function () {
- if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) {
- return this.elem[this.prop]
- }
- var e, w = al.css(this.elem, this.prop);
- return isNaN(e = parseFloat(w)) ? !w || w === "auto" ? 0 : w : e
- },
- custom: function (w, B, A) {
- var z = this,
- y = al.fx;
- this.startTime = bn || bz();
- this.end = B;
- this.now = this.start = w;
- this.pos = this.state = 0;
- this.unit = A || this.unit || (al.cssNumber[this.prop] ? "" : "px");
- function x(e) {
- return z.step(e)
- }
- x.queue = this.options.queue;
- x.elem = this.elem;
- x.saveState = function () {
- if (z.options.hide && al._data(z.elem, "fxshow" + z.prop) === ap) {
- al._data(z.elem, "fxshow" + z.prop, z.start)
- }
- };
- if (x() && al.timers.push(x) && !bm) {
- bm = setInterval(y.tick, y.interval)
- }
- },
- show: function () {
- var e = al._data(this.elem, "fxshow" + this.prop);
- this.options.orig[this.prop] = e || al.style(this.elem, this.prop);
- this.options.show = true;
- if (e !== ap) {
- this.custom(this.cur(), e)
- } else {
- this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur())
- }
- al(this.elem).show()
- },
- hide: function () {
- this.options.orig[this.prop] = al._data(this.elem, "fxshow" + this.prop) || al.style(this.elem, this.prop);
- this.options.hide = true;
- this.custom(this.cur(), 0)
- },
- step: function (C) {
- var A, B, w, y = bn || bz(),
- e = true,
- z = this.elem,
- x = this.options;
- if (C || y >= x.duration + this.startTime) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
- x.animatedProperties[this.prop] = true;
- for (A in x.animatedProperties) {
- if (x.animatedProperties[A] !== true) {
- e = false
- }
- }
- if (e) {
- if (x.overflow != null && !al.support.shrinkWrapBlocks) {
- al.each(["", "X", "Y"], function (E, D) {
- z.style["overflow" + D] = x.overflow[E]
- })
- }
- if (x.hide) {
- al(z).hide()
- }
- if (x.hide || x.show) {
- for (A in x.animatedProperties) {
- al.style(z, A, x.orig[A]);
- al.removeData(z, "fxshow" + A, true);
- al.removeData(z, "toggle" + A, true)
- }
- }
- w = x.complete;
- if (w) {
- x.complete = false;
- w.call(z)
- }
- }
- return false
- } else {
- if (x.duration == Infinity) {
- this.now = y
- } else {
- B = y - this.startTime;
- this.state = B / x.duration;
- this.pos = juicebox_lib.jQuery.easing[x.animatedProperties[this.prop]](this.state, B, 0, 1, x.duration);
- this.now = this.start + ((this.end - this.start) * this.pos)
- }
- this.update()
- }
- return true
- }
- };
- al.extend(al.fx, {
- tick: function () {
- var e, x = al.timers,
- w = 0;
- for (; w < x.length; w++) {
- e = x[w];
- if (!e() && x[w] === e) {
- x.splice(w--, 1)
- }
- }
- if (!x.length) {
- al.fx.stop()
- }
- },
- interval: 13,
- stop: function () {
- clearInterval(bm);
- bm = null
- },
- speeds: {
- slow: 600,
- fast: 200,
- _default: 400
- },
- step: {
- opacity: function (e) {
- al.style(e.elem, "opacity", e.now)
- },
- _default: function (e) {
- if (e.elem.style && e.elem.style[e.prop] != null) {
- e.elem.style[e.prop] = e.now + e.unit
- } else {
- e.elem[e.prop] = e.now
- }
- }
- }
- });
- al.each(["width", "height"], function (w, e) {
- al.fx.step[e] = function (x) {
- al.style(x.elem, e, Math.max(0, x.now))
- }
- });
- if (al.expr && al.expr.filters) {
- al.expr.filters.animated = function (e) {
- return al.grep(al.timers, function (w) {
- return e === w.elem
- }).length
- }
- }
- function v(w) {
- if (!aW[w]) {
- var e = an.body,
- x = al("<" + w + ">").appendTo(e),
- y = x.css("display");
- x.remove();
- if (y === "none" || y === "") {
- if (!br) {
- br = an.createElement("iframe");
- br.frameBorder = br.width = br.height = 0
- }
- e.appendChild(br);
- if (!k || !br.createElement) {
- k = (br.contentWindow || br.contentDocument).document;
- k.write((an.compatMode === "CSS1Compat" ? "<!doctype html>" : "") + "<html><body>");
- k.close()
- }
- x = k.createElement(w);
- k.body.appendChild(x);
- y = al.css(x, "display");
- e.removeChild(br)
- }
- aW[w] = y
- }
- return aW[w]
- }
- var aV = /^t(?:able|d|h)$/i,
- ar = /^(?:body|html)$/i;
- if ("getBoundingClientRect" in an.documentElement) {
- al.fn.offset = function (J) {
- var I = this[0],
- B;
- if (J) {
- return this.each(function (e) {
- al.offset.setOffset(this, J, e)
- })
- }
- if (!I || !I.ownerDocument) {
- return null
- }
- if (I === I.ownerDocument.body) {
- return al.offset.bodyOffset(I)
- }
- try {
- B = I.getBoundingClientRect()
- } catch (E) {}
- var G = I.ownerDocument,
- x = G.documentElement;
- if (!B || !al.contains(x, I)) {
- return B ? {
- top: B.top,
- left: B.left
- } : {
- top: 0,
- left: 0
- }
- }
- var F = G.body,
- C = aU(G),
- A = x.clientTop || F.clientTop || 0,
- D = x.clientLeft || F.clientLeft || 0,
- w = C.pageYOffset || al.support.boxModel && x.scrollTop || F.scrollTop,
- z = C.pageXOffset || al.support.boxModel && x.scrollLeft || F.scrollLeft,
- H = B.top + w - A,
- y = B.left + z - D;
- return {
- top: H,
- left: y
- }
- }
- } else {
- al.fn.offset = function (F) {
- var E = this[0];
- if (F) {
- return this.each(function (H) {
- al.offset.setOffset(this, F, H)
- })
- }
- if (!E || !E.ownerDocument) {
- return null
- }
- if (E === E.ownerDocument.body) {
- return al.offset.bodyOffset(E)
- }
- var C, x = E.offsetParent,
- w = E,
- G = E.ownerDocument,
- y = G.documentElement,
- A = G.body,
- B = G.defaultView,
- e = B ? B.getComputedStyle(E, null) : E.currentStyle,
- D = E.offsetTop,
- z = E.offsetLeft;
- while ((E = E.parentNode) && E !== A && E !== y) {
- if (al.support.fixedPosition && e.position === "fixed") {
- break
- }
- C = B ? B.getComputedStyle(E, null) : E.currentStyle;
- D -= E.scrollTop;
- z -= E.scrollLeft;
- if (E === x) {
- D += E.offsetTop;
- z += E.offsetLeft;
- if (al.support.doesNotAddBorder && !(al.support.doesAddBorderForTableAndCells && aV.test(E.nodeName))) {
- D += parseFloat(C.borderTopWidth) || 0;
- z += parseFloat(C.borderLeftWidth) || 0
- }
- w = x;
- x = E.offsetParent
- }
- if (al.support.subtractsBorderForOverflowNotVisible && C.overflow !== "visible") {
- D += parseFloat(C.borderTopWidth) || 0;
- z += parseFloat(C.borderLeftWidth) || 0
- }
- e = C
- }
- if (e.position === "relative" || e.position === "static") {
- D += A.offsetTop;
- z += A.offsetLeft
- }
- if (al.support.fixedPosition && e.position === "fixed") {
- D += Math.max(y.scrollTop, A.scrollTop);
- z += Math.max(y.scrollLeft, A.scrollLeft)
- }
- return {
- top: D,
- left: z
- }
- }
- }
- al.offset = {
- bodyOffset: function (w) {
- var e = w.offsetTop,
- x = w.offsetLeft;
- if (al.support.doesNotIncludeMarginInBodyOffset) {
- e += parseFloat(al.css(w, "marginTop")) || 0;
- x += parseFloat(al.css(w, "marginLeft")) || 0
- }
- return {
- top: e,
- left: x
- }
- },
- setOffset: function (F, E, z) {
- var D = al.css(F, "position");
- if (D === "static") {
- F.style.position = "relative"
- }
- var B = al(F),
- w = B.offset(),
- e = al.css(F, "top"),
- G = al.css(F, "left"),
- H = (D === "absolute" || D === "fixed") && al.inArray("auto", [e, G]) > -1,
- C = {},
- A = {},
- x, y;
- if (H) {
- A = B.position();
- x = A.top;
- y = A.left
- } else {
- x = parseFloat(e) || 0;
- y = parseFloat(G) || 0
- } if (al.isFunction(E)) {
- E = E.call(F, z, w)
- }
- if (E.top != null) {
- C.top = (E.top - w.top) + x
- }
- if (E.left != null) {
- C.left = (E.left - w.left) + y
- }
- if ("using" in E) {
- E.using.call(F, C)
- } else {
- B.css(C)
- }
- }
- };
- al.fn.extend({
- position: function () {
- if (!this[0]) {
- return null
- }
- var e = this[0],
- x = this.offsetParent(),
- y = this.offset(),
- w = ar.test(x[0].nodeName) ? {
- top: 0,
- left: 0
- } : x.offset();
- y.top -= parseFloat(al.css(e, "marginTop")) || 0;
- y.left -= parseFloat(al.css(e, "marginLeft")) || 0;
- w.top += parseFloat(al.css(x[0], "borderTopWidth")) || 0;
- w.left += parseFloat(al.css(x[0], "borderLeftWidth")) || 0;
- return {
- top: y.top - w.top,
- left: y.left - w.left
- }
- },
- offsetParent: function () {
- return this.map(function () {
- var e = this.offsetParent || an.body;
- while (e && (!ar.test(e.nodeName) && al.css(e, "position") === "static")) {
- e = e.offsetParent
- }
- return e
- })
- }
- });
- al.each(["Left", "Top"], function (e, x) {
- var w = "scroll" + x;
- al.fn[w] = function (z) {
- var y, A;
- if (z === ap) {
- y = this[0];
- if (!y) {
- return null
- }
- A = aU(y);
- return A ? ("pageXOffset" in A) ? A[e ? "pageYOffset" : "pageXOffset"] : al.support.boxModel && A.document.documentElement[w] || A.document.body[w] : y[w]
- }
- return this.each(function () {
- A = aU(this);
- if (A) {
- A.scrollTo(!e ? z : al(A).scrollLeft(), e ? z : al(A).scrollTop())
- } else {
- this[w] = z
- }
- })
- }
- });
- function aU(e) {
- return al.isWindow(e) ? e : e.nodeType === 9 ? e.defaultView || e.parentWindow : false
- }
- al.each(["Height", "Width"], function (e, x) {
- var w = x.toLowerCase();
- al.fn["inner" + x] = function () {
- var y = this[0];
- return y ? y.style ? parseFloat(al.css(y, w, "padding")) : this[w]() : null
- };
- al.fn["outer" + x] = function (z) {
- var y = this[0];
- return y ? y.style ? parseFloat(al.css(y, w, z ? "margin" : "border")) : this[w]() : null
- };
- al.fn[w] = function (z) {
- var D = this[0];
- if (!D) {
- return z == null ? null : this
- }
- if (al.isFunction(z)) {
- return this.each(function (F) {
- var E = al(this);
- E[w](z.call(this, F, E[w]()))
- })
- }
- if (al.isWindow(D)) {
- var C = D.document.documentElement["client" + x],
- y = D.document.body;
- return D.document.compatMode === "CSS1Compat" && C || y && y["client" + x] || C
- } else {
- if (D.nodeType === 9) {
- return Math.max(D.documentElement["client" + x], D.body["scroll" + x], D.documentElement["scroll" + x], D.body["offset" + x], D.documentElement["offset" + x])
- } else {
- if (z === ap) {
- var B = al.css(D, w),
- A = parseFloat(B);
- return al.isNumeric(A) ? A : B
- } else {
- return this.css(w, typeof z === "string" ? z : z + "px")
- }
- }
- }
- }
- });
- juicebox_lib.jQuery = juicebox_lib.$ = al
- })(window);
- if (typeof jQuery === "undefined") {
- window.jQuery = juicebox_lib.jQuery
- }
- if (typeof $ === "undefined") {
- window.$ = juicebox_lib.jQuery
- }(function (r, t, q) {
- var j = ["top", "right", "bottom", "left", "opacity", "height", "width"],
- s = ["top", "right", "bottom", "left"],
- n = ["", "-webkit-", "-moz-", "-o-"],
- v = ["avoidTransforms", "useTranslate3d", "leaveTransforms"],
- h = /^([+-]=)?([\d+-.]+)(.*)$/,
- z = /([A-Z])/g,
- w = {
- secondary: {},
- meta: {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- }
- },
- m = "jQe",
- c = "cubic-bezier(",
- y = ")",
- g = false,
- b = null;
- var k = document.body || document.documentElement,
- e = k.style,
- a = (e.WebkitTransition !== undefined) ? "webkitTransitionEnd" : (e.OTransition !== undefined) ? "oTransitionEnd" : "transitionend",
- x = e.WebkitTransition !== undefined || e.MozTransition !== undefined || e.OTransition !== undefined || e.transition !== undefined,
- f = g = ("WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix());
- if (r.expr && r.expr.filters) {
- b = r.expr.filters.animated;
- r.expr.filters.animated = function (C) {
- return r(C).data("events") && r(C).data("events")[a] ? true : b.call(this, C)
- }
- }
- function i(M, G, D, H) {
- var J = h.exec(G),
- E = M.css(D) === "auto" ? 0 : M.css(D),
- N = typeof E == "string" ? A(E) : E,
- F = typeof G == "string" ? A(G) : G,
- L = H === true ? 0 : N,
- K = M.is(":hidden"),
- C = M.translation();
- if (D == "left") {
- L = parseInt(N, 10) + C.x
- }
- if (D == "right") {
- L = parseInt(N, 10) + C.x
- }
- if (D == "top") {
- L = parseInt(N, 10) + C.y
- }
- if (D == "bottom") {
- L = parseInt(N, 10) + C.y
- }
- if (!J && G == "show") {
- L = 1;
- if (K) {
- M.css({
- display: "block",
- opacity: 0
- })
- }
- } else {
- if (!J && G == "hide") {
- L = 0
- }
- } if (J) {
- var I = parseFloat(J[2]);
- if (J[1]) {
- I = ((J[1] === "-=" ? -1 : 1) * I) + parseInt(L, 10)
- }
- return I
- } else {
- return L
- }
- }
- function u(C, E, D) {
- return ((D === true || (g == true && D != false)) && f) ? "translate3d(" + C + "px," + E + "px,0)" : "translate(" + C + "px," + E + "px)"
- }
- function l(J, O, H, K, N, D, G, C) {
- var I = J.data(m) ? !d(J.data(m)) ? J.data(m) : r.extend(true, {}, w) : r.extend(true, {}, w),
- F = N,
- M = r.inArray(O, s) > -1;
- if (M) {
- var P = I.meta,
- E = A(J.css(O)) || 0,
- L = O + "_o";
- F = N - E;
- P[O] = F;
- P[L] = J.css(O) == "auto" ? 0 + F : E + F || 0;
- I.meta = P;
- if (G && F === 0) {
- F = 0 - P[L];
- P[O] = F;
- P[L] = 0
- }
- }
- return J.data(m, B(I, O, H, K, F, D, G, C))
- }
- function B(K, J, F, H, I, D, E, C) {
- K = typeof K === "undefined" ? {} : K;
- K.secondary = typeof K.secondary === "undefined" ? {} : K.secondary;
- for (var G = n.length - 1; G >= 0; G--) {
- if (typeof K[n[G] + "transition-property"] === "undefined") {
- K[n[G] + "transition-property"] = ""
- }
- K[n[G] + "transition-property"] += ", " + ((D === true && E === true) ? n[G] + "transform" : J);
- K[n[G] + "transition-duration"] = F + "ms";
- K[n[G] + "transition-timing-function"] = H;
- K.secondary[((D === true && E === true) ? n[G] + "transform" : J)] = (D === true && E === true) ? u(K.meta.left, K.meta.top, C) : I
- }
- return K
- }
- function o(D) {
- for (var C in D) {
- if ((C == "width" || C == "height") && (D[C] == "show" || D[C] == "hide" || D[C] == "toggle")) {
- return true
- }
- }
- return false
- }
- function d(D) {
- for (var C in D) {
- return false
- }
- return true
- }
- function A(C) {
- return parseFloat(C.replace(/px/i, ""))
- }
- function p(F, E, C) {
- var D = r.inArray(F, j) > -1;
- if ((F == "width" || F == "height") && (E === parseFloat(C.css(F)))) {
- D = false
- }
- return D
- }
- r.extend({
- toggle3DByDefault: function () {
- g = !g
- }
- });
- r.fn.translation = function () {
- if (!this[0]) {
- return null
- }
- var G = this[0],
- D = window.getComputedStyle(G, null),
- H = {
- x: 0,
- y: 0
- };
- for (var F = n.length - 1; F >= 0; F--) {
- var E = D.getPropertyValue(n[F] + "transform");
- if (E && (/matrix/i).test(E)) {
- var C = E.replace(/^matrix\(/i, "").split(/, |\)$/g);
- H = {
- x: parseInt(C[4], 10),
- y: parseInt(C[5], 10)
- };
- break
- }
- }
- return H
- };
- r.fn.animate = function (D, E, I, K) {
- D = D || {};
- var F = !(typeof D.bottom !== "undefined" || typeof D.right !== "undefined"),
- J = r.speed(E, I, K),
- C = this,
- H = 0,
- G = function () {
- H--;
- if (H === 0) {
- if (typeof J.complete === "function") {
- J.complete.apply(C[0], arguments)
- }
- }
- };
- if (!x || d(D) || o(D) || J.duration <= 0 || (r.fn.animate.defaults.avoidTransforms === true && D.avoidTransforms !== false)) {
- return t.apply(this, arguments)
- }
- return this[J.queue === true ? "queue" : "each"](function () {
- var V = r(this),
- M = r.extend({}, J),
- R = function () {
- var ac = {};
- for (var Z = n.length - 1; Z >= 0; Z--) {
- ac[n[Z] + "transition-property"] = "none";
- ac[n[Z] + "transition-duration"] = "";
- ac[n[Z] + "transition-timing-function"] = ""
- }
- V.unbind(a);
- if (!D.leaveTransforms === true) {
- var ab = V.data(m) || {},
- aa = {};
- for (Z = n.length - 1; Z >= 0; Z--) {
- aa[n[Z] + "transform"] = ""
- }
- if (F && typeof ab.meta !== "undefined") {
- for (var Y = 0, X; X = s[Y]; ++Y) {
- aa[X] = ab.meta[X + "_o"] + "px"
- }
- }
- V.css(ac).css(aa)
- }
- if (D.opacity === "hide") {
- V.css("display", "none")
- }
- V.data(m, null);
- G.call(V)
- },
- N = {
- bounce: c + "0.0, 0.35, .5, 1.3" + y,
- linear: "linear",
- swing: "ease-in-out",
- easeInQuad: c + "0.550, 0.085, 0.680, 0.530" + y,
- easeInCubic: c + "0.550, 0.055, 0.675, 0.190" + y,
- easeInQuart: c + "0.895, 0.030, 0.685, 0.220" + y,
- easeInQuint: c + "0.755, 0.050, 0.855, 0.060" + y,
- easeInSine: c + "0.470, 0.000, 0.745, 0.715" + y,
- easeInExpo: c + "0.950, 0.050, 0.795, 0.035" + y,
- easeInCirc: c + "0.600, 0.040, 0.980, 0.335" + y,
- easeOutQuad: c + "0.250, 0.460, 0.450, 0.940" + y,
- easeOutCubic: c + "0.215, 0.610, 0.355, 1.000" + y,
- easeOutQuart: c + "0.165, 0.840, 0.440, 1.000" + y,
- easeOutQuint: c + "0.230, 1.000, 0.320, 1.000" + y,
- easeOutSine: c + "0.390, 0.575, 0.565, 1.000" + y,
- easeOutExpo: c + "0.190, 1.000, 0.220, 1.000" + y,
- easeOutCirc: c + "0.075, 0.820, 0.165, 1.000" + y,
- easeInOutQuad: c + "0.455, 0.030, 0.515, 0.955" + y,
- easeInOutCubic: c + "0.645, 0.045, 0.355, 1.000" + y,
- easeInOutQuart: c + "0.770, 0.000, 0.175, 1.000" + y,
- easeInOutQuint: c + "0.860, 0.000, 0.070, 1.000" + y,
- easeInOutSine: c + "0.445, 0.050, 0.550, 0.950" + y,
- easeInOutExpo: c + "1.000, 0.000, 0.000, 1.000" + y,
- easeInOutCirc: c + "0.785, 0.135, 0.150, 0.860" + y
- },
- Q = {},
- O = N[M.easing || "swing"] ? N[M.easing || "swing"] : M.easing || "swing";
- for (var L in D) {
- if (r.inArray(L, v) === -1) {
- var S = r.inArray(L, s) > -1,
- U = i(V, D[L], L, (S && D.avoidTransforms !== true));
- if (D.avoidTransforms !== true && p(L, U, V)) {
- l(V, L, M.duration, O, S && D.avoidTransforms === true ? U + "px" : U, S && D.avoidTransforms !== true, F, D.useTranslate3d === true)
- } else {
- Q[L] = D[L]
- }
- }
- }
- var W = V.data(m) || {};
- for (var P = n.length - 1; P >= 0; P--) {
- if (typeof W[n[P] + "transition-property"] !== "undefined") {
- W[n[P] + "transition-property"] = W[n[P] + "transition-property"].substr(2)
- }
- }
- V.data(m, W).unbind(a);
- if (!d(V.data(m)) && !d(V.data(m).secondary)) {
- H++;
- V.css(V.data(m));
- var T = V.data(m).secondary;
- setTimeout(function () {
- V.bind(a, R).css(T)
- })
- } else {
- M.queue = false
- } if (!d(Q)) {
- H++;
- t.apply(V, [Q, {
- duration: M.duration,
- easing: r.easing[M.easing] ? M.easing : (r.easing.swing ? "swing" : "linear"),
- complete: G,
- queue: M.queue
- }])
- }
- return true
- })
- };
- r.fn.animate.defaults = {};
- r.fn.stop = function (F, D, E) {
- if (!x) {
- return q.apply(this, [F, D])
- }
- if (F) {
- this.queue([])
- }
- var G = {};
- for (var C = n.length - 1; C >= 0; C--) {
- G[n[C] + "transition-property"] = "none";
- G[n[C] + "transition-duration"] = "";
- G[n[C] + "transition-timing-function"] = ""
- }
- this.each(function () {
- var J = r(this),
- I = window.getComputedStyle(this, null),
- L = {},
- K;
- if (!d(J.data(m)) && !d(J.data(m).secondary)) {
- var M = J.data(m);
- if (D) {
- L = M.secondary;
- if (!E && typeof M.meta.left_o !== undefined || typeof M.meta.top_o !== undefined) {
- L.left = typeof M.meta.left_o !== undefined ? M.meta.left_o : "auto";
- L.top = typeof M.meta.top_o !== undefined ? M.meta.top_o : "auto";
- for (K = n.length - 1; K >= 0; K--) {
- L[n[K] + "transform"] = ""
- }
- }
- } else {
- for (var N in J.data(m).secondary) {
- N = N.replace(z, "-$1").toLowerCase();
- L[N] = I.getPropertyValue(N);
- if (!E && (/matrix/i).test(L[N])) {
- var H = L[N].replace(/^matrix\(/i, "").split(/, |\)$/g);
- L.left = (parseFloat(H[4]) + parseFloat(J.css("left")) + "px") || "auto";
- L.top = (parseFloat(H[5]) + parseFloat(J.css("top")) + "px") || "auto";
- for (K = n.length - 1; K >= 0; K--) {
- L[n[K] + "transform"] = ""
- }
- }
- }
- }
- J.unbind(a).css(G).css(L).data(m, null)
- } else {
- q.apply(J, [F, D])
- }
- });
- return this
- }
- })(juicebox_lib.jQuery, juicebox_lib.jQuery.fn.animate, juicebox_lib.jQuery.fn.stop);
- juicebox_lib.jQuery.fn.extend({
- disableSelection: function () {
- return this.each(function () {
- this.onselectstart = function () {
- return false
- };
- this.unselectable = "on";
- jQuery(this).css("user-select", "none");
- jQuery(this).css("-o-user-select", "none");
- jQuery(this).css("-moz-user-select", "none");
- jQuery(this).css("-khtml-user-select", "none");
- jQuery(this).css("-webkit-user-select", "none")
- })
- }
- });
- if (!juicebox_lib.jQuery.easing.easeOutQuart) {
- juicebox_lib.jQuery.extend(juicebox_lib.jQuery.easing, {
- easeOutQuart: function (e, f, a, h, g) {
- return -h * ((f = f / g - 1) * f * f * f - 1) + a
- }
- })
- }
- var juice_box_utils = function (p$) {
- var $ = p$;
- var is_pro_version = "cd64f8c2ad416da082f8c514ba054429";
- var is_absolute_path = function (path) {
- if (!path) {
- return false
- }
- if (path.indexOf("/") === 0) {
- return true
- }
- if (path.toLowerCase().indexOf("http://") === 0) {
- return true
- }
- if (path.toLowerCase().indexOf("https://") === 0) {
- return true
- }
- return false
- };
- var is_end_with = function (str, ch) {
- if (!str || !ch) {
- return false
- }
- if (str.substring(str.length - ch.length) === ch) {
- return true
- }
- return false
- };
- var convert_to_absolute_path = function (url) {
- if (is_absolute_path(url)) {
- return url
- }
- var ipos = window.location.href.lastIndexOf("/");
- var iposs = window.location.href.indexOf("://");
- if (ipos <= 0) {
- return "/" + url
- }
- if (iposs > 0 && ipos - iposs < 3) {
- return "/" + url
- }
- return window.location.href.substring(0, ipos) + "/" + url
- };
- var concatenate_path = function (base, url) {
- if (!base) {
- base = ""
- }
- if (!url) {
- url = ""
- }
- if (is_absolute_path(url)) {
- return url
- }
- if (!is_end_with(base, "/") && base) {
- base += "/"
- }
- return base + url
- };
- var is_it_scrolling = function () {
- var doc = $(document);
- var win = $(window);
- return {
- v_scrolling: doc.height() > win.height(),
- h_scrolling: doc.width() > win.width()
- }
- };
- var in_iframe = function () {
- if (top && top.location !== location) {
- return true
- }
- return false
- };
- var is_iphone = function () {
- if (navigator.userAgent.match(/iPhone/i)) {
- return true
- }
- return false
- };
- var is_ipad = function () {
- if (navigator.userAgent.match(/iPad/i)) {
- return true
- }
- return false
- };
- var is_android = function () {
- if (navigator.userAgent.match(/Android/i)) {
- return true
- }
- return false
- };
- var is_small_android = function () {
- if (navigator.userAgent.match(/Galaxy Nexus/i)) {
- return true
- }
- if (navigator.userAgent.match(/Nexus S/i)) {
- return true
- }
- if (navigator.userAgent.match(/HTC Panache/i)) {
- return true
- }
- if (navigator.userAgent.match(/HTC myTouch/i)) {
- return true
- }
- if (navigator.userAgent.match(/Sensation/i)) {
- return true
- }
- if (is_android() && is_small_screen()) {
- return true
- }
- return false
- };
- var is_chrome = function () {
- if (navigator.userAgent.match(/Chrome/i)) {
- return true
- }
- return false
- };
- var is_firefox = function () {
- if (navigator.userAgent.match(/Firefox/i)) {
- return true
- }
- return false
- };
- var get_android_ver = function () {
- var pos = navigator.userAgent.indexOf("Android");
- if (pos < 0) {
- return 0
- }
- var pose = navigator.userAgent.indexOf(";", pos);
- if (pose <= pos) {
- return 0
- }
- var vi = navigator.userAgent.substring(pos, pose);
- var va = vi.split(" ");
- if (va.length !== 2) {
- return 0
- }
- return parseFloat(va[1])
- };
- var get_vp_meta_cnt = function (density) {
- return "width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" + (density ? ", target-densitydpi=" + density : "")
- };
- var get_vp_meta_cnt_4_iphone_with_ratio = function (ratio) {
- return "width=800, initial-scale=" + ratio + ", minimum-scale=" + ratio + ", maximum-scale=" + ratio + ", user-scalable=0"
- };
- var meta_tag_id = "sv-meta";
- var populate_viewport_meta_content = function (isFullscreen) {
- if (isFullscreen) {
- if (is_ipad() || is_iphone()) {
- return get_vp_meta_cnt("")
- } else {
- if (is_android()) {
- return get_vp_meta_cnt(160)
- }
- }
- } else {
- return ""
- }
- return ""
- };
- var set_viewport_value = function (val) {
- if (is_android()) {
- $("#" + meta_tag_id).attr("content", get_vp_meta_cnt(val))
- }
- if (is_iphone()) {
- $("#" + meta_tag_id).attr("content", get_vp_meta_cnt_4_iphone_with_ratio(val))
- }
- };
- var host_has_viewport_meta = function () {
- return document.getElementsByName("viewport").length > 0 && $("#" + meta_tag_id).length <= 0
- };
- var need_viewport_meta = function () {
- if (is_ipad() || is_iphone() || is_android()) {
- return true
- }
- return false
- };
- var add_viewport_meta = function (isFullscreen) {
- if (!need_viewport_meta()) {
- return
- }
- if ($("#" + meta_tag_id).length > 0) {
- return
- }
- if (host_has_viewport_meta()) {
- return
- }
- var svmeta4idvc = document.createElement("meta");
- svmeta4idvc.name = "viewport";
- svmeta4idvc.id = meta_tag_id;
- svmeta4idvc.content = populate_viewport_meta_content(isFullscreen);
- var header = document.getElementsByTagName("head");
- if (!header) {
- return
- }
- header[0].appendChild(svmeta4idvc)
- };
- var set_viewport_meta = function (isFullscreen) {
- if (!need_viewport_meta()) {
- return
- }
- $("#" + meta_tag_id).attr("content", populate_viewport_meta_content(isFullscreen))
- };
- var get_viewport_meta_content = function () {
- var tags = document.getElementsByName("viewport");
- if (tags.length <= 0) {
- return null
- }
- if (!tags[0].content) {
- return null
- }
- return tags[0].content
- };
- var set_viewport_meta_content = function (content) {
- var tags = document.getElementsByName("viewport");
- if (tags.length <= 0) {
- return
- }
- tags[0].content = content
- };
- var get_current_path = function () {
- var uri = window.location.href.split("#")[0].split("?")[0];
- var posLasts = uri.lastIndexOf("/");
- var posS = uri.indexOf("//");
- if (posLasts < 0 || posS < 0) {
- return ""
- }
- var pos1 = uri.indexOf("/", posS + 2);
- if (pos1 < 0 || posLasts - pos1 <= 0) {
- return "/"
- }
- var tail = uri.substring(posLasts + 1);
- if (tail.indexOf(".") > 0) {
- return uri.substring(pos1, posLasts)
- }
- return uri.substring(pos1)
- };
- var get_qs_value = function (key, dft_) {
- if (dft_ == null) {
- dft_ = ""
- }
- key = key.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
- var qs = regex.exec(window.location.href);
- if (qs == null) {
- return dft_
- } else {
- return qs[1]
- }
- };
- var get_js_folder_url = function () {
- var i, root, pos, scripts = document.getElementsByTagName("script");
- for (i = 0; i < scripts.length; i++) {
- pos = scripts[i].src.toLowerCase().indexOf("juicebox.js");
- if (pos === 0) {
- return ""
- }
- if (pos > 0) {
- return scripts[i].src.substring(0, pos)
- }
- }
- return ""
- };
- var u_skey = "cd64f8c2ad416da082f8c514ba054429";
- var set_cookie = function (c_name, value, expires) {
- if (expires < 0) {
- expires = "Thu, 01 Jan 1970 00:00:00 GMT"
- } else {
- expires = ""
- }
- document.cookie = c_name + "=" + escape(value) + ((expires === "") ? "" : ";expires=" + expires) + ";path=/"
- };
- var get_cookie = function (c_name) {
- if (document.cookie.length > 0) {
- c_start = document.cookie.indexOf(c_name + "=");
- if (c_start !== -1) {
- c_start = c_start + c_name.length + 1;
- c_end = document.cookie.indexOf(";", c_start);
- if (c_end === -1) {
- c_end = document.cookie.length
- }
- return unescape(document.cookie.substring(c_start, c_end))
- }
- }
- return ""
- };
- var wrap_value = function (val) {
- switch (typeof val) {
- case "boolean":
- case "number":
- return val + "";
- default:
- return '"' + val + '"'
- }
- };
- var save_object_2_cookie = function (c_name, object) {
- if (!object) {
- set_cookie(c_name, "");
- return
- }
- var jsons = "";
- for (var k in object) {
- if (jsons.length > 0) {
- jsons += ","
- }
- jsons += k + ":" + wrap_value(object[k])
- }
- jsons = "{" + jsons + "}";
- set_cookie(c_name, jsons)
- };
- var get_object_from_cookie = function (c_name) {
- var json = get_cookie(c_name);
- var ret;
- eval("ret = " + (json ? json : null) + ";");
- return ret
- };
- var get_device_dpi = function (cb) {
- if (!is_iphone() && !is_ipad() && !is_android()) {
- if (cb) {
- cb(1)
- }
- return 1
- }
- var s = document.createElement("style");
- var d = document.createElement("div");
- d.id = "dpi-detector-01";
- var map = [{
- ratio: 1,
- pixel: "10px"
- }, {
- ratio: 1.5,
- pixel: "15px"
- }, {
- ratio: 2,
- pixel: "20px"
- }];
- s.innerText = "";
- for (var i = 0; i < map.length; i++) {
- s.innerText += "@media (-webkit-min-device-pixel-ratio:" + map[i].ratio + ") {#" + d.id + "{font-size:" + map[i].pixel + " !important;}}"
- }
- document.documentElement.appendChild(s).appendChild(d);
- window.setTimeout(function () {
- var dfs = getComputedStyle(d, null).getPropertyValue("font-size");
- for (var j = 0; j < map.length; j++) {
- if (dfs == map[i].pixel) {
- if (cb) {
- cb(map[i].ratio)
- }
- return map[i].ratio
- }
- }
- s.parentNode.removeChild(s);
- d.parentNode.removeChild(d);
- if (cb) {
- cb(1)
- }
- return 1
- }, 100)
- };
- var get_query_path = function (document_id, path) {
- var paths = path.split(",");
- var xpath = "";
- for (var i = 0; i < paths.length; i++) {
- xpath += "#" + document_id + " " + paths[i] + (i === paths.length - 1 ? "" : ", ")
- }
- return xpath
- };
- var is_small_screen = function () {
- if (is_android()) {
- if (navigator.userAgent.match(/Mobile/i)) {
- return true
- }
- return false
- }
- if (Math.max(screen.height, screen.width) > 1000) {
- return false
- }
- return true
- };
- var is_swipable_device = function () {
- if (!is_iphone() && !is_ipad() && !is_android()) {
- return false
- }
- return true
- };
- var is_large_screen_mode = function (config) {
- if (config.screenmode.toUpperCase() === "LARGE") {
- return true
- }
- if (config.screenmode.toUpperCase() === "SMALL") {
- return false
- }
- if (!is_small_screen() && !is_small_android() && !is_iphone()) {
- return true
- }
- return false
- };
- var is_earlier_ie = function () {
- if ($.browser.msie && $.browser.version < 9) {
- return true
- }
- return false
- };
- var is_firefox3 = function () {
- var bz = $.browser;
- if (bz.mozilla && bz.version.slice(0, 3) == "1.9") {
- return true
- }
- return false
- };
- var format_color = function (color) {
- color = color.replace(/#/g, "");
- if (color.match(/^[0-9a-f]{3,6}$/i)) {
- return "#" + color
- }
- return color
- };
- var need_new_window = function () {
- return false;
- if (!is_iphone() || !is_ipad()) {
- return false
- }
- };
- var is_adobe_air = function () {
- return navigator.userAgent.match(/AdobeAIR/i)
- };
- return {
- ship: is_pro_version === u_skey,
- concate_path: concatenate_path,
- is_page_scrolling: is_it_scrolling,
- is_in_iframe: in_iframe,
- add_viewport_meta_tag_4_device: add_viewport_meta,
- set_viewport_meta: set_viewport_meta,
- is_iphone: is_iphone,
- is_ipad: is_ipad,
- is_android: is_android,
- is_small_android: is_small_android,
- get_android_ver: get_android_ver,
- is_chrome: is_chrome,
- get_current_path: get_current_path,
- get_query_string_value: get_qs_value,
- save_object_2_cookie: save_object_2_cookie,
- get_object_from_cookie: get_object_from_cookie,
- get_device_dpi: get_device_dpi,
- get_query_path: get_query_path,
- is_swipable_device: is_swipable_device,
- is_large_screen_mode: is_large_screen_mode,
- is_earlier_ie: is_earlier_ie,
- set_viewport_value: set_viewport_value,
- format_color: format_color,
- need_viewport_meta: need_viewport_meta,
- host_has_viewport_meta: host_has_viewport_meta,
- get_viewport_meta_content: get_viewport_meta_content,
- set_viewport_meta_content: set_viewport_meta_content,
- is_firefox: is_firefox,
- is_firefox3: is_firefox3,
- get_js_folder_url: get_js_folder_url,
- need_new_window: need_new_window,
- convert_to_absolute_path: convert_to_absolute_path,
- is_adobe_air: is_adobe_air
- }
- };
- var juicebox_config_manager = function (h, i) {
- var e = h;
- var m = i;
- var f = false;
- var c = "048d7e421a02974b54391bc3463ebd52";
- var l = false;
- var B = "";
- var D = {
- containerid: "",
- debugmode: false,
- forcetouchmode: false,
- enabletouchzoom: true,
- gallerywidth: "100%",
- galleryheight: "100%",
- backgroundcolor: "",
- backgroundopacity: "1",
- textcolor: "",
- topbackcolor: "",
- topbackopacity: "0",
- captionbackcolor: "",
- captionbackopacity: "1",
- buttonbarbackcolor: "",
- buttonbarbackopacity: "1",
- imageframecolor: "",
- imageframeopacity: "1",
- thumbframecolor: "",
- thumbframeopacity: "1",
- stagepadding: 0,
- imagepadding: 0,
- framewidth: 0,
- enablekeyboardcontrols: true,
- firstimageindex: -1,
- randomizeimages: false,
- showpreloader: true,
- screenmode: "AUTO",
- languagelist: 'Previous|Next|Start AutoPlay|Stop AutoPlay|Play Audio|Pause Audio|Show Thumbnails|Expand Gallery|Close Gallery|Open Image in New Window|Download Image|About|AutoPlay ON|AutoPlay OFF|Show Thumbnails|Hide Thumbnails|Show Information|Next Image|Previous Image|Hide Information|Juicebox does not display locally in Google Chrome. <a href="http://www.juicebox.net/support/faq/#chrome_local">More Info</a>.|Juicebox Error: Config XML file not found.|Juicebox Error: Cannot find div with id: "|"|Juicebox Error: Theme CSS file not found',
- imagelocking: false,
- enablelooping: false,
- imageclickmode: "NAVIGATE",
- imagescalemode: "SCALE_DOWN",
- imagepreloading: "PAGE",
- imagetransitiontime: 0.5,
- imagetransitiontype: "SLIDE",
- showimageoverlay: "AUTO",
- showimagenav: true,
- showbigplaybutton: false,
- thumbwidth: 85,
- thumbheight: 85,
- thumbpadding: 10,
- thumbpreloading: "PAGE",
- changecaptiononhover: false,
- changeimageonhover: false,
- usethumbdots: false,
- showthumbpagingtext: false,
- showsmallthumbs: true,
- smallthumbsshowtitles: false,
- smallthumbslayoutstyle: "GRID",
- smallthumbslidetime: 0.5,
- topareaheight: 50,
- buttonbarposition: "OVERLAY",
- showopenbutton: true,
- showexpandbutton: true,
- showinfobutton: false,
- showdownloadbutton: false,
- showsharebutton: true,
- shownavbuttons: false,
- showautoplaybutton: false,
- showaudiobutton: false,
- showthumbsbutton: true,
- showlargethumbs: true,
- gallerytitle: "",
- gallerytitleposition: "OVERLAY",
- captionposition: "OVERLAY",
- maxcaptionheight: 120,
- showimagenumber: true,
- enableautoplay: false,
- autoplayonload: false,
- displaytime: 5,
- showautoplaystatus: true,
- gonextonautoplay: false,
- autoplaythumbs: true,
- audiourlmp3: "",
- audiourlogg: "",
- loopaudio: true,
- playaudioonload: false,
- audiovolume: 0.8,
- showbackbutton: false,
- backbuttontext: "< Back",
- backbuttonurl: "",
- backbuttonposition: "TOP",
- usefixedlayout: false,
- showsplashpage: "AUTO",
- splashbuttontext: "View Gallery",
- splashtitle: "",
- splashimageurl: "",
- splashshowimagecount: true,
- splashdescription: "",
- enableseo: false,
- seoadditionaltext: "",
- enabledirectlinks: false,
- enabletwitersharing: true,
- enablefacebooksharing: true,
- enableemailsharing: true,
- enabledirectlinksharing: true,
- shareuseimagedescription: false,
- sharetext: "View my image",
- configurl: "config.xml",
- themeurl: m.get_js_folder_url() + "classic/theme.css",
- baseurl: "",
- useflickr: false,
- flickrusername: "",
- flickrtags: "",
- flickruserid: "",
- flickrsetid: "",
- flickrgroupid: "",
- flickrtagmode: "ALL",
- flickrsort: "DATE-POSTED-DESC",
- flickrimagesize: "LARGE",
- flickrimagecount: 50,
- flickrextraparams: "",
- flickrshowtitle: true,
- flickrshowdescription: false,
- flickrshowpagelink: false,
- flickrpagelinktext: "View on Flickr",
- theme: "classic",
- showcaption: true,
- slidecaption: false,
- forceheightcalculation: true,
- maxthumbcolumns: 10,
- thumbnail_rows: 0,
- thumbnail_cols: 0,
- thumb_load_placeholder: "<div class='jb-status-thumb-loading'><div>",
- main_load_placeholder: "<div class='jb-status-loading'></div>",
- pages_header: "",
- sync_caption_dimensions: true,
- minimagegap: 60,
- use_webkit_transform: m.is_swipable_device() && !m.is_in_iframe() && m.is_ipad(),
- onload: function () {}
- };
- var g = ",onload,";
- var C = ",containerid,gallerytitle,gallerywidth,galleryheight,backgroundcolor,overlaycolor,framecolor,showopenbutton,showexpandbutton,useflickr,flickrusername,flickrtags,configurl,themeurl,baseurl,debugmode,showthumbsbutton,forceheightcalculation,";
- var j = {
- showlargethumbs: {
- appliedValues: [false],
- "default": true
- },
- usethumbdots: {
- appliedValues: [true],
- "default": false
- },
- captionposition: {
- appliedValues: ["BELOW_IMAGE", "BOTTOM"],
- "default": "OVERLAY"
- },
- buttonbarposition: {
- appliedValues: ["TOP"],
- "default": "OVERLAY"
- },
- stagepadding: {
- appliedValues: null,
- "default": 0
- },
- imagepadding: {
- appliedValues: null,
- "default": 0
- },
- textcolor: {
- appliedValues: null,
- "default": ""
- },
- topbackcolor: {
- appliedValues: null,
- "default": ""
- },
- captionbackcolor: {
- appliedValues: null,
- "default": ""
- },
- buttonbarbackcolor: {
- appliedValues: null,
- "default": ""
- },
- imageframecolor: {
- appliedValues: null,
- "default": ""
- },
- thumbframecolor: {
- appliedValues: null,
- "default": ""
- },
- imagetransitiontype: {
- appliedValues: null,
- "default": "SLIDE"
- },
- backgroundcolor: {
- appliedValues: null,
- "default": ""
- }
- };
- var n = function (F) {
- if (!F) {
- return "100%"
- }
- if (typeof (F) === "number" || F.indexOf("%") <= 0) {
- return parseInt(F) + "px"
- }
- return F
- };
- var d = function (H, G) {
- if (!H) {
- return G
- }
- var F = H.split("#")[0].split("?")[0].split("/");
- if (F.length <= 0) {
- return G
- }
- if (F.length <= 1) {
- return ""
- }
- if (F[F.length - 1].toLowerCase().indexOf("theme.css") < 0) {
- return G
- }
- return F[F.length - 2]
- };
- var o = function (G, F, H) {
- if (!G || G.length <= F) {
- return H
- }
- return G[F]
- };
- var s = function (H, F) {
- if (!F) {
- return true
- }
- for (var G = 0; G < F.length; G++) {
- if (typeof (H) === "string") {
- if (F[G].toUpperCase() === H.toUpperCase()) {
- return true
- }
- } else {
- if (F[G] === H) {
- return true
- }
- }
- }
- return false
- };
- var z = function () {
- if (m.is_iphone() || m.is_ipad()) {
- D.playaudioonload = false
- }
- if (!D.showpreloader) {
- D.main_load_placeholder = D.main_load_placeholder.replace("jb-status-loading", "jb-status-no-loading")
- }
- var G = m.is_large_screen_mode(D);
- if (G) {
- return
- }
- for (var F in D) {
- if (!j[F]) {
- continue
- }
- if (!s(D[F], j[F].appliedValues)) {
- continue
- }
- D[F] = j[F]["default"]
- }
- if (m.is_swipable_device()) {
- D.forcetouchmode = false
- }
- };
- var a = function () {
- D.galleryheight = n(D.galleryheight);
- D.gallerywidth = n(D.gallerywidth);
- D.theme = d(D.themeurl, D.theme);
- if (D.thumbwidth < 20 || D.thumbwidth > 600) {
- D.thumbwidth = 96
- }
- if (D.thumbheight < 20 || D.thumbheight > 600) {
- D.thumbheight = 96
- }
- if (typeof (D.languagelist) === "string") {
- var F = D.languagelist.split("|");
- D.languagelist = {};
- D.languagelist.p = o(F, 0, "");
- D.languagelist.n = o(F, 1, "");
- D.languagelist.strta = o(F, 2, "");
- D.languagelist.stpa = o(F, 3, "");
- D.languagelist.plya = o(F, 4, "");
- D.languagelist.psa = o(F, 5, "");
- D.languagelist.st = o(F, 6, "");
- D.languagelist.gf = o(F, 7, "");
- D.languagelist.ef = o(F, 8, "");
- D.languagelist.oiinw = o(F, 9, "");
- D.languagelist.di = o(F, 10, "");
- D.languagelist.abt = o(F, 11, "");
- D.languagelist.aon = o(F, 12, "");
- D.languagelist.aoff = o(F, 13, "");
- D.languagelist.stlsm = o(F, 14, "");
- D.languagelist.htlsm = o(F, 15, "");
- D.languagelist.sinfo = o(F, 16, "");
- D.languagelist.gonxt = o(F, 17, "");
- D.languagelist.goprv = o(F, 18, "");
- D.languagelist.hdinfo = o(F, 19, "");
- D.languagelist.lcchm = o(F, 20, "");
- D.languagelist.ae = o(F, 21, "");
- D.languagelist.noid01 = o(F, 22, "");
- D.languagelist.noid02 = o(F, 23, "");
- D.languagelist.nothm = o(F, 24, "")
- }
- var G;
- if (D) {
- if (D.backgroundcolor) {
- G = r(D.backgroundcolor);
- D.backgroundcolor = G.color;
- D.backgroundopacity = G.opacity
- }
- if (D.textcolor) {
- G = r(D.textcolor);
- D.textcolor = G.color
- }
- if (D.topbackcolor) {
- G = r(D.topbackcolor);
- D.topbackcolor = G.color;
- D.topbackopacity = G.opacity
- }
- if (D.captionbackcolor) {
- G = r(D.captionbackcolor);
- D.captionbackcolor = G.color;
- D.captionbackopacity = G.opacity
- }
- if (D.buttonbarbackcolor) {
- G = r(D.buttonbarbackcolor);
- D.buttonbarbackcolor = G.color;
- D.buttonbarbackopacity = G.opacity
- }
- if (D.imageframecolor) {
- G = r(D.imageframecolor);
- D.imageframecolor = G.color;
- D.imageframeopacity = G.opacity
- }
- if (D.thumbframecolor) {
- G = r(D.thumbframecolor);
- D.thumbframecolor = G.color;
- D.thumbframeopacity = G.opacity
- }
- }
- };
- var q = function (G) {
- var F = G.toString(16);
- if (F.length >= 2) {
- return F
- }
- if (F.length === 1) {
- return "0" + F
- }
- if (F.length === 0) {
- return "00"
- }
- return F
- };
- var r = function (M) {
- if (!M) {
- return {
- color: "",
- opacity: v(1)
- }
- }
- var K = M.toLowerCase().replace(/ /g, "");
- if (K.indexOf("rgb") !== 0) {
- return {
- color: M,
- opacity: v(1)
- }
- }
- K = K.replace("rgba(", "").replace("rgb(", "").replace(")", "");
- var J = K.split(",");
- if (J.length < 3 || J.length > 4) {
- return {
- color: M,
- opacity: v(1)
- }
- }
- var G = M;
- if (e.browser.msie && e.browser.version < 9) {
- var I = parseInt(J[0]);
- var H = parseInt(J[1]);
- var F = parseInt(J[2]);
- G = q(I) + q(H) + q(F)
- }
- if (J.length === 3) {
- return {
- color: G,
- opacity: v(1)
- }
- }
- var L = parseFloat(J[3]);
- if (L < 0 || L > 1) {
- return {
- color: G,
- opacity: v(1)
- }
- }
- return {
- color: G,
- opacity: v(L.toString())
- }
- };
- var v = function (F) {
- if (!(e.browser.msie && e.browser.version < 9)) {
- return F
- }
- if (("" + F).indexOf("filter") === 0) {
- return F
- }
- var G = parseFloat(F);
- return "filter:alpha(opacity=" + parseInt(100 * G) + ")"
- };
- var u = function (H) {
- if (!H) {
- return
- }
- var G, I;
- for (var F in H) {
- G = F.toLowerCase();
- if (typeof D[G] == "undefined") {
- continue
- }
- I = "," + G + ",";
- if (p === "048d7e421a20974d54321bc3563ebd52") {
- continue
- }
- if (!f && p !== "048d7e421a02974b54391bc3463ebd52" && C.indexOf(I) < 0) {
- continue
- }
- if (g.indexOf(I) >= 0) {
- continue
- }
- D[G] = t(H[F], (typeof D[G]))
- }
- a()
- };
- var p = "048d7e421a02974b54391bc3463ebd52";
- var t = function (G, F) {
- switch (F) {
- case "boolean":
- if (typeof G == "boolean") {
- return G
- }
- return (G.toLowerCase() == "true" || G.toLowerCase() == "on" || G == "1") ? true : false;
- case "number":
- return parseFloat(G);
- default:
- return G
- }
- return G
- };
- var E = function () {
- var F = "";
- var J = ",gallerywidth,galleryheight,containerid,thumbnail_rows,thumbnail_cols,";
- var I, H;
- for (var G in D) {
- I = "," + G + ",";
- if (g.indexOf(I) >= 0) {
- continue
- }
- if (J.indexOf(I) >= 0) {
- continue
- }
- if (p === "048d7e421a20975d64321bc3563ebd52") {
- continue
- }
- H = (typeof D[G] == "string") ? D[G].replace("#", "_p-s_") : D[G];
- F += G + "=" + encodeURI(H) + "&"
- }
- return F
- };
- var A = function () {
- var J = window.location.href.split("?");
- if (J.length <= 1) {
- return null
- }
- var F = J[1].split("#");
- if (F.length <= 0) {
- return null
- }
- var N = F[0].split("&");
- var K = {};
- var M, G, O, I;
- var L;
- for (var H = 0; H < N.length; H++) {
- M = N[H].split("=");
- if (M.length < 2) {
- continue
- }
- G = M[0].toLowerCase();
- I = M[1] ? M[1].replace("_p-s_", "#") : "";
- O = decodeURI(I);
- L = typeof D[G];
- if (L == "undefined") {
- continue
- }
- K[G] = t(O, L)
- }
- return K
- };
- var k = function (H) {
- if (!H) {
- return null
- }
- var G = {};
- var K, I;
- var F = e.browser.msie ? H.childNodes[1] : H.childNodes[0];
- if (!F || !F.attributes) {
- return null
- }
- var J = e(F.attributes);
- J.each(function (L, M) {
- K = M.nodeName.toLowerCase();
- I = typeof D[K];
- if (I == "undefined") {
- return
- }
- G[K] = t(M.nodeValue, I)
- });
- return G
- };
- var y = function (F) {};
- var b = function (G, F, H) {
- if (window.location.href.indexOf("jbdbgmd=true") > 0 && l) {
- f = true
- }
- u(k(F));
- u(G);
- if (D.debugmode || f) {
- u(A())
- }
- };
- var w = function (G, F) {
- u(k(F));
- u(G);
- if (D.debugmode || f) {
- u(A())
- }
- z()
- };
- var x = function () {
- return D
- };
- return {
- isp: c == p,
- init: b,
- sync_options: w,
- get_config: x,
- get_query_string: E,
- get_cookie_manager: y
- }
- };
- var juicebox_gallery_dialog = function (f) {
- var h, b;
- var a = "jb-glry-dlg";
- var i = function (m) {
- h = m.jquery;
- b = h("#" + a);
- if (b.length <= 0) {
- h("body").append(k());
- b = h("#" + a)
- }
- };
- var k = function () {
- return "<div id='" + a + "' style='display:none;position:absolute;width:100%;height:100%;left:0;top:0;'></div>"
- };
- var c = function () {
- b.hide()
- };
- var l = function () {
- c();
- b.html("");
- g(true);
- d(true)
- };
- var g = function (m) {
- if (m) {
- b.siblings(".jb-status-hiding-4-dlg").show().removeClass("jb-status-hiding-4-dlg")
- } else {
- b.siblings(":visible").addClass("jb-status-hiding-4-dlg").hide()
- }
- };
- var d = function (m) {
- if (m) {
- b.siblings().children(".jb-status-hiding-4-dlg").show().removeClass("jb-status-hiding-4-dlg")
- } else {
- b.siblings().children(".juicebox-gallery:visible").addClass("jb-status-hiding-4-dlg").hide()
- }
- };
- var j = function (n, m) {
- if (n) {
- g(false)
- } else {
- d(false)
- } if (m) {
- b.html(m)
- }
- b.show()
- };
- var e = function () {
- return a
- };
- i(f);
- return {
- initialize: i,
- hide_dialog: c,
- cleanup_dialog: l,
- show_dialog: j,
- get_id: e
- }
- };
- var juicebox_sizing_manager = function (i, d, a) {
- var e = i;
- var z = a;
- var q = d;
- var k = e("body");
- var h = [{
- name: "Nexus S",
- height: 510,
- width: 296
- }, {
- name: "HTC Panache",
- height: 535,
- width: 325
- }, {
- name: "HTC myTouch",
- height: 535,
- width: 325
- }, {
- name: "MB860",
- height: 615,
- width: 334
- }, {
- name: "GT-I9100M",
- height: 515,
- width: 301
- }];
- var p = function () {
- var C;
- for (var B = 0; B < h.length; B++) {
- C = h[B];
- if (navigator.userAgent.indexOf(C.name) >= 0) {
- if (C.additional) {
- if (navigator.userAgent.indexOf(C.additional) >= 0) {
- return C
- } else {
- continue
- }
- }
- return C
- }
- }
- return null
- };
- var x = function (B) {
- var C = p();
- if (!C) {
- return {
- height: B,
- registered: false
- }
- }
- return {
- height: C.height,
- registered: true
- }
- };
- var n = function (B) {
- var C = p();
- if (!C) {
- return {
- width: B,
- registered: false
- }
- }
- return {
- width: C.width,
- registered: true
- }
- };
- function c(C) {
- var B = f(C, "height");
- if (parseInt(B) === 0) {
- return 0
- }
- return B
- }
- function A(F, E) {
- if (z.is_in_iframe()) {
- return {
- height: e(window).height(),
- registered: D
- }
- }
- var C = F;
- var D = true;
- if (z.is_iphone()) {
- C = F * g(F, E)
- } else {
- if (z.is_small_android()) {
- if (z.get_android_ver() >= 2.3) {
- var B;
- if (F > E) {
- B = x(F);
- C = B.height;
- D = B.registered
- } else {
- B = n(F);
- C = B.width;
- D = B.registered
- }
- } else {
- if (F > E) {
- C = F
- } else {
- C = F + 7
- }
- }
- }
- }
- return {
- height: C,
- registered: D
- }
- }
- var y = c(k.attr("style"));
- var j = (!y && y.toLowerCase().indexOf("%") < 0 && parseInt(y) > 0) || (k.height() > 0.7 * e(window).height() && k.height() > 160);
- var v = function (B) {
- if (j) {
- return false
- }
- if (B.galleryheight.indexOf("%") < 0) {
- return false
- }
- if (B.forceheightcalculation && !(z.is_iphone() && t(B))) {
- return false
- }
- return true
- };
- var l = function (B) {
- if (!v(B)) {
- return
- }
- var C = e(window);
- k.height(A(C.height(), C.width()).height)
- };
- function g(C, B) {
- if (!z.is_iphone()) {
- return 1
- }
- return (C > B) ? 1.18 : 1.3
- }
- var m = function (C, B) {
- if (C === "100%" && B === "100%" && q.width() == e("body").width() && ((e.browser.msie && e.browser.version < 9 && e.browser.version > 7) || q.height() == 0 || q.height() == e("body").height())) {
- return true
- }
- return false
- };
- var t = function (C) {
- var B = z.is_page_scrolling();
- if (m(C.gallerywidth, C.galleryheight) && (z.is_iphone() || e.browser.msie || (!B.v_scrolling && !B.h_scrolling))) {
- return true
- }
- return false
- };
- function f(F, C) {
- if (!F || !C) {
- return ""
- }
- var B = F.split(";");
- var D, I, H, G, E;
- for (E = 0; E < B.length; E++) {
- I = e.trim(B[E]);
- if (!I) {
- continue
- }
- D = I.split(":");
- if (D.length !== 2) {
- continue
- }
- H = e.trim(D[0]);
- G = e.trim(D[1]);
- if (!H) {
- continue
- }
- if (H.toLowerCase() === C.toLowerCase()) {
- return G
- }
- }
- return ""
- }
- var s = function (C) {
- if (z.is_iphone() || !C.forceheightcalculation && q.height() > 110) {
- return q.height()
- }
- var B = parseInt(C.galleryheight);
- if (C.galleryheight.indexOf("%") < 0) {
- return B
- }
- var F = 1;
- var D = 0;
- var E;
- q.parents().each(function (I, K) {
- var J = K.nodeName.toUpperCase();
- E = e(K).attr("style");
- var H = c(E);
- if (H.toLowerCase().indexOf("%") < 0 && parseInt(H) > 0) {
- D = parseInt(H)
- }
- if (!H || D > 0) {
- return
- }
- if (H.indexOf("%") > 0) {
- F *= (parseInt(H) / 100)
- }
- });
- var G = e(window);
- if (D === 0) {
- D = A(G.height(), G.width()).height
- }
- if (!B) {
- B = 100
- }
- B /= 100;
- return F * B * D
- };
- var r = function (Q, K, O, B, ad, G, Y, ah) {
- var U = o(Q, K, ah);
- var P = 2 * U;
- if (P > Q - 60 || P > K - 60) {
- P = 0;
- U = 0
- }
- var I, af, ab, V, H, ae, T, D, aa, N, ac, L, X;
- var W = U,
- Z = 0,
- M = 0,
- F = U;
- var S = ah.captionposition.toUpperCase();
- X = 0;
- aa = ah.maxcaptionheight;
- if (S === "BELOW_IMAGE" || S === "BOTTOM") {
- ac = K - U - aa
- } else {
- ac = K - (ah.thumbheight + ah.thumbpadding)
- } if (G) {
- Z = ah.topareaheight;
- M = Q - P
- }
- if (O && B) {
- var R = ah.thumbpadding / 2;
- var J = Y + (2 * R);
- I = (ah.showthumbpagingtext ? J + (ad ? 35 : 15) : J) + (ad ? 0 : 25);
- af = Q - P;
- ab = K - U - I + R;
- V = U;
- H = K - I - W - Z - U;
- ae = af;
- T = W + Z;
- D = U;
- if (ah.captionposition.toUpperCase() === "BOTTOM") {
- H -= aa;
- ab -= aa;
- ac = K - aa - U
- } else {
- if (ah.captionposition.toUpperCase() === "BELOW_IMAGE") {
- aa = H;
- H -= ah.maxcaptionheight;
- ac = T
- } else {
- X = I + U;
- var C = H - aa;
- if (C > 0) {
- ac = T + C
- } else {
- ac = T
- }
- }
- }
- N = af;
- L = U
- } else {
- var E = W + Z;
- I = K - E;
- af = Q - P;
- ab = U + E;
- V = U;
- H = K - E - U;
- ae = Q - P;
- T = E;
- D = U;
- N = Q - P;
- L = U;
- var ag = ah.captionposition.toUpperCase();
- if (ag === "BOTTOM") {
- H -= aa
- } else {
- if (ag === "BELOW_IMAGE") {
- H -= aa;
- ac = T
- } else {
- var C = H - aa;
- if (C > 0) {
- ac = T + C
- } else {
- ac = T
- }
- X = U
- }
- }
- }
- return {
- top_panel_height: Z,
- top_panel_width: M,
- top_panel_left: F,
- top_panel_top: W,
- index_panel_height: I,
- index_panel_width: af,
- index_panel_top: ab,
- index_panel_left: V,
- detail_panel_height: H,
- detail_panel_width: ae,
- detail_panel_top: T,
- detail_panel_left: D,
- caption_panel_height: aa,
- caption_panel_width: N,
- caption_panel_left: L,
- caption_panel_top: ac,
- caption_panel_bottom: X
- }
- };
- var o = function (B, E, D) {
- var C = Math.min(B, E);
- if (D.stagepadding * 2 + 160 > C) {
- return parseInt((C - 160) / 2)
- }
- return D.stagepadding
- };
- var b = function (E, B, D) {
- var C = Math.min(E, B);
- if (D.imagepadding * 2 + 60 > C) {
- if (D.framewidth > 0 && D.framewidth * 2 >= 60) {
- return parseInt((C - 60) / 4)
- }
- return parseInt((C - 60) / 2)
- }
- return D.imagepadding
- };
- var w = function (E, B, D) {
- var C = Math.min(E, B);
- if (D.framewidth * 2 + 60 > C) {
- if (D.imagepadding > 0 && D.imagepadding * 2 >= 60) {
- return parseInt((C - 60) / 4)
- }
- return parseInt((C - 60) / 2)
- }
- if (2 * D.imagepadding + 2 * D.framewidth + 60 > C) {
- return 0
- }
- return D.framewidth
- };
- var u = function (E, D, C, F) {
- E = parseInt(E);
- D = parseInt(D);
- var B = new Image();
- B.onload = function () {
- var N, M, J, H, G, L;
- var K = B.width / E;
- var I = B.height / D;
- if (B.width <= 0 || B.height <= 0 || E <= 0 || D <= 0) {
- return
- }
- if (K >= 1 && I >= 1) {
- J = "auto";
- H = "auto";
- G = B.width;
- L = B.height;
- N = parseInt((B.height - D) / 2);
- M = parseInt((B.width - E) / 2)
- } else {
- if (K < I) {
- J = E;
- H = "auto";
- G = E;
- L = parseInt(G * B.height / B.width);
- M = 0;
- N = parseInt((L - D) / 2)
- } else {
- H = D;
- J = "auto";
- L = D;
- G = parseInt(L * B.width / B.height);
- N = 0;
- M = parseInt((G - E) / 2)
- }
- } if (F) {
- F({
- imageTop: -1 * N,
- imageLeft: -1 * M,
- imageWidth: J,
- imageHeight: H,
- imageExpectedWidth: G,
- imageExpectedHeight: L
- })
- }
- };
- B.src = C
- };
- return {
- get_gallery_height: s,
- is_fullscreen_mode: t,
- is_gallery_fully_filled: m,
- get_window_height: A,
- try_set_body_height: l,
- get_containers_size_and_position: r,
- get_stage_padding: o,
- get_image_padding: b,
- get_image_framewidth: w,
- position_2_fill_image: u
- }
- };
- var juicebox_flickr_image_loader = function (d, o, f) {
- var G = o.get_config();
- var g = 50;
- var p = f;
- var D = 0;
- var m = 1;
- var l = 0;
- var A = "http://api.flickr.com/services/rest/?method=";
- var x = "&api_key=b40dc56c795c0103c6170731e6271e04";
- var s = {
- FLICKR_SEARCH: "flickr.photos.search",
- FLICKR_INTERESTINGNESS: "flickr.interestingness.getList",
- FLICKR_SET: "flickr.photosets.getPhotos",
- FLICKR_GROUP: "flickr.groups.pools.getPhotos",
- FLICKR_FIND_USER: "flickr.people.findByUsername",
- FLICKR_PHOTO_INFO: "flickr.photos.getInfo",
- FLICKR_PEOPLE_FIND: "flickr.people.findByUsername"
- };
- function z(H) {
- return A + s[H] + x
- }
- function u(H) {
- return z("FLICKR_SEARCH") + (G.flickrtags ? "&tags=" + G.flickrtags : "") + (G.flickruserid ? "&user_id=" + G.flickruserid : "") + "&page=" + m + "&per_page=" + H + "&sort=" + G.flickrsort.toLowerCase() + "&tag_mode=" + G.flickrtagmode.toLowerCase() + (G.flickrextraparams ? "&" + G.flickrextraparams.replace(/,/g, "&") : "") + "&media=photos&extras=url_sq,url_m,url_l,url_o,original_format&format=json&jsoncallback=?"
- }
- function r(H) {
- return z("FLICKR_SET") + "&photoset_id=" + G.flickrsetid + (G.flickrtags ? "&tags=" + G.flickrtags : "") + "&page=" + m + "&per_page=" + H + "&tag_mode=" + G.flickrtagmode.toLowerCase() + "&media=photos&extras=url_sq,url_m,url_l,url_o,original_format&format=json&jsoncallback=?"
- }
- function e(H) {
- return z("FLICKR_GROUP") + "&group_id=" + G.flickrgroupid + (G.flickrtags ? "&tags=" + G.flickrtags : "") + "&page=" + m + "&per_page=" + H + "&tag_mode=" + G.flickrtagmode.toLowerCase() + "&extras=url_sq,url_m,url_l,url_o,original_format&format=json&jsoncallback=?"
- }
- function n(H) {
- return z("FLICKR_INTERESTINGNESS") + "&page=" + m + "&per_page=" + H + "&extras=url_sq, url_m, url_l,url_o,original_format&format=json&jsoncallback=?"
- }
- function F() {
- return z("FLICKR_PEOPLE_FIND") + "&username=" + G.flickrusername + "&format=json&jsoncallback=?"
- }
- function q(H) {
- if (!o.isp) {
- if (G.flickrtags || G.flickrusername) {
- return u(H)
- } else {
- return n(H)
- }
- }
- if (G.flickrsetid) {
- return r(H)
- } else {
- if (G.flickrgroupid) {
- return e(H)
- } else {
- if (G.flickruserid) {
- return u(H)
- } else {
- if (G.flickrusername) {
- return u()
- } else {
- if (G.flickrtags) {
- return u()
- } else {
- return n(H)
- }
- }
- }
- }
- }
- }
- function b(I, H) {
- return "http://www.flickr.com/photos/" + I + "/" + H
- }
- function k(J, K, I, H) {
- return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + "_s.jpg"
- }
- function i(J, K, I, H) {
- return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + ".jpg"
- }
- function y(J, K, I, H) {
- return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + "_b.jpg"
- }
- function c(J, K, I, H) {
- return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + "_o.jpg"
- }
- var h = function (J, L) {
- var N, K, M;
- var H = "";
- var I = [];
- if (o.isp) {
- if (J.photos) {
- N = J.photos.photo
- } else {
- if (J.photoset) {
- N = J.photoset.photo;
- H = J.photoset.owner
- }
- }
- } else {
- N = J.photos.photo
- } if (N.length == 0) {
- p("Flickr Images Not Found")
- }
- for (K = 0; K < N.length && K < D; K += 1) {
- M = {
- flickrPhotoId: N[K].id,
- thumbURL: k(N[K].farm, N[K].server, N[K].secret, N[K].id),
- imageFullURL: b(N[K].owner || H, N[K].id),
- imageURL: b(N[K].owner || H, N[K].id),
- linkTarget: "_blank",
- caption: N[K].title || "",
- description: "",
- preloadedImage: null,
- preloaded: false
- };
- if (G.flickrimagesize.toLowerCase() === "original" && N[K].url_o) {
- M.imageURL = N[K].url_o
- } else {
- if ((G.flickrimagesize.toLowerCase() === "large" || G.flickrimagesize.toLowerCase() === "original") && N[K].url_l) {
- M.imageURL = N[K].url_l
- } else {
- M.imageURL = N[K].url_m
- }
- }
- I.push(M);
- if (typeof (L) === "function") {
- v(K, N[K].id, L)
- }
- }
- return I
- };
- var B = function (H) {
- if (!H || !H.photo) {
- return null
- }
- var I = H.photo;
- return {
- id: I.id,
- title: I.title._content,
- description: I.description._content.replace(/\n/g, "<br/>")
- }
- };
- var j = function (I) {
- var H = F();
- d.ajax({
- url: H,
- dataType: "json",
- success: function (J) {
- if (J.stat === "ok") {
- G.flickruserid = J.user.id;
- if (I) {
- I()
- }
- } else {
- p("Cannot find Flickr User: " + G.flickrusername)
- }
- },
- error: function (L, J, K) {
- p("Cannot find Flickr User: " + G.flickrusername)
- }
- })
- };
- var E = function (J, I) {
- D = (o.isp ? parseInt(G.flickrimagecount) : g);
- var H = q(D);
- d.ajax({
- url: H,
- dataType: "json",
- success: function (K) {
- if (K.photos) {
- D = Math.min(K.photos.total, D);
- l = K.photos.pages
- } else {
- if (K.photoset) {
- D = Math.min(K.photoset.total, D);
- l = K.photoset.pages
- }
- } if (K.stat === "ok") {
- if (J) {
- J(h(K, I))
- }
- } else {
- p("Flickr Images Not Found")
- }
- },
- error: function (M, K, L) {
- p("Flickr Images Not Found")
- }
- })
- };
- var C = function (H) {
- return z("FLICKR_PHOTO_INFO") + "&format=json&photo_id=" + H + "&jsoncallback=?"
- };
- var v = function (J, I, K) {
- if (!G.flickrshowdescription) {
- return
- }
- var H = C(I);
- d.ajax({
- url: H,
- dataType: "json",
- success: function (L) {
- if (L.stat === "ok") {
- if (K) {
- K(J, B(L))
- }
- }
- },
- error: function (N, L, M) {}
- })
- };
- var t = function (I, H) {
- if (G.flickrusername) {
- j(function () {
- E(I, H)
- })
- } else {
- E(I, H)
- }
- };
- var w = function (J, H, I) {
- if (!G.flickrshowdescription) {
- return
- }
- if (typeof (I) === "function") {
- v(J, H, I)
- }
- };
- var a = function (H, I, K) {
- if (!G.flickrshowdescription) {
- return
- }
- if (typeof (K) !== "function") {
- return
- }
- if (I.to >= H.length) {
- I.to = H.length - 1
- }
- if (I.from < 0) {
- I.from = 0
- }
- for (var J = I.from; J <= I.to; J++) {
- if (H[J].detail_loaded) {
- continue
- }
- w(J, H[J].flickrPhotoId, K)
- }
- };
- return {
- get_images: t,
- load_flickr_images_detail: a
- }
- };
- var juicebox_gallery_manager = function () {
- var g = [];
- var a = 0;
- var f;
- var k = function (m) {
- f = m
- };
- var h = function (m) {
- m.position = g.length;
- m.loaded = 0;
- m.thumb_loaded = 0;
- m.width = null;
- m.height = null;
- m.thumb_width = null;
- m.thumb_height = null;
- m.order = parseInt(1000 * Math.random());
- g[g.length] = m;
- a = g.length
- };
- var i = function (m) {
- return g[m]
- };
- var d = function () {
- return g
- };
- var c = function (m) {
- m = parseInt(m);
- if (!f.enablelooping && m >= g.length - 1) {
- return null
- }
- return g[m < g.length - 1 ? m + 1 : 0]
- };
- var l = function (m) {
- m = parseInt(m);
- if (!f.enablelooping && m <= 0) {
- return null
- }
- return g[m > 0 ? m - 1 : g.length - 1]
- };
- var e = function (m) {
- g[m.position] = m
- };
- var j = function (n, m) {
- return g.slice(n, m)
- };
- var b = function () {
- g = g.sort(function (o, n) {
- return o.order - n.order
- });
- for (var m = 0; m < g.length; m++) {
- g[m].position = m
- }
- };
- var a = function () {
- return g.length
- };
- return {
- add_image: h,
- length: a,
- get_range: j,
- get_image: i,
- get_images: d,
- update_image: e,
- get_previous_image: l,
- get_next_image: c,
- sort_images: b,
- init: k
- }
- };
- var juicebox_gallery_splash_panel = function () {
- var b, c, f, a, e, g, p, n, k;
- var o, m, s;
- var l = function (t) {
- b = t.jquery;
- c = t.document_id;
- f = t.container;
- e = t.config;
- g = t.utils;
- p = t.sizing;
- a = t.glymng;
- n = t.finish_draw_event_callback;
- k = t.view_gallery_event_callback;
- o = t.current_width;
- m = t.current_height;
- s = t.splashImageUrl
- };
- var r = function (t) {
- return b(g.get_query_path(c, t))
- };
- var j = function () {
- if (!e.splashdescription) {
- return ""
- }
- return "<p class='jb-splash-desc'>" + e.splashdescription + "</p>"
- };
- var d = function () {
- var t = "style='display:none;position:absolute;left:0;top:0;width:" + o + "px;height:" + m + "px'";
- return "<table><tr><td class='jb-splash-holder'><img src='" + s + "' " + t + "/> <div class='jb-splash-background' " + t + "></div> <div class='jb-splash'> <div class='jb-splash-info jb-layer' layer='100' style='z-index:100;'> <h3>" + (e.splashtitle ? e.splashtitle : e.gallerytitle) + "</h3> " + (e.splashshowimagecount ? "<p class='jb-splash-cnt'>" + a.length() + " Image" + (a.length() > 1 ? "s" : "") + ".</p>" : "") + j() + "<a class='jb-splash-view-glry' href='#'>" + e.splashbuttontext + "</a> </div> </div></td></tr></table>"
- };
- var h = function () {
- f.html(d());
- p.position_2_fill_image(f.width(), f.height(), s, function (t) {
- r(".jb-splash-holder img").css({
- top: t.imageTop,
- left: t.imageLeft,
- width: t.imageWidth,
- height: t.imageHeight
- }).show()
- });
- r(".jb-splash-view-glry, .jb-splash, .jb-splash-background").click(function () {
- k();
- return false
- });
- if (typeof (n) === "function") {
- n()
- }
- };
- var q = function () {};
- var i = function () {
- f.html("")
- };
- return {
- initialize: l,
- draw: h,
- resize: q,
- purge: i
- }
- };
- var juicebox_gallery_index_panel = function (H) {
- var ag, d, am, M, W, Y, at, ah;
- var w = H;
- var ar = 0;
- var au = 1;
- var A = 0,
- L = 0;
- var Q = 0;
- var s = 0;
- var O = 86;
- var ae = 86;
- var F = 96;
- var ai = 96;
- var p = 5;
- var l = true;
- var e = "jb-tbn-current";
- var S = "jb-tbn-prev";
- var X = "jb-tbn-next";
- var j = 0;
- var D = 0;
- var al = 0;
- var C = 0;
- var i = 0;
- var a = false;
- var ak = false;
- var u = "display:none;";
- var x = 11;
- var B = function (aw) {
- return ag(w.get_query_path(d, aw))
- };
- var P = function () {
- if (s == 0) {
- s = B("").height()
- }
- A = W.thumbnail_cols;
- L = W.thumbnail_rows;
- var ax = 0;
- var aw = w.is_large_screen_mode(W) ? 45 : F;
- ax = Q - (W.usethumbdots ? 60 : 2 * aw);
- if (A == 0 && Q > 0) {
- A = parseInt(ax / F);
- if (s > Q) {
- if (A == 1) {
- A++
- }
- } else {
- if (A < 4 && (w.is_swipable_device() || W.forcetouchmode)) {
- A++
- }
- }
- }
- if (A <= 0) {
- A = 1
- }
- if (A > W.maxthumbcolumns) {
- A = W.maxthumbcolumns
- }
- if (L == 0 && s > 0) {
- L = parseInt((s - 2 * ai) / ai);
- if (s > Q) {
- if (L <= 3 && (L != 1 && A < 5)) {
- L++
- } else {
- if (w.is_small_android() && w.get_android_ver() >= 2.3 && L == 5) {
- L = 6
- }
- }
- } else {
- if (L == 1 && A <= 5) {
- L++
- } else {
- if (w.is_small_android() && w.get_android_ver() >= 2.3 && L == 2) {
- L = 3
- } else {
- if (L === 0 && (w.is_small_android() || w.is_iphone())) {
- L = 2
- }
- }
- }
- }
- }
- if (L <= 0 || W.usethumbdots) {
- L = 1
- }
- au = Math.ceil(M.length() / (L * A))
- };
- var aq = function () {
- var aw = (ar + 1) * A * L - 1;
- if (aw >= M.length()) {
- aw = M.length() - 1
- }
- if (aw < 0) {
- aw = 0
- }
- return {
- from: ar * A * L,
- to: aw
- }
- };
- var R = function (aw) {
- ag = aw.jquery;
- d = aw.document_id;
- am = aw.container;
- W = aw.config;
- w = aw.utils;
- Y = aw.sizing;
- M = aw.glymng;
- at = aw.finish_draw_event_callback;
- ah = aw.touch_event_callback;
- Q = aw.current_width;
- s = aw.current_height;
- if (W.usethumbdots) {
- O = 20;
- ae = 20
- } else {
- O = W.thumbwidth;
- ae = W.thumbheight
- }
- p = W.thumbpadding / 2;
- F = O + (2 * p);
- ai = ae + (2 * p);
- P();
- aa();
- y();
- if (w.ship || !W.usethumbdots || L > 1) {
- x = 0
- }
- };
- var m = function () {
- var aw = "";
- if (W.gallerytitle) {
- aw = "<div class='jb-idx-title' style='position: absolute;display:none;'>" + W.gallerytitle + "</div>"
- }
- am.html(aw + "<div class='jb-idx-show-area'></div>" + (W.showthumbpagingtext ? "<div class='jb-idx-thb-list-page-number' style='position: absolute;'></div>" : ""))
- };
- var aa = function () {
- var ay = function (az) {
- if (a) {
- return
- }
- az.preventDefault();
- C = 0;
- i = 0;
- if (!ak) {
- ak = true;
- D = az.originalEvent.touches[0].pageX;
- al = az.originalEvent.touches[0].pageX
- }
- };
- var aw = function (az) {
- if (a || !ak) {
- return
- }
- az.preventDefault();
- C = az.originalEvent.touches[0].pageX - D;
- B("table.jb-idx-thb-container").animate({
- left: "+=" + (az.originalEvent.touches[0].pageX - al),
- avoidTransforms: !W.use_webkit_transform,
- useTranslate3d: true
- }, 0);
- al = az.originalEvent.touches[0].pageX;
- i = az.originalEvent.touches[0].pageX - D
- };
- var ax = function (aA) {
- if (a || !ak) {
- return
- }
- ak = false;
- var az = 1005 * W.imagetransitiontime;
- if (C > 5) {
- if (k() && !W.enablelooping) {
- K(C)
- } else {
- ab(Math.abs(C), null, Q, s)
- }
- aA.preventDefault()
- } else {
- if (C < -5) {
- if (ap() && !W.enablelooping) {
- K(C)
- } else {
- g(Math.abs(C), null, Q, s)
- }
- aA.preventDefault()
- } else {
- if (Math.abs(i) < 5) {
- if (W.forcetouchmode) {
- if (ag(aA.target).attr("position") != null) {
- at(ag(aA.target).attr("position"))
- } else {
- if (ag(aA.target).parent().attr("position") != null) {
- at(ag(aA.target).parent().attr("position"))
- }
- }
- } else {
- if (ag(aA.target).parent().attr("position") != null) {
- at(ag(aA.target).parent().attr("position"))
- }
- }
- }
- }
- }
- };
- am.bind("touchstart", ay).bind("touchmove", aw).bind("touchend", ax);
- if (W.forcetouchmode) {
- B(" .jb-idx-thumb, .jb-idx-thb-frame").mousedown(function (aA) {
- if (aA.which !== 1) {
- return
- }
- var az = {
- originalEvent: {
- touches: [{}]
- }
- };
- aA.preventDefault();
- az.preventDefault = function () {};
- az.originalEvent.touches[0].pageX = aA.screenX;
- ay(az)
- }).mousemove(function (aA) {
- if (aA.which !== 1) {
- ak = false;
- return
- }
- if (!ak) {
- return
- }
- var az = {
- originalEvent: {
- touches: [{}]
- }
- };
- az.preventDefault = function () {};
- az.originalEvent.touches[0].pageX = aA.screenX;
- aw(az)
- }).mouseup(function (aA) {
- if (!ak) {
- return
- }
- var az = {};
- az.preventDefault = function () {};
- az.target = this;
- ax(az)
- }).mouseout(function (aA) {
- if (!ak) {
- return
- }
- var az = {};
- az.preventDefault = function () {};
- az.target = this;
- ax(az)
- })
- }
- };
- var n = function () {
- var ax = A * F;
- var aw = L * ai;
- return {
- height: aw,
- width: ax
- }
- };
- var af = function (aC, aB, ay, aI, ax) {
- var aE = L * A * aC;
- var aF = L * A * (aC + 1);
- var aw = "page_" + aC;
- var aG;
- if (M.length() < A) {
- aG = M.length() * F
- } else {
- aG = A * F
- }
- aB.append("<table class='jb-idx-thb-container jb-classifier-thumb-area table_page_" + aC + " " + (ax ? ax : "") + "' style='left:" + ay + "px;' ><tr><td style='text-align:center !important;width:auto !important;'><div class='jb-idx-thb-list' style='text-align:center !important;width:" + aG + "px;margin-left: auto;margin-right: auto; margin-top:0; margin-bottom:0; padding:0;' ></div></td></tr></table>");
- var aA = B(".table_page_" + aC + (ax ? "." + ax : "") + " .jb-idx-thb-list");
- var aH = "";
- var aD = M.get_range(aE, aF);
- for (var az = 0; az < aD.length; az++) {
- aH = V(aD[az], aA, aH)
- }
- aA.append(aH)
- };
- var an = function () {
- if (W.usethumbdots) {
- return "width:" + (F) + "px;height:" + (ai) + "px;padding:0;margin:" + x + "px 0 0 0;"
- }
- return "overflow:hidden;width:" + (O) + "px;height:" + (ae) + "px;padding:0;margin:" + (x + p) + "px " + parseInt(p) + "px " + p + "px " + parseInt(p) + "px;"
- };
- var f = function (ax, aw) {
- if (W.usethumbdots) {
- return "padding:0;margin:" + p + "px;width:" + (O) + "px;height:" + (ae) + "px;"
- }
- return (aw ? "display:block;" : "") + "display:block;position:absolute;padding:0;left:" + ax.left + "px;top:" + ax.top + ";width:" + ax.thumb_width + "px;height:" + ax.thumb_height + "px;"
- };
- var y = function () {
- var ay = W.thumbpreloading.toUpperCase();
- if (ay != "ALL") {
- return
- }
- var aw = M.get_images();
- for (var ax = 0; ax < aw.length; ax++) {
- U(aw[ax])
- }
- };
- var v = function () {
- return W.thumbframecolor ? w.format_color(W.thumbframecolor) : ""
- };
- var t = function () {
- return W.thumbframecolor ? "border-color:" + w.format_color(W.thumbframecolor) + ";" : ""
- };
- var c = function (az) {
- if (W.usethumbdots) {
- return ""
- }
- var aw = ag("#" + d + "_thumb_" + az.position + ".jb-thm-thumb-selected").length > 0 && w.is_large_screen_mode(W);
- var ax = aw ? t() : "border-color:transparent;";
- var ay = aw ? (ag.browser.msie ? 0 : 10) : (ag.browser.msie ? 0 : 2);
- return '<div class="jb-idx-thb-frame" style="position:absolute;' + ax + ";border-width:" + ay + "px;width:" + (O - 2 * ay) + "px;height:" + (ae - 2 * ay) + "px;left:0px;top:0;" + (aw ? t() : "") + '"></div>'
- };
- var U = function (aw) {
- if (aw.isPreloadingThumbnail) {
- return
- }
- aw.isPreloadingThumbnail = true;
- Y.position_2_fill_image(O, ae, aw.thumbURL, function (ax) {
- aw.thumb_loaded = 1;
- if (O === ae && ax.imageExpectedWidth === ax.imageExpectedHeight) {
- aw.thumb_width = O;
- aw.thumb_height = ae;
- aw.imageExpectedWidth = ae;
- aw.imageExpectedHeight = ae;
- aw.top = 0;
- aw.left = 0
- } else {
- aw.thumb_width = ax.imageWidth;
- aw.thumb_height = ax.imageHeight;
- aw.imageExpectedWidth = ax.imageExpectedWidth;
- aw.imageExpectedHeight = ax.imageExpectedHeight;
- aw.top = ax.imageTop;
- aw.left = ax.imageLeft
- } if (l) {
- ag("#" + d + "_thumb_" + aw.position).html("<img class='jb-thm-thumb-image' src='" + aw.thumbURL + "' style='" + u + f(aw, true) + "'>" + c(aw));
- ag("#" + d + "_thumb_" + aw.position + " img").fadeIn(400)
- } else {
- ag("#" + d + "_thumb_" + aw.position).html("<img class='jb-thm-thumb-image' src='" + aw.thumbURL + "' style='" + f(aw, false) + "'>" + c(aw))
- }
- M.update_image(aw);
- ag("#" + d + "_thumb_" + aw.position + " img").disableSelection()
- })
- };
- var V = function (ay, ax, aw) {
- if (W.usethumbdots) {
- return aw + "<div position='" + ay.position + "' id='" + d + "_thumb_" + ay.position + "' class='jb-idx-thumb jb-thm-thumb-dot' style='" + an() + "'><div class='jb-thm-thumb-image' style='" + f(ay) + "'></div></div>"
- }
- if (ay.thumb_loaded) {
- return aw + "<div position='" + ay.position + "' id='" + d + "_thumb_" + ay.position + "' class='jb-idx-thumb' style='" + an() + "'><img class='jb-thm-thumb-image' src='" + ay.thumbURL + "' style='" + f(ay) + "'>" + c(ay) + "</div>"
- } else {
- ax.append(aw);
- aw = "";
- ax.append("<div position='" + ay.position + "' id='" + d + "_thumb_" + ay.position + "' class='jb-idx-thumb' style='" + an() + "'>" + W.thumb_load_placeholder + "</div>");
- U(ay);
- return ""
- }
- };
- var ao = function () {
- return (ar <= 0) ? au - 1 : ar - 1
- };
- var J = function () {
- return (ar >= au - 1) ? 0 : ar + 1
- };
- var E = function () {
- aj(ar)
- };
- var ad = function (aw) {
- if (aw < 0 || aw >= au) {
- return
- }
- I(aw)
- };
- var ac = function (aw, ax, az) {
- if (ax) {
- Q = ax
- }
- if (az) {
- s = az
- }
- P();
- var ay = parseInt(aw / (A * L));
- I(ay);
- o(aw);
- if (!w.is_large_screen_mode(W)) {
- B(".jb-idx-title").show()
- }
- };
- var r = function () {
- aj(ao())
- };
- var G = function () {
- aj(J())
- };
- var o = function (ax) {
- j = ax;
- var ay = 4;
- var aw = w.is_large_screen_mode(W) ? 20 : 0;
- B(".jb-idx-thumb").removeClass("jb-thm-thumb-selected");
- B(".jb-idx-thumb .jb-idx-thb-frame").css({
- width: O - ay + "px",
- height: ae - ay + "px",
- "border-width": "2px",
- "border-color": "transparent"
- });
- var az = ag("#" + d + "_thumb_" + ax).addClass("jb-thm-thumb-selected").addClass("jb-thumb-visited");
- if (w.is_large_screen_mode(W)) {
- ag("#" + d + "_thumb_" + ax + " .jb-idx-thb-frame").css({
- width: O - aw + "px",
- height: ae - aw + "px",
- "border-width": "10px",
- "border-color": v()
- })
- } else {
- ag("#" + d + "_thumb_" + ax + " .jb-idx-thb-frame").css({
- width: O - aw + "px",
- height: ae - aw + "px"
- })
- } if (W.thumbframecolor) {
- az.children(".jb-idx-thb-frame").css({
- "border-color": w.format_color(W.thumbframecolor)
- })
- }
- };
- var I = function (aA) {
- B(" .jb-idx-thb-container").remove();
- if (am.find(".jb-idx-show-area").length <= 0) {
- m()
- }
- var az = B(".jb-idx-show-area");
- if (B(".table_page_" + aA).length == 0) {
- af(aA, az, 0, s, e)
- }
- var aB = Q + 2 * Y.get_stage_padding(B("").width(), B("").height(), W);
- if (W.enablelooping || aA < au - 1) {
- var ax = (aA >= au - 1) ? 0 : aA + 1;
- af(ax, az, +aB, s, X)
- }
- if (W.enablelooping || aA > 0) {
- var aw = (aA <= 0) ? au - 1 : aA - 1;
- af(aw, az, -aB, s, S)
- }
- q(aA);
- o(j);
- var ay = B(" .jb-idx-thumb");
- if (!W.forcetouchmode) {
- ay.click(function (aC) {
- if (a) {
- return false
- }
- l = false;
- aC.preventDefault();
- var aD = B(".jb-idx-thb-list div.jb-idx-thumb .jb-thm-thumb-image");
- aD.stop(true, true).show();
- if (!w.is_earlier_ie()) {
- aD.css({
- opacity: 1
- })
- }
- at(ag(this).attr("position"));
- return false
- }).mousedown(function (aC) {
- if (aC.preventDefault) {
- aC.preventDefault()
- }
- })
- } else {
- aa()
- } if (W.thumbframecolor) {
- ay.hover(function () {
- var aC = ag(this);
- if (aC.is(".jb-thm-thumb-selected")) {
- return
- }
- aC.children(".jb-idx-thb-frame").css({
- "border-color": w.format_color(W.thumbframecolor)
- })
- }, function () {
- var aC = ag(this);
- if (aC.is(".jb-thm-thumb-selected")) {
- return
- }
- aC.children(".jb-idx-thb-frame").css({
- "border-color": "transparent"
- })
- })
- }
- ar = aA;
- if (typeof ah == "function") {
- ah()
- }
- };
- var av = function () {
- var ax = M.length();
- if (L * A <= ax) {
- return {
- row: L,
- col: A
- }
- }
- if (A >= ax) {
- return {
- row: 1,
- col: ax
- }
- }
- var aw = (ax % A == 0 ? 0 : 1);
- return {
- row: parseInt(ax / A) + aw,
- col: A
- }
- };
- var q = function (aA) {
- var ay = av();
- var ax = ay.row * (ai);
- var az = parseInt((s - ax) / 2 - 25);
- if (s <= az) {
- az = 0
- }
- var aw = parseInt((Q - (ay.col * F)) / 2 + 5);
- if (aw < 0) {
- aw = 0
- }
- B(".jb-idx-title").css({
- left: aw + "px",
- top: az + "px"
- });
- var aC = Q / 2 - 33;
- if (aC < aw) {
- aC = aw
- }
- var aB = (s > 200) ? (ax + ((s - ax) / 2) + 10) : (ax + 10);
- if (aB <= 0) {
- aB = 0
- }
- B(".jb-idx-thb-list-page-number").css({
- left: aC + "px",
- top: aB + "px"
- }).html("Page " + (aA + 1) + " of " + au);
- if (W.textcolor) {
- B(".jb-idx-title, .jb-idx-thb-list-page-number").css({
- color: w.format_color(W.textcolor)
- })
- }
- };
- var aj = function (aw) {
- P();
- I(aw)
- };
- var K = function (ax) {
- if (!ax) {
- return
- }
- var aw = 1000 * W.smallthumbslidetime;
- aw = aw * ((400 - ax / 2) / 400);
- B("table.jb-idx-thb-container").animate({
- left: "+=" + (-ax),
- avoidTransforms: !W.use_webkit_transform,
- useTranslate3d: true
- }, aw, "", null)
- };
- var Z = function (ay, aD, aC, aw, az) {
- if (aw) {
- Q = aw
- }
- if (az) {
- s = az
- }
- var ax = function () {
- if (a) {
- if (ay) {
- G()
- } else {
- r()
- }
- a = false;
- if (typeof aC == "function") {
- aC()
- }
- }
- };
- if (!a) {
- if (typeof (aD) == "undefined") {
- aD = 0
- }
- a = true;
- var aA = 1000 * W.smallthumbslidetime;
- if (aD > 0) {
- aA = aA * ((400 - aD / 2) / 400)
- }
- var aB = Q + 2 * Y.get_stage_padding(B("").width(), B("").height(), W);
- B("table.jb-idx-thb-container").animate({
- left: (ay ? "-=" : "+=") + (aB - aD),
- avoidTransforms: !W.use_webkit_transform,
- useTranslate3d: true
- }, aA, "easeOutQuart", ax)
- } else {
- ax()
- }
- };
- var g = function (az, ay, aw, ax) {
- Z(true, az, ay, aw, ax)
- };
- var ab = function (az, ay, aw, ax) {
- Z(false, az, ay, aw, ax)
- };
- var h = function (aw, ax) {
- a = false
- };
- var ap = function () {
- if (ar + 1 >= au) {
- return true
- }
- return false
- };
- var k = function () {
- if (ar <= 0) {
- return true
- }
- return false
- };
- var z = function () {
- return ar
- };
- var N = function (aw) {
- if (aw) {
- B(".jb-idx-title").show();
- B(".jb-classifier-link-wrapper.jb-classifier-thumb-area").show()
- } else {
- B(".jb-idx-title").hide();
- B(".jb-classifier-link-wrapper.jb-classifier-thumb-area").hide()
- }
- };
- var b = function () {
- return ai
- };
- var T = function (aw) {
- a = true;
- window.setTimeout(function () {
- a = false
- }, aw)
- };
- return {
- initialize: R,
- show_current_page: E,
- show_prev_page: r,
- show_next_page: G,
- move_to_next_page: g,
- move_to_prev_page: ab,
- show_page_4_image_position: ac,
- show_page_by_page_index: ad,
- is_last_page: ap,
- is_first_page: k,
- get_index: z,
- repaint: h,
- get_thumblist_size: n,
- display_gallery_top: N,
- get_image_index_range: aq,
- set_thumbnail_visited: o,
- get_thumb_height: b,
- yield_4_transition: T
- }
- };
- var juicebox_gallery_detail_panel = function () {
- var H, R, A, L, V, b, O, d, y, t;
- var Q;
- var o = null;
- var D = false;
- var i, P;
- var g;
- var B = false;
- var G = false;
- var c = 12;
- var S = function (Y) {
- G = true;
- H = Y.jquery;
- R = Y.document_id;
- A = Y.container;
- Q = Y.caption_container;
- V = Y.config;
- b = Y.utils;
- O = Y.sizing;
- L = Y.glymng;
- d = Y.before_draw_event_callback;
- y = Y.finish_draw_event_callback;
- t = Y.touch_event_callback;
- g = 1000 * V.imagetransitiontime;
- i = Y.current_width;
- P = Y.current_height;
- x(0)
- };
- var X = function (Y) {
- return H(b.get_query_path(R, Y))
- };
- var J = function () {
- if (!o) {
- return 0
- }
- return o.position
- };
- var C = function () {
- return o
- };
- var x = function (Y) {
- o = L.get_image(Y)
- };
- var E = function (ah, af, ab, am, aa) {
- var ak = o.position;
- var al = am != null ? am : (ah ? L.get_next_image(ak).position : L.get_previous_image(ak).position);
- var ag;
- if (typeof (ab) === "undefined") {
- ab = true
- }
- var aj = function (ap) {
- var ao = V.captionposition.toUpperCase();
- if (!V.slidecaption && (ab || ao === "BOTTOM" || ao === "BELOW_IMAGE")) {
- Q.fadeIn(ap);
- X(".jb-cap-frame.jb-status-fading").fadeIn(ap)
- }
- };
- var ae = function (ao) {
- if (ab) {
- ac.addClass("jb-status-fading").fadeOut(V.captionposition.toUpperCase() === "BELOW_IMAGE" || (H.browser.msie && H.browser.version >= 7 && H.browser.version < 8) ? 0 : ao)
- } else {
- ac.removeClass("jb-status-fading")
- }
- };
- var ai = function (ao) {
- d(al);
- w(al, ao, null, ab, true);
- y(al);
- aj(ao);
- D = false
- };
- var an = function (ao) {
- if (!aa) {
- d(al)
- }
- w(al, 0, null, ab, true);
- if (!aa) {
- y(al)
- }
- aj(ao);
- D = false
- };
- if (!D) {
- var Z = V.imagetransitiontype.toUpperCase();
- if (typeof (af) == "undefined") {
- af = 0
- }
- D = true;
- var ad = 1000 * V.imagetransitiontime;
- if (af > 0) {
- ad = ad * ((400 - af / 2) / 400)
- }
- var Y = parseInt(i) + parseInt(V.minimagegap) + (2 * O.get_stage_padding(X("").width(), X("").height(), V));
- d(al);
- var ac = X(".jb-cap-frame.caption_" + ak);
- ag = X(" .jb-panel-detail .jb-dt-main-frame");
- ag.stop();
- if (b.is_swipable_device() && am == null) {
- ag.animate({
- left: (ah ? "-=" : "+=") + (Y - af),
- avoidTransforms: !V.use_webkit_transform,
- useTranslate3d: true
- }, ad, "easeOutQuart", function () {
- an(ad / 2)
- });
- ae(ad / 2)
- } else {
- if (Z === "NONE" || aa) {
- ac.fadeOut(0);
- an(0)
- } else {
- if (Z === "CROSS_FADE") {
- ag.fadeOut(ad, function () {
- an(ad)
- });
- ae(ad);
- ai(ad)
- } else {
- if (Z === "FADE" || (am && Z != "FADE" && Z != "CROSS_FADE" && Z != "NONE")) {
- ag.fadeOut(ad / 2);
- ae(ad / 2);
- window.setTimeout(function () {
- ai(ad / 2)
- }, ad / 2)
- } else {
- ag.animate({
- left: (ah ? "-=" : "+=") + (Y - af),
- avoidTransforms: !V.use_webkit_transform,
- useTranslate3d: true
- }, ad, "easeOutQuart", function () {
- an(ad / 2)
- });
- ae(ad / 2)
- }
- }
- }
- }
- } else {
- ag = X(" .jb-panel-detail .jb-dt-main-frame, .jb-cap-frame.caption_" + ak);
- if (b.is_swipable_device()) {
- ag.stop(false, false);
- an()
- } else {
- ag.stop(false, true)
- }
- }
- };
- var n = function (Z, Y) {
- E(true, Z, Y)
- };
- var h = function (ab) {
- if (!ab) {
- return
- }
- var Z = 1000 * V.imagetransitiontime;
- Z = Z * ((400 - ab / 2) / 400);
- var Y = parseInt(i) + parseInt(V.minimagegap);
- var aa;
- aa = X(" .jb-panel-detail .jb-dt-main-frame");
- aa.stop();
- aa.animate({
- left: "+=" + (-ab),
- avoidTransforms: !V.use_webkit_transform,
- useTranslate3d: true
- }, Z, "", null)
- };
- var s = function (Z, Y) {
- E(false, Z, Y)
- };
- var w = function (ah, ag, ae, aa, al) {
- if (typeof (aa) === "undefined") {
- aa = true
- }
- D = false;
- var ab = parseInt(i) + parseInt(V.minimagegap) + (2 * O.get_stage_padding(X("").width(), X("").height(), V));
- o = L.get_image(ah);
- var aj = X(".jb-panel-detail");
- if (aj.length > 0 && !aj.is(":visible")) {
- aj.show()
- }
- var af = L.get_image(ah);
- var Y = L.get_previous_image(ah);
- var ac = L.get_next_image(ah);
- var ai = ag > 0;
- A.children(":not(.jb-dt-main-image-" + ah + ")").remove();
- var ad = A.children(".jb-dt-main-image-" + ah);
- if (ad.length <= 0) {
- A.append(W(af, 0, true, ai));
- ad = A.children(".jb-dt-main-image-" + (af ? af.position : ""))
- } else {
- ad.css({
- left: 0
- })
- }
- ad.before(W(Y, -ab, false, false));
- ad.after(W(ac, ab, false, false));
- if (!ad.is(":visible")) {
- ad.fadeIn()
- }
- if (ad.css("opacity") == 0) {
- ad.fadeIn()
- }
- var Z = Q.width();
- var ak = Q.height();
- if (aa === true) {
- if (ai || al) {
- if (H.browser.msie || b.is_firefox3()) {
- Q.hide()
- } else {
- Q.fadeOut(0)
- }
- } else {
- Q.fadeIn(0)
- }
- } else {
- Q.hide()
- }
- Q.html(j(Y, Z, ak, -ab) + j(af, Z, ak, 0) + j(ac, Z, ak, ab));
- if (V.textcolor) {
- X(".jb-cap-frame a").css({
- color: b.format_color(V.textcolor)
- })
- }
- if (V.captionbackcolor) {
- if (b.is_earlier_ie()) {
- X(".jb-caption").css({
- "background-color": b.format_color(V.captionbackcolor),
- filter: V.captionbackopacity.replace("filter:", "")
- })
- } else {
- X(".jb-caption").css({
- "background-color": b.format_color(V.captionbackcolor)
- })
- }
- }
- if (ag > 0) {
- X(".jb-dt-main-image-" + af.position).fadeIn(ag);
- if (aa) {
- Q.fadeIn(ag)
- }
- if (typeof (ae) === "function") {
- window.setTimeout(function () {
- ae()
- }, ag)
- }
- }
- };
- var z = function (Z, Y) {
- if (!Z) {
- X(".jb-dt-main-image-" + o.position).hide();
- return
- }
- X(".jb-dt-main-image-" + o.position).fadeOut(Z);
- if (V.captionposition.toUpperCase() === "BELOW_IMAGE") {
- Q.fadeOut(0)
- } else {
- Q.fadeOut(Z)
- } if (typeof (Y) === "function") {
- window.setTimeout(function () {
- Y()
- }, Z)
- }
- };
- var m = function (ab, ai, ac) {
- var Y = F(ab, ai, ac);
- var aa = Y.width;
- var ak = Y.height;
- var af = O.get_image_padding(ai, ac, V);
- var ae = O.get_image_framewidth(ai, ac, V);
- var ag = af + ae;
- var ah = 2 * ag;
- if (aa === "auto" && ak === "auto") {
- ak = ab.height;
- aa = ab.width
- } else {
- if (aa === "auto") {
- aa = parseInt(ak) * (ab.width / ab.height)
- } else {
- if (ak === "auto") {
- ak = parseInt(aa) * (ab.height / ab.width)
- }
- }
- }
- aa = parseInt(aa);
- ak = parseInt(ak);
- var Z = parseInt((ai - aa) / 2) - ae;
- var aj = parseInt((ac - ak) / 2) - ae;
- if (Z < af) {
- Z = af
- }
- if (aj < af) {
- aj = af
- }
- var ad = ai - ah < parseInt(aa) ? ai - ah : parseInt(aa);
- var al = ac - ah < parseInt(ak) ? ac - ah : parseInt(ak);
- return {
- width: parseInt(aa),
- height: parseInt(ak),
- left: Z,
- top: aj,
- frameWidth: ad,
- frameHeight: al
- }
- };
- var a = function (Y) {
- if (Y >= L.length()) {
- Y = L.length() - 1
- }
- if (Y < 0) {
- return 0
- }
- return Y
- };
- var M = function (Z, ab) {
- var Y = L.get_range(a(Z), a(ab));
- for (var aa = 0; aa < Y.length; aa++) {
- N(Y[aa])
- }
- };
- var p = function (aa) {
- if (!aa) {
- return
- }
- if (V.captionposition.toUpperCase() !== "BELOW_IMAGE") {
- return
- }
- var Y = parseInt(i) + parseInt(V.minimagegap);
- var Z = (aa.position - o.position) * Y;
- X(".jb-cap-frame.caption_" + aa.position).attr("style", K(aa, Q.width(), Q.height(), Z))
- };
- var l = function () {
- var Y = V.captionposition.toUpperCase();
- return (Y != "BELOW_IMAGE" && Y != "BOTTOM") ? false : true
- };
- var K = function (ad, aa, Z, ac) {
- var af = l();
- var ae = "position:absolute;";
- if (!ad.loaded && V.captionposition.toUpperCase() === "BELOW_IMAGE") {
- return ae + (af ? "height:100%;" : "") + "width:" + aa + "px;left:" + ac + "px;top:" + (Z - V.maxcaptionheight) + "px;display:none;"
- } else {
- if (!af || !ad.loaded || V.captionposition.toUpperCase() === "BOTTOM") {
- return ae + (af ? "height:100%;" : "") + "width:" + aa + "px;left:" + ac + "px;"
- }
- }
- var ab = m(ad, i, P);
- var Y = O.get_image_framewidth(aa, Z, V);
- return ae + "width:" + (ab.width + 2 * Y) + "px;height:100%;padding:0;margin:0;left:" + (ab.left + ac) + "px;top:" + (ab.top + ab.height + 2 * Y + O.get_image_padding(aa, Z, V)) + "px"
- };
- var N = function (Z, aa) {
- if (Z.isPreloading || Z.loaded) {
- return
- }
- var Y = new Image();
- Z.isPreloading = true;
- Y.onload = function () {
- Z.loaded = true;
- Z.width = Y.width;
- Z.height = Y.height;
- L.update_image(Z);
- var ac = X(".jb-panel-detail .jb-dt-main-image-" + Z.position);
- if (ac.length > 0) {
- var ab = function () {
- ac.html(u(Z, aa, o.position === Z.position));
- var ad = X(".jb-panel-detail .jb-dt-main-image-" + Z.position + " img");
- ad.disableSelection();
- if (o.position === Z.position) {
- ad.fadeIn(g, function () {
- p(Z)
- })
- }
- };
- if (b.is_swipable_device()) {
- window.setTimeout(ab, 100)
- } else {
- ab()
- }
- } else {
- window.setTimeout(function () {
- X(".jb-panel-detail .jb-dt-main-image-" + Z.position).html(u(Z, aa, o.position === Z.position));
- if (o.position === Z.position) {
- X(".jb-panel-detail .jb-dt-main-image-" + Z.position + " img").fadeIn(g, function () {
- p(Z)
- })
- }
- }, 100)
- }
- };
- Y.src = Z.imageURL
- };
- var W = function (ad, ac, ae, Z) {
- if (!ad) {
- return ""
- }
- var Y = V.showpreloader ? "<div class='jb-status-loading' style='position:absolute;top:0;left:0;width:" + i + "px;height:" + P + "px;padding:0;margin:0;'></div>" : "";
- var ab;
- if (ad.loaded) {
- Y = u(ad, ae)
- } else {
- N(ad, ae)
- }
- var aa = I(i, P, F(ad, i, P));
- return "<div class='jb-dt-main-frame jb-dt-main-image-" + ad.position + "' style='height:" + P + "px;width:" + i + "px;left:" + ac + "px;" + U(Z) + "'>" + Y + "</div>"
- };
- var U = function (Y) {
- if (!Y) {
- return ""
- }
- if (H.browser.msie || b.is_firefox3()) {
- return "display:none;"
- }
- return "opacity:0;"
- };
- var T = function (ab) {
- if (!ab) {
- return ""
- }
- var Y, ae, Z = "";
- if (V.useflickr) {
- Y = V.flickrshowtitle ? ab.caption : "";
- ae = (V.flickrshowdescription && ab.description) ? ab.description : "";
- Z = V.flickrshowpagelink ? '<p class="jb-cap-content jb-caption-link"><a href="' + ab.imageFullURL + '" target="_blank" style="' + r() + ';">' + (V.flickrpagelinktext ? V.flickrpagelinktext : ab.caption) + "</a> </p>" : ""
- } else {
- Y = ab.title ? ab.title : "";
- ae = ab.caption ? ab.caption : ""
- }
- var ad = Y ? '<p class="jb-cap-content jb-caption-title">' + Y + " </p>" : "";
- var ac = ae ? '<p class="jb-caption-desc" style="' + (Y ? "margin:10px 0 0 0;" : "margin:0;") + '">' + ae + "</p>" : "";
- var aa = V.showimagenumber ? "<div class='jbac-number jb-classifier-layer' layer='2000' style='z-index:2000;" + ((b.ship || !B) ? "" : "padding-bottom:20px;") + r() + "'>" + (ab.position + 1) + " / " + L.length() + "</div>" : "";
- return aa + ad + ac + Z
- };
- var f = function () {
- return (b.ship || !B)
- };
- var r = function () {
- if (!V.textcolor) {
- return ""
- }
- return "color:" + b.format_color(V.textcolor)
- };
- var j = function (ad, aa, Z, ac) {
- if (!ad) {
- return ""
- }
- var ab = V.maxcaptionheight - (2 * c);
- if (!f()) {
- ab -= 18
- }
- if (ab <= 0) {
- ab = V.maxcaptionheight
- }
- var ae = "<div layer='1000' class='jb-caption jb-classifier-layer' style='overflow:hidden;z-index:1000;padding-top:" + c + "px;padding-right:18px;padding-left:18px;padding-bottom:" + (f() ? c : (c + 18)) + "px;max-height:" + ab + "px;" + r() + ";'>" + T(ad) + "</div>";
- var Y = " class='jb-cap-frame caption_" + ad.position + "' style='" + K(ad, aa, Z, ac) + "'";
- if (l()) {
- return "<div" + Y + ">" + ae + "</div>"
- } else {
- return "<table" + Y + "><tr><td>" + ae + "</td></tr></table>"
- }
- };
- var e = function (Z) {
- if (b.ship) {
- return
- }
- B = Z;
- var Y = V.maxcaptionheight - (2 * c);
- if (!f()) {
- Y -= 18
- }
- if (Y <= 0) {
- Y = V.maxcaptionheight
- }
- var ab = Z ? c + 18 : c;
- var aa = Z ? "20px" : "";
- X(".jb-cap-frame .jb-caption").css({
- "padding-bottom": ab,
- "max-height": Y
- });
- X(".jb-cap-frame .jbac-number").css({
- "padding-bottom": aa
- })
- };
- var v = function (Y) {
- X(".caption_" + Y.position + " .jb-caption").html(T(Y))
- };
- var u = function (aa, Z, ai) {
- if (!aa) {
- return ""
- }
- var ad = m(aa, i, P);
- var Y = F(aa, i, P);
- var ah = "";
- var af = false;
- var ae = 0;
- var ag = 0;
- if (Y.height === "auto" && ad.frameHeight < ad.height) {
- ae = "-" + parseInt((ad.height - ad.frameHeight) / 2) + "px";
- af = true
- }
- if (Y.width === "auto" && ad.frameWidth < ad.width) {
- ag = "-" + parseInt((ad.width - ad.frameWidth) / 2) + "px";
- af = true
- }
- var ac = "<div class='jb-dt-main-image' style='position:absolute;top:" + ad.top + "px;left:" + ad.left + "px;height:" + ad.frameHeight + "px;width:" + ad.frameWidth + "px;padding:0;overflow:hidden;border:none;" + (V.imageframecolor ? "border-color:" + b.format_color(V.imageframecolor) + ";" + (b.is_earlier_ie() ? V.frameopacity + ";" : "") : "") + "'><img style='${0}$height:" + Y.height + ";width:" + Y.width + ";" + ah + U(ai) + "' src='" + aa.imageURL + "'></div>";
- var ab = O.get_image_framewidth(i, P, V);
- if (ab) {
- ac = ac.replace("border:none;", "border-style:solid;border-width:" + ab + "px;")
- }
- if (af) {
- return ac.replace("${0}$", "display:block;position:absolute;top:" + ae + ";left:" + ag + ";")
- }
- return ac.replace("${0}$", "")
- };
- var F = function (ae, ad, ac) {
- var Z = 2 * (O.get_image_padding(ad, ac, V) + O.get_image_framewidth(ad, ac, V));
- ad -= Z;
- ac -= Z;
- if (!ae || !ae.width || !ae.height) {
- return {
- width: "auto",
- height: "auto"
- }
- }
- var aa = ad / ae.width;
- var Y = ac / ae.height;
- var af = V.imagescalemode.toUpperCase();
- var ab = 0;
- if (af === "SCALE") {
- ab = 0
- } else {
- if (af === "FILL") {
- if (aa < 1 && Y < 1) {
- ab = 2
- } else {
- ab = 3
- }
- } else {
- if (af === "STRETCH") {
- ab = 4
- } else {
- if (af === "NONE") {
- ab = 2
- } else {
- if (aa < 1 || Y < 1) {
- ab = 0
- } else {
- ab = 1
- }
- }
- }
- }
- }
- switch (ab) {
- case 0:
- if (aa > Y) {
- return {
- width: "auto",
- height: ac + "px"
- }
- } else {
- return {
- width: ad + "px",
- height: "auto"
- }
- }
- break;
- case 1:
- return {
- width: ae.width + "px",
- height: ae.height + "px"
- };
- break;
- case 2:
- return {
- width: "auto",
- height: "auto"
- };
- break;
- case 3:
- if (aa > Y) {
- return {
- width: ad + "px",
- height: "auto"
- }
- } else {
- return {
- width: "auto",
- height: ac + "px"
- }
- }
- break;
- case 4:
- return {
- width: ad + "px",
- height: ac + "px"
- };
- break
- }
- };
- var I = function (ad, ae, ab) {
- var Z = parseInt(ab.width);
- var ac = parseInt(ab.height);
- var Y = !Z || ad > Z ? "auto" : ad + "px";
- var aa = !ac || ae > ac ? "auto" : ae + "px";
- return {
- width: Y,
- height: aa
- }
- };
- var k = function (ab, Z, aa, Y) {
- if (!ab) {
- return
- }
- A.children().remove();
- w(ab.position, 0, null, Q.is(":visible"));
- return
- };
- var q = function (Y, Z) {
- i = Y;
- P = Z;
- X(".jb-dt-main-frame").css({
- width: Y,
- height: Z
- });
- k(o, Y, Z, 0);
- p(o);
- var aa = L.get_previous_image(o.position);
- p(aa);
- aa = L.get_next_image(o.position);
- p(aa)
- };
- return {
- get_photo_position: J,
- move_2_next_photo: n,
- move_2_previous_photo: s,
- initialize: S,
- populate_photo_html: w,
- repaint: q,
- get_current_photo: C,
- preload_images: M,
- fadeout_current_image: z,
- repopulate_caption_html: v,
- move_back: h,
- set_caption_height_mode: e,
- is_initialized: function () {
- return G
- },
- change_2_photo: E
- }
- };
- var juicebox_utils = new juice_box_utils(juicebox_lib.jQuery);
- var juicebox_instances = [];
- var juicebox_instance_count = 0;
- var juicebox = function (_config) {
- var $ = juicebox_lib.jQuery;
- var utils = juicebox_utils;
- var gallery_manager = new juicebox_gallery_manager();
- var index_panel = new juicebox_gallery_index_panel(utils);
- var detail_panel = new juicebox_gallery_detail_panel();
- var config_manager = new juicebox_config_manager($, utils);
- var flickr_loader = null;
- var dialog = null;
- var sizing = null;
- var switching_2_thumbnail = false;
- var overlay_visible = true;
- var in_the_transitioning = false;
- var is_index_visible = true;
- var is_detail_visible = false;
- var hide_thumbnails_in_lsm = false;
- var transTimer = 0;
- var audioPlayer;
- var instance_id;
- var document_id = (new Date()).valueOf();
- config_manager.init(_config, null, "ck-s-");
- var config = config_manager.get_config();
- gallery_manager.init(config);
- var image_change_speed = 1000 * config.imagetransitiontime;
- var theme_cls = "jcbx-glry-classic";
- var themeUrl = "";
- var current_width = null;
- var current_height = null;
- var is_full_screen_mode = false;
- var initial_win_width = 0;
- var initial_win_height = 0;
- var start_x;
- var last_x;
- var delta_x;
- var start_y;
- var last_y;
- var delta_y;
- var in_navigation = false;
- var right_button_offset = null;
- var current_page = null;
- var total_page_count = null;
- var force2fill = false;
- var fullScreenPersistor = {
- parent_gallery_param: _config.persistor_param,
- is_full_screen: (_config.fullscreen_displaying_mode ? true : false),
- parent_gallery: _config.parent_gallery,
- initial_body_css_inline_style: (_config.initial_body_css_inline_style ? _config.initial_body_css_inline_style : ""),
- initial_height: 0,
- initial_width: 0
- };
- var correct_path = function (path) {
- return utils.concate_path(config.baseurl, path)
- };
- var _ = function (path) {
- return $(utils.get_query_path(document_id, path))
- };
- var need_top_panel = function () {
- if (!utils.is_large_screen_mode(config)) {
- return false
- }
- if (config.gallerytitleposition.toUpperCase() === "TOP" || config.buttonbarposition.toUpperCase() === "TOP" || (config.showbackbutton && config.backbuttonposition.toUpperCase() != "OVERLAY")) {
- return true
- }
- return false
- };
- var is_caption_overlap = function () {
- var cappos = config.captionposition.toUpperCase();
- if (cappos != "BOTTOM" && cappos != "BELOW_IMAGE" && cappos != "NONE") {
- return true
- }
- if (cappos === "NONE") {
- return false
- }
- if (!(is_index_visible && is_detail_visible)) {
- return true
- }
- return false
- };
- var set_containers_size_and_position = function (expected_size) {
- var pos = detail_panel.get_current_photo().position;
- set_toucharea_height(pos, expected_size);
- _(".jb-panel-index").css({
- width: expected_size.index_panel_width,
- height: expected_size.index_panel_height,
- top: expected_size.index_panel_top,
- left: expected_size.index_panel_left
- });
- _(".jb-panel-detail").css({
- width: expected_size.detail_panel_width,
- height: expected_size.detail_panel_height,
- top: expected_size.detail_panel_top,
- left: expected_size.detail_panel_left
- });
- var cpppos = config.captionposition.toUpperCase();
- var caphover = !utils.is_earlier_ie() && (cpppos != "NONE" && cpppos != "BOTTOM" && cpppos != "BELOW_IMAGE");
- var captionArea = _(".jb-area-caption");
- if (!($.browser.msie && $.browser.version < 8) && (utils.is_large_screen_mode(config) && (hide_thumbnails_in_lsm || caphover) || !utils.is_large_screen_mode(config))) {
- captionArea.css({
- height: "auto"
- })
- } else {
- captionArea.css({
- height: expected_size.caption_panel_height + "px"
- })
- }
- captionArea.css({
- width: expected_size.caption_panel_width,
- top: expected_size.caption_panel_top,
- left: expected_size.caption_panel_left,
- bottom: expected_size.caption_panel_bottom
- });
- _(".jb-panel-top").css({
- width: expected_size.top_panel_width,
- height: expected_size.top_panel_height,
- top: expected_size.top_panel_top,
- left: expected_size.top_panel_left
- })
- };
- var setup_layout = function (glry_width, glry_height, show_detail) {
- if (utils.is_large_screen_mode(config)) {
- if (hide_thumbnails_in_lsm) {
- is_index_visible = false
- } else {
- is_index_visible = true
- }
- is_detail_visible = true;
- _("").addClass("jb-flag-large-screen-mode")
- } else {
- if (show_detail) {
- is_index_visible = false;
- is_detail_visible = true
- } else {
- is_index_visible = true;
- is_detail_visible = false
- }
- _("").removeClass("jb-flag-large-screen-mode")
- }
- };
- var need_full_screen_button = function () {
- if (config.showexpandbutton && (!is_full_screen_mode || fullScreenPersistor.is_full_screen) && (!utils.is_in_iframe())) {
- return true
- }
- return false
- };
- var show_audio_button = function () {
- if (!config.showaudiobutton || utils.is_earlier_ie()) {
- return false
- }
- return true
- };
- var apply_show_options = function (ini) {
- var show_thumb_button_bar = false;
- var show_detail_button_bar = false;
- if (ini) {
- if (!check_open_image_directly()) {
- if (config.showsmallthumbs) {
- if (!(is_detail_visible && is_index_visible)) {
- is_detail_visible = false;
- is_index_visible = false
- }
- }
- if (is_index_visible) {
- show_thumbnails(0)
- }
- if (is_detail_visible && !fullScreenPersistor.is_full_screen) {
- show_main_image(0)
- }
- }
- }
- var gp1v = false;
- var gp2v = false;
- var gp3v = false;
- if (!config.showthumbsbutton || (!utils.is_large_screen_mode(config) && is_index_visible)) {
- _(".jb-bb-btn-de-show-list").hide()
- } else {
- show_detail_button_bar = true;
- gp1v = true
- } if (!config.showcaption) {
- _(".jb-caption").hide()
- }
- if (!config.showthumbsbutton && utils.is_large_screen_mode(config)) {
- _(".jb-bb-btn-de-show-list").hide()
- } else {
- show_detail_button_bar = true;
- gp1v = true
- } if (!config.showopenbutton) {
- _(".jb-bb-btn-open-url").hide()
- } else {
- show_detail_button_bar = true;
- gp1v = true
- } if (!config.showautoplaybutton) {
- _(".jb-bb-btn-auto-play").hide()
- } else {
- show_detail_button_bar = true;
- gp2v = true
- } if (!show_audio_button()) {
- _(".jb-bb-btn-audio").hide()
- } else {
- show_detail_button_bar = true;
- gp3v = true
- } if (!need_full_screen_button()) {
- _(".jb-bb-btn-full-screen").hide()
- } else {
- gp1v = true;
- if (is_detail_visible) {
- show_detail_button_bar = true
- } else {
- show_thumb_button_bar = true
- }
- } if (!config.showinfobutton) {
- _(".jb-bb-btn-show-info").hide()
- } else {
- show_detail_button_bar = true;
- gp3v = true
- } if (!config.shownavbuttons) {
- _(".jb-bb-btn-top-nav").hide()
- } else {
- show_detail_button_bar = true;
- gp2v = true
- }
- var showimageoverlay = config.showimageoverlay.toUpperCase();
- var btnPos = config.buttonbarposition.toUpperCase();
- if (!show_detail_button_bar || btnPos === "NONE") {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").remove()
- } else {
- if (config.showinfobutton || overlay_visible || btnPos === "TOP" || showimageoverlay === "ALWAYS") {
- if (is_detail_visible) {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").show()
- }
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area .jb-bb-bar").show()
- } else {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").hide();
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area .jb-bb-bar").hide()
- }
- } if (!show_thumb_button_bar) {
- _(".jb-classifier-link-wrapper.jb-classifier-thumb-area .jb-bb-bar").hide()
- } else {
- _(".jb-classifier-link-wrapper.jb-classifier-thumb-area .jb-bb-bar").show()
- } if (gp1v && gp2v) {
- _(".jb-bb-splitter-1").show()
- } else {
- _(".jb-bb-splitter-1").hide()
- } if (gp3v && (gp2v || gp1v)) {
- _(".jb-bb-splitter-2").show()
- } else {
- _(".jb-bb-splitter-2").hide()
- }
- };
- var show_hide_controls = function (control, show, delay) {
- if (delay) {
- if (show) {
- if (!control.is(":visible") || control.css("opacity") == 0 || utils.is_swipable_device()) {
- control.fadeIn(delay)
- }
- } else {
- control.fadeOut(delay)
- }
- return
- }
- if (show) {
- control.show()
- } else {
- control.hide()
- }
- };
- var is_title_with_overlay = function () {
- if (!utils.is_large_screen_mode(config) || !is_detail_visible) {
- return false
- }
- var galleryTitlePosition = config.gallerytitleposition.toUpperCase();
- if (galleryTitlePosition === "NONE" || galleryTitlePosition === "TOP") {
- return false
- }
- return true
- };
- var is_button_bar_with_overlay = function () {
- var buttonbarPosition = config.buttonbarposition.toUpperCase();
- if (buttonbarPosition === "NONE" || buttonbarPosition === "TOP") {
- return false
- }
- if (config.showthumbsbutton || config.showopenbutton || config.showautoplaybutton || show_audio_button() || need_full_screen_button() || config.showinfobutton || config.shownavbuttons) {
- return true
- }
- return false
- };
- var concatenate_tags_string = function (arytags) {
- if (!arytags) {
- return ""
- }
- var ret = "";
- for (var i = 0; i < arytags.length; i++) {
- if (!arytags[i]) {
- continue
- }
- if (ret) {
- ret += (", " + arytags[i])
- } else {
- ret = arytags[i]
- }
- }
- return ret
- };
- var set_overlay_visible = function (show) {
- var showimageoverlay = config.showimageoverlay.toUpperCase();
- if (showimageoverlay === "ALWAYS") {
- overlay_visible = true
- } else {
- if (showimageoverlay === "NEVER") {
- overlay_visible = false
- } else {
- overlay_visible = show
- }
- }
- };
- var show_count = 0;
- var show_hide_overlay = function (show, delay) {
- set_overlay_visible(show);
- if (utils.is_ipad()) {
- if (delay > 0 && show) {
- window.setTimeout(function () {
- _(".jb-classifier-show-on-over .jb-cap-frame").css("display", "")
- }, 10)
- }
- show_hide_controls(_(".jb-classifier-show-on-over, .jb-classifier-show-on-over .jb-cap-frame"), overlay_visible, delay)
- } else {
- show_hide_controls(_(".jb-classifier-show-on-over"), overlay_visible, delay)
- }
- };
- var overlayTimer = 0;
- var set_overlay = function (show, delay) {
- if (!_(" .jb-panel-detail").is(":visible")) {
- return
- }
- if (switching_2_thumbnail) {
- return
- }
- if (overlayTimer) {
- window.clearTimeout(overlayTimer);
- overlayTimer = 0
- }
- overlayTimer = window.setTimeout(function () {
- overlayTimer = 0;
- show_hide_overlay(show, ($.browser.msie && $.browser.version >= 7 && $.browser.version < 8) ? 0 : delay)
- }, 100)
- };
- var check_open_image_directly = function () {
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- if (config.enabledirectlinks) {
- var urlhash = window.location.href.split("#");
- var directPicIdx = (urlhash.length >= 2) ? parseInt(urlhash[1]) : -1;
- if (directPicIdx > 0 && directPicIdx <= gallery_manager.length()) {
- show_main_image(directPicIdx - 1, image_change_speed, true);
- is_detail_visible = true;
- return true
- }
- }
- if (config.firstimageindex > 0 && config.firstimageindex <= gallery_manager.length()) {
- show_main_image(config.firstimageindex - 1, image_change_speed, true);
- is_detail_visible = true;
- return true
- }
- return false
- };
- var set_hash_changed_event = function () {
- if (!config.enabledirectlinks) {
- return
- }
- var originalIdx = -1;
- var directGo2 = function () {
- var urlhash = window.location.href.split("#");
- var directPicIdx = (urlhash.length >= 2) ? parseInt(urlhash[1]) : -1;
- if (directPicIdx > 0 && directPicIdx <= gallery_manager.length() && originalIdx != directPicIdx) {
- originalIdx = directPicIdx;
- show_main_image(directPicIdx - 1)
- }
- };
- if ($.browser.msie && $.browser.version < 8) {
- window.setInterval(directGo2, 800)
- } else {
- $(window).bind("hashchange", directGo2)
- }
- };
- var splash_is_set = function () {
- var ssp = config.showsplashpage.toUpperCase();
- if (ssp === "NEVER") {
- return false
- } else {
- if (ssp === "ALWAYS") {
- return true
- } else {
- if (!utils.is_large_screen_mode(config) && !is_full_screen_mode) {
- return true
- }
- }
- }
- return false
- };
- var need_show_splash_page = function () {
- if (fullScreenPersistor.is_full_screen) {
- return false
- }
- return splash_is_set()
- };
- var show_splash_page = function () {
- utils.add_viewport_meta_tag_4_device(!config.enabletouchzoom || sizing.is_gallery_fully_filled(config.gallerywidth, config.galleryheight));
- if (need_show_splash_page()) {
- _(".jb-classifier-detail-area").hide();
- var splashImageUrl = (config.splashimageurl ? correct_path(config.splashimageurl) : gallery_manager.get_image(0).imageURL);
- var splash = new juicebox_gallery_splash_panel();
- var params = get_panel_params();
- params.splashImageUrl = splashImageUrl;
- params.finish_draw_event_callback = null;
- params.view_gallery_event_callback = function () {
- full_screen()
- };
- splash.initialize(params);
- splash.draw()
- } else {
- after_loading_images();
- set_gallery_title()
- }
- };
- var get_panel_params = function () {
- return {
- jquery: $,
- document_id: document_id,
- container: _(" .jb-panel-index>.jb-idx-thumbnail-container"),
- config: config,
- utils: utils,
- glymng: gallery_manager,
- sizing: sizing,
- finish_draw_event_callback: switch_2_main_image,
- touch_event_callback: after_page_changed,
- current_width: current_width,
- current_height: current_height
- }
- };
- var set_nav_btn_position = function (cntSize) {
- _(".jb-navigation.jb-classifier-detail-area .jbn-nav-button").css("top", (cntSize.detail_panel_height / 2 - _(".jbn-right-button").height() / 2) + "px");
- if (utils.is_large_screen_mode(config)) {
- _(".jb-navigation.jb-classifier-thumb-area .jbn-nav-button").css("top", (index_panel.get_thumb_height() / 2 - 27) + "px")
- } else {
- _(".jb-navigation.jb-classifier-thumb-area .jbn-nav-button").css("top", (cntSize.index_panel_height / 2 - _(".jbn-right-button").height() / 2) + "px")
- }
- };
- var adjust_title_button_bar_position = function () {
- var galleryTitlePosition = config.gallerytitleposition.toUpperCase();
- var buttonbarPosition = config.buttonbarposition.toUpperCase();
- var rt = 10 + sizing.get_stage_padding(current_width, current_height, config);
- var tp = 10;
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, true, true, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- if (galleryTitlePosition === "TOP") {
- _(".jb-area-large-mode-title").css({
- left: rt,
- top: (tp - 3 + cntSize.top_panel_top)
- })
- } else {
- if (galleryTitlePosition != "NONE") {
- _(".jb-area-large-mode-title").css({
- left: rt,
- top: (tp + cntSize.detail_panel_top)
- })
- }
- } if (buttonbarPosition === "TOP") {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").css({
- right: rt,
- top: (tp - 3 + cntSize.top_panel_top)
- })
- } else {
- if (buttonbarPosition != "NONE") {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").css({
- right: rt,
- top: (tp + cntSize.detail_panel_top)
- })
- }
- }
- };
- var link_overlays = function () {
- if (!need_top_panel()) {
- _(".jb-panel-top").remove()
- } else {
- _(".jb-panel-top").show()
- } if (!need_full_screen_button()) {
- _(".jb-bb-btn-full-screen").remove()
- }
- var ov = config.captionposition.toUpperCase();
- if (ov === "NONE") {
- _(".jb-area-caption").remove()
- } else {
- if (ov === "BELOW_IMAGE" || ov === "BOTTOM") {
- _(".jb-area-caption").removeClass("jb-classifier-show-on-over").addClass("jb-flag-size-fixed")
- } else {
- _(".jb-area-caption").addClass("jb-classifier-show-on-over")
- }
- } if (!config.showbackbutton || !utils.is_large_screen_mode(config)) {
- _(".jb-go-back").remove()
- } else {
- ov = config.backbuttonposition.toUpperCase();
- if (ov === "OVERLAY") {
- _(".jb-go-back").addClass("jb-classifier-show-on-over")
- } else {
- _(".jb-go-back").removeClass("jb-classifier-show-on-over")
- }
- }
- ov = config.buttonbarposition.toUpperCase();
- var btnsel = ($.browser.msie ? ".jb-classifier-link-wrapper.jb-classifier-detail-area" : ".jb-classifier-link-wrapper.jb-classifier-detail-area, .jb-classifier-link-wrapper.jb-classifier-detail-area .jb-bb-bar");
- if (ov === "NEVER") {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").remove()
- } else {
- if (ov === "TOP" || config.showinfobutton) {
- _(btnsel).removeClass("jb-classifier-show-on-over")
- } else {
- _(btnsel).addClass("jb-classifier-show-on-over")
- }
- }
- ov = config.gallerytitleposition.toUpperCase();
- if (ov === "NONE") {
- _(".jb-area-large-mode-title").remove()
- } else {
- if (ov === "TOP") {
- _(".jb-area-large-mode-title").removeClass("jb-classifier-show-on-over")
- } else {
- _(".jb-area-large-mode-title").addClass("jb-classifier-show-on-over")
- }
- } if (!need_image_nav_button()) {
- _(".jb-navigation .jbn-nav-button").remove()
- }
- if (config.topbackcolor) {
- if (utils.is_earlier_ie()) {
- _(".jb-panel-top").css({
- "background-color": utils.format_color(config.topbackcolor),
- filter: config.topbackopacity.replace("filter:", "")
- })
- } else {
- _(".jb-panel-top").css({
- "background-color": utils.format_color(config.topbackcolor)
- })
- }
- }
- if (config.buttonbarbackcolor) {
- if (utils.is_earlier_ie()) {
- _(".jb-bb-bar").css({
- "background-color": utils.format_color(config.buttonbarbackcolor),
- filter: config.buttonbarbackopacity.replace("filter:", "")
- })
- } else {
- _(".jb-bb-bar").css({
- "background-color": utils.format_color(config.buttonbarbackcolor)
- })
- }
- }
- };
- var after_loading_images = function (skipshowing) {
- initial_win_width = $(window).width();
- initial_win_height = $(window).height();
- link_overlays();
- set_back_button();
- adjust_title_button_bar_position();
- if (config.useflickr) {
- _("").addClass("jb-flickr-glry")
- }
- if (fullScreenPersistor.is_full_screen) {
- if (utils.need_viewport_meta() && !utils.host_has_viewport_meta()) {
- _("").addClass("jb-large-icon")
- }
- }
- _(".jbn-nav-left-touch-area .jbn-nav-button").css({
- left: (sizing.get_stage_padding(current_width, current_height, config) - 5)
- });
- _(".jbn-nav-right-touch-area .jbn-nav-button").css({
- right: (sizing.get_stage_padding(current_width, current_height, config) + 10)
- });
- if (false) {
- window.setTimeout(function () {
- display_error_message(themeUrl)
- }, image_change_speed)
- }
- if (config.randomizeimages) {
- gallery_manager.sort_images()
- }
- setup_layout(current_width, current_height, is_detail_visible);
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- var params = get_panel_params();
- params.current_width = cntSize.index_panel_width;
- params.current_height = cntSize.index_panel_height;
- index_panel.initialize(params);
- params.container = _(" .jb-panel-detail");
- params.caption_container = _(".jb-area-caption");
- params.current_width = cntSize.detail_panel_width;
- params.current_height = cntSize.detail_panel_height;
- params.before_draw_event_callback = before_show_main_image;
- params.finish_draw_event_callback = after_show_main_image;
- detail_panel.initialize(params);
- if (!skipshowing) {
- setup_layout(current_width, current_height, is_detail_visible);
- set_nav_btn_position(cntSize);
- apply_show_options(true);
- $(window).resize(function () {
- repaint(false)
- });
- if (utils.is_iphone() || utils.is_ipad()) {
- window.onorientationchange = function () {
- repaint(true)
- }
- }
- _(".jb-bb-btn-de-show-list").click(index_button_clicked);
- _(".jb-classifier-thumb-area .jbn-right-button").click(function () {
- return next_page(0)
- });
- _(".jb-classifier-thumb-area .jbn-left-button").click(function () {
- return previous_page(0)
- });
- _(".jb-bb-btn-open-url").click(open_url);
- _(".jb-bb-btn-full-screen").click(full_screen);
- _(".jb-bb-btn-auto-play").click(toggle_autoplay);
- _(".jb-bb-btn-audio").click(toggle_audio_play);
- _(".jb-bb-btn-show-info").click(function () {
- toggle_info();
- return false
- });
- _(".jb-bb-btn-top-nav.jb-bb-btn-top-nav-left").click(function () {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- return previous_image(0)
- });
- _(".jb-bb-btn-top-nav.jb-bb-btn-top-nav-right").click(function () {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- return next_image(0)
- });
- var audioUrl = "";
- if (utils.is_firefox()) {
- audioUrl = config.audiourlogg
- } else {
- if (config.audiourlmp3) {
- audioUrl = config.audiourlmp3
- } else {
- audioUrl = config.audiourlogg
- }
- } if (audioUrl && !utils.is_earlier_ie() && !utils.is_adobe_air()) {
- audioPlayer = new Audio(audioUrl);
- audioPlayer.addEventListener("ended", function () {
- this.currentTime = 0;
- if (config.loopaudio) {
- this.play()
- } else {
- toggle_audio_play()
- }
- }, false);
- audioPlayer.volume = config.audiovolume;
- if (config.playaudioonload) {
- toggle_audio_play()
- }
- }
- if (!utils.is_swipable_device()) {
- var clickMode = config.imageclickmode.toUpperCase();
- _(".jb-classifier-detail-area .jbn-right-button").click(function () {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- return next_image(0)
- });
- _(".jb-classifier-detail-area .jbn-left-button").click(function () {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- return previous_image(0)
- });
- if (!config.forcetouchmode) {
- if (clickMode === "NONE") {
- _(".jb-classifier-detail-area .jbn-nav-right-touch-area").css("cursor", "default");
- _(".jb-classifier-detail-area .jbn-nav-left-touch-area").css("cursor", "default")
- } else {
- if (clickMode === "OPEN_URL") {
- _(".jb-classifier-detail-area .jbn-nav-right-touch-area").click(open_url);
- _(".jb-classifier-detail-area .jbn-nav-left-touch-area").click(open_url)
- } else {
- _(".jb-classifier-detail-area .jbn-nav-right-touch-area").click(function () {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- return next_image(0)
- });
- _(".jb-classifier-detail-area .jbn-nav-left-touch-area").click(function () {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- return previous_image(0)
- })
- }
- }
- }
- } else {
- var delay = 1050 * config.imagetransitiontime + 300;
- var delay = parseInt(1005 * config.imagetransitiontime + 510 * config.imagetransitiontime);
- _(".jb-classifier-detail-area .jbn-right-button").bind("touchend", function (e) {
- index_panel.yield_4_transition(delay);
- e.preventDefault();
- if (in_the_transitioning) {
- return
- }
- in_the_transitioning = true;
- if (autoplay_timer) {
- toggle_autoplay()
- }
- next_image(0);
- window.setTimeout(function () {
- in_the_transitioning = false
- }, delay)
- });
- _(".jb-classifier-detail-area .jbn-left-button").bind("touchend", function (e) {
- index_panel.yield_4_transition(delay);
- e.preventDefault();
- if (in_the_transitioning) {
- return
- }
- in_the_transitioning = true;
- if (autoplay_timer) {
- toggle_autoplay()
- }
- previous_image(0);
- window.setTimeout(function () {
- in_the_transitioning = false
- }, delay)
- })
- } if (is_detail_visible) {
- overlay_visible = false;
- toggle_overlay()
- }
- set_key_events();
- config.onload();
- if (!utils.is_iphone() && !utils.is_ipad() && !utils.is_android() && !config.showinfobutton && !config.forcetouchmode) {
- _(".jb-classifier-detail-area, .jb-area-caption, .jb-go-back, .jb-area-large-mode-title").hover(function () {
- set_overlay(true, 250)
- }, function () {
- set_overlay(false, 250)
- })
- }
- set_hash_changed_event();
- if (fullScreenPersistor.is_full_screen) {
- show_main_image(fullScreenPersistor.parent_gallery_param.current_image_index, image_change_speed, true);
- is_detail_visible = true;
- repaint(true)
- } else {
- check_open_image_directly()
- }
- window.setTimeout(function () {
- if (config.usethumbdots && is_detail_visible && is_index_visible) {
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- detail_panel.repaint(cntSize.detail_panel_width, cntSize.detail_panel_height)
- }
- repaint(true)
- }, 100);
- if ($.browser.msie && !utils.is_large_screen_mode(config)) {
- window.setTimeout(function () {
- repaint(true)
- }, 100)
- }
- if (config.autoplayonload) {
- if (!utils.is_large_screen_mode(config)) {
- show_main_image(detail_panel.get_photo_position(), image_change_speed, true);
- is_detail_visible = true
- }
- toggle_autoplay(true)
- }
- if (!config.showlargethumbs && utils.is_large_screen_mode(config)) {
- hide_thumbnails_in_lsm = false;
- toggle_index_panel_4_lsm(true)
- }
- }
- if (config_manager.isp && juicebox_instances[instance_id] && typeof (juicebox_instances[instance_id].onInitComplete) === "function") {
- juicebox_instances[instance_id].onInitComplete()
- }
- };
- var autoplay_timer = 0;
- var set_autoplay_info = function () {
- var message = config.languagelist.aon;
- if (autoplay_timer) {
- _(".jb-bb-btn-auto-play").toggleClass("jb-status-playing").attr("title", config.languagelist.stpa)
- } else {
- message = config.languagelist.aoff;
- _(".jb-bb-btn-auto-play").toggleClass("jb-status-playing").attr("title", config.languagelist.strta)
- } if (config.showautoplaystatus) {
- var msgdlg = _(".jb-status-message");
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- var msgTp = cntSize.detail_panel_height / 2 - 15 + cntSize.detail_panel_top;
- var msgLf = cntSize.detail_panel_width / 2 - 60 + cntSize.detail_panel_left;
- msgdlg.css({
- top: msgTp,
- left: msgLf,
- width: "115px"
- });
- msgdlg.html(message).fadeIn(image_change_speed);
- window.setTimeout(function () {
- msgdlg.fadeOut(image_change_speed)
- }, 1000)
- }
- };
- var audio_playing = false;
- var toggle_audio_play = function () {
- if (!audioPlayer) {
- return false
- }
- if (utils.is_earlier_ie()) {
- return false
- }
- if (audio_playing) {
- audioPlayer.pause();
- audio_playing = false;
- _(".jb-bb-btn-audio").removeClass("jb-status-playing").attr("title", config.languagelist.plya)
- } else {
- audioPlayer.play();
- audio_playing = true;
- _(".jb-bb-btn-audio").addClass("jb-status-playing").attr("title", config.languagelist.psa)
- }
- return false
- };
- var can_image_move = function (to_next) {
- var glrylen = gallery_manager.length();
- if (glrylen <= 1) {
- return false
- }
- if (config.enablelooping) {
- return true
- }
- var imgpos = detail_panel.get_photo_position();
- if (to_next) {
- if (imgpos >= glrylen - 1) {
- return false
- }
- return true
- } else {
- if (imgpos <= 0) {
- return false
- }
- return true
- }
- };
- var can_page_move = function (to_next) {
- if (index_panel.is_last_page() && index_panel.is_first_page()) {
- return false
- }
- if (config.enablelooping) {
- return true
- }
- if (to_next) {
- if (index_panel.is_last_page()) {
- return false
- }
- return true
- } else {
- if (index_panel.is_first_page()) {
- return false
- }
- return true
- }
- };
- var toggle_autoplay = function () {
- if (!config.showautoplaybutton && !config.enableautoplay) {
- return
- }
- if (autoplay_timer) {
- window.clearInterval(autoplay_timer);
- autoplay_timer = 0;
- set_autoplay_info();
- return false
- }
- if (is_detail_visible) {
- if (config.gonextonautoplay) {
- next_image(0)
- } else {
- show_main_image(detail_panel.get_photo_position())
- }
- }
- autoplay_timer = window.setInterval(function () {
- if (!can_image_move(true)) {
- toggle_autoplay();
- return false
- }
- var ptpos = gallery_manager.get_next_image(detail_panel.get_photo_position()).position;
- var mimg = _(".jb-dt-main-image-" + ptpos + " .jb-status-loading");
- if (mimg.length <= 0 && config.main_load_placeholder.indexOf("jb-status-") > 0) {
- next_image(0)
- }
- }, 1000 * config.displaytime);
- set_autoplay_info();
- return false
- };
- var set_key_events = function () {
- if (!config.enablekeyboardcontrols) {
- return
- }
- if (utils.is_iphone() || utils.is_ipad() || utils.is_small_android()) {
- return
- }
- if (fullScreenPersistor.is_full_screen || is_full_screen_mode) {
- if (!utils.is_in_iframe()) {
- _("").focus()
- }
- }
- _("").keydown(function (evt) {
- evt.preventDefault();
- switch (evt.keyCode) {
- case 32:
- toggle_autoplay();
- break;
- case 37:
- case 75:
- previous_image(0);
- break;
- case 39:
- case 74:
- next_image(0);
- break;
- case 36:
- show_thumbnails(0);
- show_main_image(0);
- break;
- case 35:
- var imgpos = gallery_manager.length() - 1;
- show_thumbnails(imgpos);
- show_main_image(imgpos);
- break;
- case 70:
- if (is_full_screen_mode || fullScreenPersistor.is_full_screen) {
- return
- }
- full_screen();
- break;
- case 27:
- if (fullScreenPersistor.is_full_screen) {
- full_screen()
- }
- break
- }
- })
- };
- var update_flickr_image_details = function (imageIndex, details) {
- if (!details) {
- return
- }
- var image = gallery_manager.get_image(imageIndex);
- if (image.flickrPhotoId !== details.id) {
- return
- }
- image.description = details.description;
- image.detail_loaded = true;
- if (detail_panel.is_initialized()) {
- detail_panel.repopulate_caption_html(image)
- }
- };
- var load_images = function (xml) {
- if (config.useflickr) {
- flickr_loader = new juicebox_flickr_image_loader($, config_manager, display_error_message)
- }
- if (fullScreenPersistor.is_full_screen && fullScreenPersistor.parent_gallery_param && fullScreenPersistor.parent_gallery_param.gallery_manager) {
- gallery_manager = fullScreenPersistor.parent_gallery_param.gallery_manager;
- show_splash_page();
- return
- }
- var limit = config_manager.isp ? (100000) : 50;
- if (config.useflickr) {
- flickr_loader.get_images(function (photos) {
- for (var i = 0; i < photos.length && i < limit; i++) {
- gallery_manager.add_image({
- imageURL: photos[i].imageURL,
- thumbURL: photos[i].thumbURL,
- caption: photos[i].caption,
- imageFullURL: photos[i].imageFullURL,
- flickrPhotoId: photos[i].flickrPhotoId
- })
- }
- show_splash_page()
- }, null)
- } else {
- var count = 0;
- $(xml).find("image").each(function () {
- if (count >= limit) {
- return
- }
- count++;
- gallery_manager.add_image({
- imageURL: correct_path($(this).attr("imageURL")),
- thumbURL: correct_path($(this).attr("thumbURL")),
- title: $(this).children("title").text(),
- caption: $(this).children("caption").text(),
- linkURL: correct_path($(this).attr("linkURL")),
- linkTarget: $(this).attr("linkTarget")
- })
- });
- show_splash_page()
- }
- };
- var get_gallery_height = function () {
- return sizing.get_gallery_height(config)
- };
- var init_before_loading_gallery_html = function (container) {
- container.css({
- height: config.galleryheight,
- width: config.gallerywidth
- });
- sizing = new juicebox_sizing_manager($, container, utils);
- sizing.try_set_body_height(config);
- is_full_screen_mode = sizing.is_fullscreen_mode(config);
- if (is_full_screen_mode) {
- $("body").css({
- overflow: "hidden",
- padding: "0",
- margin: "0"
- })
- }
- };
- var init_after_dom_loaded = function () {
- _(".jb-navigation.jb-classifier-detail-area").fadeOut(0);
- dialog = new juicebox_gallery_dialog({
- jquery: $
- });
- detail_area = _(" .jb-classifier-detail-area");
- thumb_area = _(" .jb-classifier-thumb-area");
- current_width = _(" *").width();
- current_height = get_gallery_height();
- if (config.showpreloader) {
- var opct = $.browser.msie ? "filter: alpha(opacity = 0);" : "opacity:0;";
- if (utils.is_firefox3()) {
- opct = "display:none;"
- }
- _(".jb-idx-thumbnail-container").html('<table id="jb-glry-preload" style="' + opct + 'float:left;overflow:hidden;text-align:center;vertical-align:middle;"><tr><td>' + config.main_load_placeholder + "</td></tr></table>");
- _("#jb-glry-preload .jb-status-loading").css({
- height: current_height,
- width: current_width
- });
- _("#jb-glry-preload").fadeIn(300)
- }
- if (utils.is_chrome() && window.location.href.toLowerCase().indexOf("http") !== 0) {
- display_error_message(config.languagelist.lcchm);
- return
- }
- var galleryFile = correct_path(config.configurl);
- $.ajax({
- url: galleryFile,
- type: "GET",
- error: function (xhr, data) {
- $("#" + document_id).html(display_error_message(config.languagelist.ae))
- },
- success: function (data) {
- var rsp;
- if (typeof data === "string") {
- rsp = new ActiveXObject("Microsoft.XMLDOM");
- rsp.async = false;
- rsp.loadXML(data);
- data = rsp
- }
- config_manager.sync_options(_config, data);
- config = config_manager.get_config();
- image_change_speed = 1000 * config.imagetransitiontime;
- var bIsPercentage = (config.galleryheight + "").indexOf("%") > 0;
- if (!force2fill && _("").height() === 0 && bIsPercentage) {
- force2fill = true
- } else {
- if (bIsPercentage && $.browser.msie && $.browser.version < 9 && $.browser.version > 7) {
- force2fill = true
- }
- }
- _("." + theme_cls).attr("style", get_background_style());
- if (config.showpreloader) {
- window.setTimeout(function () {
- load_images(data)
- }, 300)
- } else {
- load_images(data)
- }
- }
- });
- var pushImageThrough = function (delta) {
- var crntIdx = detail_panel.get_current_photo().position;
- if (delta > 10) {
- if (!can_image_move(false)) {
- return false
- } else {
- crntIdx--;
- detail_panel.change_2_photo(false, 0, is_caption_visible(), crntIdx, true)
- }
- } else {
- if (delta < -10) {
- if (!can_image_move(true)) {
- return false
- } else {
- crntIdx++;
- detail_panel.change_2_photo(true, 0, is_caption_visible(), crntIdx, true)
- }
- }
- }
- return true
- };
- var moveImage = function (e, delta) {
- in_navigation = false;
- in_the_transitioning = true;
- var delaytime = parseInt(1000 * config.imagetransitiontime * (current_width - delta_x) / current_width);
- if (delta > 10) {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- if (!can_image_move(false)) {
- detail_panel.move_back(delta)
- } else {
- previous_image(Math.abs(delta))
- }
- e.preventDefault()
- } else {
- if (delta < -10) {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- if (!can_image_move(true)) {
- detail_panel.move_back(delta)
- } else {
- next_image(Math.abs(delta))
- }
- e.preventDefault()
- } else {
- detail_panel.move_back(delta);
- if (!config.showinfobutton) {
- toggle_overlay();
- delaytime = 310
- } else {
- transTimer = 0;
- in_the_transitioning = false;
- return
- }
- }
- }
- index_panel.yield_4_transition(delaytime);
- if (utils.is_large_screen_mode(config)) {
- transTimer = window.setTimeout(function () {
- transTimer = 0;
- in_the_transitioning = false
- }, delaytime)
- } else {
- in_the_transitioning = false
- }
- };
- var touchStarted = function (e) {
- if (in_navigation) {
- return
- }
- if (in_the_transitioning) {
- in_the_transitioning = false;
- if (!pushImageThrough(delta_x)) {
- return
- }
- }
- delta_x = 0;
- delta_y = 0;
- if (!in_navigation) {
- in_navigation = true;
- start_x = e.originalEvent.touches[0].pageX;
- last_x = e.originalEvent.touches[0].pageX;
- start_y = e.originalEvent.touches[0].pageY;
- last_y = e.originalEvent.touches[0].pageY
- }
- };
- var touchMoving = function (e) {
- if (fullScreenPersistor.is_full_screen || is_full_screen_mode || Math.abs(e.originalEvent.touches[0].pageX - start_x) > Math.abs(e.originalEvent.touches[0].pageY - start_y)) {
- e.preventDefault()
- }
- if (in_the_transitioning) {
- return
- }
- if (!in_navigation) {
- return
- }
- delta_x = e.originalEvent.touches[0].pageX - start_x;
- delta_y = e.originalEvent.touches[0].pageY - start_y;
- if (Math.abs(delta_x) > 10) {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- }
- var imgs = _(" .jb-panel-detail .jb-dt-main-frame");
- imgs.animate({
- left: "+=" + (e.originalEvent.touches[0].pageX - last_x),
- avoidTransforms: !config.use_webkit_transform,
- useTranslate3d: true
- }, 0);
- last_x = e.originalEvent.touches[0].pageX;
- last_y = e.originalEvent.touches[0].pageY
- };
- var touchEnded = function (e) {
- var is_h_swipe = Math.abs(delta_x) > Math.abs(delta_y);
- if (fullScreenPersistor.is_full_screen || is_full_screen_mode || is_h_swipe) {
- e.preventDefault()
- }
- if (in_the_transitioning || !in_navigation) {
- return
- }
- if (is_h_swipe) {
- moveImage(e, delta_x)
- } else {
- if (Math.abs(delta_y) > 10) {
- detail_panel.move_back(delta_x);
- in_navigation = false
- } else {
- moveImage(e, 0)
- }
- }
- };
- _(".jb-navigation.jb-classifier-detail-area").bind("touchstart", touchStarted).bind("touchmove", touchMoving).bind("touchend", touchEnded);
- _(".jb-classifier-detail-area .jbn-right-button, jb-classifier-detail-area .jbn-left-button").bind("touchstart", function (e) {
- e.preventDefault()
- }).bind("touchmove", function (e) {
- e.preventDefault()
- }).bind("touchend", function (e) {
- e.preventDefault()
- });
- _(".jb-area-caption, .jb-classifier-link-wrapper, .jb-area-large-mode-title").bind("touchmove", function (e) {
- e.preventDefault()
- });
- _(".jb-panel-detail").nextAll('div[onclick*="window.open"]').bind("touchmove", function (e) {
- e.preventDefault()
- }).bind("touchend", function (e) {
- window.open("http://www." + ["ju", "ice", "b", "ox", ".n", "et"].join(""));
- e.preventDefault()
- });
- if (config.forcetouchmode) {
- _(".jb-classifier-detail-area .jbn-left-button, .jb-classifier-detail-area .jbn-right-button").mouseup(function (e) {
- e.preventDefault();
- in_navigation = false
- }).mousedown(function (e) {
- e.preventDefault()
- }).mousemove(function (e) {
- e.preventDefault()
- });
- _(".jb-navigation.jb-classifier-detail-area").mousedown(function (e) {
- if (e.which !== 1) {
- return
- }
- var thEvt = {
- originalEvent: {
- touches: [{}]
- }
- };
- e.preventDefault();
- thEvt.preventDefault = function () {};
- thEvt.originalEvent.touches[0].pageX = e.screenX;
- touchStarted(thEvt)
- }).mousemove(function (e) {
- if (e.which !== 1) {
- in_navigation = false;
- return
- }
- if (!in_navigation) {
- return
- }
- var thEvt = {
- originalEvent: {
- touches: [{}]
- }
- };
- thEvt.preventDefault = function () {};
- thEvt.originalEvent.touches[0].pageX = e.screenX;
- touchMoving(thEvt)
- }).mouseup(function (e) {
- if (!in_navigation) {
- return
- }
- var thEvt = {};
- thEvt.preventDefault = function () {};
- touchEnded(thEvt)
- }).mouseout(function (e) {
- if (!in_navigation) {
- return
- }
- var thEvt = {};
- thEvt.preventDefault = function () {};
- touchEnded(thEvt)
- })
- }
- };
- var toggle_overlay = function () {
- overlay_visible = !overlay_visible;
- show_hide_overlay(overlay_visible, 250)
- };
- var toggle_info = function () {
- overlay_visible = !overlay_visible;
- show_hide_nav_controls(overlay_visible, 250, true)
- };
- var show_hide_nav_controls = function (show, delay, skipBtnBar) {
- if (!is_detail_visible) {
- return
- }
- var tags;
- show_hide_controls(_(".jb-classifier-show-on-over"), show, (($.browser.msie && $.browser.version >= 7 && $.browser.version < 8) ? 0 : delay));
- _(".jb-area-caption table").css({
- display: ""
- });
- var tt = show ? config.languagelist.hdinfo : config.languagelist.sinfo;
- _(".jb-bb-button.jb-bb-btn-show-info").attr("title", tt)
- };
- var display_error_message = function (msg) {
- var container;
- if (config.containerid) {
- container = $("#" + config.containerid)
- }
- var msgHtml;
- if (container && container.length > 0) {
- msgHtml = "<table style='width:100%;height:100%;text-align:center;background-color:#777;'><tr><td><div class='jb-error-message' style='color:white;font-family:sans-serif;font-size:18px;'>" + msg + "</div></td></tr></table>";
- container.html(msgHtml)
- } else {
- msgHtml = "<table style='width:100%;height:100%;text-align:center;font-family:sans-serif;font-size:18px;background-color:#777;color:#FFF;'><tr><td>" + msg + "</td></tr></table>";
- document.write(msgHtml)
- }
- };
- var add_css_link = function (linkUrl) {
- var csslnk = document.createElement("link");
- csslnk.type = "text/css";
- csslnk.rel = "stylesheet";
- var head = document.getElementsByTagName("head")[0] || document.documentElement;
- csslnk.href = linkUrl;
- head.appendChild(csslnk)
- };
- var init = function () {
- instance_id = juicebox_instance_count;
- juicebox_instance_count++;
- if (config.themeurl) {
- themeUrl = config.themeurl
- } else {
- if (config.theme) {
- themeUrl = correct_path(config.jbcore) + "themes/" + config.theme + "/css/style.css"
- }
- }
- add_css_link(themeUrl);
- if ($.browser.msie && $.browser.version < 7) {
- add_css_link(themeUrl.toLowerCase().replace(".css", "-ie6.css"))
- }
- var container;
- if (config.containerid) {
- var dom_loading_tmr = 0;
- container = $("#" + config.containerid);
- if (container.length > 0) {
- init_before_loading_gallery_html(container);
- container.html(gallery_skeleton(document_id));
- init_after_dom_loaded()
- } else {
- dom_loading_tmr = window.setInterval(function () {
- var cntnr = $("#" + config.containerid);
- if (cntnr.length <= 0) {
- if ($("body").length > 0) {
- display_error_message(config.languagelist.noid01 + config.containerid + config.languagelist.noid02);
- console.log(config.languagelist.noid01 + config.containerid + config.languagelist.noid02);
- if (dom_loading_tmr) {
- window.clearInterval(dom_loading_tmr)
- }
- dom_loading_tmr = 0;
- return
- }
- return
- }
- if (dom_loading_tmr) {
- window.clearInterval(dom_loading_tmr)
- }
- dom_loading_tmr = 0;
- init_before_loading_gallery_html(cntnr);
- cntnr.html(gallery_skeleton(document_id));
- init_after_dom_loaded()
- }, 200)
- }
- } else {
- document.write(get_container_html(document_id));
- container = _("");
- init_before_loading_gallery_html(container);
- container.html(get_gallery_frame_html());
- init_after_dom_loaded()
- }
- };
- var get_container_html = function (document_id, token) {
- var ver = "";
- if ($.browser.msie) {
- ver = "jb-flag-msie jb-flag-msiever" + parseInt($.browser.version) + (utils.is_earlier_ie() ? " jb-flag-msie-bf9" : "")
- }
- return "<div id='" + document_id + "' tabindex='0' class='juicebox-gallery " + ver + "' style='width:100%;height:100%;'>" + (token ? token : "") + "</div>"
- };
- var get_back_button_html_content = function () {
- if (!config.showbackbutton) {
- return ""
- }
- var lnk;
- if (config.backbuttonurl) {
- lnk = "<a href='" + config.backbuttonurl + "'>" + config.backbuttontext + "</a>"
- } else {
- lnk = "<a href='#' onclick='history.back(); return false;'>" + config.backbuttontext + "</a>"
- }
- return lnk
- };
- var set_back_button = function () {
- if (!config.showbackbutton) {
- _(".jb-go-back").remove();
- return
- }
- var pd = 10 + sizing.get_stage_padding(current_width, current_height, config);
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, true, true, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- var btnrt = pd;
- var btntp = config.backbuttonposition.toUpperCase() != "OVERLAY" ? pd : (pd + cntSize.detail_panel_top);
- _(".jb-go-back").html(get_back_button_html_content()).css({
- top: btntp,
- left: btnrt,
- right: "auto"
- }).show();
- if (config.textcolor) {
- _(".jb-go-back a").css({
- color: utils.format_color(config.textcolor)
- })
- }
- };
- var get_back_button_html = function () {
- return "<div class='jb-go-back jb-classifier-layer' layer='600' style='position:absolute !important;z-index:600; top: 10px; left: 10px; display:none;'>" + get_back_button_html_content() + "</div>"
- };
- var get_autoplay_status_html = function () {
- if (!config.showautoplaystatus) {
- return ""
- }
- return "<div class='jb-status-message' style='position:absolute;" + (config.autoplayonload ? "" : "display:none;") + "'></div>"
- };
- var get_title_html = function () {
- return "<div class='jb-area-large-mode-title" + (config.gallerytitleposition.toUpperCase() === "OVERLAY" ? " jb-classifier-show-on-over " : " ") + "jb-classifier-layer' layer='600' style='position:absolute;display:none;z-index:600'>" + config.gallerytitle + "</div>"
- };
- var need_image_nav_button = function () {
- if (utils.is_large_screen_mode(config)) {
- return true
- }
- if (!config.showimagenav) {
- return false
- }
- return true
- };
- var need_button_bar = function () {
- if (config.buttonbarposition.toUpperCase() === "NONE") {
- return false
- }
- if (typeof (config.showimageoverlay) === "string" && config.showimageoverlay.toUpperCase() === "NEVER" && config.buttonbarposition.toUpperCase() === "OVERLAY") {
- return false
- }
- return true
- };
- var get_calculated_gallery_height = function (ht) {
- return parseInt(ht * parseInt(config.galleryheight) / 100)
- };
- var get_background_style = function () {
- var hstr = force2fill ? "height:" + get_calculated_gallery_height($(window).height()) + "px" : "height:100%";
- return "display:none;width:100%;" + hstr + ";" + (config.backgroundcolor ? "background-color:" + utils.format_color(config.backgroundcolor) + ";" : "") + (utils.is_earlier_ie() ? config.backgroundopacity + ";" : "")
- };
- var get_top_panel_html = function () {
- return "<div class='jb-panel-top' style='position:absolute;display:none;'> </div>"
- };
- var get_splitter_html = function (cls) {
- return "<div class='jb-bb-splitter " + cls + "' style=''></div>"
- };
- var get_badge_image_url = function () {
- if (utils.is_adobe_air()) {
- return ""
- }
- return ["u", "rl", "(", "ht", "tp", ":", "/", "/", "j", "ui", "ce", "b", "o", "x", ".", "n", "e", "t", "/", "i", "m", "g", "/", "jb", "0", "0", "1", ".", "p", "n", "g", ")"].join("")
- };
- var get_badge_link = function () {
- return ["on", "c", "l", "i", "c", "k", "=", '"', "w", "i", "n", "d", "o", "w", ".", "o", "p", "e", "n", "(", "'", "h", "t", "t", "p", ":", "/", "/", "w", "w", "w", ".", "j", "u", "i", "c", "eb", "ox", ".", "ne", "t'", ")", ";", "return ", "false", ';"'].join("")
- };
- var get_gallery_frame_html = function () {
- var badge = "";
- if (!utils.ship) {
- badge = "<div style='display:block !important;width: 90px !important;height: 24px !important;overflow: hidden !important;position: absolute !important;z-index: 3000" + ($.browser.msie ? "" : " !important") + ";background: " + get_badge_image_url() + " no-repeat 0 0 !important;cursor:pointer;margin:0 !important;padding:0 !important;bottom:0 !important;right:0 !important' " + get_badge_link() + "></div>"
- }
- if (utils.is_adobe_air()) {
- badge = badge.replace("<div style=", "<div class='" + ["j", "b", "-", "b", "a", "d", "g", "e"].join("") + "' style=").replace(";background: " + get_badge_image_url() + " no-repeat 0 0 !important;", ";")
- }
- return "<div class='" + theme_cls + "' style='" + get_background_style() + "'>" + get_top_panel_html() + "<div class='jb-panel-index jb-classifier-thumb-area' style='position:absolute !important;'><div class='jb-idx-thumbnail-container' style='height:100% !important;width:100% !important;'></div><div class='jb-navigation index-navigation jb-classifier-thumb-area'><div class='jbn-nav-button jbn-left-button jb-classifier-layer' layer='1000' style='z-index:1000;display:none;'></div><div class='jbn-nav-button jbn-right-button jb-classifier-layer' layer='1000' style='z-index:1000;display:none;'></div></div></div>" + get_back_button_html() + "<div class='jb-classifier-link-wrapper jb-classifier-thumb-area jb-classifier-layer' layer='3000' style='z-index:3000;'><div class='jb-bb-bar' ><div class='jb-bb-button jb-bb-btn-full-screen" + (fullScreenPersistor.is_full_screen ? " jb-bb-btn-de-full-screen" : "") + "' title='" + (fullScreenPersistor.is_full_screen ? config.languagelist.ef : config.languagelist.gf) + "'> </div></div></div><div class='jb-panel-detail jb-classifier-detail-area jb-classifier-layer' layer='50' style='position:absolute !important'></div>" + get_title_html() + "<div class='jb-classifier-link-wrapper jb-classifier-detail-area jb-classifier-layer' layer='3000' style='z-index:3000;'>" + (need_button_bar() ? "<div class='jb-bb-bar' ><div class='jb-bb-button jb-bb-btn-de-show-list' title='" + config.languagelist.st + "'></div><div class='jb-bb-button jb-bb-btn-open-url' title='" + config.languagelist.oiinw + "'></div><div class='jb-bb-button jb-bb-btn-full-screen" + (fullScreenPersistor.is_full_screen ? " jb-bb-btn-de-full-screen" : "") + "' title='" + (fullScreenPersistor.is_full_screen ? config.languagelist.ef : config.languagelist.gf) + "'></div>" + get_splitter_html("jb-bb-splitter-1") + "<div class='jb-bb-button jb-bb-btn-top-nav jb-bb-btn-top-nav-left' title='" + config.languagelist.goprv + "'></div><div class='jb-bb-button jb-bb-btn-auto-play' title='" + config.languagelist.strta + "'></div><div class='jb-bb-button jb-bb-btn-top-nav jb-bb-btn-top-nav-right' title='" + config.languagelist.gonxt + "'></div>" + get_splitter_html("jb-bb-splitter-2") + "<div class='jb-bb-button jb-bb-btn-show-info' title='" + config.languagelist.hdinfo + "'></div><div class='jb-bb-button jb-bb-btn-audio' title='" + config.languagelist.plya + "'></div></div>" : "") + "</div>" + badge + ((config.captionposition.toUpperCase() != "NONE") ? "<div class='jb-area-caption jb-classifier-layer' layer='200' style='position:absolute !important; bottom: 0; z-index:200;'></div>" : "") + "<div class='jb-navigation jb-classifier-detail-area jb-classifier-layer' layer='500' style='height:100%;z-index:500;'>" + get_autoplay_status_html() + "<div class='jbn-nav-touch-area jbn-nav-left-touch-area'><div class='jbn-nav-button jb-classifier-show-on-over jb-classifier-layer' layer='1000' style='z-index:1000;position:absolute;left:" + (sizing.get_stage_padding(current_width, current_height, config)) + "px;'><div class='jbn-left-button' style='display:none;'></div></div></div><div class='jbn-nav-touch-area jbn-nav-right-touch-area'>" + (need_image_nav_button() ? "<div class='jbn-nav-button jb-classifier-show-on-over jb-classifier-layer' layer='1000' style='z-index:1000;position:absolute;right:" + (sizing.get_stage_padding(current_width, current_height, config) + 10) + "px;'><div class='jbn-right-button' style='display:none;'></div></div>" : "") + "</div></div></div>"
- };
- var gallery_skeleton = function (document_id) {
- return get_container_html(document_id, get_gallery_frame_html())
- };
- var after_page_changed = function () {
- set_index_nav_button();
- if (config_manager.isp && juicebox_instances[instance_id] && typeof (juicebox_instances[instance_id].onThumbPageChange) === "function") {
- var curntPage = index_panel.get_index();
- var curntImage = detail_panel.get_current_photo();
- var evntObj = {
- id: curntPage,
- title: config.gallerytitle,
- caption: curntImage.caption
- };
- juicebox_instances[instance_id].onThumbPageChange(evntObj)
- }
- };
- var set_index_nav_button = function () {
- if (!can_page_move()) {
- _(".jb-classifier-thumb-area .jbn-left-button").hide()
- } else {
- _(".jb-classifier-thumb-area .jbn-left-button").show()
- } if (!can_page_move(true)) {
- _(".jb-classifier-thumb-area .jbn-right-button").hide()
- } else {
- _(".jb-classifier-thumb-area .jbn-right-button").show()
- }
- };
- var show_thumbnails = function (imgpos) {
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- set_containers_size_and_position(cntSize);
- set_index_nav_button_position(cntSize);
- index_panel.show_page_4_image_position(imgpos, cntSize.index_panel_width, cntSize.index_panel_height);
- set_index_nav_button();
- apply_show_options();
- set_gallery_title();
- set_show_list_button()
- };
- var index_button_clicked = function () {
- if (!utils.is_large_screen_mode(config)) {
- return switch_2_thumbnails()
- }
- return toggle_index_panel_4_lsm()
- };
- var toggle_index_panel_4_lsm = function (noAnim) {
- var cntSize;
- var idxPnl = _(".jb-panel-index");
- hide_thumbnails_in_lsm = !hide_thumbnails_in_lsm;
- if (hide_thumbnails_in_lsm) {
- var finishHiddingIndexPanel = function () {
- is_index_visible = false;
- idxPnl.hide();
- repaint(true)
- };
- if (!noAnim) {
- var idxht = parseInt(idxPnl.height());
- idxPnl.animate({
- top: "+=" + (idxht),
- height: "-=" + (idxht),
- avoidTransforms: true
- }, 500, "easeOutQuart", finishHiddingIndexPanel)
- } else {
- finishHiddingIndexPanel()
- }
- } else {
- cntSize = sizing.get_containers_size_and_position(current_width, current_height, true, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- repaint(true, true);
- idxPnl.css({
- top: (cntSize.index_panel_top + cntSize.index_panel_height) + "px",
- height: 0
- });
- idxPnl.show();
- var finishShowingIndexPanel = function () {
- is_index_visible = true;
- idxPnl.hide();
- repaint(true)
- };
- if (!noAnim) {
- idxPnl.animate({
- top: "+=" + (-cntSize.index_panel_height),
- height: "+=" + (cntSize.index_panel_height),
- avoidTransforms: true
- }, 500, "easeOutQuart", finishShowingIndexPanel)
- } else {
- finishShowingIndexPanel()
- }
- }
- return false
- };
- var switch_2_thumbnails = function (current_image_position) {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- var imgpos = current_image_position ? current_image_position : 0;
- if (detail_panel.get_photo_position() > 0) {
- imgpos = detail_panel.get_photo_position()
- }
- if (is_index_visible && is_detail_visible) {
- show_thumbnails(imgpos);
- return false
- }
- is_detail_visible = false;
- is_index_visible = true;
- var target = _(" .jb-panel-index");
- var dtpnl = _(" .jb-panel-detail, .jb-area-caption");
- if (dtpnl.is(":visible")) {
- switching_2_thumbnail = true;
- var imgs = _(" .jb-panel-detail img");
- if (imgs.length > 0) {
- imgs.fadeOut(250)
- }
- if (utils.is_android()) {
- dtpnl.fadeOut(250);
- window.setTimeout(function () {
- _(" .jb-classifier-detail-area, .jb-area-caption").hide();
- _(".jb-classifier-thumb-area").show().fadeIn(200);
- show_thumbnails(imgpos)
- }, 250)
- } else {
- dtpnl.fadeOut(250, function () {
- _(" .jb-classifier-detail-area, .jb-area-caption").hide();
- _(".jb-classifier-thumb-area").show().fadeIn(200);
- show_thumbnails(imgpos)
- })
- }
- } else {
- show_thumbnails()
- } if (config.enabledirectlinks) {
- window.location.href = window.location.href.split("#")[0] + "#"
- }
- return false
- };
- var set_image_hash_value = function (position) {
- if (!config.enabledirectlinks) {
- return
- }
- window.location.href = window.location.href.split("#")[0] + "#" + (parseInt(position) + 1)
- };
- var set_image_nav = function () {
- var alwaysHide = (!config.showimagenav || config.showimageoverlay.toUpperCase() === "NEVER") ? true : false;
- if (!can_image_move()) {
- _(".jb-classifier-detail-area .jbn-left-button").hide();
- _(".jb-classifier-detail-area .jbn-nav-left-touch-area").addClass("dt-nav-disabled");
- _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-left").css({
- opacity: 0.5
- })
- } else {
- if (!alwaysHide) {
- _(".jb-classifier-detail-area .jbn-left-button").show().css({
- opacity: 1
- })
- }
- _(".jb-classifier-detail-area .jbn-nav-left-touch-area").removeClass("dt-nav-disabled");
- _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-left").css({
- opacity: 1
- })
- } if (!can_image_move(true)) {
- _(" .jb-classifier-detail-area .jbn-right-button").hide();
- _(".jb-classifier-detail-area .jbn-nav-right-touch-area").addClass("dt-nav-disabled");
- _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-right").css({
- opacity: 0.5
- })
- } else {
- if (!alwaysHide) {
- _(" .jb-classifier-detail-area .jbn-right-button").show().css({
- opacity: 1
- })
- }
- _(".jb-classifier-detail-area .jbn-nav-right-touch-area").removeClass("dt-nav-disabled");
- _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-right").css({
- opacity: 1
- })
- }
- };
- var set_gallery_title = function () {
- if (utils.is_large_screen_mode(config)) {
- index_panel.display_gallery_top(false);
- if (config.gallerytitle) {
- var showimageoverlay = config.showimageoverlay.toUpperCase();
- var galleryTitlePosition = config.gallerytitleposition.toUpperCase();
- if (config.textcolor) {
- _(".jb-area-large-mode-title").css({
- color: utils.format_color(config.textcolor)
- })
- }
- if (galleryTitlePosition == "TOP") {
- _(".jb-area-large-mode-title").html(config.gallerytitle).show()
- } else {
- if (showimageoverlay === "NEVER") {
- _(".jb-area-large-mode-title.jb-classifier-show-on-over").html(config.gallerytitle).hide()
- } else {
- if (overlay_visible || showimageoverlay === "ALWAYS") {
- _(".jb-area-large-mode-title.jb-classifier-show-on-over").html(config.gallerytitle).show()
- }
- }
- }
- }
- } else {
- _(".jb-area-large-mode-title").remove();
- index_panel.display_gallery_top(is_index_visible)
- }
- };
- var need_jump_2_page = function (position) {
- if (!utils.is_swipable_device() || !in_the_transitioning) {
- return false
- }
- var cntSize = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- index_panel.show_page_4_image_position(position, cntSize.index_panel_width, cntSize.index_panel_height);
- return true
- };
- var before_show_main_image = function (position) {
- index_panel.set_thumbnail_visited(position);
- if (is_index_visible && (!autoplay_timer || config.autoplaythumbs)) {
- var idxRange = index_panel.get_image_index_range();
- if (position < idxRange.from && position === 0) {
- if (!need_jump_2_page(position)) {
- index_panel.move_to_next_page()
- }
- } else {
- if (position > idxRange.to && position === gallery_manager.length() - 1) {
- if (!need_jump_2_page(position)) {
- index_panel.move_to_prev_page()
- }
- } else {
- if (position > idxRange.to) {
- if (!need_jump_2_page(position)) {
- index_panel.move_to_next_page()
- }
- } else {
- if (position < idxRange.from) {
- if (!need_jump_2_page(position)) {
- index_panel.move_to_prev_page()
- }
- }
- }
- }
- }
- }
- };
- var after_show_main_image = function (position) {
- set_gallery_title();
- set_image_hash_value(position);
- var imgrange = index_panel.get_image_index_range();
- if (imgrange.from > position || imgrange.to < position) {
- show_thumbnails(position)
- }
- apply_show_options();
- set_caption_height_mode();
- adjust_touch_area_height(position);
- set_image_nav();
- set_show_list_button();
- if (utils.is_swipable_device() && overlay_visible) {
- show_hide_nav_controls(overlay_visible)
- }
- if (config_manager.isp && juicebox_instances[instance_id] && typeof (juicebox_instances[instance_id].onImageChange) === "function") {
- var curntImage = detail_panel.get_current_photo();
- var evntObj = {
- id: curntImage.position,
- title: config.gallerytitle,
- caption: curntImage.caption
- };
- juicebox_instances[instance_id].onImageChange(evntObj)
- }
- handle_image_preload();
- if (utils.is_chrome()) {
- _(" *").disableSelection()
- } else {
- _(".jb-dt-main-image-" + position + " img").disableSelection();
- _(".table_page_" + index_panel.get_index() + " img").disableSelection();
- if ($.browser.mozilla) {
- _(".jb-navigation.jb-classifier-detail-area *").disableSelection()
- }
- }
- };
- var is_caption_visible = function () {
- var cappos = config.captionposition.toUpperCase();
- if (cappos === "NONE") {
- return false
- }
- if (cappos === "BELOW_IMAGE" || cappos === "BOTTOM") {
- return true
- }
- set_overlay_visible(overlay_visible);
- return overlay_visible
- };
- var show_main_image = function (position, delay, isfirstimage) {
- in_the_transitioning = false;
- in_navigation = false;
- if (transTimer) {
- window.clearTimeout(transTimer);
- transTimer = 0
- }
- if (!delay && $.browser.msie) {
- window.setTimeout(function () {
- index_panel.set_thumbnail_visited(position)
- }, 100)
- } else {
- index_panel.set_thumbnail_visited(position)
- } if (isfirstimage) {
- detail_panel.populate_photo_html(position, delay, function () {
- after_show_main_image(position)
- }, is_caption_visible());
- return
- }
- if (delay) {
- detail_panel.change_2_photo(false, 0, is_caption_visible(), position)
- } else {
- detail_panel.populate_photo_html(position, 0, null, is_caption_visible());
- after_show_main_image(position)
- }
- };
- var handle_image_preload = function () {
- var range;
- var preldopt = config.imagepreloading.toUpperCase();
- if (preldopt === "NEXT" || preldopt === "NONE") {
- return
- }
- if (preldopt === "ALL") {
- range = {
- from: 0,
- to: gallery_manager.length() - 1
- }
- } else {
- range = index_panel.get_image_index_range()
- } if (flickr_loader) {
- flickr_loader.load_flickr_images_detail(gallery_manager.get_images(), range, update_flickr_image_details)
- }
- if (utils.is_large_screen_mode(config)) {
- detail_panel.preload_images(range.from, range.to + 1)
- }
- };
- var set_toucharea_height = function (position, size) {
- var halfht = size.detail_panel_height / 2 + parseInt(_(".jbn-right-button").height() / 2);
- var clnk = _(".jb-cap-frame.caption_" + position + " a");
- _(".jb-navigation.jb-classifier-detail-area").css({
- top: size.top_panel_height + size.top_panel_top,
- height: size.detail_panel_height - (clnk.length <= 0 ? 0 : (halfht > config.maxcaptionheight ? config.maxcaptionheight : halfht))
- })
- };
- var adjust_touch_area_height = function (position) {
- var size = sizing.get_containers_size_and_position(current_width, current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- set_toucharea_height(position, size)
- };
- var switch_2_main_image = function (position) {
- if (autoplay_timer) {
- toggle_autoplay()
- }
- if (is_index_visible && is_detail_visible) {
- show_main_image(position, 1000 * config.imagetransitiontime);
- return
- }
- is_detail_visible = true;
- is_index_visible = false;
- if (_(".jb-panel-index").is(":visible")) {
- switching_2_thumbnail = false;
- var navpnl = _(".jb-panel-index img");
- if (!navpnl.length) {
- _(".jb-classifier-thumb-area").hide();
- _(".jb-classifier-detail-area, .jb-area-caption").show();
- show_main_image(position)
- } else {
- var transitionTime = 1000 * config.imagetransitiontime;
- navpnl.stop();
- navpnl.fadeOut(transitionTime, function () {});
- window.setTimeout(function () {
- _(".jb-classifier-thumb-area").hide();
- var dtpnl = _(".jb-classifier-detail-area, .jb-area-caption");
- dtpnl.stop();
- _(".jb-area-caption").html("");
- if (utils.is_firefox3()) {
- dtpnl.css({
- opacity: 1,
- display: "none"
- })
- }
- dtpnl.children(".jb-dt-main-frame").remove();
- dtpnl.fadeIn(transitionTime, function () {});
- window.setTimeout(function () {
- show_main_image(position, transitionTime)
- }, 20)
- }, transitionTime > 50 ? transitionTime - 50 : transitionTime)
- }
- } else {
- show_main_image(position)
- }
- };
- var set_show_list_button = function () {
- var slb = _(".jb-bb-btn-de-show-list");
- if (utils.is_large_screen_mode(config)) {
- if (is_index_visible) {
- slb.attr("title", config.languagelist.htlsm)
- } else {
- slb.attr("title", config.languagelist.stlsm)
- }
- } else {
- slb.attr("title", config.languagelist.st);
- if (!is_index_visible) {
- slb.show()
- } else {
- slb.hide();
- if (_(".jb-bb-bar>div:visible").length <= 0) {
- _(".jb-bb-bar").hide()
- }
- } if (is_detail_visible) {
- index_panel.display_gallery_top(false);
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").show()
- } else {
- _(".jb-classifier-link-wrapper.jb-classifier-detail-area").hide()
- }
- }
- };
- var set_caption_height_mode = function () {
- if (config_manager.isp || !is_detail_visible) {
- return
- }
- var isHigh = true;
- if (is_index_visible && config.captionposition.toUpperCase() !== "BOTTOM") {
- isHigh = false
- }
- detail_panel.set_caption_height_mode(isHigh)
- };
- var set_index_nav_button_position = function (cntSize) {
- if (utils.is_large_screen_mode(config)) {
- var thumb_size = index_panel.get_thumblist_size();
- var pd = (cntSize.index_panel_width - thumb_size.width) / 2 - 60;
- _(".index-navigation .jbn-left-button").css("left", pd + "px");
- _(".index-navigation .jbn-right-button").css("right", pd + "px")
- } else {
- if ((utils.is_swipable_device() || config.forcetouchmode)) {
- if (current_height > current_width) {
- _(".index-navigation .jbn-left-button").css("left", "1px");
- _(".index-navigation .jbn-right-button").css("right", "1px")
- } else {
- _(".index-navigation .jbn-left-button").css("left", "-9px");
- _(".index-navigation .jbn-right-button").css("right", "-9px")
- }
- } else {
- _(".index-navigation .jbn-left-button").css("left", "10px");
- _(".index-navigation .jbn-right-button").css("right", "10px")
- }
- }
- };
- var add_view_port_meta_after_switching = true;
- var repaint_timer = 0;
- var get_initial_win_size = function (v1, v2) {
- var hv = Math.max(initial_win_height, initial_win_width);
- var lv = Math.min(initial_win_height, initial_win_width);
- return (v1 > v2) ? hv : lv
- };
- var repaint = function (force, ignoreIndexPnl) {
- if ($("#jb-glry-dlg:visible").length > 0 && _("").parent().attr("id") != "jb-glry-dlg") {
- return
- }
- var _current_width = 0;
- var _current_height = 0;
- var win = $(window);
- var hvalue = win.height();
- var wvalue = win.width();
- if (utils.is_small_android()) {
- if (utils.get_android_ver() < 4) {
- hvalue = screen.height;
- wvalue = screen.width
- } else {
- hvalue = get_initial_win_size(win.height(), win.width())
- }
- }
- var rst = sizing.get_window_height(hvalue, wvalue);
- var adjustHeight = function (htObj) {
- if (htObj.registered) {
- return htObj.height
- }
- if (utils.is_small_android() && utils.get_android_ver() >= 4) {
- if (win.height() > hvalue) {
- return win.height() + (win.height() > win.width() ? (fullScreenPersistor.is_full_screen ? 2 : 0) : 4)
- }
- if (hvalue > win.height()) {
- return win.height() + (win.height() > win.width() ? (fullScreenPersistor.is_full_screen ? 2 : 50) : 4)
- }
- return htObj.height + (fullScreenPersistor.is_full_screen ? 54 : 50)
- }
- return htObj.height + (utils.is_small_android() && utils.get_android_ver() < 4 ? (htObj.height > htObj.width ? 5 : 5) : 0)
- };
- var device_registered = rst.registered;
- if (!add_view_port_meta_after_switching && device_registered) {
- _current_height = win.height()
- } else {
- _current_height = adjustHeight(rst)
- } if (fullScreenPersistor.is_full_screen) {
- _current_width = win.width();
- device_registered = rst.registered
- } else {
- if (force2fill) {
- _("." + theme_cls).height(get_calculated_gallery_height(parseInt(_current_height)))
- }
- _current_width = _("").width();
- if (is_full_screen_mode) {
- device_registered = rst.registered;
- if (device_registered) {
- _current_height = rst.height
- } else {
- _current_height = adjustHeight(rst);
- _current_width = wvalue
- }
- $("body").height(_current_height)
- } else {
- sizing.try_set_body_height(config);
- _current_height = get_gallery_height()
- }
- } if (right_button_offset == null) {
- right_button_offset = _(".jbn-right-button").width() + parseInt(_(".jbn-right-button").css("margin-right"))
- }
- if (force || ((current_width != _current_width || current_height != _current_height))) {
- current_width = _current_width;
- current_height = _current_height;
- if (fullScreenPersistor.is_full_screen) {
- _("").css({
- width: _current_width,
- height: _current_height
- })
- } else {
- if (config.forceheightcalculation) {
- _("").css({
- height: _current_height
- })
- }
- }
- setup_layout(_current_width, _current_height, is_detail_visible);
- var cntSize = sizing.get_containers_size_and_position(_current_width, _current_height, is_index_visible, is_detail_visible, config_manager.isp, need_top_panel(), index_panel.get_thumb_height(), config);
- set_containers_size_and_position(cntSize);
- if (is_detail_visible) {
- var wrappersel = utils.is_swipable_device() ? ":not(.jb-classifier-link-wrapper)" : "";
- var mainselstr = (overlay_visible && utils.is_swipable_device()) ? ".jb-classifier-detail-area" + wrappersel + ", .jb-area-caption" : ".jb-classifier-detail-area" + wrappersel;
- if (utils.is_earlier_ie()) {
- _(mainselstr).fadeIn(100);
- var imgs = _(".jb-panel-detail img");
- imgs.fadeIn(100);
- _(".jb-panel-detail").fadeIn(100)
- } else {
- _(mainselstr).css("opacity", 1).show();
- var imgs = _(".jb-panel-detail img");
- imgs.css("opacity", 1).show();
- _(".jb-panel-detail").css("opacity", 1)
- } if (_(".jb-panel-detail").html()) {
- detail_panel.repaint(cntSize.detail_panel_width, cntSize.detail_panel_height)
- } else {
- show_main_image(detail_panel.get_photo_position())
- }
- } else {
- detail_panel.repaint(cntSize.detail_panel_width, cntSize.detail_panel_height);
- _(".jb-classifier-detail-area, .jb-area-caption, .jb-classifier-link-wrapper.jb-classifier-detail-area").hide()
- } if (is_index_visible && !ignoreIndexPnl) {
- _(".jb-classifier-thumb-area").show();
- _(".jb-panel-index").show();
- var imgpos = detail_panel.get_photo_position();
- index_panel.show_page_4_image_position(imgpos, cntSize.index_panel_width, cntSize.index_panel_height)
- } else {
- _(".jb-panel-index").hide()
- }
- set_nav_btn_position(cntSize);
- set_index_nav_button_position(cntSize);
- set_show_list_button();
- index_panel.set_thumbnail_visited(detail_panel.get_photo_position());
- set_caption_height_mode()
- }
- if (fullScreenPersistor.is_full_screen) {
- if (utils.is_small_android()) {
- hide_android_url_bar()
- } else {
- if (utils.is_chrome() || utils.is_ipad()) {
- if (repaint_timer) {
- window.clearTimeout(repaint_timer);
- repaint_timer = 0
- }
- repaint_timer = window.setTimeout(function () {
- var ofst = _("").offset();
- var bd = $("body");
- bd.css("overflow", "scroll");
- window.scrollTo(ofst.left, ofst.top);
- bd.css("overflow", "hidden")
- }, 100)
- } else {
- if (!$.browser.msie) {
- var offset = _("").offset();
- if (offset) {
- window.scrollTo(offset.left, offset.top)
- }
- }
- }
- }
- } else {
- if (is_full_screen_mode) {
- if (utils.is_iphone()) {
- window.scrollTo(0, 1);
- if (repaint_timer) {
- window.clearTimeout(repaint_timer);
- repaint_timer = 0
- }
- repaint_timer = window.setTimeout(function () {
- window.scrollTo(0, 1)
- }, 1000)
- } else {
- if (utils.is_small_android()) {
- hide_android_url_bar()
- }
- }
- }
- }
- };
- var hide_android_url_bar = function () {
- var win = $(window);
- var rst = sizing.get_window_height(win.height(), win.width());
- if (rst.registered) {
- $("body").css("overflow", "auto").height(rst.height);
- window.scrollTo(0, 1)
- } else {
- $("body").css("overflow", "auto").height(rst.height + 50);
- window.setTimeout(function () {
- window.scrollTo(0, 1);
- window.setTimeout(function () {
- $("body").height(screen.height)
- }, 200)
- }, 200)
- }
- };
- if (config.css != null) {
- document.write("<style id='" + document_id + "_style'>" + config.css.trim().replace(/\}\s/g, "} #" + document_id + " ").replace(/^/, "#" + document_id + " ") + "</style>");
- init()
- } else {
- init()
- }
- var next_page = function (delta_x) {
- if (!can_page_move(true)) {
- return false
- }
- index_panel.move_to_next_page(0, set_index_nav_button);
- handle_image_preload();
- return false
- };
- var previous_page = function (delta_x) {
- if (!can_page_move(false)) {
- return false
- }
- index_panel.move_to_prev_page(0, set_index_nav_button);
- handle_image_preload();
- return false
- };
- var next_image = function (delta_x) {
- if (!can_image_move(true)) {
- return false
- }
- detail_panel.move_2_next_photo(delta_x, overlay_visible);
- return false
- };
- var previous_image = function (delta_x) {
- if (!can_image_move(false)) {
- return false
- }
- detail_panel.move_2_previous_photo(delta_x, overlay_visible);
- return false
- };
- var open_url = function () {
- var curntImage = detail_panel.get_current_photo();
- if (config.useflickr) {
- if (curntImage.imageFullURL) {
- window.open(curntImage.imageFullURL);
- return false
- }
- }
- if (curntImage.linkURL) {
- window.open(curntImage.linkURL)
- } else {
- window.open(curntImage.imageURL)
- }
- return false
- };
- var get_current_gallery_html = function () {
- var glrhtml = _("").html();
- _("").html("").hide();
- return glrhtml
- };
- var scroll_bar_compensition = function () {
- var scroll = utils.is_page_scrolling();
- return {
- h: scroll.v_scrolling ? 21 : 0,
- v: scroll.h_scrolling ? 21 : 0
- }
- };
- var full_screen = function () {
- if (!fullScreenPersistor.is_full_screen) {
- if ($.browser.msie) {
- window.scroll(0, 0)
- }
- var vpc = utils.get_viewport_meta_content();
- if (add_view_port_meta_after_switching) {
- utils.set_viewport_meta(true)
- }
- var param = $.extend({}, config);
- param.containerid = dialog.get_id();
- param.gallerywidth = "100%";
- param.galleryheight = "100%";
- param.fullscreen_displaying_mode = true;
- param.parent_gallery = juicebox_instances[instance_id];
- param.initial_body_css_inline_style = $("body").attr("style");
- param.persistor_param = {};
- param.persistor_param.viewportContent = vpc;
- var win = $(window);
- param.persistor_param.max_side_length = Math.max(win.width(), win.height());
- param.persistor_param.restore_viewport = function (vpv) {
- utils.set_viewport_value(vpv)
- };
- param.persistor_param.current_image_index = detail_panel.get_photo_position();
- param.persistor_param.restore_image = show_main_image;
- param.persistor_param.restore_index = show_thumbnails;
- param.persistor_param.splash_is_set = splash_is_set;
- param.persistor_param.gallery_manager = gallery_manager;
- $("body").css({
- overflow: "hidden"
- });
- if (config.backgroundopacity === 1 || config.backgroundopacity === "1" || (typeof (config.backgroundopacity) === "string" && config.backgroundopacity.indexOf("filter") === 0 && config.backgroundopacity.indexOf("100") > 0)) {
- dialog.show_dialog(true)
- } else {
- param.persistor_param.restore_zindex = function () {
- _("").show();
- _("").focus()
- };
- _("").hide();
- dialog.show_dialog(false)
- }
- new juicebox(param)
- } else {
- var win = $(window);
- if (utils.need_viewport_meta()) {
- if (fullScreenPersistor.parent_gallery_param.viewportContent) {
- utils.set_viewport_meta_content(fullScreenPersistor.parent_gallery_param.viewportContent)
- } else {
- if (utils.is_android() && utils.get_android_ver() >= 4) {
- fullScreenPersistor.parent_gallery_param.restore_viewport(320)
- } else {
- if (utils.is_iphone()) {
- fullScreenPersistor.parent_gallery_param.restore_viewport(0.4)
- } else {
- if (utils.is_ipad()) {} else {
- fullScreenPersistor.parent_gallery_param.restore_viewport(160 * fullScreenPersistor.parent_gallery_param.max_side_length / Math.max(win.width(), win.height()))
- }
- }
- }
- }
- }
- if (!fullScreenPersistor.parent_gallery_param.splash_is_set()) {
- var curntImgIdx = detail_panel.get_photo_position();
- if (is_detail_visible) {
- fullScreenPersistor.parent_gallery_param.restore_image(curntImgIdx)
- }
- if (is_index_visible) {
- fullScreenPersistor.parent_gallery_param.restore_index(curntImgIdx)
- }
- }
- $("body").attr("style", fullScreenPersistor.initial_body_css_inline_style);
- if (fullScreenPersistor.parent_gallery_param.restore_zindex) {
- fullScreenPersistor.parent_gallery_param.restore_zindex()
- }
- dialog.cleanup_dialog();
- if (!splash_is_set()) {
- fullScreenPersistor.parent_gallery.restore()
- }
- }
- return false
- };
- var debug_info = function () {
- var win = $(window);
- _(".jb-navigation").html("timestamp = " + ((new Date()).valueOf() + "").substring(9) + "<br/>crnt_img_idx = " + detail_panel.get_photo_position() + "<br/>isfullscreen = " + is_full_screen_mode + "<br/>fscrnPrst.isFullscreen = " + fullScreenPersistor.fullscreen_displaying_mode + "<br/>scrn.h = " + screen.height + "<br/>win.h = " + $(window).height() + "<br/>doc.h = " + $(document).height() + "<br/>bd.h = " + $("body").height() + "<br/>scrn.w = " + screen.width + "<br/>win.w = " + $(window).width() + "<br/>doc.w = " + $(document).width() + "<br/>bd.w = " + $("body").width() + "<br/>current_height = " + current_height + "<br/>jb-classifier-thumb-area.h = " + $(".jb-idx-show-area").height() + "<br/>table.h = " + $(".jb-idx-show-area>table").height() + "<br/>glry.h = " + _("").height()).css({
- color: "white",
- "font-size": "20px"
- })
- };
- var debug_info2 = function (v1, v2, v3) {
- var win = $(window);
- _(".jb-navigation").html("timestamp = " + ((new Date()).valueOf() + "").substring(9) + "<br/>v1 = " + v1 + "<br/>v2 = " + v2 + "<br/>v3 = " + v3).css({
- color: "white",
- "font-size": "20px"
- })
- };
- var debug_message = function (msg) {
- _(".jb-navigation").html(msg).css({
- color: "white",
- "font-size": "20px"
- })
- };
- var basicMethods = {
- debug: function (script) {
- eval(script)
- },
- restore: function () {
- if (splash_is_set()) {
- return
- }
- repaint(true)
- }
- };
- var proMethods = config_manager.isp ? {
- showGallery: function (show) {
- show ? _("").show() : _("").hide()
- },
- setGallerySize: function (width, height) {
- if (fullScreenPersistor.is_full_screen) {
- return
- }
- var container = $("#" + config.containerid);
- if (container.length <= 0) {
- return
- }
- var w = parseInt(width) + "px";
- var h = parseInt(height) + "px";
- is_full_screen_mode = false;
- config.gallerywidth = w;
- config.galleryheight = h;
- container.css({
- height: h,
- width: w
- });
- _("").height(h);
- repaint(true)
- },
- showImage: function (index) {
- var glrylen = gallery_manager.length();
- if (index < 0 || index >= glrylen) {
- return
- }
- show_main_image(index)
- },
- showNextImage: next_image,
- showPreviousImage: previous_image,
- showIndexByImage: show_thumbnails,
- toggleAutoPlay: toggle_autoplay,
- toggleThumbs: index_button_clicked,
- toggleAudio: toggle_audio_play,
- toggleExpand: full_screen,
- openImageLink: open_url,
- showThumbPage: function (index) {
- index_panel.show_page_by_page_index(index)
- },
- getImageInfo: function (index) {
- var glrylen = gallery_manager.length();
- if (index < 0 || index >= glrylen) {
- return null
- }
- var img = gallery_manager.get_image(index);
- return {
- id: img.position,
- imageURL: img.imageURL,
- thumbURL: img.thumbURL,
- caption: img.caption,
- title: img.title,
- linkURL: img.linkURL,
- linkTarget: img.linkTarget
- }
- },
- getImageCount: function () {
- return gallery_manager.length()
- },
- getThumbPageIndex: function () {
- return index_panel.get_index()
- },
- getImageIndex: function () {
- return detail_panel.get_current_photo().position
- }
- } : {};
- juicebox_instances[instance_id] = $.extend(basicMethods, proMethods);
- return juicebox_instances[instance_id]
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement