Advertisement
developerjustin

Untitled

Jun 9th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Juicebox Pro 1.0.2
  3.  *
  4.  * Copyright (c) 2012 Juicebox. All rights reserved.
  5.  * http://www.juicebox.net
  6.  *
  7.  * BY USING THIS SOFTWARE, YOU AGREE TO THE JUICEBOX TERMS OF USE
  8.  * http://www.juicebox.net/terms
  9.  *
  10.  * Support and Documentation: http://www.juicebox.net/support
  11.  *
  12.  * Build Time: 05/10/2012 09:28:11 AM
  13.  */
  14. var juicebox_lib = juicebox_lib ? juicebox_lib : {};
  15. (function (aq, ap) {
  16.     var an = aq.document,
  17.         bN = aq.navigator,
  18.         bE = aq.location;
  19.     var al = (function () {
  20.         var bT = function (b4, b3) {
  21.                 return new bT.fn.init(b4, b3, E)
  22.             },
  23.             bX = aq.jQuery,
  24.             H = aq.$,
  25.             E, b1 = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
  26.             bO = /\S/,
  27.             J = /^\s+/,
  28.             F = /\s+$/,
  29.             I = /\d/,
  30.             B = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
  31.             bP = /^[\],:{}\s]*$/,
  32.             bZ = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
  33.             bR = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  34.             K = /(?:^|:|,)(?:\s*\[)+/g,
  35.             z = /(webkit)[ \/]([\w.]+)/,
  36.             bU = /(opera)(?:.*version)?[ \/]([\w.]+)/,
  37.             bS = /(msie) ([\w.]+)/,
  38.             bV = /(mozilla)(?:.*? rv:([\w.]+))?/,
  39.             C = /-([a-z]|[0-9])/ig,
  40.             b2 = /^-ms-/,
  41.             bW = function (b4, b3) {
  42.                 return (b3 + "").toUpperCase()
  43.             },
  44.             b0 = bN.userAgent,
  45.             bY, D, e, M = Object.prototype.toString,
  46.             G = Object.prototype.hasOwnProperty,
  47.             A = Array.prototype.push,
  48.             L = Array.prototype.slice,
  49.             bQ = String.prototype.trim,
  50.             w = Array.prototype.indexOf,
  51.             y = {};
  52.         bT.fn = bT.prototype = {
  53.             constructor: bT,
  54.             init: function (b4, b3, b9) {
  55.                 var b8, b6, b5, b7;
  56.                 if (!b4) {
  57.                     return this
  58.                 }
  59.                 if (b4.nodeType) {
  60.                     this.context = this[0] = b4;
  61.                     this.length = 1;
  62.                     return this
  63.                 }
  64.                 if (b4 === "body" && !b3 && an.body) {
  65.                     this.context = an;
  66.                     this[0] = an.body;
  67.                     this.selector = b4;
  68.                     this.length = 1;
  69.                     return this
  70.                 }
  71.                 if (typeof b4 === "string") {
  72.                     if (b4.charAt(0) === "<" && b4.charAt(b4.length - 1) === ">" && b4.length >= 3) {
  73.                         b8 = [null, b4, null]
  74.                     } else {
  75.                         b8 = b1.exec(b4)
  76.                     } if (b8 && (b8[1] || !b3)) {
  77.                         if (b8[1]) {
  78.                             b3 = b3 instanceof bT ? b3[0] : b3;
  79.                             b7 = (b3 ? b3.ownerDocument || b3 : an);
  80.                             b5 = B.exec(b4);
  81.                             if (b5) {
  82.                                 if (bT.isPlainObject(b3)) {
  83.                                     b4 = [an.createElement(b5[1])];
  84.                                     bT.fn.attr.call(b4, b3, true)
  85.                                 } else {
  86.                                     b4 = [b7.createElement(b5[1])]
  87.                                 }
  88.                             } else {
  89.                                 b5 = bT.buildFragment([b8[1]], [b7]);
  90.                                 b4 = (b5.cacheable ? bT.clone(b5.fragment) : b5.fragment).childNodes
  91.                             }
  92.                             return bT.merge(this, b4)
  93.                         } else {
  94.                             b6 = an.getElementById(b8[2]);
  95.                             if (b6 && b6.parentNode) {
  96.                                 if (b6.id !== b8[2]) {
  97.                                     return b9.find(b4)
  98.                                 }
  99.                                 this.length = 1;
  100.                                 this[0] = b6
  101.                             }
  102.                             this.context = an;
  103.                             this.selector = b4;
  104.                             return this
  105.                         }
  106.                     } else {
  107.                         if (!b3 || b3.jquery) {
  108.                             return (b3 || b9).find(b4)
  109.                         } else {
  110.                             return this.constructor(b3).find(b4)
  111.                         }
  112.                     }
  113.                 } else {
  114.                     if (bT.isFunction(b4)) {
  115.                         return b9.ready(b4)
  116.                     }
  117.                 } if (b4.selector !== ap) {
  118.                     this.selector = b4.selector;
  119.                     this.context = b4.context
  120.                 }
  121.                 return bT.makeArray(b4, this)
  122.             },
  123.             selector: "",
  124.             jquery: "1.7",
  125.             length: 0,
  126.             size: function () {
  127.                 return this.length
  128.             },
  129.             toArray: function () {
  130.                 return L.call(this, 0)
  131.             },
  132.             get: function (b3) {
  133.                 return b3 == null ? this.toArray() : (b3 < 0 ? this[this.length + b3] : this[b3])
  134.             },
  135.             pushStack: function (b4, b3, b6) {
  136.                 var b5 = this.constructor();
  137.                 if (bT.isArray(b4)) {
  138.                     A.apply(b5, b4)
  139.                 } else {
  140.                     bT.merge(b5, b4)
  141.                 }
  142.                 b5.prevObject = this;
  143.                 b5.context = this.context;
  144.                 if (b3 === "find") {
  145.                     b5.selector = this.selector + (this.selector ? " " : "") + b6
  146.                 } else {
  147.                     if (b3) {
  148.                         b5.selector = this.selector + "." + b3 + "(" + b6 + ")"
  149.                     }
  150.                 }
  151.                 return b5
  152.             },
  153.             each: function (b4, b3) {
  154.                 return bT.each(this, b4, b3)
  155.             },
  156.             ready: function (b3) {
  157.                 bT.bindReady();
  158.                 D.add(b3);
  159.                 return this
  160.             },
  161.             eq: function (b3) {
  162.                 return b3 === -1 ? this.slice(b3) : this.slice(b3, +b3 + 1)
  163.             },
  164.             first: function () {
  165.                 return this.eq(0)
  166.             },
  167.             last: function () {
  168.                 return this.eq(-1)
  169.             },
  170.             slice: function () {
  171.                 return this.pushStack(L.apply(this, arguments), "slice", L.call(arguments).join(","))
  172.             },
  173.             map: function (b3) {
  174.                 return this.pushStack(bT.map(this, function (b4, b5) {
  175.                     return b3.call(b4, b5, b4)
  176.                 }))
  177.             },
  178.             end: function () {
  179.                 return this.prevObject || this.constructor(null)
  180.             },
  181.             push: A,
  182.             sort: [].sort,
  183.             splice: [].splice
  184.         };
  185.         bT.fn.init.prototype = bT.fn;
  186.         bT.extend = bT.fn.extend = function () {
  187.             var cb, b5, b3, b4, b9, ca, b8 = arguments[0] || {},
  188.                 b7 = 1,
  189.                 b6 = arguments.length,
  190.                 cc = false;
  191.             if (typeof b8 === "boolean") {
  192.                 cc = b8;
  193.                 b8 = arguments[1] || {};
  194.                 b7 = 2
  195.             }
  196.             if (typeof b8 !== "object" && !bT.isFunction(b8)) {
  197.                 b8 = {}
  198.             }
  199.             if (b6 === b7) {
  200.                 b8 = this;
  201.                 --b7
  202.             }
  203.             for (; b7 < b6; b7++) {
  204.                 if ((cb = arguments[b7]) != null) {
  205.                     for (b5 in cb) {
  206.                         b3 = b8[b5];
  207.                         b4 = cb[b5];
  208.                         if (b8 === b4) {
  209.                             continue
  210.                         }
  211.                         if (cc && b4 && (bT.isPlainObject(b4) || (b9 = bT.isArray(b4)))) {
  212.                             if (b9) {
  213.                                 b9 = false;
  214.                                 ca = b3 && bT.isArray(b3) ? b3 : []
  215.                             } else {
  216.                                 ca = b3 && bT.isPlainObject(b3) ? b3 : {}
  217.                             }
  218.                             b8[b5] = bT.extend(cc, ca, b4)
  219.                         } else {
  220.                             if (b4 !== ap) {
  221.                                 b8[b5] = b4
  222.                             }
  223.                         }
  224.                     }
  225.                 }
  226.             }
  227.             return b8
  228.         };
  229.         bT.extend({
  230.             noConflict: function (b3) {
  231.                 if (aq.$ === bT) {
  232.                     aq.$ = H
  233.                 }
  234.                 if (b3 && aq.jQuery === bT) {
  235.                     aq.jQuery = bX
  236.                 }
  237.                 return bT
  238.             },
  239.             isReady: false,
  240.             readyWait: 1,
  241.             holdReady: function (b3) {
  242.                 if (b3) {
  243.                     bT.readyWait++
  244.                 } else {
  245.                     bT.ready(true)
  246.                 }
  247.             },
  248.             ready: function (b3) {
  249.                 if ((b3 === true && !--bT.readyWait) || (b3 !== true && !bT.isReady)) {
  250.                     if (!an.body) {
  251.                         return setTimeout(bT.ready, 1)
  252.                     }
  253.                     bT.isReady = true;
  254.                     if (b3 !== true && --bT.readyWait > 0) {
  255.                         return
  256.                     }
  257.                     D.fireWith(an, [bT]);
  258.                     if (bT.fn.trigger) {
  259.                         bT(an).trigger("ready").unbind("ready")
  260.                     }
  261.                 }
  262.             },
  263.             bindReady: function () {
  264.                 if (D) {
  265.                     return
  266.                 }
  267.                 D = bT.Callbacks("once memory");
  268.                 if (an.readyState === "complete") {
  269.                     return setTimeout(bT.ready, 1)
  270.                 }
  271.                 if (an.addEventListener) {
  272.                     an.addEventListener("DOMContentLoaded", e, false);
  273.                     aq.addEventListener("load", bT.ready, false)
  274.                 } else {
  275.                     if (an.attachEvent) {
  276.                         an.attachEvent("onreadystatechange", e);
  277.                         aq.attachEvent("onload", bT.ready);
  278.                         var b3 = false;
  279.                         try {
  280.                             b3 = aq.frameElement == null
  281.                         } catch (b4) {}
  282.                         if (an.documentElement.doScroll && b3) {
  283.                             x()
  284.                         }
  285.                     }
  286.                 }
  287.             },
  288.             isFunction: function (b3) {
  289.                 return bT.type(b3) === "function"
  290.             },
  291.             isArray: Array.isArray || function (b3) {
  292.                 return bT.type(b3) === "array"
  293.             },
  294.             isWindow: function (b3) {
  295.                 return b3 && typeof b3 === "object" && "setInterval" in b3
  296.             },
  297.             isNumeric: function (b3) {
  298.                 return b3 != null && I.test(b3) && !isNaN(b3)
  299.             },
  300.             type: function (b3) {
  301.                 return b3 == null ? String(b3) : y[M.call(b3)] || "object"
  302.             },
  303.             isPlainObject: function (b4) {
  304.                 if (!b4 || bT.type(b4) !== "object" || b4.nodeType || bT.isWindow(b4)) {
  305.                     return false
  306.                 }
  307.                 try {
  308.                     if (b4.constructor && !G.call(b4, "constructor") && !G.call(b4.constructor.prototype, "isPrototypeOf")) {
  309.                         return false
  310.                     }
  311.                 } catch (b5) {
  312.                     return false
  313.                 }
  314.                 var b3;
  315.                 for (b3 in b4) {}
  316.                 return b3 === ap || G.call(b4, b3)
  317.             },
  318.             isEmptyObject: function (b4) {
  319.                 for (var b3 in b4) {
  320.                     return false
  321.                 }
  322.                 return true
  323.             },
  324.             error: function (b3) {
  325.                 throw b3
  326.             },
  327.             parseJSON: function (b3) {
  328.                 if (typeof b3 !== "string" || !b3) {
  329.                     return null
  330.                 }
  331.                 b3 = bT.trim(b3);
  332.                 if (aq.JSON && aq.JSON.parse) {
  333.                     return aq.JSON.parse(b3)
  334.                 }
  335.                 if (bP.test(b3.replace(bZ, "@").replace(bR, "]").replace(K, ""))) {
  336.                     return (new Function("return " + b3))()
  337.                 }
  338.                 bT.error("Invalid JSON: " + b3)
  339.             },
  340.             parseXML: function (b4) {
  341.                 var b3, b5;
  342.                 try {
  343.                     if (aq.DOMParser) {
  344.                         b5 = new DOMParser();
  345.                         b3 = b5.parseFromString(b4, "text/xml")
  346.                     } else {
  347.                         b3 = new ActiveXObject("Microsoft.XMLDOM");
  348.                         b3.async = "false";
  349.                         b3.loadXML(b4)
  350.                     }
  351.                 } catch (b6) {
  352.                     b3 = ap
  353.                 }
  354.                 if (!b3 || !b3.documentElement || b3.getElementsByTagName("parsererror").length) {
  355.                     bT.error("Invalid XML: " + b4)
  356.                 }
  357.                 return b3
  358.             },
  359.             noop: function () {},
  360.             globalEval: function (b3) {
  361.                 if (b3 && bO.test(b3)) {
  362.                     (aq.execScript || function (b4) {
  363.                         aq["eval"].call(aq, b4)
  364.                     })(b3)
  365.                 }
  366.             },
  367.             camelCase: function (b3) {
  368.                 return b3.replace(b2, "ms-").replace(C, bW)
  369.             },
  370.             nodeName: function (b4, b3) {
  371.                 return b4.nodeName && b4.nodeName.toUpperCase() === b3.toUpperCase()
  372.             },
  373.             each: function (b4, b3, b9) {
  374.                 var b8, b6 = 0,
  375.                     b7 = b4.length,
  376.                     b5 = b7 === ap || bT.isFunction(b4);
  377.                 if (b9) {
  378.                     if (b5) {
  379.                         for (b8 in b4) {
  380.                             if (b3.apply(b4[b8], b9) === false) {
  381.                                 break
  382.                             }
  383.                         }
  384.                     } else {
  385.                         for (; b6 < b7;) {
  386.                             if (b3.apply(b4[b6++], b9) === false) {
  387.                                 break
  388.                             }
  389.                         }
  390.                     }
  391.                 } else {
  392.                     if (b5) {
  393.                         for (b8 in b4) {
  394.                             if (b3.call(b4[b8], b8, b4[b8]) === false) {
  395.                                 break
  396.                             }
  397.                         }
  398.                     } else {
  399.                         for (; b6 < b7;) {
  400.                             if (b3.call(b4[b6], b6, b4[b6++]) === false) {
  401.                                 break
  402.                             }
  403.                         }
  404.                     }
  405.                 }
  406.                 return b4
  407.             },
  408.             trim: bQ ? function (b3) {
  409.                 return b3 == null ? "" : bQ.call(b3)
  410.             } : function (b3) {
  411.                 return b3 == null ? "" : b3.toString().replace(J, "").replace(F, "")
  412.             },
  413.             makeArray: function (b4, b3) {
  414.                 var b6 = b3 || [];
  415.                 if (b4 != null) {
  416.                     var b5 = bT.type(b4);
  417.                     if (b4.length == null || b5 === "string" || b5 === "function" || b5 === "regexp" || bT.isWindow(b4)) {
  418.                         A.call(b6, b4)
  419.                     } else {
  420.                         bT.merge(b6, b4)
  421.                     }
  422.                 }
  423.                 return b6
  424.             },
  425.             inArray: function (b4, b3, b5) {
  426.                 var b6;
  427.                 if (b3) {
  428.                     if (w) {
  429.                         return w.call(b3, b4, b5)
  430.                     }
  431.                     b6 = b3.length;
  432.                     b5 = b5 ? b5 < 0 ? Math.max(0, b6 + b5) : b5 : 0;
  433.                     for (; b5 < b6; b5++) {
  434.                         if (b5 in b3 && b3[b5] === b4) {
  435.                             return b5
  436.                         }
  437.                     }
  438.                 }
  439.                 return -1
  440.             },
  441.             merge: function (b5, b3) {
  442.                 var b7 = b5.length,
  443.                     b6 = 0;
  444.                 if (typeof b3.length === "number") {
  445.                     for (var b4 = b3.length; b6 < b4; b6++) {
  446.                         b5[b7++] = b3[b6]
  447.                     }
  448.                 } else {
  449.                     while (b3[b6] !== ap) {
  450.                         b5[b7++] = b3[b6++]
  451.                     }
  452.                 }
  453.                 b5.length = b7;
  454.                 return b5
  455.             },
  456.             grep: function (b4, b3, b9) {
  457.                 var b8 = [],
  458.                     b7;
  459.                 b9 = !!b9;
  460.                 for (var b5 = 0, b6 = b4.length; b5 < b6; b5++) {
  461.                     b7 = !!b3(b4[b5], b5);
  462.                     if (b9 !== b7) {
  463.                         b8.push(b4[b5])
  464.                     }
  465.                 }
  466.                 return b8
  467.             },
  468.             map: function (ca, b9, b8) {
  469.                 var b7, cb, b6 = [],
  470.                     b4 = 0,
  471.                     b3 = ca.length,
  472.                     b5 = ca instanceof bT || b3 !== ap && typeof b3 === "number" && ((b3 > 0 && ca[0] && ca[b3 - 1]) || b3 === 0 || bT.isArray(ca));
  473.                 if (b5) {
  474.                     for (; b4 < b3; b4++) {
  475.                         b7 = b9(ca[b4], b4, b8);
  476.                         if (b7 != null) {
  477.                             b6[b6.length] = b7
  478.                         }
  479.                     }
  480.                 } else {
  481.                     for (cb in ca) {
  482.                         b7 = b9(ca[cb], cb, b8);
  483.                         if (b7 != null) {
  484.                             b6[b6.length] = b7
  485.                         }
  486.                     }
  487.                 }
  488.                 return b6.concat.apply([], b6)
  489.             },
  490.             guid: 1,
  491.             proxy: function (b4, b3) {
  492.                 if (typeof b3 === "string") {
  493.                     var b7 = b4[b3];
  494.                     b3 = b4;
  495.                     b4 = b7
  496.                 }
  497.                 if (!bT.isFunction(b4)) {
  498.                     return ap
  499.                 }
  500.                 var b6 = L.call(arguments, 2),
  501.                     b5 = function () {
  502.                         return b4.apply(b3, b6.concat(L.call(arguments)))
  503.                     };
  504.                 b5.guid = b4.guid = b4.guid || b5.guid || bT.guid++;
  505.                 return b5
  506.             },
  507.             access: function (cb, ca, b9, b8, b7, b6) {
  508.                 var b5 = cb.length;
  509.                 if (typeof ca === "object") {
  510.                     for (var b3 in ca) {
  511.                         bT.access(cb, b3, ca[b3], b8, b7, b9)
  512.                     }
  513.                     return cb
  514.                 }
  515.                 if (b9 !== ap) {
  516.                     b8 = !b6 && b8 && bT.isFunction(b9);
  517.                     for (var b4 = 0; b4 < b5; b4++) {
  518.                         b7(cb[b4], ca, b8 ? b9.call(cb[b4], b4, b7(cb[b4], ca)) : b9, b6)
  519.                     }
  520.                     return cb
  521.                 }
  522.                 return b5 ? b7(cb[0], ca) : ap
  523.             },
  524.             now: function () {
  525.                 return (new Date()).getTime()
  526.             },
  527.             uaMatch: function (b4) {
  528.                 b4 = b4.toLowerCase();
  529.                 var b3 = z.exec(b4) || bU.exec(b4) || bS.exec(b4) || b4.indexOf("compatible") < 0 && bV.exec(b4) || [];
  530.                 return {
  531.                     browser: b3[1] || "",
  532.                     version: b3[2] || "0"
  533.                 }
  534.             },
  535.             sub: function () {
  536.                 function b3(b7, b6) {
  537.                     return new b3.fn.init(b7, b6)
  538.                 }
  539.                 bT.extend(true, b3, this);
  540.                 b3.superclass = this;
  541.                 b3.fn = b3.prototype = this();
  542.                 b3.fn.constructor = b3;
  543.                 b3.sub = this.sub;
  544.                 b3.fn.init = function b4(b7, b6) {
  545.                     if (b6 && b6 instanceof bT && !(b6 instanceof b3)) {
  546.                         b6 = b3(b6)
  547.                     }
  548.                     return bT.fn.init.call(this, b7, b6, b5)
  549.                 };
  550.                 b3.fn.init.prototype = b3.fn;
  551.                 var b5 = b3(an);
  552.                 return b3
  553.             },
  554.             browser: {}
  555.         });
  556.         bT.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (b4, b3) {
  557.             y["[object " + b3 + "]"] = b3.toLowerCase()
  558.         });
  559.         bY = bT.uaMatch(b0);
  560.         if (bY.browser) {
  561.             bT.browser[bY.browser] = true;
  562.             bT.browser.version = bY.version
  563.         }
  564.         if (bT.browser.webkit) {
  565.             bT.browser.safari = true
  566.         }
  567.         if (bO.test("\xA0")) {
  568.             J = /^[\s\xA0]+/;
  569.             F = /[\s\xA0]+$/
  570.         }
  571.         E = bT(an);
  572.         if (an.addEventListener) {
  573.             e = function () {
  574.                 an.removeEventListener("DOMContentLoaded", e, false);
  575.                 bT.ready()
  576.             }
  577.         } else {
  578.             if (an.attachEvent) {
  579.                 e = function () {
  580.                     if (an.readyState === "complete") {
  581.                         an.detachEvent("onreadystatechange", e);
  582.                         bT.ready()
  583.                     }
  584.                 }
  585.             }
  586.         }
  587.  
  588.         function x() {
  589.             if (bT.isReady) {
  590.                 return
  591.             }
  592.             try {
  593.                 an.documentElement.doScroll("left")
  594.             } catch (b3) {
  595.                 setTimeout(x, 1);
  596.                 return
  597.             }
  598.             bT.ready()
  599.         }
  600.         if (typeof define === "function" && define.amd && define.amd.jQuery) {
  601.             define("jquery", [], function () {
  602.                 return bT
  603.             })
  604.         }
  605.         return bT
  606.     })();
  607.     var bc = {};
  608.  
  609.     function ai(w) {
  610.         var e = bc[w] = {},
  611.             x, y;
  612.         w = w.split(/\s+/);
  613.         for (x = 0, y = w.length; x < y; x++) {
  614.             e[w[x]] = true
  615.         }
  616.         return e
  617.     }
  618.     al.Callbacks = function (C) {
  619.         C = C ? (bc[C] || ai(C)) : {};
  620.         var B = [],
  621.             D = [],
  622.             x, y, w, z, A, F = function (G) {
  623.                 var H, K, J, I, L;
  624.                 for (H = 0, K = G.length; H < K; H++) {
  625.                     J = G[H];
  626.                     I = al.type(J);
  627.                     if (I === "array") {
  628.                         F(J)
  629.                     } else {
  630.                         if (I === "function") {
  631.                             if (!C.unique || !E.has(J)) {
  632.                                 B.push(J)
  633.                             }
  634.                         }
  635.                     }
  636.                 }
  637.             },
  638.             e = function (H, G) {
  639.                 G = G || [];
  640.                 x = !C.memory || [H, G];
  641.                 y = true;
  642.                 A = w || 0;
  643.                 w = 0;
  644.                 z = B.length;
  645.                 for (; B && A < z; A++) {
  646.                     if (B[A].apply(H, G) === false && C.stopOnFalse) {
  647.                         x = true;
  648.                         break
  649.                     }
  650.                 }
  651.                 y = false;
  652.                 if (B) {
  653.                     if (!C.once) {
  654.                         if (D && D.length) {
  655.                             x = D.shift();
  656.                             E.fireWith(x[0], x[1])
  657.                         }
  658.                     } else {
  659.                         if (x === true) {
  660.                             E.disable()
  661.                         } else {
  662.                             B = []
  663.                         }
  664.                     }
  665.                 }
  666.             },
  667.             E = {
  668.                 add: function () {
  669.                     if (B) {
  670.                         var G = B.length;
  671.                         F(arguments);
  672.                         if (y) {
  673.                             z = B.length
  674.                         } else {
  675.                             if (x && x !== true) {
  676.                                 w = G;
  677.                                 e(x[0], x[1])
  678.                             }
  679.                         }
  680.                     }
  681.                     return this
  682.                 },
  683.                 remove: function () {
  684.                     if (B) {
  685.                         var G = arguments,
  686.                             I = 0,
  687.                             J = G.length;
  688.                         for (; I < J; I++) {
  689.                             for (var H = 0; H < B.length; H++) {
  690.                                 if (G[I] === B[H]) {
  691.                                     if (y) {
  692.                                         if (H <= z) {
  693.                                             z--;
  694.                                             if (H <= A) {
  695.                                                 A--
  696.                                             }
  697.                                         }
  698.                                     }
  699.                                     B.splice(H--, 1);
  700.                                     if (C.unique) {
  701.                                         break
  702.                                     }
  703.                                 }
  704.                             }
  705.                         }
  706.                     }
  707.                     return this
  708.                 },
  709.                 has: function (G) {
  710.                     if (B) {
  711.                         var H = 0,
  712.                             I = B.length;
  713.                         for (; H < I; H++) {
  714.                             if (G === B[H]) {
  715.                                 return true
  716.                             }
  717.                         }
  718.                     }
  719.                     return false
  720.                 },
  721.                 empty: function () {
  722.                     B = [];
  723.                     return this
  724.                 },
  725.                 disable: function () {
  726.                     B = D = x = ap;
  727.                     return this
  728.                 },
  729.                 disabled: function () {
  730.                     return !B
  731.                 },
  732.                 lock: function () {
  733.                     D = ap;
  734.                     if (!x || x === true) {
  735.                         E.disable()
  736.                     }
  737.                     return this
  738.                 },
  739.                 locked: function () {
  740.                     return !D
  741.                 },
  742.                 fireWith: function (H, G) {
  743.                     if (D) {
  744.                         if (y) {
  745.                             if (!C.once) {
  746.                                 D.push([H, G])
  747.                             }
  748.                         } else {
  749.                             if (!(C.once && x)) {
  750.                                 e(H, G)
  751.                             }
  752.                         }
  753.                     }
  754.                     return this
  755.                 },
  756.                 fire: function () {
  757.                     E.fireWith(this, arguments);
  758.                     return this
  759.                 },
  760.                 fired: function () {
  761.                     return !!x
  762.                 }
  763.             };
  764.         return E
  765.     };
  766.     var bb = [].slice;
  767.     al.extend({
  768.         Deferred: function (z) {
  769.             var y = al.Callbacks("once memory"),
  770.                 x = al.Callbacks("once memory"),
  771.                 w = al.Callbacks("memory"),
  772.                 e = "pending",
  773.                 B = {
  774.                     resolve: y,
  775.                     reject: x,
  776.                     notify: w
  777.                 },
  778.                 D = {
  779.                     done: y.add,
  780.                     fail: x.add,
  781.                     progress: w.add,
  782.                     state: function () {
  783.                         return e
  784.                     },
  785.                     isResolved: y.fired,
  786.                     isRejected: x.fired,
  787.                     then: function (F, E, G) {
  788.                         C.done(F).fail(E).progress(G);
  789.                         return this
  790.                     },
  791.                     always: function () {
  792.                         return C.done.apply(C, arguments).fail.apply(C, arguments)
  793.                     },
  794.                     pipe: function (G, F, E) {
  795.                         return al.Deferred(function (H) {
  796.                             al.each({
  797.                                 done: [G, "resolve"],
  798.                                 fail: [F, "reject"],
  799.                                 progress: [E, "notify"]
  800.                             }, function (J, I) {
  801.                                 var M = I[0],
  802.                                     L = I[1],
  803.                                     K;
  804.                                 if (al.isFunction(M)) {
  805.                                     C[J](function () {
  806.                                         K = M.apply(this, arguments);
  807.                                         if (K && al.isFunction(K.promise)) {
  808.                                             K.promise().then(H.resolve, H.reject, H.notify)
  809.                                         } else {
  810.                                             H[L + "With"](this === C ? H : this, [K])
  811.                                         }
  812.                                     })
  813.                                 } else {
  814.                                     C[J](H[L])
  815.                                 }
  816.                             })
  817.                         }).promise()
  818.                     },
  819.                     promise: function (F) {
  820.                         if (F == null) {
  821.                             F = D
  822.                         } else {
  823.                             for (var E in D) {
  824.                                 F[E] = D[E]
  825.                             }
  826.                         }
  827.                         return F
  828.                     }
  829.                 },
  830.                 C = D.promise({}),
  831.                 A;
  832.             for (A in B) {
  833.                 C[A] = B[A].fire;
  834.                 C[A + "With"] = B[A].fireWith
  835.             }
  836.             C.done(function () {
  837.                 e = "resolved"
  838.             }, x.disable, w.lock).fail(function () {
  839.                 e = "rejected"
  840.             }, y.disable, w.lock);
  841.             if (z) {
  842.                 z.call(C, C)
  843.             }
  844.             return C
  845.         },
  846.         when: function (B) {
  847.             var y = bb.call(arguments, 0),
  848.                 w = 0,
  849.                 e = y.length,
  850.                 C = new Array(e),
  851.                 x = e,
  852.                 z = e,
  853.                 D = e <= 1 && B && al.isFunction(B.promise) ? B : al.Deferred(),
  854.                 F = D.promise();
  855.  
  856.             function E(G) {
  857.                 return function (H) {
  858.                     y[G] = arguments.length > 1 ? bb.call(arguments, 0) : H;
  859.                     if (!(--x)) {
  860.                         D.resolveWith(D, y)
  861.                     }
  862.                 }
  863.             }
  864.  
  865.             function A(G) {
  866.                 return function (H) {
  867.                     C[G] = arguments.length > 1 ? bb.call(arguments, 0) : H;
  868.                     D.notifyWith(F, C)
  869.                 }
  870.             }
  871.             if (e > 1) {
  872.                 for (; w < e; w++) {
  873.                     if (y[w] && y[w].promise && al.isFunction(y[w].promise)) {
  874.                         y[w].promise().then(E(w), D.reject, A(w))
  875.                     } else {
  876.                         --x
  877.                     }
  878.                 }
  879.                 if (!x) {
  880.                     D.resolveWith(D, y)
  881.                 }
  882.             } else {
  883.                 if (D !== B) {
  884.                     D.resolveWith(D, e ? [B] : [])
  885.                 }
  886.             }
  887.             return F
  888.         }
  889.     });
  890.     al.support = (function () {
  891.         var M = an.createElement("div"),
  892.             bO = an.documentElement,
  893.             z, bP, G, x, F, A, D, w, E, H, C, L, J, y, B, I, bQ;
  894.         M.setAttribute("className", "t");
  895.         M.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";
  896.         z = M.getElementsByTagName("*");
  897.         bP = M.getElementsByTagName("a")[0];
  898.         if (!z || !z.length || !bP) {
  899.             return {}
  900.         }
  901.         G = an.createElement("select");
  902.         x = G.appendChild(an.createElement("option"));
  903.         F = M.getElementsByTagName("input")[0];
  904.         D = {
  905.             leadingWhitespace: (M.firstChild.nodeType === 3),
  906.             tbody: !M.getElementsByTagName("tbody").length,
  907.             htmlSerialize: !!M.getElementsByTagName("link").length,
  908.             style: /top/.test(bP.getAttribute("style")),
  909.             hrefNormalized: (bP.getAttribute("href") === "/a"),
  910.             opacity: /^0.55/.test(bP.style.opacity),
  911.             cssFloat: !!bP.style.cssFloat,
  912.             unknownElems: !!M.getElementsByTagName("nav").length,
  913.             checkOn: (F.value === "on"),
  914.             optSelected: x.selected,
  915.             getSetAttribute: M.className !== "t",
  916.             enctype: !!an.createElement("form").enctype,
  917.             submitBubbles: true,
  918.             changeBubbles: true,
  919.             focusinBubbles: false,
  920.             deleteExpando: true,
  921.             noCloneEvent: true,
  922.             inlineBlockNeedsLayout: false,
  923.             shrinkWrapBlocks: false,
  924.             reliableMarginRight: true
  925.         };
  926.         F.checked = true;
  927.         D.noCloneChecked = F.cloneNode(true).checked;
  928.         G.disabled = true;
  929.         D.optDisabled = !x.disabled;
  930.         try {
  931.             delete M.test
  932.         } catch (K) {
  933.             D.deleteExpando = false
  934.         }
  935.         if (!M.addEventListener && M.attachEvent && M.fireEvent) {
  936.             M.attachEvent("onclick", function () {
  937.                 D.noCloneEvent = false
  938.             });
  939.             M.cloneNode(true).fireEvent("onclick")
  940.         }
  941.         F = an.createElement("input");
  942.         F.value = "t";
  943.         F.setAttribute("type", "radio");
  944.         D.radioValue = F.value === "t";
  945.         F.setAttribute("checked", "checked");
  946.         M.appendChild(F);
  947.         w = an.createDocumentFragment();
  948.         w.appendChild(M.lastChild);
  949.         D.checkClone = w.cloneNode(true).cloneNode(true).lastChild.checked;
  950.         M.innerHTML = "";
  951.         M.style.width = M.style.paddingLeft = "1px";
  952.         E = an.getElementsByTagName("body")[0];
  953.         C = an.createElement(E ? "div" : "body");
  954.         L = {
  955.             visibility: "hidden",
  956.             width: 0,
  957.             height: 0,
  958.             border: 0,
  959.             margin: 0,
  960.             background: "none"
  961.         };
  962.         if (E) {
  963.             al.extend(L, {
  964.                 position: "absolute",
  965.                 left: "-999px",
  966.                 top: "-999px"
  967.             })
  968.         }
  969.         for (I in L) {
  970.             C.style[I] = L[I]
  971.         }
  972.         C.appendChild(M);
  973.         H = E || bO;
  974.         H.insertBefore(C, H.firstChild);
  975.         D.appendChecked = F.checked;
  976.         D.boxModel = M.offsetWidth === 2;
  977.         if ("zoom" in M.style) {
  978.             M.style.display = "inline";
  979.             M.style.zoom = 1;
  980.             D.inlineBlockNeedsLayout = (M.offsetWidth === 2);
  981.             M.style.display = "";
  982.             M.innerHTML = "<div style='width:4px;'></div>";
  983.             D.shrinkWrapBlocks = (M.offsetWidth !== 2)
  984.         }
  985.         M.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
  986.         J = M.getElementsByTagName("td");
  987.         bQ = (J[0].offsetHeight === 0);
  988.         J[0].style.display = "";
  989.         J[1].style.display = "none";
  990.         D.reliableHiddenOffsets = bQ && (J[0].offsetHeight === 0);
  991.         M.innerHTML = "";
  992.         if (an.defaultView && an.defaultView.getComputedStyle) {
  993.             A = an.createElement("div");
  994.             A.style.width = "0";
  995.             A.style.marginRight = "0";
  996.             M.appendChild(A);
  997.             D.reliableMarginRight = (parseInt((an.defaultView.getComputedStyle(A, null) || {
  998.                 marginRight: 0
  999.             }).marginRight, 10) || 0) === 0
  1000.         }
  1001.         if (M.attachEvent) {
  1002.             for (I in {
  1003.                 submit: 1,
  1004.                 change: 1,
  1005.                 focusin: 1
  1006.             }) {
  1007.                 B = "on" + I;
  1008.                 bQ = (B in M);
  1009.                 if (!bQ) {
  1010.                     M.setAttribute(B, "return;");
  1011.                     bQ = (typeof M[B] === "function")
  1012.                 }
  1013.                 D[I + "Bubbles"] = bQ
  1014.             }
  1015.         }
  1016.         al(function () {
  1017.             var bX, bZ, b0, bY, bS, bT, bR = 1,
  1018.                 bW = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",
  1019.                 bV = "visibility:hidden;border:0;",
  1020.                 e = "style='" + bW + "border:5px solid #000;padding:0;'",
  1021.                 bU = "<div " + e + "><div></div></div><table " + e + " cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
  1022.             E = an.getElementsByTagName("body")[0];
  1023.             if (!E) {
  1024.                 return
  1025.             }
  1026.             bX = an.createElement("div");
  1027.             bX.style.cssText = bV + "width:0;height:0;position:static;top:0;margin-top:" + bR + "px";
  1028.             E.insertBefore(bX, E.firstChild);
  1029.             C = an.createElement("div");
  1030.             C.style.cssText = bW + bV;
  1031.             C.innerHTML = bU;
  1032.             bX.appendChild(C);
  1033.             bZ = C.firstChild;
  1034.             b0 = bZ.firstChild;
  1035.             bS = bZ.nextSibling.firstChild.firstChild;
  1036.             bT = {
  1037.                 doesNotAddBorder: (b0.offsetTop !== 5),
  1038.                 doesAddBorderForTableAndCells: (bS.offsetTop === 5)
  1039.             };
  1040.             b0.style.position = "fixed";
  1041.             b0.style.top = "20px";
  1042.             bT.fixedPosition = (b0.offsetTop === 20 || b0.offsetTop === 15);
  1043.             b0.style.position = b0.style.top = "";
  1044.             bZ.style.overflow = "hidden";
  1045.             bZ.style.position = "relative";
  1046.             bT.subtractsBorderForOverflowNotVisible = (b0.offsetTop === -5);
  1047.             bT.doesNotIncludeMarginInBodyOffset = (E.offsetTop !== bR);
  1048.             E.removeChild(bX);
  1049.             C = bX = null;
  1050.             al.extend(D, bT)
  1051.         });
  1052.         C.innerHTML = "";
  1053.         H.removeChild(C);
  1054.         C = w = G = x = E = A = M = F = null;
  1055.         return D
  1056.     })();
  1057.     al.boxModel = al.support.boxModel;
  1058.     var a9 = /^(?:\{.*\}|\[.*\])$/,
  1059.         aL = /([A-Z])/g;
  1060.     al.extend({
  1061.         cache: {},
  1062.         uuid: 0,
  1063.         expando: "jQuery" + (al.fn.jquery + Math.random()).replace(/\D/g, ""),
  1064.         noData: {
  1065.             embed: true,
  1066.             object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
  1067.             applet: true
  1068.         },
  1069.         hasData: function (e) {
  1070.             e = e.nodeType ? al.cache[e[al.expando]] : e[al.expando];
  1071.             return !!e && !af(e)
  1072.         },
  1073.         data: function (H, F, E, D) {
  1074.             if (!al.acceptData(H)) {
  1075.                 return
  1076.             }
  1077.             var B, y, C, G = al.expando,
  1078.                 A = typeof F === "string",
  1079.                 I = H.nodeType,
  1080.                 w = I ? al.cache : H,
  1081.                 x = I ? H[al.expando] : H[al.expando] && al.expando,
  1082.                 z = F === "events";
  1083.             if ((!x || !w[x] || (!z && !D && !w[x].data)) && A && E === ap) {
  1084.                 return
  1085.             }
  1086.             if (!x) {
  1087.                 if (I) {
  1088.                     H[al.expando] = x = ++al.uuid
  1089.                 } else {
  1090.                     x = al.expando
  1091.                 }
  1092.             }
  1093.             if (!w[x]) {
  1094.                 w[x] = {};
  1095.                 if (!I) {
  1096.                     w[x].toJSON = al.noop
  1097.                 }
  1098.             }
  1099.             if (typeof F === "object" || typeof F === "function") {
  1100.                 if (D) {
  1101.                     w[x] = al.extend(w[x], F)
  1102.                 } else {
  1103.                     w[x].data = al.extend(w[x].data, F)
  1104.                 }
  1105.             }
  1106.             B = y = w[x];
  1107.             if (!D) {
  1108.                 if (!y.data) {
  1109.                     y.data = {}
  1110.                 }
  1111.                 y = y.data
  1112.             }
  1113.             if (E !== ap) {
  1114.                 y[al.camelCase(F)] = E
  1115.             }
  1116.             if (z && !y[F]) {
  1117.                 return B.events
  1118.             }
  1119.             if (A) {
  1120.                 C = y[F];
  1121.                 if (C == null) {
  1122.                     C = y[al.camelCase(F)]
  1123.                 }
  1124.             } else {
  1125.                 C = y
  1126.             }
  1127.             return C
  1128.         },
  1129.         removeData: function (D, B, A) {
  1130.             if (!al.acceptData(D)) {
  1131.                 return
  1132.             }
  1133.             var z, y, x, C = al.expando,
  1134.                 E = D.nodeType,
  1135.                 e = E ? al.cache : D,
  1136.                 w = E ? D[al.expando] : al.expando;
  1137.             if (!e[w]) {
  1138.                 return
  1139.             }
  1140.             if (B) {
  1141.                 z = A ? e[w] : e[w].data;
  1142.                 if (z) {
  1143.                     if (al.isArray(B)) {
  1144.                         B = B
  1145.                     } else {
  1146.                         if (B in z) {
  1147.                             B = [B]
  1148.                         } else {
  1149.                             B = al.camelCase(B);
  1150.                             if (B in z) {
  1151.                                 B = [B]
  1152.                             } else {
  1153.                                 B = B.split(" ")
  1154.                             }
  1155.                         }
  1156.                     }
  1157.                     for (y = 0, x = B.length; y < x; y++) {
  1158.                         delete z[B[y]]
  1159.                     }
  1160.                     if (!(A ? af : al.isEmptyObject)(z)) {
  1161.                         return
  1162.                     }
  1163.                 }
  1164.             }
  1165.             if (!A) {
  1166.                 delete e[w].data;
  1167.                 if (!af(e[w])) {
  1168.                     return
  1169.                 }
  1170.             }
  1171.             if (al.support.deleteExpando || !e.setInterval) {
  1172.                 delete e[w]
  1173.             } else {
  1174.                 e[w] = null
  1175.             } if (E) {
  1176.                 if (al.support.deleteExpando) {
  1177.                     delete D[al.expando]
  1178.                 } else {
  1179.                     if (D.removeAttribute) {
  1180.                         D.removeAttribute(al.expando)
  1181.                     } else {
  1182.                         D[al.expando] = null
  1183.                     }
  1184.                 }
  1185.             }
  1186.         },
  1187.         _data: function (w, e, x) {
  1188.             return al.data(w, e, x, true)
  1189.         },
  1190.         acceptData: function (w) {
  1191.             if (w.nodeName) {
  1192.                 var e = al.noData[w.nodeName.toLowerCase()];
  1193.                 if (e) {
  1194.                     return !(e === true || w.getAttribute("classid") !== e)
  1195.                 }
  1196.             }
  1197.             return true
  1198.         }
  1199.     });
  1200.     al.fn.extend({
  1201.         data: function (w, C) {
  1202.             var B, e, y, A = null;
  1203.             if (typeof w === "undefined") {
  1204.                 if (this.length) {
  1205.                     A = al.data(this[0]);
  1206.                     if (this[0].nodeType === 1 && !al._data(this[0], "parsedAttrs")) {
  1207.                         e = this[0].attributes;
  1208.                         for (var z = 0, x = e.length; z < x; z++) {
  1209.                             y = e[z].name;
  1210.                             if (y.indexOf("data-") === 0) {
  1211.                                 y = al.camelCase(y.substring(5));
  1212.                                 bo(this[0], y, A[y])
  1213.                             }
  1214.                         }
  1215.                         al._data(this[0], "parsedAttrs", true)
  1216.                     }
  1217.                 }
  1218.                 return A
  1219.             } else {
  1220.                 if (typeof w === "object") {
  1221.                     return this.each(function () {
  1222.                         al.data(this, w)
  1223.                     })
  1224.                 }
  1225.             }
  1226.             B = w.split(".");
  1227.             B[1] = B[1] ? "." + B[1] : "";
  1228.             if (C === ap) {
  1229.                 A = this.triggerHandler("getData" + B[1] + "!", [B[0]]);
  1230.                 if (A === ap && this.length) {
  1231.                     A = al.data(this[0], w);
  1232.                     A = bo(this[0], w, A)
  1233.                 }
  1234.                 return A === ap && B[1] ? this.data(B[0]) : A
  1235.             } else {
  1236.                 return this.each(function () {
  1237.                     var D = al(this),
  1238.                         E = [B[0], C];
  1239.                     D.triggerHandler("setData" + B[1] + "!", E);
  1240.                     al.data(this, w, C);
  1241.                     D.triggerHandler("changeData" + B[1] + "!", E)
  1242.                 })
  1243.             }
  1244.         },
  1245.         removeData: function (e) {
  1246.             return this.each(function () {
  1247.                 al.removeData(this, e)
  1248.             })
  1249.         }
  1250.     });
  1251.  
  1252.     function bo(x, w, A) {
  1253.         if (A === ap && x.nodeType === 1) {
  1254.             var z = "data-" + w.replace(aL, "-$1").toLowerCase();
  1255.             A = x.getAttribute(z);
  1256.             if (typeof A === "string") {
  1257.                 try {
  1258.                     A = A === "true" ? true : A === "false" ? false : A === "null" ? null : al.isNumeric(A) ? parseFloat(A) : a9.test(A) ? al.parseJSON(A) : A
  1259.                 } catch (y) {}
  1260.                 al.data(x, w, A)
  1261.             } else {
  1262.                 A = ap
  1263.             }
  1264.         }
  1265.         return A
  1266.     }
  1267.  
  1268.     function af(w) {
  1269.         for (var e in w) {
  1270.             if (e === "data" && al.isEmptyObject(w[e])) {
  1271.                 continue
  1272.             }
  1273.             if (e !== "toJSON") {
  1274.                 return false
  1275.             }
  1276.         }
  1277.         return true
  1278.     }
  1279.  
  1280.     function bA(y, e, B) {
  1281.         var A = e + "defer",
  1282.             x = e + "queue",
  1283.             w = e + "mark",
  1284.             z = al._data(y, A);
  1285.         if (z && (B === "queue" || !al._data(y, x)) && (B === "mark" || !al._data(y, w))) {
  1286.             setTimeout(function () {
  1287.                 if (!al._data(y, x) && !al._data(y, w)) {
  1288.                     al.removeData(y, A, true);
  1289.                     z.fire()
  1290.                 }
  1291.             }, 0)
  1292.         }
  1293.     }
  1294.     al.extend({
  1295.         _mark: function (w, e) {
  1296.             if (w) {
  1297.                 e = (e || "fx") + "mark";
  1298.                 al._data(w, e, (al._data(w, e) || 0) + 1)
  1299.             }
  1300.         },
  1301.         _unmark: function (w, e, z) {
  1302.             if (w !== true) {
  1303.                 z = e;
  1304.                 e = w;
  1305.                 w = false
  1306.             }
  1307.             if (e) {
  1308.                 z = z || "fx";
  1309.                 var y = z + "mark",
  1310.                     x = w ? 0 : ((al._data(e, y) || 1) - 1);
  1311.                 if (x) {
  1312.                     al._data(e, y, x)
  1313.                 } else {
  1314.                     al.removeData(e, y, true);
  1315.                     bA(e, z, "mark")
  1316.                 }
  1317.             }
  1318.         },
  1319.         queue: function (w, e, y) {
  1320.             var x;
  1321.             if (w) {
  1322.                 e = (e || "fx") + "queue";
  1323.                 x = al._data(w, e);
  1324.                 if (y) {
  1325.                     if (!x || al.isArray(y)) {
  1326.                         x = al._data(w, e, al.makeArray(y))
  1327.                     } else {
  1328.                         x.push(y)
  1329.                     }
  1330.                 }
  1331.                 return x || []
  1332.             }
  1333.         },
  1334.         dequeue: function (x, w) {
  1335.             w = w || "fx";
  1336.             var z = al.queue(x, w),
  1337.                 y = z.shift(),
  1338.                 e = {};
  1339.             if (y === "inprogress") {
  1340.                 y = z.shift()
  1341.             }
  1342.             if (y) {
  1343.                 if (w === "fx") {
  1344.                     z.unshift("inprogress")
  1345.                 }
  1346.                 al._data(x, w + ".run", e);
  1347.                 y.call(x, function () {
  1348.                     al.dequeue(x, w)
  1349.                 }, e)
  1350.             }
  1351.             if (!z.length) {
  1352.                 al.removeData(x, w + "queue " + w + ".run", true);
  1353.                 bA(x, w, "queue")
  1354.             }
  1355.         }
  1356.     });
  1357.     al.fn.extend({
  1358.         queue: function (e, w) {
  1359.             if (typeof e !== "string") {
  1360.                 w = e;
  1361.                 e = "fx"
  1362.             }
  1363.             if (w === ap) {
  1364.                 return al.queue(this[0], e)
  1365.             }
  1366.             return this.each(function () {
  1367.                 var x = al.queue(this, e, w);
  1368.                 if (e === "fx" && x[0] !== "inprogress") {
  1369.                     al.dequeue(this, e)
  1370.                 }
  1371.             })
  1372.         },
  1373.         dequeue: function (e) {
  1374.             return this.each(function () {
  1375.                 al.dequeue(this, e)
  1376.             })
  1377.         },
  1378.         delay: function (x, w) {
  1379.             x = al.fx ? al.fx.speeds[x] || x : x;
  1380.             w = w || "fx";
  1381.             return this.queue(w, function (y, e) {
  1382.                 var z = setTimeout(y, x);
  1383.                 e.stop = function () {
  1384.                     clearTimeout(z)
  1385.                 }
  1386.             })
  1387.         },
  1388.         clearQueue: function (e) {
  1389.             return this.queue(e || "fx", [])
  1390.         },
  1391.         promise: function (E, D) {
  1392.             if (typeof E !== "string") {
  1393.                 D = E;
  1394.                 E = ap
  1395.             }
  1396.             E = E || "fx";
  1397.             var C = al.Deferred(),
  1398.                 e = this,
  1399.                 x = e.length,
  1400.                 A = 1,
  1401.                 y = E + "defer",
  1402.                 z = E + "queue",
  1403.                 B = E + "mark",
  1404.                 w;
  1405.  
  1406.             function F() {
  1407.                 if (!(--A)) {
  1408.                     C.resolveWith(e, [e])
  1409.                 }
  1410.             }
  1411.             while (x--) {
  1412.                 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))) {
  1413.                     A++;
  1414.                     w.add(F)
  1415.                 }
  1416.             }
  1417.             F();
  1418.             return C.promise()
  1419.         }
  1420.     });
  1421.     var a8 = /[\n\t\r]/g,
  1422.         au = /\s+/,
  1423.         be = /\r/g,
  1424.         f = /^(?:button|input)$/i,
  1425.         R = /^(?:button|input|object|select|textarea)$/i,
  1426.         j = /^a(?:rea)?$/i,
  1427.         aB = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  1428.         T = al.support.getSetAttribute,
  1429.         bw, bi, aP;
  1430.     al.fn.extend({
  1431.         attr: function (w, e) {
  1432.             return al.access(this, w, e, true, al.attr)
  1433.         },
  1434.         removeAttr: function (e) {
  1435.             return this.each(function () {
  1436.                 al.removeAttr(this, e)
  1437.             })
  1438.         },
  1439.         prop: function (w, e) {
  1440.             return al.access(this, w, e, true, al.prop)
  1441.         },
  1442.         removeProp: function (e) {
  1443.             e = al.propFix[e] || e;
  1444.             return this.each(function () {
  1445.                 try {
  1446.                     this[e] = ap;
  1447.                     delete this[e]
  1448.                 } catch (w) {}
  1449.             })
  1450.         },
  1451.         addClass: function (y) {
  1452.             var e, z, x, A, B, C, w;
  1453.             if (al.isFunction(y)) {
  1454.                 return this.each(function (D) {
  1455.                     al(this).addClass(y.call(this, D, this.className))
  1456.                 })
  1457.             }
  1458.             if (y && typeof y === "string") {
  1459.                 e = y.split(au);
  1460.                 for (z = 0, x = this.length; z < x; z++) {
  1461.                     A = this[z];
  1462.                     if (A.nodeType === 1) {
  1463.                         if (!A.className && e.length === 1) {
  1464.                             A.className = y
  1465.                         } else {
  1466.                             B = " " + A.className + " ";
  1467.                             for (C = 0, w = e.length; C < w; C++) {
  1468.                                 if (!~B.indexOf(" " + e[C] + " ")) {
  1469.                                     B += e[C] + " "
  1470.                                 }
  1471.                             }
  1472.                             A.className = al.trim(B)
  1473.                         }
  1474.                     }
  1475.                 }
  1476.             }
  1477.             return this
  1478.         },
  1479.         removeClass: function (y) {
  1480.             var e, z, x, B, A, C, w;
  1481.             if (al.isFunction(y)) {
  1482.                 return this.each(function (D) {
  1483.                     al(this).removeClass(y.call(this, D, this.className))
  1484.                 })
  1485.             }
  1486.             if ((y && typeof y === "string") || y === ap) {
  1487.                 e = (y || "").split(au);
  1488.                 for (z = 0, x = this.length; z < x; z++) {
  1489.                     B = this[z];
  1490.                     if (B.nodeType === 1 && B.className) {
  1491.                         if (y) {
  1492.                             A = (" " + B.className + " ").replace(a8, " ");
  1493.                             for (C = 0, w = e.length; C < w; C++) {
  1494.                                 A = A.replace(" " + e[C] + " ", " ")
  1495.                             }
  1496.                             B.className = al.trim(A)
  1497.                         } else {
  1498.                             B.className = ""
  1499.                         }
  1500.                     }
  1501.                 }
  1502.             }
  1503.             return this
  1504.         },
  1505.         toggleClass: function (e, y) {
  1506.             var x = typeof e,
  1507.                 w = typeof y === "boolean";
  1508.             if (al.isFunction(e)) {
  1509.                 return this.each(function (z) {
  1510.                     al(this).toggleClass(e.call(this, z, this.className, y), y)
  1511.                 })
  1512.             }
  1513.             return this.each(function () {
  1514.                 if (x === "string") {
  1515.                     var z, B = 0,
  1516.                         A = al(this),
  1517.                         C = y,
  1518.                         D = e.split(au);
  1519.                     while ((z = D[B++])) {
  1520.                         C = w ? C : !A.hasClass(z);
  1521.                         A[C ? "addClass" : "removeClass"](z)
  1522.                     }
  1523.                 } else {
  1524.                     if (x === "undefined" || x === "boolean") {
  1525.                         if (this.className) {
  1526.                             al._data(this, "__className__", this.className)
  1527.                         }
  1528.                         this.className = this.className || e === false ? "" : al._data(this, "__className__") || ""
  1529.                     }
  1530.                 }
  1531.             })
  1532.         },
  1533.         hasClass: function (x) {
  1534.             var e = " " + x + " ",
  1535.                 y = 0,
  1536.                 w = this.length;
  1537.             for (; y < w; y++) {
  1538.                 if (this[y].nodeType === 1 && (" " + this[y].className + " ").replace(a8, " ").indexOf(e) > -1) {
  1539.                     return true
  1540.                 }
  1541.             }
  1542.             return false
  1543.         },
  1544.         val: function (z) {
  1545.             var y, e, x, w = this[0];
  1546.             if (!arguments.length) {
  1547.                 if (w) {
  1548.                     y = al.valHooks[w.nodeName.toLowerCase()] || al.valHooks[w.type];
  1549.                     if (y && "get" in y && (e = y.get(w, "value")) !== ap) {
  1550.                         return e
  1551.                     }
  1552.                     e = w.value;
  1553.                     return typeof e === "string" ? e.replace(be, "") : e == null ? "" : e
  1554.                 }
  1555.                 return ap
  1556.             }
  1557.             x = al.isFunction(z);
  1558.             return this.each(function (B) {
  1559.                 var A = al(this),
  1560.                     C;
  1561.                 if (this.nodeType !== 1) {
  1562.                     return
  1563.                 }
  1564.                 if (x) {
  1565.                     C = z.call(this, B, A.val())
  1566.                 } else {
  1567.                     C = z
  1568.                 } if (C == null) {
  1569.                     C = ""
  1570.                 } else {
  1571.                     if (typeof C === "number") {
  1572.                         C += ""
  1573.                     } else {
  1574.                         if (al.isArray(C)) {
  1575.                             C = al.map(C, function (D) {
  1576.                                 return D == null ? "" : D + ""
  1577.                             })
  1578.                         }
  1579.                     }
  1580.                 }
  1581.                 y = al.valHooks[this.nodeName.toLowerCase()] || al.valHooks[this.type];
  1582.                 if (!y || !("set" in y) || y.set(this, C, "value") === ap) {
  1583.                     this.value = C
  1584.                 }
  1585.             })
  1586.         }
  1587.     });
  1588.     al.extend({
  1589.         valHooks: {
  1590.             option: {
  1591.                 get: function (w) {
  1592.                     var e = w.attributes.value;
  1593.                     return !e || e.specified ? w.value : w.text
  1594.                 }
  1595.             },
  1596.             select: {
  1597.                 get: function (B) {
  1598.                     var z, e, A, x, y = B.selectedIndex,
  1599.                         C = [],
  1600.                         D = B.options,
  1601.                         w = B.type === "select-one";
  1602.                     if (y < 0) {
  1603.                         return null
  1604.                     }
  1605.                     e = w ? y : 0;
  1606.                     A = w ? y + 1 : D.length;
  1607.                     for (; e < A; e++) {
  1608.                         x = D[e];
  1609.                         if (x.selected && (al.support.optDisabled ? !x.disabled : x.getAttribute("disabled") === null) && (!x.parentNode.disabled || !al.nodeName(x.parentNode, "optgroup"))) {
  1610.                             z = al(x).val();
  1611.                             if (w) {
  1612.                                 return z
  1613.                             }
  1614.                             C.push(z)
  1615.                         }
  1616.                     }
  1617.                     if (w && !C.length && D.length) {
  1618.                         return al(D[y]).val()
  1619.                     }
  1620.                     return C
  1621.                 },
  1622.                 set: function (w, e) {
  1623.                     var x = al.makeArray(e);
  1624.                     al(w).find("option").each(function () {
  1625.                         this.selected = al.inArray(al(this).val(), x) >= 0
  1626.                     });
  1627.                     if (!x.length) {
  1628.                         w.selectedIndex = -1
  1629.                     }
  1630.                     return x
  1631.                 }
  1632.             }
  1633.         },
  1634.         attrFn: {
  1635.             val: true,
  1636.             css: true,
  1637.             html: true,
  1638.             text: true,
  1639.             data: true,
  1640.             width: true,
  1641.             height: true,
  1642.             offset: true
  1643.         },
  1644.         attr: function (y, x, D, C) {
  1645.             var B, w, A, z = y.nodeType;
  1646.             if (!y || z === 3 || z === 8 || z === 2) {
  1647.                 return ap
  1648.             }
  1649.             if (C && x in al.attrFn) {
  1650.                 return al(y)[x](D)
  1651.             }
  1652.             if (!("getAttribute" in y)) {
  1653.                 return al.prop(y, x, D)
  1654.             }
  1655.             A = z !== 1 || !al.isXMLDoc(y);
  1656.             if (A) {
  1657.                 x = x.toLowerCase();
  1658.                 w = al.attrHooks[x] || (aB.test(x) ? bi : bw)
  1659.             }
  1660.             if (D !== ap) {
  1661.                 if (D === null) {
  1662.                     al.removeAttr(y, x);
  1663.                     return ap
  1664.                 } else {
  1665.                     if (w && "set" in w && A && (B = w.set(y, D, x)) !== ap) {
  1666.                         return B
  1667.                     } else {
  1668.                         y.setAttribute(x, "" + D);
  1669.                         return D
  1670.                     }
  1671.                 }
  1672.             } else {
  1673.                 if (w && "get" in w && A && (B = w.get(y, x)) !== null) {
  1674.                     return B
  1675.                 } else {
  1676.                     B = y.getAttribute(x);
  1677.                     return B === null ? ap : B
  1678.                 }
  1679.             }
  1680.         },
  1681.         removeAttr: function (x, e) {
  1682.             var B, A, y, w, z = 0;
  1683.             if (x.nodeType === 1) {
  1684.                 A = (e || "").split(au);
  1685.                 w = A.length;
  1686.                 for (; z < w; z++) {
  1687.                     y = A[z].toLowerCase();
  1688.                     B = al.propFix[y] || y;
  1689.                     al.attr(x, y, "");
  1690.                     x.removeAttribute(T ? y : B);
  1691.                     if (aB.test(y) && B in x) {
  1692.                         x[B] = false
  1693.                     }
  1694.                 }
  1695.             }
  1696.         },
  1697.         attrHooks: {
  1698.             type: {
  1699.                 set: function (w, e) {
  1700.                     if (f.test(w.nodeName) && w.parentNode) {
  1701.                         al.error("type property can't be changed")
  1702.                     } else {
  1703.                         if (!al.support.radioValue && e === "radio" && al.nodeName(w, "input")) {
  1704.                             var x = w.value;
  1705.                             w.setAttribute("type", e);
  1706.                             if (x) {
  1707.                                 w.value = x
  1708.                             }
  1709.                             return e
  1710.                         }
  1711.                     }
  1712.                 }
  1713.             },
  1714.             value: {
  1715.                 get: function (w, e) {
  1716.                     if (bw && al.nodeName(w, "button")) {
  1717.                         return bw.get(w, e)
  1718.                     }
  1719.                     return e in w ? w.value : null
  1720.                 },
  1721.                 set: function (w, e, x) {
  1722.                     if (bw && al.nodeName(w, "button")) {
  1723.                         return bw.set(w, e, x)
  1724.                     }
  1725.                     w.value = e
  1726.                 }
  1727.             }
  1728.         },
  1729.         propFix: {
  1730.             tabindex: "tabIndex",
  1731.             readonly: "readOnly",
  1732.             "for": "htmlFor",
  1733.             "class": "className",
  1734.             maxlength: "maxLength",
  1735.             cellspacing: "cellSpacing",
  1736.             cellpadding: "cellPadding",
  1737.             rowspan: "rowSpan",
  1738.             colspan: "colSpan",
  1739.             usemap: "useMap",
  1740.             frameborder: "frameBorder",
  1741.             contenteditable: "contentEditable"
  1742.         },
  1743.         prop: function (x, w, B) {
  1744.             var A, e, z, y = x.nodeType;
  1745.             if (!x || y === 3 || y === 8 || y === 2) {
  1746.                 return ap
  1747.             }
  1748.             z = y !== 1 || !al.isXMLDoc(x);
  1749.             if (z) {
  1750.                 w = al.propFix[w] || w;
  1751.                 e = al.propHooks[w]
  1752.             }
  1753.             if (B !== ap) {
  1754.                 if (e && "set" in e && (A = e.set(x, B, w)) !== ap) {
  1755.                     return A
  1756.                 } else {
  1757.                     return (x[w] = B)
  1758.                 }
  1759.             } else {
  1760.                 if (e && "get" in e && (A = e.get(x, w)) !== null) {
  1761.                     return A
  1762.                 } else {
  1763.                     return x[w]
  1764.                 }
  1765.             }
  1766.         },
  1767.         propHooks: {
  1768.             tabIndex: {
  1769.                 get: function (w) {
  1770.                     var e = w.getAttributeNode("tabindex");
  1771.                     return e && e.specified ? parseInt(e.value, 10) : R.test(w.nodeName) || j.test(w.nodeName) && w.href ? 0 : ap
  1772.                 }
  1773.             }
  1774.         }
  1775.     });
  1776.     al.attrHooks.tabindex = al.propHooks.tabIndex;
  1777.     bi = {
  1778.         get: function (w, e) {
  1779.             var y, x = al.prop(w, e);
  1780.             return x === true || typeof x !== "boolean" && (y = w.getAttributeNode(e)) && y.nodeValue !== false ? e.toLowerCase() : ap
  1781.         },
  1782.         set: function (w, e, y) {
  1783.             var x;
  1784.             if (e === false) {
  1785.                 al.removeAttr(w, y)
  1786.             } else {
  1787.                 x = al.propFix[y] || y;
  1788.                 if (x in w) {
  1789.                     w[x] = true
  1790.                 }
  1791.                 w.setAttribute(y, y.toLowerCase())
  1792.             }
  1793.             return y
  1794.         }
  1795.     };
  1796.     if (!T) {
  1797.         aP = {
  1798.             name: true,
  1799.             id: true
  1800.         };
  1801.         bw = al.valHooks.button = {
  1802.             get: function (w, e) {
  1803.                 var x;
  1804.                 x = w.getAttributeNode(e);
  1805.                 return x && (aP[e] ? x.nodeValue !== "" : x.specified) ? x.nodeValue : ap
  1806.             },
  1807.             set: function (w, e, y) {
  1808.                 var x = w.getAttributeNode(y);
  1809.                 if (!x) {
  1810.                     x = an.createAttribute(y);
  1811.                     w.setAttributeNode(x)
  1812.                 }
  1813.                 return (x.nodeValue = e + "")
  1814.             }
  1815.         };
  1816.         al.attrHooks.tabindex.set = bw.set;
  1817.         al.each(["width", "height"], function (e, w) {
  1818.             al.attrHooks[w] = al.extend(al.attrHooks[w], {
  1819.                 set: function (y, x) {
  1820.                     if (x === "") {
  1821.                         y.setAttribute(w, "auto");
  1822.                         return x
  1823.                     }
  1824.                 }
  1825.             })
  1826.         });
  1827.         al.attrHooks.contenteditable = {
  1828.             get: bw.get,
  1829.             set: function (w, e, x) {
  1830.                 if (e === "") {
  1831.                     e = "false"
  1832.                 }
  1833.                 bw.set(w, e, x)
  1834.             }
  1835.         }
  1836.     }
  1837.     if (!al.support.hrefNormalized) {
  1838.         al.each(["href", "src", "width", "height"], function (e, w) {
  1839.             al.attrHooks[w] = al.extend(al.attrHooks[w], {
  1840.                 get: function (y) {
  1841.                     var x = y.getAttribute(w, 2);
  1842.                     return x === null ? ap : x
  1843.                 }
  1844.             })
  1845.         })
  1846.     }
  1847.     if (!al.support.style) {
  1848.         al.attrHooks.style = {
  1849.             get: function (e) {
  1850.                 return e.style.cssText.toLowerCase() || ap
  1851.             },
  1852.             set: function (w, e) {
  1853.                 return (w.style.cssText = "" + e)
  1854.             }
  1855.         }
  1856.     }
  1857.     if (!al.support.optSelected) {
  1858.         al.propHooks.selected = al.extend(al.propHooks.selected, {
  1859.             get: function (w) {
  1860.                 var e = w.parentNode;
  1861.                 if (e) {
  1862.                     e.selectedIndex;
  1863.                     if (e.parentNode) {
  1864.                         e.parentNode.selectedIndex
  1865.                     }
  1866.                 }
  1867.                 return null
  1868.             }
  1869.         })
  1870.     }
  1871.     if (!al.support.enctype) {
  1872.         al.propFix.enctype = "encoding"
  1873.     }
  1874.     if (!al.support.checkOn) {
  1875.         al.each(["radio", "checkbox"], function () {
  1876.             al.valHooks[this] = {
  1877.                 get: function (e) {
  1878.                     return e.getAttribute("value") === null ? "on" : e.value
  1879.                 }
  1880.             }
  1881.         })
  1882.     }
  1883.     al.each(["radio", "checkbox"], function () {
  1884.         al.valHooks[this] = al.extend(al.valHooks[this], {
  1885.             set: function (w, e) {
  1886.                 if (al.isArray(e)) {
  1887.                     return (w.checked = al.inArray(al(w).val(), e) >= 0)
  1888.                 }
  1889.             }
  1890.         })
  1891.     });
  1892.     var a7 = /\.(.*)$/,
  1893.         bv = /^(?:textarea|input|select)$/i,
  1894.         ab = /\./g,
  1895.         bB = / /g,
  1896.         aR = /[^\w\s.|`]/g,
  1897.         l = /^([^\.]*)?(?:\.(.+))?$/,
  1898.         X = /\bhover(\.\S+)?/,
  1899.         a6 = /^key/,
  1900.         bx = /^(?:mouse|contextmenu)|click/,
  1901.         ag = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
  1902.         aj = function (w) {
  1903.             var e = ag.exec(w);
  1904.             if (e) {
  1905.                 e[1] = (e[1] || "").toLowerCase();
  1906.                 e[3] = e[3] && new RegExp("(?:^|\\s)" + e[3] + "(?:\\s|$)")
  1907.             }
  1908.             return e
  1909.         },
  1910.         i = function (w, e) {
  1911.             return ((!e[1] || w.nodeName.toLowerCase() === e[1]) && (!e[2] || w.id === e[2]) && (!e[3] || e[3].test(w.className)))
  1912.         },
  1913.         bM = function (e) {
  1914.             return al.event.special.hover ? e : e.replace(X, "mouseenter$1 mouseleave$1")
  1915.         };
  1916.     al.event = {
  1917.         add: function (I, G, F, D, B) {
  1918.             var z, A, L, K, J, E, e, H, w, y, x, C;
  1919.             if (I.nodeType === 3 || I.nodeType === 8 || !G || !F || !(z = al._data(I))) {
  1920.                 return
  1921.             }
  1922.             if (F.handler) {
  1923.                 w = F;
  1924.                 F = w.handler
  1925.             }
  1926.             if (!F.guid) {
  1927.                 F.guid = al.guid++
  1928.             }
  1929.             L = z.events;
  1930.             if (!L) {
  1931.                 z.events = L = {}
  1932.             }
  1933.             A = z.handle;
  1934.             if (!A) {
  1935.                 z.handle = A = function (M) {
  1936.                     return typeof al !== "undefined" && (!M || al.event.triggered !== M.type) ? al.event.dispatch.apply(A.elem, arguments) : ap
  1937.                 };
  1938.                 A.elem = I
  1939.             }
  1940.             G = bM(G).split(" ");
  1941.             for (K = 0; K < G.length; K++) {
  1942.                 J = l.exec(G[K]) || [];
  1943.                 E = J[1];
  1944.                 e = (J[2] || "").split(".").sort();
  1945.                 C = al.event.special[E] || {};
  1946.                 E = (B ? C.delegateType : C.bindType) || E;
  1947.                 C = al.event.special[E] || {};
  1948.                 H = al.extend({
  1949.                     type: E,
  1950.                     origType: J[1],
  1951.                     data: D,
  1952.                     handler: F,
  1953.                     guid: F.guid,
  1954.                     selector: B,
  1955.                     namespace: e.join(".")
  1956.                 }, w);
  1957.                 if (B) {
  1958.                     H.quick = aj(B);
  1959.                     if (!H.quick && al.expr.match.POS.test(B)) {
  1960.                         H.isPositional = true
  1961.                     }
  1962.                 }
  1963.                 x = L[E];
  1964.                 if (!x) {
  1965.                     x = L[E] = [];
  1966.                     x.delegateCount = 0;
  1967.                     if (!C.setup || C.setup.call(I, D, e, A) === false) {
  1968.                         if (I.addEventListener) {
  1969.                             I.addEventListener(E, A, false)
  1970.                         } else {
  1971.                             if (I.attachEvent) {
  1972.                                 I.attachEvent("on" + E, A)
  1973.                             }
  1974.                         }
  1975.                     }
  1976.                 }
  1977.                 if (C.add) {
  1978.                     C.add.call(I, H);
  1979.                     if (!H.handler.guid) {
  1980.                         H.handler.guid = F.guid
  1981.                     }
  1982.                 }
  1983.                 if (B) {
  1984.                     x.splice(x.delegateCount++, 0, H)
  1985.                 } else {
  1986.                     x.push(H)
  1987.                 }
  1988.                 al.event.global[E] = true
  1989.             }
  1990.             I = null
  1991.         },
  1992.         global: {},
  1993.         remove: function (I, G, E, D) {
  1994.             var B = al.hasData(I) && al._data(I),
  1995.                 K, L, F, x, y, z, J, C, A, w, H;
  1996.             if (!B || !(J = B.events)) {
  1997.                 return
  1998.             }
  1999.             G = bM(G || "").split(" ");
  2000.             for (K = 0; K < G.length; K++) {
  2001.                 L = l.exec(G[K]) || [];
  2002.                 F = L[1];
  2003.                 x = L[2];
  2004.                 if (!F) {
  2005.                     x = x ? "." + x : "";
  2006.                     for (z in J) {
  2007.                         al.event.remove(I, z + x, E, D)
  2008.                     }
  2009.                     return
  2010.                 }
  2011.                 C = al.event.special[F] || {};
  2012.                 F = (D ? C.delegateType : C.bindType) || F;
  2013.                 w = J[F] || [];
  2014.                 y = w.length;
  2015.                 x = x ? new RegExp("(^|\\.)" + x.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
  2016.                 if (E || x || D || C.remove) {
  2017.                     for (z = 0; z < w.length; z++) {
  2018.                         H = w[z];
  2019.                         if (!E || E.guid === H.guid) {
  2020.                             if (!x || x.test(H.namespace)) {
  2021.                                 if (!D || D === H.selector || D === "**" && H.selector) {
  2022.                                     w.splice(z--, 1);
  2023.                                     if (H.selector) {
  2024.                                         w.delegateCount--
  2025.                                     }
  2026.                                     if (C.remove) {
  2027.                                         C.remove.call(I, H)
  2028.                                     }
  2029.                                 }
  2030.                             }
  2031.                         }
  2032.                     }
  2033.                 } else {
  2034.                     w.length = 0
  2035.                 } if (w.length === 0 && y !== w.length) {
  2036.                     if (!C.teardown || C.teardown.call(I, x) === false) {
  2037.                         al.removeEvent(I, F, B.handle)
  2038.                     }
  2039.                     delete J[F]
  2040.                 }
  2041.             }
  2042.             if (al.isEmptyObject(J)) {
  2043.                 A = B.handle;
  2044.                 if (A) {
  2045.                     A.elem = null
  2046.                 }
  2047.                 al.removeData(I, ["events", "handle"], true)
  2048.             }
  2049.         },
  2050.         customEvent: {
  2051.             getData: true,
  2052.             setData: true,
  2053.             changeData: true
  2054.         },
  2055.         trigger: function (J, I, H, G) {
  2056.             if (H && (H.nodeType === 3 || H.nodeType === 8)) {
  2057.                 return
  2058.             }
  2059.             var E = J.type || J,
  2060.                 y = [],
  2061.                 w, x, C, K, A, z, F, D, B, L;
  2062.             if (E.indexOf("!") >= 0) {
  2063.                 E = E.slice(0, -1);
  2064.                 x = true
  2065.             }
  2066.             if (E.indexOf(".") >= 0) {
  2067.                 y = E.split(".");
  2068.                 E = y.shift();
  2069.                 y.sort()
  2070.             }
  2071.             if ((!H || al.event.customEvent[E]) && !al.event.global[E]) {
  2072.                 return
  2073.             }
  2074.             J = typeof J === "object" ? J[al.expando] ? J : new al.Event(E, J) : new al.Event(E);
  2075.             J.type = E;
  2076.             J.isTrigger = true;
  2077.             J.exclusive = x;
  2078.             J.namespace = y.join(".");
  2079.             J.namespace_re = J.namespace ? new RegExp("(^|\\.)" + y.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
  2080.             z = E.indexOf(":") < 0 ? "on" + E : "";
  2081.             if (G || !H) {
  2082.                 J.preventDefault()
  2083.             }
  2084.             if (!H) {
  2085.                 w = al.cache;
  2086.                 for (C in w) {
  2087.                     if (w[C].events && w[C].events[E]) {
  2088.                         al.event.trigger(J, I, w[C].handle.elem, true)
  2089.                     }
  2090.                 }
  2091.                 return
  2092.             }
  2093.             J.result = ap;
  2094.             if (!J.target) {
  2095.                 J.target = H
  2096.             }
  2097.             I = I != null ? al.makeArray(I) : [];
  2098.             I.unshift(J);
  2099.             F = al.event.special[E] || {};
  2100.             if (F.trigger && F.trigger.apply(H, I) === false) {
  2101.                 return
  2102.             }
  2103.             B = [
  2104.                 [H, F.bindType || E]
  2105.             ];
  2106.             if (!G && !F.noBubble && !al.isWindow(H)) {
  2107.                 L = F.delegateType || E;
  2108.                 A = null;
  2109.                 for (K = H.parentNode; K; K = K.parentNode) {
  2110.                     B.push([K, L]);
  2111.                     A = K
  2112.                 }
  2113.                 if (A && A === H.ownerDocument) {
  2114.                     B.push([A.defaultView || A.parentWindow || aq, L])
  2115.                 }
  2116.             }
  2117.             for (C = 0; C < B.length; C++) {
  2118.                 K = B[C][0];
  2119.                 J.type = B[C][1];
  2120.                 D = (al._data(K, "events") || {})[J.type] && al._data(K, "handle");
  2121.                 if (D) {
  2122.                     D.apply(K, I)
  2123.                 }
  2124.                 D = z && K[z];
  2125.                 if (D && al.acceptData(K)) {
  2126.                     D.apply(K, I)
  2127.                 }
  2128.                 if (J.isPropagationStopped()) {
  2129.                     break
  2130.                 }
  2131.             }
  2132.             J.type = E;
  2133.             if (!J.isDefaultPrevented()) {
  2134.                 if ((!F._default || F._default.apply(H.ownerDocument, I) === false) && !(E === "click" && al.nodeName(H, "a")) && al.acceptData(H)) {
  2135.                     if (z && H[E] && ((E !== "focus" && E !== "blur") || J.target.offsetWidth !== 0) && !al.isWindow(H)) {
  2136.                         A = H[z];
  2137.                         if (A) {
  2138.                             H[z] = null
  2139.                         }
  2140.                         al.event.triggered = E;
  2141.                         H[E]();
  2142.                         al.event.triggered = ap;
  2143.                         if (A) {
  2144.                             H[z] = A
  2145.                         }
  2146.                     }
  2147.                 }
  2148.             }
  2149.             return J.result
  2150.         },
  2151.         dispatch: function (K) {
  2152.             K = al.event.fix(K || aq.event);
  2153.             var J = ((al._data(this, "events") || {})[K.type] || []),
  2154.                 C = J.delegateCount,
  2155.                 y = [].slice.call(arguments, 0),
  2156.                 D = !K.exclusive && !K.namespace,
  2157.                 A = (al.event.special[K.type] || {}).handle,
  2158.                 w = [],
  2159.                 H, F, z, L, G, B, x, e, E, I, M;
  2160.             y[0] = K;
  2161.             K.delegateTarget = this;
  2162.             if (C && !K.target.disabled && !(K.button && K.type === "click")) {
  2163.                 for (z = K.target; z != this; z = z.parentNode || this) {
  2164.                     G = {};
  2165.                     x = [];
  2166.                     for (H = 0; H < C; H++) {
  2167.                         e = J[H];
  2168.                         E = e.selector;
  2169.                         I = G[E];
  2170.                         if (e.isPositional) {
  2171.                             I = (I || (G[E] = al(E))).index(z) >= 0
  2172.                         } else {
  2173.                             if (I === ap) {
  2174.                                 I = G[E] = (e.quick ? i(z, e.quick) : al(z).is(E))
  2175.                             }
  2176.                         } if (I) {
  2177.                             x.push(e)
  2178.                         }
  2179.                     }
  2180.                     if (x.length) {
  2181.                         w.push({
  2182.                             elem: z,
  2183.                             matches: x
  2184.                         })
  2185.                     }
  2186.                 }
  2187.             }
  2188.             if (J.length > C) {
  2189.                 w.push({
  2190.                     elem: this,
  2191.                     matches: J.slice(C)
  2192.                 })
  2193.             }
  2194.             for (H = 0; H < w.length && !K.isPropagationStopped(); H++) {
  2195.                 B = w[H];
  2196.                 K.currentTarget = B.elem;
  2197.                 for (F = 0; F < B.matches.length && !K.isImmediatePropagationStopped(); F++) {
  2198.                     e = B.matches[F];
  2199.                     if (D || (!K.namespace && !e.namespace) || K.namespace_re && K.namespace_re.test(e.namespace)) {
  2200.                         K.data = e.data;
  2201.                         K.handleObj = e;
  2202.                         L = (A || e.handler).apply(B.elem, y);
  2203.                         if (L !== ap) {
  2204.                             K.result = L;
  2205.                             if (L === false) {
  2206.                                 K.preventDefault();
  2207.                                 K.stopPropagation()
  2208.                             }
  2209.                         }
  2210.                     }
  2211.                 }
  2212.             }
  2213.             return K.result
  2214.         },
  2215.         props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  2216.         fixHooks: {},
  2217.         keyHooks: {
  2218.             props: "char charCode key keyCode".split(" "),
  2219.             filter: function (w, e) {
  2220.                 if (w.which == null) {
  2221.                     w.which = e.charCode != null ? e.charCode : e.keyCode
  2222.                 }
  2223.                 return w
  2224.             }
  2225.         },
  2226.         mouseHooks: {
  2227.             props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),
  2228.             filter: function (x, w) {
  2229.                 var B, z, e, y = w.button,
  2230.                     A = w.fromElement;
  2231.                 if (x.pageX == null && w.clientX != null) {
  2232.                     B = x.target.ownerDocument || an;
  2233.                     z = B.documentElement;
  2234.                     e = B.body;
  2235.                     x.pageX = w.clientX + (z && z.scrollLeft || e && e.scrollLeft || 0) - (z && z.clientLeft || e && e.clientLeft || 0);
  2236.                     x.pageY = w.clientY + (z && z.scrollTop || e && e.scrollTop || 0) - (z && z.clientTop || e && e.clientTop || 0)
  2237.                 }
  2238.                 if (!x.relatedTarget && A) {
  2239.                     x.relatedTarget = A === x.target ? w.toElement : A
  2240.                 }
  2241.                 if (!x.which && y !== ap) {
  2242.                     x.which = (y & 1 ? 1 : (y & 2 ? 3 : (y & 4 ? 2 : 0)))
  2243.                 }
  2244.                 return x
  2245.             }
  2246.         },
  2247.         fix: function (w) {
  2248.             if (w[al.expando]) {
  2249.                 return w
  2250.             }
  2251.             var x, A, e = w,
  2252.                 y = al.event.fixHooks[w.type] || {},
  2253.                 z = y.props ? this.props.concat(y.props) : this.props;
  2254.             w = al.Event(e);
  2255.             for (x = z.length; x;) {
  2256.                 A = z[--x];
  2257.                 w[A] = e[A]
  2258.             }
  2259.             if (!w.target) {
  2260.                 w.target = e.srcElement || an
  2261.             }
  2262.             if (w.target.nodeType === 3) {
  2263.                 w.target = w.target.parentNode
  2264.             }
  2265.             if (w.metaKey === ap) {
  2266.                 w.metaKey = w.ctrlKey
  2267.             }
  2268.             return y.filter ? y.filter(w, e) : w
  2269.         },
  2270.         special: {
  2271.             ready: {
  2272.                 setup: al.bindReady
  2273.             },
  2274.             focus: {
  2275.                 delegateType: "focusin",
  2276.                 noBubble: true
  2277.             },
  2278.             blur: {
  2279.                 delegateType: "focusout",
  2280.                 noBubble: true
  2281.             },
  2282.             beforeunload: {
  2283.                 setup: function (w, e, x) {
  2284.                     if (al.isWindow(this)) {
  2285.                         this.onbeforeunload = x
  2286.                     }
  2287.                 },
  2288.                 teardown: function (w, e) {
  2289.                     if (this.onbeforeunload === e) {
  2290.                         this.onbeforeunload = null
  2291.                     }
  2292.                 }
  2293.             }
  2294.         },
  2295.         simulate: function (x, w, A, z) {
  2296.             var y = al.extend(new al.Event(), A, {
  2297.                 type: x,
  2298.                 isSimulated: true,
  2299.                 originalEvent: {}
  2300.             });
  2301.             if (z) {
  2302.                 al.event.trigger(y, null, w)
  2303.             } else {
  2304.                 al.event.dispatch.call(w, y)
  2305.             } if (y.isDefaultPrevented()) {
  2306.                 A.preventDefault()
  2307.             }
  2308.         }
  2309.     };
  2310.     al.event.handle = al.event.dispatch;
  2311.     al.removeEvent = an.removeEventListener ? function (w, e, x) {
  2312.         if (w.removeEventListener) {
  2313.             w.removeEventListener(e, x, false)
  2314.         }
  2315.     } : function (w, e, x) {
  2316.         if (w.detachEvent) {
  2317.             w.detachEvent("on" + e, x)
  2318.         }
  2319.     };
  2320.     al.Event = function (w, e) {
  2321.         if (!(this instanceof al.Event)) {
  2322.             return new al.Event(w, e)
  2323.         }
  2324.         if (w && w.type) {
  2325.             this.originalEvent = w;
  2326.             this.type = w.type;
  2327.             this.isDefaultPrevented = (w.defaultPrevented || w.returnValue === false || w.getPreventDefault && w.getPreventDefault()) ? h : bD
  2328.         } else {
  2329.             this.type = w
  2330.         } if (e) {
  2331.             al.extend(this, e)
  2332.         }
  2333.         this.timeStamp = w && w.timeStamp || al.now();
  2334.         this[al.expando] = true
  2335.     };
  2336.  
  2337.     function bD() {
  2338.         return false
  2339.     }
  2340.  
  2341.     function h() {
  2342.         return true
  2343.     }
  2344.     al.Event.prototype = {
  2345.         preventDefault: function () {
  2346.             this.isDefaultPrevented = h;
  2347.             var w = this.originalEvent;
  2348.             if (!w) {
  2349.                 return
  2350.             }
  2351.             if (w.preventDefault) {
  2352.                 w.preventDefault()
  2353.             } else {
  2354.                 w.returnValue = false
  2355.             }
  2356.         },
  2357.         stopPropagation: function () {
  2358.             this.isPropagationStopped = h;
  2359.             var w = this.originalEvent;
  2360.             if (!w) {
  2361.                 return
  2362.             }
  2363.             if (w.stopPropagation) {
  2364.                 w.stopPropagation()
  2365.             }
  2366.             w.cancelBubble = true
  2367.         },
  2368.         stopImmediatePropagation: function () {
  2369.             this.isImmediatePropagationStopped = h;
  2370.             this.stopPropagation()
  2371.         },
  2372.         isDefaultPrevented: bD,
  2373.         isPropagationStopped: bD,
  2374.         isImmediatePropagationStopped: bD
  2375.     };
  2376.     al.each({
  2377.         mouseenter: "mouseover",
  2378.         mouseleave: "mouseout"
  2379.     }, function (w, e) {
  2380.         al.event.special[w] = al.event.special[e] = {
  2381.             delegateType: e,
  2382.             bindType: e,
  2383.             handle: function (z) {
  2384.                 var y = this,
  2385.                     D = z.relatedTarget,
  2386.                     B = z.handleObj,
  2387.                     x = B.selector,
  2388.                     C, A;
  2389.                 if (!D || B.origType === z.type || (D !== y && !al.contains(y, D))) {
  2390.                     C = z.type;
  2391.                     z.type = B.origType;
  2392.                     A = B.handler.apply(this, arguments);
  2393.                     z.type = C
  2394.                 }
  2395.                 return A
  2396.             }
  2397.         }
  2398.     });
  2399.     if (!al.support.submitBubbles) {
  2400.         al.event.special.submit = {
  2401.             setup: function () {
  2402.                 if (al.nodeName(this, "form")) {
  2403.                     return false
  2404.                 }
  2405.                 al.event.add(this, "click._submit keypress._submit", function (y) {
  2406.                     var w = y.target,
  2407.                         x = al.nodeName(w, "input") || al.nodeName(w, "button") ? w.form : ap;
  2408.                     if (x && !x._submit_attached) {
  2409.                         al.event.add(x, "submit._submit", function (e) {
  2410.                             if (this.parentNode) {
  2411.                                 al.event.simulate("submit", this.parentNode, e, true)
  2412.                             }
  2413.                         });
  2414.                         x._submit_attached = true
  2415.                     }
  2416.                 })
  2417.             },
  2418.             teardown: function () {
  2419.                 if (al.nodeName(this, "form")) {
  2420.                     return false
  2421.                 }
  2422.                 al.event.remove(this, "._submit")
  2423.             }
  2424.         }
  2425.     }
  2426.     if (!al.support.changeBubbles) {
  2427.         al.event.special.change = {
  2428.             setup: function () {
  2429.                 if (bv.test(this.nodeName)) {
  2430.                     if (this.type === "checkbox" || this.type === "radio") {
  2431.                         al.event.add(this, "propertychange._change", function (e) {
  2432.                             if (e.originalEvent.propertyName === "checked") {
  2433.                                 this._just_changed = true
  2434.                             }
  2435.                         });
  2436.                         al.event.add(this, "click._change", function (e) {
  2437.                             if (this._just_changed) {
  2438.                                 this._just_changed = false;
  2439.                                 al.event.simulate("change", this, e, true)
  2440.                             }
  2441.                         })
  2442.                     }
  2443.                     return false
  2444.                 }
  2445.                 al.event.add(this, "beforeactivate._change", function (x) {
  2446.                     var w = x.target;
  2447.                     if (bv.test(w.nodeName) && !w._change_attached) {
  2448.                         al.event.add(w, "change._change", function (e) {
  2449.                             if (this.parentNode && !e.isSimulated) {
  2450.                                 al.event.simulate("change", this.parentNode, e, true)
  2451.                             }
  2452.                         });
  2453.                         w._change_attached = true
  2454.                     }
  2455.                 })
  2456.             },
  2457.             handle: function (w) {
  2458.                 var e = w.target;
  2459.                 if (this !== e || w.isSimulated || w.isTrigger || (e.type !== "radio" && e.type !== "checkbox")) {
  2460.                     return w.handleObj.handler.apply(this, arguments)
  2461.                 }
  2462.             },
  2463.             teardown: function () {
  2464.                 al.event.remove(this, "._change");
  2465.                 return bv.test(this.nodeName)
  2466.             }
  2467.         }
  2468.     }
  2469.     if (!al.support.focusinBubbles) {
  2470.         al.each({
  2471.             focus: "focusin",
  2472.             blur: "focusout"
  2473.         }, function (e, y) {
  2474.             var x = 0,
  2475.                 w = function (z) {
  2476.                     al.event.simulate(y, z.target, al.event.fix(z), true)
  2477.                 };
  2478.             al.event.special[y] = {
  2479.                 setup: function () {
  2480.                     if (x++ === 0) {
  2481.                         an.addEventListener(e, w, true)
  2482.                     }
  2483.                 },
  2484.                 teardown: function () {
  2485.                     if (--x === 0) {
  2486.                         an.removeEventListener(e, w, true)
  2487.                     }
  2488.                 }
  2489.             }
  2490.         })
  2491.     }
  2492.     al.fn.extend({
  2493.         on: function (w, C, B, A, z) {
  2494.             var y, x;
  2495.             if (typeof w === "object") {
  2496.                 if (typeof C !== "string") {
  2497.                     B = C;
  2498.                     C = ap
  2499.                 }
  2500.                 for (x in w) {
  2501.                     this.on(x, C, B, w[x], z)
  2502.                 }
  2503.                 return this
  2504.             }
  2505.             if (B == null && A == null) {
  2506.                 A = C;
  2507.                 B = C = ap
  2508.             } else {
  2509.                 if (A == null) {
  2510.                     if (typeof C === "string") {
  2511.                         A = B;
  2512.                         B = ap
  2513.                     } else {
  2514.                         A = B;
  2515.                         B = C;
  2516.                         C = ap
  2517.                     }
  2518.                 }
  2519.             } if (A === false) {
  2520.                 A = bD
  2521.             } else {
  2522.                 if (!A) {
  2523.                     return this
  2524.                 }
  2525.             } if (z === 1) {
  2526.                 y = A;
  2527.                 A = function (e) {
  2528.                     al().off(e);
  2529.                     return y.apply(this, arguments)
  2530.                 };
  2531.                 A.guid = y.guid || (y.guid = al.guid++)
  2532.             }
  2533.             return this.each(function () {
  2534.                 al.event.add(this, w, A, B, C)
  2535.             })
  2536.         },
  2537.         one: function (w, e, y, x) {
  2538.             return this.on.call(this, w, e, y, x, 1)
  2539.         },
  2540.         off: function (x, w, A) {
  2541.             if (x && x.preventDefault && x.handleObj) {
  2542.                 var z = x.handleObj;
  2543.                 al(x.delegateTarget).off(z.namespace ? z.type + "." + z.namespace : z.type, z.selector, z.handler);
  2544.                 return this
  2545.             }
  2546.             if (typeof x === "object") {
  2547.                 for (var y in x) {
  2548.                     this.off(y, w, x[y])
  2549.                 }
  2550.                 return this
  2551.             }
  2552.             if (w === false || typeof w === "function") {
  2553.                 A = w;
  2554.                 w = ap
  2555.             }
  2556.             if (A === false) {
  2557.                 A = bD
  2558.             }
  2559.             return this.each(function () {
  2560.                 al.event.remove(this, x, A, w)
  2561.             })
  2562.         },
  2563.         bind: function (w, e, x) {
  2564.             return this.on(w, null, e, x)
  2565.         },
  2566.         unbind: function (w, e) {
  2567.             return this.off(w, null, e)
  2568.         },
  2569.         live: function (w, e, x) {
  2570.             al(this.context).on(w, this.selector, e, x);
  2571.             return this
  2572.         },
  2573.         die: function (w, e) {
  2574.             al(this.context).off(w, this.selector || "**", e);
  2575.             return this
  2576.         },
  2577.         delegate: function (w, e, y, x) {
  2578.             return this.on(e, w, y, x)
  2579.         },
  2580.         undelegate: function (w, e, x) {
  2581.             return arguments.length == 1 ? this.off(w, "**") : this.off(e, w, x)
  2582.         },
  2583.         trigger: function (w, e) {
  2584.             return this.each(function () {
  2585.                 al.event.trigger(w, e, this)
  2586.             })
  2587.         },
  2588.         triggerHandler: function (w, e) {
  2589.             if (this[0]) {
  2590.                 return al.event.trigger(w, e, this[0], true)
  2591.             }
  2592.         },
  2593.         toggle: function (z) {
  2594.             var y = arguments,
  2595.                 e = z.guid || al.guid++,
  2596.                 w = 0,
  2597.                 x = function (B) {
  2598.                     var A = (al._data(this, "lastToggle" + z.guid) || 0) % w;
  2599.                     al._data(this, "lastToggle" + z.guid, A + 1);
  2600.                     B.preventDefault();
  2601.                     return y[A].apply(this, arguments) || false
  2602.                 };
  2603.             x.guid = e;
  2604.             while (w < y.length) {
  2605.                 y[w++].guid = e
  2606.             }
  2607.             return this.click(x)
  2608.         },
  2609.         hover: function (w, e) {
  2610.             return this.mouseenter(w).mouseleave(e || w)
  2611.         }
  2612.     });
  2613.     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) {
  2614.         al.fn[w] = function (y, x) {
  2615.             if (x == null) {
  2616.                 x = y;
  2617.                 y = null
  2618.             }
  2619.             return arguments.length > 0 ? this.bind(w, y, x) : this.trigger(w)
  2620.         };
  2621.         if (al.attrFn) {
  2622.             al.attrFn[w] = true
  2623.         }
  2624.         if (a6.test(w)) {
  2625.             al.event.fixHooks[w] = al.event.keyHooks
  2626.         }
  2627.         if (bx.test(w)) {
  2628.             al.event.fixHooks[w] = al.event.mouseHooks
  2629.         }
  2630.     });
  2631.     (function () {
  2632.         var bO = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
  2633.             A = "sizcache" + (Math.random() + "").replace(".", ""),
  2634.             G = 0,
  2635.             M = Object.prototype.toString,
  2636.             z = false,
  2637.             y = true,
  2638.             K = /\\/g,
  2639.             bQ = /\r\n/g,
  2640.             bS = /\W/;
  2641.         [0, 0].sort(function () {
  2642.             y = false;
  2643.             return 0
  2644.         });
  2645.         var L = function (b5, b4, b3, b2) {
  2646.             b3 = b3 || [];
  2647.             b4 = b4 || an;
  2648.             var b1 = b4;
  2649.             if (b4.nodeType !== 1 && b4.nodeType !== 9) {
  2650.                 return []
  2651.             }
  2652.             if (!b5 || typeof b5 !== "string") {
  2653.                 return b3
  2654.             }
  2655.             var bU, b6, b9, bT, b0, b8, b7, bY, bW = true,
  2656.                 bV = L.isXML(b4),
  2657.                 bX = [],
  2658.                 bZ = b5;
  2659.             do {
  2660.                 bO.exec("");
  2661.                 bU = bO.exec(bZ);
  2662.                 if (bU) {
  2663.                     bZ = bU[3];
  2664.                     bX.push(bU[1]);
  2665.                     if (bU[2]) {
  2666.                         bT = bU[3];
  2667.                         break
  2668.                     }
  2669.                 }
  2670.             } while (bU);
  2671.             if (bX.length > 1 && H.exec(b5)) {
  2672.                 if (bX.length === 2 && I.relative[bX[0]]) {
  2673.                     b6 = C(bX[0] + bX[1], b4, b2)
  2674.                 } else {
  2675.                     b6 = I.relative[bX[0]] ? [b4] : L(bX.shift(), b4);
  2676.                     while (bX.length) {
  2677.                         b5 = bX.shift();
  2678.                         if (I.relative[b5]) {
  2679.                             b5 += bX.shift()
  2680.                         }
  2681.                         b6 = C(b5, b6, b2)
  2682.                     }
  2683.                 }
  2684.             } else {
  2685.                 if (!b2 && bX.length > 1 && b4.nodeType === 9 && !bV && I.match.ID.test(bX[0]) && !I.match.ID.test(bX[bX.length - 1])) {
  2686.                     b0 = L.find(bX.shift(), b4, bV);
  2687.                     b4 = b0.expr ? L.filter(b0.expr, b0.set)[0] : b0.set[0]
  2688.                 }
  2689.                 if (b4) {
  2690.                     b0 = b2 ? {
  2691.                         expr: bX.pop(),
  2692.                         set: E(b2)
  2693.                     } : L.find(bX.pop(), bX.length === 1 && (bX[0] === "~" || bX[0] === "+") && b4.parentNode ? b4.parentNode : b4, bV);
  2694.                     b6 = b0.expr ? L.filter(b0.expr, b0.set) : b0.set;
  2695.                     if (bX.length > 0) {
  2696.                         b9 = E(b6)
  2697.                     } else {
  2698.                         bW = false
  2699.                     }
  2700.                     while (bX.length) {
  2701.                         b8 = bX.pop();
  2702.                         b7 = b8;
  2703.                         if (!I.relative[b8]) {
  2704.                             b8 = ""
  2705.                         } else {
  2706.                             b7 = bX.pop()
  2707.                         } if (b7 == null) {
  2708.                             b7 = b4
  2709.                         }
  2710.                         I.relative[b8](b9, b7, bV)
  2711.                     }
  2712.                 } else {
  2713.                     b9 = bX = []
  2714.                 }
  2715.             } if (!b9) {
  2716.                 b9 = b6
  2717.             }
  2718.             if (!b9) {
  2719.                 L.error(b8 || b5)
  2720.             }
  2721.             if (M.call(b9) === "[object Array]") {
  2722.                 if (!bW) {
  2723.                     b3.push.apply(b3, b9)
  2724.                 } else {
  2725.                     if (b4 && b4.nodeType === 1) {
  2726.                         for (bY = 0; b9[bY] != null; bY++) {
  2727.                             if (b9[bY] && (b9[bY] === true || b9[bY].nodeType === 1 && L.contains(b4, b9[bY]))) {
  2728.                                 b3.push(b6[bY])
  2729.                             }
  2730.                         }
  2731.                     } else {
  2732.                         for (bY = 0; b9[bY] != null; bY++) {
  2733.                             if (b9[bY] && b9[bY].nodeType === 1) {
  2734.                                 b3.push(b6[bY])
  2735.                             }
  2736.                         }
  2737.                     }
  2738.                 }
  2739.             } else {
  2740.                 E(b9, b3)
  2741.             } if (bT) {
  2742.                 L(bT, b1, b3, b2);
  2743.                 L.uniqueSort(b3)
  2744.             }
  2745.             return b3
  2746.         };
  2747.         L.uniqueSort = function (e) {
  2748.             if (D) {
  2749.                 z = y;
  2750.                 e.sort(D);
  2751.                 if (z) {
  2752.                     for (var bT = 1; bT < e.length; bT++) {
  2753.                         if (e[bT] === e[bT - 1]) {
  2754.                             e.splice(bT--, 1)
  2755.                         }
  2756.                     }
  2757.                 }
  2758.             }
  2759.             return e
  2760.         };
  2761.         L.matches = function (bT, e) {
  2762.             return L(bT, null, null, e)
  2763.         };
  2764.         L.matchesSelector = function (bT, e) {
  2765.             return L(e, null, null, [bT]).length > 0
  2766.         };
  2767.         L.find = function (b0, bZ, bY) {
  2768.             var bX, bU, bW, bV, e, bT;
  2769.             if (!b0) {
  2770.                 return []
  2771.             }
  2772.             for (bU = 0, bW = I.order.length; bU < bW; bU++) {
  2773.                 e = I.order[bU];
  2774.                 if ((bV = I.leftMatch[e].exec(b0))) {
  2775.                     bT = bV[1];
  2776.                     bV.splice(1, 1);
  2777.                     if (bT.substr(bT.length - 1) !== "\\") {
  2778.                         bV[1] = (bV[1] || "").replace(K, "");
  2779.                         bX = I.find[e](bV, bZ, bY);
  2780.                         if (bX != null) {
  2781.                             b0 = b0.replace(I.match[e], "");
  2782.                             break
  2783.                         }
  2784.                     }
  2785.                 }
  2786.             }
  2787.             if (!bX) {
  2788.                 bX = typeof bZ.getElementsByTagName !== "undefined" ? bZ.getElementsByTagName("*") : []
  2789.             }
  2790.             return {
  2791.                 set: bX,
  2792.                 expr: b0
  2793.             }
  2794.         };
  2795.         L.filter = function (b5, b4, b3, b2) {
  2796.             var b1, bU, bT, b9, b7, bV, bX, bY, b6, bW = b5,
  2797.                 b8 = [],
  2798.                 b0 = b4,
  2799.                 bZ = b4 && b4[0] && L.isXML(b4[0]);
  2800.             while (b5 && b4.length) {
  2801.                 for (bT in I.filter) {
  2802.                     if ((b1 = I.leftMatch[bT].exec(b5)) != null && b1[2]) {
  2803.                         bV = I.filter[bT];
  2804.                         bX = b1[1];
  2805.                         bU = false;
  2806.                         b1.splice(1, 1);
  2807.                         if (bX.substr(bX.length - 1) === "\\") {
  2808.                             continue
  2809.                         }
  2810.                         if (b0 === b8) {
  2811.                             b8 = []
  2812.                         }
  2813.                         if (I.preFilter[bT]) {
  2814.                             b1 = I.preFilter[bT](b1, b0, b3, b8, b2, bZ);
  2815.                             if (!b1) {
  2816.                                 bU = b9 = true
  2817.                             } else {
  2818.                                 if (b1 === true) {
  2819.                                     continue
  2820.                                 }
  2821.                             }
  2822.                         }
  2823.                         if (b1) {
  2824.                             for (bY = 0;
  2825.                                 (b7 = b0[bY]) != null; bY++) {
  2826.                                 if (b7) {
  2827.                                     b9 = bV(b7, b1, bY, b0);
  2828.                                     b6 = b2 ^ b9;
  2829.                                     if (b3 && b9 != null) {
  2830.                                         if (b6) {
  2831.                                             bU = true
  2832.                                         } else {
  2833.                                             b0[bY] = false
  2834.                                         }
  2835.                                     } else {
  2836.                                         if (b6) {
  2837.                                             b8.push(b7);
  2838.                                             bU = true
  2839.                                         }
  2840.                                     }
  2841.                                 }
  2842.                             }
  2843.                         }
  2844.                         if (b9 !== ap) {
  2845.                             if (!b3) {
  2846.                                 b0 = b8
  2847.                             }
  2848.                             b5 = b5.replace(I.match[bT], "");
  2849.                             if (!bU) {
  2850.                                 return []
  2851.                             }
  2852.                             break
  2853.                         }
  2854.                     }
  2855.                 }
  2856.                 if (b5 === bW) {
  2857.                     if (bU == null) {
  2858.                         L.error(b5)
  2859.                     } else {
  2860.                         break
  2861.                     }
  2862.                 }
  2863.                 bW = b5
  2864.             }
  2865.             return b0
  2866.         };
  2867.         L.error = function (e) {
  2868.             throw "Syntax error, unrecognized expression: " + e
  2869.         };
  2870.         var J = L.getText = function (bT) {
  2871.             var bV, bW, e = bT.nodeType,
  2872.                 bU = "";
  2873.             if (e) {
  2874.                 if (e === 1) {
  2875.                     if (typeof bT.textContent === "string") {
  2876.                         return bT.textContent
  2877.                     } else {
  2878.                         if (typeof bT.innerText === "string") {
  2879.                             return bT.innerText.replace(bQ, "")
  2880.                         } else {
  2881.                             for (bT = bT.firstChild; bT; bT = bT.nextSibling) {
  2882.                                 bU += J(bT)
  2883.                             }
  2884.                         }
  2885.                     }
  2886.                 } else {
  2887.                     if (e === 3 || e === 4) {
  2888.                         return bT.nodeValue
  2889.                     }
  2890.                 }
  2891.             } else {
  2892.                 for (bV = 0;
  2893.                     (bW = bT[bV]); bV++) {
  2894.                     if (bW.nodeType !== 8) {
  2895.                         bU += J(bW)
  2896.                     }
  2897.                 }
  2898.             }
  2899.             return bU
  2900.         };
  2901.         var I = L.selectors = {
  2902.             order: ["ID", "NAME", "TAG"],
  2903.             match: {
  2904.                 ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
  2905.                 CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
  2906.                 NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
  2907.                 ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
  2908.                 TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
  2909.                 CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
  2910.                 POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
  2911.                 PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
  2912.             },
  2913.             leftMatch: {},
  2914.             attrMap: {
  2915.                 "class": "className",
  2916.                 "for": "htmlFor"
  2917.             },
  2918.             attrHandle: {
  2919.                 href: function (e) {
  2920.                     return e.getAttribute("href")
  2921.                 },
  2922.                 type: function (e) {
  2923.                     return e.getAttribute("type")
  2924.                 }
  2925.             },
  2926.             relative: {
  2927.                 "+": function (bU, e) {
  2928.                     var bZ = typeof e === "string",
  2929.                         bX = bZ && !bS.test(e),
  2930.                         bY = bZ && !bX;
  2931.                     if (bX) {
  2932.                         e = e.toLowerCase()
  2933.                     }
  2934.                     for (var bV = 0, bT = bU.length, bW; bV < bT; bV++) {
  2935.                         if ((bW = bU[bV])) {
  2936.                             while ((bW = bW.previousSibling) && bW.nodeType !== 1) {}
  2937.                             bU[bV] = bY || bW && bW.nodeName.toLowerCase() === e ? bW || false : bW === e
  2938.                         }
  2939.                     }
  2940.                     if (bY) {
  2941.                         L.filter(e, bU, true)
  2942.                     }
  2943.                 },
  2944.                 ">": function (bU, e) {
  2945.                     var bY, bW = typeof e === "string",
  2946.                         bV = 0,
  2947.                         bT = bU.length;
  2948.                     if (bW && !bS.test(e)) {
  2949.                         e = e.toLowerCase();
  2950.                         for (; bV < bT; bV++) {
  2951.                             bY = bU[bV];
  2952.                             if (bY) {
  2953.                                 var bX = bY.parentNode;
  2954.                                 bU[bV] = bX.nodeName.toLowerCase() === e ? bX : false
  2955.                             }
  2956.                         }
  2957.                     } else {
  2958.                         for (; bV < bT; bV++) {
  2959.                             bY = bU[bV];
  2960.                             if (bY) {
  2961.                                 bU[bV] = bW ? bY.parentNode : bY.parentNode === e
  2962.                             }
  2963.                         }
  2964.                         if (bW) {
  2965.                             L.filter(e, bU, true)
  2966.                         }
  2967.                     }
  2968.                 },
  2969.                 "": function (bU, bT, bX) {
  2970.                     var bW, bV = G++,
  2971.                         e = bP;
  2972.                     if (typeof bT === "string" && !bS.test(bT)) {
  2973.                         bT = bT.toLowerCase();
  2974.                         bW = bT;
  2975.                         e = w
  2976.                     }
  2977.                     e("parentNode", bT, bV, bU, bW, bX)
  2978.                 },
  2979.                 "~": function (bU, bT, bX) {
  2980.                     var bW, bV = G++,
  2981.                         e = bP;
  2982.                     if (typeof bT === "string" && !bS.test(bT)) {
  2983.                         bT = bT.toLowerCase();
  2984.                         bW = bT;
  2985.                         e = w
  2986.                     }
  2987.                     e("previousSibling", bT, bV, bU, bW, bX)
  2988.                 }
  2989.             },
  2990.             find: {
  2991.                 ID: function (bU, bT, bV) {
  2992.                     if (typeof bT.getElementById !== "undefined" && !bV) {
  2993.                         var e = bT.getElementById(bU[1]);
  2994.                         return e && e.parentNode ? [e] : []
  2995.                     }
  2996.                 },
  2997.                 NAME: function (bU, e) {
  2998.                     if (typeof e.getElementsByName !== "undefined") {
  2999.                         var bX = [],
  3000.                             bW = e.getElementsByName(bU[1]);
  3001.                         for (var bV = 0, bT = bW.length; bV < bT; bV++) {
  3002.                             if (bW[bV].getAttribute("name") === bU[1]) {
  3003.                                 bX.push(bW[bV])
  3004.                             }
  3005.                         }
  3006.                         return bX.length === 0 ? null : bX
  3007.                     }
  3008.                 },
  3009.                 TAG: function (bT, e) {
  3010.                     if (typeof e.getElementsByTagName !== "undefined") {
  3011.                         return e.getElementsByTagName(bT[1])
  3012.                     }
  3013.                 }
  3014.             },
  3015.             preFilter: {
  3016.                 CLASS: function (bU, bT, b0, bZ, bY, bX) {
  3017.                     bU = " " + bU[1].replace(K, "") + " ";
  3018.                     if (bX) {
  3019.                         return bU
  3020.                     }
  3021.                     for (var bV = 0, bW;
  3022.                         (bW = bT[bV]) != null; bV++) {
  3023.                         if (bW) {
  3024.                             if (bY ^ (bW.className && (" " + bW.className + " ").replace(/[\t\n\r]/g, " ").indexOf(bU) >= 0)) {
  3025.                                 if (!b0) {
  3026.                                     bZ.push(bW)
  3027.                                 }
  3028.                             } else {
  3029.                                 if (b0) {
  3030.                                     bT[bV] = false
  3031.                                 }
  3032.                             }
  3033.                         }
  3034.                     }
  3035.                     return false
  3036.                 },
  3037.                 ID: function (e) {
  3038.                     return e[1].replace(K, "")
  3039.                 },
  3040.                 TAG: function (bT, e) {
  3041.                     return bT[1].replace(K, "").toLowerCase()
  3042.                 },
  3043.                 CHILD: function (bT) {
  3044.                     if (bT[1] === "nth") {
  3045.                         if (!bT[2]) {
  3046.                             L.error(bT[0])
  3047.                         }
  3048.                         bT[2] = bT[2].replace(/^\+|\s*/g, "");
  3049.                         var e = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(bT[2] === "even" && "2n" || bT[2] === "odd" && "2n+1" || !/\D/.test(bT[2]) && "0n+" + bT[2] || bT[2]);
  3050.                         bT[2] = (e[1] + (e[2] || 1)) - 0;
  3051.                         bT[3] = e[3] - 0
  3052.                     } else {
  3053.                         if (bT[2]) {
  3054.                             L.error(bT[0])
  3055.                         }
  3056.                     }
  3057.                     bT[0] = G++;
  3058.                     return bT
  3059.                 },
  3060.                 ATTR: function (bU, bT, bZ, bY, bX, bW) {
  3061.                     var bV = bU[1] = bU[1].replace(K, "");
  3062.                     if (!bW && I.attrMap[bV]) {
  3063.                         bU[1] = I.attrMap[bV]
  3064.                     }
  3065.                     bU[4] = (bU[4] || bU[5] || "").replace(K, "");
  3066.                     if (bU[2] === "~=") {
  3067.                         bU[4] = " " + bU[4] + " "
  3068.                     }
  3069.                     return bU
  3070.                 },
  3071.                 PSEUDO: function (bU, bT, bY, bX, bW) {
  3072.                     if (bU[1] === "not") {
  3073.                         if ((bO.exec(bU[3]) || "").length > 1 || /^\w/.test(bU[3])) {
  3074.                             bU[3] = L(bU[3], null, null, bT)
  3075.                         } else {
  3076.                             var bV = L.filter(bU[3], bT, bY, true ^ bW);
  3077.                             if (!bY) {
  3078.                                 bX.push.apply(bX, bV)
  3079.                             }
  3080.                             return false
  3081.                         }
  3082.                     } else {
  3083.                         if (I.match.POS.test(bU[0]) || I.match.CHILD.test(bU[0])) {
  3084.                             return true
  3085.                         }
  3086.                     }
  3087.                     return bU
  3088.                 },
  3089.                 POS: function (e) {
  3090.                     e.unshift(true);
  3091.                     return e
  3092.                 }
  3093.             },
  3094.             filters: {
  3095.                 enabled: function (e) {
  3096.                     return e.disabled === false && e.type !== "hidden"
  3097.                 },
  3098.                 disabled: function (e) {
  3099.                     return e.disabled === true
  3100.                 },
  3101.                 checked: function (e) {
  3102.                     return e.checked === true
  3103.                 },
  3104.                 selected: function (e) {
  3105.                     if (e.parentNode) {
  3106.                         e.parentNode.selectedIndex
  3107.                     }
  3108.                     return e.selected === true
  3109.                 },
  3110.                 parent: function (e) {
  3111.                     return !!e.firstChild
  3112.                 },
  3113.                 empty: function (e) {
  3114.                     return !e.firstChild
  3115.                 },
  3116.                 has: function (bT, bU, e) {
  3117.                     return !!L(e[3], bT).length
  3118.                 },
  3119.                 header: function (e) {
  3120.                     return (/h\d/i).test(e.nodeName)
  3121.                 },
  3122.                 text: function (bT) {
  3123.                     var e = bT.getAttribute("type"),
  3124.                         bU = bT.type;
  3125.                     return bT.nodeName.toLowerCase() === "input" && "text" === bU && (e === bU || e === null)
  3126.                 },
  3127.                 radio: function (e) {
  3128.                     return e.nodeName.toLowerCase() === "input" && "radio" === e.type
  3129.                 },
  3130.                 checkbox: function (e) {
  3131.                     return e.nodeName.toLowerCase() === "input" && "checkbox" === e.type
  3132.                 },
  3133.                 file: function (e) {
  3134.                     return e.nodeName.toLowerCase() === "input" && "file" === e.type
  3135.                 },
  3136.                 password: function (e) {
  3137.                     return e.nodeName.toLowerCase() === "input" && "password" === e.type
  3138.                 },
  3139.                 submit: function (bT) {
  3140.                     var e = bT.nodeName.toLowerCase();
  3141.                     return (e === "input" || e === "button") && "submit" === bT.type
  3142.                 },
  3143.                 image: function (e) {
  3144.                     return e.nodeName.toLowerCase() === "input" && "image" === e.type
  3145.                 },
  3146.                 reset: function (bT) {
  3147.                     var e = bT.nodeName.toLowerCase();
  3148.                     return (e === "input" || e === "button") && "reset" === bT.type
  3149.                 },
  3150.                 button: function (bT) {
  3151.                     var e = bT.nodeName.toLowerCase();
  3152.                     return e === "input" && "button" === bT.type || e === "button"
  3153.                 },
  3154.                 input: function (e) {
  3155.                     return (/input|select|textarea|button/i).test(e.nodeName)
  3156.                 },
  3157.                 focus: function (e) {
  3158.                     return e === e.ownerDocument.activeElement
  3159.                 }
  3160.             },
  3161.             setFilters: {
  3162.                 first: function (e, bT) {
  3163.                     return bT === 0
  3164.                 },
  3165.                 last: function (bT, bU, e, bV) {
  3166.                     return bU === bV.length - 1
  3167.                 },
  3168.                 even: function (e, bT) {
  3169.                     return bT % 2 === 0
  3170.                 },
  3171.                 odd: function (e, bT) {
  3172.                     return bT % 2 === 1
  3173.                 },
  3174.                 lt: function (bT, bU, e) {
  3175.                     return bU < e[3] - 0
  3176.                 },
  3177.                 gt: function (bT, bU, e) {
  3178.                     return bU > e[3] - 0
  3179.                 },
  3180.                 nth: function (bT, bU, e) {
  3181.                     return e[3] - 0 === bU
  3182.                 },
  3183.                 eq: function (bT, bU, e) {
  3184.                     return e[3] - 0 === bU
  3185.                 }
  3186.             },
  3187.             filter: {
  3188.                 PSEUDO: function (b1, b0, bW, bZ) {
  3189.                     var bY = b0[1],
  3190.                         bT = I.filters[bY];
  3191.                     if (bT) {
  3192.                         return bT(b1, bW, b0, bZ)
  3193.                     } else {
  3194.                         if (bY === "contains") {
  3195.                             return (b1.textContent || b1.innerText || J([b1]) || "").indexOf(b0[3]) >= 0
  3196.                         } else {
  3197.                             if (bY === "not") {
  3198.                                 var bX = b0[3];
  3199.                                 for (var bV = 0, bU = bX.length; bV < bU; bV++) {
  3200.                                     if (bX[bV] === b1) {
  3201.                                         return false
  3202.                                     }
  3203.                                 }
  3204.                                 return true
  3205.                             } else {
  3206.                                 L.error(bY)
  3207.                             }
  3208.                         }
  3209.                     }
  3210.                 },
  3211.                 CHILD: function (bZ, bY) {
  3212.                     var bX, b2, bW, b1, bT, bV, b0, e = bY[1],
  3213.                         bU = bZ;
  3214.                     switch (e) {
  3215.                     case "only":
  3216.                     case "first":
  3217.                         while ((bU = bU.previousSibling)) {
  3218.                             if (bU.nodeType === 1) {
  3219.                                 return false
  3220.                             }
  3221.                         }
  3222.                         if (e === "first") {
  3223.                             return true
  3224.                         }
  3225.                         bU = bZ;
  3226.                     case "last":
  3227.                         while ((bU = bU.nextSibling)) {
  3228.                             if (bU.nodeType === 1) {
  3229.                                 return false
  3230.                             }
  3231.                         }
  3232.                         return true;
  3233.                     case "nth":
  3234.                         bX = bY[2];
  3235.                         b2 = bY[3];
  3236.                         if (bX === 1 && b2 === 0) {
  3237.                             return true
  3238.                         }
  3239.                         bW = bY[0];
  3240.                         b1 = bZ.parentNode;
  3241.                         if (b1 && (b1[A] !== bW || !bZ.nodeIndex)) {
  3242.                             bV = 0;
  3243.                             for (bU = b1.firstChild; bU; bU = bU.nextSibling) {
  3244.                                 if (bU.nodeType === 1) {
  3245.                                     bU.nodeIndex = ++bV
  3246.                                 }
  3247.                             }
  3248.                             b1[A] = bW
  3249.                         }
  3250.                         b0 = bZ.nodeIndex - b2;
  3251.                         if (bX === 0) {
  3252.                             return b0 === 0
  3253.                         } else {
  3254.                             return (b0 % bX === 0 && b0 / bX >= 0)
  3255.                         }
  3256.                     }
  3257.                 },
  3258.                 ID: function (bT, e) {
  3259.                     return bT.nodeType === 1 && bT.getAttribute("id") === e
  3260.                 },
  3261.                 TAG: function (bT, e) {
  3262.                     return (e === "*" && bT.nodeType === 1) || !!bT.nodeName && bT.nodeName.toLowerCase() === e
  3263.                 },
  3264.                 CLASS: function (bT, e) {
  3265.                     return (" " + (bT.className || bT.getAttribute("class")) + " ").indexOf(e) > -1
  3266.                 },
  3267.                 ATTR: function (bV, bT) {
  3268.                     var bY = bT[1],
  3269.                         e = L.attr ? L.attr(bV, bY) : I.attrHandle[bY] ? I.attrHandle[bY](bV) : bV[bY] != null ? bV[bY] : bV.getAttribute(bY),
  3270.                         bX = e + "",
  3271.                         bW = bT[2],
  3272.                         bU = bT[4];
  3273.                     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
  3274.                 },
  3275.                 POS: function (bT, e, bU, bX) {
  3276.                     var bW = e[2],
  3277.                         bV = I.setFilters[bW];
  3278.                     if (bV) {
  3279.                         return bV(bT, bU, e, bX)
  3280.                     }
  3281.                 }
  3282.             }
  3283.         };
  3284.         var H = I.match.POS,
  3285.             x = function (bT, e) {
  3286.                 return "\\" + (e - 0 + 1)
  3287.             };
  3288.         for (var F in I.match) {
  3289.             I.match[F] = new RegExp(I.match[F].source + (/(?![^\[]*\])(?![^\(]*\))/.source));
  3290.             I.leftMatch[F] = new RegExp(/(^(?:.|\r|\n)*?)/.source + I.match[F].source.replace(/\\(\d+)/g, x))
  3291.         }
  3292.         var E = function (bT, e) {
  3293.             bT = Array.prototype.slice.call(bT, 0);
  3294.             if (e) {
  3295.                 e.push.apply(e, bT);
  3296.                 return e
  3297.             }
  3298.             return bT
  3299.         };
  3300.         try {
  3301.             Array.prototype.slice.call(an.documentElement.childNodes, 0)[0].nodeType
  3302.         } catch (bR) {
  3303.             E = function (bU, e) {
  3304.                 var bW = 0,
  3305.                     bV = e || [];
  3306.                 if (M.call(bU) === "[object Array]") {
  3307.                     Array.prototype.push.apply(bV, bU)
  3308.                 } else {
  3309.                     if (typeof bU.length === "number") {
  3310.                         for (var bT = bU.length; bW < bT; bW++) {
  3311.                             bV.push(bU[bW])
  3312.                         }
  3313.                     } else {
  3314.                         for (; bU[bW]; bW++) {
  3315.                             bV.push(bU[bW])
  3316.                         }
  3317.                     }
  3318.                 }
  3319.                 return bV
  3320.             }
  3321.         }
  3322.         var D, B;
  3323.         if (an.documentElement.compareDocumentPosition) {
  3324.             D = function (bT, e) {
  3325.                 if (bT === e) {
  3326.                     z = true;
  3327.                     return 0
  3328.                 }
  3329.                 if (!bT.compareDocumentPosition || !e.compareDocumentPosition) {
  3330.                     return bT.compareDocumentPosition ? -1 : 1
  3331.                 }
  3332.                 return bT.compareDocumentPosition(e) & 4 ? -1 : 1
  3333.             }
  3334.         } else {
  3335.             D = function (b0, bZ) {
  3336.                 if (b0 === bZ) {
  3337.                     z = true;
  3338.                     return 0
  3339.                 } else {
  3340.                     if (b0.sourceIndex && bZ.sourceIndex) {
  3341.                         return b0.sourceIndex - bZ.sourceIndex
  3342.                     }
  3343.                 }
  3344.                 var bX, bT, bU = [],
  3345.                     e = [],
  3346.                     bW = b0.parentNode,
  3347.                     bY = bZ.parentNode,
  3348.                     b1 = bW;
  3349.                 if (bW === bY) {
  3350.                     return B(b0, bZ)
  3351.                 } else {
  3352.                     if (!bW) {
  3353.                         return -1
  3354.                     } else {
  3355.                         if (!bY) {
  3356.                             return 1
  3357.                         }
  3358.                     }
  3359.                 }
  3360.                 while (b1) {
  3361.                     bU.unshift(b1);
  3362.                     b1 = b1.parentNode
  3363.                 }
  3364.                 b1 = bY;
  3365.                 while (b1) {
  3366.                     e.unshift(b1);
  3367.                     b1 = b1.parentNode
  3368.                 }
  3369.                 bX = bU.length;
  3370.                 bT = e.length;
  3371.                 for (var bV = 0; bV < bX && bV < bT; bV++) {
  3372.                     if (bU[bV] !== e[bV]) {
  3373.                         return B(bU[bV], e[bV])
  3374.                     }
  3375.                 }
  3376.                 return bV === bX ? B(b0, e[bV], -1) : B(bU[bV], bZ, 1)
  3377.             };
  3378.             B = function (bT, e, bV) {
  3379.                 if (bT === e) {
  3380.                     return bV
  3381.                 }
  3382.                 var bU = bT.nextSibling;
  3383.                 while (bU) {
  3384.                     if (bU === e) {
  3385.                         return -1
  3386.                     }
  3387.                     bU = bU.nextSibling
  3388.                 }
  3389.                 return 1
  3390.             }
  3391.         }(function () {
  3392.             var bT = an.createElement("div"),
  3393.                 bU = "script" + (new Date()).getTime(),
  3394.                 e = an.documentElement;
  3395.             bT.innerHTML = "<a name='" + bU + "'/>";
  3396.             e.insertBefore(bT, e.firstChild);
  3397.             if (an.getElementById(bU)) {
  3398.                 I.find.ID = function (bX, bW, bY) {
  3399.                     if (typeof bW.getElementById !== "undefined" && !bY) {
  3400.                         var bV = bW.getElementById(bX[1]);
  3401.                         return bV ? bV.id === bX[1] || typeof bV.getAttributeNode !== "undefined" && bV.getAttributeNode("id").nodeValue === bX[1] ? [bV] : ap : []
  3402.                     }
  3403.                 };
  3404.                 I.filter.ID = function (bW, bV) {
  3405.                     var bX = typeof bW.getAttributeNode !== "undefined" && bW.getAttributeNode("id");
  3406.                     return bW.nodeType === 1 && bX && bX.nodeValue === bV
  3407.                 }
  3408.             }
  3409.             e.removeChild(bT);
  3410.             e = bT = null
  3411.         })();
  3412.         (function () {
  3413.             var bT = an.createElement("div");
  3414.             bT.appendChild(an.createComment(""));
  3415.             if (bT.getElementsByTagName("*").length > 0) {
  3416.                 I.find.TAG = function (bU, e) {
  3417.                     var bX = e.getElementsByTagName(bU[1]);
  3418.                     if (bU[1] === "*") {
  3419.                         var bW = [];
  3420.                         for (var bV = 0; bX[bV]; bV++) {
  3421.                             if (bX[bV].nodeType === 1) {
  3422.                                 bW.push(bX[bV])
  3423.                             }
  3424.                         }
  3425.                         bX = bW
  3426.                     }
  3427.                     return bX
  3428.                 }
  3429.             }
  3430.             bT.innerHTML = "<a href='#'></a>";
  3431.             if (bT.firstChild && typeof bT.firstChild.getAttribute !== "undefined" && bT.firstChild.getAttribute("href") !== "#") {
  3432.                 I.attrHandle.href = function (e) {
  3433.                     return e.getAttribute("href", 2)
  3434.                 }
  3435.             }
  3436.             bT = null
  3437.         })(); if (an.querySelectorAll) {
  3438.             (function () {
  3439.                 var bT = L,
  3440.                     bV = an.createElement("div"),
  3441.                     bU = "__sizzle__";
  3442.                 bV.innerHTML = "<p class='TEST'></p>";
  3443.                 if (bV.querySelectorAll && bV.querySelectorAll(".TEST").length === 0) {
  3444.                     return
  3445.                 }
  3446.                 L = function (b7, b5, b4, b3) {
  3447.                     b5 = b5 || an;
  3448.                     if (!b3 && !L.isXML(b5)) {
  3449.                         var b2 = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b7);
  3450.                         if (b2 && (b5.nodeType === 1 || b5.nodeType === 9)) {
  3451.                             if (b2[1]) {
  3452.                                 return E(b5.getElementsByTagName(b7), b4)
  3453.                             } else {
  3454.                                 if (b2[2] && I.find.CLASS && b5.getElementsByClassName) {
  3455.                                     return E(b5.getElementsByClassName(b2[2]), b4)
  3456.                                 }
  3457.                             }
  3458.                         }
  3459.                         if (b5.nodeType === 9) {
  3460.                             if (b7 === "body" && b5.body) {
  3461.                                 return E([b5.body], b4)
  3462.                             } else {
  3463.                                 if (b2 && b2[3]) {
  3464.                                     var b1 = b5.getElementById(b2[3]);
  3465.                                     if (b1 && b1.parentNode) {
  3466.                                         if (b1.id === b2[3]) {
  3467.                                             return E([b1], b4)
  3468.                                         }
  3469.                                     } else {
  3470.                                         return E([], b4)
  3471.                                     }
  3472.                                 }
  3473.                             }
  3474.                             try {
  3475.                                 return E(b5.querySelectorAll(b7), b4)
  3476.                             } catch (bY) {}
  3477.                         } else {
  3478.                             if (b5.nodeType === 1 && b5.nodeName.toLowerCase() !== "object") {
  3479.                                 var b0 = b5,
  3480.                                     bX = b5.getAttribute("id"),
  3481.                                     bW = bX || bU,
  3482.                                     b8 = b5.parentNode,
  3483.                                     b6 = /^\s*[+~]/.test(b7);
  3484.                                 if (!bX) {
  3485.                                     b5.setAttribute("id", bW)
  3486.                                 } else {
  3487.                                     bW = bW.replace(/'/g, "\\$&")
  3488.                                 } if (b6 && b8) {
  3489.                                     b5 = b5.parentNode
  3490.                                 }
  3491.                                 try {
  3492.                                     if (!b6 || b8) {
  3493.                                         return E(b5.querySelectorAll("[id='" + bW + "'] " + b7), b4)
  3494.                                     }
  3495.                                 } catch (bZ) {} finally {
  3496.                                     if (!bX) {
  3497.                                         b0.removeAttribute("id")
  3498.                                     }
  3499.                                 }
  3500.                             }
  3501.                         }
  3502.                     }
  3503.                     return bT(b7, b5, b4, b3)
  3504.                 };
  3505.                 for (var e in bT) {
  3506.                     L[e] = bT[e]
  3507.                 }
  3508.                 bV = null
  3509.             })()
  3510.         }(function () {
  3511.             var bW = an.documentElement,
  3512.                 bU = bW.matchesSelector || bW.mozMatchesSelector || bW.webkitMatchesSelector || bW.msMatchesSelector;
  3513.             if (bU) {
  3514.                 var bT = !bU.call(an.createElement("div"), "div"),
  3515.                     e = false;
  3516.                 try {
  3517.                     bU.call(an.documentElement, "[test!='']:sizzle")
  3518.                 } catch (bV) {
  3519.                     e = true
  3520.                 }
  3521.                 L.matchesSelector = function (bY, bX) {
  3522.                     bX = bX.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
  3523.                     if (!L.isXML(bY)) {
  3524.                         try {
  3525.                             if (e || !I.match.PSEUDO.test(bX) && !/!=/.test(bX)) {
  3526.                                 var b0 = bU.call(bY, bX);
  3527.                                 if (b0 || !bT || bY.document && bY.document.nodeType !== 11) {
  3528.                                     return b0
  3529.                                 }
  3530.                             }
  3531.                         } catch (bZ) {}
  3532.                     }
  3533.                     return L(bX, null, null, [bY]).length > 0
  3534.                 }
  3535.             }
  3536.         })();
  3537.         (function () {
  3538.             var e = an.createElement("div");
  3539.             e.innerHTML = "<div class='test e'></div><div class='test'></div>";
  3540.             if (!e.getElementsByClassName || e.getElementsByClassName("e").length === 0) {
  3541.                 return
  3542.             }
  3543.             e.lastChild.className = "e";
  3544.             if (e.getElementsByClassName("e").length === 1) {
  3545.                 return
  3546.             }
  3547.             I.order.splice(1, 0, "CLASS");
  3548.             I.find.CLASS = function (bU, bT, bV) {
  3549.                 if (typeof bT.getElementsByClassName !== "undefined" && !bV) {
  3550.                     return bT.getElementsByClassName(bU[1])
  3551.                 }
  3552.             };
  3553.             e = null
  3554.         })();
  3555.  
  3556.         function w(b2, b1, b0, bZ, bY, bX) {
  3557.             for (var bU = 0, bT = bZ.length; bU < bT; bU++) {
  3558.                 var bW = bZ[bU];
  3559.                 if (bW) {
  3560.                     var bV = false;
  3561.                     bW = bW[b2];
  3562.                     while (bW) {
  3563.                         if (bW[A] === b0) {
  3564.                             bV = bZ[bW.sizset];
  3565.                             break
  3566.                         }
  3567.                         if (bW.nodeType === 1 && !bX) {
  3568.                             bW[A] = b0;
  3569.                             bW.sizset = bU
  3570.                         }
  3571.                         if (bW.nodeName.toLowerCase() === b1) {
  3572.                             bV = bW;
  3573.                             break
  3574.                         }
  3575.                         bW = bW[b2]
  3576.                     }
  3577.                     bZ[bU] = bV
  3578.                 }
  3579.             }
  3580.         }
  3581.  
  3582.         function bP(b2, b1, b0, bZ, bY, bX) {
  3583.             for (var bU = 0, bT = bZ.length; bU < bT; bU++) {
  3584.                 var bW = bZ[bU];
  3585.                 if (bW) {
  3586.                     var bV = false;
  3587.                     bW = bW[b2];
  3588.                     while (bW) {
  3589.                         if (bW[A] === b0) {
  3590.                             bV = bZ[bW.sizset];
  3591.                             break
  3592.                         }
  3593.                         if (bW.nodeType === 1) {
  3594.                             if (!bX) {
  3595.                                 bW[A] = b0;
  3596.                                 bW.sizset = bU
  3597.                             }
  3598.                             if (typeof b1 !== "string") {
  3599.                                 if (bW === b1) {
  3600.                                     bV = true;
  3601.                                     break
  3602.                                 }
  3603.                             } else {
  3604.                                 if (L.filter(b1, [bW]).length > 0) {
  3605.                                     bV = bW;
  3606.                                     break
  3607.                                 }
  3608.                             }
  3609.                         }
  3610.                         bW = bW[b2]
  3611.                     }
  3612.                     bZ[bU] = bV
  3613.                 }
  3614.             }
  3615.         }
  3616.         if (an.documentElement.contains) {
  3617.             L.contains = function (bT, e) {
  3618.                 return bT !== e && (bT.contains ? bT.contains(e) : true)
  3619.             }
  3620.         } else {
  3621.             if (an.documentElement.compareDocumentPosition) {
  3622.                 L.contains = function (bT, e) {
  3623.                     return !!(bT.compareDocumentPosition(e) & 16)
  3624.                 }
  3625.             } else {
  3626.                 L.contains = function () {
  3627.                     return false
  3628.                 }
  3629.             }
  3630.         }
  3631.         L.isXML = function (bT) {
  3632.             var e = (bT ? bT.ownerDocument || bT : 0).documentElement;
  3633.             return e ? e.nodeName !== "HTML" : false
  3634.         };
  3635.         var C = function (b0, bZ, bW) {
  3636.             var bV, bX = [],
  3637.                 bU = "",
  3638.                 bY = bZ.nodeType ? [bZ] : bZ;
  3639.             while ((bV = I.match.PSEUDO.exec(b0))) {
  3640.                 bU += bV[0];
  3641.                 b0 = b0.replace(I.match.PSEUDO, "")
  3642.             }
  3643.             b0 = I.relative[b0] ? b0 + "*" : b0;
  3644.             for (var bT = 0, e = bY.length; bT < e; bT++) {
  3645.                 L(b0, bY[bT], bX, bW)
  3646.             }
  3647.             return L.filter(bU, bX)
  3648.         };
  3649.         L.attr = al.attr;
  3650.         L.selectors.attrMap = {};
  3651.         al.find = L;
  3652.         al.expr = L.selectors;
  3653.         al.expr[":"] = al.expr.filters;
  3654.         al.unique = L.uniqueSort;
  3655.         al.text = L.getText;
  3656.         al.isXMLDoc = L.isXML;
  3657.         al.contains = L.contains
  3658.     })();
  3659.     var a3 = /Until$/,
  3660.         aD = /^(?:parents|prevUntil|prevAll)/,
  3661.         bs = /,/,
  3662.         bI = /^.[^:#\[\.,]*$/,
  3663.         ad = Array.prototype.slice,
  3664.         V = al.expr.match.POS,
  3665.         aJ = {
  3666.             children: true,
  3667.             contents: true,
  3668.             next: true,
  3669.             prev: true
  3670.         };
  3671.     al.fn.extend({
  3672.         find: function (x) {
  3673.             var e = this,
  3674.                 y, w;
  3675.             if (typeof x !== "string") {
  3676.                 return al(x).filter(function () {
  3677.                     for (y = 0, w = e.length; y < w; y++) {
  3678.                         if (al.contains(e[y], this)) {
  3679.                             return true
  3680.                         }
  3681.                     }
  3682.                 })
  3683.             }
  3684.             var C = this.pushStack("", "find", x),
  3685.                 A, B, z;
  3686.             for (y = 0, w = this.length; y < w; y++) {
  3687.                 A = C.length;
  3688.                 al.find(x, this[y], C);
  3689.                 if (y > 0) {
  3690.                     for (B = A; B < C.length; B++) {
  3691.                         for (z = 0; z < A; z++) {
  3692.                             if (C[z] === C[B]) {
  3693.                                 C.splice(B--, 1);
  3694.                                 break
  3695.                             }
  3696.                         }
  3697.                     }
  3698.                 }
  3699.             }
  3700.             return C
  3701.         },
  3702.         has: function (w) {
  3703.             var e = al(w);
  3704.             return this.filter(function () {
  3705.                 for (var y = 0, x = e.length; y < x; y++) {
  3706.                     if (al.contains(this, e[y])) {
  3707.                         return true
  3708.                     }
  3709.                 }
  3710.             })
  3711.         },
  3712.         not: function (e) {
  3713.             return this.pushStack(aQ(this, e, false), "not", e)
  3714.         },
  3715.         filter: function (e) {
  3716.             return this.pushStack(aQ(this, e, true), "filter", e)
  3717.         },
  3718.         is: function (e) {
  3719.             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)
  3720.         },
  3721.         closest: function (y, w) {
  3722.             var D = [],
  3723.                 z, x, C = this[0];
  3724.             if (al.isArray(y)) {
  3725.                 var B = 1;
  3726.                 while (C && C.ownerDocument && C !== w) {
  3727.                     for (z = 0; z < y.length; z++) {
  3728.                         if (al(C).is(y[z])) {
  3729.                             D.push({
  3730.                                 selector: y[z],
  3731.                                 elem: C,
  3732.                                 level: B
  3733.                             })
  3734.                         }
  3735.                     }
  3736.                     C = C.parentNode;
  3737.                     B++
  3738.                 }
  3739.                 return D
  3740.             }
  3741.             var A = V.test(y) || typeof y !== "string" ? al(y, w || this.context) : 0;
  3742.             for (z = 0, x = this.length; z < x; z++) {
  3743.                 C = this[z];
  3744.                 while (C) {
  3745.                     if (A ? A.index(C) > -1 : al.find.matchesSelector(C, y)) {
  3746.                         D.push(C);
  3747.                         break
  3748.                     } else {
  3749.                         C = C.parentNode;
  3750.                         if (!C || !C.ownerDocument || C === w || C.nodeType === 11) {
  3751.                             break
  3752.                         }
  3753.                     }
  3754.                 }
  3755.             }
  3756.             D = D.length > 1 ? al.unique(D) : D;
  3757.             return this.pushStack(D, "closest", y)
  3758.         },
  3759.         index: function (e) {
  3760.             if (!e) {
  3761.                 return (this[0] && this[0].parentNode) ? this.prevAll().length : -1
  3762.             }
  3763.             if (typeof e === "string") {
  3764.                 return al.inArray(this[0], al(e))
  3765.             }
  3766.             return al.inArray(e.jquery ? e[0] : e, this)
  3767.         },
  3768.         add: function (w, e) {
  3769.             var y = typeof w === "string" ? al(w, e) : al.makeArray(w && w.nodeType ? [w] : w),
  3770.                 x = al.merge(this.get(), y);
  3771.             return this.pushStack(Q(y[0]) || Q(x[0]) ? x : al.unique(x))
  3772.         },
  3773.         andSelf: function () {
  3774.             return this.add(this.prevObject)
  3775.         }
  3776.     });
  3777.  
  3778.     function Q(e) {
  3779.         return !e || !e.parentNode || e.parentNode.nodeType === 11
  3780.     }
  3781.     al.each({
  3782.         parent: function (w) {
  3783.             var e = w.parentNode;
  3784.             return e && e.nodeType !== 11 ? e : null
  3785.         },
  3786.         parents: function (e) {
  3787.             return al.dir(e, "parentNode")
  3788.         },
  3789.         parentsUntil: function (w, x, e) {
  3790.             return al.dir(w, "parentNode", e)
  3791.         },
  3792.         next: function (e) {
  3793.             return al.nth(e, 2, "nextSibling")
  3794.         },
  3795.         prev: function (e) {
  3796.             return al.nth(e, 2, "previousSibling")
  3797.         },
  3798.         nextAll: function (e) {
  3799.             return al.dir(e, "nextSibling")
  3800.         },
  3801.         prevAll: function (e) {
  3802.             return al.dir(e, "previousSibling")
  3803.         },
  3804.         nextUntil: function (w, x, e) {
  3805.             return al.dir(w, "nextSibling", e)
  3806.         },
  3807.         prevUntil: function (w, x, e) {
  3808.             return al.dir(w, "previousSibling", e)
  3809.         },
  3810.         siblings: function (e) {
  3811.             return al.sibling(e.parentNode.firstChild, e)
  3812.         },
  3813.         children: function (e) {
  3814.             return al.sibling(e.firstChild)
  3815.         },
  3816.         contents: function (e) {
  3817.             return al.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : al.makeArray(e.childNodes)
  3818.         }
  3819.     }, function (x, w) {
  3820.         al.fn[x] = function (y, e) {
  3821.             var A = al.map(this, w, y),
  3822.                 z = ad.call(arguments);
  3823.             if (!a3.test(x)) {
  3824.                 e = y
  3825.             }
  3826.             if (e && typeof e === "string") {
  3827.                 A = al.filter(e, A)
  3828.             }
  3829.             A = this.length > 1 && !aJ[x] ? al.unique(A) : A;
  3830.             if ((this.length > 1 || bs.test(e)) && aD.test(x)) {
  3831.                 A = A.reverse()
  3832.             }
  3833.             return this.pushStack(A, x, z.join(","))
  3834.         }
  3835.     });
  3836.     al.extend({
  3837.         filter: function (w, e, x) {
  3838.             if (x) {
  3839.                 w = ":not(" + w + ")"
  3840.             }
  3841.             return e.length === 1 ? al.find.matchesSelector(e[0], w) ? [e[0]] : [] : al.find.matches(w, e)
  3842.         },
  3843.         dir: function (w, e, z) {
  3844.             var y = [],
  3845.                 x = w[e];
  3846.             while (x && x.nodeType !== 9 && (z === ap || x.nodeType !== 1 || !al(x).is(z))) {
  3847.                 if (x.nodeType === 1) {
  3848.                     y.push(x)
  3849.                 }
  3850.                 x = x[e]
  3851.             }
  3852.             return y
  3853.         },
  3854.         nth: function (x, w, A, z) {
  3855.             w = w || 1;
  3856.             var y = 0;
  3857.             for (; x; x = x[A]) {
  3858.                 if (x.nodeType === 1 && ++y === w) {
  3859.                     break
  3860.                 }
  3861.             }
  3862.             return x
  3863.         },
  3864.         sibling: function (x, e) {
  3865.             var w = [];
  3866.             for (; x; x = x.nextSibling) {
  3867.                 if (x.nodeType === 1 && x !== e) {
  3868.                     w.push(x)
  3869.                 }
  3870.             }
  3871.             return w
  3872.         }
  3873.     });
  3874.  
  3875.     function aQ(z, y, x) {
  3876.         y = y || 0;
  3877.         if (al.isFunction(y)) {
  3878.             return al.grep(z, function (A, B) {
  3879.                 var e = !!y.call(A, B, A);
  3880.                 return e === x
  3881.             })
  3882.         } else {
  3883.             if (y.nodeType) {
  3884.                 return al.grep(z, function (e, A) {
  3885.                     return (e === y) === x
  3886.                 })
  3887.             } else {
  3888.                 if (typeof y === "string") {
  3889.                     var w = al.grep(z, function (e) {
  3890.                         return e.nodeType === 1
  3891.                     });
  3892.                     if (bI.test(y)) {
  3893.                         return al.filter(y, w, !x)
  3894.                     } else {
  3895.                         y = al.filter(y, w)
  3896.                     }
  3897.                 }
  3898.             }
  3899.         }
  3900.         return al.grep(z, function (e, A) {
  3901.             return (al.inArray(e, y) >= 0) === x
  3902.         })
  3903.     }
  3904.  
  3905.     function a(w) {
  3906.         var e = a2.split(" "),
  3907.             x = w.createDocumentFragment();
  3908.         if (x.createElement) {
  3909.             while (e.length) {
  3910.                 x.createElement(e.pop())
  3911.             }
  3912.         }
  3913.         return x
  3914.     }
  3915.     var a2 = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
  3916.         av = / jQuery\d+="(?:\d+|null)"/g,
  3917.         aE = /^\s+/,
  3918.         ae = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
  3919.         c = /<([\w:]+)/,
  3920.         u = /<tbody/i,
  3921.         ah = /<|&#?\w+;/,
  3922.         at = /<(?:script|style)/i,
  3923.         ac = /<(?:script|object|embed|option|style)/i,
  3924.         aw = new RegExp("<(?:" + a2.replace(" ", "|") + ")", "i"),
  3925.         m = /checked\s*(?:[^=]|=\s*.checked.)/i,
  3926.         bF = /\/(java|ecma)script/i,
  3927.         a5 = /^\s*<!(?:\[CDATA\[|\-\-)/,
  3928.         aI = {
  3929.             option: [1, "<select multiple='multiple'>", "</select>"],
  3930.             legend: [1, "<fieldset>", "</fieldset>"],
  3931.             thead: [1, "<table>", "</table>"],
  3932.             tr: [2, "<table><tbody>", "</tbody></table>"],
  3933.             td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  3934.             col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  3935.             area: [1, "<map>", "</map>"],
  3936.             _default: [0, "", ""]
  3937.         },
  3938.         ao = a(an);
  3939.     aI.optgroup = aI.option;
  3940.     aI.tbody = aI.tfoot = aI.colgroup = aI.caption = aI.thead;
  3941.     aI.th = aI.td;
  3942.     if (!al.support.htmlSerialize) {
  3943.         aI._default = [1, "div<div>", "</div>"]
  3944.     }
  3945.     al.fn.extend({
  3946.         text: function (e) {
  3947.             if (al.isFunction(e)) {
  3948.                 return this.each(function (x) {
  3949.                     var w = al(this);
  3950.                     w.text(e.call(this, x, w.text()))
  3951.                 })
  3952.             }
  3953.             if (typeof e !== "object" && e !== ap) {
  3954.                 return this.empty().append((this[0] && this[0].ownerDocument || an).createTextNode(e))
  3955.             }
  3956.             return al.text(this)
  3957.         },
  3958.         wrapAll: function (e) {
  3959.             if (al.isFunction(e)) {
  3960.                 return this.each(function (x) {
  3961.                     al(this).wrapAll(e.call(this, x))
  3962.                 })
  3963.             }
  3964.             if (this[0]) {
  3965.                 var w = al(e, this[0].ownerDocument).eq(0).clone(true);
  3966.                 if (this[0].parentNode) {
  3967.                     w.insertBefore(this[0])
  3968.                 }
  3969.                 w.map(function () {
  3970.                     var x = this;
  3971.                     while (x.firstChild && x.firstChild.nodeType === 1) {
  3972.                         x = x.firstChild
  3973.                     }
  3974.                     return x
  3975.                 }).append(this)
  3976.             }
  3977.             return this
  3978.         },
  3979.         wrapInner: function (e) {
  3980.             if (al.isFunction(e)) {
  3981.                 return this.each(function (w) {
  3982.                     al(this).wrapInner(e.call(this, w))
  3983.                 })
  3984.             }
  3985.             return this.each(function () {
  3986.                 var w = al(this),
  3987.                     x = w.contents();
  3988.                 if (x.length) {
  3989.                     x.wrapAll(e)
  3990.                 } else {
  3991.                     w.append(e)
  3992.                 }
  3993.             })
  3994.         },
  3995.         wrap: function (e) {
  3996.             return this.each(function () {
  3997.                 al(this).wrapAll(e)
  3998.             })
  3999.         },
  4000.         unwrap: function () {
  4001.             return this.parent().each(function () {
  4002.                 if (!al.nodeName(this, "body")) {
  4003.                     al(this).replaceWith(this.childNodes)
  4004.                 }
  4005.             }).end()
  4006.         },
  4007.         append: function () {
  4008.             return this.domManip(arguments, true, function (e) {
  4009.                 if (this.nodeType === 1) {
  4010.                     this.appendChild(e)
  4011.                 }
  4012.             })
  4013.         },
  4014.         prepend: function () {
  4015.             return this.domManip(arguments, true, function (e) {
  4016.                 if (this.nodeType === 1) {
  4017.                     this.insertBefore(e, this.firstChild)
  4018.                 }
  4019.             })
  4020.         },
  4021.         before: function () {
  4022.             if (this[0] && this[0].parentNode) {
  4023.                 return this.domManip(arguments, false, function (w) {
  4024.                     this.parentNode.insertBefore(w, this)
  4025.                 })
  4026.             } else {
  4027.                 if (arguments.length) {
  4028.                     var e = al(arguments[0]);
  4029.                     e.push.apply(e, this.toArray());
  4030.                     return this.pushStack(e, "before", arguments)
  4031.                 }
  4032.             }
  4033.         },
  4034.         after: function () {
  4035.             if (this[0] && this[0].parentNode) {
  4036.                 return this.domManip(arguments, false, function (w) {
  4037.                     this.parentNode.insertBefore(w, this.nextSibling)
  4038.                 })
  4039.             } else {
  4040.                 if (arguments.length) {
  4041.                     var e = this.pushStack(this, "after", arguments);
  4042.                     e.push.apply(e, al(arguments[0]).toArray());
  4043.                     return e
  4044.                 }
  4045.             }
  4046.         },
  4047.         remove: function (w, e) {
  4048.             for (var x = 0, y;
  4049.                 (y = this[x]) != null; x++) {
  4050.                 if (!w || al.filter(w, [y]).length) {
  4051.                     if (!e && y.nodeType === 1) {
  4052.                         al.cleanData(y.getElementsByTagName("*"));
  4053.                         al.cleanData([y])
  4054.                     }
  4055.                     if (y.parentNode) {
  4056.                         y.parentNode.removeChild(y)
  4057.                     }
  4058.                 }
  4059.             }
  4060.             return this
  4061.         },
  4062.         empty: function () {
  4063.             for (var e = 0, w;
  4064.                 (w = this[e]) != null; e++) {
  4065.                 if (w.nodeType === 1) {
  4066.                     al.cleanData(w.getElementsByTagName("*"))
  4067.                 }
  4068.                 while (w.firstChild) {
  4069.                     w.removeChild(w.firstChild)
  4070.                 }
  4071.             }
  4072.             return this
  4073.         },
  4074.         clone: function (w, e) {
  4075.             w = w == null ? false : w;
  4076.             e = e == null ? w : e;
  4077.             return this.map(function () {
  4078.                 return al.clone(this, w, e)
  4079.             })
  4080.         },
  4081.         html: function (w) {
  4082.             if (w === ap) {
  4083.                 return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(av, "") : null
  4084.             } else {
  4085.                 if (typeof w === "string" && !at.test(w) && (al.support.leadingWhitespace || !aE.test(w)) && !aI[(c.exec(w) || ["", ""])[1].toLowerCase()]) {
  4086.                     w = w.replace(ae, "<$1></$2>");
  4087.                     try {
  4088.                         for (var y = 0, x = this.length; y < x; y++) {
  4089.                             if (this[y].nodeType === 1) {
  4090.                                 al.cleanData(this[y].getElementsByTagName("*"));
  4091.                                 this[y].innerHTML = w
  4092.                             }
  4093.                         }
  4094.                     } catch (z) {
  4095.                         this.empty().append(w)
  4096.                     }
  4097.                 } else {
  4098.                     if (al.isFunction(w)) {
  4099.                         this.each(function (A) {
  4100.                             var e = al(this);
  4101.                             e.html(w.call(this, A, e.html()))
  4102.                         })
  4103.                     } else {
  4104.                         this.empty().append(w)
  4105.                     }
  4106.                 }
  4107.             }
  4108.             return this
  4109.         },
  4110.         replaceWith: function (e) {
  4111.             if (this[0] && this[0].parentNode) {
  4112.                 if (al.isFunction(e)) {
  4113.                     return this.each(function (y) {
  4114.                         var x = al(this),
  4115.                             w = x.html();
  4116.                         x.replaceWith(e.call(this, y, w))
  4117.                     })
  4118.                 }
  4119.                 if (typeof e !== "string") {
  4120.                     e = al(e).detach()
  4121.                 }
  4122.                 return this.each(function () {
  4123.                     var w = this.nextSibling,
  4124.                         x = this.parentNode;
  4125.                     al(this).remove();
  4126.                     if (w) {
  4127.                         al(w).before(e)
  4128.                     } else {
  4129.                         al(x).append(e)
  4130.                     }
  4131.                 })
  4132.             } else {
  4133.                 return this.length ? this.pushStack(al(al.isFunction(e) ? e() : e), "replaceWith", e) : this
  4134.             }
  4135.         },
  4136.         detach: function (e) {
  4137.             return this.remove(e, true)
  4138.         },
  4139.         domManip: function (F, E, D) {
  4140.             var B, z, C, H, G = F[0],
  4141.                 x = [];
  4142.             if (!al.support.checkClone && arguments.length === 3 && typeof G === "string" && m.test(G)) {
  4143.                 return this.each(function () {
  4144.                     al(this).domManip(F, E, D, true)
  4145.                 })
  4146.             }
  4147.             if (al.isFunction(G)) {
  4148.                 return this.each(function (I) {
  4149.                     var e = al(this);
  4150.                     F[0] = G.call(this, I, E ? e.html() : ap);
  4151.                     e.domManip(F, E, D)
  4152.                 })
  4153.             }
  4154.             if (this[0]) {
  4155.                 H = G && G.parentNode;
  4156.                 if (al.support.parentNode && H && H.nodeType === 11 && H.childNodes.length === this.length) {
  4157.                     B = {
  4158.                         fragment: H
  4159.                     }
  4160.                 } else {
  4161.                     B = al.buildFragment(F, this, x)
  4162.                 }
  4163.                 C = B.fragment;
  4164.                 if (C.childNodes.length === 1) {
  4165.                     z = C = C.firstChild
  4166.                 } else {
  4167.                     z = C.firstChild
  4168.                 } if (z) {
  4169.                     E = E && al.nodeName(z, "tr");
  4170.                     for (var y = 0, w = this.length, A = w - 1; y < w; y++) {
  4171.                         D.call(E ? bt(this[y], z) : this[y], B.cacheable || (w > 1 && y < A) ? al.clone(C, true, true) : C)
  4172.                     }
  4173.                 }
  4174.                 if (x.length) {
  4175.                     al.each(x, bH)
  4176.                 }
  4177.             }
  4178.             return this
  4179.         }
  4180.     });
  4181.  
  4182.     function bt(w, e) {
  4183.         return al.nodeName(w, "table") ? (w.getElementsByTagName("tbody")[0] || w.appendChild(w.ownerDocument.createElement("tbody"))) : w
  4184.     }
  4185.  
  4186.     function r(x, e) {
  4187.         if (e.nodeType !== 1 || !al.hasData(x)) {
  4188.             return
  4189.         }
  4190.         var C, z, w, B = al._data(x),
  4191.             A = al._data(e, B),
  4192.             y = B.events;
  4193.         if (y) {
  4194.             delete A.handle;
  4195.             A.events = {};
  4196.             for (C in y) {
  4197.                 for (z = 0, w = y[C].length; z < w; z++) {
  4198.                     al.event.add(e, C + (y[C][z].namespace ? "." : "") + y[C][z].namespace, y[C][z], y[C][z].data)
  4199.                 }
  4200.             }
  4201.         }
  4202.         if (A.data) {
  4203.             A.data = al.extend({}, A.data)
  4204.         }
  4205.     }
  4206.  
  4207.     function ax(w, e) {
  4208.         var x;
  4209.         if (e.nodeType !== 1) {
  4210.             return
  4211.         }
  4212.         if (e.clearAttributes) {
  4213.             e.clearAttributes()
  4214.         }
  4215.         if (e.mergeAttributes) {
  4216.             e.mergeAttributes(w)
  4217.         }
  4218.         x = e.nodeName.toLowerCase();
  4219.         if (x === "object") {
  4220.             e.outerHTML = w.outerHTML
  4221.         } else {
  4222.             if (x === "input" && (w.type === "checkbox" || w.type === "radio")) {
  4223.                 if (w.checked) {
  4224.                     e.defaultChecked = e.checked = w.checked
  4225.                 }
  4226.                 if (e.value !== w.value) {
  4227.                     e.value = w.value
  4228.                 }
  4229.             } else {
  4230.                 if (x === "option") {
  4231.                     e.selected = w.defaultSelected
  4232.                 } else {
  4233.                     if (x === "input" || x === "textarea") {
  4234.                         e.defaultValue = w.defaultValue
  4235.                     }
  4236.                 }
  4237.             }
  4238.         }
  4239.         e.removeAttribute(al.expando)
  4240.     }
  4241.     al.buildFragment = function (x, w, C) {
  4242.         var B, e, y, z, A = x[0];
  4243.         if (w && w[0]) {
  4244.             z = w[0].ownerDocument || w[0]
  4245.         }
  4246.         if (!z.createDocumentFragment) {
  4247.             z = an
  4248.         }
  4249.         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))) {
  4250.             e = true;
  4251.             y = al.fragments[A];
  4252.             if (y && y !== 1) {
  4253.                 B = y
  4254.             }
  4255.         }
  4256.         if (!B) {
  4257.             B = z.createDocumentFragment();
  4258.             al.clean(x, z, B, C)
  4259.         }
  4260.         if (e) {
  4261.             al.fragments[A] = y ? B : 1
  4262.         }
  4263.         return {
  4264.             fragment: B,
  4265.             cacheable: e
  4266.         }
  4267.     };
  4268.     al.fragments = {};
  4269.     al.each({
  4270.         appendTo: "append",
  4271.         prependTo: "prepend",
  4272.         insertBefore: "before",
  4273.         insertAfter: "after",
  4274.         replaceAll: "replaceWith"
  4275.     }, function (x, w) {
  4276.         al.fn[x] = function (z) {
  4277.             var e = [],
  4278.                 C = al(z),
  4279.                 B = this.length === 1 && this[0].parentNode;
  4280.             if (B && B.nodeType === 11 && B.childNodes.length === 1 && C.length === 1) {
  4281.                 C[w](this[0]);
  4282.                 return this
  4283.             } else {
  4284.                 for (var A = 0, y = C.length; A < y; A++) {
  4285.                     var D = (A > 0 ? this.clone(true) : this).get();
  4286.                     al(C[A])[w](D);
  4287.                     e = e.concat(D)
  4288.                 }
  4289.                 return this.pushStack(e, x, C.selector)
  4290.             }
  4291.         }
  4292.     });
  4293.  
  4294.     function by(e) {
  4295.         if (typeof e.getElementsByTagName !== "undefined") {
  4296.             return e.getElementsByTagName("*")
  4297.         } else {
  4298.             if (typeof e.querySelectorAll !== "undefined") {
  4299.                 return e.querySelectorAll("*")
  4300.             } else {
  4301.                 return []
  4302.             }
  4303.         }
  4304.     }
  4305.  
  4306.     function aK(e) {
  4307.         if (e.type === "checkbox" || e.type === "radio") {
  4308.             e.defaultChecked = e.checked
  4309.         }
  4310.     }
  4311.  
  4312.     function S(w) {
  4313.         var e = (w.nodeName || "").toLowerCase();
  4314.         if (e === "input") {
  4315.             aK(w)
  4316.         } else {
  4317.             if (e !== "script" && typeof w.getElementsByTagName !== "undefined") {
  4318.                 al.grep(w.getElementsByTagName("input"), aK)
  4319.             }
  4320.         }
  4321.     }
  4322.     al.extend({
  4323.         clone: function (x, w, B) {
  4324.             var A = x.cloneNode(true),
  4325.                 e, y, z;
  4326.             if ((!al.support.noCloneEvent || !al.support.noCloneChecked) && (x.nodeType === 1 || x.nodeType === 11) && !al.isXMLDoc(x)) {
  4327.                 ax(x, A);
  4328.                 e = by(x);
  4329.                 y = by(A);
  4330.                 for (z = 0; e[z]; ++z) {
  4331.                     if (y[z]) {
  4332.                         ax(e[z], y[z])
  4333.                     }
  4334.                 }
  4335.             }
  4336.             if (w) {
  4337.                 r(x, A);
  4338.                 if (B) {
  4339.                     e = by(x);
  4340.                     y = by(A);
  4341.                     for (z = 0; e[z]; ++z) {
  4342.                         r(e[z], y[z])
  4343.                     }
  4344.                 }
  4345.             }
  4346.             e = y = null;
  4347.             return A
  4348.         },
  4349.         clean: function (M, L, K, J) {
  4350.             var I;
  4351.             L = L || an;
  4352.             if (typeof L.createElement === "undefined") {
  4353.                 L = L.ownerDocument || L[0] && L[0].ownerDocument || an
  4354.             }
  4355.             var H = [],
  4356.                 C;
  4357.             for (var F = 0, z;
  4358.                 (z = M[F]) != null; F++) {
  4359.                 if (typeof z === "number") {
  4360.                     z += ""
  4361.                 }
  4362.                 if (!z) {
  4363.                     continue
  4364.                 }
  4365.                 if (typeof z === "string") {
  4366.                     if (!ah.test(z)) {
  4367.                         z = L.createTextNode(z)
  4368.                     } else {
  4369.                         z = z.replace(ae, "<$1></$2>");
  4370.                         var G = (c.exec(z) || ["", ""])[1].toLowerCase(),
  4371.                             x = aI[G] || aI._default,
  4372.                             E = x[0],
  4373.                             w = L.createElement("div");
  4374.                         if (L === an) {
  4375.                             ao.appendChild(w)
  4376.                         } else {
  4377.                             a(L).appendChild(w)
  4378.                         }
  4379.                         w.innerHTML = x[1] + z + x[2];
  4380.                         while (E--) {
  4381.                             w = w.lastChild
  4382.                         }
  4383.                         if (!al.support.tbody) {
  4384.                             var B = u.test(z),
  4385.                                 D = G === "table" && !B ? w.firstChild && w.firstChild.childNodes : x[1] === "<table>" && !B ? w.childNodes : [];
  4386.                             for (C = D.length - 1; C >= 0; --C) {
  4387.                                 if (al.nodeName(D[C], "tbody") && !D[C].childNodes.length) {
  4388.                                     D[C].parentNode.removeChild(D[C])
  4389.                                 }
  4390.                             }
  4391.                         }
  4392.                         if (!al.support.leadingWhitespace && aE.test(z)) {
  4393.                             w.insertBefore(L.createTextNode(aE.exec(z)[0]), w.firstChild)
  4394.                         }
  4395.                         z = w.childNodes
  4396.                     }
  4397.                 }
  4398.                 var A;
  4399.                 if (!al.support.appendChecked) {
  4400.                     if (z[0] && typeof (A = z.length) === "number") {
  4401.                         for (C = 0; C < A; C++) {
  4402.                             S(z[C])
  4403.                         }
  4404.                     } else {
  4405.                         S(z)
  4406.                     }
  4407.                 }
  4408.                 if (z.nodeType) {
  4409.                     H.push(z)
  4410.                 } else {
  4411.                     H = al.merge(H, z)
  4412.                 }
  4413.             }
  4414.             if (K) {
  4415.                 I = function (e) {
  4416.                     return !e.type || bF.test(e.type)
  4417.                 };
  4418.                 for (F = 0; H[F]; F++) {
  4419.                     if (J && al.nodeName(H[F], "script") && (!H[F].type || H[F].type.toLowerCase() === "text/javascript")) {
  4420.                         J.push(H[F].parentNode ? H[F].parentNode.removeChild(H[F]) : H[F])
  4421.                     } else {
  4422.                         if (H[F].nodeType === 1) {
  4423.                             var y = al.grep(H[F].getElementsByTagName("script"), I);
  4424.                             H.splice.apply(H, [F + 1, 0].concat(y))
  4425.                         }
  4426.                         K.appendChild(H[F])
  4427.                     }
  4428.                 }
  4429.             }
  4430.             return H
  4431.         },
  4432.         cleanData: function (D) {
  4433.             var C, w, e = al.cache,
  4434.                 A = al.event.special,
  4435.                 z = al.support.deleteExpando;
  4436.             for (var y = 0, x;
  4437.                 (x = D[y]) != null; y++) {
  4438.                 if (x.nodeName && al.noData[x.nodeName.toLowerCase()]) {
  4439.                     continue
  4440.                 }
  4441.                 w = x[al.expando];
  4442.                 if (w) {
  4443.                     C = e[w];
  4444.                     if (C && C.events) {
  4445.                         for (var B in C.events) {
  4446.                             if (A[B]) {
  4447.                                 al.event.remove(x, B)
  4448.                             } else {
  4449.                                 al.removeEvent(x, B, C.handle)
  4450.                             }
  4451.                         }
  4452.                         if (C.handle) {
  4453.                             C.handle.elem = null
  4454.                         }
  4455.                     }
  4456.                     if (z) {
  4457.                         delete x[al.expando]
  4458.                     } else {
  4459.                         if (x.removeAttribute) {
  4460.                             x.removeAttribute(al.expando)
  4461.                         }
  4462.                     }
  4463.                     delete e[w]
  4464.                 }
  4465.             }
  4466.         }
  4467.     });
  4468.  
  4469.     function bH(w, e) {
  4470.         if (e.src) {
  4471.             al.ajax({
  4472.                 url: e.src,
  4473.                 async: false,
  4474.                 dataType: "script"
  4475.             })
  4476.         } else {
  4477.             al.globalEval((e.text || e.textContent || e.innerHTML || "").replace(a5, "/*$0*/"))
  4478.         } if (e.parentNode) {
  4479.             e.parentNode.removeChild(e)
  4480.         }
  4481.     }
  4482.     var a1 = /alpha\([^)]*\)/i,
  4483.         aG = /opacity=([^)]*)/,
  4484.         O = /([A-Z]|^ms)/g,
  4485.         bu = /^-?\d+(?:px)?$/i,
  4486.         bG = /^-?\d/,
  4487.         W = /^([\-+])=([\-+.\de]+)/,
  4488.         bq = {
  4489.             position: "absolute",
  4490.             visibility: "hidden",
  4491.             display: "block"
  4492.         },
  4493.         aA = ["Left", "Right"],
  4494.         bl = ["Top", "Bottom"],
  4495.         ak, aT, bh;
  4496.     al.fn.css = function (x, w) {
  4497.         if (arguments.length === 2 && w === ap) {
  4498.             return this
  4499.         }
  4500.         return al.access(this, x, w, true, function (y, e, z) {
  4501.             return z !== ap ? al.style(y, e, z) : al.css(y, e)
  4502.         })
  4503.     };
  4504.     al.extend({
  4505.         cssHooks: {
  4506.             opacity: {
  4507.                 get: function (w, e) {
  4508.                     if (e) {
  4509.                         var x = ak(w, "opacity", "opacity");
  4510.                         return x === "" ? "1" : x
  4511.                     } else {
  4512.                         return w.style.opacity
  4513.                     }
  4514.                 }
  4515.             }
  4516.         },
  4517.         cssNumber: {
  4518.             fillOpacity: true,
  4519.             fontWeight: true,
  4520.             lineHeight: true,
  4521.             opacity: true,
  4522.             orphans: true,
  4523.             widows: true,
  4524.             zIndex: true,
  4525.             zoom: true
  4526.         },
  4527.         cssProps: {
  4528.             "float": al.support.cssFloat ? "cssFloat" : "styleFloat"
  4529.         },
  4530.         style: function (E, D, B, A) {
  4531.             if (!E || E.nodeType === 3 || E.nodeType === 8 || !E.style) {
  4532.                 return
  4533.             }
  4534.             var x, C, y = al.camelCase(D),
  4535.                 w = E.style,
  4536.                 F = al.cssHooks[y];
  4537.             D = al.cssProps[y] || y;
  4538.             if (B !== ap) {
  4539.                 C = typeof B;
  4540.                 if (C === "string" && (x = W.exec(B))) {
  4541.                     B = (+(x[1] + 1) * +x[2]) + parseFloat(al.css(E, D));
  4542.                     C = "number"
  4543.                 }
  4544.                 if (B == null || C === "number" && isNaN(B)) {
  4545.                     return
  4546.                 }
  4547.                 if (C === "number" && !al.cssNumber[y]) {
  4548.                     B += "px"
  4549.                 }
  4550.                 if (!F || !("set" in F) || (B = F.set(E, B)) !== ap) {
  4551.                     try {
  4552.                         w[D] = B
  4553.                     } catch (z) {}
  4554.                 }
  4555.             } else {
  4556.                 if (F && "get" in F && (x = F.get(E, false, A)) !== ap) {
  4557.                     return x
  4558.                 }
  4559.                 return w[D]
  4560.             }
  4561.         },
  4562.         css: function (x, w, z) {
  4563.             var y, e;
  4564.             w = al.camelCase(w);
  4565.             e = al.cssHooks[w];
  4566.             w = al.cssProps[w] || w;
  4567.             if (w === "cssFloat") {
  4568.                 w = "float"
  4569.             }
  4570.             if (e && "get" in e && (y = e.get(x, true, z)) !== ap) {
  4571.                 return y
  4572.             } else {
  4573.                 if (ak) {
  4574.                     return ak(x, w)
  4575.                 }
  4576.             }
  4577.         },
  4578.         swap: function (x, w, A) {
  4579.             var z = {};
  4580.             for (var y in w) {
  4581.                 z[y] = x.style[y];
  4582.                 x.style[y] = w[y]
  4583.             }
  4584.             A.call(x);
  4585.             for (y in w) {
  4586.                 x.style[y] = z[y]
  4587.             }
  4588.         }
  4589.     });
  4590.     al.curCSS = al.css;
  4591.     al.each(["height", "width"], function (w, x) {
  4592.         al.cssHooks[x] = {
  4593.             get: function (y, e, A) {
  4594.                 var z;
  4595.                 if (e) {
  4596.                     if (y.offsetWidth !== 0) {
  4597.                         return n(y, x, A)
  4598.                     } else {
  4599.                         al.swap(y, bq, function () {
  4600.                             z = n(y, x, A)
  4601.                         })
  4602.                     }
  4603.                     return z
  4604.                 }
  4605.             },
  4606.             set: function (y, e) {
  4607.                 if (bu.test(e)) {
  4608.                     e = parseFloat(e);
  4609.                     if (e >= 0) {
  4610.                         return e + "px"
  4611.                     }
  4612.                 } else {
  4613.                     return e
  4614.                 }
  4615.             }
  4616.         }
  4617.     });
  4618.     if (!al.support.opacity) {
  4619.         al.cssHooks.opacity = {
  4620.             get: function (w, e) {
  4621.                 return aG.test((e && w.currentStyle ? w.currentStyle.filter : w.style.filter) || "") ? (parseFloat(RegExp.$1) / 100) + "" : e ? "1" : ""
  4622.             },
  4623.             set: function (w, e) {
  4624.                 var A = w.style,
  4625.                     y = w.currentStyle,
  4626.                     x = al.isNumeric(e) ? "alpha(opacity=" + e * 100 + ")" : "",
  4627.                     z = y && y.filter || A.filter || "";
  4628.                 A.zoom = 1;
  4629.                 if (e >= 1 && al.trim(z.replace(a1, "")) === "") {
  4630.                     A.removeAttribute("filter");
  4631.                     if (y && !y.filter) {
  4632.                         return
  4633.                     }
  4634.                 }
  4635.                 A.filter = a1.test(z) ? z.replace(a1, x) : z + " " + x
  4636.             }
  4637.         }
  4638.     }
  4639.     al(function () {
  4640.         if (!al.support.reliableMarginRight) {
  4641.             al.cssHooks.marginRight = {
  4642.                 get: function (w, e) {
  4643.                     var x;
  4644.                     al.swap(w, {
  4645.                         display: "inline-block"
  4646.                     }, function () {
  4647.                         if (e) {
  4648.                             x = ak(w, "margin-right", "marginRight")
  4649.                         } else {
  4650.                             x = w.style.marginRight
  4651.                         }
  4652.                     });
  4653.                     return x
  4654.                 }
  4655.             }
  4656.         }
  4657.     });
  4658.     if (an.defaultView && an.defaultView.getComputedStyle) {
  4659.         aT = function (w, e) {
  4660.             var z, y, x;
  4661.             e = e.replace(O, "-$1").toLowerCase();
  4662.             if (!(y = w.ownerDocument.defaultView)) {
  4663.                 return ap
  4664.             }
  4665.             if ((x = y.getComputedStyle(w, null))) {
  4666.                 z = x.getPropertyValue(e);
  4667.                 if (z === "" && !al.contains(w.ownerDocument.documentElement, w)) {
  4668.                     z = al.style(w, e)
  4669.                 }
  4670.             }
  4671.             return z
  4672.         }
  4673.     }
  4674.     if (an.documentElement.currentStyle) {
  4675.         bh = function (x, w) {
  4676.             var B, e, A, y = x.currentStyle && x.currentStyle[w],
  4677.                 z = x.style;
  4678.             if (y === null && z && (A = z[w])) {
  4679.                 y = A
  4680.             }
  4681.             if (!bu.test(y) && bG.test(y)) {
  4682.                 B = z.left;
  4683.                 e = x.runtimeStyle && x.runtimeStyle.left;
  4684.                 if (e) {
  4685.                     x.runtimeStyle.left = x.currentStyle.left
  4686.                 }
  4687.                 z.left = w === "fontSize" ? "1em" : (y || 0);
  4688.                 y = z.pixelLeft + "px";
  4689.                 z.left = B;
  4690.                 if (e) {
  4691.                     x.runtimeStyle.left = e
  4692.                 }
  4693.             }
  4694.             return y === "" ? "auto" : y
  4695.         }
  4696.     }
  4697.     ak = aT || bh;
  4698.  
  4699.     function n(w, e, z) {
  4700.         var y = e === "width" ? w.offsetWidth : w.offsetHeight,
  4701.             x = e === "width" ? aA : bl;
  4702.         if (y > 0) {
  4703.             if (z !== "border") {
  4704.                 al.each(x, function () {
  4705.                     if (!z) {
  4706.                         y -= parseFloat(al.css(w, "padding" + this)) || 0
  4707.                     }
  4708.                     if (z === "margin") {
  4709.                         y += parseFloat(al.css(w, z + this)) || 0
  4710.                     } else {
  4711.                         y -= parseFloat(al.css(w, "border" + this + "Width")) || 0
  4712.                     }
  4713.                 })
  4714.             }
  4715.             return y + "px"
  4716.         }
  4717.         y = ak(w, e, e);
  4718.         if (y < 0 || y == null) {
  4719.             y = w.style[e] || 0
  4720.         }
  4721.         y = parseFloat(y) || 0;
  4722.         if (z) {
  4723.             al.each(x, function () {
  4724.                 y += parseFloat(al.css(w, "padding" + this)) || 0;
  4725.                 if (z !== "padding") {
  4726.                     y += parseFloat(al.css(w, "border" + this + "Width")) || 0
  4727.                 }
  4728.                 if (z === "margin") {
  4729.                     y += parseFloat(al.css(w, z + this)) || 0
  4730.                 }
  4731.             })
  4732.         }
  4733.         return y + "px"
  4734.     }
  4735.     if (al.expr && al.expr.filters) {
  4736.         al.expr.filters.hidden = function (x) {
  4737.             var w = x.offsetWidth,
  4738.                 e = x.offsetHeight;
  4739.             return (w === 0 && e === 0) || (!al.support.reliableHiddenOffsets && ((x.style && x.style.display) || al.css(x, "display")) === "none")
  4740.         };
  4741.         al.expr.filters.visible = function (e) {
  4742.             return !al.expr.filters.hidden(e)
  4743.         }
  4744.     }
  4745.     var a0 = /%20/g,
  4746.         aC = /\[\]$/,
  4747.         bL = /\r?\n/g,
  4748.         bJ = /#.*$/,
  4749.         aN = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
  4750.         bj = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
  4751.         a4 = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
  4752.         ba = /^(?:GET|HEAD)$/,
  4753.         b = /^\/\//,
  4754.         Z = /\?/,
  4755.         bp = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
  4756.         o = /^(?:select|textarea)/i,
  4757.         g = /\s+/,
  4758.         bK = /([?&])_=[^&]*/,
  4759.         Y = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
  4760.         P = al.fn.load,
  4761.         am = {},
  4762.         p = {},
  4763.         aO, q, bf = ["*/"] + ["*"];
  4764.     try {
  4765.         aO = bE.href
  4766.     } catch (aH) {
  4767.         aO = an.createElement("a");
  4768.         aO.href = "";
  4769.         aO = aO.href
  4770.     }
  4771.     q = Y.exec(aO.toLowerCase()) || [];
  4772.  
  4773.     function d(e) {
  4774.         return function (x, w) {
  4775.             if (typeof x !== "string") {
  4776.                 w = x;
  4777.                 x = "*"
  4778.             }
  4779.             if (al.isFunction(w)) {
  4780.                 var D = x.toLowerCase().split(g),
  4781.                     z = 0,
  4782.                     A = D.length,
  4783.                     y, B, C;
  4784.                 for (; z < A; z++) {
  4785.                     y = D[z];
  4786.                     C = /^\+/.test(y);
  4787.                     if (C) {
  4788.                         y = y.substr(1) || "*"
  4789.                     }
  4790.                     B = e[y] = e[y] || [];
  4791.                     B[C ? "unshift" : "push"](w)
  4792.                 }
  4793.             }
  4794.         }
  4795.     }
  4796.  
  4797.     function bg(F, E, D, C, B, A) {
  4798.         B = B || E.dataTypes[0];
  4799.         A = A || {};
  4800.         A[B] = true;
  4801.         var z = F[B],
  4802.             x = 0,
  4803.             w = z ? z.length : 0,
  4804.             y = (F === am),
  4805.             G;
  4806.         for (; x < w && (y || !G); x++) {
  4807.             G = z[x](E, D, C);
  4808.             if (typeof G === "string") {
  4809.                 if (!y || A[G]) {
  4810.                     G = ap
  4811.                 } else {
  4812.                     E.dataTypes.unshift(G);
  4813.                     G = bg(F, E, D, C, G, A)
  4814.                 }
  4815.             }
  4816.         }
  4817.         if ((y || !G) && !A["*"]) {
  4818.             G = bg(F, E, D, C, "*", A)
  4819.         }
  4820.         return G
  4821.     }
  4822.  
  4823.     function az(x, e) {
  4824.         var z, w, y = al.ajaxSettings.flatOptions || {};
  4825.         for (z in e) {
  4826.             if (e[z] !== ap) {
  4827.                 (y[z] ? x : (w || (w = {})))[z] = e[z]
  4828.             }
  4829.         }
  4830.         if (w) {
  4831.             al.extend(true, x, w)
  4832.         }
  4833.     }
  4834.     al.fn.extend({
  4835.         load: function (C, B, A) {
  4836.             if (typeof C !== "string" && P) {
  4837.                 return P.apply(this, arguments)
  4838.             } else {
  4839.                 if (!this.length) {
  4840.                     return this
  4841.                 }
  4842.             }
  4843.             var z = C.indexOf(" ");
  4844.             if (z >= 0) {
  4845.                 var y = C.slice(z, C.length);
  4846.                 C = C.slice(0, z)
  4847.             }
  4848.             var x = "GET";
  4849.             if (B) {
  4850.                 if (al.isFunction(B)) {
  4851.                     A = B;
  4852.                     B = ap
  4853.                 } else {
  4854.                     if (typeof B === "object") {
  4855.                         B = al.param(B, al.ajaxSettings.traditional);
  4856.                         x = "POST"
  4857.                     }
  4858.                 }
  4859.             }
  4860.             var w = this;
  4861.             al.ajax({
  4862.                 url: C,
  4863.                 type: x,
  4864.                 dataType: "html",
  4865.                 data: B,
  4866.                 complete: function (D, e, E) {
  4867.                     E = D.responseText;
  4868.                     if (D.isResolved()) {
  4869.                         D.done(function (F) {
  4870.                             E = F
  4871.                         });
  4872.                         w.html(y ? al("<div>").append(E.replace(bp, "")).find(y) : E)
  4873.                     }
  4874.                     if (A) {
  4875.                         w.each(A, [E, e, D])
  4876.                     }
  4877.                 }
  4878.             });
  4879.             return this
  4880.         },
  4881.         serialize: function () {
  4882.             return al.param(this.serializeArray())
  4883.         },
  4884.         serializeArray: function () {
  4885.             return this.map(function () {
  4886.                 return this.elements ? al.makeArray(this.elements) : this
  4887.             }).filter(function () {
  4888.                 return this.name && !this.disabled && (this.checked || o.test(this.nodeName) || bj.test(this.type))
  4889.             }).map(function (w, e) {
  4890.                 var x = al(this).val();
  4891.                 return x == null ? null : al.isArray(x) ? al.map(x, function (y, z) {
  4892.                     return {
  4893.                         name: e.name,
  4894.                         value: y.replace(bL, "\r\n")
  4895.                     }
  4896.                 }) : {
  4897.                     name: e.name,
  4898.                     value: x.replace(bL, "\r\n")
  4899.                 }
  4900.             }).get()
  4901.         }
  4902.     });
  4903.     al.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (e, w) {
  4904.         al.fn[w] = function (x) {
  4905.             return this.bind(w, x)
  4906.         }
  4907.     });
  4908.     al.each(["get", "post"], function (w, x) {
  4909.         al[x] = function (y, e, A, z) {
  4910.             if (al.isFunction(e)) {
  4911.                 z = z || A;
  4912.                 A = e;
  4913.                 e = ap
  4914.             }
  4915.             return al.ajax({
  4916.                 type: x,
  4917.                 url: y,
  4918.                 data: e,
  4919.                 success: A,
  4920.                 dataType: z
  4921.             })
  4922.         }
  4923.     });
  4924.     al.extend({
  4925.         getScript: function (w, e) {
  4926.             return al.get(w, ap, e, "script")
  4927.         },
  4928.         getJSON: function (w, e, x) {
  4929.             return al.get(w, e, x, "json")
  4930.         },
  4931.         ajaxSetup: function (w, e) {
  4932.             if (e) {
  4933.                 az(w, al.ajaxSettings)
  4934.             } else {
  4935.                 e = w;
  4936.                 w = al.ajaxSettings
  4937.             }
  4938.             az(w, e);
  4939.             return w
  4940.         },
  4941.         ajaxSettings: {
  4942.             url: aO,
  4943.             isLocal: a4.test(q[1]),
  4944.             global: true,
  4945.             type: "GET",
  4946.             contentType: "application/x-www-form-urlencoded",
  4947.             processData: true,
  4948.             async: true,
  4949.             accepts: {
  4950.                 xml: "application/xml, text/xml",
  4951.                 html: "text/html",
  4952.                 text: "text/plain",
  4953.                 json: "application/json, text/javascript",
  4954.                 "*": bf
  4955.             },
  4956.             contents: {
  4957.                 xml: /xml/,
  4958.                 html: /html/,
  4959.                 json: /json/
  4960.             },
  4961.             responseFields: {
  4962.                 xml: "responseXML",
  4963.                 text: "responseText"
  4964.             },
  4965.             converters: {
  4966.                 "* text": aq.String,
  4967.                 "text html": true,
  4968.                 "text json": al.parseJSON,
  4969.                 "text xml": al.parseXML
  4970.             },
  4971.             flatOptions: {
  4972.                 context: true,
  4973.                 url: true
  4974.             }
  4975.         },
  4976.         ajaxPrefilter: d(am),
  4977.         ajaxTransport: d(p),
  4978.         ajax: function (L, K) {
  4979.             if (typeof L === "object") {
  4980.                 K = L;
  4981.                 L = ap
  4982.             }
  4983.             K = K || {};
  4984.             var B = al.ajaxSetup({}, K),
  4985.                 bU = B.context || B,
  4986.                 E = bU !== B && (bU.nodeType || bU instanceof al) ? al(bU) : al.event,
  4987.                 bT = al.Deferred(),
  4988.                 bP = al.Callbacks("once memory"),
  4989.                 z = B.statusCode || {},
  4990.                 A, F = {},
  4991.                 bQ = {},
  4992.                 bS, x, M, C, G, y = 0,
  4993.                 w, J, H = {
  4994.                     readyState: 0,
  4995.                     setRequestHeader: function (bV, e) {
  4996.                         if (!y) {
  4997.                             var bW = bV.toLowerCase();
  4998.                             bV = bQ[bW] = bQ[bW] || bV;
  4999.                             F[bV] = e
  5000.                         }
  5001.                         return this
  5002.                     },
  5003.                     getAllResponseHeaders: function () {
  5004.                         return y === 2 ? bS : null
  5005.                     },
  5006.                     getResponseHeader: function (bV) {
  5007.                         var e;
  5008.                         if (y === 2) {
  5009.                             if (!x) {
  5010.                                 x = {};
  5011.                                 while ((e = aN.exec(bS))) {
  5012.                                     x[e[1].toLowerCase()] = e[2]
  5013.                                 }
  5014.                             }
  5015.                             e = x[bV.toLowerCase()]
  5016.                         }
  5017.                         return e === ap ? null : e
  5018.                     },
  5019.                     overrideMimeType: function (e) {
  5020.                         if (!y) {
  5021.                             B.mimeType = e
  5022.                         }
  5023.                         return this
  5024.                     },
  5025.                     abort: function (e) {
  5026.                         e = e || "abort";
  5027.                         if (M) {
  5028.                             M.abort(e)
  5029.                         }
  5030.                         D(0, e);
  5031.                         return this
  5032.                     }
  5033.                 };
  5034.  
  5035.             function D(b5, b4, b2, b1) {
  5036.                 if (y === 2) {
  5037.                     return
  5038.                 }
  5039.                 y = 2;
  5040.                 if (C) {
  5041.                     clearTimeout(C)
  5042.                 }
  5043.                 M = ap;
  5044.                 bS = b1 || "";
  5045.                 H.readyState = b5 > 0 ? 4 : 0;
  5046.                 var bY, b6, b3, bW = b4,
  5047.                     bX = b2 ? bC(B, H, b2) : ap,
  5048.                     bV, b0;
  5049.                 if (b5 >= 200 && b5 < 300 || b5 === 304) {
  5050.                     if (B.ifModified) {
  5051.                         if ((bV = H.getResponseHeader("Last-Modified"))) {
  5052.                             al.lastModified[A] = bV
  5053.                         }
  5054.                         if ((b0 = H.getResponseHeader("Etag"))) {
  5055.                             al.etag[A] = b0
  5056.                         }
  5057.                     }
  5058.                     if (b5 === 304) {
  5059.                         bW = "notmodified";
  5060.                         bY = true
  5061.                     } else {
  5062.                         try {
  5063.                             b6 = U(B, bX);
  5064.                             bW = "success";
  5065.                             bY = true
  5066.                         } catch (bZ) {
  5067.                             bW = "parsererror";
  5068.                             b3 = bZ
  5069.                         }
  5070.                     }
  5071.                 } else {
  5072.                     b3 = bW;
  5073.                     if (!bW || b5) {
  5074.                         bW = "error";
  5075.                         if (b5 < 0) {
  5076.                             b5 = 0
  5077.                         }
  5078.                     }
  5079.                 }
  5080.                 H.status = b5;
  5081.                 H.statusText = "" + (b4 || bW);
  5082.                 if (bY) {
  5083.                     bT.resolveWith(bU, [b6, bW, H])
  5084.                 } else {
  5085.                     bT.rejectWith(bU, [H, bW, b3])
  5086.                 }
  5087.                 H.statusCode(z);
  5088.                 z = ap;
  5089.                 if (w) {
  5090.                     E.trigger("ajax" + (bY ? "Success" : "Error"), [H, B, bY ? b6 : b3])
  5091.                 }
  5092.                 bP.fireWith(bU, [H, bW]);
  5093.                 if (w) {
  5094.                     E.trigger("ajaxComplete", [H, B]);
  5095.                     if (!(--al.active)) {
  5096.                         al.event.trigger("ajaxStop")
  5097.                     }
  5098.                 }
  5099.             }
  5100.             bT.promise(H);
  5101.             H.success = H.done;
  5102.             H.error = H.fail;
  5103.             H.complete = bP.add;
  5104.             H.statusCode = function (bV) {
  5105.                 if (bV) {
  5106.                     var e;
  5107.                     if (y < 2) {
  5108.                         for (e in bV) {
  5109.                             z[e] = [z[e], bV[e]]
  5110.                         }
  5111.                     } else {
  5112.                         e = bV[H.status];
  5113.                         H.then(e, e)
  5114.                     }
  5115.                 }
  5116.                 return this
  5117.             };
  5118.             B.url = ((L || B.url) + "").replace(bJ, "").replace(b, q[1] + "//");
  5119.             B.dataTypes = al.trim(B.dataType || "*").toLowerCase().split(g);
  5120.             if (B.crossDomain == null) {
  5121.                 G = Y.exec(B.url.toLowerCase());
  5122.                 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))))
  5123.             }
  5124.             if (B.data && B.processData && typeof B.data !== "string") {
  5125.                 B.data = al.param(B.data, B.traditional)
  5126.             }
  5127.             bg(am, B, K, H);
  5128.             if (y === 2) {
  5129.                 return false
  5130.             }
  5131.             w = B.global;
  5132.             B.type = B.type.toUpperCase();
  5133.             B.hasContent = !ba.test(B.type);
  5134.             if (w && al.active++ === 0) {
  5135.                 al.event.trigger("ajaxStart")
  5136.             }
  5137.             if (!B.hasContent) {
  5138.                 if (B.data) {
  5139.                     B.url += (Z.test(B.url) ? "&" : "?") + B.data;
  5140.                     delete B.data
  5141.                 }
  5142.                 A = B.url;
  5143.                 if (B.cache === false) {
  5144.                     var I = al.now(),
  5145.                         bR = B.url.replace(bK, "$1_=" + I);
  5146.                     B.url = bR + ((bR === B.url) ? (Z.test(B.url) ? "&" : "?") + "_=" + I : "")
  5147.                 }
  5148.             }
  5149.             if (B.data && B.hasContent && B.contentType !== false || K.contentType) {
  5150.                 H.setRequestHeader("Content-Type", B.contentType)
  5151.             }
  5152.             if (B.ifModified) {
  5153.                 A = A || B.url;
  5154.                 if (al.lastModified[A]) {
  5155.                     H.setRequestHeader("If-Modified-Since", al.lastModified[A])
  5156.                 }
  5157.                 if (al.etag[A]) {
  5158.                     H.setRequestHeader("If-None-Match", al.etag[A])
  5159.                 }
  5160.             }
  5161.             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["*"]);
  5162.             for (J in B.headers) {
  5163.                 H.setRequestHeader(J, B.headers[J])
  5164.             }
  5165.             if (B.beforeSend && (B.beforeSend.call(bU, H, B) === false || y === 2)) {
  5166.                 H.abort();
  5167.                 return false
  5168.             }
  5169.             for (J in {
  5170.                 success: 1,
  5171.                 error: 1,
  5172.                 complete: 1
  5173.             }) {
  5174.                 H[J](B[J])
  5175.             }
  5176.             M = bg(p, B, K, H);
  5177.             if (!M) {
  5178.                 D(-1, "No Transport")
  5179.             } else {
  5180.                 H.readyState = 1;
  5181.                 if (w) {
  5182.                     E.trigger("ajaxSend", [H, B])
  5183.                 }
  5184.                 if (B.async && B.timeout > 0) {
  5185.                     C = setTimeout(function () {
  5186.                         H.abort("timeout")
  5187.                     }, B.timeout)
  5188.                 }
  5189.                 try {
  5190.                     y = 1;
  5191.                     M.send(F, D)
  5192.                 } catch (bO) {
  5193.                     if (y < 2) {
  5194.                         D(-1, bO)
  5195.                     } else {
  5196.                         al.error(bO)
  5197.                     }
  5198.                 }
  5199.             }
  5200.             return H
  5201.         },
  5202.         param: function (e, z) {
  5203.             var w = [],
  5204.                 x = function (B, A) {
  5205.                     A = al.isFunction(A) ? A() : A;
  5206.                     w[w.length] = encodeURIComponent(B) + "=" + encodeURIComponent(A)
  5207.                 };
  5208.             if (z === ap) {
  5209.                 z = al.ajaxSettings.traditional
  5210.             }
  5211.             if (al.isArray(e) || (e.jquery && !al.isPlainObject(e))) {
  5212.                 al.each(e, function () {
  5213.                     x(this.name, this.value)
  5214.                 })
  5215.             } else {
  5216.                 for (var y in e) {
  5217.                     t(y, e[y], z, x)
  5218.                 }
  5219.             }
  5220.             return w.join("&").replace(a0, "+")
  5221.         }
  5222.     });
  5223.  
  5224.     function t(x, w, A, z) {
  5225.         if (al.isArray(w)) {
  5226.             al.each(w, function (B, e) {
  5227.                 if (A || aC.test(x)) {
  5228.                     z(x, e)
  5229.                 } else {
  5230.                     t(x + "[" + (typeof e === "object" || al.isArray(e) ? B : "") + "]", e, A, z)
  5231.                 }
  5232.             })
  5233.         } else {
  5234.             if (!A && w != null && typeof w === "object") {
  5235.                 for (var y in w) {
  5236.                     t(x + "[" + y + "]", w[y], A, z)
  5237.                 }
  5238.             } else {
  5239.                 z(x, w)
  5240.             }
  5241.         }
  5242.     }
  5243.     al.extend({
  5244.         active: 0,
  5245.         lastModified: {},
  5246.         etag: {}
  5247.     });
  5248.  
  5249.     function bC(E, D, B) {
  5250.         var z = E.contents,
  5251.             C = E.dataTypes,
  5252.             w = E.responseFields,
  5253.             y, A, x, e;
  5254.         for (A in w) {
  5255.             if (A in B) {
  5256.                 D[w[A]] = B[A]
  5257.             }
  5258.         }
  5259.         while (C[0] === "*") {
  5260.             C.shift();
  5261.             if (y === ap) {
  5262.                 y = E.mimeType || D.getResponseHeader("content-type")
  5263.             }
  5264.         }
  5265.         if (y) {
  5266.             for (A in z) {
  5267.                 if (z[A] && z[A].test(y)) {
  5268.                     C.unshift(A);
  5269.                     break
  5270.                 }
  5271.             }
  5272.         }
  5273.         if (C[0] in B) {
  5274.             x = C[0]
  5275.         } else {
  5276.             for (A in B) {
  5277.                 if (!C[0] || E.converters[A + " " + C[0]]) {
  5278.                     x = A;
  5279.                     break
  5280.                 }
  5281.                 if (!e) {
  5282.                     e = A
  5283.                 }
  5284.             }
  5285.             x = x || e
  5286.         } if (x) {
  5287.             if (x !== C[0]) {
  5288.                 C.unshift(x)
  5289.             }
  5290.             return B[x]
  5291.         }
  5292.     }
  5293.  
  5294.     function U(I, E) {
  5295.         if (I.dataFilter) {
  5296.             E = I.dataFilter(E, I.dataType)
  5297.         }
  5298.         var D = I.dataTypes,
  5299.             H = {},
  5300.             A, F, x = D.length,
  5301.             B, C = D[0],
  5302.             y, z, G, w, e;
  5303.         for (A = 1; A < x; A++) {
  5304.             if (A === 1) {
  5305.                 for (F in I.converters) {
  5306.                     if (typeof F === "string") {
  5307.                         H[F.toLowerCase()] = I.converters[F]
  5308.                     }
  5309.                 }
  5310.             }
  5311.             y = C;
  5312.             C = D[A];
  5313.             if (C === "*") {
  5314.                 C = y
  5315.             } else {
  5316.                 if (y !== "*" && y !== C) {
  5317.                     z = y + " " + C;
  5318.                     G = H[z] || H["* " + C];
  5319.                     if (!G) {
  5320.                         e = ap;
  5321.                         for (w in H) {
  5322.                             B = w.split(" ");
  5323.                             if (B[0] === y || B[0] === "*") {
  5324.                                 e = H[B[1] + " " + C];
  5325.                                 if (e) {
  5326.                                     w = H[w];
  5327.                                     if (w === true) {
  5328.                                         G = e
  5329.                                     } else {
  5330.                                         if (e === true) {
  5331.                                             G = w
  5332.                                         }
  5333.                                     }
  5334.                                     break
  5335.                                 }
  5336.                             }
  5337.                         }
  5338.                     }
  5339.                     if (!(G || e)) {
  5340.                         al.error("No conversion from " + z.replace(" ", " to "))
  5341.                     }
  5342.                     if (G !== true) {
  5343.                         E = G ? G(E) : e(w(E))
  5344.                     }
  5345.                 }
  5346.             }
  5347.         }
  5348.         return E
  5349.     }
  5350.     var aZ = al.now(),
  5351.         s = /(\=)\?(&|$)|\?\?/i;
  5352.     al.ajaxSetup({
  5353.         jsonp: "callback",
  5354.         jsonpCallback: function () {
  5355.             return al.expando + "_" + (aZ++)
  5356.         }
  5357.     });
  5358.     al.ajaxPrefilter("json jsonp", function (F, E, D) {
  5359.         var C = F.contentType === "application/x-www-form-urlencoded" && (typeof F.data === "string");
  5360.         if (F.dataTypes[0] === "jsonp" || F.jsonp !== false && (s.test(F.url) || C && s.test(F.data))) {
  5361.             var B, y = F.jsonpCallback = al.isFunction(F.jsonpCallback) ? F.jsonpCallback() : F.jsonpCallback,
  5362.                 A = aq[y],
  5363.                 w = F.url,
  5364.                 z = F.data,
  5365.                 x = "$1" + y + "$2";
  5366.             if (F.jsonp !== false) {
  5367.                 w = w.replace(s, x);
  5368.                 if (F.url === w) {
  5369.                     if (C) {
  5370.                         z = z.replace(s, x)
  5371.                     }
  5372.                     if (F.data === z) {
  5373.                         w += (/\?/.test(w) ? "&" : "?") + F.jsonp + "=" + y
  5374.                     }
  5375.                 }
  5376.             }
  5377.             F.url = w;
  5378.             F.data = z;
  5379.             aq[y] = function (e) {
  5380.                 B = [e]
  5381.             };
  5382.             D.always(function () {
  5383.                 aq[y] = A;
  5384.                 if (B && al.isFunction(A)) {
  5385.                     aq[y](B[0])
  5386.                 }
  5387.             });
  5388.             F.converters["script json"] = function () {
  5389.                 if (!B) {
  5390.                     al.error(y + " was not called")
  5391.                 }
  5392.                 return B[0]
  5393.             };
  5394.             F.dataTypes[0] = "json";
  5395.             return "script"
  5396.         }
  5397.     });
  5398.     al.ajaxSetup({
  5399.         accepts: {
  5400.             script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  5401.         },
  5402.         contents: {
  5403.             script: /javascript|ecmascript/
  5404.         },
  5405.         converters: {
  5406.             "text script": function (e) {
  5407.                 al.globalEval(e);
  5408.                 return e
  5409.             }
  5410.         }
  5411.     });
  5412.     al.ajaxPrefilter("script", function (e) {
  5413.         if (e.cache === ap) {
  5414.             e.cache = false
  5415.         }
  5416.         if (e.crossDomain) {
  5417.             e.type = "GET";
  5418.             e.global = false
  5419.         }
  5420.     });
  5421.     al.ajaxTransport("script", function (w) {
  5422.         if (w.crossDomain) {
  5423.             var x, e = an.head || an.getElementsByTagName("head")[0] || an.documentElement;
  5424.             return {
  5425.                 send: function (z, y) {
  5426.                     x = an.createElement("script");
  5427.                     x.async = "async";
  5428.                     if (w.scriptCharset) {
  5429.                         x.charset = w.scriptCharset
  5430.                     }
  5431.                     x.src = w.url;
  5432.                     x.onload = x.onreadystatechange = function (B, A) {
  5433.                         if (A || !x.readyState || /loaded|complete/.test(x.readyState)) {
  5434.                             x.onload = x.onreadystatechange = null;
  5435.                             if (e && x.parentNode) {
  5436.                                 e.removeChild(x)
  5437.                             }
  5438.                             x = ap;
  5439.                             if (!A) {
  5440.                                 y(200, "success")
  5441.                             }
  5442.                         }
  5443.                     };
  5444.                     e.insertBefore(x, e.firstChild)
  5445.                 },
  5446.                 abort: function () {
  5447.                     if (x) {
  5448.                         x.onload(0, 1)
  5449.                     }
  5450.                 }
  5451.             }
  5452.         }
  5453.     });
  5454.     var aY = aq.ActiveXObject ? function () {
  5455.             for (var e in aa) {
  5456.                 aa[e](0, 1)
  5457.             }
  5458.         } : false,
  5459.         N = 0,
  5460.         aa;
  5461.  
  5462.     function aX() {
  5463.         try {
  5464.             return new aq.XMLHttpRequest()
  5465.         } catch (w) {}
  5466.     }
  5467.  
  5468.     function ay() {
  5469.         try {
  5470.             return new aq.ActiveXObject("Microsoft.XMLHTTP")
  5471.         } catch (w) {}
  5472.     }
  5473.     al.ajaxSettings.xhr = aq.ActiveXObject ? function () {
  5474.         return !this.isLocal && aX() || ay()
  5475.     } : aX;
  5476.     (function (e) {
  5477.         al.extend(al.support, {
  5478.             ajax: !!e,
  5479.             cors: !!e && ("withCredentials" in e)
  5480.         })
  5481.     })(al.ajaxSettings.xhr());
  5482.     if (al.support.ajax) {
  5483.         al.ajaxTransport(function (e) {
  5484.             if (!e.crossDomain || al.support.cors) {
  5485.                 var w;
  5486.                 return {
  5487.                     send: function (C, B) {
  5488.                         var A = e.xhr(),
  5489.                             z, y;
  5490.                         if (e.username) {
  5491.                             A.open(e.type, e.url, e.async, e.username, e.password)
  5492.                         } else {
  5493.                             A.open(e.type, e.url, e.async)
  5494.                         } if (e.xhrFields) {
  5495.                             for (y in e.xhrFields) {
  5496.                                 A[y] = e.xhrFields[y]
  5497.                             }
  5498.                         }
  5499.                         if (e.mimeType && A.overrideMimeType) {
  5500.                             A.overrideMimeType(e.mimeType)
  5501.                         }
  5502.                         if (!e.crossDomain && !C["X-Requested-With"]) {
  5503.                             C["X-Requested-With"] = "XMLHttpRequest"
  5504.                         }
  5505.                         try {
  5506.                             for (y in C) {
  5507.                                 A.setRequestHeader(y, C[y])
  5508.                             }
  5509.                         } catch (x) {}
  5510.                         A.send((e.hasContent && e.data) || null);
  5511.                         w = function (L, K) {
  5512.                             var J, E, D, H, G;
  5513.                             try {
  5514.                                 if (w && (K || A.readyState === 4)) {
  5515.                                     w = ap;
  5516.                                     if (z) {
  5517.                                         A.onreadystatechange = al.noop;
  5518.                                         if (aY) {
  5519.                                             delete aa[z]
  5520.                                         }
  5521.                                     }
  5522.                                     if (K) {
  5523.                                         if (A.readyState !== 4) {
  5524.                                             A.abort()
  5525.                                         }
  5526.                                     } else {
  5527.                                         J = A.status;
  5528.                                         D = A.getAllResponseHeaders();
  5529.                                         H = {};
  5530.                                         G = A.responseXML;
  5531.                                         if (G && G.documentElement) {
  5532.                                             H.xml = G
  5533.                                         }
  5534.                                         H.text = A.responseText;
  5535.                                         try {
  5536.                                             E = A.statusText
  5537.                                         } catch (I) {
  5538.                                             E = ""
  5539.                                         }
  5540.                                         if (!J && e.isLocal && !e.crossDomain) {
  5541.                                             J = H.text ? 200 : 404
  5542.                                         } else {
  5543.                                             if (J === 1223) {
  5544.                                                 J = 204
  5545.                                             }
  5546.                                         }
  5547.                                     }
  5548.                                 }
  5549.                             } catch (F) {
  5550.                                 if (!K) {
  5551.                                     B(-1, F)
  5552.                                 }
  5553.                             }
  5554.                             if (H) {
  5555.                                 B(J, E, H, D)
  5556.                             }
  5557.                         };
  5558.                         if (!e.async || A.readyState === 4) {
  5559.                             w()
  5560.                         } else {
  5561.                             z = ++N;
  5562.                             if (aY) {
  5563.                                 if (!aa) {
  5564.                                     aa = {};
  5565.                                     al(aq).unload(aY)
  5566.                                 }
  5567.                                 aa[z] = w
  5568.                             }
  5569.                             A.onreadystatechange = w
  5570.                         }
  5571.                     },
  5572.                     abort: function () {
  5573.                         if (w) {
  5574.                             w(0, 1)
  5575.                         }
  5576.                     }
  5577.                 }
  5578.             }
  5579.         })
  5580.     }
  5581.     var aW = {},
  5582.         br, k, aM = /^(?:toggle|show|hide)$/,
  5583.         bd = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
  5584.         bm, aS = [
  5585.             ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
  5586.             ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
  5587.             ["opacity"]
  5588.         ],
  5589.         bn;
  5590.     al.fn.extend({
  5591.         show: function (w, e, B) {
  5592.             var A, z;
  5593.             if (w || w === 0) {
  5594.                 return this.animate(bk("show", 3), w, e, B)
  5595.             } else {
  5596.                 for (var y = 0, x = this.length; y < x; y++) {
  5597.                     A = this[y];
  5598.                     if (A.style) {
  5599.                         z = A.style.display;
  5600.                         if (!al._data(A, "olddisplay") && z === "none") {
  5601.                             z = A.style.display = ""
  5602.                         }
  5603.                         if (z === "" && al.css(A, "display") === "none") {
  5604.                             al._data(A, "olddisplay", v(A.nodeName))
  5605.                         }
  5606.                     }
  5607.                 }
  5608.                 for (y = 0; y < x; y++) {
  5609.                     A = this[y];
  5610.                     if (A.style) {
  5611.                         z = A.style.display;
  5612.                         if (z === "" || z === "none") {
  5613.                             A.style.display = al._data(A, "olddisplay") || ""
  5614.                         }
  5615.                     }
  5616.                 }
  5617.                 return this
  5618.             }
  5619.         },
  5620.         hide: function (w, e, B) {
  5621.             if (w || w === 0) {
  5622.                 return this.animate(bk("hide", 3), w, e, B)
  5623.             } else {
  5624.                 var A, z, y = 0,
  5625.                     x = this.length;
  5626.                 for (; y < x; y++) {
  5627.                     A = this[y];
  5628.                     if (A.style) {
  5629.                         z = al.css(A, "display");
  5630.                         if (z !== "none" && !al._data(A, "olddisplay")) {
  5631.                             al._data(A, "olddisplay", z)
  5632.                         }
  5633.                     }
  5634.                 }
  5635.                 for (y = 0; y < x; y++) {
  5636.                     if (this[y].style) {
  5637.                         this[y].style.display = "none"
  5638.                     }
  5639.                 }
  5640.                 return this
  5641.             }
  5642.         },
  5643.         _toggle: al.fn.toggle,
  5644.         toggle: function (w, z, y) {
  5645.             var x = typeof w === "boolean";
  5646.             if (al.isFunction(w) && al.isFunction(z)) {
  5647.                 this._toggle.apply(this, arguments)
  5648.             } else {
  5649.                 if (w == null || x) {
  5650.                     this.each(function () {
  5651.                         var e = x ? w : al(this).is(":hidden");
  5652.                         al(this)[e ? "show" : "hide"]()
  5653.                     })
  5654.                 } else {
  5655.                     this.animate(bk("toggle", 3), w, z, y)
  5656.                 }
  5657.             }
  5658.             return this
  5659.         },
  5660.         fadeTo: function (w, e, y, x) {
  5661.             return this.filter(":hidden").css("opacity", 0).show().end().animate({
  5662.                 opacity: e
  5663.             }, w, y, x)
  5664.         },
  5665.         animate: function (e, A, z, y) {
  5666.             var x = al.speed(A, z, y);
  5667.             if (al.isEmptyObject(e)) {
  5668.                 return this.each(x.complete, [false])
  5669.             }
  5670.             e = al.extend({}, e);
  5671.  
  5672.             function w() {
  5673.                 if (x.queue === false) {
  5674.                     al._mark(this)
  5675.                 }
  5676.                 var L = al.extend({}, x),
  5677.                     K = this.nodeType === 1,
  5678.                     I = K && al(this).is(":hidden"),
  5679.                     C, F, E, J, H, D, G, M, B;
  5680.                 L.animatedProperties = {};
  5681.                 for (E in e) {
  5682.                     C = al.camelCase(E);
  5683.                     if (E !== C) {
  5684.                         e[C] = e[E];
  5685.                         delete e[E]
  5686.                     }
  5687.                     F = e[C];
  5688.                     if (al.isArray(F)) {
  5689.                         L.animatedProperties[C] = F[1];
  5690.                         F = e[C] = F[0]
  5691.                     } else {
  5692.                         L.animatedProperties[C] = L.specialEasing && L.specialEasing[C] || L.easing || "swing"
  5693.                     } if (F === "hide" && I || F === "show" && !I) {
  5694.                         return L.complete.call(this)
  5695.                     }
  5696.                     if (K && (C === "height" || C === "width")) {
  5697.                         L.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY];
  5698.                         if (al.css(this, "display") === "inline" && al.css(this, "float") === "none") {
  5699.                             if (!al.support.inlineBlockNeedsLayout || v(this.nodeName) === "inline") {
  5700.                                 this.style.display = "inline-block"
  5701.                             } else {
  5702.                                 this.style.zoom = 1
  5703.                             }
  5704.                         }
  5705.                     }
  5706.                 }
  5707.                 if (L.overflow != null) {
  5708.                     this.style.overflow = "hidden"
  5709.                 }
  5710.                 for (E in e) {
  5711.                     J = new al.fx(this, L, E);
  5712.                     F = e[E];
  5713.                     if (aM.test(F)) {
  5714.                         B = al._data(this, "toggle" + E) || (F === "toggle" ? I ? "show" : "hide" : 0);
  5715.                         if (B) {
  5716.                             al._data(this, "toggle" + E, B === "show" ? "hide" : "show");
  5717.                             J[B]()
  5718.                         } else {
  5719.                             J[F]()
  5720.                         }
  5721.                     } else {
  5722.                         H = bd.exec(F);
  5723.                         D = J.cur();
  5724.                         if (H) {
  5725.                             G = parseFloat(H[2]);
  5726.                             M = H[3] || (al.cssNumber[E] ? "" : "px");
  5727.                             if (M !== "px") {
  5728.                                 al.style(this, E, (G || 1) + M);
  5729.                                 D = ((G || 1) / J.cur()) * D;
  5730.                                 al.style(this, E, D + M)
  5731.                             }
  5732.                             if (H[1]) {
  5733.                                 G = ((H[1] === "-=" ? -1 : 1) * G) + D
  5734.                             }
  5735.                             J.custom(D, G, M)
  5736.                         } else {
  5737.                             J.custom(D, F, "")
  5738.                         }
  5739.                     }
  5740.                 }
  5741.                 return true
  5742.             }
  5743.             return x.queue === false ? this.each(w) : this.queue(x.queue, w)
  5744.         },
  5745.         stop: function (y, x, w) {
  5746.             if (typeof y !== "string") {
  5747.                 w = x;
  5748.                 x = y;
  5749.                 y = ap
  5750.             }
  5751.             if (x && y !== false) {
  5752.                 this.queue(y || "fx", [])
  5753.             }
  5754.             return this.each(function () {
  5755.                 var z, e = false,
  5756.                     B = al.timers,
  5757.                     A = al._data(this);
  5758.                 if (!w) {
  5759.                     al._unmark(true, this)
  5760.                 }
  5761.  
  5762.                 function C(E, D, F) {
  5763.                     var G = D[F];
  5764.                     al.removeData(E, F, true);
  5765.                     G.stop(w)
  5766.                 }
  5767.                 if (y == null) {
  5768.                     for (z in A) {
  5769.                         if (A[z].stop && z.indexOf(".run") === z.length - 4) {
  5770.                             C(this, A, z)
  5771.                         }
  5772.                     }
  5773.                 } else {
  5774.                     if (A[z = y + ".run"] && A[z].stop) {
  5775.                         C(this, A, z)
  5776.                     }
  5777.                 }
  5778.                 for (z = B.length; z--;) {
  5779.                     if (B[z].elem === this && (y == null || B[z].queue === y)) {
  5780.                         if (w) {
  5781.                             B[z](true)
  5782.                         } else {
  5783.                             B[z].saveState()
  5784.                         }
  5785.                         e = true;
  5786.                         B.splice(z, 1)
  5787.                     }
  5788.                 }
  5789.                 if (!(w && e)) {
  5790.                     al.dequeue(this, y)
  5791.                 }
  5792.             })
  5793.         }
  5794.     });
  5795.  
  5796.     function bz() {
  5797.         setTimeout(aF, 0);
  5798.         return (bn = al.now())
  5799.     }
  5800.  
  5801.     function aF() {
  5802.         bn = ap
  5803.     }
  5804.  
  5805.     function bk(w, e) {
  5806.         var x = {};
  5807.         al.each(aS.concat.apply([], aS.slice(0, e)), function () {
  5808.             x[this] = w
  5809.         });
  5810.         return x
  5811.     }
  5812.     al.each({
  5813.         slideDown: bk("show", 1),
  5814.         slideUp: bk("hide", 1),
  5815.         slideToggle: bk("toggle", 1),
  5816.         fadeIn: {
  5817.             opacity: "show"
  5818.         },
  5819.         fadeOut: {
  5820.             opacity: "hide"
  5821.         },
  5822.         fadeToggle: {
  5823.             opacity: "toggle"
  5824.         }
  5825.     }, function (x, w) {
  5826.         al.fn[x] = function (y, e, z) {
  5827.             return this.animate(w, y, e, z)
  5828.         }
  5829.     });
  5830.     al.extend({
  5831.         speed: function (w, z, y) {
  5832.             var x = w && typeof w === "object" ? al.extend({}, w) : {
  5833.                 complete: y || !y && z || al.isFunction(w) && w,
  5834.                 duration: w,
  5835.                 easing: y && z || z && !al.isFunction(z) && z
  5836.             };
  5837.             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;
  5838.             if (x.queue == null || x.queue === true) {
  5839.                 x.queue = "fx"
  5840.             }
  5841.             x.old = x.complete;
  5842.             x.complete = function (e) {
  5843.                 if (al.isFunction(x.old)) {
  5844.                     x.old.call(this)
  5845.                 }
  5846.                 if (x.queue) {
  5847.                     al.dequeue(this, x.queue)
  5848.                 } else {
  5849.                     if (e !== false) {
  5850.                         al._unmark(this)
  5851.                     }
  5852.                 }
  5853.             };
  5854.             return x
  5855.         },
  5856.         easing: {
  5857.             linear: function (x, y, w, e) {
  5858.                 return w + e * x
  5859.             },
  5860.             swing: function (x, y, w, e) {
  5861.                 return ((-Math.cos(x * Math.PI) / 2) + 0.5) * e + w
  5862.             }
  5863.         },
  5864.         timers: [],
  5865.         fx: function (w, e, x) {
  5866.             this.options = e;
  5867.             this.elem = w;
  5868.             this.prop = x;
  5869.             e.orig = e.orig || {}
  5870.         }
  5871.     });
  5872.     al.fx.prototype = {
  5873.         update: function () {
  5874.             if (this.options.step) {
  5875.                 this.options.step.call(this.elem, this.now, this)
  5876.             }(al.fx.step[this.prop] || al.fx.step._default)(this)
  5877.         },
  5878.         cur: function () {
  5879.             if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) {
  5880.                 return this.elem[this.prop]
  5881.             }
  5882.             var e, w = al.css(this.elem, this.prop);
  5883.             return isNaN(e = parseFloat(w)) ? !w || w === "auto" ? 0 : w : e
  5884.         },
  5885.         custom: function (w, B, A) {
  5886.             var z = this,
  5887.                 y = al.fx;
  5888.             this.startTime = bn || bz();
  5889.             this.end = B;
  5890.             this.now = this.start = w;
  5891.             this.pos = this.state = 0;
  5892.             this.unit = A || this.unit || (al.cssNumber[this.prop] ? "" : "px");
  5893.  
  5894.             function x(e) {
  5895.                 return z.step(e)
  5896.             }
  5897.             x.queue = this.options.queue;
  5898.             x.elem = this.elem;
  5899.             x.saveState = function () {
  5900.                 if (z.options.hide && al._data(z.elem, "fxshow" + z.prop) === ap) {
  5901.                     al._data(z.elem, "fxshow" + z.prop, z.start)
  5902.                 }
  5903.             };
  5904.             if (x() && al.timers.push(x) && !bm) {
  5905.                 bm = setInterval(y.tick, y.interval)
  5906.             }
  5907.         },
  5908.         show: function () {
  5909.             var e = al._data(this.elem, "fxshow" + this.prop);
  5910.             this.options.orig[this.prop] = e || al.style(this.elem, this.prop);
  5911.             this.options.show = true;
  5912.             if (e !== ap) {
  5913.                 this.custom(this.cur(), e)
  5914.             } else {
  5915.                 this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur())
  5916.             }
  5917.             al(this.elem).show()
  5918.         },
  5919.         hide: function () {
  5920.             this.options.orig[this.prop] = al._data(this.elem, "fxshow" + this.prop) || al.style(this.elem, this.prop);
  5921.             this.options.hide = true;
  5922.             this.custom(this.cur(), 0)
  5923.         },
  5924.         step: function (C) {
  5925.             var A, B, w, y = bn || bz(),
  5926.                 e = true,
  5927.                 z = this.elem,
  5928.                 x = this.options;
  5929.             if (C || y >= x.duration + this.startTime) {
  5930.                 this.now = this.end;
  5931.                 this.pos = this.state = 1;
  5932.                 this.update();
  5933.                 x.animatedProperties[this.prop] = true;
  5934.                 for (A in x.animatedProperties) {
  5935.                     if (x.animatedProperties[A] !== true) {
  5936.                         e = false
  5937.                     }
  5938.                 }
  5939.                 if (e) {
  5940.                     if (x.overflow != null && !al.support.shrinkWrapBlocks) {
  5941.                         al.each(["", "X", "Y"], function (E, D) {
  5942.                             z.style["overflow" + D] = x.overflow[E]
  5943.                         })
  5944.                     }
  5945.                     if (x.hide) {
  5946.                         al(z).hide()
  5947.                     }
  5948.                     if (x.hide || x.show) {
  5949.                         for (A in x.animatedProperties) {
  5950.                             al.style(z, A, x.orig[A]);
  5951.                             al.removeData(z, "fxshow" + A, true);
  5952.                             al.removeData(z, "toggle" + A, true)
  5953.                         }
  5954.                     }
  5955.                     w = x.complete;
  5956.                     if (w) {
  5957.                         x.complete = false;
  5958.                         w.call(z)
  5959.                     }
  5960.                 }
  5961.                 return false
  5962.             } else {
  5963.                 if (x.duration == Infinity) {
  5964.                     this.now = y
  5965.                 } else {
  5966.                     B = y - this.startTime;
  5967.                     this.state = B / x.duration;
  5968.                     this.pos = juicebox_lib.jQuery.easing[x.animatedProperties[this.prop]](this.state, B, 0, 1, x.duration);
  5969.                     this.now = this.start + ((this.end - this.start) * this.pos)
  5970.                 }
  5971.                 this.update()
  5972.             }
  5973.             return true
  5974.         }
  5975.     };
  5976.     al.extend(al.fx, {
  5977.         tick: function () {
  5978.             var e, x = al.timers,
  5979.                 w = 0;
  5980.             for (; w < x.length; w++) {
  5981.                 e = x[w];
  5982.                 if (!e() && x[w] === e) {
  5983.                     x.splice(w--, 1)
  5984.                 }
  5985.             }
  5986.             if (!x.length) {
  5987.                 al.fx.stop()
  5988.             }
  5989.         },
  5990.         interval: 13,
  5991.         stop: function () {
  5992.             clearInterval(bm);
  5993.             bm = null
  5994.         },
  5995.         speeds: {
  5996.             slow: 600,
  5997.             fast: 200,
  5998.             _default: 400
  5999.         },
  6000.         step: {
  6001.             opacity: function (e) {
  6002.                 al.style(e.elem, "opacity", e.now)
  6003.             },
  6004.             _default: function (e) {
  6005.                 if (e.elem.style && e.elem.style[e.prop] != null) {
  6006.                     e.elem.style[e.prop] = e.now + e.unit
  6007.                 } else {
  6008.                     e.elem[e.prop] = e.now
  6009.                 }
  6010.             }
  6011.         }
  6012.     });
  6013.     al.each(["width", "height"], function (w, e) {
  6014.         al.fx.step[e] = function (x) {
  6015.             al.style(x.elem, e, Math.max(0, x.now))
  6016.         }
  6017.     });
  6018.     if (al.expr && al.expr.filters) {
  6019.         al.expr.filters.animated = function (e) {
  6020.             return al.grep(al.timers, function (w) {
  6021.                 return e === w.elem
  6022.             }).length
  6023.         }
  6024.     }
  6025.  
  6026.     function v(w) {
  6027.         if (!aW[w]) {
  6028.             var e = an.body,
  6029.                 x = al("<" + w + ">").appendTo(e),
  6030.                 y = x.css("display");
  6031.             x.remove();
  6032.             if (y === "none" || y === "") {
  6033.                 if (!br) {
  6034.                     br = an.createElement("iframe");
  6035.                     br.frameBorder = br.width = br.height = 0
  6036.                 }
  6037.                 e.appendChild(br);
  6038.                 if (!k || !br.createElement) {
  6039.                     k = (br.contentWindow || br.contentDocument).document;
  6040.                     k.write((an.compatMode === "CSS1Compat" ? "<!doctype html>" : "") + "<html><body>");
  6041.                     k.close()
  6042.                 }
  6043.                 x = k.createElement(w);
  6044.                 k.body.appendChild(x);
  6045.                 y = al.css(x, "display");
  6046.                 e.removeChild(br)
  6047.             }
  6048.             aW[w] = y
  6049.         }
  6050.         return aW[w]
  6051.     }
  6052.     var aV = /^t(?:able|d|h)$/i,
  6053.         ar = /^(?:body|html)$/i;
  6054.     if ("getBoundingClientRect" in an.documentElement) {
  6055.         al.fn.offset = function (J) {
  6056.             var I = this[0],
  6057.                 B;
  6058.             if (J) {
  6059.                 return this.each(function (e) {
  6060.                     al.offset.setOffset(this, J, e)
  6061.                 })
  6062.             }
  6063.             if (!I || !I.ownerDocument) {
  6064.                 return null
  6065.             }
  6066.             if (I === I.ownerDocument.body) {
  6067.                 return al.offset.bodyOffset(I)
  6068.             }
  6069.             try {
  6070.                 B = I.getBoundingClientRect()
  6071.             } catch (E) {}
  6072.             var G = I.ownerDocument,
  6073.                 x = G.documentElement;
  6074.             if (!B || !al.contains(x, I)) {
  6075.                 return B ? {
  6076.                     top: B.top,
  6077.                     left: B.left
  6078.                 } : {
  6079.                     top: 0,
  6080.                     left: 0
  6081.                 }
  6082.             }
  6083.             var F = G.body,
  6084.                 C = aU(G),
  6085.                 A = x.clientTop || F.clientTop || 0,
  6086.                 D = x.clientLeft || F.clientLeft || 0,
  6087.                 w = C.pageYOffset || al.support.boxModel && x.scrollTop || F.scrollTop,
  6088.                 z = C.pageXOffset || al.support.boxModel && x.scrollLeft || F.scrollLeft,
  6089.                 H = B.top + w - A,
  6090.                 y = B.left + z - D;
  6091.             return {
  6092.                 top: H,
  6093.                 left: y
  6094.             }
  6095.         }
  6096.     } else {
  6097.         al.fn.offset = function (F) {
  6098.             var E = this[0];
  6099.             if (F) {
  6100.                 return this.each(function (H) {
  6101.                     al.offset.setOffset(this, F, H)
  6102.                 })
  6103.             }
  6104.             if (!E || !E.ownerDocument) {
  6105.                 return null
  6106.             }
  6107.             if (E === E.ownerDocument.body) {
  6108.                 return al.offset.bodyOffset(E)
  6109.             }
  6110.             var C, x = E.offsetParent,
  6111.                 w = E,
  6112.                 G = E.ownerDocument,
  6113.                 y = G.documentElement,
  6114.                 A = G.body,
  6115.                 B = G.defaultView,
  6116.                 e = B ? B.getComputedStyle(E, null) : E.currentStyle,
  6117.                 D = E.offsetTop,
  6118.                 z = E.offsetLeft;
  6119.             while ((E = E.parentNode) && E !== A && E !== y) {
  6120.                 if (al.support.fixedPosition && e.position === "fixed") {
  6121.                     break
  6122.                 }
  6123.                 C = B ? B.getComputedStyle(E, null) : E.currentStyle;
  6124.                 D -= E.scrollTop;
  6125.                 z -= E.scrollLeft;
  6126.                 if (E === x) {
  6127.                     D += E.offsetTop;
  6128.                     z += E.offsetLeft;
  6129.                     if (al.support.doesNotAddBorder && !(al.support.doesAddBorderForTableAndCells && aV.test(E.nodeName))) {
  6130.                         D += parseFloat(C.borderTopWidth) || 0;
  6131.                         z += parseFloat(C.borderLeftWidth) || 0
  6132.                     }
  6133.                     w = x;
  6134.                     x = E.offsetParent
  6135.                 }
  6136.                 if (al.support.subtractsBorderForOverflowNotVisible && C.overflow !== "visible") {
  6137.                     D += parseFloat(C.borderTopWidth) || 0;
  6138.                     z += parseFloat(C.borderLeftWidth) || 0
  6139.                 }
  6140.                 e = C
  6141.             }
  6142.             if (e.position === "relative" || e.position === "static") {
  6143.                 D += A.offsetTop;
  6144.                 z += A.offsetLeft
  6145.             }
  6146.             if (al.support.fixedPosition && e.position === "fixed") {
  6147.                 D += Math.max(y.scrollTop, A.scrollTop);
  6148.                 z += Math.max(y.scrollLeft, A.scrollLeft)
  6149.             }
  6150.             return {
  6151.                 top: D,
  6152.                 left: z
  6153.             }
  6154.         }
  6155.     }
  6156.     al.offset = {
  6157.         bodyOffset: function (w) {
  6158.             var e = w.offsetTop,
  6159.                 x = w.offsetLeft;
  6160.             if (al.support.doesNotIncludeMarginInBodyOffset) {
  6161.                 e += parseFloat(al.css(w, "marginTop")) || 0;
  6162.                 x += parseFloat(al.css(w, "marginLeft")) || 0
  6163.             }
  6164.             return {
  6165.                 top: e,
  6166.                 left: x
  6167.             }
  6168.         },
  6169.         setOffset: function (F, E, z) {
  6170.             var D = al.css(F, "position");
  6171.             if (D === "static") {
  6172.                 F.style.position = "relative"
  6173.             }
  6174.             var B = al(F),
  6175.                 w = B.offset(),
  6176.                 e = al.css(F, "top"),
  6177.                 G = al.css(F, "left"),
  6178.                 H = (D === "absolute" || D === "fixed") && al.inArray("auto", [e, G]) > -1,
  6179.                 C = {},
  6180.                 A = {},
  6181.                 x, y;
  6182.             if (H) {
  6183.                 A = B.position();
  6184.                 x = A.top;
  6185.                 y = A.left
  6186.             } else {
  6187.                 x = parseFloat(e) || 0;
  6188.                 y = parseFloat(G) || 0
  6189.             } if (al.isFunction(E)) {
  6190.                 E = E.call(F, z, w)
  6191.             }
  6192.             if (E.top != null) {
  6193.                 C.top = (E.top - w.top) + x
  6194.             }
  6195.             if (E.left != null) {
  6196.                 C.left = (E.left - w.left) + y
  6197.             }
  6198.             if ("using" in E) {
  6199.                 E.using.call(F, C)
  6200.             } else {
  6201.                 B.css(C)
  6202.             }
  6203.         }
  6204.     };
  6205.     al.fn.extend({
  6206.         position: function () {
  6207.             if (!this[0]) {
  6208.                 return null
  6209.             }
  6210.             var e = this[0],
  6211.                 x = this.offsetParent(),
  6212.                 y = this.offset(),
  6213.                 w = ar.test(x[0].nodeName) ? {
  6214.                     top: 0,
  6215.                     left: 0
  6216.                 } : x.offset();
  6217.             y.top -= parseFloat(al.css(e, "marginTop")) || 0;
  6218.             y.left -= parseFloat(al.css(e, "marginLeft")) || 0;
  6219.             w.top += parseFloat(al.css(x[0], "borderTopWidth")) || 0;
  6220.             w.left += parseFloat(al.css(x[0], "borderLeftWidth")) || 0;
  6221.             return {
  6222.                 top: y.top - w.top,
  6223.                 left: y.left - w.left
  6224.             }
  6225.         },
  6226.         offsetParent: function () {
  6227.             return this.map(function () {
  6228.                 var e = this.offsetParent || an.body;
  6229.                 while (e && (!ar.test(e.nodeName) && al.css(e, "position") === "static")) {
  6230.                     e = e.offsetParent
  6231.                 }
  6232.                 return e
  6233.             })
  6234.         }
  6235.     });
  6236.     al.each(["Left", "Top"], function (e, x) {
  6237.         var w = "scroll" + x;
  6238.         al.fn[w] = function (z) {
  6239.             var y, A;
  6240.             if (z === ap) {
  6241.                 y = this[0];
  6242.                 if (!y) {
  6243.                     return null
  6244.                 }
  6245.                 A = aU(y);
  6246.                 return A ? ("pageXOffset" in A) ? A[e ? "pageYOffset" : "pageXOffset"] : al.support.boxModel && A.document.documentElement[w] || A.document.body[w] : y[w]
  6247.             }
  6248.             return this.each(function () {
  6249.                 A = aU(this);
  6250.                 if (A) {
  6251.                     A.scrollTo(!e ? z : al(A).scrollLeft(), e ? z : al(A).scrollTop())
  6252.                 } else {
  6253.                     this[w] = z
  6254.                 }
  6255.             })
  6256.         }
  6257.     });
  6258.  
  6259.     function aU(e) {
  6260.         return al.isWindow(e) ? e : e.nodeType === 9 ? e.defaultView || e.parentWindow : false
  6261.     }
  6262.     al.each(["Height", "Width"], function (e, x) {
  6263.         var w = x.toLowerCase();
  6264.         al.fn["inner" + x] = function () {
  6265.             var y = this[0];
  6266.             return y ? y.style ? parseFloat(al.css(y, w, "padding")) : this[w]() : null
  6267.         };
  6268.         al.fn["outer" + x] = function (z) {
  6269.             var y = this[0];
  6270.             return y ? y.style ? parseFloat(al.css(y, w, z ? "margin" : "border")) : this[w]() : null
  6271.         };
  6272.         al.fn[w] = function (z) {
  6273.             var D = this[0];
  6274.             if (!D) {
  6275.                 return z == null ? null : this
  6276.             }
  6277.             if (al.isFunction(z)) {
  6278.                 return this.each(function (F) {
  6279.                     var E = al(this);
  6280.                     E[w](z.call(this, F, E[w]()))
  6281.                 })
  6282.             }
  6283.             if (al.isWindow(D)) {
  6284.                 var C = D.document.documentElement["client" + x],
  6285.                     y = D.document.body;
  6286.                 return D.document.compatMode === "CSS1Compat" && C || y && y["client" + x] || C
  6287.             } else {
  6288.                 if (D.nodeType === 9) {
  6289.                     return Math.max(D.documentElement["client" + x], D.body["scroll" + x], D.documentElement["scroll" + x], D.body["offset" + x], D.documentElement["offset" + x])
  6290.                 } else {
  6291.                     if (z === ap) {
  6292.                         var B = al.css(D, w),
  6293.                             A = parseFloat(B);
  6294.                         return al.isNumeric(A) ? A : B
  6295.                     } else {
  6296.                         return this.css(w, typeof z === "string" ? z : z + "px")
  6297.                     }
  6298.                 }
  6299.             }
  6300.         }
  6301.     });
  6302.     juicebox_lib.jQuery = juicebox_lib.$ = al
  6303. })(window);
  6304. if (typeof jQuery === "undefined") {
  6305.     window.jQuery = juicebox_lib.jQuery
  6306. }
  6307. if (typeof $ === "undefined") {
  6308.     window.$ = juicebox_lib.jQuery
  6309. }(function (r, t, q) {
  6310.     var j = ["top", "right", "bottom", "left", "opacity", "height", "width"],
  6311.         s = ["top", "right", "bottom", "left"],
  6312.         n = ["", "-webkit-", "-moz-", "-o-"],
  6313.         v = ["avoidTransforms", "useTranslate3d", "leaveTransforms"],
  6314.         h = /^([+-]=)?([\d+-.]+)(.*)$/,
  6315.         z = /([A-Z])/g,
  6316.         w = {
  6317.             secondary: {},
  6318.             meta: {
  6319.                 top: 0,
  6320.                 right: 0,
  6321.                 bottom: 0,
  6322.                 left: 0
  6323.             }
  6324.         },
  6325.         m = "jQe",
  6326.         c = "cubic-bezier(",
  6327.         y = ")",
  6328.         g = false,
  6329.         b = null;
  6330.     var k = document.body || document.documentElement,
  6331.         e = k.style,
  6332.         a = (e.WebkitTransition !== undefined) ? "webkitTransitionEnd" : (e.OTransition !== undefined) ? "oTransitionEnd" : "transitionend",
  6333.         x = e.WebkitTransition !== undefined || e.MozTransition !== undefined || e.OTransition !== undefined || e.transition !== undefined,
  6334.         f = g = ("WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix());
  6335.     if (r.expr && r.expr.filters) {
  6336.         b = r.expr.filters.animated;
  6337.         r.expr.filters.animated = function (C) {
  6338.             return r(C).data("events") && r(C).data("events")[a] ? true : b.call(this, C)
  6339.         }
  6340.     }
  6341.  
  6342.     function i(M, G, D, H) {
  6343.         var J = h.exec(G),
  6344.             E = M.css(D) === "auto" ? 0 : M.css(D),
  6345.             N = typeof E == "string" ? A(E) : E,
  6346.             F = typeof G == "string" ? A(G) : G,
  6347.             L = H === true ? 0 : N,
  6348.             K = M.is(":hidden"),
  6349.             C = M.translation();
  6350.         if (D == "left") {
  6351.             L = parseInt(N, 10) + C.x
  6352.         }
  6353.         if (D == "right") {
  6354.             L = parseInt(N, 10) + C.x
  6355.         }
  6356.         if (D == "top") {
  6357.             L = parseInt(N, 10) + C.y
  6358.         }
  6359.         if (D == "bottom") {
  6360.             L = parseInt(N, 10) + C.y
  6361.         }
  6362.         if (!J && G == "show") {
  6363.             L = 1;
  6364.             if (K) {
  6365.                 M.css({
  6366.                     display: "block",
  6367.                     opacity: 0
  6368.                 })
  6369.             }
  6370.         } else {
  6371.             if (!J && G == "hide") {
  6372.                 L = 0
  6373.             }
  6374.         } if (J) {
  6375.             var I = parseFloat(J[2]);
  6376.             if (J[1]) {
  6377.                 I = ((J[1] === "-=" ? -1 : 1) * I) + parseInt(L, 10)
  6378.             }
  6379.             return I
  6380.         } else {
  6381.             return L
  6382.         }
  6383.     }
  6384.  
  6385.     function u(C, E, D) {
  6386.         return ((D === true || (g == true && D != false)) && f) ? "translate3d(" + C + "px," + E + "px,0)" : "translate(" + C + "px," + E + "px)"
  6387.     }
  6388.  
  6389.     function l(J, O, H, K, N, D, G, C) {
  6390.         var I = J.data(m) ? !d(J.data(m)) ? J.data(m) : r.extend(true, {}, w) : r.extend(true, {}, w),
  6391.             F = N,
  6392.             M = r.inArray(O, s) > -1;
  6393.         if (M) {
  6394.             var P = I.meta,
  6395.                 E = A(J.css(O)) || 0,
  6396.                 L = O + "_o";
  6397.             F = N - E;
  6398.             P[O] = F;
  6399.             P[L] = J.css(O) == "auto" ? 0 + F : E + F || 0;
  6400.             I.meta = P;
  6401.             if (G && F === 0) {
  6402.                 F = 0 - P[L];
  6403.                 P[O] = F;
  6404.                 P[L] = 0
  6405.             }
  6406.         }
  6407.         return J.data(m, B(I, O, H, K, F, D, G, C))
  6408.     }
  6409.  
  6410.     function B(K, J, F, H, I, D, E, C) {
  6411.         K = typeof K === "undefined" ? {} : K;
  6412.         K.secondary = typeof K.secondary === "undefined" ? {} : K.secondary;
  6413.         for (var G = n.length - 1; G >= 0; G--) {
  6414.             if (typeof K[n[G] + "transition-property"] === "undefined") {
  6415.                 K[n[G] + "transition-property"] = ""
  6416.             }
  6417.             K[n[G] + "transition-property"] += ", " + ((D === true && E === true) ? n[G] + "transform" : J);
  6418.             K[n[G] + "transition-duration"] = F + "ms";
  6419.             K[n[G] + "transition-timing-function"] = H;
  6420.             K.secondary[((D === true && E === true) ? n[G] + "transform" : J)] = (D === true && E === true) ? u(K.meta.left, K.meta.top, C) : I
  6421.         }
  6422.         return K
  6423.     }
  6424.  
  6425.     function o(D) {
  6426.         for (var C in D) {
  6427.             if ((C == "width" || C == "height") && (D[C] == "show" || D[C] == "hide" || D[C] == "toggle")) {
  6428.                 return true
  6429.             }
  6430.         }
  6431.         return false
  6432.     }
  6433.  
  6434.     function d(D) {
  6435.         for (var C in D) {
  6436.             return false
  6437.         }
  6438.         return true
  6439.     }
  6440.  
  6441.     function A(C) {
  6442.         return parseFloat(C.replace(/px/i, ""))
  6443.     }
  6444.  
  6445.     function p(F, E, C) {
  6446.         var D = r.inArray(F, j) > -1;
  6447.         if ((F == "width" || F == "height") && (E === parseFloat(C.css(F)))) {
  6448.             D = false
  6449.         }
  6450.         return D
  6451.     }
  6452.     r.extend({
  6453.         toggle3DByDefault: function () {
  6454.             g = !g
  6455.         }
  6456.     });
  6457.     r.fn.translation = function () {
  6458.         if (!this[0]) {
  6459.             return null
  6460.         }
  6461.         var G = this[0],
  6462.             D = window.getComputedStyle(G, null),
  6463.             H = {
  6464.                 x: 0,
  6465.                 y: 0
  6466.             };
  6467.         for (var F = n.length - 1; F >= 0; F--) {
  6468.             var E = D.getPropertyValue(n[F] + "transform");
  6469.             if (E && (/matrix/i).test(E)) {
  6470.                 var C = E.replace(/^matrix\(/i, "").split(/, |\)$/g);
  6471.                 H = {
  6472.                     x: parseInt(C[4], 10),
  6473.                     y: parseInt(C[5], 10)
  6474.                 };
  6475.                 break
  6476.             }
  6477.         }
  6478.         return H
  6479.     };
  6480.     r.fn.animate = function (D, E, I, K) {
  6481.         D = D || {};
  6482.         var F = !(typeof D.bottom !== "undefined" || typeof D.right !== "undefined"),
  6483.             J = r.speed(E, I, K),
  6484.             C = this,
  6485.             H = 0,
  6486.             G = function () {
  6487.                 H--;
  6488.                 if (H === 0) {
  6489.                     if (typeof J.complete === "function") {
  6490.                         J.complete.apply(C[0], arguments)
  6491.                     }
  6492.                 }
  6493.             };
  6494.         if (!x || d(D) || o(D) || J.duration <= 0 || (r.fn.animate.defaults.avoidTransforms === true && D.avoidTransforms !== false)) {
  6495.             return t.apply(this, arguments)
  6496.         }
  6497.         return this[J.queue === true ? "queue" : "each"](function () {
  6498.             var V = r(this),
  6499.                 M = r.extend({}, J),
  6500.                 R = function () {
  6501.                     var ac = {};
  6502.                     for (var Z = n.length - 1; Z >= 0; Z--) {
  6503.                         ac[n[Z] + "transition-property"] = "none";
  6504.                         ac[n[Z] + "transition-duration"] = "";
  6505.                         ac[n[Z] + "transition-timing-function"] = ""
  6506.                     }
  6507.                     V.unbind(a);
  6508.                     if (!D.leaveTransforms === true) {
  6509.                         var ab = V.data(m) || {},
  6510.                             aa = {};
  6511.                         for (Z = n.length - 1; Z >= 0; Z--) {
  6512.                             aa[n[Z] + "transform"] = ""
  6513.                         }
  6514.                         if (F && typeof ab.meta !== "undefined") {
  6515.                             for (var Y = 0, X; X = s[Y]; ++Y) {
  6516.                                 aa[X] = ab.meta[X + "_o"] + "px"
  6517.                             }
  6518.                         }
  6519.                         V.css(ac).css(aa)
  6520.                     }
  6521.                     if (D.opacity === "hide") {
  6522.                         V.css("display", "none")
  6523.                     }
  6524.                     V.data(m, null);
  6525.                     G.call(V)
  6526.                 },
  6527.                 N = {
  6528.                     bounce: c + "0.0, 0.35, .5, 1.3" + y,
  6529.                     linear: "linear",
  6530.                     swing: "ease-in-out",
  6531.                     easeInQuad: c + "0.550, 0.085, 0.680, 0.530" + y,
  6532.                     easeInCubic: c + "0.550, 0.055, 0.675, 0.190" + y,
  6533.                     easeInQuart: c + "0.895, 0.030, 0.685, 0.220" + y,
  6534.                     easeInQuint: c + "0.755, 0.050, 0.855, 0.060" + y,
  6535.                     easeInSine: c + "0.470, 0.000, 0.745, 0.715" + y,
  6536.                     easeInExpo: c + "0.950, 0.050, 0.795, 0.035" + y,
  6537.                     easeInCirc: c + "0.600, 0.040, 0.980, 0.335" + y,
  6538.                     easeOutQuad: c + "0.250, 0.460, 0.450, 0.940" + y,
  6539.                     easeOutCubic: c + "0.215, 0.610, 0.355, 1.000" + y,
  6540.                     easeOutQuart: c + "0.165, 0.840, 0.440, 1.000" + y,
  6541.                     easeOutQuint: c + "0.230, 1.000, 0.320, 1.000" + y,
  6542.                     easeOutSine: c + "0.390, 0.575, 0.565, 1.000" + y,
  6543.                     easeOutExpo: c + "0.190, 1.000, 0.220, 1.000" + y,
  6544.                     easeOutCirc: c + "0.075, 0.820, 0.165, 1.000" + y,
  6545.                     easeInOutQuad: c + "0.455, 0.030, 0.515, 0.955" + y,
  6546.                     easeInOutCubic: c + "0.645, 0.045, 0.355, 1.000" + y,
  6547.                     easeInOutQuart: c + "0.770, 0.000, 0.175, 1.000" + y,
  6548.                     easeInOutQuint: c + "0.860, 0.000, 0.070, 1.000" + y,
  6549.                     easeInOutSine: c + "0.445, 0.050, 0.550, 0.950" + y,
  6550.                     easeInOutExpo: c + "1.000, 0.000, 0.000, 1.000" + y,
  6551.                     easeInOutCirc: c + "0.785, 0.135, 0.150, 0.860" + y
  6552.                 },
  6553.                 Q = {},
  6554.                 O = N[M.easing || "swing"] ? N[M.easing || "swing"] : M.easing || "swing";
  6555.             for (var L in D) {
  6556.                 if (r.inArray(L, v) === -1) {
  6557.                     var S = r.inArray(L, s) > -1,
  6558.                         U = i(V, D[L], L, (S && D.avoidTransforms !== true));
  6559.                     if (D.avoidTransforms !== true && p(L, U, V)) {
  6560.                         l(V, L, M.duration, O, S && D.avoidTransforms === true ? U + "px" : U, S && D.avoidTransforms !== true, F, D.useTranslate3d === true)
  6561.                     } else {
  6562.                         Q[L] = D[L]
  6563.                     }
  6564.                 }
  6565.             }
  6566.             var W = V.data(m) || {};
  6567.             for (var P = n.length - 1; P >= 0; P--) {
  6568.                 if (typeof W[n[P] + "transition-property"] !== "undefined") {
  6569.                     W[n[P] + "transition-property"] = W[n[P] + "transition-property"].substr(2)
  6570.                 }
  6571.             }
  6572.             V.data(m, W).unbind(a);
  6573.             if (!d(V.data(m)) && !d(V.data(m).secondary)) {
  6574.                 H++;
  6575.                 V.css(V.data(m));
  6576.                 var T = V.data(m).secondary;
  6577.                 setTimeout(function () {
  6578.                     V.bind(a, R).css(T)
  6579.                 })
  6580.             } else {
  6581.                 M.queue = false
  6582.             } if (!d(Q)) {
  6583.                 H++;
  6584.                 t.apply(V, [Q, {
  6585.                     duration: M.duration,
  6586.                     easing: r.easing[M.easing] ? M.easing : (r.easing.swing ? "swing" : "linear"),
  6587.                     complete: G,
  6588.                     queue: M.queue
  6589.                 }])
  6590.             }
  6591.             return true
  6592.         })
  6593.     };
  6594.     r.fn.animate.defaults = {};
  6595.     r.fn.stop = function (F, D, E) {
  6596.         if (!x) {
  6597.             return q.apply(this, [F, D])
  6598.         }
  6599.         if (F) {
  6600.             this.queue([])
  6601.         }
  6602.         var G = {};
  6603.         for (var C = n.length - 1; C >= 0; C--) {
  6604.             G[n[C] + "transition-property"] = "none";
  6605.             G[n[C] + "transition-duration"] = "";
  6606.             G[n[C] + "transition-timing-function"] = ""
  6607.         }
  6608.         this.each(function () {
  6609.             var J = r(this),
  6610.                 I = window.getComputedStyle(this, null),
  6611.                 L = {},
  6612.                 K;
  6613.             if (!d(J.data(m)) && !d(J.data(m).secondary)) {
  6614.                 var M = J.data(m);
  6615.                 if (D) {
  6616.                     L = M.secondary;
  6617.                     if (!E && typeof M.meta.left_o !== undefined || typeof M.meta.top_o !== undefined) {
  6618.                         L.left = typeof M.meta.left_o !== undefined ? M.meta.left_o : "auto";
  6619.                         L.top = typeof M.meta.top_o !== undefined ? M.meta.top_o : "auto";
  6620.                         for (K = n.length - 1; K >= 0; K--) {
  6621.                             L[n[K] + "transform"] = ""
  6622.                         }
  6623.                     }
  6624.                 } else {
  6625.                     for (var N in J.data(m).secondary) {
  6626.                         N = N.replace(z, "-$1").toLowerCase();
  6627.                         L[N] = I.getPropertyValue(N);
  6628.                         if (!E && (/matrix/i).test(L[N])) {
  6629.                             var H = L[N].replace(/^matrix\(/i, "").split(/, |\)$/g);
  6630.                             L.left = (parseFloat(H[4]) + parseFloat(J.css("left")) + "px") || "auto";
  6631.                             L.top = (parseFloat(H[5]) + parseFloat(J.css("top")) + "px") || "auto";
  6632.                             for (K = n.length - 1; K >= 0; K--) {
  6633.                                 L[n[K] + "transform"] = ""
  6634.                             }
  6635.                         }
  6636.                     }
  6637.                 }
  6638.                 J.unbind(a).css(G).css(L).data(m, null)
  6639.             } else {
  6640.                 q.apply(J, [F, D])
  6641.             }
  6642.         });
  6643.         return this
  6644.     }
  6645. })(juicebox_lib.jQuery, juicebox_lib.jQuery.fn.animate, juicebox_lib.jQuery.fn.stop);
  6646. juicebox_lib.jQuery.fn.extend({
  6647.     disableSelection: function () {
  6648.         return this.each(function () {
  6649.             this.onselectstart = function () {
  6650.                 return false
  6651.             };
  6652.             this.unselectable = "on";
  6653.             jQuery(this).css("user-select", "none");
  6654.             jQuery(this).css("-o-user-select", "none");
  6655.             jQuery(this).css("-moz-user-select", "none");
  6656.             jQuery(this).css("-khtml-user-select", "none");
  6657.             jQuery(this).css("-webkit-user-select", "none")
  6658.         })
  6659.     }
  6660. });
  6661. if (!juicebox_lib.jQuery.easing.easeOutQuart) {
  6662.     juicebox_lib.jQuery.extend(juicebox_lib.jQuery.easing, {
  6663.         easeOutQuart: function (e, f, a, h, g) {
  6664.             return -h * ((f = f / g - 1) * f * f * f - 1) + a
  6665.         }
  6666.     })
  6667. }
  6668. var juice_box_utils = function (p$) {
  6669.     var $ = p$;
  6670.     var is_pro_version = "cd64f8c2ad416da082f8c514ba054429";
  6671.     var is_absolute_path = function (path) {
  6672.         if (!path) {
  6673.             return false
  6674.         }
  6675.         if (path.indexOf("/") === 0) {
  6676.             return true
  6677.         }
  6678.         if (path.toLowerCase().indexOf("http://") === 0) {
  6679.             return true
  6680.         }
  6681.         if (path.toLowerCase().indexOf("https://") === 0) {
  6682.             return true
  6683.         }
  6684.         return false
  6685.     };
  6686.     var is_end_with = function (str, ch) {
  6687.         if (!str || !ch) {
  6688.             return false
  6689.         }
  6690.         if (str.substring(str.length - ch.length) === ch) {
  6691.             return true
  6692.         }
  6693.         return false
  6694.     };
  6695.     var convert_to_absolute_path = function (url) {
  6696.         if (is_absolute_path(url)) {
  6697.             return url
  6698.         }
  6699.         var ipos = window.location.href.lastIndexOf("/");
  6700.         var iposs = window.location.href.indexOf("://");
  6701.         if (ipos <= 0) {
  6702.             return "/" + url
  6703.         }
  6704.         if (iposs > 0 && ipos - iposs < 3) {
  6705.             return "/" + url
  6706.         }
  6707.         return window.location.href.substring(0, ipos) + "/" + url
  6708.     };
  6709.     var concatenate_path = function (base, url) {
  6710.         if (!base) {
  6711.             base = ""
  6712.         }
  6713.         if (!url) {
  6714.             url = ""
  6715.         }
  6716.         if (is_absolute_path(url)) {
  6717.             return url
  6718.         }
  6719.         if (!is_end_with(base, "/") && base) {
  6720.             base += "/"
  6721.         }
  6722.         return base + url
  6723.     };
  6724.     var is_it_scrolling = function () {
  6725.         var doc = $(document);
  6726.         var win = $(window);
  6727.         return {
  6728.             v_scrolling: doc.height() > win.height(),
  6729.             h_scrolling: doc.width() > win.width()
  6730.         }
  6731.     };
  6732.     var in_iframe = function () {
  6733.         if (top && top.location !== location) {
  6734.             return true
  6735.         }
  6736.         return false
  6737.     };
  6738.     var is_iphone = function () {
  6739.         if (navigator.userAgent.match(/iPhone/i)) {
  6740.             return true
  6741.         }
  6742.         return false
  6743.     };
  6744.     var is_ipad = function () {
  6745.         if (navigator.userAgent.match(/iPad/i)) {
  6746.             return true
  6747.         }
  6748.         return false
  6749.     };
  6750.     var is_android = function () {
  6751.         if (navigator.userAgent.match(/Android/i)) {
  6752.             return true
  6753.         }
  6754.         return false
  6755.     };
  6756.     var is_small_android = function () {
  6757.         if (navigator.userAgent.match(/Galaxy Nexus/i)) {
  6758.             return true
  6759.         }
  6760.         if (navigator.userAgent.match(/Nexus S/i)) {
  6761.             return true
  6762.         }
  6763.         if (navigator.userAgent.match(/HTC Panache/i)) {
  6764.             return true
  6765.         }
  6766.         if (navigator.userAgent.match(/HTC myTouch/i)) {
  6767.             return true
  6768.         }
  6769.         if (navigator.userAgent.match(/Sensation/i)) {
  6770.             return true
  6771.         }
  6772.         if (is_android() && is_small_screen()) {
  6773.             return true
  6774.         }
  6775.         return false
  6776.     };
  6777.     var is_chrome = function () {
  6778.         if (navigator.userAgent.match(/Chrome/i)) {
  6779.             return true
  6780.         }
  6781.         return false
  6782.     };
  6783.     var is_firefox = function () {
  6784.         if (navigator.userAgent.match(/Firefox/i)) {
  6785.             return true
  6786.         }
  6787.         return false
  6788.     };
  6789.     var get_android_ver = function () {
  6790.         var pos = navigator.userAgent.indexOf("Android");
  6791.         if (pos < 0) {
  6792.             return 0
  6793.         }
  6794.         var pose = navigator.userAgent.indexOf(";", pos);
  6795.         if (pose <= pos) {
  6796.             return 0
  6797.         }
  6798.         var vi = navigator.userAgent.substring(pos, pose);
  6799.         var va = vi.split(" ");
  6800.         if (va.length !== 2) {
  6801.             return 0
  6802.         }
  6803.         return parseFloat(va[1])
  6804.     };
  6805.     var get_vp_meta_cnt = function (density) {
  6806.         return "width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" + (density ? ", target-densitydpi=" + density : "")
  6807.     };
  6808.     var get_vp_meta_cnt_4_iphone_with_ratio = function (ratio) {
  6809.         return "width=800, initial-scale=" + ratio + ", minimum-scale=" + ratio + ", maximum-scale=" + ratio + ", user-scalable=0"
  6810.     };
  6811.     var meta_tag_id = "sv-meta";
  6812.     var populate_viewport_meta_content = function (isFullscreen) {
  6813.         if (isFullscreen) {
  6814.             if (is_ipad() || is_iphone()) {
  6815.                 return get_vp_meta_cnt("")
  6816.             } else {
  6817.                 if (is_android()) {
  6818.                     return get_vp_meta_cnt(160)
  6819.                 }
  6820.             }
  6821.         } else {
  6822.             return ""
  6823.         }
  6824.         return ""
  6825.     };
  6826.     var set_viewport_value = function (val) {
  6827.         if (is_android()) {
  6828.             $("#" + meta_tag_id).attr("content", get_vp_meta_cnt(val))
  6829.         }
  6830.         if (is_iphone()) {
  6831.             $("#" + meta_tag_id).attr("content", get_vp_meta_cnt_4_iphone_with_ratio(val))
  6832.         }
  6833.     };
  6834.     var host_has_viewport_meta = function () {
  6835.         return document.getElementsByName("viewport").length > 0 && $("#" + meta_tag_id).length <= 0
  6836.     };
  6837.     var need_viewport_meta = function () {
  6838.         if (is_ipad() || is_iphone() || is_android()) {
  6839.             return true
  6840.         }
  6841.         return false
  6842.     };
  6843.     var add_viewport_meta = function (isFullscreen) {
  6844.         if (!need_viewport_meta()) {
  6845.             return
  6846.         }
  6847.         if ($("#" + meta_tag_id).length > 0) {
  6848.             return
  6849.         }
  6850.         if (host_has_viewport_meta()) {
  6851.             return
  6852.         }
  6853.         var svmeta4idvc = document.createElement("meta");
  6854.         svmeta4idvc.name = "viewport";
  6855.         svmeta4idvc.id = meta_tag_id;
  6856.         svmeta4idvc.content = populate_viewport_meta_content(isFullscreen);
  6857.         var header = document.getElementsByTagName("head");
  6858.         if (!header) {
  6859.             return
  6860.         }
  6861.         header[0].appendChild(svmeta4idvc)
  6862.     };
  6863.     var set_viewport_meta = function (isFullscreen) {
  6864.         if (!need_viewport_meta()) {
  6865.             return
  6866.         }
  6867.         $("#" + meta_tag_id).attr("content", populate_viewport_meta_content(isFullscreen))
  6868.     };
  6869.     var get_viewport_meta_content = function () {
  6870.         var tags = document.getElementsByName("viewport");
  6871.         if (tags.length <= 0) {
  6872.             return null
  6873.         }
  6874.         if (!tags[0].content) {
  6875.             return null
  6876.         }
  6877.         return tags[0].content
  6878.     };
  6879.     var set_viewport_meta_content = function (content) {
  6880.         var tags = document.getElementsByName("viewport");
  6881.         if (tags.length <= 0) {
  6882.             return
  6883.         }
  6884.         tags[0].content = content
  6885.     };
  6886.     var get_current_path = function () {
  6887.         var uri = window.location.href.split("#")[0].split("?")[0];
  6888.         var posLasts = uri.lastIndexOf("/");
  6889.         var posS = uri.indexOf("//");
  6890.         if (posLasts < 0 || posS < 0) {
  6891.             return ""
  6892.         }
  6893.         var pos1 = uri.indexOf("/", posS + 2);
  6894.         if (pos1 < 0 || posLasts - pos1 <= 0) {
  6895.             return "/"
  6896.         }
  6897.         var tail = uri.substring(posLasts + 1);
  6898.         if (tail.indexOf(".") > 0) {
  6899.             return uri.substring(pos1, posLasts)
  6900.         }
  6901.         return uri.substring(pos1)
  6902.     };
  6903.     var get_qs_value = function (key, dft_) {
  6904.         if (dft_ == null) {
  6905.             dft_ = ""
  6906.         }
  6907.         key = key.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
  6908.         var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
  6909.         var qs = regex.exec(window.location.href);
  6910.         if (qs == null) {
  6911.             return dft_
  6912.         } else {
  6913.             return qs[1]
  6914.         }
  6915.     };
  6916.     var get_js_folder_url = function () {
  6917.         var i, root, pos, scripts = document.getElementsByTagName("script");
  6918.         for (i = 0; i < scripts.length; i++) {
  6919.             pos = scripts[i].src.toLowerCase().indexOf("juicebox.js");
  6920.             if (pos === 0) {
  6921.                 return ""
  6922.             }
  6923.             if (pos > 0) {
  6924.                 return scripts[i].src.substring(0, pos)
  6925.             }
  6926.         }
  6927.         return ""
  6928.     };
  6929.     var u_skey = "cd64f8c2ad416da082f8c514ba054429";
  6930.     var set_cookie = function (c_name, value, expires) {
  6931.         if (expires < 0) {
  6932.             expires = "Thu, 01 Jan 1970 00:00:00 GMT"
  6933.         } else {
  6934.             expires = ""
  6935.         }
  6936.         document.cookie = c_name + "=" + escape(value) + ((expires === "") ? "" : ";expires=" + expires) + ";path=/"
  6937.     };
  6938.     var get_cookie = function (c_name) {
  6939.         if (document.cookie.length > 0) {
  6940.             c_start = document.cookie.indexOf(c_name + "=");
  6941.             if (c_start !== -1) {
  6942.                 c_start = c_start + c_name.length + 1;
  6943.                 c_end = document.cookie.indexOf(";", c_start);
  6944.                 if (c_end === -1) {
  6945.                     c_end = document.cookie.length
  6946.                 }
  6947.                 return unescape(document.cookie.substring(c_start, c_end))
  6948.             }
  6949.         }
  6950.         return ""
  6951.     };
  6952.     var wrap_value = function (val) {
  6953.         switch (typeof val) {
  6954.         case "boolean":
  6955.         case "number":
  6956.             return val + "";
  6957.         default:
  6958.             return '"' + val + '"'
  6959.         }
  6960.     };
  6961.     var save_object_2_cookie = function (c_name, object) {
  6962.         if (!object) {
  6963.             set_cookie(c_name, "");
  6964.             return
  6965.         }
  6966.         var jsons = "";
  6967.         for (var k in object) {
  6968.             if (jsons.length > 0) {
  6969.                 jsons += ","
  6970.             }
  6971.             jsons += k + ":" + wrap_value(object[k])
  6972.         }
  6973.         jsons = "{" + jsons + "}";
  6974.         set_cookie(c_name, jsons)
  6975.     };
  6976.     var get_object_from_cookie = function (c_name) {
  6977.         var json = get_cookie(c_name);
  6978.         var ret;
  6979.         eval("ret = " + (json ? json : null) + ";");
  6980.         return ret
  6981.     };
  6982.     var get_device_dpi = function (cb) {
  6983.         if (!is_iphone() && !is_ipad() && !is_android()) {
  6984.             if (cb) {
  6985.                 cb(1)
  6986.             }
  6987.             return 1
  6988.         }
  6989.         var s = document.createElement("style");
  6990.         var d = document.createElement("div");
  6991.         d.id = "dpi-detector-01";
  6992.         var map = [{
  6993.             ratio: 1,
  6994.             pixel: "10px"
  6995.         }, {
  6996.             ratio: 1.5,
  6997.             pixel: "15px"
  6998.         }, {
  6999.             ratio: 2,
  7000.             pixel: "20px"
  7001.         }];
  7002.         s.innerText = "";
  7003.         for (var i = 0; i < map.length; i++) {
  7004.             s.innerText += "@media (-webkit-min-device-pixel-ratio:" + map[i].ratio + ") {#" + d.id + "{font-size:" + map[i].pixel + " !important;}}"
  7005.         }
  7006.         document.documentElement.appendChild(s).appendChild(d);
  7007.         window.setTimeout(function () {
  7008.             var dfs = getComputedStyle(d, null).getPropertyValue("font-size");
  7009.             for (var j = 0; j < map.length; j++) {
  7010.                 if (dfs == map[i].pixel) {
  7011.                     if (cb) {
  7012.                         cb(map[i].ratio)
  7013.                     }
  7014.                     return map[i].ratio
  7015.                 }
  7016.             }
  7017.             s.parentNode.removeChild(s);
  7018.             d.parentNode.removeChild(d);
  7019.             if (cb) {
  7020.                 cb(1)
  7021.             }
  7022.             return 1
  7023.         }, 100)
  7024.     };
  7025.     var get_query_path = function (document_id, path) {
  7026.         var paths = path.split(",");
  7027.         var xpath = "";
  7028.         for (var i = 0; i < paths.length; i++) {
  7029.             xpath += "#" + document_id + " " + paths[i] + (i === paths.length - 1 ? "" : ", ")
  7030.         }
  7031.         return xpath
  7032.     };
  7033.     var is_small_screen = function () {
  7034.         if (is_android()) {
  7035.             if (navigator.userAgent.match(/Mobile/i)) {
  7036.                 return true
  7037.             }
  7038.             return false
  7039.         }
  7040.         if (Math.max(screen.height, screen.width) > 1000) {
  7041.             return false
  7042.         }
  7043.         return true
  7044.     };
  7045.     var is_swipable_device = function () {
  7046.         if (!is_iphone() && !is_ipad() && !is_android()) {
  7047.             return false
  7048.         }
  7049.         return true
  7050.     };
  7051.     var is_large_screen_mode = function (config) {
  7052.         if (config.screenmode.toUpperCase() === "LARGE") {
  7053.             return true
  7054.         }
  7055.         if (config.screenmode.toUpperCase() === "SMALL") {
  7056.             return false
  7057.         }
  7058.         if (!is_small_screen() && !is_small_android() && !is_iphone()) {
  7059.             return true
  7060.         }
  7061.         return false
  7062.     };
  7063.     var is_earlier_ie = function () {
  7064.         if ($.browser.msie && $.browser.version < 9) {
  7065.             return true
  7066.         }
  7067.         return false
  7068.     };
  7069.     var is_firefox3 = function () {
  7070.         var bz = $.browser;
  7071.         if (bz.mozilla && bz.version.slice(0, 3) == "1.9") {
  7072.             return true
  7073.         }
  7074.         return false
  7075.     };
  7076.     var format_color = function (color) {
  7077.         color = color.replace(/#/g, "");
  7078.         if (color.match(/^[0-9a-f]{3,6}$/i)) {
  7079.             return "#" + color
  7080.         }
  7081.         return color
  7082.     };
  7083.     var need_new_window = function () {
  7084.         return false;
  7085.         if (!is_iphone() || !is_ipad()) {
  7086.             return false
  7087.         }
  7088.     };
  7089.     var is_adobe_air = function () {
  7090.         return navigator.userAgent.match(/AdobeAIR/i)
  7091.     };
  7092.     return {
  7093.         ship: is_pro_version === u_skey,
  7094.         concate_path: concatenate_path,
  7095.         is_page_scrolling: is_it_scrolling,
  7096.         is_in_iframe: in_iframe,
  7097.         add_viewport_meta_tag_4_device: add_viewport_meta,
  7098.         set_viewport_meta: set_viewport_meta,
  7099.         is_iphone: is_iphone,
  7100.         is_ipad: is_ipad,
  7101.         is_android: is_android,
  7102.         is_small_android: is_small_android,
  7103.         get_android_ver: get_android_ver,
  7104.         is_chrome: is_chrome,
  7105.         get_current_path: get_current_path,
  7106.         get_query_string_value: get_qs_value,
  7107.         save_object_2_cookie: save_object_2_cookie,
  7108.         get_object_from_cookie: get_object_from_cookie,
  7109.         get_device_dpi: get_device_dpi,
  7110.         get_query_path: get_query_path,
  7111.         is_swipable_device: is_swipable_device,
  7112.         is_large_screen_mode: is_large_screen_mode,
  7113.         is_earlier_ie: is_earlier_ie,
  7114.         set_viewport_value: set_viewport_value,
  7115.         format_color: format_color,
  7116.         need_viewport_meta: need_viewport_meta,
  7117.         host_has_viewport_meta: host_has_viewport_meta,
  7118.         get_viewport_meta_content: get_viewport_meta_content,
  7119.         set_viewport_meta_content: set_viewport_meta_content,
  7120.         is_firefox: is_firefox,
  7121.         is_firefox3: is_firefox3,
  7122.         get_js_folder_url: get_js_folder_url,
  7123.         need_new_window: need_new_window,
  7124.         convert_to_absolute_path: convert_to_absolute_path,
  7125.         is_adobe_air: is_adobe_air
  7126.     }
  7127. };
  7128. var juicebox_config_manager = function (h, i) {
  7129.     var e = h;
  7130.     var m = i;
  7131.     var f = false;
  7132.     var c = "048d7e421a02974b54391bc3463ebd52";
  7133.     var l = false;
  7134.     var B = "";
  7135.     var D = {
  7136.         containerid: "",
  7137.         debugmode: false,
  7138.         forcetouchmode: false,
  7139.         enabletouchzoom: true,
  7140.         gallerywidth: "100%",
  7141.         galleryheight: "100%",
  7142.         backgroundcolor: "",
  7143.         backgroundopacity: "1",
  7144.         textcolor: "",
  7145.         topbackcolor: "",
  7146.         topbackopacity: "0",
  7147.         captionbackcolor: "",
  7148.         captionbackopacity: "1",
  7149.         buttonbarbackcolor: "",
  7150.         buttonbarbackopacity: "1",
  7151.         imageframecolor: "",
  7152.         imageframeopacity: "1",
  7153.         thumbframecolor: "",
  7154.         thumbframeopacity: "1",
  7155.         stagepadding: 0,
  7156.         imagepadding: 0,
  7157.         framewidth: 0,
  7158.         enablekeyboardcontrols: true,
  7159.         firstimageindex: -1,
  7160.         randomizeimages: false,
  7161.         showpreloader: true,
  7162.         screenmode: "AUTO",
  7163.         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',
  7164.         imagelocking: false,
  7165.         enablelooping: false,
  7166.         imageclickmode: "NAVIGATE",
  7167.         imagescalemode: "SCALE_DOWN",
  7168.         imagepreloading: "PAGE",
  7169.         imagetransitiontime: 0.5,
  7170.         imagetransitiontype: "SLIDE",
  7171.         showimageoverlay: "AUTO",
  7172.         showimagenav: true,
  7173.         showbigplaybutton: false,
  7174.         thumbwidth: 85,
  7175.         thumbheight: 85,
  7176.         thumbpadding: 10,
  7177.         thumbpreloading: "PAGE",
  7178.         changecaptiononhover: false,
  7179.         changeimageonhover: false,
  7180.         usethumbdots: false,
  7181.         showthumbpagingtext: false,
  7182.         showsmallthumbs: true,
  7183.         smallthumbsshowtitles: false,
  7184.         smallthumbslayoutstyle: "GRID",
  7185.         smallthumbslidetime: 0.5,
  7186.         topareaheight: 50,
  7187.         buttonbarposition: "OVERLAY",
  7188.         showopenbutton: true,
  7189.         showexpandbutton: true,
  7190.         showinfobutton: false,
  7191.         showdownloadbutton: false,
  7192.         showsharebutton: true,
  7193.         shownavbuttons: false,
  7194.         showautoplaybutton: false,
  7195.         showaudiobutton: false,
  7196.         showthumbsbutton: true,
  7197.         showlargethumbs: true,
  7198.         gallerytitle: "",
  7199.         gallerytitleposition: "OVERLAY",
  7200.         captionposition: "OVERLAY",
  7201.         maxcaptionheight: 120,
  7202.         showimagenumber: true,
  7203.         enableautoplay: false,
  7204.         autoplayonload: false,
  7205.         displaytime: 5,
  7206.         showautoplaystatus: true,
  7207.         gonextonautoplay: false,
  7208.         autoplaythumbs: true,
  7209.         audiourlmp3: "",
  7210.         audiourlogg: "",
  7211.         loopaudio: true,
  7212.         playaudioonload: false,
  7213.         audiovolume: 0.8,
  7214.         showbackbutton: false,
  7215.         backbuttontext: "< Back",
  7216.         backbuttonurl: "",
  7217.         backbuttonposition: "TOP",
  7218.         usefixedlayout: false,
  7219.         showsplashpage: "AUTO",
  7220.         splashbuttontext: "View Gallery",
  7221.         splashtitle: "",
  7222.         splashimageurl: "",
  7223.         splashshowimagecount: true,
  7224.         splashdescription: "",
  7225.         enableseo: false,
  7226.         seoadditionaltext: "",
  7227.         enabledirectlinks: false,
  7228.         enabletwitersharing: true,
  7229.         enablefacebooksharing: true,
  7230.         enableemailsharing: true,
  7231.         enabledirectlinksharing: true,
  7232.         shareuseimagedescription: false,
  7233.         sharetext: "View my image",
  7234.         configurl: "config.xml",
  7235.         themeurl: m.get_js_folder_url() + "classic/theme.css",
  7236.         baseurl: "",
  7237.         useflickr: false,
  7238.         flickrusername: "",
  7239.         flickrtags: "",
  7240.         flickruserid: "",
  7241.         flickrsetid: "",
  7242.         flickrgroupid: "",
  7243.         flickrtagmode: "ALL",
  7244.         flickrsort: "DATE-POSTED-DESC",
  7245.         flickrimagesize: "LARGE",
  7246.         flickrimagecount: 50,
  7247.         flickrextraparams: "",
  7248.         flickrshowtitle: true,
  7249.         flickrshowdescription: false,
  7250.         flickrshowpagelink: false,
  7251.         flickrpagelinktext: "View on Flickr",
  7252.         theme: "classic",
  7253.         showcaption: true,
  7254.         slidecaption: false,
  7255.         forceheightcalculation: true,
  7256.         maxthumbcolumns: 10,
  7257.         thumbnail_rows: 0,
  7258.         thumbnail_cols: 0,
  7259.         thumb_load_placeholder: "<div class='jb-status-thumb-loading'><div>",
  7260.         main_load_placeholder: "<div class='jb-status-loading'></div>",
  7261.         pages_header: "",
  7262.         sync_caption_dimensions: true,
  7263.         minimagegap: 60,
  7264.         use_webkit_transform: m.is_swipable_device() && !m.is_in_iframe() && m.is_ipad(),
  7265.         onload: function () {}
  7266.     };
  7267.     var g = ",onload,";
  7268.     var C = ",containerid,gallerytitle,gallerywidth,galleryheight,backgroundcolor,overlaycolor,framecolor,showopenbutton,showexpandbutton,useflickr,flickrusername,flickrtags,configurl,themeurl,baseurl,debugmode,showthumbsbutton,forceheightcalculation,";
  7269.     var j = {
  7270.         showlargethumbs: {
  7271.             appliedValues: [false],
  7272.             "default": true
  7273.         },
  7274.         usethumbdots: {
  7275.             appliedValues: [true],
  7276.             "default": false
  7277.         },
  7278.         captionposition: {
  7279.             appliedValues: ["BELOW_IMAGE", "BOTTOM"],
  7280.             "default": "OVERLAY"
  7281.         },
  7282.         buttonbarposition: {
  7283.             appliedValues: ["TOP"],
  7284.             "default": "OVERLAY"
  7285.         },
  7286.         stagepadding: {
  7287.             appliedValues: null,
  7288.             "default": 0
  7289.         },
  7290.         imagepadding: {
  7291.             appliedValues: null,
  7292.             "default": 0
  7293.         },
  7294.         textcolor: {
  7295.             appliedValues: null,
  7296.             "default": ""
  7297.         },
  7298.         topbackcolor: {
  7299.             appliedValues: null,
  7300.             "default": ""
  7301.         },
  7302.         captionbackcolor: {
  7303.             appliedValues: null,
  7304.             "default": ""
  7305.         },
  7306.         buttonbarbackcolor: {
  7307.             appliedValues: null,
  7308.             "default": ""
  7309.         },
  7310.         imageframecolor: {
  7311.             appliedValues: null,
  7312.             "default": ""
  7313.         },
  7314.         thumbframecolor: {
  7315.             appliedValues: null,
  7316.             "default": ""
  7317.         },
  7318.         imagetransitiontype: {
  7319.             appliedValues: null,
  7320.             "default": "SLIDE"
  7321.         },
  7322.         backgroundcolor: {
  7323.             appliedValues: null,
  7324.             "default": ""
  7325.         }
  7326.     };
  7327.     var n = function (F) {
  7328.         if (!F) {
  7329.             return "100%"
  7330.         }
  7331.         if (typeof (F) === "number" || F.indexOf("%") <= 0) {
  7332.             return parseInt(F) + "px"
  7333.         }
  7334.         return F
  7335.     };
  7336.     var d = function (H, G) {
  7337.         if (!H) {
  7338.             return G
  7339.         }
  7340.         var F = H.split("#")[0].split("?")[0].split("/");
  7341.         if (F.length <= 0) {
  7342.             return G
  7343.         }
  7344.         if (F.length <= 1) {
  7345.             return ""
  7346.         }
  7347.         if (F[F.length - 1].toLowerCase().indexOf("theme.css") < 0) {
  7348.             return G
  7349.         }
  7350.         return F[F.length - 2]
  7351.     };
  7352.     var o = function (G, F, H) {
  7353.         if (!G || G.length <= F) {
  7354.             return H
  7355.         }
  7356.         return G[F]
  7357.     };
  7358.     var s = function (H, F) {
  7359.         if (!F) {
  7360.             return true
  7361.         }
  7362.         for (var G = 0; G < F.length; G++) {
  7363.             if (typeof (H) === "string") {
  7364.                 if (F[G].toUpperCase() === H.toUpperCase()) {
  7365.                     return true
  7366.                 }
  7367.             } else {
  7368.                 if (F[G] === H) {
  7369.                     return true
  7370.                 }
  7371.             }
  7372.         }
  7373.         return false
  7374.     };
  7375.     var z = function () {
  7376.         if (m.is_iphone() || m.is_ipad()) {
  7377.             D.playaudioonload = false
  7378.         }
  7379.         if (!D.showpreloader) {
  7380.             D.main_load_placeholder = D.main_load_placeholder.replace("jb-status-loading", "jb-status-no-loading")
  7381.         }
  7382.         var G = m.is_large_screen_mode(D);
  7383.         if (G) {
  7384.             return
  7385.         }
  7386.         for (var F in D) {
  7387.             if (!j[F]) {
  7388.                 continue
  7389.             }
  7390.             if (!s(D[F], j[F].appliedValues)) {
  7391.                 continue
  7392.             }
  7393.             D[F] = j[F]["default"]
  7394.         }
  7395.         if (m.is_swipable_device()) {
  7396.             D.forcetouchmode = false
  7397.         }
  7398.     };
  7399.     var a = function () {
  7400.         D.galleryheight = n(D.galleryheight);
  7401.         D.gallerywidth = n(D.gallerywidth);
  7402.         D.theme = d(D.themeurl, D.theme);
  7403.         if (D.thumbwidth < 20 || D.thumbwidth > 600) {
  7404.             D.thumbwidth = 96
  7405.         }
  7406.         if (D.thumbheight < 20 || D.thumbheight > 600) {
  7407.             D.thumbheight = 96
  7408.         }
  7409.         if (typeof (D.languagelist) === "string") {
  7410.             var F = D.languagelist.split("|");
  7411.             D.languagelist = {};
  7412.             D.languagelist.p = o(F, 0, "");
  7413.             D.languagelist.n = o(F, 1, "");
  7414.             D.languagelist.strta = o(F, 2, "");
  7415.             D.languagelist.stpa = o(F, 3, "");
  7416.             D.languagelist.plya = o(F, 4, "");
  7417.             D.languagelist.psa = o(F, 5, "");
  7418.             D.languagelist.st = o(F, 6, "");
  7419.             D.languagelist.gf = o(F, 7, "");
  7420.             D.languagelist.ef = o(F, 8, "");
  7421.             D.languagelist.oiinw = o(F, 9, "");
  7422.             D.languagelist.di = o(F, 10, "");
  7423.             D.languagelist.abt = o(F, 11, "");
  7424.             D.languagelist.aon = o(F, 12, "");
  7425.             D.languagelist.aoff = o(F, 13, "");
  7426.             D.languagelist.stlsm = o(F, 14, "");
  7427.             D.languagelist.htlsm = o(F, 15, "");
  7428.             D.languagelist.sinfo = o(F, 16, "");
  7429.             D.languagelist.gonxt = o(F, 17, "");
  7430.             D.languagelist.goprv = o(F, 18, "");
  7431.             D.languagelist.hdinfo = o(F, 19, "");
  7432.             D.languagelist.lcchm = o(F, 20, "");
  7433.             D.languagelist.ae = o(F, 21, "");
  7434.             D.languagelist.noid01 = o(F, 22, "");
  7435.             D.languagelist.noid02 = o(F, 23, "");
  7436.             D.languagelist.nothm = o(F, 24, "")
  7437.         }
  7438.         var G;
  7439.         if (D) {
  7440.             if (D.backgroundcolor) {
  7441.                 G = r(D.backgroundcolor);
  7442.                 D.backgroundcolor = G.color;
  7443.                 D.backgroundopacity = G.opacity
  7444.             }
  7445.             if (D.textcolor) {
  7446.                 G = r(D.textcolor);
  7447.                 D.textcolor = G.color
  7448.             }
  7449.             if (D.topbackcolor) {
  7450.                 G = r(D.topbackcolor);
  7451.                 D.topbackcolor = G.color;
  7452.                 D.topbackopacity = G.opacity
  7453.             }
  7454.             if (D.captionbackcolor) {
  7455.                 G = r(D.captionbackcolor);
  7456.                 D.captionbackcolor = G.color;
  7457.                 D.captionbackopacity = G.opacity
  7458.             }
  7459.             if (D.buttonbarbackcolor) {
  7460.                 G = r(D.buttonbarbackcolor);
  7461.                 D.buttonbarbackcolor = G.color;
  7462.                 D.buttonbarbackopacity = G.opacity
  7463.             }
  7464.             if (D.imageframecolor) {
  7465.                 G = r(D.imageframecolor);
  7466.                 D.imageframecolor = G.color;
  7467.                 D.imageframeopacity = G.opacity
  7468.             }
  7469.             if (D.thumbframecolor) {
  7470.                 G = r(D.thumbframecolor);
  7471.                 D.thumbframecolor = G.color;
  7472.                 D.thumbframeopacity = G.opacity
  7473.             }
  7474.         }
  7475.     };
  7476.     var q = function (G) {
  7477.         var F = G.toString(16);
  7478.         if (F.length >= 2) {
  7479.             return F
  7480.         }
  7481.         if (F.length === 1) {
  7482.             return "0" + F
  7483.         }
  7484.         if (F.length === 0) {
  7485.             return "00"
  7486.         }
  7487.         return F
  7488.     };
  7489.     var r = function (M) {
  7490.         if (!M) {
  7491.             return {
  7492.                 color: "",
  7493.                 opacity: v(1)
  7494.             }
  7495.         }
  7496.         var K = M.toLowerCase().replace(/ /g, "");
  7497.         if (K.indexOf("rgb") !== 0) {
  7498.             return {
  7499.                 color: M,
  7500.                 opacity: v(1)
  7501.             }
  7502.         }
  7503.         K = K.replace("rgba(", "").replace("rgb(", "").replace(")", "");
  7504.         var J = K.split(",");
  7505.         if (J.length < 3 || J.length > 4) {
  7506.             return {
  7507.                 color: M,
  7508.                 opacity: v(1)
  7509.             }
  7510.         }
  7511.         var G = M;
  7512.         if (e.browser.msie && e.browser.version < 9) {
  7513.             var I = parseInt(J[0]);
  7514.             var H = parseInt(J[1]);
  7515.             var F = parseInt(J[2]);
  7516.             G = q(I) + q(H) + q(F)
  7517.         }
  7518.         if (J.length === 3) {
  7519.             return {
  7520.                 color: G,
  7521.                 opacity: v(1)
  7522.             }
  7523.         }
  7524.         var L = parseFloat(J[3]);
  7525.         if (L < 0 || L > 1) {
  7526.             return {
  7527.                 color: G,
  7528.                 opacity: v(1)
  7529.             }
  7530.         }
  7531.         return {
  7532.             color: G,
  7533.             opacity: v(L.toString())
  7534.         }
  7535.     };
  7536.     var v = function (F) {
  7537.         if (!(e.browser.msie && e.browser.version < 9)) {
  7538.             return F
  7539.         }
  7540.         if (("" + F).indexOf("filter") === 0) {
  7541.             return F
  7542.         }
  7543.         var G = parseFloat(F);
  7544.         return "filter:alpha(opacity=" + parseInt(100 * G) + ")"
  7545.     };
  7546.     var u = function (H) {
  7547.         if (!H) {
  7548.             return
  7549.         }
  7550.         var G, I;
  7551.         for (var F in H) {
  7552.             G = F.toLowerCase();
  7553.             if (typeof D[G] == "undefined") {
  7554.                 continue
  7555.             }
  7556.             I = "," + G + ",";
  7557.             if (p === "048d7e421a20974d54321bc3563ebd52") {
  7558.                 continue
  7559.             }
  7560.             if (!f && p !== "048d7e421a02974b54391bc3463ebd52" && C.indexOf(I) < 0) {
  7561.                 continue
  7562.             }
  7563.             if (g.indexOf(I) >= 0) {
  7564.                 continue
  7565.             }
  7566.             D[G] = t(H[F], (typeof D[G]))
  7567.         }
  7568.         a()
  7569.     };
  7570.     var p = "048d7e421a02974b54391bc3463ebd52";
  7571.     var t = function (G, F) {
  7572.         switch (F) {
  7573.         case "boolean":
  7574.             if (typeof G == "boolean") {
  7575.                 return G
  7576.             }
  7577.             return (G.toLowerCase() == "true" || G.toLowerCase() == "on" || G == "1") ? true : false;
  7578.         case "number":
  7579.             return parseFloat(G);
  7580.         default:
  7581.             return G
  7582.         }
  7583.         return G
  7584.     };
  7585.     var E = function () {
  7586.         var F = "";
  7587.         var J = ",gallerywidth,galleryheight,containerid,thumbnail_rows,thumbnail_cols,";
  7588.         var I, H;
  7589.         for (var G in D) {
  7590.             I = "," + G + ",";
  7591.             if (g.indexOf(I) >= 0) {
  7592.                 continue
  7593.             }
  7594.             if (J.indexOf(I) >= 0) {
  7595.                 continue
  7596.             }
  7597.             if (p === "048d7e421a20975d64321bc3563ebd52") {
  7598.                 continue
  7599.             }
  7600.             H = (typeof D[G] == "string") ? D[G].replace("#", "_p-s_") : D[G];
  7601.             F += G + "=" + encodeURI(H) + "&"
  7602.         }
  7603.         return F
  7604.     };
  7605.     var A = function () {
  7606.         var J = window.location.href.split("?");
  7607.         if (J.length <= 1) {
  7608.             return null
  7609.         }
  7610.         var F = J[1].split("#");
  7611.         if (F.length <= 0) {
  7612.             return null
  7613.         }
  7614.         var N = F[0].split("&");
  7615.         var K = {};
  7616.         var M, G, O, I;
  7617.         var L;
  7618.         for (var H = 0; H < N.length; H++) {
  7619.             M = N[H].split("=");
  7620.             if (M.length < 2) {
  7621.                 continue
  7622.             }
  7623.             G = M[0].toLowerCase();
  7624.             I = M[1] ? M[1].replace("_p-s_", "#") : "";
  7625.             O = decodeURI(I);
  7626.             L = typeof D[G];
  7627.             if (L == "undefined") {
  7628.                 continue
  7629.             }
  7630.             K[G] = t(O, L)
  7631.         }
  7632.         return K
  7633.     };
  7634.     var k = function (H) {
  7635.         if (!H) {
  7636.             return null
  7637.         }
  7638.         var G = {};
  7639.         var K, I;
  7640.         var F = e.browser.msie ? H.childNodes[1] : H.childNodes[0];
  7641.         if (!F || !F.attributes) {
  7642.             return null
  7643.         }
  7644.         var J = e(F.attributes);
  7645.         J.each(function (L, M) {
  7646.             K = M.nodeName.toLowerCase();
  7647.             I = typeof D[K];
  7648.             if (I == "undefined") {
  7649.                 return
  7650.             }
  7651.             G[K] = t(M.nodeValue, I)
  7652.         });
  7653.         return G
  7654.     };
  7655.     var y = function (F) {};
  7656.     var b = function (G, F, H) {
  7657.         if (window.location.href.indexOf("jbdbgmd=true") > 0 && l) {
  7658.             f = true
  7659.         }
  7660.         u(k(F));
  7661.         u(G);
  7662.         if (D.debugmode || f) {
  7663.             u(A())
  7664.         }
  7665.     };
  7666.     var w = function (G, F) {
  7667.         u(k(F));
  7668.         u(G);
  7669.         if (D.debugmode || f) {
  7670.             u(A())
  7671.         }
  7672.         z()
  7673.     };
  7674.     var x = function () {
  7675.         return D
  7676.     };
  7677.     return {
  7678.         isp: c == p,
  7679.         init: b,
  7680.         sync_options: w,
  7681.         get_config: x,
  7682.         get_query_string: E,
  7683.         get_cookie_manager: y
  7684.     }
  7685. };
  7686. var juicebox_gallery_dialog = function (f) {
  7687.     var h, b;
  7688.     var a = "jb-glry-dlg";
  7689.     var i = function (m) {
  7690.         h = m.jquery;
  7691.         b = h("#" + a);
  7692.         if (b.length <= 0) {
  7693.             h("body").append(k());
  7694.             b = h("#" + a)
  7695.         }
  7696.     };
  7697.     var k = function () {
  7698.         return "<div id='" + a + "' style='display:none;position:absolute;width:100%;height:100%;left:0;top:0;'></div>"
  7699.     };
  7700.     var c = function () {
  7701.         b.hide()
  7702.     };
  7703.     var l = function () {
  7704.         c();
  7705.         b.html("");
  7706.         g(true);
  7707.         d(true)
  7708.     };
  7709.     var g = function (m) {
  7710.         if (m) {
  7711.             b.siblings(".jb-status-hiding-4-dlg").show().removeClass("jb-status-hiding-4-dlg")
  7712.         } else {
  7713.             b.siblings(":visible").addClass("jb-status-hiding-4-dlg").hide()
  7714.         }
  7715.     };
  7716.     var d = function (m) {
  7717.         if (m) {
  7718.             b.siblings().children(".jb-status-hiding-4-dlg").show().removeClass("jb-status-hiding-4-dlg")
  7719.         } else {
  7720.             b.siblings().children(".juicebox-gallery:visible").addClass("jb-status-hiding-4-dlg").hide()
  7721.         }
  7722.     };
  7723.     var j = function (n, m) {
  7724.         if (n) {
  7725.             g(false)
  7726.         } else {
  7727.             d(false)
  7728.         } if (m) {
  7729.             b.html(m)
  7730.         }
  7731.         b.show()
  7732.     };
  7733.     var e = function () {
  7734.         return a
  7735.     };
  7736.     i(f);
  7737.     return {
  7738.         initialize: i,
  7739.         hide_dialog: c,
  7740.         cleanup_dialog: l,
  7741.         show_dialog: j,
  7742.         get_id: e
  7743.     }
  7744. };
  7745. var juicebox_sizing_manager = function (i, d, a) {
  7746.     var e = i;
  7747.     var z = a;
  7748.     var q = d;
  7749.     var k = e("body");
  7750.     var h = [{
  7751.         name: "Nexus S",
  7752.         height: 510,
  7753.         width: 296
  7754.     }, {
  7755.         name: "HTC Panache",
  7756.         height: 535,
  7757.         width: 325
  7758.     }, {
  7759.         name: "HTC myTouch",
  7760.         height: 535,
  7761.         width: 325
  7762.     }, {
  7763.         name: "MB860",
  7764.         height: 615,
  7765.         width: 334
  7766.     }, {
  7767.         name: "GT-I9100M",
  7768.         height: 515,
  7769.         width: 301
  7770.     }];
  7771.     var p = function () {
  7772.         var C;
  7773.         for (var B = 0; B < h.length; B++) {
  7774.             C = h[B];
  7775.             if (navigator.userAgent.indexOf(C.name) >= 0) {
  7776.                 if (C.additional) {
  7777.                     if (navigator.userAgent.indexOf(C.additional) >= 0) {
  7778.                         return C
  7779.                     } else {
  7780.                         continue
  7781.                     }
  7782.                 }
  7783.                 return C
  7784.             }
  7785.         }
  7786.         return null
  7787.     };
  7788.     var x = function (B) {
  7789.         var C = p();
  7790.         if (!C) {
  7791.             return {
  7792.                 height: B,
  7793.                 registered: false
  7794.             }
  7795.         }
  7796.         return {
  7797.             height: C.height,
  7798.             registered: true
  7799.         }
  7800.     };
  7801.     var n = function (B) {
  7802.         var C = p();
  7803.         if (!C) {
  7804.             return {
  7805.                 width: B,
  7806.                 registered: false
  7807.             }
  7808.         }
  7809.         return {
  7810.             width: C.width,
  7811.             registered: true
  7812.         }
  7813.     };
  7814.  
  7815.     function c(C) {
  7816.         var B = f(C, "height");
  7817.         if (parseInt(B) === 0) {
  7818.             return 0
  7819.         }
  7820.         return B
  7821.     }
  7822.  
  7823.     function A(F, E) {
  7824.         if (z.is_in_iframe()) {
  7825.             return {
  7826.                 height: e(window).height(),
  7827.                 registered: D
  7828.             }
  7829.         }
  7830.         var C = F;
  7831.         var D = true;
  7832.         if (z.is_iphone()) {
  7833.             C = F * g(F, E)
  7834.         } else {
  7835.             if (z.is_small_android()) {
  7836.                 if (z.get_android_ver() >= 2.3) {
  7837.                     var B;
  7838.                     if (F > E) {
  7839.                         B = x(F);
  7840.                         C = B.height;
  7841.                         D = B.registered
  7842.                     } else {
  7843.                         B = n(F);
  7844.                         C = B.width;
  7845.                         D = B.registered
  7846.                     }
  7847.                 } else {
  7848.                     if (F > E) {
  7849.                         C = F
  7850.                     } else {
  7851.                         C = F + 7
  7852.                     }
  7853.                 }
  7854.             }
  7855.         }
  7856.         return {
  7857.             height: C,
  7858.             registered: D
  7859.         }
  7860.     }
  7861.     var y = c(k.attr("style"));
  7862.     var j = (!y && y.toLowerCase().indexOf("%") < 0 && parseInt(y) > 0) || (k.height() > 0.7 * e(window).height() && k.height() > 160);
  7863.     var v = function (B) {
  7864.         if (j) {
  7865.             return false
  7866.         }
  7867.         if (B.galleryheight.indexOf("%") < 0) {
  7868.             return false
  7869.         }
  7870.         if (B.forceheightcalculation && !(z.is_iphone() && t(B))) {
  7871.             return false
  7872.         }
  7873.         return true
  7874.     };
  7875.     var l = function (B) {
  7876.         if (!v(B)) {
  7877.             return
  7878.         }
  7879.         var C = e(window);
  7880.         k.height(A(C.height(), C.width()).height)
  7881.     };
  7882.  
  7883.     function g(C, B) {
  7884.         if (!z.is_iphone()) {
  7885.             return 1
  7886.         }
  7887.         return (C > B) ? 1.18 : 1.3
  7888.     }
  7889.     var m = function (C, B) {
  7890.         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())) {
  7891.             return true
  7892.         }
  7893.         return false
  7894.     };
  7895.     var t = function (C) {
  7896.         var B = z.is_page_scrolling();
  7897.         if (m(C.gallerywidth, C.galleryheight) && (z.is_iphone() || e.browser.msie || (!B.v_scrolling && !B.h_scrolling))) {
  7898.             return true
  7899.         }
  7900.         return false
  7901.     };
  7902.  
  7903.     function f(F, C) {
  7904.         if (!F || !C) {
  7905.             return ""
  7906.         }
  7907.         var B = F.split(";");
  7908.         var D, I, H, G, E;
  7909.         for (E = 0; E < B.length; E++) {
  7910.             I = e.trim(B[E]);
  7911.             if (!I) {
  7912.                 continue
  7913.             }
  7914.             D = I.split(":");
  7915.             if (D.length !== 2) {
  7916.                 continue
  7917.             }
  7918.             H = e.trim(D[0]);
  7919.             G = e.trim(D[1]);
  7920.             if (!H) {
  7921.                 continue
  7922.             }
  7923.             if (H.toLowerCase() === C.toLowerCase()) {
  7924.                 return G
  7925.             }
  7926.         }
  7927.         return ""
  7928.     }
  7929.     var s = function (C) {
  7930.         if (z.is_iphone() || !C.forceheightcalculation && q.height() > 110) {
  7931.             return q.height()
  7932.         }
  7933.         var B = parseInt(C.galleryheight);
  7934.         if (C.galleryheight.indexOf("%") < 0) {
  7935.             return B
  7936.         }
  7937.         var F = 1;
  7938.         var D = 0;
  7939.         var E;
  7940.         q.parents().each(function (I, K) {
  7941.             var J = K.nodeName.toUpperCase();
  7942.             E = e(K).attr("style");
  7943.             var H = c(E);
  7944.             if (H.toLowerCase().indexOf("%") < 0 && parseInt(H) > 0) {
  7945.                 D = parseInt(H)
  7946.             }
  7947.             if (!H || D > 0) {
  7948.                 return
  7949.             }
  7950.             if (H.indexOf("%") > 0) {
  7951.                 F *= (parseInt(H) / 100)
  7952.             }
  7953.         });
  7954.         var G = e(window);
  7955.         if (D === 0) {
  7956.             D = A(G.height(), G.width()).height
  7957.         }
  7958.         if (!B) {
  7959.             B = 100
  7960.         }
  7961.         B /= 100;
  7962.         return F * B * D
  7963.     };
  7964.     var r = function (Q, K, O, B, ad, G, Y, ah) {
  7965.         var U = o(Q, K, ah);
  7966.         var P = 2 * U;
  7967.         if (P > Q - 60 || P > K - 60) {
  7968.             P = 0;
  7969.             U = 0
  7970.         }
  7971.         var I, af, ab, V, H, ae, T, D, aa, N, ac, L, X;
  7972.         var W = U,
  7973.             Z = 0,
  7974.             M = 0,
  7975.             F = U;
  7976.         var S = ah.captionposition.toUpperCase();
  7977.         X = 0;
  7978.         aa = ah.maxcaptionheight;
  7979.         if (S === "BELOW_IMAGE" || S === "BOTTOM") {
  7980.             ac = K - U - aa
  7981.         } else {
  7982.             ac = K - (ah.thumbheight + ah.thumbpadding)
  7983.         } if (G) {
  7984.             Z = ah.topareaheight;
  7985.             M = Q - P
  7986.         }
  7987.         if (O && B) {
  7988.             var R = ah.thumbpadding / 2;
  7989.             var J = Y + (2 * R);
  7990.             I = (ah.showthumbpagingtext ? J + (ad ? 35 : 15) : J) + (ad ? 0 : 25);
  7991.             af = Q - P;
  7992.             ab = K - U - I + R;
  7993.             V = U;
  7994.             H = K - I - W - Z - U;
  7995.             ae = af;
  7996.             T = W + Z;
  7997.             D = U;
  7998.             if (ah.captionposition.toUpperCase() === "BOTTOM") {
  7999.                 H -= aa;
  8000.                 ab -= aa;
  8001.                 ac = K - aa - U
  8002.             } else {
  8003.                 if (ah.captionposition.toUpperCase() === "BELOW_IMAGE") {
  8004.                     aa = H;
  8005.                     H -= ah.maxcaptionheight;
  8006.                     ac = T
  8007.                 } else {
  8008.                     X = I + U;
  8009.                     var C = H - aa;
  8010.                     if (C > 0) {
  8011.                         ac = T + C
  8012.                     } else {
  8013.                         ac = T
  8014.                     }
  8015.                 }
  8016.             }
  8017.             N = af;
  8018.             L = U
  8019.         } else {
  8020.             var E = W + Z;
  8021.             I = K - E;
  8022.             af = Q - P;
  8023.             ab = U + E;
  8024.             V = U;
  8025.             H = K - E - U;
  8026.             ae = Q - P;
  8027.             T = E;
  8028.             D = U;
  8029.             N = Q - P;
  8030.             L = U;
  8031.             var ag = ah.captionposition.toUpperCase();
  8032.             if (ag === "BOTTOM") {
  8033.                 H -= aa
  8034.             } else {
  8035.                 if (ag === "BELOW_IMAGE") {
  8036.                     H -= aa;
  8037.                     ac = T
  8038.                 } else {
  8039.                     var C = H - aa;
  8040.                     if (C > 0) {
  8041.                         ac = T + C
  8042.                     } else {
  8043.                         ac = T
  8044.                     }
  8045.                     X = U
  8046.                 }
  8047.             }
  8048.         }
  8049.         return {
  8050.             top_panel_height: Z,
  8051.             top_panel_width: M,
  8052.             top_panel_left: F,
  8053.             top_panel_top: W,
  8054.             index_panel_height: I,
  8055.             index_panel_width: af,
  8056.             index_panel_top: ab,
  8057.             index_panel_left: V,
  8058.             detail_panel_height: H,
  8059.             detail_panel_width: ae,
  8060.             detail_panel_top: T,
  8061.             detail_panel_left: D,
  8062.             caption_panel_height: aa,
  8063.             caption_panel_width: N,
  8064.             caption_panel_left: L,
  8065.             caption_panel_top: ac,
  8066.             caption_panel_bottom: X
  8067.         }
  8068.     };
  8069.     var o = function (B, E, D) {
  8070.         var C = Math.min(B, E);
  8071.         if (D.stagepadding * 2 + 160 > C) {
  8072.             return parseInt((C - 160) / 2)
  8073.         }
  8074.         return D.stagepadding
  8075.     };
  8076.     var b = function (E, B, D) {
  8077.         var C = Math.min(E, B);
  8078.         if (D.imagepadding * 2 + 60 > C) {
  8079.             if (D.framewidth > 0 && D.framewidth * 2 >= 60) {
  8080.                 return parseInt((C - 60) / 4)
  8081.             }
  8082.             return parseInt((C - 60) / 2)
  8083.         }
  8084.         return D.imagepadding
  8085.     };
  8086.     var w = function (E, B, D) {
  8087.         var C = Math.min(E, B);
  8088.         if (D.framewidth * 2 + 60 > C) {
  8089.             if (D.imagepadding > 0 && D.imagepadding * 2 >= 60) {
  8090.                 return parseInt((C - 60) / 4)
  8091.             }
  8092.             return parseInt((C - 60) / 2)
  8093.         }
  8094.         if (2 * D.imagepadding + 2 * D.framewidth + 60 > C) {
  8095.             return 0
  8096.         }
  8097.         return D.framewidth
  8098.     };
  8099.     var u = function (E, D, C, F) {
  8100.         E = parseInt(E);
  8101.         D = parseInt(D);
  8102.         var B = new Image();
  8103.         B.onload = function () {
  8104.             var N, M, J, H, G, L;
  8105.             var K = B.width / E;
  8106.             var I = B.height / D;
  8107.             if (B.width <= 0 || B.height <= 0 || E <= 0 || D <= 0) {
  8108.                 return
  8109.             }
  8110.             if (K >= 1 && I >= 1) {
  8111.                 J = "auto";
  8112.                 H = "auto";
  8113.                 G = B.width;
  8114.                 L = B.height;
  8115.                 N = parseInt((B.height - D) / 2);
  8116.                 M = parseInt((B.width - E) / 2)
  8117.             } else {
  8118.                 if (K < I) {
  8119.                     J = E;
  8120.                     H = "auto";
  8121.                     G = E;
  8122.                     L = parseInt(G * B.height / B.width);
  8123.                     M = 0;
  8124.                     N = parseInt((L - D) / 2)
  8125.                 } else {
  8126.                     H = D;
  8127.                     J = "auto";
  8128.                     L = D;
  8129.                     G = parseInt(L * B.width / B.height);
  8130.                     N = 0;
  8131.                     M = parseInt((G - E) / 2)
  8132.                 }
  8133.             } if (F) {
  8134.                 F({
  8135.                     imageTop: -1 * N,
  8136.                     imageLeft: -1 * M,
  8137.                     imageWidth: J,
  8138.                     imageHeight: H,
  8139.                     imageExpectedWidth: G,
  8140.                     imageExpectedHeight: L
  8141.                 })
  8142.             }
  8143.         };
  8144.         B.src = C
  8145.     };
  8146.     return {
  8147.         get_gallery_height: s,
  8148.         is_fullscreen_mode: t,
  8149.         is_gallery_fully_filled: m,
  8150.         get_window_height: A,
  8151.         try_set_body_height: l,
  8152.         get_containers_size_and_position: r,
  8153.         get_stage_padding: o,
  8154.         get_image_padding: b,
  8155.         get_image_framewidth: w,
  8156.         position_2_fill_image: u
  8157.     }
  8158. };
  8159. var juicebox_flickr_image_loader = function (d, o, f) {
  8160.     var G = o.get_config();
  8161.     var g = 50;
  8162.     var p = f;
  8163.     var D = 0;
  8164.     var m = 1;
  8165.     var l = 0;
  8166.     var A = "http://api.flickr.com/services/rest/?method=";
  8167.     var x = "&api_key=b40dc56c795c0103c6170731e6271e04";
  8168.     var s = {
  8169.         FLICKR_SEARCH: "flickr.photos.search",
  8170.         FLICKR_INTERESTINGNESS: "flickr.interestingness.getList",
  8171.         FLICKR_SET: "flickr.photosets.getPhotos",
  8172.         FLICKR_GROUP: "flickr.groups.pools.getPhotos",
  8173.         FLICKR_FIND_USER: "flickr.people.findByUsername",
  8174.         FLICKR_PHOTO_INFO: "flickr.photos.getInfo",
  8175.         FLICKR_PEOPLE_FIND: "flickr.people.findByUsername"
  8176.     };
  8177.  
  8178.     function z(H) {
  8179.         return A + s[H] + x
  8180.     }
  8181.  
  8182.     function u(H) {
  8183.         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=?"
  8184.     }
  8185.  
  8186.     function r(H) {
  8187.         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=?"
  8188.     }
  8189.  
  8190.     function e(H) {
  8191.         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=?"
  8192.     }
  8193.  
  8194.     function n(H) {
  8195.         return z("FLICKR_INTERESTINGNESS") + "&page=" + m + "&per_page=" + H + "&extras=url_sq, url_m, url_l,url_o,original_format&format=json&jsoncallback=?"
  8196.     }
  8197.  
  8198.     function F() {
  8199.         return z("FLICKR_PEOPLE_FIND") + "&username=" + G.flickrusername + "&format=json&jsoncallback=?"
  8200.     }
  8201.  
  8202.     function q(H) {
  8203.         if (!o.isp) {
  8204.             if (G.flickrtags || G.flickrusername) {
  8205.                 return u(H)
  8206.             } else {
  8207.                 return n(H)
  8208.             }
  8209.         }
  8210.         if (G.flickrsetid) {
  8211.             return r(H)
  8212.         } else {
  8213.             if (G.flickrgroupid) {
  8214.                 return e(H)
  8215.             } else {
  8216.                 if (G.flickruserid) {
  8217.                     return u(H)
  8218.                 } else {
  8219.                     if (G.flickrusername) {
  8220.                         return u()
  8221.                     } else {
  8222.                         if (G.flickrtags) {
  8223.                             return u()
  8224.                         } else {
  8225.                             return n(H)
  8226.                         }
  8227.                     }
  8228.                 }
  8229.             }
  8230.         }
  8231.     }
  8232.  
  8233.     function b(I, H) {
  8234.         return "http://www.flickr.com/photos/" + I + "/" + H
  8235.     }
  8236.  
  8237.     function k(J, K, I, H) {
  8238.         return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + "_s.jpg"
  8239.     }
  8240.  
  8241.     function i(J, K, I, H) {
  8242.         return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + ".jpg"
  8243.     }
  8244.  
  8245.     function y(J, K, I, H) {
  8246.         return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + "_b.jpg"
  8247.     }
  8248.  
  8249.     function c(J, K, I, H) {
  8250.         return "http://farm" + J + ".static.flickr.com/" + K + "/" + H + "_" + I + "_o.jpg"
  8251.     }
  8252.     var h = function (J, L) {
  8253.         var N, K, M;
  8254.         var H = "";
  8255.         var I = [];
  8256.         if (o.isp) {
  8257.             if (J.photos) {
  8258.                 N = J.photos.photo
  8259.             } else {
  8260.                 if (J.photoset) {
  8261.                     N = J.photoset.photo;
  8262.                     H = J.photoset.owner
  8263.                 }
  8264.             }
  8265.         } else {
  8266.             N = J.photos.photo
  8267.         } if (N.length == 0) {
  8268.             p("Flickr Images Not Found")
  8269.         }
  8270.         for (K = 0; K < N.length && K < D; K += 1) {
  8271.             M = {
  8272.                 flickrPhotoId: N[K].id,
  8273.                 thumbURL: k(N[K].farm, N[K].server, N[K].secret, N[K].id),
  8274.                 imageFullURL: b(N[K].owner || H, N[K].id),
  8275.                 imageURL: b(N[K].owner || H, N[K].id),
  8276.                 linkTarget: "_blank",
  8277.                 caption: N[K].title || "",
  8278.                 description: "",
  8279.                 preloadedImage: null,
  8280.                 preloaded: false
  8281.             };
  8282.             if (G.flickrimagesize.toLowerCase() === "original" && N[K].url_o) {
  8283.                 M.imageURL = N[K].url_o
  8284.             } else {
  8285.                 if ((G.flickrimagesize.toLowerCase() === "large" || G.flickrimagesize.toLowerCase() === "original") && N[K].url_l) {
  8286.                     M.imageURL = N[K].url_l
  8287.                 } else {
  8288.                     M.imageURL = N[K].url_m
  8289.                 }
  8290.             }
  8291.             I.push(M);
  8292.             if (typeof (L) === "function") {
  8293.                 v(K, N[K].id, L)
  8294.             }
  8295.         }
  8296.         return I
  8297.     };
  8298.     var B = function (H) {
  8299.         if (!H || !H.photo) {
  8300.             return null
  8301.         }
  8302.         var I = H.photo;
  8303.         return {
  8304.             id: I.id,
  8305.             title: I.title._content,
  8306.             description: I.description._content.replace(/\n/g, "<br/>")
  8307.         }
  8308.     };
  8309.     var j = function (I) {
  8310.         var H = F();
  8311.         d.ajax({
  8312.             url: H,
  8313.             dataType: "json",
  8314.             success: function (J) {
  8315.                 if (J.stat === "ok") {
  8316.                     G.flickruserid = J.user.id;
  8317.                     if (I) {
  8318.                         I()
  8319.                     }
  8320.                 } else {
  8321.                     p("Cannot find Flickr User: " + G.flickrusername)
  8322.                 }
  8323.             },
  8324.             error: function (L, J, K) {
  8325.                 p("Cannot find Flickr User: " + G.flickrusername)
  8326.             }
  8327.         })
  8328.     };
  8329.     var E = function (J, I) {
  8330.         D = (o.isp ? parseInt(G.flickrimagecount) : g);
  8331.         var H = q(D);
  8332.         d.ajax({
  8333.             url: H,
  8334.             dataType: "json",
  8335.             success: function (K) {
  8336.                 if (K.photos) {
  8337.                     D = Math.min(K.photos.total, D);
  8338.                     l = K.photos.pages
  8339.                 } else {
  8340.                     if (K.photoset) {
  8341.                         D = Math.min(K.photoset.total, D);
  8342.                         l = K.photoset.pages
  8343.                     }
  8344.                 } if (K.stat === "ok") {
  8345.                     if (J) {
  8346.                         J(h(K, I))
  8347.                     }
  8348.                 } else {
  8349.                     p("Flickr Images Not Found")
  8350.                 }
  8351.             },
  8352.             error: function (M, K, L) {
  8353.                 p("Flickr Images Not Found")
  8354.             }
  8355.         })
  8356.     };
  8357.     var C = function (H) {
  8358.         return z("FLICKR_PHOTO_INFO") + "&format=json&photo_id=" + H + "&jsoncallback=?"
  8359.     };
  8360.     var v = function (J, I, K) {
  8361.         if (!G.flickrshowdescription) {
  8362.             return
  8363.         }
  8364.         var H = C(I);
  8365.         d.ajax({
  8366.             url: H,
  8367.             dataType: "json",
  8368.             success: function (L) {
  8369.                 if (L.stat === "ok") {
  8370.                     if (K) {
  8371.                         K(J, B(L))
  8372.                     }
  8373.                 }
  8374.             },
  8375.             error: function (N, L, M) {}
  8376.         })
  8377.     };
  8378.     var t = function (I, H) {
  8379.         if (G.flickrusername) {
  8380.             j(function () {
  8381.                 E(I, H)
  8382.             })
  8383.         } else {
  8384.             E(I, H)
  8385.         }
  8386.     };
  8387.     var w = function (J, H, I) {
  8388.         if (!G.flickrshowdescription) {
  8389.             return
  8390.         }
  8391.         if (typeof (I) === "function") {
  8392.             v(J, H, I)
  8393.         }
  8394.     };
  8395.     var a = function (H, I, K) {
  8396.         if (!G.flickrshowdescription) {
  8397.             return
  8398.         }
  8399.         if (typeof (K) !== "function") {
  8400.             return
  8401.         }
  8402.         if (I.to >= H.length) {
  8403.             I.to = H.length - 1
  8404.         }
  8405.         if (I.from < 0) {
  8406.             I.from = 0
  8407.         }
  8408.         for (var J = I.from; J <= I.to; J++) {
  8409.             if (H[J].detail_loaded) {
  8410.                 continue
  8411.             }
  8412.             w(J, H[J].flickrPhotoId, K)
  8413.         }
  8414.     };
  8415.     return {
  8416.         get_images: t,
  8417.         load_flickr_images_detail: a
  8418.     }
  8419. };
  8420. var juicebox_gallery_manager = function () {
  8421.     var g = [];
  8422.     var a = 0;
  8423.     var f;
  8424.     var k = function (m) {
  8425.         f = m
  8426.     };
  8427.     var h = function (m) {
  8428.         m.position = g.length;
  8429.         m.loaded = 0;
  8430.         m.thumb_loaded = 0;
  8431.         m.width = null;
  8432.         m.height = null;
  8433.         m.thumb_width = null;
  8434.         m.thumb_height = null;
  8435.         m.order = parseInt(1000 * Math.random());
  8436.         g[g.length] = m;
  8437.         a = g.length
  8438.     };
  8439.     var i = function (m) {
  8440.         return g[m]
  8441.     };
  8442.     var d = function () {
  8443.         return g
  8444.     };
  8445.     var c = function (m) {
  8446.         m = parseInt(m);
  8447.         if (!f.enablelooping && m >= g.length - 1) {
  8448.             return null
  8449.         }
  8450.         return g[m < g.length - 1 ? m + 1 : 0]
  8451.     };
  8452.     var l = function (m) {
  8453.         m = parseInt(m);
  8454.         if (!f.enablelooping && m <= 0) {
  8455.             return null
  8456.         }
  8457.         return g[m > 0 ? m - 1 : g.length - 1]
  8458.     };
  8459.     var e = function (m) {
  8460.         g[m.position] = m
  8461.     };
  8462.     var j = function (n, m) {
  8463.         return g.slice(n, m)
  8464.     };
  8465.     var b = function () {
  8466.         g = g.sort(function (o, n) {
  8467.             return o.order - n.order
  8468.         });
  8469.         for (var m = 0; m < g.length; m++) {
  8470.             g[m].position = m
  8471.         }
  8472.     };
  8473.     var a = function () {
  8474.         return g.length
  8475.     };
  8476.     return {
  8477.         add_image: h,
  8478.         length: a,
  8479.         get_range: j,
  8480.         get_image: i,
  8481.         get_images: d,
  8482.         update_image: e,
  8483.         get_previous_image: l,
  8484.         get_next_image: c,
  8485.         sort_images: b,
  8486.         init: k
  8487.     }
  8488. };
  8489. var juicebox_gallery_splash_panel = function () {
  8490.     var b, c, f, a, e, g, p, n, k;
  8491.     var o, m, s;
  8492.     var l = function (t) {
  8493.         b = t.jquery;
  8494.         c = t.document_id;
  8495.         f = t.container;
  8496.         e = t.config;
  8497.         g = t.utils;
  8498.         p = t.sizing;
  8499.         a = t.glymng;
  8500.         n = t.finish_draw_event_callback;
  8501.         k = t.view_gallery_event_callback;
  8502.         o = t.current_width;
  8503.         m = t.current_height;
  8504.         s = t.splashImageUrl
  8505.     };
  8506.     var r = function (t) {
  8507.         return b(g.get_query_path(c, t))
  8508.     };
  8509.     var j = function () {
  8510.         if (!e.splashdescription) {
  8511.             return ""
  8512.         }
  8513.         return "<p class='jb-splash-desc'>" + e.splashdescription + "</p>"
  8514.     };
  8515.     var d = function () {
  8516.         var t = "style='display:none;position:absolute;left:0;top:0;width:" + o + "px;height:" + m + "px'";
  8517.         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>"
  8518.     };
  8519.     var h = function () {
  8520.         f.html(d());
  8521.         p.position_2_fill_image(f.width(), f.height(), s, function (t) {
  8522.             r(".jb-splash-holder img").css({
  8523.                 top: t.imageTop,
  8524.                 left: t.imageLeft,
  8525.                 width: t.imageWidth,
  8526.                 height: t.imageHeight
  8527.             }).show()
  8528.         });
  8529.         r(".jb-splash-view-glry, .jb-splash, .jb-splash-background").click(function () {
  8530.             k();
  8531.             return false
  8532.         });
  8533.         if (typeof (n) === "function") {
  8534.             n()
  8535.         }
  8536.     };
  8537.     var q = function () {};
  8538.     var i = function () {
  8539.         f.html("")
  8540.     };
  8541.     return {
  8542.         initialize: l,
  8543.         draw: h,
  8544.         resize: q,
  8545.         purge: i
  8546.     }
  8547. };
  8548. var juicebox_gallery_index_panel = function (H) {
  8549.     var ag, d, am, M, W, Y, at, ah;
  8550.     var w = H;
  8551.     var ar = 0;
  8552.     var au = 1;
  8553.     var A = 0,
  8554.         L = 0;
  8555.     var Q = 0;
  8556.     var s = 0;
  8557.     var O = 86;
  8558.     var ae = 86;
  8559.     var F = 96;
  8560.     var ai = 96;
  8561.     var p = 5;
  8562.     var l = true;
  8563.     var e = "jb-tbn-current";
  8564.     var S = "jb-tbn-prev";
  8565.     var X = "jb-tbn-next";
  8566.     var j = 0;
  8567.     var D = 0;
  8568.     var al = 0;
  8569.     var C = 0;
  8570.     var i = 0;
  8571.     var a = false;
  8572.     var ak = false;
  8573.     var u = "display:none;";
  8574.     var x = 11;
  8575.     var B = function (aw) {
  8576.         return ag(w.get_query_path(d, aw))
  8577.     };
  8578.     var P = function () {
  8579.         if (s == 0) {
  8580.             s = B("").height()
  8581.         }
  8582.         A = W.thumbnail_cols;
  8583.         L = W.thumbnail_rows;
  8584.         var ax = 0;
  8585.         var aw = w.is_large_screen_mode(W) ? 45 : F;
  8586.         ax = Q - (W.usethumbdots ? 60 : 2 * aw);
  8587.         if (A == 0 && Q > 0) {
  8588.             A = parseInt(ax / F);
  8589.             if (s > Q) {
  8590.                 if (A == 1) {
  8591.                     A++
  8592.                 }
  8593.             } else {
  8594.                 if (A < 4 && (w.is_swipable_device() || W.forcetouchmode)) {
  8595.                     A++
  8596.                 }
  8597.             }
  8598.         }
  8599.         if (A <= 0) {
  8600.             A = 1
  8601.         }
  8602.         if (A > W.maxthumbcolumns) {
  8603.             A = W.maxthumbcolumns
  8604.         }
  8605.         if (L == 0 && s > 0) {
  8606.             L = parseInt((s - 2 * ai) / ai);
  8607.             if (s > Q) {
  8608.                 if (L <= 3 && (L != 1 && A < 5)) {
  8609.                     L++
  8610.                 } else {
  8611.                     if (w.is_small_android() && w.get_android_ver() >= 2.3 && L == 5) {
  8612.                         L = 6
  8613.                     }
  8614.                 }
  8615.             } else {
  8616.                 if (L == 1 && A <= 5) {
  8617.                     L++
  8618.                 } else {
  8619.                     if (w.is_small_android() && w.get_android_ver() >= 2.3 && L == 2) {
  8620.                         L = 3
  8621.                     } else {
  8622.                         if (L === 0 && (w.is_small_android() || w.is_iphone())) {
  8623.                             L = 2
  8624.                         }
  8625.                     }
  8626.                 }
  8627.             }
  8628.         }
  8629.         if (L <= 0 || W.usethumbdots) {
  8630.             L = 1
  8631.         }
  8632.         au = Math.ceil(M.length() / (L * A))
  8633.     };
  8634.     var aq = function () {
  8635.         var aw = (ar + 1) * A * L - 1;
  8636.         if (aw >= M.length()) {
  8637.             aw = M.length() - 1
  8638.         }
  8639.         if (aw < 0) {
  8640.             aw = 0
  8641.         }
  8642.         return {
  8643.             from: ar * A * L,
  8644.             to: aw
  8645.         }
  8646.     };
  8647.     var R = function (aw) {
  8648.         ag = aw.jquery;
  8649.         d = aw.document_id;
  8650.         am = aw.container;
  8651.         W = aw.config;
  8652.         w = aw.utils;
  8653.         Y = aw.sizing;
  8654.         M = aw.glymng;
  8655.         at = aw.finish_draw_event_callback;
  8656.         ah = aw.touch_event_callback;
  8657.         Q = aw.current_width;
  8658.         s = aw.current_height;
  8659.         if (W.usethumbdots) {
  8660.             O = 20;
  8661.             ae = 20
  8662.         } else {
  8663.             O = W.thumbwidth;
  8664.             ae = W.thumbheight
  8665.         }
  8666.         p = W.thumbpadding / 2;
  8667.         F = O + (2 * p);
  8668.         ai = ae + (2 * p);
  8669.         P();
  8670.         aa();
  8671.         y();
  8672.         if (w.ship || !W.usethumbdots || L > 1) {
  8673.             x = 0
  8674.         }
  8675.     };
  8676.     var m = function () {
  8677.         var aw = "";
  8678.         if (W.gallerytitle) {
  8679.             aw = "<div class='jb-idx-title' style='position: absolute;display:none;'>" + W.gallerytitle + "</div>"
  8680.         }
  8681.         am.html(aw + "<div class='jb-idx-show-area'></div>" + (W.showthumbpagingtext ? "<div class='jb-idx-thb-list-page-number' style='position: absolute;'></div>" : ""))
  8682.     };
  8683.     var aa = function () {
  8684.         var ay = function (az) {
  8685.             if (a) {
  8686.                 return
  8687.             }
  8688.             az.preventDefault();
  8689.             C = 0;
  8690.             i = 0;
  8691.             if (!ak) {
  8692.                 ak = true;
  8693.                 D = az.originalEvent.touches[0].pageX;
  8694.                 al = az.originalEvent.touches[0].pageX
  8695.             }
  8696.         };
  8697.         var aw = function (az) {
  8698.             if (a || !ak) {
  8699.                 return
  8700.             }
  8701.             az.preventDefault();
  8702.             C = az.originalEvent.touches[0].pageX - D;
  8703.             B("table.jb-idx-thb-container").animate({
  8704.                 left: "+=" + (az.originalEvent.touches[0].pageX - al),
  8705.                 avoidTransforms: !W.use_webkit_transform,
  8706.                 useTranslate3d: true
  8707.             }, 0);
  8708.             al = az.originalEvent.touches[0].pageX;
  8709.             i = az.originalEvent.touches[0].pageX - D
  8710.         };
  8711.         var ax = function (aA) {
  8712.             if (a || !ak) {
  8713.                 return
  8714.             }
  8715.             ak = false;
  8716.             var az = 1005 * W.imagetransitiontime;
  8717.             if (C > 5) {
  8718.                 if (k() && !W.enablelooping) {
  8719.                     K(C)
  8720.                 } else {
  8721.                     ab(Math.abs(C), null, Q, s)
  8722.                 }
  8723.                 aA.preventDefault()
  8724.             } else {
  8725.                 if (C < -5) {
  8726.                     if (ap() && !W.enablelooping) {
  8727.                         K(C)
  8728.                     } else {
  8729.                         g(Math.abs(C), null, Q, s)
  8730.                     }
  8731.                     aA.preventDefault()
  8732.                 } else {
  8733.                     if (Math.abs(i) < 5) {
  8734.                         if (W.forcetouchmode) {
  8735.                             if (ag(aA.target).attr("position") != null) {
  8736.                                 at(ag(aA.target).attr("position"))
  8737.                             } else {
  8738.                                 if (ag(aA.target).parent().attr("position") != null) {
  8739.                                     at(ag(aA.target).parent().attr("position"))
  8740.                                 }
  8741.                             }
  8742.                         } else {
  8743.                             if (ag(aA.target).parent().attr("position") != null) {
  8744.                                 at(ag(aA.target).parent().attr("position"))
  8745.                             }
  8746.                         }
  8747.                     }
  8748.                 }
  8749.             }
  8750.         };
  8751.         am.bind("touchstart", ay).bind("touchmove", aw).bind("touchend", ax);
  8752.         if (W.forcetouchmode) {
  8753.             B(" .jb-idx-thumb, .jb-idx-thb-frame").mousedown(function (aA) {
  8754.                 if (aA.which !== 1) {
  8755.                     return
  8756.                 }
  8757.                 var az = {
  8758.                     originalEvent: {
  8759.                         touches: [{}]
  8760.                     }
  8761.                 };
  8762.                 aA.preventDefault();
  8763.                 az.preventDefault = function () {};
  8764.                 az.originalEvent.touches[0].pageX = aA.screenX;
  8765.                 ay(az)
  8766.             }).mousemove(function (aA) {
  8767.                 if (aA.which !== 1) {
  8768.                     ak = false;
  8769.                     return
  8770.                 }
  8771.                 if (!ak) {
  8772.                     return
  8773.                 }
  8774.                 var az = {
  8775.                     originalEvent: {
  8776.                         touches: [{}]
  8777.                     }
  8778.                 };
  8779.                 az.preventDefault = function () {};
  8780.                 az.originalEvent.touches[0].pageX = aA.screenX;
  8781.                 aw(az)
  8782.             }).mouseup(function (aA) {
  8783.                 if (!ak) {
  8784.                     return
  8785.                 }
  8786.                 var az = {};
  8787.                 az.preventDefault = function () {};
  8788.                 az.target = this;
  8789.                 ax(az)
  8790.             }).mouseout(function (aA) {
  8791.                 if (!ak) {
  8792.                     return
  8793.                 }
  8794.                 var az = {};
  8795.                 az.preventDefault = function () {};
  8796.                 az.target = this;
  8797.                 ax(az)
  8798.             })
  8799.         }
  8800.     };
  8801.     var n = function () {
  8802.         var ax = A * F;
  8803.         var aw = L * ai;
  8804.         return {
  8805.             height: aw,
  8806.             width: ax
  8807.         }
  8808.     };
  8809.     var af = function (aC, aB, ay, aI, ax) {
  8810.         var aE = L * A * aC;
  8811.         var aF = L * A * (aC + 1);
  8812.         var aw = "page_" + aC;
  8813.         var aG;
  8814.         if (M.length() < A) {
  8815.             aG = M.length() * F
  8816.         } else {
  8817.             aG = A * F
  8818.         }
  8819.         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>");
  8820.         var aA = B(".table_page_" + aC + (ax ? "." + ax : "") + " .jb-idx-thb-list");
  8821.         var aH = "";
  8822.         var aD = M.get_range(aE, aF);
  8823.         for (var az = 0; az < aD.length; az++) {
  8824.             aH = V(aD[az], aA, aH)
  8825.         }
  8826.         aA.append(aH)
  8827.     };
  8828.     var an = function () {
  8829.         if (W.usethumbdots) {
  8830.             return "width:" + (F) + "px;height:" + (ai) + "px;padding:0;margin:" + x + "px 0 0 0;"
  8831.         }
  8832.         return "overflow:hidden;width:" + (O) + "px;height:" + (ae) + "px;padding:0;margin:" + (x + p) + "px " + parseInt(p) + "px " + p + "px " + parseInt(p) + "px;"
  8833.     };
  8834.     var f = function (ax, aw) {
  8835.         if (W.usethumbdots) {
  8836.             return "padding:0;margin:" + p + "px;width:" + (O) + "px;height:" + (ae) + "px;"
  8837.         }
  8838.         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;"
  8839.     };
  8840.     var y = function () {
  8841.         var ay = W.thumbpreloading.toUpperCase();
  8842.         if (ay != "ALL") {
  8843.             return
  8844.         }
  8845.         var aw = M.get_images();
  8846.         for (var ax = 0; ax < aw.length; ax++) {
  8847.             U(aw[ax])
  8848.         }
  8849.     };
  8850.     var v = function () {
  8851.         return W.thumbframecolor ? w.format_color(W.thumbframecolor) : ""
  8852.     };
  8853.     var t = function () {
  8854.         return W.thumbframecolor ? "border-color:" + w.format_color(W.thumbframecolor) + ";" : ""
  8855.     };
  8856.     var c = function (az) {
  8857.         if (W.usethumbdots) {
  8858.             return ""
  8859.         }
  8860.         var aw = ag("#" + d + "_thumb_" + az.position + ".jb-thm-thumb-selected").length > 0 && w.is_large_screen_mode(W);
  8861.         var ax = aw ? t() : "border-color:transparent;";
  8862.         var ay = aw ? (ag.browser.msie ? 0 : 10) : (ag.browser.msie ? 0 : 2);
  8863.         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>'
  8864.     };
  8865.     var U = function (aw) {
  8866.         if (aw.isPreloadingThumbnail) {
  8867.             return
  8868.         }
  8869.         aw.isPreloadingThumbnail = true;
  8870.         Y.position_2_fill_image(O, ae, aw.thumbURL, function (ax) {
  8871.             aw.thumb_loaded = 1;
  8872.             if (O === ae && ax.imageExpectedWidth === ax.imageExpectedHeight) {
  8873.                 aw.thumb_width = O;
  8874.                 aw.thumb_height = ae;
  8875.                 aw.imageExpectedWidth = ae;
  8876.                 aw.imageExpectedHeight = ae;
  8877.                 aw.top = 0;
  8878.                 aw.left = 0
  8879.             } else {
  8880.                 aw.thumb_width = ax.imageWidth;
  8881.                 aw.thumb_height = ax.imageHeight;
  8882.                 aw.imageExpectedWidth = ax.imageExpectedWidth;
  8883.                 aw.imageExpectedHeight = ax.imageExpectedHeight;
  8884.                 aw.top = ax.imageTop;
  8885.                 aw.left = ax.imageLeft
  8886.             } if (l) {
  8887.                 ag("#" + d + "_thumb_" + aw.position).html("<img class='jb-thm-thumb-image' src='" + aw.thumbURL + "' style='" + u + f(aw, true) + "'>" + c(aw));
  8888.                 ag("#" + d + "_thumb_" + aw.position + " img").fadeIn(400)
  8889.             } else {
  8890.                 ag("#" + d + "_thumb_" + aw.position).html("<img class='jb-thm-thumb-image' src='" + aw.thumbURL + "' style='" + f(aw, false) + "'>" + c(aw))
  8891.             }
  8892.             M.update_image(aw);
  8893.             ag("#" + d + "_thumb_" + aw.position + " img").disableSelection()
  8894.         })
  8895.     };
  8896.     var V = function (ay, ax, aw) {
  8897.         if (W.usethumbdots) {
  8898.             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>"
  8899.         }
  8900.         if (ay.thumb_loaded) {
  8901.             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>"
  8902.         } else {
  8903.             ax.append(aw);
  8904.             aw = "";
  8905.             ax.append("<div position='" + ay.position + "' id='" + d + "_thumb_" + ay.position + "' class='jb-idx-thumb' style='" + an() + "'>" + W.thumb_load_placeholder + "</div>");
  8906.             U(ay);
  8907.             return ""
  8908.         }
  8909.     };
  8910.     var ao = function () {
  8911.         return (ar <= 0) ? au - 1 : ar - 1
  8912.     };
  8913.     var J = function () {
  8914.         return (ar >= au - 1) ? 0 : ar + 1
  8915.     };
  8916.     var E = function () {
  8917.         aj(ar)
  8918.     };
  8919.     var ad = function (aw) {
  8920.         if (aw < 0 || aw >= au) {
  8921.             return
  8922.         }
  8923.         I(aw)
  8924.     };
  8925.     var ac = function (aw, ax, az) {
  8926.         if (ax) {
  8927.             Q = ax
  8928.         }
  8929.         if (az) {
  8930.             s = az
  8931.         }
  8932.         P();
  8933.         var ay = parseInt(aw / (A * L));
  8934.         I(ay);
  8935.         o(aw);
  8936.         if (!w.is_large_screen_mode(W)) {
  8937.             B(".jb-idx-title").show()
  8938.         }
  8939.     };
  8940.     var r = function () {
  8941.         aj(ao())
  8942.     };
  8943.     var G = function () {
  8944.         aj(J())
  8945.     };
  8946.     var o = function (ax) {
  8947.         j = ax;
  8948.         var ay = 4;
  8949.         var aw = w.is_large_screen_mode(W) ? 20 : 0;
  8950.         B(".jb-idx-thumb").removeClass("jb-thm-thumb-selected");
  8951.         B(".jb-idx-thumb .jb-idx-thb-frame").css({
  8952.             width: O - ay + "px",
  8953.             height: ae - ay + "px",
  8954.             "border-width": "2px",
  8955.             "border-color": "transparent"
  8956.         });
  8957.         var az = ag("#" + d + "_thumb_" + ax).addClass("jb-thm-thumb-selected").addClass("jb-thumb-visited");
  8958.         if (w.is_large_screen_mode(W)) {
  8959.             ag("#" + d + "_thumb_" + ax + " .jb-idx-thb-frame").css({
  8960.                 width: O - aw + "px",
  8961.                 height: ae - aw + "px",
  8962.                 "border-width": "10px",
  8963.                 "border-color": v()
  8964.             })
  8965.         } else {
  8966.             ag("#" + d + "_thumb_" + ax + " .jb-idx-thb-frame").css({
  8967.                 width: O - aw + "px",
  8968.                 height: ae - aw + "px"
  8969.             })
  8970.         } if (W.thumbframecolor) {
  8971.             az.children(".jb-idx-thb-frame").css({
  8972.                 "border-color": w.format_color(W.thumbframecolor)
  8973.             })
  8974.         }
  8975.     };
  8976.     var I = function (aA) {
  8977.         B(" .jb-idx-thb-container").remove();
  8978.         if (am.find(".jb-idx-show-area").length <= 0) {
  8979.             m()
  8980.         }
  8981.         var az = B(".jb-idx-show-area");
  8982.         if (B(".table_page_" + aA).length == 0) {
  8983.             af(aA, az, 0, s, e)
  8984.         }
  8985.         var aB = Q + 2 * Y.get_stage_padding(B("").width(), B("").height(), W);
  8986.         if (W.enablelooping || aA < au - 1) {
  8987.             var ax = (aA >= au - 1) ? 0 : aA + 1;
  8988.             af(ax, az, +aB, s, X)
  8989.         }
  8990.         if (W.enablelooping || aA > 0) {
  8991.             var aw = (aA <= 0) ? au - 1 : aA - 1;
  8992.             af(aw, az, -aB, s, S)
  8993.         }
  8994.         q(aA);
  8995.         o(j);
  8996.         var ay = B(" .jb-idx-thumb");
  8997.         if (!W.forcetouchmode) {
  8998.             ay.click(function (aC) {
  8999.                 if (a) {
  9000.                     return false
  9001.                 }
  9002.                 l = false;
  9003.                 aC.preventDefault();
  9004.                 var aD = B(".jb-idx-thb-list div.jb-idx-thumb .jb-thm-thumb-image");
  9005.                 aD.stop(true, true).show();
  9006.                 if (!w.is_earlier_ie()) {
  9007.                     aD.css({
  9008.                         opacity: 1
  9009.                     })
  9010.                 }
  9011.                 at(ag(this).attr("position"));
  9012.                 return false
  9013.             }).mousedown(function (aC) {
  9014.                 if (aC.preventDefault) {
  9015.                     aC.preventDefault()
  9016.                 }
  9017.             })
  9018.         } else {
  9019.             aa()
  9020.         } if (W.thumbframecolor) {
  9021.             ay.hover(function () {
  9022.                 var aC = ag(this);
  9023.                 if (aC.is(".jb-thm-thumb-selected")) {
  9024.                     return
  9025.                 }
  9026.                 aC.children(".jb-idx-thb-frame").css({
  9027.                     "border-color": w.format_color(W.thumbframecolor)
  9028.                 })
  9029.             }, function () {
  9030.                 var aC = ag(this);
  9031.                 if (aC.is(".jb-thm-thumb-selected")) {
  9032.                     return
  9033.                 }
  9034.                 aC.children(".jb-idx-thb-frame").css({
  9035.                     "border-color": "transparent"
  9036.                 })
  9037.             })
  9038.         }
  9039.         ar = aA;
  9040.         if (typeof ah == "function") {
  9041.             ah()
  9042.         }
  9043.     };
  9044.     var av = function () {
  9045.         var ax = M.length();
  9046.         if (L * A <= ax) {
  9047.             return {
  9048.                 row: L,
  9049.                 col: A
  9050.             }
  9051.         }
  9052.         if (A >= ax) {
  9053.             return {
  9054.                 row: 1,
  9055.                 col: ax
  9056.             }
  9057.         }
  9058.         var aw = (ax % A == 0 ? 0 : 1);
  9059.         return {
  9060.             row: parseInt(ax / A) + aw,
  9061.             col: A
  9062.         }
  9063.     };
  9064.     var q = function (aA) {
  9065.         var ay = av();
  9066.         var ax = ay.row * (ai);
  9067.         var az = parseInt((s - ax) / 2 - 25);
  9068.         if (s <= az) {
  9069.             az = 0
  9070.         }
  9071.         var aw = parseInt((Q - (ay.col * F)) / 2 + 5);
  9072.         if (aw < 0) {
  9073.             aw = 0
  9074.         }
  9075.         B(".jb-idx-title").css({
  9076.             left: aw + "px",
  9077.             top: az + "px"
  9078.         });
  9079.         var aC = Q / 2 - 33;
  9080.         if (aC < aw) {
  9081.             aC = aw
  9082.         }
  9083.         var aB = (s > 200) ? (ax + ((s - ax) / 2) + 10) : (ax + 10);
  9084.         if (aB <= 0) {
  9085.             aB = 0
  9086.         }
  9087.         B(".jb-idx-thb-list-page-number").css({
  9088.             left: aC + "px",
  9089.             top: aB + "px"
  9090.         }).html("Page " + (aA + 1) + " of " + au);
  9091.         if (W.textcolor) {
  9092.             B(".jb-idx-title, .jb-idx-thb-list-page-number").css({
  9093.                 color: w.format_color(W.textcolor)
  9094.             })
  9095.         }
  9096.     };
  9097.     var aj = function (aw) {
  9098.         P();
  9099.         I(aw)
  9100.     };
  9101.     var K = function (ax) {
  9102.         if (!ax) {
  9103.             return
  9104.         }
  9105.         var aw = 1000 * W.smallthumbslidetime;
  9106.         aw = aw * ((400 - ax / 2) / 400);
  9107.         B("table.jb-idx-thb-container").animate({
  9108.             left: "+=" + (-ax),
  9109.             avoidTransforms: !W.use_webkit_transform,
  9110.             useTranslate3d: true
  9111.         }, aw, "", null)
  9112.     };
  9113.     var Z = function (ay, aD, aC, aw, az) {
  9114.         if (aw) {
  9115.             Q = aw
  9116.         }
  9117.         if (az) {
  9118.             s = az
  9119.         }
  9120.         var ax = function () {
  9121.             if (a) {
  9122.                 if (ay) {
  9123.                     G()
  9124.                 } else {
  9125.                     r()
  9126.                 }
  9127.                 a = false;
  9128.                 if (typeof aC == "function") {
  9129.                     aC()
  9130.                 }
  9131.             }
  9132.         };
  9133.         if (!a) {
  9134.             if (typeof (aD) == "undefined") {
  9135.                 aD = 0
  9136.             }
  9137.             a = true;
  9138.             var aA = 1000 * W.smallthumbslidetime;
  9139.             if (aD > 0) {
  9140.                 aA = aA * ((400 - aD / 2) / 400)
  9141.             }
  9142.             var aB = Q + 2 * Y.get_stage_padding(B("").width(), B("").height(), W);
  9143.             B("table.jb-idx-thb-container").animate({
  9144.                 left: (ay ? "-=" : "+=") + (aB - aD),
  9145.                 avoidTransforms: !W.use_webkit_transform,
  9146.                 useTranslate3d: true
  9147.             }, aA, "easeOutQuart", ax)
  9148.         } else {
  9149.             ax()
  9150.         }
  9151.     };
  9152.     var g = function (az, ay, aw, ax) {
  9153.         Z(true, az, ay, aw, ax)
  9154.     };
  9155.     var ab = function (az, ay, aw, ax) {
  9156.         Z(false, az, ay, aw, ax)
  9157.     };
  9158.     var h = function (aw, ax) {
  9159.         a = false
  9160.     };
  9161.     var ap = function () {
  9162.         if (ar + 1 >= au) {
  9163.             return true
  9164.         }
  9165.         return false
  9166.     };
  9167.     var k = function () {
  9168.         if (ar <= 0) {
  9169.             return true
  9170.         }
  9171.         return false
  9172.     };
  9173.     var z = function () {
  9174.         return ar
  9175.     };
  9176.     var N = function (aw) {
  9177.         if (aw) {
  9178.             B(".jb-idx-title").show();
  9179.             B(".jb-classifier-link-wrapper.jb-classifier-thumb-area").show()
  9180.         } else {
  9181.             B(".jb-idx-title").hide();
  9182.             B(".jb-classifier-link-wrapper.jb-classifier-thumb-area").hide()
  9183.         }
  9184.     };
  9185.     var b = function () {
  9186.         return ai
  9187.     };
  9188.     var T = function (aw) {
  9189.         a = true;
  9190.         window.setTimeout(function () {
  9191.             a = false
  9192.         }, aw)
  9193.     };
  9194.     return {
  9195.         initialize: R,
  9196.         show_current_page: E,
  9197.         show_prev_page: r,
  9198.         show_next_page: G,
  9199.         move_to_next_page: g,
  9200.         move_to_prev_page: ab,
  9201.         show_page_4_image_position: ac,
  9202.         show_page_by_page_index: ad,
  9203.         is_last_page: ap,
  9204.         is_first_page: k,
  9205.         get_index: z,
  9206.         repaint: h,
  9207.         get_thumblist_size: n,
  9208.         display_gallery_top: N,
  9209.         get_image_index_range: aq,
  9210.         set_thumbnail_visited: o,
  9211.         get_thumb_height: b,
  9212.         yield_4_transition: T
  9213.     }
  9214. };
  9215. var juicebox_gallery_detail_panel = function () {
  9216.     var H, R, A, L, V, b, O, d, y, t;
  9217.     var Q;
  9218.     var o = null;
  9219.     var D = false;
  9220.     var i, P;
  9221.     var g;
  9222.     var B = false;
  9223.     var G = false;
  9224.     var c = 12;
  9225.     var S = function (Y) {
  9226.         G = true;
  9227.         H = Y.jquery;
  9228.         R = Y.document_id;
  9229.         A = Y.container;
  9230.         Q = Y.caption_container;
  9231.         V = Y.config;
  9232.         b = Y.utils;
  9233.         O = Y.sizing;
  9234.         L = Y.glymng;
  9235.         d = Y.before_draw_event_callback;
  9236.         y = Y.finish_draw_event_callback;
  9237.         t = Y.touch_event_callback;
  9238.         g = 1000 * V.imagetransitiontime;
  9239.         i = Y.current_width;
  9240.         P = Y.current_height;
  9241.         x(0)
  9242.     };
  9243.     var X = function (Y) {
  9244.         return H(b.get_query_path(R, Y))
  9245.     };
  9246.     var J = function () {
  9247.         if (!o) {
  9248.             return 0
  9249.         }
  9250.         return o.position
  9251.     };
  9252.     var C = function () {
  9253.         return o
  9254.     };
  9255.     var x = function (Y) {
  9256.         o = L.get_image(Y)
  9257.     };
  9258.     var E = function (ah, af, ab, am, aa) {
  9259.         var ak = o.position;
  9260.         var al = am != null ? am : (ah ? L.get_next_image(ak).position : L.get_previous_image(ak).position);
  9261.         var ag;
  9262.         if (typeof (ab) === "undefined") {
  9263.             ab = true
  9264.         }
  9265.         var aj = function (ap) {
  9266.             var ao = V.captionposition.toUpperCase();
  9267.             if (!V.slidecaption && (ab || ao === "BOTTOM" || ao === "BELOW_IMAGE")) {
  9268.                 Q.fadeIn(ap);
  9269.                 X(".jb-cap-frame.jb-status-fading").fadeIn(ap)
  9270.             }
  9271.         };
  9272.         var ae = function (ao) {
  9273.             if (ab) {
  9274.                 ac.addClass("jb-status-fading").fadeOut(V.captionposition.toUpperCase() === "BELOW_IMAGE" || (H.browser.msie && H.browser.version >= 7 && H.browser.version < 8) ? 0 : ao)
  9275.             } else {
  9276.                 ac.removeClass("jb-status-fading")
  9277.             }
  9278.         };
  9279.         var ai = function (ao) {
  9280.             d(al);
  9281.             w(al, ao, null, ab, true);
  9282.             y(al);
  9283.             aj(ao);
  9284.             D = false
  9285.         };
  9286.         var an = function (ao) {
  9287.             if (!aa) {
  9288.                 d(al)
  9289.             }
  9290.             w(al, 0, null, ab, true);
  9291.             if (!aa) {
  9292.                 y(al)
  9293.             }
  9294.             aj(ao);
  9295.             D = false
  9296.         };
  9297.         if (!D) {
  9298.             var Z = V.imagetransitiontype.toUpperCase();
  9299.             if (typeof (af) == "undefined") {
  9300.                 af = 0
  9301.             }
  9302.             D = true;
  9303.             var ad = 1000 * V.imagetransitiontime;
  9304.             if (af > 0) {
  9305.                 ad = ad * ((400 - af / 2) / 400)
  9306.             }
  9307.             var Y = parseInt(i) + parseInt(V.minimagegap) + (2 * O.get_stage_padding(X("").width(), X("").height(), V));
  9308.             d(al);
  9309.             var ac = X(".jb-cap-frame.caption_" + ak);
  9310.             ag = X(" .jb-panel-detail .jb-dt-main-frame");
  9311.             ag.stop();
  9312.             if (b.is_swipable_device() && am == null) {
  9313.                 ag.animate({
  9314.                     left: (ah ? "-=" : "+=") + (Y - af),
  9315.                     avoidTransforms: !V.use_webkit_transform,
  9316.                     useTranslate3d: true
  9317.                 }, ad, "easeOutQuart", function () {
  9318.                     an(ad / 2)
  9319.                 });
  9320.                 ae(ad / 2)
  9321.             } else {
  9322.                 if (Z === "NONE" || aa) {
  9323.                     ac.fadeOut(0);
  9324.                     an(0)
  9325.                 } else {
  9326.                     if (Z === "CROSS_FADE") {
  9327.                         ag.fadeOut(ad, function () {
  9328.                             an(ad)
  9329.                         });
  9330.                         ae(ad);
  9331.                         ai(ad)
  9332.                     } else {
  9333.                         if (Z === "FADE" || (am && Z != "FADE" && Z != "CROSS_FADE" && Z != "NONE")) {
  9334.                             ag.fadeOut(ad / 2);
  9335.                             ae(ad / 2);
  9336.                             window.setTimeout(function () {
  9337.                                 ai(ad / 2)
  9338.                             }, ad / 2)
  9339.                         } else {
  9340.                             ag.animate({
  9341.                                 left: (ah ? "-=" : "+=") + (Y - af),
  9342.                                 avoidTransforms: !V.use_webkit_transform,
  9343.                                 useTranslate3d: true
  9344.                             }, ad, "easeOutQuart", function () {
  9345.                                 an(ad / 2)
  9346.                             });
  9347.                             ae(ad / 2)
  9348.                         }
  9349.                     }
  9350.                 }
  9351.             }
  9352.         } else {
  9353.             ag = X(" .jb-panel-detail .jb-dt-main-frame, .jb-cap-frame.caption_" + ak);
  9354.             if (b.is_swipable_device()) {
  9355.                 ag.stop(false, false);
  9356.                 an()
  9357.             } else {
  9358.                 ag.stop(false, true)
  9359.             }
  9360.         }
  9361.     };
  9362.     var n = function (Z, Y) {
  9363.         E(true, Z, Y)
  9364.     };
  9365.     var h = function (ab) {
  9366.         if (!ab) {
  9367.             return
  9368.         }
  9369.         var Z = 1000 * V.imagetransitiontime;
  9370.         Z = Z * ((400 - ab / 2) / 400);
  9371.         var Y = parseInt(i) + parseInt(V.minimagegap);
  9372.         var aa;
  9373.         aa = X(" .jb-panel-detail .jb-dt-main-frame");
  9374.         aa.stop();
  9375.         aa.animate({
  9376.             left: "+=" + (-ab),
  9377.             avoidTransforms: !V.use_webkit_transform,
  9378.             useTranslate3d: true
  9379.         }, Z, "", null)
  9380.     };
  9381.     var s = function (Z, Y) {
  9382.         E(false, Z, Y)
  9383.     };
  9384.     var w = function (ah, ag, ae, aa, al) {
  9385.         if (typeof (aa) === "undefined") {
  9386.             aa = true
  9387.         }
  9388.         D = false;
  9389.         var ab = parseInt(i) + parseInt(V.minimagegap) + (2 * O.get_stage_padding(X("").width(), X("").height(), V));
  9390.         o = L.get_image(ah);
  9391.         var aj = X(".jb-panel-detail");
  9392.         if (aj.length > 0 && !aj.is(":visible")) {
  9393.             aj.show()
  9394.         }
  9395.         var af = L.get_image(ah);
  9396.         var Y = L.get_previous_image(ah);
  9397.         var ac = L.get_next_image(ah);
  9398.         var ai = ag > 0;
  9399.         A.children(":not(.jb-dt-main-image-" + ah + ")").remove();
  9400.         var ad = A.children(".jb-dt-main-image-" + ah);
  9401.         if (ad.length <= 0) {
  9402.             A.append(W(af, 0, true, ai));
  9403.             ad = A.children(".jb-dt-main-image-" + (af ? af.position : ""))
  9404.         } else {
  9405.             ad.css({
  9406.                 left: 0
  9407.             })
  9408.         }
  9409.         ad.before(W(Y, -ab, false, false));
  9410.         ad.after(W(ac, ab, false, false));
  9411.         if (!ad.is(":visible")) {
  9412.             ad.fadeIn()
  9413.         }
  9414.         if (ad.css("opacity") == 0) {
  9415.             ad.fadeIn()
  9416.         }
  9417.         var Z = Q.width();
  9418.         var ak = Q.height();
  9419.         if (aa === true) {
  9420.             if (ai || al) {
  9421.                 if (H.browser.msie || b.is_firefox3()) {
  9422.                     Q.hide()
  9423.                 } else {
  9424.                     Q.fadeOut(0)
  9425.                 }
  9426.             } else {
  9427.                 Q.fadeIn(0)
  9428.             }
  9429.         } else {
  9430.             Q.hide()
  9431.         }
  9432.         Q.html(j(Y, Z, ak, -ab) + j(af, Z, ak, 0) + j(ac, Z, ak, ab));
  9433.         if (V.textcolor) {
  9434.             X(".jb-cap-frame a").css({
  9435.                 color: b.format_color(V.textcolor)
  9436.             })
  9437.         }
  9438.         if (V.captionbackcolor) {
  9439.             if (b.is_earlier_ie()) {
  9440.                 X(".jb-caption").css({
  9441.                     "background-color": b.format_color(V.captionbackcolor),
  9442.                     filter: V.captionbackopacity.replace("filter:", "")
  9443.                 })
  9444.             } else {
  9445.                 X(".jb-caption").css({
  9446.                     "background-color": b.format_color(V.captionbackcolor)
  9447.                 })
  9448.             }
  9449.         }
  9450.         if (ag > 0) {
  9451.             X(".jb-dt-main-image-" + af.position).fadeIn(ag);
  9452.             if (aa) {
  9453.                 Q.fadeIn(ag)
  9454.             }
  9455.             if (typeof (ae) === "function") {
  9456.                 window.setTimeout(function () {
  9457.                     ae()
  9458.                 }, ag)
  9459.             }
  9460.         }
  9461.     };
  9462.     var z = function (Z, Y) {
  9463.         if (!Z) {
  9464.             X(".jb-dt-main-image-" + o.position).hide();
  9465.             return
  9466.         }
  9467.         X(".jb-dt-main-image-" + o.position).fadeOut(Z);
  9468.         if (V.captionposition.toUpperCase() === "BELOW_IMAGE") {
  9469.             Q.fadeOut(0)
  9470.         } else {
  9471.             Q.fadeOut(Z)
  9472.         } if (typeof (Y) === "function") {
  9473.             window.setTimeout(function () {
  9474.                 Y()
  9475.             }, Z)
  9476.         }
  9477.     };
  9478.     var m = function (ab, ai, ac) {
  9479.         var Y = F(ab, ai, ac);
  9480.         var aa = Y.width;
  9481.         var ak = Y.height;
  9482.         var af = O.get_image_padding(ai, ac, V);
  9483.         var ae = O.get_image_framewidth(ai, ac, V);
  9484.         var ag = af + ae;
  9485.         var ah = 2 * ag;
  9486.         if (aa === "auto" && ak === "auto") {
  9487.             ak = ab.height;
  9488.             aa = ab.width
  9489.         } else {
  9490.             if (aa === "auto") {
  9491.                 aa = parseInt(ak) * (ab.width / ab.height)
  9492.             } else {
  9493.                 if (ak === "auto") {
  9494.                     ak = parseInt(aa) * (ab.height / ab.width)
  9495.                 }
  9496.             }
  9497.         }
  9498.         aa = parseInt(aa);
  9499.         ak = parseInt(ak);
  9500.         var Z = parseInt((ai - aa) / 2) - ae;
  9501.         var aj = parseInt((ac - ak) / 2) - ae;
  9502.         if (Z < af) {
  9503.             Z = af
  9504.         }
  9505.         if (aj < af) {
  9506.             aj = af
  9507.         }
  9508.         var ad = ai - ah < parseInt(aa) ? ai - ah : parseInt(aa);
  9509.         var al = ac - ah < parseInt(ak) ? ac - ah : parseInt(ak);
  9510.         return {
  9511.             width: parseInt(aa),
  9512.             height: parseInt(ak),
  9513.             left: Z,
  9514.             top: aj,
  9515.             frameWidth: ad,
  9516.             frameHeight: al
  9517.         }
  9518.     };
  9519.     var a = function (Y) {
  9520.         if (Y >= L.length()) {
  9521.             Y = L.length() - 1
  9522.         }
  9523.         if (Y < 0) {
  9524.             return 0
  9525.         }
  9526.         return Y
  9527.     };
  9528.     var M = function (Z, ab) {
  9529.         var Y = L.get_range(a(Z), a(ab));
  9530.         for (var aa = 0; aa < Y.length; aa++) {
  9531.             N(Y[aa])
  9532.         }
  9533.     };
  9534.     var p = function (aa) {
  9535.         if (!aa) {
  9536.             return
  9537.         }
  9538.         if (V.captionposition.toUpperCase() !== "BELOW_IMAGE") {
  9539.             return
  9540.         }
  9541.         var Y = parseInt(i) + parseInt(V.minimagegap);
  9542.         var Z = (aa.position - o.position) * Y;
  9543.         X(".jb-cap-frame.caption_" + aa.position).attr("style", K(aa, Q.width(), Q.height(), Z))
  9544.     };
  9545.     var l = function () {
  9546.         var Y = V.captionposition.toUpperCase();
  9547.         return (Y != "BELOW_IMAGE" && Y != "BOTTOM") ? false : true
  9548.     };
  9549.     var K = function (ad, aa, Z, ac) {
  9550.         var af = l();
  9551.         var ae = "position:absolute;";
  9552.         if (!ad.loaded && V.captionposition.toUpperCase() === "BELOW_IMAGE") {
  9553.             return ae + (af ? "height:100%;" : "") + "width:" + aa + "px;left:" + ac + "px;top:" + (Z - V.maxcaptionheight) + "px;display:none;"
  9554.         } else {
  9555.             if (!af || !ad.loaded || V.captionposition.toUpperCase() === "BOTTOM") {
  9556.                 return ae + (af ? "height:100%;" : "") + "width:" + aa + "px;left:" + ac + "px;"
  9557.             }
  9558.         }
  9559.         var ab = m(ad, i, P);
  9560.         var Y = O.get_image_framewidth(aa, Z, V);
  9561.         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"
  9562.     };
  9563.     var N = function (Z, aa) {
  9564.         if (Z.isPreloading || Z.loaded) {
  9565.             return
  9566.         }
  9567.         var Y = new Image();
  9568.         Z.isPreloading = true;
  9569.         Y.onload = function () {
  9570.             Z.loaded = true;
  9571.             Z.width = Y.width;
  9572.             Z.height = Y.height;
  9573.             L.update_image(Z);
  9574.             var ac = X(".jb-panel-detail .jb-dt-main-image-" + Z.position);
  9575.             if (ac.length > 0) {
  9576.                 var ab = function () {
  9577.                     ac.html(u(Z, aa, o.position === Z.position));
  9578.                     var ad = X(".jb-panel-detail .jb-dt-main-image-" + Z.position + " img");
  9579.                     ad.disableSelection();
  9580.                     if (o.position === Z.position) {
  9581.                         ad.fadeIn(g, function () {
  9582.                             p(Z)
  9583.                         })
  9584.                     }
  9585.                 };
  9586.                 if (b.is_swipable_device()) {
  9587.                     window.setTimeout(ab, 100)
  9588.                 } else {
  9589.                     ab()
  9590.                 }
  9591.             } else {
  9592.                 window.setTimeout(function () {
  9593.                     X(".jb-panel-detail .jb-dt-main-image-" + Z.position).html(u(Z, aa, o.position === Z.position));
  9594.                     if (o.position === Z.position) {
  9595.                         X(".jb-panel-detail .jb-dt-main-image-" + Z.position + " img").fadeIn(g, function () {
  9596.                             p(Z)
  9597.                         })
  9598.                     }
  9599.                 }, 100)
  9600.             }
  9601.         };
  9602.         Y.src = Z.imageURL
  9603.     };
  9604.     var W = function (ad, ac, ae, Z) {
  9605.         if (!ad) {
  9606.             return ""
  9607.         }
  9608.         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>" : "";
  9609.         var ab;
  9610.         if (ad.loaded) {
  9611.             Y = u(ad, ae)
  9612.         } else {
  9613.             N(ad, ae)
  9614.         }
  9615.         var aa = I(i, P, F(ad, i, P));
  9616.         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>"
  9617.     };
  9618.     var U = function (Y) {
  9619.         if (!Y) {
  9620.             return ""
  9621.         }
  9622.         if (H.browser.msie || b.is_firefox3()) {
  9623.             return "display:none;"
  9624.         }
  9625.         return "opacity:0;"
  9626.     };
  9627.     var T = function (ab) {
  9628.         if (!ab) {
  9629.             return ""
  9630.         }
  9631.         var Y, ae, Z = "";
  9632.         if (V.useflickr) {
  9633.             Y = V.flickrshowtitle ? ab.caption : "";
  9634.             ae = (V.flickrshowdescription && ab.description) ? ab.description : "";
  9635.             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>&nbsp</p>" : ""
  9636.         } else {
  9637.             Y = ab.title ? ab.title : "";
  9638.             ae = ab.caption ? ab.caption : ""
  9639.         }
  9640.         var ad = Y ? '<p class="jb-cap-content jb-caption-title">' + Y + "&nbsp</p>" : "";
  9641.         var ac = ae ? '<p class="jb-caption-desc" style="' + (Y ? "margin:10px 0 0 0;" : "margin:0;") + '">' + ae + "</p>" : "";
  9642.         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>" : "";
  9643.         return aa + ad + ac + Z
  9644.     };
  9645.     var f = function () {
  9646.         return (b.ship || !B)
  9647.     };
  9648.     var r = function () {
  9649.         if (!V.textcolor) {
  9650.             return ""
  9651.         }
  9652.         return "color:" + b.format_color(V.textcolor)
  9653.     };
  9654.     var j = function (ad, aa, Z, ac) {
  9655.         if (!ad) {
  9656.             return ""
  9657.         }
  9658.         var ab = V.maxcaptionheight - (2 * c);
  9659.         if (!f()) {
  9660.             ab -= 18
  9661.         }
  9662.         if (ab <= 0) {
  9663.             ab = V.maxcaptionheight
  9664.         }
  9665.         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>";
  9666.         var Y = " class='jb-cap-frame caption_" + ad.position + "' style='" + K(ad, aa, Z, ac) + "'";
  9667.         if (l()) {
  9668.             return "<div" + Y + ">" + ae + "</div>"
  9669.         } else {
  9670.             return "<table" + Y + "><tr><td>" + ae + "</td></tr></table>"
  9671.         }
  9672.     };
  9673.     var e = function (Z) {
  9674.         if (b.ship) {
  9675.             return
  9676.         }
  9677.         B = Z;
  9678.         var Y = V.maxcaptionheight - (2 * c);
  9679.         if (!f()) {
  9680.             Y -= 18
  9681.         }
  9682.         if (Y <= 0) {
  9683.             Y = V.maxcaptionheight
  9684.         }
  9685.         var ab = Z ? c + 18 : c;
  9686.         var aa = Z ? "20px" : "";
  9687.         X(".jb-cap-frame .jb-caption").css({
  9688.             "padding-bottom": ab,
  9689.             "max-height": Y
  9690.         });
  9691.         X(".jb-cap-frame .jbac-number").css({
  9692.             "padding-bottom": aa
  9693.         })
  9694.     };
  9695.     var v = function (Y) {
  9696.         X(".caption_" + Y.position + " .jb-caption").html(T(Y))
  9697.     };
  9698.     var u = function (aa, Z, ai) {
  9699.         if (!aa) {
  9700.             return ""
  9701.         }
  9702.         var ad = m(aa, i, P);
  9703.         var Y = F(aa, i, P);
  9704.         var ah = "";
  9705.         var af = false;
  9706.         var ae = 0;
  9707.         var ag = 0;
  9708.         if (Y.height === "auto" && ad.frameHeight < ad.height) {
  9709.             ae = "-" + parseInt((ad.height - ad.frameHeight) / 2) + "px";
  9710.             af = true
  9711.         }
  9712.         if (Y.width === "auto" && ad.frameWidth < ad.width) {
  9713.             ag = "-" + parseInt((ad.width - ad.frameWidth) / 2) + "px";
  9714.             af = true
  9715.         }
  9716.         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>";
  9717.         var ab = O.get_image_framewidth(i, P, V);
  9718.         if (ab) {
  9719.             ac = ac.replace("border:none;", "border-style:solid;border-width:" + ab + "px;")
  9720.         }
  9721.         if (af) {
  9722.             return ac.replace("${0}$", "display:block;position:absolute;top:" + ae + ";left:" + ag + ";")
  9723.         }
  9724.         return ac.replace("${0}$", "")
  9725.     };
  9726.     var F = function (ae, ad, ac) {
  9727.         var Z = 2 * (O.get_image_padding(ad, ac, V) + O.get_image_framewidth(ad, ac, V));
  9728.         ad -= Z;
  9729.         ac -= Z;
  9730.         if (!ae || !ae.width || !ae.height) {
  9731.             return {
  9732.                 width: "auto",
  9733.                 height: "auto"
  9734.             }
  9735.         }
  9736.         var aa = ad / ae.width;
  9737.         var Y = ac / ae.height;
  9738.         var af = V.imagescalemode.toUpperCase();
  9739.         var ab = 0;
  9740.         if (af === "SCALE") {
  9741.             ab = 0
  9742.         } else {
  9743.             if (af === "FILL") {
  9744.                 if (aa < 1 && Y < 1) {
  9745.                     ab = 2
  9746.                 } else {
  9747.                     ab = 3
  9748.                 }
  9749.             } else {
  9750.                 if (af === "STRETCH") {
  9751.                     ab = 4
  9752.                 } else {
  9753.                     if (af === "NONE") {
  9754.                         ab = 2
  9755.                     } else {
  9756.                         if (aa < 1 || Y < 1) {
  9757.                             ab = 0
  9758.                         } else {
  9759.                             ab = 1
  9760.                         }
  9761.                     }
  9762.                 }
  9763.             }
  9764.         }
  9765.         switch (ab) {
  9766.         case 0:
  9767.             if (aa > Y) {
  9768.                 return {
  9769.                     width: "auto",
  9770.                     height: ac + "px"
  9771.                 }
  9772.             } else {
  9773.                 return {
  9774.                     width: ad + "px",
  9775.                     height: "auto"
  9776.                 }
  9777.             }
  9778.             break;
  9779.         case 1:
  9780.             return {
  9781.                 width: ae.width + "px",
  9782.                 height: ae.height + "px"
  9783.             };
  9784.             break;
  9785.         case 2:
  9786.             return {
  9787.                 width: "auto",
  9788.                 height: "auto"
  9789.             };
  9790.             break;
  9791.         case 3:
  9792.             if (aa > Y) {
  9793.                 return {
  9794.                     width: ad + "px",
  9795.                     height: "auto"
  9796.                 }
  9797.             } else {
  9798.                 return {
  9799.                     width: "auto",
  9800.                     height: ac + "px"
  9801.                 }
  9802.             }
  9803.             break;
  9804.         case 4:
  9805.             return {
  9806.                 width: ad + "px",
  9807.                 height: ac + "px"
  9808.             };
  9809.             break
  9810.         }
  9811.     };
  9812.     var I = function (ad, ae, ab) {
  9813.         var Z = parseInt(ab.width);
  9814.         var ac = parseInt(ab.height);
  9815.         var Y = !Z || ad > Z ? "auto" : ad + "px";
  9816.         var aa = !ac || ae > ac ? "auto" : ae + "px";
  9817.         return {
  9818.             width: Y,
  9819.             height: aa
  9820.         }
  9821.     };
  9822.     var k = function (ab, Z, aa, Y) {
  9823.         if (!ab) {
  9824.             return
  9825.         }
  9826.         A.children().remove();
  9827.         w(ab.position, 0, null, Q.is(":visible"));
  9828.         return
  9829.     };
  9830.     var q = function (Y, Z) {
  9831.         i = Y;
  9832.         P = Z;
  9833.         X(".jb-dt-main-frame").css({
  9834.             width: Y,
  9835.             height: Z
  9836.         });
  9837.         k(o, Y, Z, 0);
  9838.         p(o);
  9839.         var aa = L.get_previous_image(o.position);
  9840.         p(aa);
  9841.         aa = L.get_next_image(o.position);
  9842.         p(aa)
  9843.     };
  9844.     return {
  9845.         get_photo_position: J,
  9846.         move_2_next_photo: n,
  9847.         move_2_previous_photo: s,
  9848.         initialize: S,
  9849.         populate_photo_html: w,
  9850.         repaint: q,
  9851.         get_current_photo: C,
  9852.         preload_images: M,
  9853.         fadeout_current_image: z,
  9854.         repopulate_caption_html: v,
  9855.         move_back: h,
  9856.         set_caption_height_mode: e,
  9857.         is_initialized: function () {
  9858.             return G
  9859.         },
  9860.         change_2_photo: E
  9861.     }
  9862. };
  9863. var juicebox_utils = new juice_box_utils(juicebox_lib.jQuery);
  9864. var juicebox_instances = [];
  9865. var juicebox_instance_count = 0;
  9866. var juicebox = function (_config) {
  9867.     var $ = juicebox_lib.jQuery;
  9868.     var utils = juicebox_utils;
  9869.     var gallery_manager = new juicebox_gallery_manager();
  9870.     var index_panel = new juicebox_gallery_index_panel(utils);
  9871.     var detail_panel = new juicebox_gallery_detail_panel();
  9872.     var config_manager = new juicebox_config_manager($, utils);
  9873.     var flickr_loader = null;
  9874.     var dialog = null;
  9875.     var sizing = null;
  9876.     var switching_2_thumbnail = false;
  9877.     var overlay_visible = true;
  9878.     var in_the_transitioning = false;
  9879.     var is_index_visible = true;
  9880.     var is_detail_visible = false;
  9881.     var hide_thumbnails_in_lsm = false;
  9882.     var transTimer = 0;
  9883.     var audioPlayer;
  9884.     var instance_id;
  9885.     var document_id = (new Date()).valueOf();
  9886.     config_manager.init(_config, null, "ck-s-");
  9887.     var config = config_manager.get_config();
  9888.     gallery_manager.init(config);
  9889.     var image_change_speed = 1000 * config.imagetransitiontime;
  9890.     var theme_cls = "jcbx-glry-classic";
  9891.     var themeUrl = "";
  9892.     var current_width = null;
  9893.     var current_height = null;
  9894.     var is_full_screen_mode = false;
  9895.     var initial_win_width = 0;
  9896.     var initial_win_height = 0;
  9897.     var start_x;
  9898.     var last_x;
  9899.     var delta_x;
  9900.     var start_y;
  9901.     var last_y;
  9902.     var delta_y;
  9903.     var in_navigation = false;
  9904.     var right_button_offset = null;
  9905.     var current_page = null;
  9906.     var total_page_count = null;
  9907.     var force2fill = false;
  9908.     var fullScreenPersistor = {
  9909.         parent_gallery_param: _config.persistor_param,
  9910.         is_full_screen: (_config.fullscreen_displaying_mode ? true : false),
  9911.         parent_gallery: _config.parent_gallery,
  9912.         initial_body_css_inline_style: (_config.initial_body_css_inline_style ? _config.initial_body_css_inline_style : ""),
  9913.         initial_height: 0,
  9914.         initial_width: 0
  9915.     };
  9916.     var correct_path = function (path) {
  9917.         return utils.concate_path(config.baseurl, path)
  9918.     };
  9919.     var _ = function (path) {
  9920.         return $(utils.get_query_path(document_id, path))
  9921.     };
  9922.     var need_top_panel = function () {
  9923.         if (!utils.is_large_screen_mode(config)) {
  9924.             return false
  9925.         }
  9926.         if (config.gallerytitleposition.toUpperCase() === "TOP" || config.buttonbarposition.toUpperCase() === "TOP" || (config.showbackbutton && config.backbuttonposition.toUpperCase() != "OVERLAY")) {
  9927.             return true
  9928.         }
  9929.         return false
  9930.     };
  9931.     var is_caption_overlap = function () {
  9932.         var cappos = config.captionposition.toUpperCase();
  9933.         if (cappos != "BOTTOM" && cappos != "BELOW_IMAGE" && cappos != "NONE") {
  9934.             return true
  9935.         }
  9936.         if (cappos === "NONE") {
  9937.             return false
  9938.         }
  9939.         if (!(is_index_visible && is_detail_visible)) {
  9940.             return true
  9941.         }
  9942.         return false
  9943.     };
  9944.     var set_containers_size_and_position = function (expected_size) {
  9945.         var pos = detail_panel.get_current_photo().position;
  9946.         set_toucharea_height(pos, expected_size);
  9947.         _(".jb-panel-index").css({
  9948.             width: expected_size.index_panel_width,
  9949.             height: expected_size.index_panel_height,
  9950.             top: expected_size.index_panel_top,
  9951.             left: expected_size.index_panel_left
  9952.         });
  9953.         _(".jb-panel-detail").css({
  9954.             width: expected_size.detail_panel_width,
  9955.             height: expected_size.detail_panel_height,
  9956.             top: expected_size.detail_panel_top,
  9957.             left: expected_size.detail_panel_left
  9958.         });
  9959.         var cpppos = config.captionposition.toUpperCase();
  9960.         var caphover = !utils.is_earlier_ie() && (cpppos != "NONE" && cpppos != "BOTTOM" && cpppos != "BELOW_IMAGE");
  9961.         var captionArea = _(".jb-area-caption");
  9962.         if (!($.browser.msie && $.browser.version < 8) && (utils.is_large_screen_mode(config) && (hide_thumbnails_in_lsm || caphover) || !utils.is_large_screen_mode(config))) {
  9963.             captionArea.css({
  9964.                 height: "auto"
  9965.             })
  9966.         } else {
  9967.             captionArea.css({
  9968.                 height: expected_size.caption_panel_height + "px"
  9969.             })
  9970.         }
  9971.         captionArea.css({
  9972.             width: expected_size.caption_panel_width,
  9973.             top: expected_size.caption_panel_top,
  9974.             left: expected_size.caption_panel_left,
  9975.             bottom: expected_size.caption_panel_bottom
  9976.         });
  9977.         _(".jb-panel-top").css({
  9978.             width: expected_size.top_panel_width,
  9979.             height: expected_size.top_panel_height,
  9980.             top: expected_size.top_panel_top,
  9981.             left: expected_size.top_panel_left
  9982.         })
  9983.     };
  9984.     var setup_layout = function (glry_width, glry_height, show_detail) {
  9985.         if (utils.is_large_screen_mode(config)) {
  9986.             if (hide_thumbnails_in_lsm) {
  9987.                 is_index_visible = false
  9988.             } else {
  9989.                 is_index_visible = true
  9990.             }
  9991.             is_detail_visible = true;
  9992.             _("").addClass("jb-flag-large-screen-mode")
  9993.         } else {
  9994.             if (show_detail) {
  9995.                 is_index_visible = false;
  9996.                 is_detail_visible = true
  9997.             } else {
  9998.                 is_index_visible = true;
  9999.                 is_detail_visible = false
  10000.             }
  10001.             _("").removeClass("jb-flag-large-screen-mode")
  10002.         }
  10003.     };
  10004.     var need_full_screen_button = function () {
  10005.         if (config.showexpandbutton && (!is_full_screen_mode || fullScreenPersistor.is_full_screen) && (!utils.is_in_iframe())) {
  10006.             return true
  10007.         }
  10008.         return false
  10009.     };
  10010.     var show_audio_button = function () {
  10011.         if (!config.showaudiobutton || utils.is_earlier_ie()) {
  10012.             return false
  10013.         }
  10014.         return true
  10015.     };
  10016.     var apply_show_options = function (ini) {
  10017.         var show_thumb_button_bar = false;
  10018.         var show_detail_button_bar = false;
  10019.         if (ini) {
  10020.             if (!check_open_image_directly()) {
  10021.                 if (config.showsmallthumbs) {
  10022.                     if (!(is_detail_visible && is_index_visible)) {
  10023.                         is_detail_visible = false;
  10024.                         is_index_visible = false
  10025.                     }
  10026.                 }
  10027.                 if (is_index_visible) {
  10028.                     show_thumbnails(0)
  10029.                 }
  10030.                 if (is_detail_visible && !fullScreenPersistor.is_full_screen) {
  10031.                     show_main_image(0)
  10032.                 }
  10033.             }
  10034.         }
  10035.         var gp1v = false;
  10036.         var gp2v = false;
  10037.         var gp3v = false;
  10038.         if (!config.showthumbsbutton || (!utils.is_large_screen_mode(config) && is_index_visible)) {
  10039.             _(".jb-bb-btn-de-show-list").hide()
  10040.         } else {
  10041.             show_detail_button_bar = true;
  10042.             gp1v = true
  10043.         } if (!config.showcaption) {
  10044.             _(".jb-caption").hide()
  10045.         }
  10046.         if (!config.showthumbsbutton && utils.is_large_screen_mode(config)) {
  10047.             _(".jb-bb-btn-de-show-list").hide()
  10048.         } else {
  10049.             show_detail_button_bar = true;
  10050.             gp1v = true
  10051.         } if (!config.showopenbutton) {
  10052.             _(".jb-bb-btn-open-url").hide()
  10053.         } else {
  10054.             show_detail_button_bar = true;
  10055.             gp1v = true
  10056.         } if (!config.showautoplaybutton) {
  10057.             _(".jb-bb-btn-auto-play").hide()
  10058.         } else {
  10059.             show_detail_button_bar = true;
  10060.             gp2v = true
  10061.         } if (!show_audio_button()) {
  10062.             _(".jb-bb-btn-audio").hide()
  10063.         } else {
  10064.             show_detail_button_bar = true;
  10065.             gp3v = true
  10066.         } if (!need_full_screen_button()) {
  10067.             _(".jb-bb-btn-full-screen").hide()
  10068.         } else {
  10069.             gp1v = true;
  10070.             if (is_detail_visible) {
  10071.                 show_detail_button_bar = true
  10072.             } else {
  10073.                 show_thumb_button_bar = true
  10074.             }
  10075.         } if (!config.showinfobutton) {
  10076.             _(".jb-bb-btn-show-info").hide()
  10077.         } else {
  10078.             show_detail_button_bar = true;
  10079.             gp3v = true
  10080.         } if (!config.shownavbuttons) {
  10081.             _(".jb-bb-btn-top-nav").hide()
  10082.         } else {
  10083.             show_detail_button_bar = true;
  10084.             gp2v = true
  10085.         }
  10086.         var showimageoverlay = config.showimageoverlay.toUpperCase();
  10087.         var btnPos = config.buttonbarposition.toUpperCase();
  10088.         if (!show_detail_button_bar || btnPos === "NONE") {
  10089.             _(".jb-classifier-link-wrapper.jb-classifier-detail-area").remove()
  10090.         } else {
  10091.             if (config.showinfobutton || overlay_visible || btnPos === "TOP" || showimageoverlay === "ALWAYS") {
  10092.                 if (is_detail_visible) {
  10093.                     _(".jb-classifier-link-wrapper.jb-classifier-detail-area").show()
  10094.                 }
  10095.                 _(".jb-classifier-link-wrapper.jb-classifier-detail-area .jb-bb-bar").show()
  10096.             } else {
  10097.                 _(".jb-classifier-link-wrapper.jb-classifier-detail-area").hide();
  10098.                 _(".jb-classifier-link-wrapper.jb-classifier-detail-area .jb-bb-bar").hide()
  10099.             }
  10100.         } if (!show_thumb_button_bar) {
  10101.             _(".jb-classifier-link-wrapper.jb-classifier-thumb-area .jb-bb-bar").hide()
  10102.         } else {
  10103.             _(".jb-classifier-link-wrapper.jb-classifier-thumb-area .jb-bb-bar").show()
  10104.         } if (gp1v && gp2v) {
  10105.             _(".jb-bb-splitter-1").show()
  10106.         } else {
  10107.             _(".jb-bb-splitter-1").hide()
  10108.         } if (gp3v && (gp2v || gp1v)) {
  10109.             _(".jb-bb-splitter-2").show()
  10110.         } else {
  10111.             _(".jb-bb-splitter-2").hide()
  10112.         }
  10113.     };
  10114.     var show_hide_controls = function (control, show, delay) {
  10115.         if (delay) {
  10116.             if (show) {
  10117.                 if (!control.is(":visible") || control.css("opacity") == 0 || utils.is_swipable_device()) {
  10118.                     control.fadeIn(delay)
  10119.                 }
  10120.             } else {
  10121.                 control.fadeOut(delay)
  10122.             }
  10123.             return
  10124.         }
  10125.         if (show) {
  10126.             control.show()
  10127.         } else {
  10128.             control.hide()
  10129.         }
  10130.     };
  10131.     var is_title_with_overlay = function () {
  10132.         if (!utils.is_large_screen_mode(config) || !is_detail_visible) {
  10133.             return false
  10134.         }
  10135.         var galleryTitlePosition = config.gallerytitleposition.toUpperCase();
  10136.         if (galleryTitlePosition === "NONE" || galleryTitlePosition === "TOP") {
  10137.             return false
  10138.         }
  10139.         return true
  10140.     };
  10141.     var is_button_bar_with_overlay = function () {
  10142.         var buttonbarPosition = config.buttonbarposition.toUpperCase();
  10143.         if (buttonbarPosition === "NONE" || buttonbarPosition === "TOP") {
  10144.             return false
  10145.         }
  10146.         if (config.showthumbsbutton || config.showopenbutton || config.showautoplaybutton || show_audio_button() || need_full_screen_button() || config.showinfobutton || config.shownavbuttons) {
  10147.             return true
  10148.         }
  10149.         return false
  10150.     };
  10151.     var concatenate_tags_string = function (arytags) {
  10152.         if (!arytags) {
  10153.             return ""
  10154.         }
  10155.         var ret = "";
  10156.         for (var i = 0; i < arytags.length; i++) {
  10157.             if (!arytags[i]) {
  10158.                 continue
  10159.             }
  10160.             if (ret) {
  10161.                 ret += (", " + arytags[i])
  10162.             } else {
  10163.                 ret = arytags[i]
  10164.             }
  10165.         }
  10166.         return ret
  10167.     };
  10168.     var set_overlay_visible = function (show) {
  10169.         var showimageoverlay = config.showimageoverlay.toUpperCase();
  10170.         if (showimageoverlay === "ALWAYS") {
  10171.             overlay_visible = true
  10172.         } else {
  10173.             if (showimageoverlay === "NEVER") {
  10174.                 overlay_visible = false
  10175.             } else {
  10176.                 overlay_visible = show
  10177.             }
  10178.         }
  10179.     };
  10180.     var show_count = 0;
  10181.     var show_hide_overlay = function (show, delay) {
  10182.         set_overlay_visible(show);
  10183.         if (utils.is_ipad()) {
  10184.             if (delay > 0 && show) {
  10185.                 window.setTimeout(function () {
  10186.                     _(".jb-classifier-show-on-over .jb-cap-frame").css("display", "")
  10187.                 }, 10)
  10188.             }
  10189.             show_hide_controls(_(".jb-classifier-show-on-over, .jb-classifier-show-on-over .jb-cap-frame"), overlay_visible, delay)
  10190.         } else {
  10191.             show_hide_controls(_(".jb-classifier-show-on-over"), overlay_visible, delay)
  10192.         }
  10193.     };
  10194.     var overlayTimer = 0;
  10195.     var set_overlay = function (show, delay) {
  10196.         if (!_(" .jb-panel-detail").is(":visible")) {
  10197.             return
  10198.         }
  10199.         if (switching_2_thumbnail) {
  10200.             return
  10201.         }
  10202.         if (overlayTimer) {
  10203.             window.clearTimeout(overlayTimer);
  10204.             overlayTimer = 0
  10205.         }
  10206.         overlayTimer = window.setTimeout(function () {
  10207.             overlayTimer = 0;
  10208.             show_hide_overlay(show, ($.browser.msie && $.browser.version >= 7 && $.browser.version < 8) ? 0 : delay)
  10209.         }, 100)
  10210.     };
  10211.     var check_open_image_directly = function () {
  10212.         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);
  10213.         if (config.enabledirectlinks) {
  10214.             var urlhash = window.location.href.split("#");
  10215.             var directPicIdx = (urlhash.length >= 2) ? parseInt(urlhash[1]) : -1;
  10216.             if (directPicIdx > 0 && directPicIdx <= gallery_manager.length()) {
  10217.                 show_main_image(directPicIdx - 1, image_change_speed, true);
  10218.                 is_detail_visible = true;
  10219.                 return true
  10220.             }
  10221.         }
  10222.         if (config.firstimageindex > 0 && config.firstimageindex <= gallery_manager.length()) {
  10223.             show_main_image(config.firstimageindex - 1, image_change_speed, true);
  10224.             is_detail_visible = true;
  10225.             return true
  10226.         }
  10227.         return false
  10228.     };
  10229.     var set_hash_changed_event = function () {
  10230.         if (!config.enabledirectlinks) {
  10231.             return
  10232.         }
  10233.         var originalIdx = -1;
  10234.         var directGo2 = function () {
  10235.             var urlhash = window.location.href.split("#");
  10236.             var directPicIdx = (urlhash.length >= 2) ? parseInt(urlhash[1]) : -1;
  10237.             if (directPicIdx > 0 && directPicIdx <= gallery_manager.length() && originalIdx != directPicIdx) {
  10238.                 originalIdx = directPicIdx;
  10239.                 show_main_image(directPicIdx - 1)
  10240.             }
  10241.         };
  10242.         if ($.browser.msie && $.browser.version < 8) {
  10243.             window.setInterval(directGo2, 800)
  10244.         } else {
  10245.             $(window).bind("hashchange", directGo2)
  10246.         }
  10247.     };
  10248.     var splash_is_set = function () {
  10249.         var ssp = config.showsplashpage.toUpperCase();
  10250.         if (ssp === "NEVER") {
  10251.             return false
  10252.         } else {
  10253.             if (ssp === "ALWAYS") {
  10254.                 return true
  10255.             } else {
  10256.                 if (!utils.is_large_screen_mode(config) && !is_full_screen_mode) {
  10257.                     return true
  10258.                 }
  10259.             }
  10260.         }
  10261.         return false
  10262.     };
  10263.     var need_show_splash_page = function () {
  10264.         if (fullScreenPersistor.is_full_screen) {
  10265.             return false
  10266.         }
  10267.         return splash_is_set()
  10268.     };
  10269.     var show_splash_page = function () {
  10270.         utils.add_viewport_meta_tag_4_device(!config.enabletouchzoom || sizing.is_gallery_fully_filled(config.gallerywidth, config.galleryheight));
  10271.         if (need_show_splash_page()) {
  10272.             _(".jb-classifier-detail-area").hide();
  10273.             var splashImageUrl = (config.splashimageurl ? correct_path(config.splashimageurl) : gallery_manager.get_image(0).imageURL);
  10274.             var splash = new juicebox_gallery_splash_panel();
  10275.             var params = get_panel_params();
  10276.             params.splashImageUrl = splashImageUrl;
  10277.             params.finish_draw_event_callback = null;
  10278.             params.view_gallery_event_callback = function () {
  10279.                 full_screen()
  10280.             };
  10281.             splash.initialize(params);
  10282.             splash.draw()
  10283.         } else {
  10284.             after_loading_images();
  10285.             set_gallery_title()
  10286.         }
  10287.     };
  10288.     var get_panel_params = function () {
  10289.         return {
  10290.             jquery: $,
  10291.             document_id: document_id,
  10292.             container: _(" .jb-panel-index>.jb-idx-thumbnail-container"),
  10293.             config: config,
  10294.             utils: utils,
  10295.             glymng: gallery_manager,
  10296.             sizing: sizing,
  10297.             finish_draw_event_callback: switch_2_main_image,
  10298.             touch_event_callback: after_page_changed,
  10299.             current_width: current_width,
  10300.             current_height: current_height
  10301.         }
  10302.     };
  10303.     var set_nav_btn_position = function (cntSize) {
  10304.         _(".jb-navigation.jb-classifier-detail-area .jbn-nav-button").css("top", (cntSize.detail_panel_height / 2 - _(".jbn-right-button").height() / 2) + "px");
  10305.         if (utils.is_large_screen_mode(config)) {
  10306.             _(".jb-navigation.jb-classifier-thumb-area .jbn-nav-button").css("top", (index_panel.get_thumb_height() / 2 - 27) + "px")
  10307.         } else {
  10308.             _(".jb-navigation.jb-classifier-thumb-area .jbn-nav-button").css("top", (cntSize.index_panel_height / 2 - _(".jbn-right-button").height() / 2) + "px")
  10309.         }
  10310.     };
  10311.     var adjust_title_button_bar_position = function () {
  10312.         var galleryTitlePosition = config.gallerytitleposition.toUpperCase();
  10313.         var buttonbarPosition = config.buttonbarposition.toUpperCase();
  10314.         var rt = 10 + sizing.get_stage_padding(current_width, current_height, config);
  10315.         var tp = 10;
  10316.         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);
  10317.         if (galleryTitlePosition === "TOP") {
  10318.             _(".jb-area-large-mode-title").css({
  10319.                 left: rt,
  10320.                 top: (tp - 3 + cntSize.top_panel_top)
  10321.             })
  10322.         } else {
  10323.             if (galleryTitlePosition != "NONE") {
  10324.                 _(".jb-area-large-mode-title").css({
  10325.                     left: rt,
  10326.                     top: (tp + cntSize.detail_panel_top)
  10327.                 })
  10328.             }
  10329.         } if (buttonbarPosition === "TOP") {
  10330.             _(".jb-classifier-link-wrapper.jb-classifier-detail-area").css({
  10331.                 right: rt,
  10332.                 top: (tp - 3 + cntSize.top_panel_top)
  10333.             })
  10334.         } else {
  10335.             if (buttonbarPosition != "NONE") {
  10336.                 _(".jb-classifier-link-wrapper.jb-classifier-detail-area").css({
  10337.                     right: rt,
  10338.                     top: (tp + cntSize.detail_panel_top)
  10339.                 })
  10340.             }
  10341.         }
  10342.     };
  10343.     var link_overlays = function () {
  10344.         if (!need_top_panel()) {
  10345.             _(".jb-panel-top").remove()
  10346.         } else {
  10347.             _(".jb-panel-top").show()
  10348.         } if (!need_full_screen_button()) {
  10349.             _(".jb-bb-btn-full-screen").remove()
  10350.         }
  10351.         var ov = config.captionposition.toUpperCase();
  10352.         if (ov === "NONE") {
  10353.             _(".jb-area-caption").remove()
  10354.         } else {
  10355.             if (ov === "BELOW_IMAGE" || ov === "BOTTOM") {
  10356.                 _(".jb-area-caption").removeClass("jb-classifier-show-on-over").addClass("jb-flag-size-fixed")
  10357.             } else {
  10358.                 _(".jb-area-caption").addClass("jb-classifier-show-on-over")
  10359.             }
  10360.         } if (!config.showbackbutton || !utils.is_large_screen_mode(config)) {
  10361.             _(".jb-go-back").remove()
  10362.         } else {
  10363.             ov = config.backbuttonposition.toUpperCase();
  10364.             if (ov === "OVERLAY") {
  10365.                 _(".jb-go-back").addClass("jb-classifier-show-on-over")
  10366.             } else {
  10367.                 _(".jb-go-back").removeClass("jb-classifier-show-on-over")
  10368.             }
  10369.         }
  10370.         ov = config.buttonbarposition.toUpperCase();
  10371.         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");
  10372.         if (ov === "NEVER") {
  10373.             _(".jb-classifier-link-wrapper.jb-classifier-detail-area").remove()
  10374.         } else {
  10375.             if (ov === "TOP" || config.showinfobutton) {
  10376.                 _(btnsel).removeClass("jb-classifier-show-on-over")
  10377.             } else {
  10378.                 _(btnsel).addClass("jb-classifier-show-on-over")
  10379.             }
  10380.         }
  10381.         ov = config.gallerytitleposition.toUpperCase();
  10382.         if (ov === "NONE") {
  10383.             _(".jb-area-large-mode-title").remove()
  10384.         } else {
  10385.             if (ov === "TOP") {
  10386.                 _(".jb-area-large-mode-title").removeClass("jb-classifier-show-on-over")
  10387.             } else {
  10388.                 _(".jb-area-large-mode-title").addClass("jb-classifier-show-on-over")
  10389.             }
  10390.         } if (!need_image_nav_button()) {
  10391.             _(".jb-navigation .jbn-nav-button").remove()
  10392.         }
  10393.         if (config.topbackcolor) {
  10394.             if (utils.is_earlier_ie()) {
  10395.                 _(".jb-panel-top").css({
  10396.                     "background-color": utils.format_color(config.topbackcolor),
  10397.                     filter: config.topbackopacity.replace("filter:", "")
  10398.                 })
  10399.             } else {
  10400.                 _(".jb-panel-top").css({
  10401.                     "background-color": utils.format_color(config.topbackcolor)
  10402.                 })
  10403.             }
  10404.         }
  10405.         if (config.buttonbarbackcolor) {
  10406.             if (utils.is_earlier_ie()) {
  10407.                 _(".jb-bb-bar").css({
  10408.                     "background-color": utils.format_color(config.buttonbarbackcolor),
  10409.                     filter: config.buttonbarbackopacity.replace("filter:", "")
  10410.                 })
  10411.             } else {
  10412.                 _(".jb-bb-bar").css({
  10413.                     "background-color": utils.format_color(config.buttonbarbackcolor)
  10414.                 })
  10415.             }
  10416.         }
  10417.     };
  10418.     var after_loading_images = function (skipshowing) {
  10419.         initial_win_width = $(window).width();
  10420.         initial_win_height = $(window).height();
  10421.         link_overlays();
  10422.         set_back_button();
  10423.         adjust_title_button_bar_position();
  10424.         if (config.useflickr) {
  10425.             _("").addClass("jb-flickr-glry")
  10426.         }
  10427.         if (fullScreenPersistor.is_full_screen) {
  10428.             if (utils.need_viewport_meta() && !utils.host_has_viewport_meta()) {
  10429.                 _("").addClass("jb-large-icon")
  10430.             }
  10431.         }
  10432.         _(".jbn-nav-left-touch-area .jbn-nav-button").css({
  10433.             left: (sizing.get_stage_padding(current_width, current_height, config) - 5)
  10434.         });
  10435.         _(".jbn-nav-right-touch-area .jbn-nav-button").css({
  10436.             right: (sizing.get_stage_padding(current_width, current_height, config) + 10)
  10437.         });
  10438.         if (false) {
  10439.             window.setTimeout(function () {
  10440.                 display_error_message(themeUrl)
  10441.             }, image_change_speed)
  10442.         }
  10443.         if (config.randomizeimages) {
  10444.             gallery_manager.sort_images()
  10445.         }
  10446.         setup_layout(current_width, current_height, is_detail_visible);
  10447.         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);
  10448.         var params = get_panel_params();
  10449.         params.current_width = cntSize.index_panel_width;
  10450.         params.current_height = cntSize.index_panel_height;
  10451.         index_panel.initialize(params);
  10452.         params.container = _(" .jb-panel-detail");
  10453.         params.caption_container = _(".jb-area-caption");
  10454.         params.current_width = cntSize.detail_panel_width;
  10455.         params.current_height = cntSize.detail_panel_height;
  10456.         params.before_draw_event_callback = before_show_main_image;
  10457.         params.finish_draw_event_callback = after_show_main_image;
  10458.         detail_panel.initialize(params);
  10459.         if (!skipshowing) {
  10460.             setup_layout(current_width, current_height, is_detail_visible);
  10461.             set_nav_btn_position(cntSize);
  10462.             apply_show_options(true);
  10463.             $(window).resize(function () {
  10464.                 repaint(false)
  10465.             });
  10466.             if (utils.is_iphone() || utils.is_ipad()) {
  10467.                 window.onorientationchange = function () {
  10468.                     repaint(true)
  10469.                 }
  10470.             }
  10471.             _(".jb-bb-btn-de-show-list").click(index_button_clicked);
  10472.             _(".jb-classifier-thumb-area .jbn-right-button").click(function () {
  10473.                 return next_page(0)
  10474.             });
  10475.             _(".jb-classifier-thumb-area .jbn-left-button").click(function () {
  10476.                 return previous_page(0)
  10477.             });
  10478.             _(".jb-bb-btn-open-url").click(open_url);
  10479.             _(".jb-bb-btn-full-screen").click(full_screen);
  10480.             _(".jb-bb-btn-auto-play").click(toggle_autoplay);
  10481.             _(".jb-bb-btn-audio").click(toggle_audio_play);
  10482.             _(".jb-bb-btn-show-info").click(function () {
  10483.                 toggle_info();
  10484.                 return false
  10485.             });
  10486.             _(".jb-bb-btn-top-nav.jb-bb-btn-top-nav-left").click(function () {
  10487.                 if (autoplay_timer) {
  10488.                     toggle_autoplay()
  10489.                 }
  10490.                 return previous_image(0)
  10491.             });
  10492.             _(".jb-bb-btn-top-nav.jb-bb-btn-top-nav-right").click(function () {
  10493.                 if (autoplay_timer) {
  10494.                     toggle_autoplay()
  10495.                 }
  10496.                 return next_image(0)
  10497.             });
  10498.             var audioUrl = "";
  10499.             if (utils.is_firefox()) {
  10500.                 audioUrl = config.audiourlogg
  10501.             } else {
  10502.                 if (config.audiourlmp3) {
  10503.                     audioUrl = config.audiourlmp3
  10504.                 } else {
  10505.                     audioUrl = config.audiourlogg
  10506.                 }
  10507.             } if (audioUrl && !utils.is_earlier_ie() && !utils.is_adobe_air()) {
  10508.                 audioPlayer = new Audio(audioUrl);
  10509.                 audioPlayer.addEventListener("ended", function () {
  10510.                     this.currentTime = 0;
  10511.                     if (config.loopaudio) {
  10512.                         this.play()
  10513.                     } else {
  10514.                         toggle_audio_play()
  10515.                     }
  10516.                 }, false);
  10517.                 audioPlayer.volume = config.audiovolume;
  10518.                 if (config.playaudioonload) {
  10519.                     toggle_audio_play()
  10520.                 }
  10521.             }
  10522.             if (!utils.is_swipable_device()) {
  10523.                 var clickMode = config.imageclickmode.toUpperCase();
  10524.                 _(".jb-classifier-detail-area .jbn-right-button").click(function () {
  10525.                     if (autoplay_timer) {
  10526.                         toggle_autoplay()
  10527.                     }
  10528.                     return next_image(0)
  10529.                 });
  10530.                 _(".jb-classifier-detail-area .jbn-left-button").click(function () {
  10531.                     if (autoplay_timer) {
  10532.                         toggle_autoplay()
  10533.                     }
  10534.                     return previous_image(0)
  10535.                 });
  10536.                 if (!config.forcetouchmode) {
  10537.                     if (clickMode === "NONE") {
  10538.                         _(".jb-classifier-detail-area .jbn-nav-right-touch-area").css("cursor", "default");
  10539.                         _(".jb-classifier-detail-area .jbn-nav-left-touch-area").css("cursor", "default")
  10540.                     } else {
  10541.                         if (clickMode === "OPEN_URL") {
  10542.                             _(".jb-classifier-detail-area .jbn-nav-right-touch-area").click(open_url);
  10543.                             _(".jb-classifier-detail-area .jbn-nav-left-touch-area").click(open_url)
  10544.                         } else {
  10545.                             _(".jb-classifier-detail-area .jbn-nav-right-touch-area").click(function () {
  10546.                                 if (autoplay_timer) {
  10547.                                     toggle_autoplay()
  10548.                                 }
  10549.                                 return next_image(0)
  10550.                             });
  10551.                             _(".jb-classifier-detail-area .jbn-nav-left-touch-area").click(function () {
  10552.                                 if (autoplay_timer) {
  10553.                                     toggle_autoplay()
  10554.                                 }
  10555.                                 return previous_image(0)
  10556.                             })
  10557.                         }
  10558.                     }
  10559.                 }
  10560.             } else {
  10561.                 var delay = 1050 * config.imagetransitiontime + 300;
  10562.                 var delay = parseInt(1005 * config.imagetransitiontime + 510 * config.imagetransitiontime);
  10563.                 _(".jb-classifier-detail-area .jbn-right-button").bind("touchend", function (e) {
  10564.                     index_panel.yield_4_transition(delay);
  10565.                     e.preventDefault();
  10566.                     if (in_the_transitioning) {
  10567.                         return
  10568.                     }
  10569.                     in_the_transitioning = true;
  10570.                     if (autoplay_timer) {
  10571.                         toggle_autoplay()
  10572.                     }
  10573.                     next_image(0);
  10574.                     window.setTimeout(function () {
  10575.                         in_the_transitioning = false
  10576.                     }, delay)
  10577.                 });
  10578.                 _(".jb-classifier-detail-area .jbn-left-button").bind("touchend", function (e) {
  10579.                     index_panel.yield_4_transition(delay);
  10580.                     e.preventDefault();
  10581.                     if (in_the_transitioning) {
  10582.                         return
  10583.                     }
  10584.                     in_the_transitioning = true;
  10585.                     if (autoplay_timer) {
  10586.                         toggle_autoplay()
  10587.                     }
  10588.                     previous_image(0);
  10589.                     window.setTimeout(function () {
  10590.                         in_the_transitioning = false
  10591.                     }, delay)
  10592.                 })
  10593.             } if (is_detail_visible) {
  10594.                 overlay_visible = false;
  10595.                 toggle_overlay()
  10596.             }
  10597.             set_key_events();
  10598.             config.onload();
  10599.             if (!utils.is_iphone() && !utils.is_ipad() && !utils.is_android() && !config.showinfobutton && !config.forcetouchmode) {
  10600.                 _(".jb-classifier-detail-area, .jb-area-caption, .jb-go-back, .jb-area-large-mode-title").hover(function () {
  10601.                     set_overlay(true, 250)
  10602.                 }, function () {
  10603.                     set_overlay(false, 250)
  10604.                 })
  10605.             }
  10606.             set_hash_changed_event();
  10607.             if (fullScreenPersistor.is_full_screen) {
  10608.                 show_main_image(fullScreenPersistor.parent_gallery_param.current_image_index, image_change_speed, true);
  10609.                 is_detail_visible = true;
  10610.                 repaint(true)
  10611.             } else {
  10612.                 check_open_image_directly()
  10613.             }
  10614.             window.setTimeout(function () {
  10615.                 if (config.usethumbdots && is_detail_visible && is_index_visible) {
  10616.                     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);
  10617.                     detail_panel.repaint(cntSize.detail_panel_width, cntSize.detail_panel_height)
  10618.                 }
  10619.                 repaint(true)
  10620.             }, 100);
  10621.             if ($.browser.msie && !utils.is_large_screen_mode(config)) {
  10622.                 window.setTimeout(function () {
  10623.                     repaint(true)
  10624.                 }, 100)
  10625.             }
  10626.             if (config.autoplayonload) {
  10627.                 if (!utils.is_large_screen_mode(config)) {
  10628.                     show_main_image(detail_panel.get_photo_position(), image_change_speed, true);
  10629.                     is_detail_visible = true
  10630.                 }
  10631.                 toggle_autoplay(true)
  10632.             }
  10633.             if (!config.showlargethumbs && utils.is_large_screen_mode(config)) {
  10634.                 hide_thumbnails_in_lsm = false;
  10635.                 toggle_index_panel_4_lsm(true)
  10636.             }
  10637.         }
  10638.         if (config_manager.isp && juicebox_instances[instance_id] && typeof (juicebox_instances[instance_id].onInitComplete) === "function") {
  10639.             juicebox_instances[instance_id].onInitComplete()
  10640.         }
  10641.     };
  10642.     var autoplay_timer = 0;
  10643.     var set_autoplay_info = function () {
  10644.         var message = config.languagelist.aon;
  10645.         if (autoplay_timer) {
  10646.             _(".jb-bb-btn-auto-play").toggleClass("jb-status-playing").attr("title", config.languagelist.stpa)
  10647.         } else {
  10648.             message = config.languagelist.aoff;
  10649.             _(".jb-bb-btn-auto-play").toggleClass("jb-status-playing").attr("title", config.languagelist.strta)
  10650.         } if (config.showautoplaystatus) {
  10651.             var msgdlg = _(".jb-status-message");
  10652.             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);
  10653.             var msgTp = cntSize.detail_panel_height / 2 - 15 + cntSize.detail_panel_top;
  10654.             var msgLf = cntSize.detail_panel_width / 2 - 60 + cntSize.detail_panel_left;
  10655.             msgdlg.css({
  10656.                 top: msgTp,
  10657.                 left: msgLf,
  10658.                 width: "115px"
  10659.             });
  10660.             msgdlg.html(message).fadeIn(image_change_speed);
  10661.             window.setTimeout(function () {
  10662.                 msgdlg.fadeOut(image_change_speed)
  10663.             }, 1000)
  10664.         }
  10665.     };
  10666.     var audio_playing = false;
  10667.     var toggle_audio_play = function () {
  10668.         if (!audioPlayer) {
  10669.             return false
  10670.         }
  10671.         if (utils.is_earlier_ie()) {
  10672.             return false
  10673.         }
  10674.         if (audio_playing) {
  10675.             audioPlayer.pause();
  10676.             audio_playing = false;
  10677.             _(".jb-bb-btn-audio").removeClass("jb-status-playing").attr("title", config.languagelist.plya)
  10678.         } else {
  10679.             audioPlayer.play();
  10680.             audio_playing = true;
  10681.             _(".jb-bb-btn-audio").addClass("jb-status-playing").attr("title", config.languagelist.psa)
  10682.         }
  10683.         return false
  10684.     };
  10685.     var can_image_move = function (to_next) {
  10686.         var glrylen = gallery_manager.length();
  10687.         if (glrylen <= 1) {
  10688.             return false
  10689.         }
  10690.         if (config.enablelooping) {
  10691.             return true
  10692.         }
  10693.         var imgpos = detail_panel.get_photo_position();
  10694.         if (to_next) {
  10695.             if (imgpos >= glrylen - 1) {
  10696.                 return false
  10697.             }
  10698.             return true
  10699.         } else {
  10700.             if (imgpos <= 0) {
  10701.                 return false
  10702.             }
  10703.             return true
  10704.         }
  10705.     };
  10706.     var can_page_move = function (to_next) {
  10707.         if (index_panel.is_last_page() && index_panel.is_first_page()) {
  10708.             return false
  10709.         }
  10710.         if (config.enablelooping) {
  10711.             return true
  10712.         }
  10713.         if (to_next) {
  10714.             if (index_panel.is_last_page()) {
  10715.                 return false
  10716.             }
  10717.             return true
  10718.         } else {
  10719.             if (index_panel.is_first_page()) {
  10720.                 return false
  10721.             }
  10722.             return true
  10723.         }
  10724.     };
  10725.     var toggle_autoplay = function () {
  10726.         if (!config.showautoplaybutton && !config.enableautoplay) {
  10727.             return
  10728.         }
  10729.         if (autoplay_timer) {
  10730.             window.clearInterval(autoplay_timer);
  10731.             autoplay_timer = 0;
  10732.             set_autoplay_info();
  10733.             return false
  10734.         }
  10735.         if (is_detail_visible) {
  10736.             if (config.gonextonautoplay) {
  10737.                 next_image(0)
  10738.             } else {
  10739.                 show_main_image(detail_panel.get_photo_position())
  10740.             }
  10741.         }
  10742.         autoplay_timer = window.setInterval(function () {
  10743.             if (!can_image_move(true)) {
  10744.                 toggle_autoplay();
  10745.                 return false
  10746.             }
  10747.             var ptpos = gallery_manager.get_next_image(detail_panel.get_photo_position()).position;
  10748.             var mimg = _(".jb-dt-main-image-" + ptpos + " .jb-status-loading");
  10749.             if (mimg.length <= 0 && config.main_load_placeholder.indexOf("jb-status-") > 0) {
  10750.                 next_image(0)
  10751.             }
  10752.         }, 1000 * config.displaytime);
  10753.         set_autoplay_info();
  10754.         return false
  10755.     };
  10756.     var set_key_events = function () {
  10757.         if (!config.enablekeyboardcontrols) {
  10758.             return
  10759.         }
  10760.         if (utils.is_iphone() || utils.is_ipad() || utils.is_small_android()) {
  10761.             return
  10762.         }
  10763.         if (fullScreenPersistor.is_full_screen || is_full_screen_mode) {
  10764.             if (!utils.is_in_iframe()) {
  10765.                 _("").focus()
  10766.             }
  10767.         }
  10768.         _("").keydown(function (evt) {
  10769.             evt.preventDefault();
  10770.             switch (evt.keyCode) {
  10771.             case 32:
  10772.                 toggle_autoplay();
  10773.                 break;
  10774.             case 37:
  10775.             case 75:
  10776.                 previous_image(0);
  10777.                 break;
  10778.             case 39:
  10779.             case 74:
  10780.                 next_image(0);
  10781.                 break;
  10782.             case 36:
  10783.                 show_thumbnails(0);
  10784.                 show_main_image(0);
  10785.                 break;
  10786.             case 35:
  10787.                 var imgpos = gallery_manager.length() - 1;
  10788.                 show_thumbnails(imgpos);
  10789.                 show_main_image(imgpos);
  10790.                 break;
  10791.             case 70:
  10792.                 if (is_full_screen_mode || fullScreenPersistor.is_full_screen) {
  10793.                     return
  10794.                 }
  10795.                 full_screen();
  10796.                 break;
  10797.             case 27:
  10798.                 if (fullScreenPersistor.is_full_screen) {
  10799.                     full_screen()
  10800.                 }
  10801.                 break
  10802.             }
  10803.         })
  10804.     };
  10805.     var update_flickr_image_details = function (imageIndex, details) {
  10806.         if (!details) {
  10807.             return
  10808.         }
  10809.         var image = gallery_manager.get_image(imageIndex);
  10810.         if (image.flickrPhotoId !== details.id) {
  10811.             return
  10812.         }
  10813.         image.description = details.description;
  10814.         image.detail_loaded = true;
  10815.         if (detail_panel.is_initialized()) {
  10816.             detail_panel.repopulate_caption_html(image)
  10817.         }
  10818.     };
  10819.     var load_images = function (xml) {
  10820.         if (config.useflickr) {
  10821.             flickr_loader = new juicebox_flickr_image_loader($, config_manager, display_error_message)
  10822.         }
  10823.         if (fullScreenPersistor.is_full_screen && fullScreenPersistor.parent_gallery_param && fullScreenPersistor.parent_gallery_param.gallery_manager) {
  10824.             gallery_manager = fullScreenPersistor.parent_gallery_param.gallery_manager;
  10825.             show_splash_page();
  10826.             return
  10827.         }
  10828.         var limit = config_manager.isp ? (100000) : 50;
  10829.         if (config.useflickr) {
  10830.             flickr_loader.get_images(function (photos) {
  10831.                 for (var i = 0; i < photos.length && i < limit; i++) {
  10832.                     gallery_manager.add_image({
  10833.                         imageURL: photos[i].imageURL,
  10834.                         thumbURL: photos[i].thumbURL,
  10835.                         caption: photos[i].caption,
  10836.                         imageFullURL: photos[i].imageFullURL,
  10837.                         flickrPhotoId: photos[i].flickrPhotoId
  10838.                     })
  10839.                 }
  10840.                 show_splash_page()
  10841.             }, null)
  10842.         } else {
  10843.             var count = 0;
  10844.             $(xml).find("image").each(function () {
  10845.                 if (count >= limit) {
  10846.                     return
  10847.                 }
  10848.                 count++;
  10849.                 gallery_manager.add_image({
  10850.                     imageURL: correct_path($(this).attr("imageURL")),
  10851.                     thumbURL: correct_path($(this).attr("thumbURL")),
  10852.                     title: $(this).children("title").text(),
  10853.                     caption: $(this).children("caption").text(),
  10854.                     linkURL: correct_path($(this).attr("linkURL")),
  10855.                     linkTarget: $(this).attr("linkTarget")
  10856.                 })
  10857.             });
  10858.             show_splash_page()
  10859.         }
  10860.     };
  10861.     var get_gallery_height = function () {
  10862.         return sizing.get_gallery_height(config)
  10863.     };
  10864.     var init_before_loading_gallery_html = function (container) {
  10865.         container.css({
  10866.             height: config.galleryheight,
  10867.             width: config.gallerywidth
  10868.         });
  10869.         sizing = new juicebox_sizing_manager($, container, utils);
  10870.         sizing.try_set_body_height(config);
  10871.         is_full_screen_mode = sizing.is_fullscreen_mode(config);
  10872.         if (is_full_screen_mode) {
  10873.             $("body").css({
  10874.                 overflow: "hidden",
  10875.                 padding: "0",
  10876.                 margin: "0"
  10877.             })
  10878.         }
  10879.     };
  10880.     var init_after_dom_loaded = function () {
  10881.         _(".jb-navigation.jb-classifier-detail-area").fadeOut(0);
  10882.         dialog = new juicebox_gallery_dialog({
  10883.             jquery: $
  10884.         });
  10885.         detail_area = _(" .jb-classifier-detail-area");
  10886.         thumb_area = _(" .jb-classifier-thumb-area");
  10887.         current_width = _(" *").width();
  10888.         current_height = get_gallery_height();
  10889.         if (config.showpreloader) {
  10890.             var opct = $.browser.msie ? "filter: alpha(opacity = 0);" : "opacity:0;";
  10891.             if (utils.is_firefox3()) {
  10892.                 opct = "display:none;"
  10893.             }
  10894.             _(".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>");
  10895.             _("#jb-glry-preload .jb-status-loading").css({
  10896.                 height: current_height,
  10897.                 width: current_width
  10898.             });
  10899.             _("#jb-glry-preload").fadeIn(300)
  10900.         }
  10901.         if (utils.is_chrome() && window.location.href.toLowerCase().indexOf("http") !== 0) {
  10902.             display_error_message(config.languagelist.lcchm);
  10903.             return
  10904.         }
  10905.         var galleryFile = correct_path(config.configurl);
  10906.         $.ajax({
  10907.             url: galleryFile,
  10908.             type: "GET",
  10909.             error: function (xhr, data) {
  10910.                 $("#" + document_id).html(display_error_message(config.languagelist.ae))
  10911.             },
  10912.             success: function (data) {
  10913.                 var rsp;
  10914.                 if (typeof data === "string") {
  10915.                     rsp = new ActiveXObject("Microsoft.XMLDOM");
  10916.                     rsp.async = false;
  10917.                     rsp.loadXML(data);
  10918.                     data = rsp
  10919.                 }
  10920.                 config_manager.sync_options(_config, data);
  10921.                 config = config_manager.get_config();
  10922.                 image_change_speed = 1000 * config.imagetransitiontime;
  10923.                 var bIsPercentage = (config.galleryheight + "").indexOf("%") > 0;
  10924.                 if (!force2fill && _("").height() === 0 && bIsPercentage) {
  10925.                     force2fill = true
  10926.                 } else {
  10927.                     if (bIsPercentage && $.browser.msie && $.browser.version < 9 && $.browser.version > 7) {
  10928.                         force2fill = true
  10929.                     }
  10930.                 }
  10931.                 _("." + theme_cls).attr("style", get_background_style());
  10932.                 if (config.showpreloader) {
  10933.                     window.setTimeout(function () {
  10934.                         load_images(data)
  10935.                     }, 300)
  10936.                 } else {
  10937.                     load_images(data)
  10938.                 }
  10939.             }
  10940.         });
  10941.         var pushImageThrough = function (delta) {
  10942.             var crntIdx = detail_panel.get_current_photo().position;
  10943.             if (delta > 10) {
  10944.                 if (!can_image_move(false)) {
  10945.                     return false
  10946.                 } else {
  10947.                     crntIdx--;
  10948.                     detail_panel.change_2_photo(false, 0, is_caption_visible(), crntIdx, true)
  10949.                 }
  10950.             } else {
  10951.                 if (delta < -10) {
  10952.                     if (!can_image_move(true)) {
  10953.                         return false
  10954.                     } else {
  10955.                         crntIdx++;
  10956.                         detail_panel.change_2_photo(true, 0, is_caption_visible(), crntIdx, true)
  10957.                     }
  10958.                 }
  10959.             }
  10960.             return true
  10961.         };
  10962.         var moveImage = function (e, delta) {
  10963.             in_navigation = false;
  10964.             in_the_transitioning = true;
  10965.             var delaytime = parseInt(1000 * config.imagetransitiontime * (current_width - delta_x) / current_width);
  10966.             if (delta > 10) {
  10967.                 if (autoplay_timer) {
  10968.                     toggle_autoplay()
  10969.                 }
  10970.                 if (!can_image_move(false)) {
  10971.                     detail_panel.move_back(delta)
  10972.                 } else {
  10973.                     previous_image(Math.abs(delta))
  10974.                 }
  10975.                 e.preventDefault()
  10976.             } else {
  10977.                 if (delta < -10) {
  10978.                     if (autoplay_timer) {
  10979.                         toggle_autoplay()
  10980.                     }
  10981.                     if (!can_image_move(true)) {
  10982.                         detail_panel.move_back(delta)
  10983.                     } else {
  10984.                         next_image(Math.abs(delta))
  10985.                     }
  10986.                     e.preventDefault()
  10987.                 } else {
  10988.                     detail_panel.move_back(delta);
  10989.                     if (!config.showinfobutton) {
  10990.                         toggle_overlay();
  10991.                         delaytime = 310
  10992.                     } else {
  10993.                         transTimer = 0;
  10994.                         in_the_transitioning = false;
  10995.                         return
  10996.                     }
  10997.                 }
  10998.             }
  10999.             index_panel.yield_4_transition(delaytime);
  11000.             if (utils.is_large_screen_mode(config)) {
  11001.                 transTimer = window.setTimeout(function () {
  11002.                     transTimer = 0;
  11003.                     in_the_transitioning = false
  11004.                 }, delaytime)
  11005.             } else {
  11006.                 in_the_transitioning = false
  11007.             }
  11008.         };
  11009.         var touchStarted = function (e) {
  11010.             if (in_navigation) {
  11011.                 return
  11012.             }
  11013.             if (in_the_transitioning) {
  11014.                 in_the_transitioning = false;
  11015.                 if (!pushImageThrough(delta_x)) {
  11016.                     return
  11017.                 }
  11018.             }
  11019.             delta_x = 0;
  11020.             delta_y = 0;
  11021.             if (!in_navigation) {
  11022.                 in_navigation = true;
  11023.                 start_x = e.originalEvent.touches[0].pageX;
  11024.                 last_x = e.originalEvent.touches[0].pageX;
  11025.                 start_y = e.originalEvent.touches[0].pageY;
  11026.                 last_y = e.originalEvent.touches[0].pageY
  11027.             }
  11028.         };
  11029.         var touchMoving = function (e) {
  11030.             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)) {
  11031.                 e.preventDefault()
  11032.             }
  11033.             if (in_the_transitioning) {
  11034.                 return
  11035.             }
  11036.             if (!in_navigation) {
  11037.                 return
  11038.             }
  11039.             delta_x = e.originalEvent.touches[0].pageX - start_x;
  11040.             delta_y = e.originalEvent.touches[0].pageY - start_y;
  11041.             if (Math.abs(delta_x) > 10) {
  11042.                 if (autoplay_timer) {
  11043.                     toggle_autoplay()
  11044.                 }
  11045.             }
  11046.             var imgs = _(" .jb-panel-detail .jb-dt-main-frame");
  11047.             imgs.animate({
  11048.                 left: "+=" + (e.originalEvent.touches[0].pageX - last_x),
  11049.                 avoidTransforms: !config.use_webkit_transform,
  11050.                 useTranslate3d: true
  11051.             }, 0);
  11052.             last_x = e.originalEvent.touches[0].pageX;
  11053.             last_y = e.originalEvent.touches[0].pageY
  11054.         };
  11055.         var touchEnded = function (e) {
  11056.             var is_h_swipe = Math.abs(delta_x) > Math.abs(delta_y);
  11057.             if (fullScreenPersistor.is_full_screen || is_full_screen_mode || is_h_swipe) {
  11058.                 e.preventDefault()
  11059.             }
  11060.             if (in_the_transitioning || !in_navigation) {
  11061.                 return
  11062.             }
  11063.             if (is_h_swipe) {
  11064.                 moveImage(e, delta_x)
  11065.             } else {
  11066.                 if (Math.abs(delta_y) > 10) {
  11067.                     detail_panel.move_back(delta_x);
  11068.                     in_navigation = false
  11069.                 } else {
  11070.                     moveImage(e, 0)
  11071.                 }
  11072.             }
  11073.         };
  11074.         _(".jb-navigation.jb-classifier-detail-area").bind("touchstart", touchStarted).bind("touchmove", touchMoving).bind("touchend", touchEnded);
  11075.         _(".jb-classifier-detail-area .jbn-right-button, jb-classifier-detail-area .jbn-left-button").bind("touchstart", function (e) {
  11076.             e.preventDefault()
  11077.         }).bind("touchmove", function (e) {
  11078.             e.preventDefault()
  11079.         }).bind("touchend", function (e) {
  11080.             e.preventDefault()
  11081.         });
  11082.         _(".jb-area-caption, .jb-classifier-link-wrapper, .jb-area-large-mode-title").bind("touchmove", function (e) {
  11083.             e.preventDefault()
  11084.         });
  11085.         _(".jb-panel-detail").nextAll('div[onclick*="window.open"]').bind("touchmove", function (e) {
  11086.             e.preventDefault()
  11087.         }).bind("touchend", function (e) {
  11088.             window.open("http://www." + ["ju", "ice", "b", "ox", ".n", "et"].join(""));
  11089.             e.preventDefault()
  11090.         });
  11091.         if (config.forcetouchmode) {
  11092.             _(".jb-classifier-detail-area .jbn-left-button, .jb-classifier-detail-area .jbn-right-button").mouseup(function (e) {
  11093.                 e.preventDefault();
  11094.                 in_navigation = false
  11095.             }).mousedown(function (e) {
  11096.                 e.preventDefault()
  11097.             }).mousemove(function (e) {
  11098.                 e.preventDefault()
  11099.             });
  11100.             _(".jb-navigation.jb-classifier-detail-area").mousedown(function (e) {
  11101.                 if (e.which !== 1) {
  11102.                     return
  11103.                 }
  11104.                 var thEvt = {
  11105.                     originalEvent: {
  11106.                         touches: [{}]
  11107.                     }
  11108.                 };
  11109.                 e.preventDefault();
  11110.                 thEvt.preventDefault = function () {};
  11111.                 thEvt.originalEvent.touches[0].pageX = e.screenX;
  11112.                 touchStarted(thEvt)
  11113.             }).mousemove(function (e) {
  11114.                 if (e.which !== 1) {
  11115.                     in_navigation = false;
  11116.                     return
  11117.                 }
  11118.                 if (!in_navigation) {
  11119.                     return
  11120.                 }
  11121.                 var thEvt = {
  11122.                     originalEvent: {
  11123.                         touches: [{}]
  11124.                     }
  11125.                 };
  11126.                 thEvt.preventDefault = function () {};
  11127.                 thEvt.originalEvent.touches[0].pageX = e.screenX;
  11128.                 touchMoving(thEvt)
  11129.             }).mouseup(function (e) {
  11130.                 if (!in_navigation) {
  11131.                     return
  11132.                 }
  11133.                 var thEvt = {};
  11134.                 thEvt.preventDefault = function () {};
  11135.                 touchEnded(thEvt)
  11136.             }).mouseout(function (e) {
  11137.                 if (!in_navigation) {
  11138.                     return
  11139.                 }
  11140.                 var thEvt = {};
  11141.                 thEvt.preventDefault = function () {};
  11142.                 touchEnded(thEvt)
  11143.             })
  11144.         }
  11145.     };
  11146.     var toggle_overlay = function () {
  11147.         overlay_visible = !overlay_visible;
  11148.         show_hide_overlay(overlay_visible, 250)
  11149.     };
  11150.     var toggle_info = function () {
  11151.         overlay_visible = !overlay_visible;
  11152.         show_hide_nav_controls(overlay_visible, 250, true)
  11153.     };
  11154.     var show_hide_nav_controls = function (show, delay, skipBtnBar) {
  11155.         if (!is_detail_visible) {
  11156.             return
  11157.         }
  11158.         var tags;
  11159.         show_hide_controls(_(".jb-classifier-show-on-over"), show, (($.browser.msie && $.browser.version >= 7 && $.browser.version < 8) ? 0 : delay));
  11160.         _(".jb-area-caption table").css({
  11161.             display: ""
  11162.         });
  11163.         var tt = show ? config.languagelist.hdinfo : config.languagelist.sinfo;
  11164.         _(".jb-bb-button.jb-bb-btn-show-info").attr("title", tt)
  11165.     };
  11166.     var display_error_message = function (msg) {
  11167.         var container;
  11168.         if (config.containerid) {
  11169.             container = $("#" + config.containerid)
  11170.         }
  11171.         var msgHtml;
  11172.         if (container && container.length > 0) {
  11173.             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>";
  11174.             container.html(msgHtml)
  11175.         } else {
  11176.             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>";
  11177.             document.write(msgHtml)
  11178.         }
  11179.     };
  11180.     var add_css_link = function (linkUrl) {
  11181.         var csslnk = document.createElement("link");
  11182.         csslnk.type = "text/css";
  11183.         csslnk.rel = "stylesheet";
  11184.         var head = document.getElementsByTagName("head")[0] || document.documentElement;
  11185.         csslnk.href = linkUrl;
  11186.         head.appendChild(csslnk)
  11187.     };
  11188.     var init = function () {
  11189.         instance_id = juicebox_instance_count;
  11190.         juicebox_instance_count++;
  11191.         if (config.themeurl) {
  11192.             themeUrl = config.themeurl
  11193.         } else {
  11194.             if (config.theme) {
  11195.                 themeUrl = correct_path(config.jbcore) + "themes/" + config.theme + "/css/style.css"
  11196.             }
  11197.         }
  11198.         add_css_link(themeUrl);
  11199.         if ($.browser.msie && $.browser.version < 7) {
  11200.             add_css_link(themeUrl.toLowerCase().replace(".css", "-ie6.css"))
  11201.         }
  11202.         var container;
  11203.         if (config.containerid) {
  11204.             var dom_loading_tmr = 0;
  11205.             container = $("#" + config.containerid);
  11206.             if (container.length > 0) {
  11207.                 init_before_loading_gallery_html(container);
  11208.                 container.html(gallery_skeleton(document_id));
  11209.                 init_after_dom_loaded()
  11210.             } else {
  11211.                 dom_loading_tmr = window.setInterval(function () {
  11212.                     var cntnr = $("#" + config.containerid);
  11213.                     if (cntnr.length <= 0) {
  11214.                         if ($("body").length > 0) {
  11215.                             display_error_message(config.languagelist.noid01 + config.containerid + config.languagelist.noid02);
  11216.                             console.log(config.languagelist.noid01 + config.containerid + config.languagelist.noid02);
  11217.                             if (dom_loading_tmr) {
  11218.                                 window.clearInterval(dom_loading_tmr)
  11219.                             }
  11220.                             dom_loading_tmr = 0;
  11221.                             return
  11222.                         }
  11223.                         return
  11224.                     }
  11225.                     if (dom_loading_tmr) {
  11226.                         window.clearInterval(dom_loading_tmr)
  11227.                     }
  11228.                     dom_loading_tmr = 0;
  11229.                     init_before_loading_gallery_html(cntnr);
  11230.                     cntnr.html(gallery_skeleton(document_id));
  11231.                     init_after_dom_loaded()
  11232.                 }, 200)
  11233.             }
  11234.         } else {
  11235.             document.write(get_container_html(document_id));
  11236.             container = _("");
  11237.             init_before_loading_gallery_html(container);
  11238.             container.html(get_gallery_frame_html());
  11239.             init_after_dom_loaded()
  11240.         }
  11241.     };
  11242.     var get_container_html = function (document_id, token) {
  11243.         var ver = "";
  11244.         if ($.browser.msie) {
  11245.             ver = "jb-flag-msie jb-flag-msiever" + parseInt($.browser.version) + (utils.is_earlier_ie() ? " jb-flag-msie-bf9" : "")
  11246.         }
  11247.         return "<div id='" + document_id + "' tabindex='0' class='juicebox-gallery " + ver + "' style='width:100%;height:100%;'>" + (token ? token : "") + "</div>"
  11248.     };
  11249.     var get_back_button_html_content = function () {
  11250.         if (!config.showbackbutton) {
  11251.             return ""
  11252.         }
  11253.         var lnk;
  11254.         if (config.backbuttonurl) {
  11255.             lnk = "<a href='" + config.backbuttonurl + "'>" + config.backbuttontext + "</a>"
  11256.         } else {
  11257.             lnk = "<a href='#' onclick='history.back(); return false;'>" + config.backbuttontext + "</a>"
  11258.         }
  11259.         return lnk
  11260.     };
  11261.     var set_back_button = function () {
  11262.         if (!config.showbackbutton) {
  11263.             _(".jb-go-back").remove();
  11264.             return
  11265.         }
  11266.         var pd = 10 + sizing.get_stage_padding(current_width, current_height, config);
  11267.         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);
  11268.         var btnrt = pd;
  11269.         var btntp = config.backbuttonposition.toUpperCase() != "OVERLAY" ? pd : (pd + cntSize.detail_panel_top);
  11270.         _(".jb-go-back").html(get_back_button_html_content()).css({
  11271.             top: btntp,
  11272.             left: btnrt,
  11273.             right: "auto"
  11274.         }).show();
  11275.         if (config.textcolor) {
  11276.             _(".jb-go-back a").css({
  11277.                 color: utils.format_color(config.textcolor)
  11278.             })
  11279.         }
  11280.     };
  11281.     var get_back_button_html = function () {
  11282.         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>"
  11283.     };
  11284.     var get_autoplay_status_html = function () {
  11285.         if (!config.showautoplaystatus) {
  11286.             return ""
  11287.         }
  11288.         return "<div class='jb-status-message' style='position:absolute;" + (config.autoplayonload ? "" : "display:none;") + "'></div>"
  11289.     };
  11290.     var get_title_html = function () {
  11291.         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>"
  11292.     };
  11293.     var need_image_nav_button = function () {
  11294.         if (utils.is_large_screen_mode(config)) {
  11295.             return true
  11296.         }
  11297.         if (!config.showimagenav) {
  11298.             return false
  11299.         }
  11300.         return true
  11301.     };
  11302.     var need_button_bar = function () {
  11303.         if (config.buttonbarposition.toUpperCase() === "NONE") {
  11304.             return false
  11305.         }
  11306.         if (typeof (config.showimageoverlay) === "string" && config.showimageoverlay.toUpperCase() === "NEVER" && config.buttonbarposition.toUpperCase() === "OVERLAY") {
  11307.             return false
  11308.         }
  11309.         return true
  11310.     };
  11311.     var get_calculated_gallery_height = function (ht) {
  11312.         return parseInt(ht * parseInt(config.galleryheight) / 100)
  11313.     };
  11314.     var get_background_style = function () {
  11315.         var hstr = force2fill ? "height:" + get_calculated_gallery_height($(window).height()) + "px" : "height:100%";
  11316.         return "display:none;width:100%;" + hstr + ";" + (config.backgroundcolor ? "background-color:" + utils.format_color(config.backgroundcolor) + ";" : "") + (utils.is_earlier_ie() ? config.backgroundopacity + ";" : "")
  11317.     };
  11318.     var get_top_panel_html = function () {
  11319.         return "<div class='jb-panel-top' style='position:absolute;display:none;'> </div>"
  11320.     };
  11321.     var get_splitter_html = function (cls) {
  11322.         return "<div class='jb-bb-splitter " + cls + "' style=''></div>"
  11323.     };
  11324.     var get_badge_image_url = function () {
  11325.         if (utils.is_adobe_air()) {
  11326.             return ""
  11327.         }
  11328.         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("")
  11329.     };
  11330.     var get_badge_link = function () {
  11331.         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("")
  11332.     };
  11333.     var get_gallery_frame_html = function () {
  11334.         var badge = "";
  11335.         if (!utils.ship) {
  11336.             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>"
  11337.         }
  11338.         if (utils.is_adobe_air()) {
  11339.             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;", ";")
  11340.         }
  11341.         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>"
  11342.     };
  11343.     var gallery_skeleton = function (document_id) {
  11344.         return get_container_html(document_id, get_gallery_frame_html())
  11345.     };
  11346.     var after_page_changed = function () {
  11347.         set_index_nav_button();
  11348.         if (config_manager.isp && juicebox_instances[instance_id] && typeof (juicebox_instances[instance_id].onThumbPageChange) === "function") {
  11349.             var curntPage = index_panel.get_index();
  11350.             var curntImage = detail_panel.get_current_photo();
  11351.             var evntObj = {
  11352.                 id: curntPage,
  11353.                 title: config.gallerytitle,
  11354.                 caption: curntImage.caption
  11355.             };
  11356.             juicebox_instances[instance_id].onThumbPageChange(evntObj)
  11357.         }
  11358.     };
  11359.     var set_index_nav_button = function () {
  11360.         if (!can_page_move()) {
  11361.             _(".jb-classifier-thumb-area .jbn-left-button").hide()
  11362.         } else {
  11363.             _(".jb-classifier-thumb-area .jbn-left-button").show()
  11364.         } if (!can_page_move(true)) {
  11365.             _(".jb-classifier-thumb-area .jbn-right-button").hide()
  11366.         } else {
  11367.             _(".jb-classifier-thumb-area .jbn-right-button").show()
  11368.         }
  11369.     };
  11370.     var show_thumbnails = function (imgpos) {
  11371.         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);
  11372.         set_containers_size_and_position(cntSize);
  11373.         set_index_nav_button_position(cntSize);
  11374.         index_panel.show_page_4_image_position(imgpos, cntSize.index_panel_width, cntSize.index_panel_height);
  11375.         set_index_nav_button();
  11376.         apply_show_options();
  11377.         set_gallery_title();
  11378.         set_show_list_button()
  11379.     };
  11380.     var index_button_clicked = function () {
  11381.         if (!utils.is_large_screen_mode(config)) {
  11382.             return switch_2_thumbnails()
  11383.         }
  11384.         return toggle_index_panel_4_lsm()
  11385.     };
  11386.     var toggle_index_panel_4_lsm = function (noAnim) {
  11387.         var cntSize;
  11388.         var idxPnl = _(".jb-panel-index");
  11389.         hide_thumbnails_in_lsm = !hide_thumbnails_in_lsm;
  11390.         if (hide_thumbnails_in_lsm) {
  11391.             var finishHiddingIndexPanel = function () {
  11392.                 is_index_visible = false;
  11393.                 idxPnl.hide();
  11394.                 repaint(true)
  11395.             };
  11396.             if (!noAnim) {
  11397.                 var idxht = parseInt(idxPnl.height());
  11398.                 idxPnl.animate({
  11399.                     top: "+=" + (idxht),
  11400.                     height: "-=" + (idxht),
  11401.                     avoidTransforms: true
  11402.                 }, 500, "easeOutQuart", finishHiddingIndexPanel)
  11403.             } else {
  11404.                 finishHiddingIndexPanel()
  11405.             }
  11406.         } else {
  11407.             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);
  11408.             repaint(true, true);
  11409.             idxPnl.css({
  11410.                 top: (cntSize.index_panel_top + cntSize.index_panel_height) + "px",
  11411.                 height: 0
  11412.             });
  11413.             idxPnl.show();
  11414.             var finishShowingIndexPanel = function () {
  11415.                 is_index_visible = true;
  11416.                 idxPnl.hide();
  11417.                 repaint(true)
  11418.             };
  11419.             if (!noAnim) {
  11420.                 idxPnl.animate({
  11421.                     top: "+=" + (-cntSize.index_panel_height),
  11422.                     height: "+=" + (cntSize.index_panel_height),
  11423.                     avoidTransforms: true
  11424.                 }, 500, "easeOutQuart", finishShowingIndexPanel)
  11425.             } else {
  11426.                 finishShowingIndexPanel()
  11427.             }
  11428.         }
  11429.         return false
  11430.     };
  11431.     var switch_2_thumbnails = function (current_image_position) {
  11432.         if (autoplay_timer) {
  11433.             toggle_autoplay()
  11434.         }
  11435.         var imgpos = current_image_position ? current_image_position : 0;
  11436.         if (detail_panel.get_photo_position() > 0) {
  11437.             imgpos = detail_panel.get_photo_position()
  11438.         }
  11439.         if (is_index_visible && is_detail_visible) {
  11440.             show_thumbnails(imgpos);
  11441.             return false
  11442.         }
  11443.         is_detail_visible = false;
  11444.         is_index_visible = true;
  11445.         var target = _(" .jb-panel-index");
  11446.         var dtpnl = _(" .jb-panel-detail, .jb-area-caption");
  11447.         if (dtpnl.is(":visible")) {
  11448.             switching_2_thumbnail = true;
  11449.             var imgs = _(" .jb-panel-detail img");
  11450.             if (imgs.length > 0) {
  11451.                 imgs.fadeOut(250)
  11452.             }
  11453.             if (utils.is_android()) {
  11454.                 dtpnl.fadeOut(250);
  11455.                 window.setTimeout(function () {
  11456.                     _(" .jb-classifier-detail-area, .jb-area-caption").hide();
  11457.                     _(".jb-classifier-thumb-area").show().fadeIn(200);
  11458.                     show_thumbnails(imgpos)
  11459.                 }, 250)
  11460.             } else {
  11461.                 dtpnl.fadeOut(250, function () {
  11462.                     _(" .jb-classifier-detail-area, .jb-area-caption").hide();
  11463.                     _(".jb-classifier-thumb-area").show().fadeIn(200);
  11464.                     show_thumbnails(imgpos)
  11465.                 })
  11466.             }
  11467.         } else {
  11468.             show_thumbnails()
  11469.         } if (config.enabledirectlinks) {
  11470.             window.location.href = window.location.href.split("#")[0] + "#"
  11471.         }
  11472.         return false
  11473.     };
  11474.     var set_image_hash_value = function (position) {
  11475.         if (!config.enabledirectlinks) {
  11476.             return
  11477.         }
  11478.         window.location.href = window.location.href.split("#")[0] + "#" + (parseInt(position) + 1)
  11479.     };
  11480.     var set_image_nav = function () {
  11481.         var alwaysHide = (!config.showimagenav || config.showimageoverlay.toUpperCase() === "NEVER") ? true : false;
  11482.         if (!can_image_move()) {
  11483.             _(".jb-classifier-detail-area .jbn-left-button").hide();
  11484.             _(".jb-classifier-detail-area .jbn-nav-left-touch-area").addClass("dt-nav-disabled");
  11485.             _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-left").css({
  11486.                 opacity: 0.5
  11487.             })
  11488.         } else {
  11489.             if (!alwaysHide) {
  11490.                 _(".jb-classifier-detail-area .jbn-left-button").show().css({
  11491.                     opacity: 1
  11492.                 })
  11493.             }
  11494.             _(".jb-classifier-detail-area .jbn-nav-left-touch-area").removeClass("dt-nav-disabled");
  11495.             _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-left").css({
  11496.                 opacity: 1
  11497.             })
  11498.         } if (!can_image_move(true)) {
  11499.             _(" .jb-classifier-detail-area .jbn-right-button").hide();
  11500.             _(".jb-classifier-detail-area .jbn-nav-right-touch-area").addClass("dt-nav-disabled");
  11501.             _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-right").css({
  11502.                 opacity: 0.5
  11503.             })
  11504.         } else {
  11505.             if (!alwaysHide) {
  11506.                 _(" .jb-classifier-detail-area .jbn-right-button").show().css({
  11507.                     opacity: 1
  11508.                 })
  11509.             }
  11510.             _(".jb-classifier-detail-area .jbn-nav-right-touch-area").removeClass("dt-nav-disabled");
  11511.             _(".jb-bb-button.jb-bb-btn-top-nav.jb-bb-btn-top-nav-right").css({
  11512.                 opacity: 1
  11513.             })
  11514.         }
  11515.     };
  11516.     var set_gallery_title = function () {
  11517.         if (utils.is_large_screen_mode(config)) {
  11518.             index_panel.display_gallery_top(false);
  11519.             if (config.gallerytitle) {
  11520.                 var showimageoverlay = config.showimageoverlay.toUpperCase();
  11521.                 var galleryTitlePosition = config.gallerytitleposition.toUpperCase();
  11522.                 if (config.textcolor) {
  11523.                     _(".jb-area-large-mode-title").css({
  11524.                         color: utils.format_color(config.textcolor)
  11525.                     })
  11526.                 }
  11527.                 if (galleryTitlePosition == "TOP") {
  11528.                     _(".jb-area-large-mode-title").html(config.gallerytitle).show()
  11529.                 } else {
  11530.                     if (showimageoverlay === "NEVER") {
  11531.                         _(".jb-area-large-mode-title.jb-classifier-show-on-over").html(config.gallerytitle).hide()
  11532.                     } else {
  11533.                         if (overlay_visible || showimageoverlay === "ALWAYS") {
  11534.                             _(".jb-area-large-mode-title.jb-classifier-show-on-over").html(config.gallerytitle).show()
  11535.                         }
  11536.                     }
  11537.                 }
  11538.             }
  11539.         } else {
  11540.             _(".jb-area-large-mode-title").remove();
  11541.             index_panel.display_gallery_top(is_index_visible)
  11542.         }
  11543.     };
  11544.     var need_jump_2_page = function (position) {
  11545.         if (!utils.is_swipable_device() || !in_the_transitioning) {
  11546.             return false
  11547.         }
  11548.         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);
  11549.         index_panel.show_page_4_image_position(position, cntSize.index_panel_width, cntSize.index_panel_height);
  11550.         return true
  11551.     };
  11552.     var before_show_main_image = function (position) {
  11553.         index_panel.set_thumbnail_visited(position);
  11554.         if (is_index_visible && (!autoplay_timer || config.autoplaythumbs)) {
  11555.             var idxRange = index_panel.get_image_index_range();
  11556.             if (position < idxRange.from && position === 0) {
  11557.                 if (!need_jump_2_page(position)) {
  11558.                     index_panel.move_to_next_page()
  11559.                 }
  11560.             } else {
  11561.                 if (position > idxRange.to && position === gallery_manager.length() - 1) {
  11562.                     if (!need_jump_2_page(position)) {
  11563.                         index_panel.move_to_prev_page()
  11564.                     }
  11565.                 } else {
  11566.                     if (position > idxRange.to) {
  11567.                         if (!need_jump_2_page(position)) {
  11568.                             index_panel.move_to_next_page()
  11569.                         }
  11570.                     } else {
  11571.                         if (position < idxRange.from) {
  11572.                             if (!need_jump_2_page(position)) {
  11573.                                 index_panel.move_to_prev_page()
  11574.                             }
  11575.                         }
  11576.                     }
  11577.                 }
  11578.             }
  11579.         }
  11580.     };
  11581.     var after_show_main_image = function (position) {
  11582.         set_gallery_title();
  11583.         set_image_hash_value(position);
  11584.         var imgrange = index_panel.get_image_index_range();
  11585.         if (imgrange.from > position || imgrange.to < position) {
  11586.             show_thumbnails(position)
  11587.         }
  11588.         apply_show_options();
  11589.         set_caption_height_mode();
  11590.         adjust_touch_area_height(position);
  11591.         set_image_nav();
  11592.         set_show_list_button();
  11593.         if (utils.is_swipable_device() && overlay_visible) {
  11594.             show_hide_nav_controls(overlay_visible)
  11595.         }
  11596.         if (config_manager.isp && juicebox_instances[instance_id] && typeof (juicebox_instances[instance_id].onImageChange) === "function") {
  11597.             var curntImage = detail_panel.get_current_photo();
  11598.             var evntObj = {
  11599.                 id: curntImage.position,
  11600.                 title: config.gallerytitle,
  11601.                 caption: curntImage.caption
  11602.             };
  11603.             juicebox_instances[instance_id].onImageChange(evntObj)
  11604.         }
  11605.         handle_image_preload();
  11606.         if (utils.is_chrome()) {
  11607.             _(" *").disableSelection()
  11608.         } else {
  11609.             _(".jb-dt-main-image-" + position + " img").disableSelection();
  11610.             _(".table_page_" + index_panel.get_index() + " img").disableSelection();
  11611.             if ($.browser.mozilla) {
  11612.                 _(".jb-navigation.jb-classifier-detail-area *").disableSelection()
  11613.             }
  11614.         }
  11615.     };
  11616.     var is_caption_visible = function () {
  11617.         var cappos = config.captionposition.toUpperCase();
  11618.         if (cappos === "NONE") {
  11619.             return false
  11620.         }
  11621.         if (cappos === "BELOW_IMAGE" || cappos === "BOTTOM") {
  11622.             return true
  11623.         }
  11624.         set_overlay_visible(overlay_visible);
  11625.         return overlay_visible
  11626.     };
  11627.     var show_main_image = function (position, delay, isfirstimage) {
  11628.         in_the_transitioning = false;
  11629.         in_navigation = false;
  11630.         if (transTimer) {
  11631.             window.clearTimeout(transTimer);
  11632.             transTimer = 0
  11633.         }
  11634.         if (!delay && $.browser.msie) {
  11635.             window.setTimeout(function () {
  11636.                 index_panel.set_thumbnail_visited(position)
  11637.             }, 100)
  11638.         } else {
  11639.             index_panel.set_thumbnail_visited(position)
  11640.         } if (isfirstimage) {
  11641.             detail_panel.populate_photo_html(position, delay, function () {
  11642.                 after_show_main_image(position)
  11643.             }, is_caption_visible());
  11644.             return
  11645.         }
  11646.         if (delay) {
  11647.             detail_panel.change_2_photo(false, 0, is_caption_visible(), position)
  11648.         } else {
  11649.             detail_panel.populate_photo_html(position, 0, null, is_caption_visible());
  11650.             after_show_main_image(position)
  11651.         }
  11652.     };
  11653.     var handle_image_preload = function () {
  11654.         var range;
  11655.         var preldopt = config.imagepreloading.toUpperCase();
  11656.         if (preldopt === "NEXT" || preldopt === "NONE") {
  11657.             return
  11658.         }
  11659.         if (preldopt === "ALL") {
  11660.             range = {
  11661.                 from: 0,
  11662.                 to: gallery_manager.length() - 1
  11663.             }
  11664.         } else {
  11665.             range = index_panel.get_image_index_range()
  11666.         } if (flickr_loader) {
  11667.             flickr_loader.load_flickr_images_detail(gallery_manager.get_images(), range, update_flickr_image_details)
  11668.         }
  11669.         if (utils.is_large_screen_mode(config)) {
  11670.             detail_panel.preload_images(range.from, range.to + 1)
  11671.         }
  11672.     };
  11673.     var set_toucharea_height = function (position, size) {
  11674.         var halfht = size.detail_panel_height / 2 + parseInt(_(".jbn-right-button").height() / 2);
  11675.         var clnk = _(".jb-cap-frame.caption_" + position + " a");
  11676.         _(".jb-navigation.jb-classifier-detail-area").css({
  11677.             top: size.top_panel_height + size.top_panel_top,
  11678.             height: size.detail_panel_height - (clnk.length <= 0 ? 0 : (halfht > config.maxcaptionheight ? config.maxcaptionheight : halfht))
  11679.         })
  11680.     };
  11681.     var adjust_touch_area_height = function (position) {
  11682.         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);
  11683.         set_toucharea_height(position, size)
  11684.     };
  11685.     var switch_2_main_image = function (position) {
  11686.         if (autoplay_timer) {
  11687.             toggle_autoplay()
  11688.         }
  11689.         if (is_index_visible && is_detail_visible) {
  11690.             show_main_image(position, 1000 * config.imagetransitiontime);
  11691.             return
  11692.         }
  11693.         is_detail_visible = true;
  11694.         is_index_visible = false;
  11695.         if (_(".jb-panel-index").is(":visible")) {
  11696.             switching_2_thumbnail = false;
  11697.             var navpnl = _(".jb-panel-index img");
  11698.             if (!navpnl.length) {
  11699.                 _(".jb-classifier-thumb-area").hide();
  11700.                 _(".jb-classifier-detail-area, .jb-area-caption").show();
  11701.                 show_main_image(position)
  11702.             } else {
  11703.                 var transitionTime = 1000 * config.imagetransitiontime;
  11704.                 navpnl.stop();
  11705.                 navpnl.fadeOut(transitionTime, function () {});
  11706.                 window.setTimeout(function () {
  11707.                     _(".jb-classifier-thumb-area").hide();
  11708.                     var dtpnl = _(".jb-classifier-detail-area, .jb-area-caption");
  11709.                     dtpnl.stop();
  11710.                     _(".jb-area-caption").html("");
  11711.                     if (utils.is_firefox3()) {
  11712.                         dtpnl.css({
  11713.                             opacity: 1,
  11714.                             display: "none"
  11715.                         })
  11716.                     }
  11717.                     dtpnl.children(".jb-dt-main-frame").remove();
  11718.                     dtpnl.fadeIn(transitionTime, function () {});
  11719.                     window.setTimeout(function () {
  11720.                         show_main_image(position, transitionTime)
  11721.                     }, 20)
  11722.                 }, transitionTime > 50 ? transitionTime - 50 : transitionTime)
  11723.             }
  11724.         } else {
  11725.             show_main_image(position)
  11726.         }
  11727.     };
  11728.     var set_show_list_button = function () {
  11729.         var slb = _(".jb-bb-btn-de-show-list");
  11730.         if (utils.is_large_screen_mode(config)) {
  11731.             if (is_index_visible) {
  11732.                 slb.attr("title", config.languagelist.htlsm)
  11733.             } else {
  11734.                 slb.attr("title", config.languagelist.stlsm)
  11735.             }
  11736.         } else {
  11737.             slb.attr("title", config.languagelist.st);
  11738.             if (!is_index_visible) {
  11739.                 slb.show()
  11740.             } else {
  11741.                 slb.hide();
  11742.                 if (_(".jb-bb-bar>div:visible").length <= 0) {
  11743.                     _(".jb-bb-bar").hide()
  11744.                 }
  11745.             } if (is_detail_visible) {
  11746.                 index_panel.display_gallery_top(false);
  11747.                 _(".jb-classifier-link-wrapper.jb-classifier-detail-area").show()
  11748.             } else {
  11749.                 _(".jb-classifier-link-wrapper.jb-classifier-detail-area").hide()
  11750.             }
  11751.         }
  11752.     };
  11753.     var set_caption_height_mode = function () {
  11754.         if (config_manager.isp || !is_detail_visible) {
  11755.             return
  11756.         }
  11757.         var isHigh = true;
  11758.         if (is_index_visible && config.captionposition.toUpperCase() !== "BOTTOM") {
  11759.             isHigh = false
  11760.         }
  11761.         detail_panel.set_caption_height_mode(isHigh)
  11762.     };
  11763.     var set_index_nav_button_position = function (cntSize) {
  11764.         if (utils.is_large_screen_mode(config)) {
  11765.             var thumb_size = index_panel.get_thumblist_size();
  11766.             var pd = (cntSize.index_panel_width - thumb_size.width) / 2 - 60;
  11767.             _(".index-navigation .jbn-left-button").css("left", pd + "px");
  11768.             _(".index-navigation .jbn-right-button").css("right", pd + "px")
  11769.         } else {
  11770.             if ((utils.is_swipable_device() || config.forcetouchmode)) {
  11771.                 if (current_height > current_width) {
  11772.                     _(".index-navigation .jbn-left-button").css("left", "1px");
  11773.                     _(".index-navigation .jbn-right-button").css("right", "1px")
  11774.                 } else {
  11775.                     _(".index-navigation .jbn-left-button").css("left", "-9px");
  11776.                     _(".index-navigation .jbn-right-button").css("right", "-9px")
  11777.                 }
  11778.             } else {
  11779.                 _(".index-navigation .jbn-left-button").css("left", "10px");
  11780.                 _(".index-navigation .jbn-right-button").css("right", "10px")
  11781.             }
  11782.         }
  11783.     };
  11784.     var add_view_port_meta_after_switching = true;
  11785.     var repaint_timer = 0;
  11786.     var get_initial_win_size = function (v1, v2) {
  11787.         var hv = Math.max(initial_win_height, initial_win_width);
  11788.         var lv = Math.min(initial_win_height, initial_win_width);
  11789.         return (v1 > v2) ? hv : lv
  11790.     };
  11791.     var repaint = function (force, ignoreIndexPnl) {
  11792.         if ($("#jb-glry-dlg:visible").length > 0 && _("").parent().attr("id") != "jb-glry-dlg") {
  11793.             return
  11794.         }
  11795.         var _current_width = 0;
  11796.         var _current_height = 0;
  11797.         var win = $(window);
  11798.         var hvalue = win.height();
  11799.         var wvalue = win.width();
  11800.         if (utils.is_small_android()) {
  11801.             if (utils.get_android_ver() < 4) {
  11802.                 hvalue = screen.height;
  11803.                 wvalue = screen.width
  11804.             } else {
  11805.                 hvalue = get_initial_win_size(win.height(), win.width())
  11806.             }
  11807.         }
  11808.         var rst = sizing.get_window_height(hvalue, wvalue);
  11809.         var adjustHeight = function (htObj) {
  11810.             if (htObj.registered) {
  11811.                 return htObj.height
  11812.             }
  11813.             if (utils.is_small_android() && utils.get_android_ver() >= 4) {
  11814.                 if (win.height() > hvalue) {
  11815.                     return win.height() + (win.height() > win.width() ? (fullScreenPersistor.is_full_screen ? 2 : 0) : 4)
  11816.                 }
  11817.                 if (hvalue > win.height()) {
  11818.                     return win.height() + (win.height() > win.width() ? (fullScreenPersistor.is_full_screen ? 2 : 50) : 4)
  11819.                 }
  11820.                 return htObj.height + (fullScreenPersistor.is_full_screen ? 54 : 50)
  11821.             }
  11822.             return htObj.height + (utils.is_small_android() && utils.get_android_ver() < 4 ? (htObj.height > htObj.width ? 5 : 5) : 0)
  11823.         };
  11824.         var device_registered = rst.registered;
  11825.         if (!add_view_port_meta_after_switching && device_registered) {
  11826.             _current_height = win.height()
  11827.         } else {
  11828.             _current_height = adjustHeight(rst)
  11829.         } if (fullScreenPersistor.is_full_screen) {
  11830.             _current_width = win.width();
  11831.             device_registered = rst.registered
  11832.         } else {
  11833.             if (force2fill) {
  11834.                 _("." + theme_cls).height(get_calculated_gallery_height(parseInt(_current_height)))
  11835.             }
  11836.             _current_width = _("").width();
  11837.             if (is_full_screen_mode) {
  11838.                 device_registered = rst.registered;
  11839.                 if (device_registered) {
  11840.                     _current_height = rst.height
  11841.                 } else {
  11842.                     _current_height = adjustHeight(rst);
  11843.                     _current_width = wvalue
  11844.                 }
  11845.                 $("body").height(_current_height)
  11846.             } else {
  11847.                 sizing.try_set_body_height(config);
  11848.                 _current_height = get_gallery_height()
  11849.             }
  11850.         } if (right_button_offset == null) {
  11851.             right_button_offset = _(".jbn-right-button").width() + parseInt(_(".jbn-right-button").css("margin-right"))
  11852.         }
  11853.         if (force || ((current_width != _current_width || current_height != _current_height))) {
  11854.             current_width = _current_width;
  11855.             current_height = _current_height;
  11856.             if (fullScreenPersistor.is_full_screen) {
  11857.                 _("").css({
  11858.                     width: _current_width,
  11859.                     height: _current_height
  11860.                 })
  11861.             } else {
  11862.                 if (config.forceheightcalculation) {
  11863.                     _("").css({
  11864.                         height: _current_height
  11865.                     })
  11866.                 }
  11867.             }
  11868.             setup_layout(_current_width, _current_height, is_detail_visible);
  11869.             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);
  11870.             set_containers_size_and_position(cntSize);
  11871.             if (is_detail_visible) {
  11872.                 var wrappersel = utils.is_swipable_device() ? ":not(.jb-classifier-link-wrapper)" : "";
  11873.                 var mainselstr = (overlay_visible && utils.is_swipable_device()) ? ".jb-classifier-detail-area" + wrappersel + ", .jb-area-caption" : ".jb-classifier-detail-area" + wrappersel;
  11874.                 if (utils.is_earlier_ie()) {
  11875.                     _(mainselstr).fadeIn(100);
  11876.                     var imgs = _(".jb-panel-detail img");
  11877.                     imgs.fadeIn(100);
  11878.                     _(".jb-panel-detail").fadeIn(100)
  11879.                 } else {
  11880.                     _(mainselstr).css("opacity", 1).show();
  11881.                     var imgs = _(".jb-panel-detail img");
  11882.                     imgs.css("opacity", 1).show();
  11883.                     _(".jb-panel-detail").css("opacity", 1)
  11884.                 } if (_(".jb-panel-detail").html()) {
  11885.                     detail_panel.repaint(cntSize.detail_panel_width, cntSize.detail_panel_height)
  11886.                 } else {
  11887.                     show_main_image(detail_panel.get_photo_position())
  11888.                 }
  11889.             } else {
  11890.                 detail_panel.repaint(cntSize.detail_panel_width, cntSize.detail_panel_height);
  11891.                 _(".jb-classifier-detail-area, .jb-area-caption, .jb-classifier-link-wrapper.jb-classifier-detail-area").hide()
  11892.             } if (is_index_visible && !ignoreIndexPnl) {
  11893.                 _(".jb-classifier-thumb-area").show();
  11894.                 _(".jb-panel-index").show();
  11895.                 var imgpos = detail_panel.get_photo_position();
  11896.                 index_panel.show_page_4_image_position(imgpos, cntSize.index_panel_width, cntSize.index_panel_height)
  11897.             } else {
  11898.                 _(".jb-panel-index").hide()
  11899.             }
  11900.             set_nav_btn_position(cntSize);
  11901.             set_index_nav_button_position(cntSize);
  11902.             set_show_list_button();
  11903.             index_panel.set_thumbnail_visited(detail_panel.get_photo_position());
  11904.             set_caption_height_mode()
  11905.         }
  11906.         if (fullScreenPersistor.is_full_screen) {
  11907.             if (utils.is_small_android()) {
  11908.                 hide_android_url_bar()
  11909.             } else {
  11910.                 if (utils.is_chrome() || utils.is_ipad()) {
  11911.                     if (repaint_timer) {
  11912.                         window.clearTimeout(repaint_timer);
  11913.                         repaint_timer = 0
  11914.                     }
  11915.                     repaint_timer = window.setTimeout(function () {
  11916.                         var ofst = _("").offset();
  11917.                         var bd = $("body");
  11918.                         bd.css("overflow", "scroll");
  11919.                         window.scrollTo(ofst.left, ofst.top);
  11920.                         bd.css("overflow", "hidden")
  11921.                     }, 100)
  11922.                 } else {
  11923.                     if (!$.browser.msie) {
  11924.                         var offset = _("").offset();
  11925.                         if (offset) {
  11926.                             window.scrollTo(offset.left, offset.top)
  11927.                         }
  11928.                     }
  11929.                 }
  11930.             }
  11931.         } else {
  11932.             if (is_full_screen_mode) {
  11933.                 if (utils.is_iphone()) {
  11934.                     window.scrollTo(0, 1);
  11935.                     if (repaint_timer) {
  11936.                         window.clearTimeout(repaint_timer);
  11937.                         repaint_timer = 0
  11938.                     }
  11939.                     repaint_timer = window.setTimeout(function () {
  11940.                         window.scrollTo(0, 1)
  11941.                     }, 1000)
  11942.                 } else {
  11943.                     if (utils.is_small_android()) {
  11944.                         hide_android_url_bar()
  11945.                     }
  11946.                 }
  11947.             }
  11948.         }
  11949.     };
  11950.     var hide_android_url_bar = function () {
  11951.         var win = $(window);
  11952.         var rst = sizing.get_window_height(win.height(), win.width());
  11953.         if (rst.registered) {
  11954.             $("body").css("overflow", "auto").height(rst.height);
  11955.             window.scrollTo(0, 1)
  11956.         } else {
  11957.             $("body").css("overflow", "auto").height(rst.height + 50);
  11958.             window.setTimeout(function () {
  11959.                 window.scrollTo(0, 1);
  11960.                 window.setTimeout(function () {
  11961.                     $("body").height(screen.height)
  11962.                 }, 200)
  11963.             }, 200)
  11964.         }
  11965.     };
  11966.     if (config.css != null) {
  11967.         document.write("<style id='" + document_id + "_style'>" + config.css.trim().replace(/\}\s/g, "} #" + document_id + " ").replace(/^/, "#" + document_id + " ") + "</style>");
  11968.         init()
  11969.     } else {
  11970.         init()
  11971.     }
  11972.     var next_page = function (delta_x) {
  11973.         if (!can_page_move(true)) {
  11974.             return false
  11975.         }
  11976.         index_panel.move_to_next_page(0, set_index_nav_button);
  11977.         handle_image_preload();
  11978.         return false
  11979.     };
  11980.     var previous_page = function (delta_x) {
  11981.         if (!can_page_move(false)) {
  11982.             return false
  11983.         }
  11984.         index_panel.move_to_prev_page(0, set_index_nav_button);
  11985.         handle_image_preload();
  11986.         return false
  11987.     };
  11988.     var next_image = function (delta_x) {
  11989.         if (!can_image_move(true)) {
  11990.             return false
  11991.         }
  11992.         detail_panel.move_2_next_photo(delta_x, overlay_visible);
  11993.         return false
  11994.     };
  11995.     var previous_image = function (delta_x) {
  11996.         if (!can_image_move(false)) {
  11997.             return false
  11998.         }
  11999.         detail_panel.move_2_previous_photo(delta_x, overlay_visible);
  12000.         return false
  12001.     };
  12002.     var open_url = function () {
  12003.         var curntImage = detail_panel.get_current_photo();
  12004.         if (config.useflickr) {
  12005.             if (curntImage.imageFullURL) {
  12006.                 window.open(curntImage.imageFullURL);
  12007.                 return false
  12008.             }
  12009.         }
  12010.         if (curntImage.linkURL) {
  12011.             window.open(curntImage.linkURL)
  12012.         } else {
  12013.             window.open(curntImage.imageURL)
  12014.         }
  12015.         return false
  12016.     };
  12017.     var get_current_gallery_html = function () {
  12018.         var glrhtml = _("").html();
  12019.         _("").html("").hide();
  12020.         return glrhtml
  12021.     };
  12022.     var scroll_bar_compensition = function () {
  12023.         var scroll = utils.is_page_scrolling();
  12024.         return {
  12025.             h: scroll.v_scrolling ? 21 : 0,
  12026.             v: scroll.h_scrolling ? 21 : 0
  12027.         }
  12028.     };
  12029.     var full_screen = function () {
  12030.         if (!fullScreenPersistor.is_full_screen) {
  12031.             if ($.browser.msie) {
  12032.                 window.scroll(0, 0)
  12033.             }
  12034.             var vpc = utils.get_viewport_meta_content();
  12035.             if (add_view_port_meta_after_switching) {
  12036.                 utils.set_viewport_meta(true)
  12037.             }
  12038.             var param = $.extend({}, config);
  12039.             param.containerid = dialog.get_id();
  12040.             param.gallerywidth = "100%";
  12041.             param.galleryheight = "100%";
  12042.             param.fullscreen_displaying_mode = true;
  12043.             param.parent_gallery = juicebox_instances[instance_id];
  12044.             param.initial_body_css_inline_style = $("body").attr("style");
  12045.             param.persistor_param = {};
  12046.             param.persistor_param.viewportContent = vpc;
  12047.             var win = $(window);
  12048.             param.persistor_param.max_side_length = Math.max(win.width(), win.height());
  12049.             param.persistor_param.restore_viewport = function (vpv) {
  12050.                 utils.set_viewport_value(vpv)
  12051.             };
  12052.             param.persistor_param.current_image_index = detail_panel.get_photo_position();
  12053.             param.persistor_param.restore_image = show_main_image;
  12054.             param.persistor_param.restore_index = show_thumbnails;
  12055.             param.persistor_param.splash_is_set = splash_is_set;
  12056.             param.persistor_param.gallery_manager = gallery_manager;
  12057.             $("body").css({
  12058.                 overflow: "hidden"
  12059.             });
  12060.             if (config.backgroundopacity === 1 || config.backgroundopacity === "1" || (typeof (config.backgroundopacity) === "string" && config.backgroundopacity.indexOf("filter") === 0 && config.backgroundopacity.indexOf("100") > 0)) {
  12061.                 dialog.show_dialog(true)
  12062.             } else {
  12063.                 param.persistor_param.restore_zindex = function () {
  12064.                     _("").show();
  12065.                     _("").focus()
  12066.                 };
  12067.                 _("").hide();
  12068.                 dialog.show_dialog(false)
  12069.             }
  12070.             new juicebox(param)
  12071.         } else {
  12072.             var win = $(window);
  12073.             if (utils.need_viewport_meta()) {
  12074.                 if (fullScreenPersistor.parent_gallery_param.viewportContent) {
  12075.                     utils.set_viewport_meta_content(fullScreenPersistor.parent_gallery_param.viewportContent)
  12076.                 } else {
  12077.                     if (utils.is_android() && utils.get_android_ver() >= 4) {
  12078.                         fullScreenPersistor.parent_gallery_param.restore_viewport(320)
  12079.                     } else {
  12080.                         if (utils.is_iphone()) {
  12081.                             fullScreenPersistor.parent_gallery_param.restore_viewport(0.4)
  12082.                         } else {
  12083.                             if (utils.is_ipad()) {} else {
  12084.                                 fullScreenPersistor.parent_gallery_param.restore_viewport(160 * fullScreenPersistor.parent_gallery_param.max_side_length / Math.max(win.width(), win.height()))
  12085.                             }
  12086.                         }
  12087.                     }
  12088.                 }
  12089.             }
  12090.             if (!fullScreenPersistor.parent_gallery_param.splash_is_set()) {
  12091.                 var curntImgIdx = detail_panel.get_photo_position();
  12092.                 if (is_detail_visible) {
  12093.                     fullScreenPersistor.parent_gallery_param.restore_image(curntImgIdx)
  12094.                 }
  12095.                 if (is_index_visible) {
  12096.                     fullScreenPersistor.parent_gallery_param.restore_index(curntImgIdx)
  12097.                 }
  12098.             }
  12099.             $("body").attr("style", fullScreenPersistor.initial_body_css_inline_style);
  12100.             if (fullScreenPersistor.parent_gallery_param.restore_zindex) {
  12101.                 fullScreenPersistor.parent_gallery_param.restore_zindex()
  12102.             }
  12103.             dialog.cleanup_dialog();
  12104.             if (!splash_is_set()) {
  12105.                 fullScreenPersistor.parent_gallery.restore()
  12106.             }
  12107.         }
  12108.         return false
  12109.     };
  12110.     var debug_info = function () {
  12111.         var win = $(window);
  12112.         _(".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({
  12113.             color: "white",
  12114.             "font-size": "20px"
  12115.         })
  12116.     };
  12117.     var debug_info2 = function (v1, v2, v3) {
  12118.         var win = $(window);
  12119.         _(".jb-navigation").html("timestamp = " + ((new Date()).valueOf() + "").substring(9) + "<br/>v1 = " + v1 + "<br/>v2 = " + v2 + "<br/>v3 = " + v3).css({
  12120.             color: "white",
  12121.             "font-size": "20px"
  12122.         })
  12123.     };
  12124.     var debug_message = function (msg) {
  12125.         _(".jb-navigation").html(msg).css({
  12126.             color: "white",
  12127.             "font-size": "20px"
  12128.         })
  12129.     };
  12130.     var basicMethods = {
  12131.         debug: function (script) {
  12132.             eval(script)
  12133.         },
  12134.         restore: function () {
  12135.             if (splash_is_set()) {
  12136.                 return
  12137.             }
  12138.             repaint(true)
  12139.         }
  12140.     };
  12141.     var proMethods = config_manager.isp ? {
  12142.         showGallery: function (show) {
  12143.             show ? _("").show() : _("").hide()
  12144.         },
  12145.         setGallerySize: function (width, height) {
  12146.             if (fullScreenPersistor.is_full_screen) {
  12147.                 return
  12148.             }
  12149.             var container = $("#" + config.containerid);
  12150.             if (container.length <= 0) {
  12151.                 return
  12152.             }
  12153.             var w = parseInt(width) + "px";
  12154.             var h = parseInt(height) + "px";
  12155.             is_full_screen_mode = false;
  12156.             config.gallerywidth = w;
  12157.             config.galleryheight = h;
  12158.             container.css({
  12159.                 height: h,
  12160.                 width: w
  12161.             });
  12162.             _("").height(h);
  12163.             repaint(true)
  12164.         },
  12165.         showImage: function (index) {
  12166.             var glrylen = gallery_manager.length();
  12167.             if (index < 0 || index >= glrylen) {
  12168.                 return
  12169.             }
  12170.             show_main_image(index)
  12171.         },
  12172.         showNextImage: next_image,
  12173.         showPreviousImage: previous_image,
  12174.         showIndexByImage: show_thumbnails,
  12175.         toggleAutoPlay: toggle_autoplay,
  12176.         toggleThumbs: index_button_clicked,
  12177.         toggleAudio: toggle_audio_play,
  12178.         toggleExpand: full_screen,
  12179.         openImageLink: open_url,
  12180.         showThumbPage: function (index) {
  12181.             index_panel.show_page_by_page_index(index)
  12182.         },
  12183.         getImageInfo: function (index) {
  12184.             var glrylen = gallery_manager.length();
  12185.             if (index < 0 || index >= glrylen) {
  12186.                 return null
  12187.             }
  12188.             var img = gallery_manager.get_image(index);
  12189.             return {
  12190.                 id: img.position,
  12191.                 imageURL: img.imageURL,
  12192.                 thumbURL: img.thumbURL,
  12193.                 caption: img.caption,
  12194.                 title: img.title,
  12195.                 linkURL: img.linkURL,
  12196.                 linkTarget: img.linkTarget
  12197.             }
  12198.         },
  12199.         getImageCount: function () {
  12200.             return gallery_manager.length()
  12201.         },
  12202.         getThumbPageIndex: function () {
  12203.             return index_panel.get_index()
  12204.         },
  12205.         getImageIndex: function () {
  12206.             return detail_panel.get_current_photo().position
  12207.         }
  12208.     } : {};
  12209.     juicebox_instances[instance_id] = $.extend(basicMethods, proMethods);
  12210.     return juicebox_instances[instance_id]
  12211. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement