Advertisement
Guest User

jQuery

a guest
Jul 7th, 2015
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function(global, factory) {
  2.     if (typeof module === "object" && typeof module.exports === "object") {
  3.         module.exports = global.document ? factory(global, true) : function(w) {
  4.             if (!w.document) {
  5.                 throw new Error("jQuery requires a window with a document");
  6.             }
  7.             return factory(w);
  8.         };
  9.     } else {
  10.         factory(global);
  11.     }
  12. }(typeof window !== "undefined" ? window : this, function(window, noGlobal) {
  13.     var arr = [];
  14.     var slice = arr.slice;
  15.     var concat = arr.concat;
  16.     var push = arr.push;
  17.     var indexOf = arr.indexOf;
  18.     var class2type = {};
  19.     var toString = class2type.toString;
  20.     var hasOwn = class2type.hasOwnProperty;
  21.     var support = {};
  22.     var
  23.         document = window.document,
  24.         version = "2.1.4",
  25.         jQuery = function(selector, context) {
  26.             return new jQuery.fn.init(selector, context);
  27.         },
  28.         rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
  29.         rmsPrefix = /^-ms-/,
  30.         rdashAlpha = /-([\da-z])/gi,
  31.         fcamelCase = function(all, letter) {
  32.             return letter.toUpperCase();
  33.         };
  34.     jQuery.fn = jQuery.prototype = {
  35.         jquery: version,
  36.         constructor: jQuery,
  37.         selector: "",
  38.         length: 0,
  39.         toArray: function() {
  40.             return slice.call(this);
  41.         },
  42.         get: function(num) {
  43.             return num != null ? (num < 0 ? this[num + this.length] : this[num]) : slice.call(this);
  44.         },
  45.         pushStack: function(elems) {
  46.             var ret = jQuery.merge(this.constructor(), elems);
  47.             ret.prevObject = this;
  48.             ret.context = this.context;
  49.             return ret;
  50.         },
  51.         each: function(callback, args) {
  52.             return jQuery.each(this, callback, args);
  53.         },
  54.         map: function(callback) {
  55.             return this.pushStack(jQuery.map(this, function(elem, i) {
  56.                 return callback.call(elem, i, elem);
  57.             }));
  58.         },
  59.         slice: function() {
  60.             return this.pushStack(slice.apply(this, arguments));
  61.         },
  62.         first: function() {
  63.             return this.eq(0);
  64.         },
  65.         last: function() {
  66.             return this.eq(-1);
  67.         },
  68.         eq: function(i) {
  69.             var len = this.length,
  70.                 j = +i + (i < 0 ? len : 0);
  71.             return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
  72.         },
  73.         end: function() {
  74.             return this.prevObject || this.constructor(null);
  75.         },
  76.         push: push,
  77.         sort: arr.sort,
  78.         splice: arr.splice
  79.     };
  80.     jQuery.extend = jQuery.fn.extend = function() {
  81.         var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {},
  82.             i = 1,
  83.             length = arguments.length,
  84.             deep = false;
  85.         if (typeof target === "boolean") {
  86.             deep = target;
  87.             target = arguments[i] || {};
  88.             i++;
  89.         }
  90.         if (typeof target !== "object" && !jQuery.isFunction(target)) {
  91.             target = {};
  92.         }
  93.         if (i === length) {
  94.             target = this;
  95.             i--;
  96.         }
  97.         for (; i < length; i++) {
  98.             if ((options = arguments[i]) != null) {
  99.                 for (name in options) {
  100.                     src = target[name];
  101.                     copy = options[name];
  102.                     if (target === copy) {
  103.                         continue;
  104.                     }
  105.                     if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {
  106.                         if (copyIsArray) {
  107.                             copyIsArray = false;
  108.                             clone = src && jQuery.isArray(src) ? src : [];
  109.                         } else {
  110.                             clone = src && jQuery.isPlainObject(src) ? src : {};
  111.                         }
  112.                         target[name] = jQuery.extend(deep, clone, copy);
  113.                     } else if (copy !== undefined) {
  114.                         target[name] = copy;
  115.                     }
  116.                 }
  117.             }
  118.         }
  119.         return target;
  120.     };
  121.     jQuery.extend({
  122.         expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
  123.         isReady: true,
  124.         error: function(msg) {
  125.             throw new Error(msg);
  126.         },
  127.         noop: function() {},
  128.         isFunction: function(obj) {
  129.             return jQuery.type(obj) === "function";
  130.         },
  131.         isArray: Array.isArray,
  132.         isWindow: function(obj) {
  133.             return obj != null && obj === obj.window;
  134.         },
  135.         isNumeric: function(obj) {
  136.             return !jQuery.isArray(obj) && (obj - parseFloat(obj) + 1) >= 0;
  137.         },
  138.         isPlainObject: function(obj) {
  139.             if (jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
  140.                 return false;
  141.             }
  142.             if (obj.constructor && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
  143.                 return false;
  144.             }
  145.             return true;
  146.         },
  147.         isEmptyObject: function(obj) {
  148.             var name;
  149.             for (name in obj) {
  150.                 return false;
  151.             }
  152.             return true;
  153.         },
  154.         type: function(obj) {
  155.             if (obj == null) {
  156.                 return obj + "";
  157.             }
  158.             return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
  159.         },
  160.         globalEval: function(code) {
  161.             var script, indirect = eval;
  162.             code = jQuery.trim(code);
  163.             if (code) {
  164.                 if (code.indexOf("use strict") === 1) {
  165.                     script = document.createElement("script");
  166.                     script.text = code;
  167.                     document.head.appendChild(script).parentNode.removeChild(script);
  168.                 } else {
  169.                     indirect(code);
  170.                 }
  171.             }
  172.         },
  173.         camelCase: function(string) {
  174.             return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
  175.         },
  176.         nodeName: function(elem, name) {
  177.             return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
  178.         },
  179.         each: function(obj, callback, args) {
  180.             var value, i = 0,
  181.                 length = obj.length,
  182.                 isArray = isArraylike(obj);
  183.             if (args) {
  184.                 if (isArray) {
  185.                     for (; i < length; i++) {
  186.                         value = callback.apply(obj[i], args);
  187.                         if (value === false) {
  188.                             break;
  189.                         }
  190.                     }
  191.                 } else {
  192.                     for (i in obj) {
  193.                         value = callback.apply(obj[i], args);
  194.                         if (value === false) {
  195.                             break;
  196.                         }
  197.                     }
  198.                 }
  199.             } else {
  200.                 if (isArray) {
  201.                     for (; i < length; i++) {
  202.                         value = callback.call(obj[i], i, obj[i]);
  203.                         if (value === false) {
  204.                             break;
  205.                         }
  206.                     }
  207.                 } else {
  208.                     for (i in obj) {
  209.                         value = callback.call(obj[i], i, obj[i]);
  210.                         if (value === false) {
  211.                             break;
  212.                         }
  213.                     }
  214.                 }
  215.             }
  216.             return obj;
  217.         },
  218.         trim: function(text) {
  219.             return text == null ? "" : (text + "").replace(rtrim, "");
  220.         },
  221.         makeArray: function(arr, results) {
  222.             var ret = results || [];
  223.             if (arr != null) {
  224.                 if (isArraylike(Object(arr))) {
  225.                     jQuery.merge(ret, typeof arr === "string" ? [arr] : arr);
  226.                 } else {
  227.                     push.call(ret, arr);
  228.                 }
  229.             }
  230.             return ret;
  231.         },
  232.         inArray: function(elem, arr, i) {
  233.             return arr == null ? -1 : indexOf.call(arr, elem, i);
  234.         },
  235.         merge: function(first, second) {
  236.             var len = +second.length,
  237.                 j = 0,
  238.                 i = first.length;
  239.             for (; j < len; j++) {
  240.                 first[i++] = second[j];
  241.             }
  242.             first.length = i;
  243.             return first;
  244.         },
  245.         grep: function(elems, callback, invert) {
  246.             var callbackInverse, matches = [],
  247.                 i = 0,
  248.                 length = elems.length,
  249.                 callbackExpect = !invert;
  250.             for (; i < length; i++) {
  251.                 callbackInverse = !callback(elems[i], i);
  252.                 if (callbackInverse !== callbackExpect) {
  253.                     matches.push(elems[i]);
  254.                 }
  255.             }
  256.             return matches;
  257.         },
  258.         map: function(elems, callback, arg) {
  259.             var value, i = 0,
  260.                 length = elems.length,
  261.                 isArray = isArraylike(elems),
  262.                 ret = [];
  263.             if (isArray) {
  264.                 for (; i < length; i++) {
  265.                     value = callback(elems[i], i, arg);
  266.                     if (value != null) {
  267.                         ret.push(value);
  268.                     }
  269.                 }
  270.             } else {
  271.                 for (i in elems) {
  272.                     value = callback(elems[i], i, arg);
  273.                     if (value != null) {
  274.                         ret.push(value);
  275.                     }
  276.                 }
  277.             }
  278.             return concat.apply([], ret);
  279.         },
  280.         guid: 1,
  281.         proxy: function(fn, context) {
  282.             var tmp, args, proxy;
  283.             if (typeof context === "string") {
  284.                 tmp = fn[context];
  285.                 context = fn;
  286.                 fn = tmp;
  287.             }
  288.             if (!jQuery.isFunction(fn)) {
  289.                 return undefined;
  290.             }
  291.             args = slice.call(arguments, 2);
  292.             proxy = function() {
  293.                 return fn.apply(context || this, args.concat(slice.call(arguments)));
  294.             };
  295.             proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  296.             return proxy;
  297.         },
  298.         now: Date.now,
  299.         support: support
  300.     });
  301.     jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
  302.         class2type["[object " + name + "]"] = name.toLowerCase();
  303.     });
  304.  
  305.     function isArraylike(obj) {
  306.         var length = "length" in obj && obj.length,
  307.             type = jQuery.type(obj);
  308.         if (type === "function" || jQuery.isWindow(obj)) {
  309.             return false;
  310.         }
  311.         if (obj.nodeType === 1 && length) {
  312.             return true;
  313.         }
  314.         return type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj;
  315.     }
  316.     var Sizzle = (function(window) {
  317.         var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, expando = "sizzle" + 1 * new Date(),
  318.             preferredDoc = window.document,
  319.             dirruns = 0,
  320.             done = 0,
  321.             classCache = createCache(),
  322.             tokenCache = createCache(),
  323.             compilerCache = createCache(),
  324.             sortOrder = function(a, b) {
  325.                 if (a === b) {
  326.                     hasDuplicate = true;
  327.                 }
  328.                 return 0;
  329.             },
  330.             MAX_NEGATIVE = 1 << 31,
  331.             hasOwn = ({}).hasOwnProperty,
  332.             arr = [],
  333.             pop = arr.pop,
  334.             push_native = arr.push,
  335.             push = arr.push,
  336.             slice = arr.slice,
  337.             indexOf = function(list, elem) {
  338.                 var i = 0,
  339.                     len = list.length;
  340.                 for (; i < len; i++) {
  341.                     if (list[i] === elem) {
  342.                         return i;
  343.                     }
  344.                 }
  345.                 return -1;
  346.             },
  347.             booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  348.             whitespace = "[\\x20\\t\\r\\n\\f]",
  349.             characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  350.             identifier = characterEncoding.replace("w", "w#"),
  351.             attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + "*([*^$|!~]?=)" + whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]",
  352.             pseudos = ":(" + characterEncoding + ")(?:\\((" + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + ".*" + ")\\)|)",
  353.             rwhitespace = new RegExp(whitespace + "+", "g"),
  354.             rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
  355.             rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
  356.             rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
  357.             rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"),
  358.             rpseudo = new RegExp(pseudos),
  359.             ridentifier = new RegExp("^" + identifier + "$"),
  360.             matchExpr = {
  361.                 "ID": new RegExp("^#(" + characterEncoding + ")"),
  362.                 "CLASS": new RegExp("^\\.(" + characterEncoding + ")"),
  363.                 "TAG": new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"),
  364.                 "ATTR": new RegExp("^" + attributes),
  365.                 "PSEUDO": new RegExp("^" + pseudos),
  366.                 "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
  367.                 "bool": new RegExp("^(?:" + booleans + ")$", "i"),
  368.                 "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
  369.             },
  370.             rinputs = /^(?:input|select|textarea|button)$/i,
  371.             rheader = /^h\d$/i,
  372.             rnative = /^[^{]+\{\s*\[native \w/,
  373.             rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  374.             rsibling = /[+~]/,
  375.             rescape = /'|\\/g,
  376.             runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
  377.             funescape = function(_, escaped, escapedWhitespace) {
  378.                 var high = "0x" + escaped - 0x10000;
  379.                 return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
  380.             },
  381.             unloadHandler = function() {
  382.                 setDocument();
  383.             };
  384.         try {
  385.             push.apply((arr = slice.call(preferredDoc.childNodes)), preferredDoc.childNodes);
  386.             arr[preferredDoc.childNodes.length].nodeType;
  387.         } catch (e) {
  388.             push = {
  389.                 apply: arr.length ? function(target, els) {
  390.                     push_native.apply(target, slice.call(els));
  391.                 } : function(target, els) {
  392.                     var j = target.length,
  393.                         i = 0;
  394.                     while ((target[j++] = els[i++])) {}
  395.                     target.length = j - 1;
  396.                 }
  397.             };
  398.         }
  399.  
  400.         function Sizzle(selector, context, results, seed) {
  401.             var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
  402.             if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
  403.                 setDocument(context);
  404.             }
  405.             context = context || document;
  406.             results = results || [];
  407.             nodeType = context.nodeType;
  408.             if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
  409.                 return results;
  410.             }
  411.             if (!seed && documentIsHTML) {
  412.                 if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
  413.                     if ((m = match[1])) {
  414.                         if (nodeType === 9) {
  415.                             elem = context.getElementById(m);
  416.                             if (elem && elem.parentNode) {
  417.                                 if (elem.id === m) {
  418.                                     results.push(elem);
  419.                                     return results;
  420.                                 }
  421.                             } else {
  422.                                 return results;
  423.                             }
  424.                         } else {
  425.                             if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) {
  426.                                 results.push(elem);
  427.                                 return results;
  428.                             }
  429.                         }
  430.                     } else if (match[2]) {
  431.                         push.apply(results, context.getElementsByTagName(selector));
  432.                         return results;
  433.                     } else if ((m = match[3]) && support.getElementsByClassName) {
  434.                         push.apply(results, context.getElementsByClassName(m));
  435.                         return results;
  436.                     }
  437.                 }
  438.                 if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
  439.                     nid = old = expando;
  440.                     newContext = context;
  441.                     newSelector = nodeType !== 1 && selector;
  442.                     if (nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
  443.                         groups = tokenize(selector);
  444.                         if ((old = context.getAttribute("id"))) {
  445.                             nid = old.replace(rescape, "\\$&");
  446.                         } else {
  447.                             context.setAttribute("id", nid);
  448.                         }
  449.                         nid = "[id='" + nid + "'] ";
  450.                         i = groups.length;
  451.                         while (i--) {
  452.                             groups[i] = nid + toSelector(groups[i]);
  453.                         }
  454.                         newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
  455.                         newSelector = groups.join(",");
  456.                     }
  457.                     if (newSelector) {
  458.                         try {
  459.                             push.apply(results, newContext.querySelectorAll(newSelector));
  460.                             return results;
  461.                         } catch (qsaError) {} finally {
  462.                             if (!old) {
  463.                                 context.removeAttribute("id");
  464.                             }
  465.                         }
  466.                     }
  467.                 }
  468.             }
  469.             return select(selector.replace(rtrim, "$1"), context, results, seed);
  470.         }
  471.  
  472.         function createCache() {
  473.             var keys = [];
  474.  
  475.             function cache(key, value) {
  476.                 if (keys.push(key + " ") > Expr.cacheLength) {
  477.                     delete cache[keys.shift()];
  478.                 }
  479.                 return (cache[key + " "] = value);
  480.             }
  481.             return cache;
  482.         }
  483.  
  484.         function markFunction(fn) {
  485.             fn[expando] = true;
  486.             return fn;
  487.         }
  488.  
  489.         function assert(fn) {
  490.             var div = document.createElement("div");
  491.             try {
  492.                 return !!fn(div);
  493.             } catch (e) {
  494.                 return false;
  495.             } finally {
  496.                 if (div.parentNode) {
  497.                     div.parentNode.removeChild(div);
  498.                 }
  499.                 div = null;
  500.             }
  501.         }
  502.  
  503.         function addHandle(attrs, handler) {
  504.             var arr = attrs.split("|"),
  505.                 i = attrs.length;
  506.             while (i--) {
  507.                 Expr.attrHandle[arr[i]] = handler;
  508.             }
  509.         }
  510.  
  511.         function siblingCheck(a, b) {
  512.             var cur = b && a,
  513.                 diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
  514.             if (diff) {
  515.                 return diff;
  516.             }
  517.             if (cur) {
  518.                 while ((cur = cur.nextSibling)) {
  519.                     if (cur === b) {
  520.                         return -1;
  521.                     }
  522.                 }
  523.             }
  524.             return a ? 1 : -1;
  525.         }
  526.  
  527.         function createInputPseudo(type) {
  528.             return function(elem) {
  529.                 var name = elem.nodeName.toLowerCase();
  530.                 return name === "input" && elem.type === type;
  531.             };
  532.         }
  533.  
  534.         function createButtonPseudo(type) {
  535.             return function(elem) {
  536.                 var name = elem.nodeName.toLowerCase();
  537.                 return (name === "input" || name === "button") && elem.type === type;
  538.             };
  539.         }
  540.  
  541.         function createPositionalPseudo(fn) {
  542.             return markFunction(function(argument) {
  543.                 argument = +argument;
  544.                 return markFunction(function(seed, matches) {
  545.                     var j, matchIndexes = fn([], seed.length, argument),
  546.                         i = matchIndexes.length;
  547.                     while (i--) {
  548.                         if (seed[(j = matchIndexes[i])]) {
  549.                             seed[j] = !(matches[j] = seed[j]);
  550.                         }
  551.                     }
  552.                 });
  553.             });
  554.         }
  555.  
  556.         function testContext(context) {
  557.             return context && typeof context.getElementsByTagName !== "undefined" && context;
  558.         }
  559.         support = Sizzle.support = {};
  560.         isXML = Sizzle.isXML = function(elem) {
  561.             var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  562.             return documentElement ? documentElement.nodeName !== "HTML" : false;
  563.         };
  564.         setDocument = Sizzle.setDocument = function(node) {
  565.             var hasCompare, parent, doc = node ? node.ownerDocument || node : preferredDoc;
  566.             if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
  567.                 return document;
  568.             }
  569.             document = doc;
  570.             docElem = doc.documentElement;
  571.             parent = doc.defaultView;
  572.             if (parent && parent !== parent.top) {
  573.                 if (parent.addEventListener) {
  574.                     parent.addEventListener("unload", unloadHandler, false);
  575.                 } else if (parent.attachEvent) {
  576.                     parent.attachEvent("onunload", unloadHandler);
  577.                 }
  578.             }
  579.             documentIsHTML = !isXML(doc);
  580.             support.attributes = assert(function(div) {
  581.                 div.className = "i";
  582.                 return !div.getAttribute("className");
  583.             });
  584.             support.getElementsByTagName = assert(function(div) {
  585.                 div.appendChild(doc.createComment(""));
  586.                 return !div.getElementsByTagName("*").length;
  587.             });
  588.             support.getElementsByClassName = rnative.test(doc.getElementsByClassName);
  589.             support.getById = assert(function(div) {
  590.                 docElem.appendChild(div).id = expando;
  591.                 return !doc.getElementsByName || !doc.getElementsByName(expando).length;
  592.             });
  593.             if (support.getById) {
  594.                 Expr.find["ID"] = function(id, context) {
  595.                     if (typeof context.getElementById !== "undefined" && documentIsHTML) {
  596.                         var m = context.getElementById(id);
  597.                         return m && m.parentNode ? [m] : [];
  598.                     }
  599.                 };
  600.                 Expr.filter["ID"] = function(id) {
  601.                     var attrId = id.replace(runescape, funescape);
  602.                     return function(elem) {
  603.                         return elem.getAttribute("id") === attrId;
  604.                     };
  605.                 };
  606.             } else {
  607.                 delete Expr.find["ID"];
  608.                 Expr.filter["ID"] = function(id) {
  609.                     var attrId = id.replace(runescape, funescape);
  610.                     return function(elem) {
  611.                         var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
  612.                         return node && node.value === attrId;
  613.                     };
  614.                 };
  615.             }
  616.             Expr.find["TAG"] = support.getElementsByTagName ? function(tag, context) {
  617.                 if (typeof context.getElementsByTagName !== "undefined") {
  618.                     return context.getElementsByTagName(tag);
  619.                 } else if (support.qsa) {
  620.                     return context.querySelectorAll(tag);
  621.                 }
  622.             } : function(tag, context) {
  623.                 var elem, tmp = [],
  624.                     i = 0,
  625.                     results = context.getElementsByTagName(tag);
  626.                 if (tag === "*") {
  627.                     while ((elem = results[i++])) {
  628.                         if (elem.nodeType === 1) {
  629.                             tmp.push(elem);
  630.                         }
  631.                     }
  632.                     return tmp;
  633.                 }
  634.                 return results;
  635.             };
  636.             Expr.find["CLASS"] = support.getElementsByClassName && function(className, context) {
  637.                 if (documentIsHTML) {
  638.                     return context.getElementsByClassName(className);
  639.                 }
  640.             };
  641.             rbuggyMatches = [];
  642.             rbuggyQSA = [];
  643.             if ((support.qsa = rnative.test(doc.querySelectorAll))) {
  644.                 assert(function(div) {
  645.                     docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\f]' msallowcapture=''>" + "<option selected=''></option></select>";
  646.                     if (div.querySelectorAll("[msallowcapture^='']").length) {
  647.                         rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
  648.                     }
  649.                     if (!div.querySelectorAll("[selected]").length) {
  650.                         rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
  651.                     }
  652.                     if (!div.querySelectorAll("[id~=" + expando + "-]").length) {
  653.                         rbuggyQSA.push("~=");
  654.                     }
  655.                     if (!div.querySelectorAll(":checked").length) {
  656.                         rbuggyQSA.push(":checked");
  657.                     }
  658.                     if (!div.querySelectorAll("a#" + expando + "+*").length) {
  659.                         rbuggyQSA.push(".#.+[+~]");
  660.                     }
  661.                 });
  662.                 assert(function(div) {
  663.                     var input = doc.createElement("input");
  664.                     input.setAttribute("type", "hidden");
  665.                     div.appendChild(input).setAttribute("name", "D");
  666.                     if (div.querySelectorAll("[name=d]").length) {
  667.                         rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
  668.                     }
  669.                     if (!div.querySelectorAll(":enabled").length) {
  670.                         rbuggyQSA.push(":enabled", ":disabled");
  671.                     }
  672.                     div.querySelectorAll("*,:x");
  673.                     rbuggyQSA.push(",.*:");
  674.                 });
  675.             }
  676.             if ((support.matchesSelector = rnative.test((matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)))) {
  677.                 assert(function(div) {
  678.                     support.disconnectedMatch = matches.call(div, "div");
  679.                     matches.call(div, "[s!='']:x");
  680.                     rbuggyMatches.push("!=", pseudos);
  681.                 });
  682.             }
  683.             rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
  684.             rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
  685.             hasCompare = rnative.test(docElem.compareDocumentPosition);
  686.             contains = hasCompare || rnative.test(docElem.contains) ? function(a, b) {
  687.                 var adown = a.nodeType === 9 ? a.documentElement : a,
  688.                     bup = b && b.parentNode;
  689.                 return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
  690.             } : function(a, b) {
  691.                 if (b) {
  692.                     while ((b = b.parentNode)) {
  693.                         if (b === a) {
  694.                             return true;
  695.                         }
  696.                     }
  697.                 }
  698.                 return false;
  699.             };
  700.             sortOrder = hasCompare ? function(a, b) {
  701.                 if (a === b) {
  702.                     hasDuplicate = true;
  703.                     return 0;
  704.                 }
  705.                 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  706.                 if (compare) {
  707.                     return compare;
  708.                 }
  709.                 compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
  710.                 if (compare & 1 || (!support.sortDetached && b.compareDocumentPosition(a) === compare)) {
  711.                     if (a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
  712.                         return -1;
  713.                     }
  714.                     if (b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
  715.                         return 1;
  716.                     }
  717.                     return sortInput ? (indexOf(sortInput, a) - indexOf(sortInput, b)) : 0;
  718.                 }
  719.                 return compare & 4 ? -1 : 1;
  720.             } : function(a, b) {
  721.                 if (a === b) {
  722.                     hasDuplicate = true;
  723.                     return 0;
  724.                 }
  725.                 var cur, i = 0,
  726.                     aup = a.parentNode,
  727.                     bup = b.parentNode,
  728.                     ap = [a],
  729.                     bp = [b];
  730.                 if (!aup || !bup) {
  731.                     return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? (indexOf(sortInput, a) - indexOf(sortInput, b)) : 0;
  732.                 } else if (aup === bup) {
  733.                     return siblingCheck(a, b);
  734.                 }
  735.                 cur = a;
  736.                 while ((cur = cur.parentNode)) {
  737.                     ap.unshift(cur);
  738.                 }
  739.                 cur = b;
  740.                 while ((cur = cur.parentNode)) {
  741.                     bp.unshift(cur);
  742.                 }
  743.                 while (ap[i] === bp[i]) {
  744.                     i++;
  745.                 }
  746.                 return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
  747.             };
  748.             return doc;
  749.         };
  750.         Sizzle.matches = function(expr, elements) {
  751.             return Sizzle(expr, null, null, elements);
  752.         };
  753.         Sizzle.matchesSelector = function(elem, expr) {
  754.             if ((elem.ownerDocument || elem) !== document) {
  755.                 setDocument(elem);
  756.             }
  757.             expr = expr.replace(rattributeQuotes, "='$1']");
  758.             if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
  759.                 try {
  760.                     var ret = matches.call(elem, expr);
  761.                     if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
  762.                         return ret;
  763.                     }
  764.                 } catch (e) {}
  765.             }
  766.             return Sizzle(expr, document, null, [elem]).length > 0;
  767.         };
  768.         Sizzle.contains = function(context, elem) {
  769.             if ((context.ownerDocument || context) !== document) {
  770.                 setDocument(context);
  771.             }
  772.             return contains(context, elem);
  773.         };
  774.         Sizzle.attr = function(elem, name) {
  775.             if ((elem.ownerDocument || elem) !== document) {
  776.                 setDocument(elem);
  777.             }
  778.             var fn = Expr.attrHandle[name.toLowerCase()],
  779.                 val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
  780.             return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
  781.         };
  782.         Sizzle.error = function(msg) {
  783.             throw new Error("Syntax error, unrecognized expression: " + msg);
  784.         };
  785.         Sizzle.uniqueSort = function(results) {
  786.             var elem, duplicates = [],
  787.                 j = 0,
  788.                 i = 0;
  789.             hasDuplicate = !support.detectDuplicates;
  790.             sortInput = !support.sortStable && results.slice(0);
  791.             results.sort(sortOrder);
  792.             if (hasDuplicate) {
  793.                 while ((elem = results[i++])) {
  794.                     if (elem === results[i]) {
  795.                         j = duplicates.push(i);
  796.                     }
  797.                 }
  798.                 while (j--) {
  799.                     results.splice(duplicates[j], 1);
  800.                 }
  801.             }
  802.             sortInput = null;
  803.             return results;
  804.         };
  805.         getText = Sizzle.getText = function(elem) {
  806.             var node, ret = "",
  807.                 i = 0,
  808.                 nodeType = elem.nodeType;
  809.             if (!nodeType) {
  810.                 while ((node = elem[i++])) {
  811.                     ret += getText(node);
  812.                 }
  813.             } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
  814.                 if (typeof elem.textContent === "string") {
  815.                     return elem.textContent;
  816.                 } else {
  817.                     for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  818.                         ret += getText(elem);
  819.                     }
  820.                 }
  821.             } else if (nodeType === 3 || nodeType === 4) {
  822.                 return elem.nodeValue;
  823.             }
  824.             return ret;
  825.         };
  826.         Expr = Sizzle.selectors = {
  827.             cacheLength: 50,
  828.             createPseudo: markFunction,
  829.             match: matchExpr,
  830.             attrHandle: {},
  831.             find: {},
  832.             relative: {
  833.                 ">": {
  834.                     dir: "parentNode",
  835.                     first: true
  836.                 },
  837.                 " ": {
  838.                     dir: "parentNode"
  839.                 },
  840.                 "+": {
  841.                     dir: "previousSibling",
  842.                     first: true
  843.                 },
  844.                 "~": {
  845.                     dir: "previousSibling"
  846.                 }
  847.             },
  848.             preFilter: {
  849.                 "ATTR": function(match) {
  850.                     match[1] = match[1].replace(runescape, funescape);
  851.                     match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
  852.                     if (match[2] === "~=") {
  853.                         match[3] = " " + match[3] + " ";
  854.                     }
  855.                     return match.slice(0, 4);
  856.                 },
  857.                 "CHILD": function(match) {
  858.                     match[1] = match[1].toLowerCase();
  859.                     if (match[1].slice(0, 3) === "nth") {
  860.                         if (!match[3]) {
  861.                             Sizzle.error(match[0]);
  862.                         }
  863.                         match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
  864.                         match[5] = +((match[7] + match[8]) || match[3] === "odd");
  865.                     } else if (match[3]) {
  866.                         Sizzle.error(match[0]);
  867.                     }
  868.                     return match;
  869.                 },
  870.                 "PSEUDO": function(match) {
  871.                     var excess, unquoted = !match[6] && match[2];
  872.                     if (matchExpr["CHILD"].test(match[0])) {
  873.                         return null;
  874.                     }
  875.                     if (match[3]) {
  876.                         match[2] = match[4] || match[5] || "";
  877.                     } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
  878.                         match[0] = match[0].slice(0, excess);
  879.                         match[2] = unquoted.slice(0, excess);
  880.                     }
  881.                     return match.slice(0, 3);
  882.                 }
  883.             },
  884.             filter: {
  885.                 "TAG": function(nodeNameSelector) {
  886.                     var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
  887.                     return nodeNameSelector === "*" ? function() {
  888.                         return true;
  889.                     } : function(elem) {
  890.                         return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
  891.                     };
  892.                 },
  893.                 "CLASS": function(className) {
  894.                     var pattern = classCache[className + " "];
  895.                     return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
  896.                         return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
  897.                     });
  898.                 },
  899.                 "ATTR": function(name, operator, check) {
  900.                     return function(elem) {
  901.                         var result = Sizzle.attr(elem, name);
  902.                         if (result == null) {
  903.                             return operator === "!=";
  904.                         }
  905.                         if (!operator) {
  906.                             return true;
  907.                         }
  908.                         result += "";
  909.                         return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false;
  910.                     };
  911.                 },
  912.                 "CHILD": function(type, what, argument, first, last) {
  913.                     var simple = type.slice(0, 3) !== "nth",
  914.                         forward = type.slice(-4) !== "last",
  915.                         ofType = what === "of-type";
  916.                     return first === 1 && last === 0 ? function(elem) {
  917.                         return !!elem.parentNode;
  918.                     } : function(elem, context, xml) {
  919.                         var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling",
  920.                             parent = elem.parentNode,
  921.                             name = ofType && elem.nodeName.toLowerCase(),
  922.                             useCache = !xml && !ofType;
  923.                         if (parent) {
  924.                             if (simple) {
  925.                                 while (dir) {
  926.                                     node = elem;
  927.                                     while ((node = node[dir])) {
  928.                                         if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
  929.                                             return false;
  930.                                         }
  931.                                     }
  932.                                     start = dir = type === "only" && !start && "nextSibling";
  933.                                 }
  934.                                 return true;
  935.                             }
  936.                             start = [forward ? parent.firstChild : parent.lastChild];
  937.                             if (forward && useCache) {
  938.                                 outerCache = parent[expando] || (parent[expando] = {});
  939.                                 cache = outerCache[type] || [];
  940.                                 nodeIndex = cache[0] === dirruns && cache[1];
  941.                                 diff = cache[0] === dirruns && cache[2];
  942.                                 node = nodeIndex && parent.childNodes[nodeIndex];
  943.                                 while ((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) {
  944.                                     if (node.nodeType === 1 && ++diff && node === elem) {
  945.                                         outerCache[type] = [dirruns, nodeIndex, diff];
  946.                                         break;
  947.                                     }
  948.                                 }
  949.                             } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
  950.                                 diff = cache[1];
  951.                             } else {
  952.                                 while ((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) {
  953.                                     if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
  954.                                         if (useCache) {
  955.                                             (node[expando] || (node[expando] = {}))[type] = [dirruns, diff];
  956.                                         }
  957.                                         if (node === elem) {
  958.                                             break;
  959.                                         }
  960.                                     }
  961.                                 }
  962.                             }
  963.                             diff -= last;
  964.                             return diff === first || (diff % first === 0 && diff / first >= 0);
  965.                         }
  966.                     };
  967.                 },
  968.                 "PSEUDO": function(pseudo, argument) {
  969.                     var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo);
  970.                     if (fn[expando]) {
  971.                         return fn(argument);
  972.                     }
  973.                     if (fn.length > 1) {
  974.                         args = [pseudo, pseudo, "", argument];
  975.                         return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches) {
  976.                             var idx, matched = fn(seed, argument),
  977.                                 i = matched.length;
  978.                             while (i--) {
  979.                                 idx = indexOf(seed, matched[i]);
  980.                                 seed[idx] = !(matches[idx] = matched[i]);
  981.                             }
  982.                         }) : function(elem) {
  983.                             return fn(elem, 0, args);
  984.                         };
  985.                     }
  986.                     return fn;
  987.                 }
  988.             },
  989.             pseudos: {
  990.                 "not": markFunction(function(selector) {
  991.                     var input = [],
  992.                         results = [],
  993.                         matcher = compile(selector.replace(rtrim, "$1"));
  994.                     return matcher[expando] ? markFunction(function(seed, matches, context, xml) {
  995.                         var elem, unmatched = matcher(seed, null, xml, []),
  996.                             i = seed.length;
  997.                         while (i--) {
  998.                             if ((elem = unmatched[i])) {
  999.                                 seed[i] = !(matches[i] = elem);
  1000.                             }
  1001.                         }
  1002.                     }) : function(elem, context, xml) {
  1003.                         input[0] = elem;
  1004.                         matcher(input, null, xml, results);
  1005.                         input[0] = null;
  1006.                         return !results.pop();
  1007.                     };
  1008.                 }),
  1009.                 "has": markFunction(function(selector) {
  1010.                     return function(elem) {
  1011.                         return Sizzle(selector, elem).length > 0;
  1012.                     };
  1013.                 }),
  1014.                 "contains": markFunction(function(text) {
  1015.                     text = text.replace(runescape, funescape);
  1016.                     return function(elem) {
  1017.                         return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
  1018.                     };
  1019.                 }),
  1020.                 "lang": markFunction(function(lang) {
  1021.                     if (!ridentifier.test(lang || "")) {
  1022.                         Sizzle.error("unsupported lang: " + lang);
  1023.                     }
  1024.                     lang = lang.replace(runescape, funescape).toLowerCase();
  1025.                     return function(elem) {
  1026.                         var elemLang;
  1027.                         do {
  1028.                             if ((elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) {
  1029.                                 elemLang = elemLang.toLowerCase();
  1030.                                 return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
  1031.                             }
  1032.                         } while ((elem = elem.parentNode) && elem.nodeType === 1);
  1033.                         return false;
  1034.                     };
  1035.                 }),
  1036.                 "target": function(elem) {
  1037.                     var hash = window.location && window.location.hash;
  1038.                     return hash && hash.slice(1) === elem.id;
  1039.                 },
  1040.                 "root": function(elem) {
  1041.                     return elem === docElem;
  1042.                 },
  1043.                 "focus": function(elem) {
  1044.                     return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
  1045.                 },
  1046.                 "enabled": function(elem) {
  1047.                     return elem.disabled === false;
  1048.                 },
  1049.                 "disabled": function(elem) {
  1050.                     return elem.disabled === true;
  1051.                 },
  1052.                 "checked": function(elem) {
  1053.                     var nodeName = elem.nodeName.toLowerCase();
  1054.                     return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
  1055.                 },
  1056.                 "selected": function(elem) {
  1057.                     if (elem.parentNode) {
  1058.                         elem.parentNode.selectedIndex;
  1059.                     }
  1060.                     return elem.selected === true;
  1061.                 },
  1062.                 "empty": function(elem) {
  1063.                     for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  1064.                         if (elem.nodeType < 6) {
  1065.                             return false;
  1066.                         }
  1067.                     }
  1068.                     return true;
  1069.                 },
  1070.                 "parent": function(elem) {
  1071.                     return !Expr.pseudos["empty"](elem);
  1072.                 },
  1073.                 "header": function(elem) {
  1074.                     return rheader.test(elem.nodeName);
  1075.                 },
  1076.                 "input": function(elem) {
  1077.                     return rinputs.test(elem.nodeName);
  1078.                 },
  1079.                 "button": function(elem) {
  1080.                     var name = elem.nodeName.toLowerCase();
  1081.                     return name === "input" && elem.type === "button" || name === "button";
  1082.                 },
  1083.                 "text": function(elem) {
  1084.                     var attr;
  1085.                     return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
  1086.                 },
  1087.                 "first": createPositionalPseudo(function() {
  1088.                     return [0];
  1089.                 }),
  1090.                 "last": createPositionalPseudo(function(matchIndexes, length) {
  1091.                     return [length - 1];
  1092.                 }),
  1093.                 "eq": createPositionalPseudo(function(matchIndexes, length, argument) {
  1094.                     return [argument < 0 ? argument + length : argument];
  1095.                 }),
  1096.                 "even": createPositionalPseudo(function(matchIndexes, length) {
  1097.                     var i = 0;
  1098.                     for (; i < length; i += 2) {
  1099.                         matchIndexes.push(i);
  1100.                     }
  1101.                     return matchIndexes;
  1102.                 }),
  1103.                 "odd": createPositionalPseudo(function(matchIndexes, length) {
  1104.                     var i = 1;
  1105.                     for (; i < length; i += 2) {
  1106.                         matchIndexes.push(i);
  1107.                     }
  1108.                     return matchIndexes;
  1109.                 }),
  1110.                 "lt": createPositionalPseudo(function(matchIndexes, length, argument) {
  1111.                     var i = argument < 0 ? argument + length : argument;
  1112.                     for (; --i >= 0;) {
  1113.                         matchIndexes.push(i);
  1114.                     }
  1115.                     return matchIndexes;
  1116.                 }),
  1117.                 "gt": createPositionalPseudo(function(matchIndexes, length, argument) {
  1118.                     var i = argument < 0 ? argument + length : argument;
  1119.                     for (; ++i < length;) {
  1120.                         matchIndexes.push(i);
  1121.                     }
  1122.                     return matchIndexes;
  1123.                 })
  1124.             }
  1125.         };
  1126.         Expr.pseudos["nth"] = Expr.pseudos["eq"];
  1127.         for (i in {
  1128.                 radio: true,
  1129.                 checkbox: true,
  1130.                 file: true,
  1131.                 password: true,
  1132.                 image: true
  1133.             }) {
  1134.             Expr.pseudos[i] = createInputPseudo(i);
  1135.         }
  1136.         for (i in {
  1137.                 submit: true,
  1138.                 reset: true
  1139.             }) {
  1140.             Expr.pseudos[i] = createButtonPseudo(i);
  1141.         }
  1142.  
  1143.         function setFilters() {}
  1144.         setFilters.prototype = Expr.filters = Expr.pseudos;
  1145.         Expr.setFilters = new setFilters();
  1146.         tokenize = Sizzle.tokenize = function(selector, parseOnly) {
  1147.             var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
  1148.             if (cached) {
  1149.                 return parseOnly ? 0 : cached.slice(0);
  1150.             }
  1151.             soFar = selector;
  1152.             groups = [];
  1153.             preFilters = Expr.preFilter;
  1154.             while (soFar) {
  1155.                 if (!matched || (match = rcomma.exec(soFar))) {
  1156.                     if (match) {
  1157.                         soFar = soFar.slice(match[0].length) || soFar;
  1158.                     }
  1159.                     groups.push((tokens = []));
  1160.                 }
  1161.                 matched = false;
  1162.                 if ((match = rcombinators.exec(soFar))) {
  1163.                     matched = match.shift();
  1164.                     tokens.push({
  1165.                         value: matched,
  1166.                         type: match[0].replace(rtrim, " ")
  1167.                     });
  1168.                     soFar = soFar.slice(matched.length);
  1169.                 }
  1170.                 for (type in Expr.filter) {
  1171.                     if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
  1172.                         matched = match.shift();
  1173.                         tokens.push({
  1174.                             value: matched,
  1175.                             type: type,
  1176.                             matches: match
  1177.                         });
  1178.                         soFar = soFar.slice(matched.length);
  1179.                     }
  1180.                 }
  1181.                 if (!matched) {
  1182.                     break;
  1183.                 }
  1184.             }
  1185.             return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
  1186.         };
  1187.  
  1188.         function toSelector(tokens) {
  1189.             var i = 0,
  1190.                 len = tokens.length,
  1191.                 selector = "";
  1192.             for (; i < len; i++) {
  1193.                 selector += tokens[i].value;
  1194.             }
  1195.             return selector;
  1196.         }
  1197.  
  1198.         function addCombinator(matcher, combinator, base) {
  1199.             var dir = combinator.dir,
  1200.                 checkNonElements = base && dir === "parentNode",
  1201.                 doneName = done++;
  1202.             return combinator.first ? function(elem, context, xml) {
  1203.                 while ((elem = elem[dir])) {
  1204.                     if (elem.nodeType === 1 || checkNonElements) {
  1205.                         return matcher(elem, context, xml);
  1206.                     }
  1207.                 }
  1208.             } : function(elem, context, xml) {
  1209.                 var oldCache, outerCache, newCache = [dirruns, doneName];
  1210.                 if (xml) {
  1211.                     while ((elem = elem[dir])) {
  1212.                         if (elem.nodeType === 1 || checkNonElements) {
  1213.                             if (matcher(elem, context, xml)) {
  1214.                                 return true;
  1215.                             }
  1216.                         }
  1217.                     }
  1218.                 } else {
  1219.                     while ((elem = elem[dir])) {
  1220.                         if (elem.nodeType === 1 || checkNonElements) {
  1221.                             outerCache = elem[expando] || (elem[expando] = {});
  1222.                             if ((oldCache = outerCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
  1223.                                 return (newCache[2] = oldCache[2]);
  1224.                             } else {
  1225.                                 outerCache[dir] = newCache;
  1226.                                 if ((newCache[2] = matcher(elem, context, xml))) {
  1227.                                     return true;
  1228.                                 }
  1229.                             }
  1230.                         }
  1231.                     }
  1232.                 }
  1233.             };
  1234.         }
  1235.  
  1236.         function elementMatcher(matchers) {
  1237.             return matchers.length > 1 ? function(elem, context, xml) {
  1238.                 var i = matchers.length;
  1239.                 while (i--) {
  1240.                     if (!matchers[i](elem, context, xml)) {
  1241.                         return false;
  1242.                     }
  1243.                 }
  1244.                 return true;
  1245.             } : matchers[0];
  1246.         }
  1247.  
  1248.         function multipleContexts(selector, contexts, results) {
  1249.             var i = 0,
  1250.                 len = contexts.length;
  1251.             for (; i < len; i++) {
  1252.                 Sizzle(selector, contexts[i], results);
  1253.             }
  1254.             return results;
  1255.         }
  1256.  
  1257.         function condense(unmatched, map, filter, context, xml) {
  1258.             var elem, newUnmatched = [],
  1259.                 i = 0,
  1260.                 len = unmatched.length,
  1261.                 mapped = map != null;
  1262.             for (; i < len; i++) {
  1263.                 if ((elem = unmatched[i])) {
  1264.                     if (!filter || filter(elem, context, xml)) {
  1265.                         newUnmatched.push(elem);
  1266.                         if (mapped) {
  1267.                             map.push(i);
  1268.                         }
  1269.                     }
  1270.                 }
  1271.             }
  1272.             return newUnmatched;
  1273.         }
  1274.  
  1275.         function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  1276.             if (postFilter && !postFilter[expando]) {
  1277.                 postFilter = setMatcher(postFilter);
  1278.             }
  1279.             if (postFinder && !postFinder[expando]) {
  1280.                 postFinder = setMatcher(postFinder, postSelector);
  1281.             }
  1282.             return markFunction(function(seed, results, context, xml) {
  1283.                 var temp, i, elem, preMap = [],
  1284.                     postMap = [],
  1285.                     preexisting = results.length,
  1286.                     elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
  1287.                     matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,
  1288.                     matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
  1289.                 if (matcher) {
  1290.                     matcher(matcherIn, matcherOut, context, xml);
  1291.                 }
  1292.                 if (postFilter) {
  1293.                     temp = condense(matcherOut, postMap);
  1294.                     postFilter(temp, [], context, xml);
  1295.                     i = temp.length;
  1296.                     while (i--) {
  1297.                         if ((elem = temp[i])) {
  1298.                             matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
  1299.                         }
  1300.                     }
  1301.                 }
  1302.                 if (seed) {
  1303.                     if (postFinder || preFilter) {
  1304.                         if (postFinder) {
  1305.                             temp = [];
  1306.                             i = matcherOut.length;
  1307.                             while (i--) {
  1308.                                 if ((elem = matcherOut[i])) {
  1309.                                     temp.push((matcherIn[i] = elem));
  1310.                                 }
  1311.                             }
  1312.                             postFinder(null, (matcherOut = []), temp, xml);
  1313.                         }
  1314.                         i = matcherOut.length;
  1315.                         while (i--) {
  1316.                             if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
  1317.                                 seed[temp] = !(results[temp] = elem);
  1318.                             }
  1319.                         }
  1320.                     }
  1321.                 } else {
  1322.                     matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
  1323.                     if (postFinder) {
  1324.                         postFinder(null, results, matcherOut, xml);
  1325.                     } else {
  1326.                         push.apply(results, matcherOut);
  1327.                     }
  1328.                 }
  1329.             });
  1330.         }
  1331.  
  1332.         function matcherFromTokens(tokens) {
  1333.             var checkContext, matcher, j, len = tokens.length,
  1334.                 leadingRelative = Expr.relative[tokens[0].type],
  1335.                 implicitRelative = leadingRelative || Expr.relative[" "],
  1336.                 i = leadingRelative ? 1 : 0,
  1337.                 matchContext = addCombinator(function(elem) {
  1338.                     return elem === checkContext;
  1339.                 }, implicitRelative, true),
  1340.                 matchAnyContext = addCombinator(function(elem) {
  1341.                     return indexOf(checkContext, elem) > -1;
  1342.                 }, implicitRelative, true),
  1343.                 matchers = [function(elem, context, xml) {
  1344.                     var ret = (!leadingRelative && (xml || context !== outermostContext)) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
  1345.                     checkContext = null;
  1346.                     return ret;
  1347.                 }];
  1348.             for (; i < len; i++) {
  1349.                 if ((matcher = Expr.relative[tokens[i].type])) {
  1350.                     matchers = [addCombinator(elementMatcher(matchers), matcher)];
  1351.                 } else {
  1352.                     matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
  1353.                     if (matcher[expando]) {
  1354.                         j = ++i;
  1355.                         for (; j < len; j++) {
  1356.                             if (Expr.relative[tokens[j].type]) {
  1357.                                 break;
  1358.                             }
  1359.                         }
  1360.                         return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({
  1361.                             value: tokens[i - 2].type === " " ? "*" : ""
  1362.                         })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens((tokens = tokens.slice(j))), j < len && toSelector(tokens));
  1363.                     }
  1364.                     matchers.push(matcher);
  1365.                 }
  1366.             }
  1367.             return elementMatcher(matchers);
  1368.         }
  1369.  
  1370.         function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  1371.             var bySet = setMatchers.length > 0,
  1372.                 byElement = elementMatchers.length > 0,
  1373.                 superMatcher = function(seed, context, xml, results, outermost) {
  1374.                     var elem, j, matcher, matchedCount = 0,
  1375.                         i = "0",
  1376.                         unmatched = seed && [],
  1377.                         setMatched = [],
  1378.                         contextBackup = outermostContext,
  1379.                         elems = seed || byElement && Expr.find["TAG"]("*", outermost),
  1380.                         dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
  1381.                         len = elems.length;
  1382.                     if (outermost) {
  1383.                         outermostContext = context !== document && context;
  1384.                     }
  1385.                     for (; i !== len && (elem = elems[i]) != null; i++) {
  1386.                         if (byElement && elem) {
  1387.                             j = 0;
  1388.                             while ((matcher = elementMatchers[j++])) {
  1389.                                 if (matcher(elem, context, xml)) {
  1390.                                     results.push(elem);
  1391.                                     break;
  1392.                                 }
  1393.                             }
  1394.                             if (outermost) {
  1395.                                 dirruns = dirrunsUnique;
  1396.                             }
  1397.                         }
  1398.                         if (bySet) {
  1399.                             if ((elem = !matcher && elem)) {
  1400.                                 matchedCount--;
  1401.                             }
  1402.                             if (seed) {
  1403.                                 unmatched.push(elem);
  1404.                             }
  1405.                         }
  1406.                     }
  1407.                     matchedCount += i;
  1408.                     if (bySet && i !== matchedCount) {
  1409.                         j = 0;
  1410.                         while ((matcher = setMatchers[j++])) {
  1411.                             matcher(unmatched, setMatched, context, xml);
  1412.                         }
  1413.                         if (seed) {
  1414.                             if (matchedCount > 0) {
  1415.                                 while (i--) {
  1416.                                     if (!(unmatched[i] || setMatched[i])) {
  1417.                                         setMatched[i] = pop.call(results);
  1418.                                     }
  1419.                                 }
  1420.                             }
  1421.                             setMatched = condense(setMatched);
  1422.                         }
  1423.                         push.apply(results, setMatched);
  1424.                         if (outermost && !seed && setMatched.length > 0 && (matchedCount + setMatchers.length) > 1) {
  1425.                             Sizzle.uniqueSort(results);
  1426.                         }
  1427.                     }
  1428.                     if (outermost) {
  1429.                         dirruns = dirrunsUnique;
  1430.                         outermostContext = contextBackup;
  1431.                     }
  1432.                     return unmatched;
  1433.                 };
  1434.             return bySet ? markFunction(superMatcher) : superMatcher;
  1435.         }
  1436.         compile = Sizzle.compile = function(selector, match) {
  1437.             var i, setMatchers = [],
  1438.                 elementMatchers = [],
  1439.                 cached = compilerCache[selector + " "];
  1440.             if (!cached) {
  1441.                 if (!match) {
  1442.                     match = tokenize(selector);
  1443.                 }
  1444.                 i = match.length;
  1445.                 while (i--) {
  1446.                     cached = matcherFromTokens(match[i]);
  1447.                     if (cached[expando]) {
  1448.                         setMatchers.push(cached);
  1449.                     } else {
  1450.                         elementMatchers.push(cached);
  1451.                     }
  1452.                 }
  1453.                 cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
  1454.                 cached.selector = selector;
  1455.             }
  1456.             return cached;
  1457.         };
  1458.         select = Sizzle.select = function(selector, context, results, seed) {
  1459.             var i, tokens, token, type, find, compiled = typeof selector === "function" && selector,
  1460.                 match = !seed && tokenize((selector = compiled.selector || selector));
  1461.             results = results || [];
  1462.             if (match.length === 1) {
  1463.                 tokens = match[0] = match[0].slice(0);
  1464.                 if (tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
  1465.                     context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
  1466.                     if (!context) {
  1467.                         return results;
  1468.                     } else if (compiled) {
  1469.                         context = context.parentNode;
  1470.                     }
  1471.                     selector = selector.slice(tokens.shift().value.length);
  1472.                 }
  1473.                 i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
  1474.                 while (i--) {
  1475.                     token = tokens[i];
  1476.                     if (Expr.relative[(type = token.type)]) {
  1477.                         break;
  1478.                     }
  1479.                     if ((find = Expr.find[type])) {
  1480.                         if ((seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context))) {
  1481.                             tokens.splice(i, 1);
  1482.                             selector = seed.length && toSelector(tokens);
  1483.                             if (!selector) {
  1484.                                 push.apply(results, seed);
  1485.                                 return results;
  1486.                             }
  1487.                             break;
  1488.                         }
  1489.                     }
  1490.                 }
  1491.             }(compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context);
  1492.             return results;
  1493.         };
  1494.         support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
  1495.         support.detectDuplicates = !!hasDuplicate;
  1496.         setDocument();
  1497.         support.sortDetached = assert(function(div1) {
  1498.             return div1.compareDocumentPosition(document.createElement("div")) & 1;
  1499.         });
  1500.         if (!assert(function(div) {
  1501.                 div.innerHTML = "<a href='#'></a>";
  1502.                 return div.firstChild.getAttribute("href") === "#";
  1503.             })) {
  1504.             addHandle("type|href|height|width", function(elem, name, isXML) {
  1505.                 if (!isXML) {
  1506.                     return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
  1507.                 }
  1508.             });
  1509.         }
  1510.         if (!support.attributes || !assert(function(div) {
  1511.                 div.innerHTML = "<input/>";
  1512.                 div.firstChild.setAttribute("value", "");
  1513.                 return div.firstChild.getAttribute("value") === "";
  1514.             })) {
  1515.             addHandle("value", function(elem, name, isXML) {
  1516.                 if (!isXML && elem.nodeName.toLowerCase() === "input") {
  1517.                     return elem.defaultValue;
  1518.                 }
  1519.             });
  1520.         }
  1521.         if (!assert(function(div) {
  1522.                 return div.getAttribute("disabled") == null;
  1523.             })) {
  1524.             addHandle(booleans, function(elem, name, isXML) {
  1525.                 var val;
  1526.                 if (!isXML) {
  1527.                     return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
  1528.                 }
  1529.             });
  1530.         }
  1531.         return Sizzle;
  1532.     })(window);
  1533.     jQuery.find = Sizzle;
  1534.     jQuery.expr = Sizzle.selectors;
  1535.     jQuery.expr[":"] = jQuery.expr.pseudos;
  1536.     jQuery.unique = Sizzle.uniqueSort;
  1537.     jQuery.text = Sizzle.getText;
  1538.     jQuery.isXMLDoc = Sizzle.isXML;
  1539.     jQuery.contains = Sizzle.contains;
  1540.     var rneedsContext = jQuery.expr.match.needsContext;
  1541.     var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
  1542.     var risSimple = /^.[^:#\[\.,]*$/;
  1543.  
  1544.     function winnow(elements, qualifier, not) {
  1545.         if (jQuery.isFunction(qualifier)) {
  1546.             return jQuery.grep(elements, function(elem, i) {
  1547.                 return !!qualifier.call(elem, i, elem) !== not;
  1548.             });
  1549.         }
  1550.         if (qualifier.nodeType) {
  1551.             return jQuery.grep(elements, function(elem) {
  1552.                 return (elem === qualifier) !== not;
  1553.             });
  1554.         }
  1555.         if (typeof qualifier === "string") {
  1556.             if (risSimple.test(qualifier)) {
  1557.                 return jQuery.filter(qualifier, elements, not);
  1558.             }
  1559.             qualifier = jQuery.filter(qualifier, elements);
  1560.         }
  1561.         return jQuery.grep(elements, function(elem) {
  1562.             return (indexOf.call(qualifier, elem) >= 0) !== not;
  1563.         });
  1564.     }
  1565.     jQuery.filter = function(expr, elems, not) {
  1566.         var elem = elems[0];
  1567.         if (not) {
  1568.             expr = ":not(" + expr + ")";
  1569.         }
  1570.         return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function(elem) {
  1571.             return elem.nodeType === 1;
  1572.         }));
  1573.     };
  1574.     jQuery.fn.extend({
  1575.         find: function(selector) {
  1576.             var i, len = this.length,
  1577.                 ret = [],
  1578.                 self = this;
  1579.             if (typeof selector !== "string") {
  1580.                 return this.pushStack(jQuery(selector).filter(function() {
  1581.                     for (i = 0; i < len; i++) {
  1582.                         if (jQuery.contains(self[i], this)) {
  1583.                             return true;
  1584.                         }
  1585.                     }
  1586.                 }));
  1587.             }
  1588.             for (i = 0; i < len; i++) {
  1589.                 jQuery.find(selector, self[i], ret);
  1590.             }
  1591.             ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret);
  1592.             ret.selector = this.selector ? this.selector + " " + selector : selector;
  1593.             return ret;
  1594.         },
  1595.         filter: function(selector) {
  1596.             return this.pushStack(winnow(this, selector || [], false));
  1597.         },
  1598.         not: function(selector) {
  1599.             return this.pushStack(winnow(this, selector || [], true));
  1600.         },
  1601.         is: function(selector) {
  1602.             return !!winnow(this, typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;
  1603.         }
  1604.     });
  1605.     var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
  1606.         init = jQuery.fn.init = function(selector, context) {
  1607.             var match, elem;
  1608.             if (!selector) {
  1609.                 return this;
  1610.             }
  1611.             if (typeof selector === "string") {
  1612.                 if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
  1613.                     match = [null, selector, null];
  1614.                 } else {
  1615.                     match = rquickExpr.exec(selector);
  1616.                 }
  1617.                 if (match && (match[1] || !context)) {
  1618.                     if (match[1]) {
  1619.                         context = context instanceof jQuery ? context[0] : context;
  1620.                         jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true));
  1621.                         if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
  1622.                             for (match in context) {
  1623.                                 if (jQuery.isFunction(this[match])) {
  1624.                                     this[match](context[match]);
  1625.                                 } else {
  1626.                                     this.attr(match, context[match]);
  1627.                                 }
  1628.                             }
  1629.                         }
  1630.                         return this;
  1631.                     } else {
  1632.                         elem = document.getElementById(match[2]);
  1633.                         if (elem && elem.parentNode) {
  1634.                             this.length = 1;
  1635.                             this[0] = elem;
  1636.                         }
  1637.                         this.context = document;
  1638.                         this.selector = selector;
  1639.                         return this;
  1640.                     }
  1641.                 } else if (!context || context.jquery) {
  1642.                     return (context || rootjQuery).find(selector);
  1643.                 } else {
  1644.                     return this.constructor(context).find(selector);
  1645.                 }
  1646.             } else if (selector.nodeType) {
  1647.                 this.context = this[0] = selector;
  1648.                 this.length = 1;
  1649.                 return this;
  1650.             } else if (jQuery.isFunction(selector)) {
  1651.                 return typeof rootjQuery.ready !== "undefined" ? rootjQuery.ready(selector) : selector(jQuery);
  1652.             }
  1653.             if (selector.selector !== undefined) {
  1654.                 this.selector = selector.selector;
  1655.                 this.context = selector.context;
  1656.             }
  1657.             return jQuery.makeArray(selector, this);
  1658.         };
  1659.     init.prototype = jQuery.fn;
  1660.     rootjQuery = jQuery(document);
  1661.     var rparentsprev = /^(?:parents|prev(?:Until|All))/,
  1662.         guaranteedUnique = {
  1663.             children: true,
  1664.             contents: true,
  1665.             next: true,
  1666.             prev: true
  1667.         };
  1668.     jQuery.extend({
  1669.         dir: function(elem, dir, until) {
  1670.             var matched = [],
  1671.                 truncate = until !== undefined;
  1672.             while ((elem = elem[dir]) && elem.nodeType !== 9) {
  1673.                 if (elem.nodeType === 1) {
  1674.                     if (truncate && jQuery(elem).is(until)) {
  1675.                         break;
  1676.                     }
  1677.                     matched.push(elem);
  1678.                 }
  1679.             }
  1680.             return matched;
  1681.         },
  1682.         sibling: function(n, elem) {
  1683.             var matched = [];
  1684.             for (; n; n = n.nextSibling) {
  1685.                 if (n.nodeType === 1 && n !== elem) {
  1686.                     matched.push(n);
  1687.                 }
  1688.             }
  1689.             return matched;
  1690.         }
  1691.     });
  1692.     jQuery.fn.extend({
  1693.         has: function(target) {
  1694.             var targets = jQuery(target, this),
  1695.                 l = targets.length;
  1696.             return this.filter(function() {
  1697.                 var i = 0;
  1698.                 for (; i < l; i++) {
  1699.                     if (jQuery.contains(this, targets[i])) {
  1700.                         return true;
  1701.                     }
  1702.                 }
  1703.             });
  1704.         },
  1705.         closest: function(selectors, context) {
  1706.             var cur, i = 0,
  1707.                 l = this.length,
  1708.                 matched = [],
  1709.                 pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? jQuery(selectors, context || this.context) : 0;
  1710.             for (; i < l; i++) {
  1711.                 for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
  1712.                     if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {
  1713.                         matched.push(cur);
  1714.                         break;
  1715.                     }
  1716.                 }
  1717.             }
  1718.             return this.pushStack(matched.length > 1 ? jQuery.unique(matched) : matched);
  1719.         },
  1720.         index: function(elem) {
  1721.             if (!elem) {
  1722.                 return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1;
  1723.             }
  1724.             if (typeof elem === "string") {
  1725.                 return indexOf.call(jQuery(elem), this[0]);
  1726.             }
  1727.             return indexOf.call(this, elem.jquery ? elem[0] : elem);
  1728.         },
  1729.         add: function(selector, context) {
  1730.             return this.pushStack(jQuery.unique(jQuery.merge(this.get(), jQuery(selector, context))));
  1731.         },
  1732.         addBack: function(selector) {
  1733.             return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));
  1734.         }
  1735.     });
  1736.  
  1737.     function sibling(cur, dir) {
  1738.         while ((cur = cur[dir]) && cur.nodeType !== 1) {}
  1739.         return cur;
  1740.     }
  1741.     jQuery.each({
  1742.         parent: function(elem) {
  1743.             var parent = elem.parentNode;
  1744.             return parent && parent.nodeType !== 11 ? parent : null;
  1745.         },
  1746.         parents: function(elem) {
  1747.             return jQuery.dir(elem, "parentNode");
  1748.         },
  1749.         parentsUntil: function(elem, i, until) {
  1750.             return jQuery.dir(elem, "parentNode", until);
  1751.         },
  1752.         next: function(elem) {
  1753.             return sibling(elem, "nextSibling");
  1754.         },
  1755.         prev: function(elem) {
  1756.             return sibling(elem, "previousSibling");
  1757.         },
  1758.         nextAll: function(elem) {
  1759.             return jQuery.dir(elem, "nextSibling");
  1760.         },
  1761.         prevAll: function(elem) {
  1762.             return jQuery.dir(elem, "previousSibling");
  1763.         },
  1764.         nextUntil: function(elem, i, until) {
  1765.             return jQuery.dir(elem, "nextSibling", until);
  1766.         },
  1767.         prevUntil: function(elem, i, until) {
  1768.             return jQuery.dir(elem, "previousSibling", until);
  1769.         },
  1770.         siblings: function(elem) {
  1771.             return jQuery.sibling((elem.parentNode || {}).firstChild, elem);
  1772.         },
  1773.         children: function(elem) {
  1774.             return jQuery.sibling(elem.firstChild);
  1775.         },
  1776.         contents: function(elem) {
  1777.             return elem.contentDocument || jQuery.merge([], elem.childNodes);
  1778.         }
  1779.     }, function(name, fn) {
  1780.         jQuery.fn[name] = function(until, selector) {
  1781.             var matched = jQuery.map(this, fn, until);
  1782.             if (name.slice(-5) !== "Until") {
  1783.                 selector = until;
  1784.             }
  1785.             if (selector && typeof selector === "string") {
  1786.                 matched = jQuery.filter(selector, matched);
  1787.             }
  1788.             if (this.length > 1) {
  1789.                 if (!guaranteedUnique[name]) {
  1790.                     jQuery.unique(matched);
  1791.                 }
  1792.                 if (rparentsprev.test(name)) {
  1793.                     matched.reverse();
  1794.                 }
  1795.             }
  1796.             return this.pushStack(matched);
  1797.         };
  1798.     });
  1799.     var rnotwhite = (/\S+/g);
  1800.     var optionsCache = {};
  1801.  
  1802.     function createOptions(options) {
  1803.         var object = optionsCache[options] = {};
  1804.         jQuery.each(options.match(rnotwhite) || [], function(_, flag) {
  1805.             object[flag] = true;
  1806.         });
  1807.         return object;
  1808.     }
  1809.     jQuery.Callbacks = function(options) {
  1810.         options = typeof options === "string" ? (optionsCache[options] || createOptions(options)) : jQuery.extend({}, options);
  1811.         var
  1812.             memory, fired, firing, firingStart, firingLength, firingIndex, list = [],
  1813.             stack = !options.once && [],
  1814.             fire = function(data) {
  1815.                 memory = options.memory && data;
  1816.                 fired = true;
  1817.                 firingIndex = firingStart || 0;
  1818.                 firingStart = 0;
  1819.                 firingLength = list.length;
  1820.                 firing = true;
  1821.                 for (; list && firingIndex < firingLength; firingIndex++) {
  1822.                     if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
  1823.                         memory = false;
  1824.                         break;
  1825.                     }
  1826.                 }
  1827.                 firing = false;
  1828.                 if (list) {
  1829.                     if (stack) {
  1830.                         if (stack.length) {
  1831.                             fire(stack.shift());
  1832.                         }
  1833.                     } else if (memory) {
  1834.                         list = [];
  1835.                     } else {
  1836.                         self.disable();
  1837.                     }
  1838.                 }
  1839.             },
  1840.             self = {
  1841.                 add: function() {
  1842.                     if (list) {
  1843.                         var start = list.length;
  1844.                         (function add(args) {
  1845.                             jQuery.each(args, function(_, arg) {
  1846.                                 var type = jQuery.type(arg);
  1847.                                 if (type === "function") {
  1848.                                     if (!options.unique || !self.has(arg)) {
  1849.                                         list.push(arg);
  1850.                                     }
  1851.                                 } else if (arg && arg.length && type !== "string") {
  1852.                                     add(arg);
  1853.                                 }
  1854.                             });
  1855.                         })(arguments);
  1856.                         if (firing) {
  1857.                             firingLength = list.length;
  1858.                         } else if (memory) {
  1859.                             firingStart = start;
  1860.                             fire(memory);
  1861.                         }
  1862.                     }
  1863.                     return this;
  1864.                 },
  1865.                 remove: function() {
  1866.                     if (list) {
  1867.                         jQuery.each(arguments, function(_, arg) {
  1868.                             var index;
  1869.                             while ((index = jQuery.inArray(arg, list, index)) > -1) {
  1870.                                 list.splice(index, 1);
  1871.                                 if (firing) {
  1872.                                     if (index <= firingLength) {
  1873.                                         firingLength--;
  1874.                                     }
  1875.                                     if (index <= firingIndex) {
  1876.                                         firingIndex--;
  1877.                                     }
  1878.                                 }
  1879.                             }
  1880.                         });
  1881.                     }
  1882.                     return this;
  1883.                 },
  1884.                 has: function(fn) {
  1885.                     return fn ? jQuery.inArray(fn, list) > -1 : !!(list && list.length);
  1886.                 },
  1887.                 empty: function() {
  1888.                     list = [];
  1889.                     firingLength = 0;
  1890.                     return this;
  1891.                 },
  1892.                 disable: function() {
  1893.                     list = stack = memory = undefined;
  1894.                     return this;
  1895.                 },
  1896.                 disabled: function() {
  1897.                     return !list;
  1898.                 },
  1899.                 lock: function() {
  1900.                     stack = undefined;
  1901.                     if (!memory) {
  1902.                         self.disable();
  1903.                     }
  1904.                     return this;
  1905.                 },
  1906.                 locked: function() {
  1907.                     return !stack;
  1908.                 },
  1909.                 fireWith: function(context, args) {
  1910.                     if (list && (!fired || stack)) {
  1911.                         args = args || [];
  1912.                         args = [context, args.slice ? args.slice() : args];
  1913.                         if (firing) {
  1914.                             stack.push(args);
  1915.                         } else {
  1916.                             fire(args);
  1917.                         }
  1918.                     }
  1919.                     return this;
  1920.                 },
  1921.                 fire: function() {
  1922.                     self.fireWith(this, arguments);
  1923.                     return this;
  1924.                 },
  1925.                 fired: function() {
  1926.                     return !!fired;
  1927.                 }
  1928.             };
  1929.         return self;
  1930.     };
  1931.     jQuery.extend({
  1932.         Deferred: function(func) {
  1933.             var tuples = [
  1934.                     ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
  1935.                     ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
  1936.                     ["notify", "progress", jQuery.Callbacks("memory")]
  1937.                 ],
  1938.                 state = "pending",
  1939.                 promise = {
  1940.                     state: function() {
  1941.                         return state;
  1942.                     },
  1943.                     always: function() {
  1944.                         deferred.done(arguments).fail(arguments);
  1945.                         return this;
  1946.                     },
  1947.                     then: function() {
  1948.                         var fns = arguments;
  1949.                         return jQuery.Deferred(function(newDefer) {
  1950.                             jQuery.each(tuples, function(i, tuple) {
  1951.                                 var fn = jQuery.isFunction(fns[i]) && fns[i];
  1952.                                 deferred[tuple[1]](function() {
  1953.                                     var returned = fn && fn.apply(this, arguments);
  1954.                                     if (returned && jQuery.isFunction(returned.promise)) {
  1955.                                         returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify);
  1956.                                     } else {
  1957.                                         newDefer[tuple[0] + "With"](this === promise ? newDefer.promise() : this, fn ? [returned] : arguments);
  1958.                                     }
  1959.                                 });
  1960.                             });
  1961.                             fns = null;
  1962.                         }).promise();
  1963.                     },
  1964.                     promise: function(obj) {
  1965.                         return obj != null ? jQuery.extend(obj, promise) : promise;
  1966.                     }
  1967.                 },
  1968.                 deferred = {};
  1969.             promise.pipe = promise.then;
  1970.             jQuery.each(tuples, function(i, tuple) {
  1971.                 var list = tuple[2],
  1972.                     stateString = tuple[3];
  1973.                 promise[tuple[1]] = list.add;
  1974.                 if (stateString) {
  1975.                     list.add(function() {
  1976.                         state = stateString;
  1977.                     }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
  1978.                 }
  1979.                 deferred[tuple[0]] = function() {
  1980.                     deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
  1981.                     return this;
  1982.                 };
  1983.                 deferred[tuple[0] + "With"] = list.fireWith;
  1984.             });
  1985.             promise.promise(deferred);
  1986.             if (func) {
  1987.                 func.call(deferred, deferred);
  1988.             }
  1989.             return deferred;
  1990.         },
  1991.         when: function(subordinate) {
  1992.             var i = 0,
  1993.                 resolveValues = slice.call(arguments),
  1994.                 length = resolveValues.length,
  1995.                 remaining = length !== 1 || (subordinate && jQuery.isFunction(subordinate.promise)) ? length : 0,
  1996.                 deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
  1997.                 updateFunc = function(i, contexts, values) {
  1998.                     return function(value) {
  1999.                         contexts[i] = this;
  2000.                         values[i] = arguments.length > 1 ? slice.call(arguments) : value;
  2001.                         if (values === progressValues) {
  2002.                             deferred.notifyWith(contexts, values);
  2003.                         } else if (!(--remaining)) {
  2004.                             deferred.resolveWith(contexts, values);
  2005.                         }
  2006.                     };
  2007.                 },
  2008.                 progressValues, progressContexts, resolveContexts;
  2009.             if (length > 1) {
  2010.                 progressValues = new Array(length);
  2011.                 progressContexts = new Array(length);
  2012.                 resolveContexts = new Array(length);
  2013.                 for (; i < length; i++) {
  2014.                     if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
  2015.                         resolveValues[i].promise().done(updateFunc(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFunc(i, progressContexts, progressValues));
  2016.                     } else {
  2017.                         --remaining;
  2018.                     }
  2019.                 }
  2020.             }
  2021.             if (!remaining) {
  2022.                 deferred.resolveWith(resolveContexts, resolveValues);
  2023.             }
  2024.             return deferred.promise();
  2025.         }
  2026.     });
  2027.     var readyList;
  2028.     jQuery.fn.ready = function(fn) {
  2029.         jQuery.ready.promise().done(fn);
  2030.         return this;
  2031.     };
  2032.     jQuery.extend({
  2033.         isReady: false,
  2034.         readyWait: 1,
  2035.         holdReady: function(hold) {
  2036.             if (hold) {
  2037.                 jQuery.readyWait++;
  2038.             } else {
  2039.                 jQuery.ready(true);
  2040.             }
  2041.         },
  2042.         ready: function(wait) {
  2043.             if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
  2044.                 return;
  2045.             }
  2046.             jQuery.isReady = true;
  2047.             if (wait !== true && --jQuery.readyWait > 0) {
  2048.                 return;
  2049.             }
  2050.             readyList.resolveWith(document, [jQuery]);
  2051.             if (jQuery.fn.triggerHandler) {
  2052.                 jQuery(document).triggerHandler("ready");
  2053.                 jQuery(document).off("ready");
  2054.             }
  2055.         }
  2056.     });
  2057.  
  2058.     function completed() {
  2059.         document.removeEventListener("DOMContentLoaded", completed, false);
  2060.         window.removeEventListener("load", completed, false);
  2061.         jQuery.ready();
  2062.     }
  2063.     jQuery.ready.promise = function(obj) {
  2064.         if (!readyList) {
  2065.             readyList = jQuery.Deferred();
  2066.             if (document.readyState === "complete") {
  2067.                 setTimeout(jQuery.ready);
  2068.             } else {
  2069.                 document.addEventListener("DOMContentLoaded", completed, false);
  2070.                 window.addEventListener("load", completed, false);
  2071.             }
  2072.         }
  2073.         return readyList.promise(obj);
  2074.     };
  2075.     jQuery.ready.promise();
  2076.     var access = jQuery.access = function(elems, fn, key, value, chainable, emptyGet, raw) {
  2077.         var i = 0,
  2078.             len = elems.length,
  2079.             bulk = key == null;
  2080.         if (jQuery.type(key) === "object") {
  2081.             chainable = true;
  2082.             for (i in key) {
  2083.                 jQuery.access(elems, fn, i, key[i], true, emptyGet, raw);
  2084.             }
  2085.         } else if (value !== undefined) {
  2086.             chainable = true;
  2087.             if (!jQuery.isFunction(value)) {
  2088.                 raw = true;
  2089.             }
  2090.             if (bulk) {
  2091.                 if (raw) {
  2092.                     fn.call(elems, value);
  2093.                     fn = null;
  2094.                 } else {
  2095.                     bulk = fn;
  2096.                     fn = function(elem, key, value) {
  2097.                         return bulk.call(jQuery(elem), value);
  2098.                     };
  2099.                 }
  2100.             }
  2101.             if (fn) {
  2102.                 for (; i < len; i++) {
  2103.                     fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
  2104.                 }
  2105.             }
  2106.         }
  2107.         return chainable ? elems : bulk ? fn.call(elems) : len ? fn(elems[0], key) : emptyGet;
  2108.     };
  2109.     jQuery.acceptData = function(owner) {
  2110.         return owner.nodeType === 1 || owner.nodeType === 9 || !(+owner.nodeType);
  2111.     };
  2112.  
  2113.     function Data() {
  2114.         Object.defineProperty(this.cache = {}, 0, {
  2115.             get: function() {
  2116.                 return {};
  2117.             }
  2118.         });
  2119.         this.expando = jQuery.expando + Data.uid++;
  2120.     }
  2121.     Data.uid = 1;
  2122.     Data.accepts = jQuery.acceptData;
  2123.     Data.prototype = {
  2124.         key: function(owner) {
  2125.             if (!Data.accepts(owner)) {
  2126.                 return 0;
  2127.             }
  2128.             var descriptor = {},
  2129.                 unlock = owner[this.expando];
  2130.             if (!unlock) {
  2131.                 unlock = Data.uid++;
  2132.                 try {
  2133.                     descriptor[this.expando] = {
  2134.                         value: unlock
  2135.                     };
  2136.                     Object.defineProperties(owner, descriptor);
  2137.                 } catch (e) {
  2138.                     descriptor[this.expando] = unlock;
  2139.                     jQuery.extend(owner, descriptor);
  2140.                 }
  2141.             }
  2142.             if (!this.cache[unlock]) {
  2143.                 this.cache[unlock] = {};
  2144.             }
  2145.             return unlock;
  2146.         },
  2147.         set: function(owner, data, value) {
  2148.             var prop, unlock = this.key(owner),
  2149.                 cache = this.cache[unlock];
  2150.             if (typeof data === "string") {
  2151.                 cache[data] = value;
  2152.             } else {
  2153.                 if (jQuery.isEmptyObject(cache)) {
  2154.                     jQuery.extend(this.cache[unlock], data);
  2155.                 } else {
  2156.                     for (prop in data) {
  2157.                         cache[prop] = data[prop];
  2158.                     }
  2159.                 }
  2160.             }
  2161.             return cache;
  2162.         },
  2163.         get: function(owner, key) {
  2164.             var cache = this.cache[this.key(owner)];
  2165.             return key === undefined ? cache : cache[key];
  2166.         },
  2167.         access: function(owner, key, value) {
  2168.             var stored;
  2169.             if (key === undefined || ((key && typeof key === "string") && value === undefined)) {
  2170.                 stored = this.get(owner, key);
  2171.                 return stored !== undefined ? stored : this.get(owner, jQuery.camelCase(key));
  2172.             }
  2173.             this.set(owner, key, value);
  2174.             return value !== undefined ? value : key;
  2175.         },
  2176.         remove: function(owner, key) {
  2177.             var i, name, camel, unlock = this.key(owner),
  2178.                 cache = this.cache[unlock];
  2179.             if (key === undefined) {
  2180.                 this.cache[unlock] = {};
  2181.             } else {
  2182.                 if (jQuery.isArray(key)) {
  2183.                     name = key.concat(key.map(jQuery.camelCase));
  2184.                 } else {
  2185.                     camel = jQuery.camelCase(key);
  2186.                     if (key in cache) {
  2187.                         name = [key, camel];
  2188.                     } else {
  2189.                         name = camel;
  2190.                         name = name in cache ? [name] : (name.match(rnotwhite) || []);
  2191.                     }
  2192.                 }
  2193.                 i = name.length;
  2194.                 while (i--) {
  2195.                     delete cache[name[i]];
  2196.                 }
  2197.             }
  2198.         },
  2199.         hasData: function(owner) {
  2200.             return !jQuery.isEmptyObject(this.cache[owner[this.expando]] || {});
  2201.         },
  2202.         discard: function(owner) {
  2203.             if (owner[this.expando]) {
  2204.                 delete this.cache[owner[this.expando]];
  2205.             }
  2206.         }
  2207.     };
  2208.     var data_priv = new Data();
  2209.     var data_user = new Data();
  2210.     var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
  2211.         rmultiDash = /([A-Z])/g;
  2212.  
  2213.     function dataAttr(elem, key, data) {
  2214.         var name;
  2215.         if (data === undefined && elem.nodeType === 1) {
  2216.             name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
  2217.             data = elem.getAttribute(name);
  2218.             if (typeof data === "string") {
  2219.                 try {
  2220.                     data = data === "true" ? true : data === "false" ? false : data === "null" ? null : +data + "" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data;
  2221.                 } catch (e) {}
  2222.                 data_user.set(elem, key, data);
  2223.             } else {
  2224.                 data = undefined;
  2225.             }
  2226.         }
  2227.         return data;
  2228.     }
  2229.     jQuery.extend({
  2230.         hasData: function(elem) {
  2231.             return data_user.hasData(elem) || data_priv.hasData(elem);
  2232.         },
  2233.         data: function(elem, name, data) {
  2234.             return data_user.access(elem, name, data);
  2235.         },
  2236.         removeData: function(elem, name) {
  2237.             data_user.remove(elem, name);
  2238.         },
  2239.         _data: function(elem, name, data) {
  2240.             return data_priv.access(elem, name, data);
  2241.         },
  2242.         _removeData: function(elem, name) {
  2243.             data_priv.remove(elem, name);
  2244.         }
  2245.     });
  2246.     jQuery.fn.extend({
  2247.         data: function(key, value) {
  2248.             var i, name, data, elem = this[0],
  2249.                 attrs = elem && elem.attributes;
  2250.             if (key === undefined) {
  2251.                 if (this.length) {
  2252.                     data = data_user.get(elem);
  2253.                     if (elem.nodeType === 1 && !data_priv.get(elem, "hasDataAttrs")) {
  2254.                         i = attrs.length;
  2255.                         while (i--) {
  2256.                             if (attrs[i]) {
  2257.                                 name = attrs[i].name;
  2258.                                 if (name.indexOf("data-") === 0) {
  2259.                                     name = jQuery.camelCase(name.slice(5));
  2260.                                     dataAttr(elem, name, data[name]);
  2261.                                 }
  2262.                             }
  2263.                         }
  2264.                         data_priv.set(elem, "hasDataAttrs", true);
  2265.                     }
  2266.                 }
  2267.                 return data;
  2268.             }
  2269.             if (typeof key === "object") {
  2270.                 return this.each(function() {
  2271.                     data_user.set(this, key);
  2272.                 });
  2273.             }
  2274.             return access(this, function(value) {
  2275.                 var data, camelKey = jQuery.camelCase(key);
  2276.                 if (elem && value === undefined) {
  2277.                     data = data_user.get(elem, key);
  2278.                     if (data !== undefined) {
  2279.                         return data;
  2280.                     }
  2281.                     data = data_user.get(elem, camelKey);
  2282.                     if (data !== undefined) {
  2283.                         return data;
  2284.                     }
  2285.                     data = dataAttr(elem, camelKey, undefined);
  2286.                     if (data !== undefined) {
  2287.                         return data;
  2288.                     }
  2289.                     return;
  2290.                 }
  2291.                 this.each(function() {
  2292.                     var data = data_user.get(this, camelKey);
  2293.                     data_user.set(this, camelKey, value);
  2294.                     if (key.indexOf("-") !== -1 && data !== undefined) {
  2295.                         data_user.set(this, key, value);
  2296.                     }
  2297.                 });
  2298.             }, null, value, arguments.length > 1, null, true);
  2299.         },
  2300.         removeData: function(key) {
  2301.             return this.each(function() {
  2302.                 data_user.remove(this, key);
  2303.             });
  2304.         }
  2305.     });
  2306.     jQuery.extend({
  2307.         queue: function(elem, type, data) {
  2308.             var queue;
  2309.             if (elem) {
  2310.                 type = (type || "fx") + "queue";
  2311.                 queue = data_priv.get(elem, type);
  2312.                 if (data) {
  2313.                     if (!queue || jQuery.isArray(data)) {
  2314.                         queue = data_priv.access(elem, type, jQuery.makeArray(data));
  2315.                     } else {
  2316.                         queue.push(data);
  2317.                     }
  2318.                 }
  2319.                 return queue || [];
  2320.             }
  2321.         },
  2322.         dequeue: function(elem, type) {
  2323.             type = type || "fx";
  2324.             var queue = jQuery.queue(elem, type),
  2325.                 startLength = queue.length,
  2326.                 fn = queue.shift(),
  2327.                 hooks = jQuery._queueHooks(elem, type),
  2328.                 next = function() {
  2329.                     jQuery.dequeue(elem, type);
  2330.                 };
  2331.             if (fn === "inprogress") {
  2332.                 fn = queue.shift();
  2333.                 startLength--;
  2334.             }
  2335.             if (fn) {
  2336.                 if (type === "fx") {
  2337.                     queue.unshift("inprogress");
  2338.                 }
  2339.                 delete hooks.stop;
  2340.                 fn.call(elem, next, hooks);
  2341.             }
  2342.             if (!startLength && hooks) {
  2343.                 hooks.empty.fire();
  2344.             }
  2345.         },
  2346.         _queueHooks: function(elem, type) {
  2347.             var key = type + "queueHooks";
  2348.             return data_priv.get(elem, key) || data_priv.access(elem, key, {
  2349.                 empty: jQuery.Callbacks("once memory").add(function() {
  2350.                     data_priv.remove(elem, [type + "queue", key]);
  2351.                 })
  2352.             });
  2353.         }
  2354.     });
  2355.     jQuery.fn.extend({
  2356.         queue: function(type, data) {
  2357.             var setter = 2;
  2358.             if (typeof type !== "string") {
  2359.                 data = type;
  2360.                 type = "fx";
  2361.                 setter--;
  2362.             }
  2363.             if (arguments.length < setter) {
  2364.                 return jQuery.queue(this[0], type);
  2365.             }
  2366.             return data === undefined ? this : this.each(function() {
  2367.                 var queue = jQuery.queue(this, type, data);
  2368.                 jQuery._queueHooks(this, type);
  2369.                 if (type === "fx" && queue[0] !== "inprogress") {
  2370.                     jQuery.dequeue(this, type);
  2371.                 }
  2372.             });
  2373.         },
  2374.         dequeue: function(type) {
  2375.             return this.each(function() {
  2376.                 jQuery.dequeue(this, type);
  2377.             });
  2378.         },
  2379.         clearQueue: function(type) {
  2380.             return this.queue(type || "fx", []);
  2381.         },
  2382.         promise: function(type, obj) {
  2383.             var tmp, count = 1,
  2384.                 defer = jQuery.Deferred(),
  2385.                 elements = this,
  2386.                 i = this.length,
  2387.                 resolve = function() {
  2388.                     if (!(--count)) {
  2389.                         defer.resolveWith(elements, [elements]);
  2390.                     }
  2391.                 };
  2392.             if (typeof type !== "string") {
  2393.                 obj = type;
  2394.                 type = undefined;
  2395.             }
  2396.             type = type || "fx";
  2397.             while (i--) {
  2398.                 tmp = data_priv.get(elements[i], type + "queueHooks");
  2399.                 if (tmp && tmp.empty) {
  2400.                     count++;
  2401.                     tmp.empty.add(resolve);
  2402.                 }
  2403.             }
  2404.             resolve();
  2405.             return defer.promise(obj);
  2406.         }
  2407.     });
  2408.     var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
  2409.     var cssExpand = ["Top", "Right", "Bottom", "Left"];
  2410.     var isHidden = function(elem, el) {
  2411.         elem = el || elem;
  2412.         return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem);
  2413.     };
  2414.     var rcheckableType = (/^(?:checkbox|radio)$/i);
  2415.     (function() {
  2416.         var fragment = document.createDocumentFragment(),
  2417.             div = fragment.appendChild(document.createElement("div")),
  2418.             input = document.createElement("input");
  2419.         input.setAttribute("type", "radio");
  2420.         input.setAttribute("checked", "checked");
  2421.         input.setAttribute("name", "t");
  2422.         div.appendChild(input);
  2423.         support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
  2424.         div.innerHTML = "<textarea>x</textarea>";
  2425.         support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
  2426.     })();
  2427.     var strundefined = typeof undefined;
  2428.     support.focusinBubbles = "onfocusin" in window;
  2429.     var
  2430.         rkeyEvent = /^key/,
  2431.         rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
  2432.         rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
  2433.         rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
  2434.  
  2435.     function returnTrue() {
  2436.         return true;
  2437.     }
  2438.  
  2439.     function returnFalse() {
  2440.         return false;
  2441.     }
  2442.  
  2443.     function safeActiveElement() {
  2444.         try {
  2445.             return document.activeElement;
  2446.         } catch (err) {}
  2447.     }
  2448.     jQuery.event = {
  2449.         global: {},
  2450.         add: function(elem, types, handler, data, selector) {
  2451.             var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = data_priv.get(elem);
  2452.             if (!elemData) {
  2453.                 return;
  2454.             }
  2455.             if (handler.handler) {
  2456.                 handleObjIn = handler;
  2457.                 handler = handleObjIn.handler;
  2458.                 selector = handleObjIn.selector;
  2459.             }
  2460.             if (!handler.guid) {
  2461.                 handler.guid = jQuery.guid++;
  2462.             }
  2463.             if (!(events = elemData.events)) {
  2464.                 events = elemData.events = {};
  2465.             }
  2466.             if (!(eventHandle = elemData.handle)) {
  2467.                 eventHandle = elemData.handle = function(e) {
  2468.                     return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined;
  2469.                 };
  2470.             }
  2471.             types = (types || "").match(rnotwhite) || [""];
  2472.             t = types.length;
  2473.             while (t--) {
  2474.                 tmp = rtypenamespace.exec(types[t]) || [];
  2475.                 type = origType = tmp[1];
  2476.                 namespaces = (tmp[2] || "").split(".").sort();
  2477.                 if (!type) {
  2478.                     continue;
  2479.                 }
  2480.                 special = jQuery.event.special[type] || {};
  2481.                 type = (selector ? special.delegateType : special.bindType) || type;
  2482.                 special = jQuery.event.special[type] || {};
  2483.                 handleObj = jQuery.extend({
  2484.                     type: type,
  2485.                     origType: origType,
  2486.                     data: data,
  2487.                     handler: handler,
  2488.                     guid: handler.guid,
  2489.                     selector: selector,
  2490.                     needsContext: selector && jQuery.expr.match.needsContext.test(selector),
  2491.                     namespace: namespaces.join(".")
  2492.                 }, handleObjIn);
  2493.                 if (!(handlers = events[type])) {
  2494.                     handlers = events[type] = [];
  2495.                     handlers.delegateCount = 0;
  2496.                     if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
  2497.                         if (elem.addEventListener) {
  2498.                             elem.addEventListener(type, eventHandle, false);
  2499.                         }
  2500.                     }
  2501.                 }
  2502.                 if (special.add) {
  2503.                     special.add.call(elem, handleObj);
  2504.                     if (!handleObj.handler.guid) {
  2505.                         handleObj.handler.guid = handler.guid;
  2506.                     }
  2507.                 }
  2508.                 if (selector) {
  2509.                     handlers.splice(handlers.delegateCount++, 0, handleObj);
  2510.                 } else {
  2511.                     handlers.push(handleObj);
  2512.                 }
  2513.                 jQuery.event.global[type] = true;
  2514.             }
  2515.         },
  2516.         remove: function(elem, types, handler, selector, mappedTypes) {
  2517.             var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = data_priv.hasData(elem) && data_priv.get(elem);
  2518.             if (!elemData || !(events = elemData.events)) {
  2519.                 return;
  2520.             }
  2521.             types = (types || "").match(rnotwhite) || [""];
  2522.             t = types.length;
  2523.             while (t--) {
  2524.                 tmp = rtypenamespace.exec(types[t]) || [];
  2525.                 type = origType = tmp[1];
  2526.                 namespaces = (tmp[2] || "").split(".").sort();
  2527.                 if (!type) {
  2528.                     for (type in events) {
  2529.                         jQuery.event.remove(elem, type + types[t], handler, selector, true);
  2530.                     }
  2531.                     continue;
  2532.                 }
  2533.                 special = jQuery.event.special[type] || {};
  2534.                 type = (selector ? special.delegateType : special.bindType) || type;
  2535.                 handlers = events[type] || [];
  2536.                 tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
  2537.                 origCount = j = handlers.length;
  2538.                 while (j--) {
  2539.                     handleObj = handlers[j];
  2540.                     if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
  2541.                         handlers.splice(j, 1);
  2542.                         if (handleObj.selector) {
  2543.                             handlers.delegateCount--;
  2544.                         }
  2545.                         if (special.remove) {
  2546.                             special.remove.call(elem, handleObj);
  2547.                         }
  2548.                     }
  2549.                 }
  2550.                 if (origCount && !handlers.length) {
  2551.                     if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
  2552.                         jQuery.removeEvent(elem, type, elemData.handle);
  2553.                     }
  2554.                     delete events[type];
  2555.                 }
  2556.             }
  2557.             if (jQuery.isEmptyObject(events)) {
  2558.                 delete elemData.handle;
  2559.                 data_priv.remove(elem, "events");
  2560.             }
  2561.         },
  2562.         trigger: function(event, data, elem, onlyHandlers) {
  2563.             var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [elem || document],
  2564.                 type = hasOwn.call(event, "type") ? event.type : event,
  2565.                 namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
  2566.             cur = tmp = elem = elem || document;
  2567.             if (elem.nodeType === 3 || elem.nodeType === 8) {
  2568.                 return;
  2569.             }
  2570.             if (rfocusMorph.test(type + jQuery.event.triggered)) {
  2571.                 return;
  2572.             }
  2573.             if (type.indexOf(".") >= 0) {
  2574.                 namespaces = type.split(".");
  2575.                 type = namespaces.shift();
  2576.                 namespaces.sort();
  2577.             }
  2578.             ontype = type.indexOf(":") < 0 && "on" + type;
  2579.             event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event);
  2580.             event.isTrigger = onlyHandlers ? 2 : 3;
  2581.             event.namespace = namespaces.join(".");
  2582.             event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
  2583.             event.result = undefined;
  2584.             if (!event.target) {
  2585.                 event.target = elem;
  2586.             }
  2587.             data = data == null ? [event] : jQuery.makeArray(data, [event]);
  2588.             special = jQuery.event.special[type] || {};
  2589.             if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
  2590.                 return;
  2591.             }
  2592.             if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {
  2593.                 bubbleType = special.delegateType || type;
  2594.                 if (!rfocusMorph.test(bubbleType + type)) {
  2595.                     cur = cur.parentNode;
  2596.                 }
  2597.                 for (; cur; cur = cur.parentNode) {
  2598.                     eventPath.push(cur);
  2599.                     tmp = cur;
  2600.                 }
  2601.                 if (tmp === (elem.ownerDocument || document)) {
  2602.                     eventPath.push(tmp.defaultView || tmp.parentWindow || window);
  2603.                 }
  2604.             }
  2605.             i = 0;
  2606.             while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
  2607.                 event.type = i > 1 ? bubbleType : special.bindType || type;
  2608.                 handle = (data_priv.get(cur, "events") || {})[event.type] && data_priv.get(cur, "handle");
  2609.                 if (handle) {
  2610.                     handle.apply(cur, data);
  2611.                 }
  2612.                 handle = ontype && cur[ontype];
  2613.                 if (handle && handle.apply && jQuery.acceptData(cur)) {
  2614.                     event.result = handle.apply(cur, data);
  2615.                     if (event.result === false) {
  2616.                         event.preventDefault();
  2617.                     }
  2618.                 }
  2619.             }
  2620.             event.type = type;
  2621.             if (!onlyHandlers && !event.isDefaultPrevented()) {
  2622.                 if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && jQuery.acceptData(elem)) {
  2623.                     if (ontype && jQuery.isFunction(elem[type]) && !jQuery.isWindow(elem)) {
  2624.                         tmp = elem[ontype];
  2625.                         if (tmp) {
  2626.                             elem[ontype] = null;
  2627.                         }
  2628.                         jQuery.event.triggered = type;
  2629.                         elem[type]();
  2630.                         jQuery.event.triggered = undefined;
  2631.                         if (tmp) {
  2632.                             elem[ontype] = tmp;
  2633.                         }
  2634.                     }
  2635.                 }
  2636.             }
  2637.             return event.result;
  2638.         },
  2639.         dispatch: function(event) {
  2640.             event = jQuery.event.fix(event);
  2641.             var i, j, ret, matched, handleObj, handlerQueue = [],
  2642.                 args = slice.call(arguments),
  2643.                 handlers = (data_priv.get(this, "events") || {})[event.type] || [],
  2644.                 special = jQuery.event.special[event.type] || {};
  2645.             args[0] = event;
  2646.             event.delegateTarget = this;
  2647.             if (special.preDispatch && special.preDispatch.call(this, event) === false) {
  2648.                 return;
  2649.             }
  2650.             handlerQueue = jQuery.event.handlers.call(this, event, handlers);
  2651.             i = 0;
  2652.             while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
  2653.                 event.currentTarget = matched.elem;
  2654.                 j = 0;
  2655.                 while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
  2656.                     if (!event.namespace_re || event.namespace_re.test(handleObj.namespace)) {
  2657.                         event.handleObj = handleObj;
  2658.                         event.data = handleObj.data;
  2659.                         ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
  2660.                         if (ret !== undefined) {
  2661.                             if ((event.result = ret) === false) {
  2662.                                 event.preventDefault();
  2663.                                 event.stopPropagation();
  2664.                             }
  2665.                         }
  2666.                     }
  2667.                 }
  2668.             }
  2669.             if (special.postDispatch) {
  2670.                 special.postDispatch.call(this, event);
  2671.             }
  2672.             return event.result;
  2673.         },
  2674.         handlers: function(event, handlers) {
  2675.             var i, matches, sel, handleObj, handlerQueue = [],
  2676.                 delegateCount = handlers.delegateCount,
  2677.                 cur = event.target;
  2678.             if (delegateCount && cur.nodeType && (!event.button || event.type !== "click")) {
  2679.                 for (; cur !== this; cur = cur.parentNode || this) {
  2680.                     if (cur.disabled !== true || event.type !== "click") {
  2681.                         matches = [];
  2682.                         for (i = 0; i < delegateCount; i++) {
  2683.                             handleObj = handlers[i];
  2684.                             sel = handleObj.selector + " ";
  2685.                             if (matches[sel] === undefined) {
  2686.                                 matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) >= 0 : jQuery.find(sel, this, null, [cur]).length;
  2687.                             }
  2688.                             if (matches[sel]) {
  2689.                                 matches.push(handleObj);
  2690.                             }
  2691.                         }
  2692.                         if (matches.length) {
  2693.                             handlerQueue.push({
  2694.                                 elem: cur,
  2695.                                 handlers: matches
  2696.                             });
  2697.                         }
  2698.                     }
  2699.                 }
  2700.             }
  2701.             if (delegateCount < handlers.length) {
  2702.                 handlerQueue.push({
  2703.                     elem: this,
  2704.                     handlers: handlers.slice(delegateCount)
  2705.                 });
  2706.             }
  2707.             return handlerQueue;
  2708.         },
  2709.         props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  2710.         fixHooks: {},
  2711.         keyHooks: {
  2712.             props: "char charCode key keyCode".split(" "),
  2713.             filter: function(event, original) {
  2714.                 if (event.which == null) {
  2715.                     event.which = original.charCode != null ? original.charCode : original.keyCode;
  2716.                 }
  2717.                 return event;
  2718.             }
  2719.         },
  2720.         mouseHooks: {
  2721.             props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
  2722.             filter: function(event, original) {
  2723.                 var eventDoc, doc, body, button = original.button;
  2724.                 if (event.pageX == null && original.clientX != null) {
  2725.                     eventDoc = event.target.ownerDocument || document;
  2726.                     doc = eventDoc.documentElement;
  2727.                     body = eventDoc.body;
  2728.                     event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
  2729.                     event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
  2730.                 }
  2731.                 if (!event.which && button !== undefined) {
  2732.                     event.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0)));
  2733.                 }
  2734.                 return event;
  2735.             }
  2736.         },
  2737.         fix: function(event) {
  2738.             if (event[jQuery.expando]) {
  2739.                 return event;
  2740.             }
  2741.             var i, prop, copy, type = event.type,
  2742.                 originalEvent = event,
  2743.                 fixHook = this.fixHooks[type];
  2744.             if (!fixHook) {
  2745.                 this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {};
  2746.             }
  2747.             copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
  2748.             event = new jQuery.Event(originalEvent);
  2749.             i = copy.length;
  2750.             while (i--) {
  2751.                 prop = copy[i];
  2752.                 event[prop] = originalEvent[prop];
  2753.             }
  2754.             if (!event.target) {
  2755.                 event.target = document;
  2756.             }
  2757.             if (event.target.nodeType === 3) {
  2758.                 event.target = event.target.parentNode;
  2759.             }
  2760.             return fixHook.filter ? fixHook.filter(event, originalEvent) : event;
  2761.         },
  2762.         special: {
  2763.             load: {
  2764.                 noBubble: true
  2765.             },
  2766.             focus: {
  2767.                 trigger: function() {
  2768.                     if (this !== safeActiveElement() && this.focus) {
  2769.                         this.focus();
  2770.                         return false;
  2771.                     }
  2772.                 },
  2773.                 delegateType: "focusin"
  2774.             },
  2775.             blur: {
  2776.                 trigger: function() {
  2777.                     if (this === safeActiveElement() && this.blur) {
  2778.                         this.blur();
  2779.                         return false;
  2780.                     }
  2781.                 },
  2782.                 delegateType: "focusout"
  2783.             },
  2784.             click: {
  2785.                 trigger: function() {
  2786.                     if (this.type === "checkbox" && this.click && jQuery.nodeName(this, "input")) {
  2787.                         this.click();
  2788.                         return false;
  2789.                     }
  2790.                 },
  2791.                 _default: function(event) {
  2792.                     return jQuery.nodeName(event.target, "a");
  2793.                 }
  2794.             },
  2795.             beforeunload: {
  2796.                 postDispatch: function(event) {
  2797.                     if (event.result !== undefined && event.originalEvent) {
  2798.                         event.originalEvent.returnValue = event.result;
  2799.                     }
  2800.                 }
  2801.             }
  2802.         },
  2803.         simulate: function(type, elem, event, bubble) {
  2804.             var e = jQuery.extend(new jQuery.Event(), event, {
  2805.                 type: type,
  2806.                 isSimulated: true,
  2807.                 originalEvent: {}
  2808.             });
  2809.             if (bubble) {
  2810.                 jQuery.event.trigger(e, null, elem);
  2811.             } else {
  2812.                 jQuery.event.dispatch.call(elem, e);
  2813.             }
  2814.             if (e.isDefaultPrevented()) {
  2815.                 event.preventDefault();
  2816.             }
  2817.         }
  2818.     };
  2819.     jQuery.removeEvent = function(elem, type, handle) {
  2820.         if (elem.removeEventListener) {
  2821.             elem.removeEventListener(type, handle, false);
  2822.         }
  2823.     };
  2824.     jQuery.Event = function(src, props) {
  2825.         if (!(this instanceof jQuery.Event)) {
  2826.             return new jQuery.Event(src, props);
  2827.         }
  2828.         if (src && src.type) {
  2829.             this.originalEvent = src;
  2830.             this.type = src.type;
  2831.             this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && src.returnValue === false ? returnTrue : returnFalse;
  2832.         } else {
  2833.             this.type = src;
  2834.         }
  2835.         if (props) {
  2836.             jQuery.extend(this, props);
  2837.         }
  2838.         this.timeStamp = src && src.timeStamp || jQuery.now();
  2839.         this[jQuery.expando] = true;
  2840.     };
  2841.     jQuery.Event.prototype = {
  2842.         isDefaultPrevented: returnFalse,
  2843.         isPropagationStopped: returnFalse,
  2844.         isImmediatePropagationStopped: returnFalse,
  2845.         preventDefault: function() {
  2846.             var e = this.originalEvent;
  2847.             this.isDefaultPrevented = returnTrue;
  2848.             if (e && e.preventDefault) {
  2849.                 e.preventDefault();
  2850.             }
  2851.         },
  2852.         stopPropagation: function() {
  2853.             var e = this.originalEvent;
  2854.             this.isPropagationStopped = returnTrue;
  2855.             if (e && e.stopPropagation) {
  2856.                 e.stopPropagation();
  2857.             }
  2858.         },
  2859.         stopImmediatePropagation: function() {
  2860.             var e = this.originalEvent;
  2861.             this.isImmediatePropagationStopped = returnTrue;
  2862.             if (e && e.stopImmediatePropagation) {
  2863.                 e.stopImmediatePropagation();
  2864.             }
  2865.             this.stopPropagation();
  2866.         }
  2867.     };
  2868.     jQuery.each({
  2869.         mouseenter: "mouseover",
  2870.         mouseleave: "mouseout",
  2871.         pointerenter: "pointerover",
  2872.         pointerleave: "pointerout"
  2873.     }, function(orig, fix) {
  2874.         jQuery.event.special[orig] = {
  2875.             delegateType: fix,
  2876.             bindType: fix,
  2877.             handle: function(event) {
  2878.                 var ret, target = this,
  2879.                     related = event.relatedTarget,
  2880.                     handleObj = event.handleObj;
  2881.                 if (!related || (related !== target && !jQuery.contains(target, related))) {
  2882.                     event.type = handleObj.origType;
  2883.                     ret = handleObj.handler.apply(this, arguments);
  2884.                     event.type = fix;
  2885.                 }
  2886.                 return ret;
  2887.             }
  2888.         };
  2889.     });
  2890.     if (!support.focusinBubbles) {
  2891.         jQuery.each({
  2892.             focus: "focusin",
  2893.             blur: "focusout"
  2894.         }, function(orig, fix) {
  2895.             var handler = function(event) {
  2896.                 jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true);
  2897.             };
  2898.             jQuery.event.special[fix] = {
  2899.                 setup: function() {
  2900.                     var doc = this.ownerDocument || this,
  2901.                         attaches = data_priv.access(doc, fix);
  2902.                     if (!attaches) {
  2903.                         doc.addEventListener(orig, handler, true);
  2904.                     }
  2905.                     data_priv.access(doc, fix, (attaches || 0) + 1);
  2906.                 },
  2907.                 teardown: function() {
  2908.                     var doc = this.ownerDocument || this,
  2909.                         attaches = data_priv.access(doc, fix) - 1;
  2910.                     if (!attaches) {
  2911.                         doc.removeEventListener(orig, handler, true);
  2912.                         data_priv.remove(doc, fix);
  2913.                     } else {
  2914.                         data_priv.access(doc, fix, attaches);
  2915.                     }
  2916.                 }
  2917.             };
  2918.         });
  2919.     }
  2920.     jQuery.fn.extend({
  2921.         on: function(types, selector, data, fn, one) {
  2922.             var origFn, type;
  2923.             if (typeof types === "object") {
  2924.                 if (typeof selector !== "string") {
  2925.                     data = data || selector;
  2926.                     selector = undefined;
  2927.                 }
  2928.                 for (type in types) {
  2929.                     this.on(type, selector, data, types[type], one);
  2930.                 }
  2931.                 return this;
  2932.             }
  2933.             if (data == null && fn == null) {
  2934.                 fn = selector;
  2935.                 data = selector = undefined;
  2936.             } else if (fn == null) {
  2937.                 if (typeof selector === "string") {
  2938.                     fn = data;
  2939.                     data = undefined;
  2940.                 } else {
  2941.                     fn = data;
  2942.                     data = selector;
  2943.                     selector = undefined;
  2944.                 }
  2945.             }
  2946.             if (fn === false) {
  2947.                 fn = returnFalse;
  2948.             } else if (!fn) {
  2949.                 return this;
  2950.             }
  2951.             if (one === 1) {
  2952.                 origFn = fn;
  2953.                 fn = function(event) {
  2954.                     jQuery().off(event);
  2955.                     return origFn.apply(this, arguments);
  2956.                 };
  2957.                 fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
  2958.             }
  2959.             return this.each(function() {
  2960.                 jQuery.event.add(this, types, fn, data, selector);
  2961.             });
  2962.         },
  2963.         one: function(types, selector, data, fn) {
  2964.             return this.on(types, selector, data, fn, 1);
  2965.         },
  2966.         off: function(types, selector, fn) {
  2967.             var handleObj, type;
  2968.             if (types && types.preventDefault && types.handleObj) {
  2969.                 handleObj = types.handleObj;
  2970.                 jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);
  2971.                 return this;
  2972.             }
  2973.             if (typeof types === "object") {
  2974.                 for (type in types) {
  2975.                     this.off(type, selector, types[type]);
  2976.                 }
  2977.                 return this;
  2978.             }
  2979.             if (selector === false || typeof selector === "function") {
  2980.                 fn = selector;
  2981.                 selector = undefined;
  2982.             }
  2983.             if (fn === false) {
  2984.                 fn = returnFalse;
  2985.             }
  2986.             return this.each(function() {
  2987.                 jQuery.event.remove(this, types, fn, selector);
  2988.             });
  2989.         },
  2990.         trigger: function(type, data) {
  2991.             return this.each(function() {
  2992.                 jQuery.event.trigger(type, data, this);
  2993.             });
  2994.         },
  2995.         triggerHandler: function(type, data) {
  2996.             var elem = this[0];
  2997.             if (elem) {
  2998.                 return jQuery.event.trigger(type, data, elem, true);
  2999.             }
  3000.         }
  3001.     });
  3002.     var
  3003.         rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
  3004.         rtagName = /<([\w:]+)/,
  3005.         rhtml = /<|&#?\w+;/,
  3006.         rnoInnerhtml = /<(?:script|style|link)/i,
  3007.         rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
  3008.         rscriptType = /^$|\/(?:java|ecma)script/i,
  3009.         rscriptTypeMasked = /^true\/(.*)/,
  3010.         rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
  3011.         wrapMap = {
  3012.             option: [1, "<select multiple='multiple'>", "</select>"],
  3013.             thead: [1, "<table>", "</table>"],
  3014.             col: [2, "<table><colgroup>", "</colgroup></table>"],
  3015.             tr: [2, "<table><tbody>", "</tbody></table>"],
  3016.             td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  3017.             _default: [0, "", ""]
  3018.         };
  3019.     wrapMap.optgroup = wrapMap.option;
  3020.     wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
  3021.     wrapMap.th = wrapMap.td;
  3022.  
  3023.     function manipulationTarget(elem, content) {
  3024.         return jQuery.nodeName(elem, "table") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody")) : elem;
  3025.     }
  3026.  
  3027.     function disableScript(elem) {
  3028.         elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
  3029.         return elem;
  3030.     }
  3031.  
  3032.     function restoreScript(elem) {
  3033.         var match = rscriptTypeMasked.exec(elem.type);
  3034.         if (match) {
  3035.             elem.type = match[1];
  3036.         } else {
  3037.             elem.removeAttribute("type");
  3038.         }
  3039.         return elem;
  3040.     }
  3041.  
  3042.     function setGlobalEval(elems, refElements) {
  3043.         var i = 0,
  3044.             l = elems.length;
  3045.         for (; i < l; i++) {
  3046.             data_priv.set(elems[i], "globalEval", !refElements || data_priv.get(refElements[i], "globalEval"));
  3047.         }
  3048.     }
  3049.  
  3050.     function cloneCopyEvent(src, dest) {
  3051.         var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
  3052.         if (dest.nodeType !== 1) {
  3053.             return;
  3054.         }
  3055.         if (data_priv.hasData(src)) {
  3056.             pdataOld = data_priv.access(src);
  3057.             pdataCur = data_priv.set(dest, pdataOld);
  3058.             events = pdataOld.events;
  3059.             if (events) {
  3060.                 delete pdataCur.handle;
  3061.                 pdataCur.events = {};
  3062.                 for (type in events) {
  3063.                     for (i = 0, l = events[type].length; i < l; i++) {
  3064.                         jQuery.event.add(dest, type, events[type][i]);
  3065.                     }
  3066.                 }
  3067.             }
  3068.         }
  3069.         if (data_user.hasData(src)) {
  3070.             udataOld = data_user.access(src);
  3071.             udataCur = jQuery.extend({}, udataOld);
  3072.             data_user.set(dest, udataCur);
  3073.         }
  3074.     }
  3075.  
  3076.     function getAll(context, tag) {
  3077.         var ret = context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : context.querySelectorAll ? context.querySelectorAll(tag || "*") : [];
  3078.         return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], ret) : ret;
  3079.     }
  3080.  
  3081.     function fixInput(src, dest) {
  3082.         var nodeName = dest.nodeName.toLowerCase();
  3083.         if (nodeName === "input" && rcheckableType.test(src.type)) {
  3084.             dest.checked = src.checked;
  3085.         } else if (nodeName === "input" || nodeName === "textarea") {
  3086.             dest.defaultValue = src.defaultValue;
  3087.         }
  3088.     }
  3089.     jQuery.extend({
  3090.         clone: function(elem, dataAndEvents, deepDataAndEvents) {
  3091.             var i, l, srcElements, destElements, clone = elem.cloneNode(true),
  3092.                 inPage = jQuery.contains(elem.ownerDocument, elem);
  3093.             if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
  3094.                 destElements = getAll(clone);
  3095.                 srcElements = getAll(elem);
  3096.                 for (i = 0, l = srcElements.length; i < l; i++) {
  3097.                     fixInput(srcElements[i], destElements[i]);
  3098.                 }
  3099.             }
  3100.             if (dataAndEvents) {
  3101.                 if (deepDataAndEvents) {
  3102.                     srcElements = srcElements || getAll(elem);
  3103.                     destElements = destElements || getAll(clone);
  3104.                     for (i = 0, l = srcElements.length; i < l; i++) {
  3105.                         cloneCopyEvent(srcElements[i], destElements[i]);
  3106.                     }
  3107.                 } else {
  3108.                     cloneCopyEvent(elem, clone);
  3109.                 }
  3110.             }
  3111.             destElements = getAll(clone, "script");
  3112.             if (destElements.length > 0) {
  3113.                 setGlobalEval(destElements, !inPage && getAll(elem, "script"));
  3114.             }
  3115.             return clone;
  3116.         },
  3117.         buildFragment: function(elems, context, scripts, selection) {
  3118.             var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(),
  3119.                 nodes = [],
  3120.                 i = 0,
  3121.                 l = elems.length;
  3122.             for (; i < l; i++) {
  3123.                 elem = elems[i];
  3124.                 if (elem || elem === 0) {
  3125.                     if (jQuery.type(elem) === "object") {
  3126.                         jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
  3127.                     } else if (!rhtml.test(elem)) {
  3128.                         nodes.push(context.createTextNode(elem));
  3129.                     } else {
  3130.                         tmp = tmp || fragment.appendChild(context.createElement("div"));
  3131.                         tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
  3132.                         wrap = wrapMap[tag] || wrapMap._default;
  3133.                         tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2];
  3134.                         j = wrap[0];
  3135.                         while (j--) {
  3136.                             tmp = tmp.lastChild;
  3137.                         }
  3138.                         jQuery.merge(nodes, tmp.childNodes);
  3139.                         tmp = fragment.firstChild;
  3140.                         tmp.textContent = "";
  3141.                     }
  3142.                 }
  3143.             }
  3144.             fragment.textContent = "";
  3145.             i = 0;
  3146.             while ((elem = nodes[i++])) {
  3147.                 if (selection && jQuery.inArray(elem, selection) !== -1) {
  3148.                     continue;
  3149.                 }
  3150.                 contains = jQuery.contains(elem.ownerDocument, elem);
  3151.                 tmp = getAll(fragment.appendChild(elem), "script");
  3152.                 if (contains) {
  3153.                     setGlobalEval(tmp);
  3154.                 }
  3155.                 if (scripts) {
  3156.                     j = 0;
  3157.                     while ((elem = tmp[j++])) {
  3158.                         if (rscriptType.test(elem.type || "")) {
  3159.                             scripts.push(elem);
  3160.                         }
  3161.                     }
  3162.                 }
  3163.             }
  3164.             return fragment;
  3165.         },
  3166.         cleanData: function(elems) {
  3167.             var data, elem, type, key, special = jQuery.event.special,
  3168.                 i = 0;
  3169.             for (;
  3170.                 (elem = elems[i]) !== undefined; i++) {
  3171.                 if (jQuery.acceptData(elem)) {
  3172.                     key = elem[data_priv.expando];
  3173.                     if (key && (data = data_priv.cache[key])) {
  3174.                         if (data.events) {
  3175.                             for (type in data.events) {
  3176.                                 if (special[type]) {
  3177.                                     jQuery.event.remove(elem, type);
  3178.                                 } else {
  3179.                                     jQuery.removeEvent(elem, type, data.handle);
  3180.                                 }
  3181.                             }
  3182.                         }
  3183.                         if (data_priv.cache[key]) {
  3184.                             delete data_priv.cache[key];
  3185.                         }
  3186.                     }
  3187.                 }
  3188.                 delete data_user.cache[elem[data_user.expando]];
  3189.             }
  3190.         }
  3191.     });
  3192.     jQuery.fn.extend({
  3193.         text: function(value) {
  3194.             return access(this, function(value) {
  3195.                 return value === undefined ? jQuery.text(this) : this.empty().each(function() {
  3196.                     if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3197.                         this.textContent = value;
  3198.                     }
  3199.                 });
  3200.             }, null, value, arguments.length);
  3201.         },
  3202.         append: function() {
  3203.             return this.domManip(arguments, function(elem) {
  3204.                 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3205.                     var target = manipulationTarget(this, elem);
  3206.                     target.appendChild(elem);
  3207.                 }
  3208.             });
  3209.         },
  3210.         prepend: function() {
  3211.             return this.domManip(arguments, function(elem) {
  3212.                 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3213.                     var target = manipulationTarget(this, elem);
  3214.                     target.insertBefore(elem, target.firstChild);
  3215.                 }
  3216.             });
  3217.         },
  3218.         before: function() {
  3219.             return this.domManip(arguments, function(elem) {
  3220.                 if (this.parentNode) {
  3221.                     this.parentNode.insertBefore(elem, this);
  3222.                 }
  3223.             });
  3224.         },
  3225.         after: function() {
  3226.             return this.domManip(arguments, function(elem) {
  3227.                 if (this.parentNode) {
  3228.                     this.parentNode.insertBefore(elem, this.nextSibling);
  3229.                 }
  3230.             });
  3231.         },
  3232.         remove: function(selector, keepData) {
  3233.             var elem, elems = selector ? jQuery.filter(selector, this) : this,
  3234.                 i = 0;
  3235.             for (;
  3236.                 (elem = elems[i]) != null; i++) {
  3237.                 if (!keepData && elem.nodeType === 1) {
  3238.                     jQuery.cleanData(getAll(elem));
  3239.                 }
  3240.                 if (elem.parentNode) {
  3241.                     if (keepData && jQuery.contains(elem.ownerDocument, elem)) {
  3242.                         setGlobalEval(getAll(elem, "script"));
  3243.                     }
  3244.                     elem.parentNode.removeChild(elem);
  3245.                 }
  3246.             }
  3247.             return this;
  3248.         },
  3249.         empty: function() {
  3250.             var elem, i = 0;
  3251.             for (;
  3252.                 (elem = this[i]) != null; i++) {
  3253.                 if (elem.nodeType === 1) {
  3254.                     jQuery.cleanData(getAll(elem, false));
  3255.                     elem.textContent = "";
  3256.                 }
  3257.             }
  3258.             return this;
  3259.         },
  3260.         clone: function(dataAndEvents, deepDataAndEvents) {
  3261.             dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
  3262.             deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
  3263.             return this.map(function() {
  3264.                 return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
  3265.             });
  3266.         },
  3267.         html: function(value) {
  3268.             return access(this, function(value) {
  3269.                 var elem = this[0] || {},
  3270.                     i = 0,
  3271.                     l = this.length;
  3272.                 if (value === undefined && elem.nodeType === 1) {
  3273.                     return elem.innerHTML;
  3274.                 }
  3275.                 if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
  3276.                     value = value.replace(rxhtmlTag, "<$1></$2>");
  3277.                     try {
  3278.                         for (; i < l; i++) {
  3279.                             elem = this[i] || {};
  3280.                             if (elem.nodeType === 1) {
  3281.                                 jQuery.cleanData(getAll(elem, false));
  3282.                                 elem.innerHTML = value;
  3283.                             }
  3284.                         }
  3285.                         elem = 0;
  3286.                     } catch (e) {}
  3287.                 }
  3288.                 if (elem) {
  3289.                     this.empty().append(value);
  3290.                 }
  3291.             }, null, value, arguments.length);
  3292.         },
  3293.         replaceWith: function() {
  3294.             var arg = arguments[0];
  3295.             this.domManip(arguments, function(elem) {
  3296.                 arg = this.parentNode;
  3297.                 jQuery.cleanData(getAll(this));
  3298.                 if (arg) {
  3299.                     arg.replaceChild(elem, this);
  3300.                 }
  3301.             });
  3302.             return arg && (arg.length || arg.nodeType) ? this : this.remove();
  3303.         },
  3304.         detach: function(selector) {
  3305.             return this.remove(selector, true);
  3306.         },
  3307.         domManip: function(args, callback) {
  3308.             args = concat.apply([], args);
  3309.             var fragment, first, scripts, hasScripts, node, doc, i = 0,
  3310.                 l = this.length,
  3311.                 set = this,
  3312.                 iNoClone = l - 1,
  3313.                 value = args[0],
  3314.                 isFunction = jQuery.isFunction(value);
  3315.             if (isFunction || (l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value))) {
  3316.                 return this.each(function(index) {
  3317.                     var self = set.eq(index);
  3318.                     if (isFunction) {
  3319.                         args[0] = value.call(this, index, self.html());
  3320.                     }
  3321.                     self.domManip(args, callback);
  3322.                 });
  3323.             }
  3324.             if (l) {
  3325.                 fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, this);
  3326.                 first = fragment.firstChild;
  3327.                 if (fragment.childNodes.length === 1) {
  3328.                     fragment = first;
  3329.                 }
  3330.                 if (first) {
  3331.                     scripts = jQuery.map(getAll(fragment, "script"), disableScript);
  3332.                     hasScripts = scripts.length;
  3333.                     for (; i < l; i++) {
  3334.                         node = fragment;
  3335.                         if (i !== iNoClone) {
  3336.                             node = jQuery.clone(node, true, true);
  3337.                             if (hasScripts) {
  3338.                                 jQuery.merge(scripts, getAll(node, "script"));
  3339.                             }
  3340.                         }
  3341.                         callback.call(this[i], node, i);
  3342.                     }
  3343.                     if (hasScripts) {
  3344.                         doc = scripts[scripts.length - 1].ownerDocument;
  3345.                         jQuery.map(scripts, restoreScript);
  3346.                         for (i = 0; i < hasScripts; i++) {
  3347.                             node = scripts[i];
  3348.                             if (rscriptType.test(node.type || "") && !data_priv.access(node, "globalEval") && jQuery.contains(doc, node)) {
  3349.                                 if (node.src) {
  3350.                                     if (jQuery._evalUrl) {
  3351.                                         jQuery._evalUrl(node.src);
  3352.                                     }
  3353.                                 } else {
  3354.                                     jQuery.globalEval(node.textContent.replace(rcleanScript, ""));
  3355.                                 }
  3356.                             }
  3357.                         }
  3358.                     }
  3359.                 }
  3360.             }
  3361.             return this;
  3362.         }
  3363.     });
  3364.     jQuery.each({
  3365.         appendTo: "append",
  3366.         prependTo: "prepend",
  3367.         insertBefore: "before",
  3368.         insertAfter: "after",
  3369.         replaceAll: "replaceWith"
  3370.     }, function(name, original) {
  3371.         jQuery.fn[name] = function(selector) {
  3372.             var elems, ret = [],
  3373.                 insert = jQuery(selector),
  3374.                 last = insert.length - 1,
  3375.                 i = 0;
  3376.             for (; i <= last; i++) {
  3377.                 elems = i === last ? this : this.clone(true);
  3378.                 jQuery(insert[i])[original](elems);
  3379.                 push.apply(ret, elems.get());
  3380.             }
  3381.             return this.pushStack(ret);
  3382.         };
  3383.     });
  3384.     var iframe, elemdisplay = {};
  3385.  
  3386.     function actualDisplay(name, doc) {
  3387.         var style, elem = jQuery(doc.createElement(name)).appendTo(doc.body),
  3388.             display = window.getDefaultComputedStyle && (style = window.getDefaultComputedStyle(elem[0])) ? style.display : jQuery.css(elem[0], "display");
  3389.         elem.detach();
  3390.         return display;
  3391.     }
  3392.  
  3393.     function defaultDisplay(nodeName) {
  3394.         var doc = document,
  3395.             display = elemdisplay[nodeName];
  3396.         if (!display) {
  3397.             display = actualDisplay(nodeName, doc);
  3398.             if (display === "none" || !display) {
  3399.                 iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);
  3400.                 doc = iframe[0].contentDocument;
  3401.                 doc.write();
  3402.                 doc.close();
  3403.                 display = actualDisplay(nodeName, doc);
  3404.                 iframe.detach();
  3405.             }
  3406.             elemdisplay[nodeName] = display;
  3407.         }
  3408.         return display;
  3409.     }
  3410.     var rmargin = (/^margin/);
  3411.     var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
  3412.     var getStyles = function(elem) {
  3413.         if (elem.ownerDocument.defaultView.opener) {
  3414.             return elem.ownerDocument.defaultView.getComputedStyle(elem, null);
  3415.         }
  3416.         return window.getComputedStyle(elem, null);
  3417.     };
  3418.  
  3419.     function curCSS(elem, name, computed) {
  3420.         var width, minWidth, maxWidth, ret, style = elem.style;
  3421.         computed = computed || getStyles(elem);
  3422.         if (computed) {
  3423.             ret = computed.getPropertyValue(name) || computed[name];
  3424.         }
  3425.         if (computed) {
  3426.             if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
  3427.                 ret = jQuery.style(elem, name);
  3428.             }
  3429.             if (rnumnonpx.test(ret) && rmargin.test(name)) {
  3430.                 width = style.width;
  3431.                 minWidth = style.minWidth;
  3432.                 maxWidth = style.maxWidth;
  3433.                 style.minWidth = style.maxWidth = style.width = ret;
  3434.                 ret = computed.width;
  3435.                 style.width = width;
  3436.                 style.minWidth = minWidth;
  3437.                 style.maxWidth = maxWidth;
  3438.             }
  3439.         }
  3440.         return ret !== undefined ? ret + "" : ret;
  3441.     }
  3442.  
  3443.     function addGetHookIf(conditionFn, hookFn) {
  3444.         return {
  3445.             get: function() {
  3446.                 if (conditionFn()) {
  3447.                     delete this.get;
  3448.                     return;
  3449.                 }
  3450.                 return (this.get = hookFn).apply(this, arguments);
  3451.             }
  3452.         };
  3453.     }(function() {
  3454.         var pixelPositionVal, boxSizingReliableVal, docElem = document.documentElement,
  3455.             container = document.createElement("div"),
  3456.             div = document.createElement("div");
  3457.         if (!div.style) {
  3458.             return;
  3459.         }
  3460.         div.style.backgroundClip = "content-box";
  3461.         div.cloneNode(true).style.backgroundClip = "";
  3462.         support.clearCloneStyle = div.style.backgroundClip === "content-box";
  3463.         container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" + "position:absolute";
  3464.         container.appendChild(div);
  3465.  
  3466.         function computePixelPositionAndBoxSizingReliable() {
  3467.             div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute";
  3468.             div.innerHTML = "";
  3469.             docElem.appendChild(container);
  3470.             var divStyle = window.getComputedStyle(div, null);
  3471.             pixelPositionVal = divStyle.top !== "1%";
  3472.             boxSizingReliableVal = divStyle.width === "4px";
  3473.             docElem.removeChild(container);
  3474.         }
  3475.         if (window.getComputedStyle) {
  3476.             jQuery.extend(support, {
  3477.                 pixelPosition: function() {
  3478.                     computePixelPositionAndBoxSizingReliable();
  3479.                     return pixelPositionVal;
  3480.                 },
  3481.                 boxSizingReliable: function() {
  3482.                     if (boxSizingReliableVal == null) {
  3483.                         computePixelPositionAndBoxSizingReliable();
  3484.                     }
  3485.                     return boxSizingReliableVal;
  3486.                 },
  3487.                 reliableMarginRight: function() {
  3488.                     var ret, marginDiv = div.appendChild(document.createElement("div"));
  3489.                     marginDiv.style.cssText = div.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
  3490.                     marginDiv.style.marginRight = marginDiv.style.width = "0";
  3491.                     div.style.width = "1px";
  3492.                     docElem.appendChild(container);
  3493.                     ret = !parseFloat(window.getComputedStyle(marginDiv, null).marginRight);
  3494.                     docElem.removeChild(container);
  3495.                     div.removeChild(marginDiv);
  3496.                     return ret;
  3497.                 }
  3498.             });
  3499.         }
  3500.     })();
  3501.     jQuery.swap = function(elem, options, callback, args) {
  3502.         var ret, name, old = {};
  3503.         for (name in options) {
  3504.             old[name] = elem.style[name];
  3505.             elem.style[name] = options[name];
  3506.         }
  3507.         ret = callback.apply(elem, args || []);
  3508.         for (name in options) {
  3509.             elem.style[name] = old[name];
  3510.         }
  3511.         return ret;
  3512.     };
  3513.     var
  3514.         rdisplayswap = /^(none|table(?!-c[ea]).+)/,
  3515.         rnumsplit = new RegExp("^(" + pnum + ")(.*)$", "i"),
  3516.         rrelNum = new RegExp("^([+-])=(" + pnum + ")", "i"),
  3517.         cssShow = {
  3518.             position: "absolute",
  3519.             visibility: "hidden",
  3520.             display: "block"
  3521.         },
  3522.         cssNormalTransform = {
  3523.             letterSpacing: "0",
  3524.             fontWeight: "400"
  3525.         },
  3526.         cssPrefixes = ["Webkit", "O", "Moz", "ms"];
  3527.  
  3528.     function vendorPropName(style, name) {
  3529.         if (name in style) {
  3530.             return name;
  3531.         }
  3532.         var capName = name[0].toUpperCase() + name.slice(1),
  3533.             origName = name,
  3534.             i = cssPrefixes.length;
  3535.         while (i--) {
  3536.             name = cssPrefixes[i] + capName;
  3537.             if (name in style) {
  3538.                 return name;
  3539.             }
  3540.         }
  3541.         return origName;
  3542.     }
  3543.  
  3544.     function setPositiveNumber(elem, value, subtract) {
  3545.         var matches = rnumsplit.exec(value);
  3546.         return matches ? Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") : value;
  3547.     }
  3548.  
  3549.     function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
  3550.         var i = extra === (isBorderBox ? "border" : "content") ? 4 : name === "width" ? 1 : 0,
  3551.             val = 0;
  3552.         for (; i < 4; i += 2) {
  3553.             if (extra === "margin") {
  3554.                 val += jQuery.css(elem, extra + cssExpand[i], true, styles);
  3555.             }
  3556.             if (isBorderBox) {
  3557.                 if (extra === "content") {
  3558.                     val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  3559.                 }
  3560.                 if (extra !== "margin") {
  3561.                     val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  3562.                 }
  3563.             } else {
  3564.                 val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  3565.                 if (extra !== "padding") {
  3566.                     val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  3567.                 }
  3568.             }
  3569.         }
  3570.         return val;
  3571.     }
  3572.  
  3573.     function getWidthOrHeight(elem, name, extra) {
  3574.         var valueIsBorderBox = true,
  3575.             val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
  3576.             styles = getStyles(elem),
  3577.             isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box";
  3578.         if (val <= 0 || val == null) {
  3579.             val = curCSS(elem, name, styles);
  3580.             if (val < 0 || val == null) {
  3581.                 val = elem.style[name];
  3582.             }
  3583.             if (rnumnonpx.test(val)) {
  3584.                 return val;
  3585.             }
  3586.             valueIsBorderBox = isBorderBox && (support.boxSizingReliable() || val === elem.style[name]);
  3587.             val = parseFloat(val) || 0;
  3588.         }
  3589.         return (val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles)) + "px";
  3590.     }
  3591.  
  3592.     function showHide(elements, show) {
  3593.         var display, elem, hidden, values = [],
  3594.             index = 0,
  3595.             length = elements.length;
  3596.         for (; index < length; index++) {
  3597.             elem = elements[index];
  3598.             if (!elem.style) {
  3599.                 continue;
  3600.             }
  3601.             values[index] = data_priv.get(elem, "olddisplay");
  3602.             display = elem.style.display;
  3603.             if (show) {
  3604.                 if (!values[index] && display === "none") {
  3605.                     elem.style.display = "";
  3606.                 }
  3607.                 if (elem.style.display === "" && isHidden(elem)) {
  3608.                     values[index] = data_priv.access(elem, "olddisplay", defaultDisplay(elem.nodeName));
  3609.                 }
  3610.             } else {
  3611.                 hidden = isHidden(elem);
  3612.                 if (display !== "none" || !hidden) {
  3613.                     data_priv.set(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display"));
  3614.                 }
  3615.             }
  3616.         }
  3617.         for (index = 0; index < length; index++) {
  3618.             elem = elements[index];
  3619.             if (!elem.style) {
  3620.                 continue;
  3621.             }
  3622.             if (!show || elem.style.display === "none" || elem.style.display === "") {
  3623.                 elem.style.display = show ? values[index] || "" : "none";
  3624.             }
  3625.         }
  3626.         return elements;
  3627.     }
  3628.     jQuery.extend({
  3629.         cssHooks: {
  3630.             opacity: {
  3631.                 get: function(elem, computed) {
  3632.                     if (computed) {
  3633.                         var ret = curCSS(elem, "opacity");
  3634.                         return ret === "" ? "1" : ret;
  3635.                     }
  3636.                 }
  3637.             }
  3638.         },
  3639.         cssNumber: {
  3640.             "columnCount": true,
  3641.             "fillOpacity": true,
  3642.             "flexGrow": true,
  3643.             "flexShrink": true,
  3644.             "fontWeight": true,
  3645.             "lineHeight": true,
  3646.             "opacity": true,
  3647.             "order": true,
  3648.             "orphans": true,
  3649.             "widows": true,
  3650.             "zIndex": true,
  3651.             "zoom": true
  3652.         },
  3653.         cssProps: {
  3654.             "float": "cssFloat"
  3655.         },
  3656.         style: function(elem, name, value, extra) {
  3657.             if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
  3658.                 return;
  3659.             }
  3660.             var ret, type, hooks, origName = jQuery.camelCase(name),
  3661.                 style = elem.style;
  3662.             name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style, origName));
  3663.             hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  3664.             if (value !== undefined) {
  3665.                 type = typeof value;
  3666.                 if (type === "string" && (ret = rrelNum.exec(value))) {
  3667.                     value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name));
  3668.                     type = "number";
  3669.                 }
  3670.                 if (value == null || value !== value) {
  3671.                     return;
  3672.                 }
  3673.                 if (type === "number" && !jQuery.cssNumber[origName]) {
  3674.                     value += "px";
  3675.                 }
  3676.                 if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
  3677.                     style[name] = "inherit";
  3678.                 }
  3679.                 if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
  3680.                     style[name] = value;
  3681.                 }
  3682.             } else {
  3683.                 if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
  3684.                     return ret;
  3685.                 }
  3686.                 return style[name];
  3687.             }
  3688.         },
  3689.         css: function(elem, name, extra, styles) {
  3690.             var val, num, hooks, origName = jQuery.camelCase(name);
  3691.             name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style, origName));
  3692.             hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  3693.             if (hooks && "get" in hooks) {
  3694.                 val = hooks.get(elem, true, extra);
  3695.             }
  3696.             if (val === undefined) {
  3697.                 val = curCSS(elem, name, styles);
  3698.             }
  3699.             if (val === "normal" && name in cssNormalTransform) {
  3700.                 val = cssNormalTransform[name];
  3701.             }
  3702.             if (extra === "" || extra) {
  3703.                 num = parseFloat(val);
  3704.                 return extra === true || jQuery.isNumeric(num) ? num || 0 : val;
  3705.             }
  3706.             return val;
  3707.         }
  3708.     });
  3709.     jQuery.each(["height", "width"], function(i, name) {
  3710.         jQuery.cssHooks[name] = {
  3711.             get: function(elem, computed, extra) {
  3712.                 if (computed) {
  3713.                     return rdisplayswap.test(jQuery.css(elem, "display")) && elem.offsetWidth === 0 ? jQuery.swap(elem, cssShow, function() {
  3714.                         return getWidthOrHeight(elem, name, extra);
  3715.                     }) : getWidthOrHeight(elem, name, extra);
  3716.                 }
  3717.             },
  3718.             set: function(elem, value, extra) {
  3719.                 var styles = extra && getStyles(elem);
  3720.                 return setPositiveNumber(elem, value, extra ? augmentWidthOrHeight(elem, name, extra, jQuery.css(elem, "boxSizing", false, styles) === "border-box", styles) : 0);
  3721.             }
  3722.         };
  3723.     });
  3724.     jQuery.cssHooks.marginRight = addGetHookIf(support.reliableMarginRight, function(elem, computed) {
  3725.         if (computed) {
  3726.             return jQuery.swap(elem, {
  3727.                 "display": "inline-block"
  3728.             }, curCSS, [elem, "marginRight"]);
  3729.         }
  3730.     });
  3731.     jQuery.each({
  3732.         margin: "",
  3733.         padding: "",
  3734.         border: "Width"
  3735.     }, function(prefix, suffix) {
  3736.         jQuery.cssHooks[prefix + suffix] = {
  3737.             expand: function(value) {
  3738.                 var i = 0,
  3739.                     expanded = {},
  3740.                     parts = typeof value === "string" ? value.split(" ") : [value];
  3741.                 for (; i < 4; i++) {
  3742.                     expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
  3743.                 }
  3744.                 return expanded;
  3745.             }
  3746.         };
  3747.         if (!rmargin.test(prefix)) {
  3748.             jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
  3749.         }
  3750.     });
  3751.     jQuery.fn.extend({
  3752.         css: function(name, value) {
  3753.             return access(this, function(elem, name, value) {
  3754.                 var styles, len, map = {},
  3755.                     i = 0;
  3756.                 if (jQuery.isArray(name)) {
  3757.                     styles = getStyles(elem);
  3758.                     len = name.length;
  3759.                     for (; i < len; i++) {
  3760.                         map[name[i]] = jQuery.css(elem, name[i], false, styles);
  3761.                     }
  3762.                     return map;
  3763.                 }
  3764.                 return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name);
  3765.             }, name, value, arguments.length > 1);
  3766.         },
  3767.         show: function() {
  3768.             return showHide(this, true);
  3769.         },
  3770.         hide: function() {
  3771.             return showHide(this);
  3772.         },
  3773.         toggle: function(state) {
  3774.             if (typeof state === "boolean") {
  3775.                 return state ? this.show() : this.hide();
  3776.             }
  3777.             return this.each(function() {
  3778.                 if (isHidden(this)) {
  3779.                     jQuery(this).show();
  3780.                 } else {
  3781.                     jQuery(this).hide();
  3782.                 }
  3783.             });
  3784.         }
  3785.     });
  3786.  
  3787.     function Tween(elem, options, prop, end, easing) {
  3788.         return new Tween.prototype.init(elem, options, prop, end, easing);
  3789.     }
  3790.     jQuery.Tween = Tween;
  3791.     Tween.prototype = {
  3792.         constructor: Tween,
  3793.         init: function(elem, options, prop, end, easing, unit) {
  3794.             this.elem = elem;
  3795.             this.prop = prop;
  3796.             this.easing = easing || "swing";
  3797.             this.options = options;
  3798.             this.start = this.now = this.cur();
  3799.             this.end = end;
  3800.             this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
  3801.         },
  3802.         cur: function() {
  3803.             var hooks = Tween.propHooks[this.prop];
  3804.             return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
  3805.         },
  3806.         run: function(percent) {
  3807.             var eased, hooks = Tween.propHooks[this.prop];
  3808.             if (this.options.duration) {
  3809.                 this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration);
  3810.             } else {
  3811.                 this.pos = eased = percent;
  3812.             }
  3813.             this.now = (this.end - this.start) * eased + this.start;
  3814.             if (this.options.step) {
  3815.                 this.options.step.call(this.elem, this.now, this);
  3816.             }
  3817.             if (hooks && hooks.set) {
  3818.                 hooks.set(this);
  3819.             } else {
  3820.                 Tween.propHooks._default.set(this);
  3821.             }
  3822.             return this;
  3823.         }
  3824.     };
  3825.     Tween.prototype.init.prototype = Tween.prototype;
  3826.     Tween.propHooks = {
  3827.         _default: {
  3828.             get: function(tween) {
  3829.                 var result;
  3830.                 if (tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] == null)) {
  3831.                     return tween.elem[tween.prop];
  3832.                 }
  3833.                 result = jQuery.css(tween.elem, tween.prop, "");
  3834.                 return !result || result === "auto" ? 0 : result;
  3835.             },
  3836.             set: function(tween) {
  3837.                 if (jQuery.fx.step[tween.prop]) {
  3838.                     jQuery.fx.step[tween.prop](tween);
  3839.                 } else if (tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop])) {
  3840.                     jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
  3841.                 } else {
  3842.                     tween.elem[tween.prop] = tween.now;
  3843.                 }
  3844.             }
  3845.         }
  3846.     };
  3847.     Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
  3848.         set: function(tween) {
  3849.             if (tween.elem.nodeType && tween.elem.parentNode) {
  3850.                 tween.elem[tween.prop] = tween.now;
  3851.             }
  3852.         }
  3853.     };
  3854.     jQuery.easing = {
  3855.         linear: function(p) {
  3856.             return p;
  3857.         },
  3858.         swing: function(p) {
  3859.             return 0.5 - Math.cos(p * Math.PI) / 2;
  3860.         }
  3861.     };
  3862.     jQuery.fx = Tween.prototype.init;
  3863.     jQuery.fx.step = {};
  3864.     var
  3865.         fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/,
  3866.         rfxnum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"),
  3867.         rrun = /queueHooks$/,
  3868.         animationPrefilters = [defaultPrefilter],
  3869.         tweeners = {
  3870.             "*": [function(prop, value) {
  3871.                 var tween = this.createTween(prop, value),
  3872.                     target = tween.cur(),
  3873.                     parts = rfxnum.exec(value),
  3874.                     unit = parts && parts[3] || (jQuery.cssNumber[prop] ? "" : "px"),
  3875.                     start = (jQuery.cssNumber[prop] || unit !== "px" && +target) && rfxnum.exec(jQuery.css(tween.elem, prop)),
  3876.                     scale = 1,
  3877.                     maxIterations = 20;
  3878.                 if (start && start[3] !== unit) {
  3879.                     unit = unit || start[3];
  3880.                     parts = parts || [];
  3881.                     start = +target || 1;
  3882.                     do {
  3883.                         scale = scale || ".5";
  3884.                         start = start / scale;
  3885.                         jQuery.style(tween.elem, prop, start + unit);
  3886.                     } while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations);
  3887.                 }
  3888.                 if (parts) {
  3889.                     start = tween.start = +start || +target || 0;
  3890.                     tween.unit = unit;
  3891.                     tween.end = parts[1] ? start + (parts[1] + 1) * parts[2] : +parts[2];
  3892.                 }
  3893.                 return tween;
  3894.             }]
  3895.         };
  3896.  
  3897.     function createFxNow() {
  3898.         setTimeout(function() {
  3899.             fxNow = undefined;
  3900.         });
  3901.         return (fxNow = jQuery.now());
  3902.     }
  3903.  
  3904.     function genFx(type, includeWidth) {
  3905.         var which, i = 0,
  3906.             attrs = {
  3907.                 height: type
  3908.             };
  3909.         includeWidth = includeWidth ? 1 : 0;
  3910.         for (; i < 4; i += 2 - includeWidth) {
  3911.             which = cssExpand[i];
  3912.             attrs["margin" + which] = attrs["padding" + which] = type;
  3913.         }
  3914.         if (includeWidth) {
  3915.             attrs.opacity = attrs.width = type;
  3916.         }
  3917.         return attrs;
  3918.     }
  3919.  
  3920.     function createTween(value, prop, animation) {
  3921.         var tween, collection = (tweeners[prop] || []).concat(tweeners["*"]),
  3922.             index = 0,
  3923.             length = collection.length;
  3924.         for (; index < length; index++) {
  3925.             if ((tween = collection[index].call(animation, prop, value))) {
  3926.                 return tween;
  3927.             }
  3928.         }
  3929.     }
  3930.  
  3931.     function defaultPrefilter(elem, props, opts) {
  3932.         var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, anim = this,
  3933.             orig = {},
  3934.             style = elem.style,
  3935.             hidden = elem.nodeType && isHidden(elem),
  3936.             dataShow = data_priv.get(elem, "fxshow");
  3937.         if (!opts.queue) {
  3938.             hooks = jQuery._queueHooks(elem, "fx");
  3939.             if (hooks.unqueued == null) {
  3940.                 hooks.unqueued = 0;
  3941.                 oldfire = hooks.empty.fire;
  3942.                 hooks.empty.fire = function() {
  3943.                     if (!hooks.unqueued) {
  3944.                         oldfire();
  3945.                     }
  3946.                 };
  3947.             }
  3948.             hooks.unqueued++;
  3949.             anim.always(function() {
  3950.                 anim.always(function() {
  3951.                     hooks.unqueued--;
  3952.                     if (!jQuery.queue(elem, "fx").length) {
  3953.                         hooks.empty.fire();
  3954.                     }
  3955.                 });
  3956.             });
  3957.         }
  3958.         if (elem.nodeType === 1 && ("height" in props || "width" in props)) {
  3959.             opts.overflow = [style.overflow, style.overflowX, style.overflowY];
  3960.             display = jQuery.css(elem, "display");
  3961.             checkDisplay = display === "none" ? data_priv.get(elem, "olddisplay") || defaultDisplay(elem.nodeName) : display;
  3962.             if (checkDisplay === "inline" && jQuery.css(elem, "float") === "none") {
  3963.                 style.display = "inline-block";
  3964.             }
  3965.         }
  3966.         if (opts.overflow) {
  3967.             style.overflow = "hidden";
  3968.             anim.always(function() {
  3969.                 style.overflow = opts.overflow[0];
  3970.                 style.overflowX = opts.overflow[1];
  3971.                 style.overflowY = opts.overflow[2];
  3972.             });
  3973.         }
  3974.         for (prop in props) {
  3975.             value = props[prop];
  3976.             if (rfxtypes.exec(value)) {
  3977.                 delete props[prop];
  3978.                 toggle = toggle || value === "toggle";
  3979.                 if (value === (hidden ? "hide" : "show")) {
  3980.                     if (value === "show" && dataShow && dataShow[prop] !== undefined) {
  3981.                         hidden = true;
  3982.                     } else {
  3983.                         continue;
  3984.                     }
  3985.                 }
  3986.                 orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
  3987.             } else {
  3988.                 display = undefined;
  3989.             }
  3990.         }
  3991.         if (!jQuery.isEmptyObject(orig)) {
  3992.             if (dataShow) {
  3993.                 if ("hidden" in dataShow) {
  3994.                     hidden = dataShow.hidden;
  3995.                 }
  3996.             } else {
  3997.                 dataShow = data_priv.access(elem, "fxshow", {});
  3998.             }
  3999.             if (toggle) {
  4000.                 dataShow.hidden = !hidden;
  4001.             }
  4002.             if (hidden) {
  4003.                 jQuery(elem).show();
  4004.             } else {
  4005.                 anim.done(function() {
  4006.                     jQuery(elem).hide();
  4007.                 });
  4008.             }
  4009.             anim.done(function() {
  4010.                 var prop;
  4011.                 data_priv.remove(elem, "fxshow");
  4012.                 for (prop in orig) {
  4013.                     jQuery.style(elem, prop, orig[prop]);
  4014.                 }
  4015.             });
  4016.             for (prop in orig) {
  4017.                 tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
  4018.                 if (!(prop in dataShow)) {
  4019.                     dataShow[prop] = tween.start;
  4020.                     if (hidden) {
  4021.                         tween.end = tween.start;
  4022.                         tween.start = prop === "width" || prop === "height" ? 1 : 0;
  4023.                     }
  4024.                 }
  4025.             }
  4026.         } else if ((display === "none" ? defaultDisplay(elem.nodeName) : display) === "inline") {
  4027.             style.display = display;
  4028.         }
  4029.     }
  4030.  
  4031.     function propFilter(props, specialEasing) {
  4032.         var index, name, easing, value, hooks;
  4033.         for (index in props) {
  4034.             name = jQuery.camelCase(index);
  4035.             easing = specialEasing[name];
  4036.             value = props[index];
  4037.             if (jQuery.isArray(value)) {
  4038.                 easing = value[1];
  4039.                 value = props[index] = value[0];
  4040.             }
  4041.             if (index !== name) {
  4042.                 props[name] = value;
  4043.                 delete props[index];
  4044.             }
  4045.             hooks = jQuery.cssHooks[name];
  4046.             if (hooks && "expand" in hooks) {
  4047.                 value = hooks.expand(value);
  4048.                 delete props[name];
  4049.                 for (index in value) {
  4050.                     if (!(index in props)) {
  4051.                         props[index] = value[index];
  4052.                         specialEasing[index] = easing;
  4053.                     }
  4054.                 }
  4055.             } else {
  4056.                 specialEasing[name] = easing;
  4057.             }
  4058.         }
  4059.     }
  4060.  
  4061.     function Animation(elem, properties, options) {
  4062.         var result, stopped, index = 0,
  4063.             length = animationPrefilters.length,
  4064.             deferred = jQuery.Deferred().always(function() {
  4065.                 delete tick.elem;
  4066.             }),
  4067.             tick = function() {
  4068.                 if (stopped) {
  4069.                     return false;
  4070.                 }
  4071.                 var currentTime = fxNow || createFxNow(),
  4072.                     remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
  4073.                     temp = remaining / animation.duration || 0,
  4074.                     percent = 1 - temp,
  4075.                     index = 0,
  4076.                     length = animation.tweens.length;
  4077.                 for (; index < length; index++) {
  4078.                     animation.tweens[index].run(percent);
  4079.                 }
  4080.                 deferred.notifyWith(elem, [animation, percent, remaining]);
  4081.                 if (percent < 1 && length) {
  4082.                     return remaining;
  4083.                 } else {
  4084.                     deferred.resolveWith(elem, [animation]);
  4085.                     return false;
  4086.                 }
  4087.             },
  4088.             animation = deferred.promise({
  4089.                 elem: elem,
  4090.                 props: jQuery.extend({}, properties),
  4091.                 opts: jQuery.extend(true, {
  4092.                     specialEasing: {}
  4093.                 }, options),
  4094.                 originalProperties: properties,
  4095.                 originalOptions: options,
  4096.                 startTime: fxNow || createFxNow(),
  4097.                 duration: options.duration,
  4098.                 tweens: [],
  4099.                 createTween: function(prop, end) {
  4100.                     var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
  4101.                     animation.tweens.push(tween);
  4102.                     return tween;
  4103.                 },
  4104.                 stop: function(gotoEnd) {
  4105.                     var index = 0,
  4106.                         length = gotoEnd ? animation.tweens.length : 0;
  4107.                     if (stopped) {
  4108.                         return this;
  4109.                     }
  4110.                     stopped = true;
  4111.                     for (; index < length; index++) {
  4112.                         animation.tweens[index].run(1);
  4113.                     }
  4114.                     if (gotoEnd) {
  4115.                         deferred.resolveWith(elem, [animation, gotoEnd]);
  4116.                     } else {
  4117.                         deferred.rejectWith(elem, [animation, gotoEnd]);
  4118.                     }
  4119.                     return this;
  4120.                 }
  4121.             }),
  4122.             props = animation.props;
  4123.         propFilter(props, animation.opts.specialEasing);
  4124.         for (; index < length; index++) {
  4125.             result = animationPrefilters[index].call(animation, elem, props, animation.opts);
  4126.             if (result) {
  4127.                 return result;
  4128.             }
  4129.         }
  4130.         jQuery.map(props, createTween, animation);
  4131.         if (jQuery.isFunction(animation.opts.start)) {
  4132.             animation.opts.start.call(elem, animation);
  4133.         }
  4134.         jQuery.fx.timer(jQuery.extend(tick, {
  4135.             elem: elem,
  4136.             anim: animation,
  4137.             queue: animation.opts.queue
  4138.         }));
  4139.         return animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
  4140.     }
  4141.     jQuery.Animation = jQuery.extend(Animation, {
  4142.         tweener: function(props, callback) {
  4143.             if (jQuery.isFunction(props)) {
  4144.                 callback = props;
  4145.                 props = ["*"];
  4146.             } else {
  4147.                 props = props.split(" ");
  4148.             }
  4149.             var prop, index = 0,
  4150.                 length = props.length;
  4151.             for (; index < length; index++) {
  4152.                 prop = props[index];
  4153.                 tweeners[prop] = tweeners[prop] || [];
  4154.                 tweeners[prop].unshift(callback);
  4155.             }
  4156.         },
  4157.         prefilter: function(callback, prepend) {
  4158.             if (prepend) {
  4159.                 animationPrefilters.unshift(callback);
  4160.             } else {
  4161.                 animationPrefilters.push(callback);
  4162.             }
  4163.         }
  4164.     });
  4165.     jQuery.speed = function(speed, easing, fn) {
  4166.         var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
  4167.             complete: fn || !fn && easing || jQuery.isFunction(speed) && speed,
  4168.             duration: speed,
  4169.             easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
  4170.         };
  4171.         opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
  4172.         if (opt.queue == null || opt.queue === true) {
  4173.             opt.queue = "fx";
  4174.         }
  4175.         opt.old = opt.complete;
  4176.         opt.complete = function() {
  4177.             if (jQuery.isFunction(opt.old)) {
  4178.                 opt.old.call(this);
  4179.             }
  4180.             if (opt.queue) {
  4181.                 jQuery.dequeue(this, opt.queue);
  4182.             }
  4183.         };
  4184.         return opt;
  4185.     };
  4186.     jQuery.fn.extend({
  4187.         fadeTo: function(speed, to, easing, callback) {
  4188.             return this.filter(isHidden).css("opacity", 0).show().end().animate({
  4189.                 opacity: to
  4190.             }, speed, easing, callback);
  4191.         },
  4192.         animate: function(prop, speed, easing, callback) {
  4193.             var empty = jQuery.isEmptyObject(prop),
  4194.                 optall = jQuery.speed(speed, easing, callback),
  4195.                 doAnimation = function() {
  4196.                     var anim = Animation(this, jQuery.extend({}, prop), optall);
  4197.                     if (empty || data_priv.get(this, "finish")) {
  4198.                         anim.stop(true);
  4199.                     }
  4200.                 };
  4201.             doAnimation.finish = doAnimation;
  4202.             return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
  4203.         },
  4204.         stop: function(type, clearQueue, gotoEnd) {
  4205.             var stopQueue = function(hooks) {
  4206.                 var stop = hooks.stop;
  4207.                 delete hooks.stop;
  4208.                 stop(gotoEnd);
  4209.             };
  4210.             if (typeof type !== "string") {
  4211.                 gotoEnd = clearQueue;
  4212.                 clearQueue = type;
  4213.                 type = undefined;
  4214.             }
  4215.             if (clearQueue && type !== false) {
  4216.                 this.queue(type || "fx", []);
  4217.             }
  4218.             return this.each(function() {
  4219.                 var dequeue = true,
  4220.                     index = type != null && type + "queueHooks",
  4221.                     timers = jQuery.timers,
  4222.                     data = data_priv.get(this);
  4223.                 if (index) {
  4224.                     if (data[index] && data[index].stop) {
  4225.                         stopQueue(data[index]);
  4226.                     }
  4227.                 } else {
  4228.                     for (index in data) {
  4229.                         if (data[index] && data[index].stop && rrun.test(index)) {
  4230.                             stopQueue(data[index]);
  4231.                         }
  4232.                     }
  4233.                 }
  4234.                 for (index = timers.length; index--;) {
  4235.                     if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
  4236.                         timers[index].anim.stop(gotoEnd);
  4237.                         dequeue = false;
  4238.                         timers.splice(index, 1);
  4239.                     }
  4240.                 }
  4241.                 if (dequeue || !gotoEnd) {
  4242.                     jQuery.dequeue(this, type);
  4243.                 }
  4244.             });
  4245.         },
  4246.         finish: function(type) {
  4247.             if (type !== false) {
  4248.                 type = type || "fx";
  4249.             }
  4250.             return this.each(function() {
  4251.                 var index, data = data_priv.get(this),
  4252.                     queue = data[type + "queue"],
  4253.                     hooks = data[type + "queueHooks"],
  4254.                     timers = jQuery.timers,
  4255.                     length = queue ? queue.length : 0;
  4256.                 data.finish = true;
  4257.                 jQuery.queue(this, type, []);
  4258.                 if (hooks && hooks.stop) {
  4259.                     hooks.stop.call(this, true);
  4260.                 }
  4261.                 for (index = timers.length; index--;) {
  4262.                     if (timers[index].elem === this && timers[index].queue === type) {
  4263.                         timers[index].anim.stop(true);
  4264.                         timers.splice(index, 1);
  4265.                     }
  4266.                 }
  4267.                 for (index = 0; index < length; index++) {
  4268.                     if (queue[index] && queue[index].finish) {
  4269.                         queue[index].finish.call(this);
  4270.                     }
  4271.                 }
  4272.                 delete data.finish;
  4273.             });
  4274.         }
  4275.     });
  4276.     jQuery.each(["toggle", "show", "hide"], function(i, name) {
  4277.         var cssFn = jQuery.fn[name];
  4278.         jQuery.fn[name] = function(speed, easing, callback) {
  4279.             return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
  4280.         };
  4281.     });
  4282.     jQuery.each({
  4283.         slideDown: genFx("show"),
  4284.         slideUp: genFx("hide"),
  4285.         slideToggle: genFx("toggle"),
  4286.         fadeIn: {
  4287.             opacity: "show"
  4288.         },
  4289.         fadeOut: {
  4290.             opacity: "hide"
  4291.         },
  4292.         fadeToggle: {
  4293.             opacity: "toggle"
  4294.         }
  4295.     }, function(name, props) {
  4296.         jQuery.fn[name] = function(speed, easing, callback) {
  4297.             return this.animate(props, speed, easing, callback);
  4298.         };
  4299.     });
  4300.     jQuery.timers = [];
  4301.     jQuery.fx.tick = function() {
  4302.         var timer, i = 0,
  4303.             timers = jQuery.timers;
  4304.         fxNow = jQuery.now();
  4305.         for (; i < timers.length; i++) {
  4306.             timer = timers[i];
  4307.             if (!timer() && timers[i] === timer) {
  4308.                 timers.splice(i--, 1);
  4309.             }
  4310.         }
  4311.         if (!timers.length) {
  4312.             jQuery.fx.stop();
  4313.         }
  4314.         fxNow = undefined;
  4315.     };
  4316.     jQuery.fx.timer = function(timer) {
  4317.         jQuery.timers.push(timer);
  4318.         if (timer()) {
  4319.             jQuery.fx.start();
  4320.         } else {
  4321.             jQuery.timers.pop();
  4322.         }
  4323.     };
  4324.     jQuery.fx.interval = 13;
  4325.     jQuery.fx.start = function() {
  4326.         if (!timerId) {
  4327.             timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval);
  4328.         }
  4329.     };
  4330.     jQuery.fx.stop = function() {
  4331.         clearInterval(timerId);
  4332.         timerId = null;
  4333.     };
  4334.     jQuery.fx.speeds = {
  4335.         slow: 600,
  4336.         fast: 200,
  4337.         _default: 400
  4338.     };
  4339.     jQuery.fn.delay = function(time, type) {
  4340.         time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
  4341.         type = type || "fx";
  4342.         return this.queue(type, function(next, hooks) {
  4343.             var timeout = setTimeout(next, time);
  4344.             hooks.stop = function() {
  4345.                 clearTimeout(timeout);
  4346.             };
  4347.         });
  4348.     };
  4349.     (function() {
  4350.         var input = document.createElement("input"),
  4351.             select = document.createElement("select"),
  4352.             opt = select.appendChild(document.createElement("option"));
  4353.         input.type = "checkbox";
  4354.         support.checkOn = input.value !== "";
  4355.         support.optSelected = opt.selected;
  4356.         select.disabled = true;
  4357.         support.optDisabled = !opt.disabled;
  4358.         input = document.createElement("input");
  4359.         input.value = "t";
  4360.         input.type = "radio";
  4361.         support.radioValue = input.value === "t";
  4362.     })();
  4363.     var nodeHook, boolHook, attrHandle = jQuery.expr.attrHandle;
  4364.     jQuery.fn.extend({
  4365.         attr: function(name, value) {
  4366.             return access(this, jQuery.attr, name, value, arguments.length > 1);
  4367.         },
  4368.         removeAttr: function(name) {
  4369.             return this.each(function() {
  4370.                 jQuery.removeAttr(this, name);
  4371.             });
  4372.         }
  4373.     });
  4374.     jQuery.extend({
  4375.         attr: function(elem, name, value) {
  4376.             var hooks, ret, nType = elem.nodeType;
  4377.             if (!elem || nType === 3 || nType === 8 || nType === 2) {
  4378.                 return;
  4379.             }
  4380.             if (typeof elem.getAttribute === strundefined) {
  4381.                 return jQuery.prop(elem, name, value);
  4382.             }
  4383.             if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
  4384.                 name = name.toLowerCase();
  4385.                 hooks = jQuery.attrHooks[name] || (jQuery.expr.match.bool.test(name) ? boolHook : nodeHook);
  4386.             }
  4387.             if (value !== undefined) {
  4388.                 if (value === null) {
  4389.                     jQuery.removeAttr(elem, name);
  4390.                 } else if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
  4391.                     return ret;
  4392.                 } else {
  4393.                     elem.setAttribute(name, value + "");
  4394.                     return value;
  4395.                 }
  4396.             } else if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
  4397.                 return ret;
  4398.             } else {
  4399.                 ret = jQuery.find.attr(elem, name);
  4400.                 return ret == null ? undefined : ret;
  4401.             }
  4402.         },
  4403.         removeAttr: function(elem, value) {
  4404.             var name, propName, i = 0,
  4405.                 attrNames = value && value.match(rnotwhite);
  4406.             if (attrNames && elem.nodeType === 1) {
  4407.                 while ((name = attrNames[i++])) {
  4408.                     propName = jQuery.propFix[name] || name;
  4409.                     if (jQuery.expr.match.bool.test(name)) {
  4410.                         elem[propName] = false;
  4411.                     }
  4412.                     elem.removeAttribute(name);
  4413.                 }
  4414.             }
  4415.         },
  4416.         attrHooks: {
  4417.             type: {
  4418.                 set: function(elem, value) {
  4419.                     if (!support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) {
  4420.                         var val = elem.value;
  4421.                         elem.setAttribute("type", value);
  4422.                         if (val) {
  4423.                             elem.value = val;
  4424.                         }
  4425.                         return value;
  4426.                     }
  4427.                 }
  4428.             }
  4429.         }
  4430.     });
  4431.     boolHook = {
  4432.         set: function(elem, value, name) {
  4433.             if (value === false) {
  4434.                 jQuery.removeAttr(elem, name);
  4435.             } else {
  4436.                 elem.setAttribute(name, name);
  4437.             }
  4438.             return name;
  4439.         }
  4440.     };
  4441.     jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(i, name) {
  4442.         var getter = attrHandle[name] || jQuery.find.attr;
  4443.         attrHandle[name] = function(elem, name, isXML) {
  4444.             var ret, handle;
  4445.             if (!isXML) {
  4446.                 handle = attrHandle[name];
  4447.                 attrHandle[name] = ret;
  4448.                 ret = getter(elem, name, isXML) != null ? name.toLowerCase() : null;
  4449.                 attrHandle[name] = handle;
  4450.             }
  4451.             return ret;
  4452.         };
  4453.     });
  4454.     var rfocusable = /^(?:input|select|textarea|button)$/i;
  4455.     jQuery.fn.extend({
  4456.         prop: function(name, value) {
  4457.             return access(this, jQuery.prop, name, value, arguments.length > 1);
  4458.         },
  4459.         removeProp: function(name) {
  4460.             return this.each(function() {
  4461.                 delete this[jQuery.propFix[name] || name];
  4462.             });
  4463.         }
  4464.     });
  4465.     jQuery.extend({
  4466.         propFix: {
  4467.             "for": "htmlFor",
  4468.             "class": "className"
  4469.         },
  4470.         prop: function(elem, name, value) {
  4471.             var ret, hooks, notxml, nType = elem.nodeType;
  4472.             if (!elem || nType === 3 || nType === 8 || nType === 2) {
  4473.                 return;
  4474.             }
  4475.             notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
  4476.             if (notxml) {
  4477.                 name = jQuery.propFix[name] || name;
  4478.                 hooks = jQuery.propHooks[name];
  4479.             }
  4480.             if (value !== undefined) {
  4481.                 return hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined ? ret : (elem[name] = value);
  4482.             } else {
  4483.                 return hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null ? ret : elem[name];
  4484.             }
  4485.         },
  4486.         propHooks: {
  4487.             tabIndex: {
  4488.                 get: function(elem) {
  4489.                     return elem.hasAttribute("tabindex") || rfocusable.test(elem.nodeName) || elem.href ? elem.tabIndex : -1;
  4490.                 }
  4491.             }
  4492.         }
  4493.     });
  4494.     if (!support.optSelected) {
  4495.         jQuery.propHooks.selected = {
  4496.             get: function(elem) {
  4497.                 var parent = elem.parentNode;
  4498.                 if (parent && parent.parentNode) {
  4499.                     parent.parentNode.selectedIndex;
  4500.                 }
  4501.                 return null;
  4502.             }
  4503.         };
  4504.     }
  4505.     jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
  4506.         jQuery.propFix[this.toLowerCase()] = this;
  4507.     });
  4508.     var rclass = /[\t\r\n\f]/g;
  4509.     jQuery.fn.extend({
  4510.         addClass: function(value) {
  4511.             var classes, elem, cur, clazz, j, finalValue, proceed = typeof value === "string" && value,
  4512.                 i = 0,
  4513.                 len = this.length;
  4514.             if (jQuery.isFunction(value)) {
  4515.                 return this.each(function(j) {
  4516.                     jQuery(this).addClass(value.call(this, j, this.className));
  4517.                 });
  4518.             }
  4519.             if (proceed) {
  4520.                 classes = (value || "").match(rnotwhite) || [];
  4521.                 for (; i < len; i++) {
  4522.                     elem = this[i];
  4523.                     cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : " ");
  4524.                     if (cur) {
  4525.                         j = 0;
  4526.                         while ((clazz = classes[j++])) {
  4527.                             if (cur.indexOf(" " + clazz + " ") < 0) {
  4528.                                 cur += clazz + " ";
  4529.                             }
  4530.                         }
  4531.                         finalValue = jQuery.trim(cur);
  4532.                         if (elem.className !== finalValue) {
  4533.                             elem.className = finalValue;
  4534.                         }
  4535.                     }
  4536.                 }
  4537.             }
  4538.             return this;
  4539.         },
  4540.         removeClass: function(value) {
  4541.             var classes, elem, cur, clazz, j, finalValue, proceed = arguments.length === 0 || typeof value === "string" && value,
  4542.                 i = 0,
  4543.                 len = this.length;
  4544.             if (jQuery.isFunction(value)) {
  4545.                 return this.each(function(j) {
  4546.                     jQuery(this).removeClass(value.call(this, j, this.className));
  4547.                 });
  4548.             }
  4549.             if (proceed) {
  4550.                 classes = (value || "").match(rnotwhite) || [];
  4551.                 for (; i < len; i++) {
  4552.                     elem = this[i];
  4553.                     cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : "");
  4554.                     if (cur) {
  4555.                         j = 0;
  4556.                         while ((clazz = classes[j++])) {
  4557.                             while (cur.indexOf(" " + clazz + " ") >= 0) {
  4558.                                 cur = cur.replace(" " + clazz + " ", " ");
  4559.                             }
  4560.                         }
  4561.                         finalValue = value ? jQuery.trim(cur) : "";
  4562.                         if (elem.className !== finalValue) {
  4563.                             elem.className = finalValue;
  4564.                         }
  4565.                     }
  4566.                 }
  4567.             }
  4568.             return this;
  4569.         },
  4570.         toggleClass: function(value, stateVal) {
  4571.             var type = typeof value;
  4572.             if (typeof stateVal === "boolean" && type === "string") {
  4573.                 return stateVal ? this.addClass(value) : this.removeClass(value);
  4574.             }
  4575.             if (jQuery.isFunction(value)) {
  4576.                 return this.each(function(i) {
  4577.                     jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal);
  4578.                 });
  4579.             }
  4580.             return this.each(function() {
  4581.                 if (type === "string") {
  4582.                     var className, i = 0,
  4583.                         self = jQuery(this),
  4584.                         classNames = value.match(rnotwhite) || [];
  4585.                     while ((className = classNames[i++])) {
  4586.                         if (self.hasClass(className)) {
  4587.                             self.removeClass(className);
  4588.                         } else {
  4589.                             self.addClass(className);
  4590.                         }
  4591.                     }
  4592.                 } else if (type === strundefined || type === "boolean") {
  4593.                     if (this.className) {
  4594.                         data_priv.set(this, "__className__", this.className);
  4595.                     }
  4596.                     this.className = this.className || value === false ? "" : data_priv.get(this, "__className__") || "";
  4597.                 }
  4598.             });
  4599.         },
  4600.         hasClass: function(selector) {
  4601.             var className = " " + selector + " ",
  4602.                 i = 0,
  4603.                 l = this.length;
  4604.             for (; i < l; i++) {
  4605.                 if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
  4606.                     return true;
  4607.                 }
  4608.             }
  4609.             return false;
  4610.         }
  4611.     });
  4612.     var rreturn = /\r/g;
  4613.     jQuery.fn.extend({
  4614.         val: function(value) {
  4615.             var hooks, ret, isFunction, elem = this[0];
  4616.             if (!arguments.length) {
  4617.                 if (elem) {
  4618.                     hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
  4619.                     if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
  4620.                         return ret;
  4621.                     }
  4622.                     ret = elem.value;
  4623.                     return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret;
  4624.                 }
  4625.                 return;
  4626.             }
  4627.             isFunction = jQuery.isFunction(value);
  4628.             return this.each(function(i) {
  4629.                 var val;
  4630.                 if (this.nodeType !== 1) {
  4631.                     return;
  4632.                 }
  4633.                 if (isFunction) {
  4634.                     val = value.call(this, i, jQuery(this).val());
  4635.                 } else {
  4636.                     val = value;
  4637.                 }
  4638.                 if (val == null) {
  4639.                     val = "";
  4640.                 } else if (typeof val === "number") {
  4641.                     val += "";
  4642.                 } else if (jQuery.isArray(val)) {
  4643.                     val = jQuery.map(val, function(value) {
  4644.                         return value == null ? "" : value + "";
  4645.                     });
  4646.                 }
  4647.                 hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
  4648.                 if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
  4649.                     this.value = val;
  4650.                 }
  4651.             });
  4652.         }
  4653.     });
  4654.     jQuery.extend({
  4655.         valHooks: {
  4656.             option: {
  4657.                 get: function(elem) {
  4658.                     var val = jQuery.find.attr(elem, "value");
  4659.                     return val != null ? val : jQuery.trim(jQuery.text(elem));
  4660.                 }
  4661.             },
  4662.             select: {
  4663.                 get: function(elem) {
  4664.                     var value, option, options = elem.options,
  4665.                         index = elem.selectedIndex,
  4666.                         one = elem.type === "select-one" || index < 0,
  4667.                         values = one ? null : [],
  4668.                         max = one ? index + 1 : options.length,
  4669.                         i = index < 0 ? max : one ? index : 0;
  4670.                     for (; i < max; i++) {
  4671.                         option = options[i];
  4672.                         if ((option.selected || i === index) && (support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) {
  4673.                             value = jQuery(option).val();
  4674.                             if (one) {
  4675.                                 return value;
  4676.                             }
  4677.                             values.push(value);
  4678.                         }
  4679.                     }
  4680.                     return values;
  4681.                 },
  4682.                 set: function(elem, value) {
  4683.                     var optionSet, option, options = elem.options,
  4684.                         values = jQuery.makeArray(value),
  4685.                         i = options.length;
  4686.                     while (i--) {
  4687.                         option = options[i];
  4688.                         if ((option.selected = jQuery.inArray(option.value, values) >= 0)) {
  4689.                             optionSet = true;
  4690.                         }
  4691.                     }
  4692.                     if (!optionSet) {
  4693.                         elem.selectedIndex = -1;
  4694.                     }
  4695.                     return values;
  4696.                 }
  4697.             }
  4698.         }
  4699.     });
  4700.     jQuery.each(["radio", "checkbox"], function() {
  4701.         jQuery.valHooks[this] = {
  4702.             set: function(elem, value) {
  4703.                 if (jQuery.isArray(value)) {
  4704.                     return (elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0);
  4705.                 }
  4706.             }
  4707.         };
  4708.         if (!support.checkOn) {
  4709.             jQuery.valHooks[this].get = function(elem) {
  4710.                 return elem.getAttribute("value") === null ? "on" : elem.value;
  4711.             };
  4712.         }
  4713.     });
  4714.     jQuery.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(i, name) {
  4715.         jQuery.fn[name] = function(data, fn) {
  4716.             return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
  4717.         };
  4718.     });
  4719.     jQuery.fn.extend({
  4720.         hover: function(fnOver, fnOut) {
  4721.             return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
  4722.         },
  4723.         bind: function(types, data, fn) {
  4724.             return this.on(types, null, data, fn);
  4725.         },
  4726.         unbind: function(types, fn) {
  4727.             return this.off(types, null, fn);
  4728.         },
  4729.         delegate: function(selector, types, data, fn) {
  4730.             return this.on(types, selector, data, fn);
  4731.         },
  4732.         undelegate: function(selector, types, fn) {
  4733.             return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
  4734.         }
  4735.     });
  4736.     var nonce = jQuery.now();
  4737.     var rquery = (/\?/);
  4738.     jQuery.parseJSON = function(data) {
  4739.         return JSON.parse(data + "");
  4740.     };
  4741.     jQuery.parseXML = function(data) {
  4742.         var xml, tmp;
  4743.         if (!data || typeof data !== "string") {
  4744.             return null;
  4745.         }
  4746.         try {
  4747.             tmp = new DOMParser();
  4748.             xml = tmp.parseFromString(data, "text/xml");
  4749.         } catch (e) {
  4750.             xml = undefined;
  4751.         }
  4752.         if (!xml || xml.getElementsByTagName("parsererror").length) {
  4753.             jQuery.error("Invalid XML: " + data);
  4754.         }
  4755.         return xml;
  4756.     };
  4757.     var
  4758.         rhash = /#.*$/,
  4759.         rts = /([?&])_=[^&]*/,
  4760.         rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
  4761.         rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
  4762.         rnoContent = /^(?:GET|HEAD)$/,
  4763.         rprotocol = /^\/\//,
  4764.         rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
  4765.         prefilters = {},
  4766.         transports = {},
  4767.         allTypes = "*/".concat("*"),
  4768.         ajaxLocation = window.location.href,
  4769.         ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];
  4770.  
  4771.     function addToPrefiltersOrTransports(structure) {
  4772.         return function(dataTypeExpression, func) {
  4773.             if (typeof dataTypeExpression !== "string") {
  4774.                 func = dataTypeExpression;
  4775.                 dataTypeExpression = "*";
  4776.             }
  4777.             var dataType, i = 0,
  4778.                 dataTypes = dataTypeExpression.toLowerCase().match(rnotwhite) || [];
  4779.             if (jQuery.isFunction(func)) {
  4780.                 while ((dataType = dataTypes[i++])) {
  4781.                     if (dataType[0] === "+") {
  4782.                         dataType = dataType.slice(1) || "*";
  4783.                         (structure[dataType] = structure[dataType] || []).unshift(func);
  4784.                     } else {
  4785.                         (structure[dataType] = structure[dataType] || []).push(func);
  4786.                     }
  4787.                 }
  4788.             }
  4789.         };
  4790.     }
  4791.  
  4792.     function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
  4793.         var inspected = {},
  4794.             seekingTransport = (structure === transports);
  4795.  
  4796.         function inspect(dataType) {
  4797.             var selected;
  4798.             inspected[dataType] = true;
  4799.             jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) {
  4800.                 var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
  4801.                 if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
  4802.                     options.dataTypes.unshift(dataTypeOrTransport);
  4803.                     inspect(dataTypeOrTransport);
  4804.                     return false;
  4805.                 } else if (seekingTransport) {
  4806.                     return !(selected = dataTypeOrTransport);
  4807.                 }
  4808.             });
  4809.             return selected;
  4810.         }
  4811.         return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
  4812.     }
  4813.  
  4814.     function ajaxExtend(target, src) {
  4815.         var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};
  4816.         for (key in src) {
  4817.             if (src[key] !== undefined) {
  4818.                 (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];
  4819.             }
  4820.         }
  4821.         if (deep) {
  4822.             jQuery.extend(true, target, deep);
  4823.         }
  4824.         return target;
  4825.     }
  4826.  
  4827.     function ajaxHandleResponses(s, jqXHR, responses) {
  4828.         var ct, type, finalDataType, firstDataType, contents = s.contents,
  4829.             dataTypes = s.dataTypes;
  4830.         while (dataTypes[0] === "*") {
  4831.             dataTypes.shift();
  4832.             if (ct === undefined) {
  4833.                 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
  4834.             }
  4835.         }
  4836.         if (ct) {
  4837.             for (type in contents) {
  4838.                 if (contents[type] && contents[type].test(ct)) {
  4839.                     dataTypes.unshift(type);
  4840.                     break;
  4841.                 }
  4842.             }
  4843.         }
  4844.         if (dataTypes[0] in responses) {
  4845.             finalDataType = dataTypes[0];
  4846.         } else {
  4847.             for (type in responses) {
  4848.                 if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
  4849.                     finalDataType = type;
  4850.                     break;
  4851.                 }
  4852.                 if (!firstDataType) {
  4853.                     firstDataType = type;
  4854.                 }
  4855.             }
  4856.             finalDataType = finalDataType || firstDataType;
  4857.         }
  4858.         if (finalDataType) {
  4859.             if (finalDataType !== dataTypes[0]) {
  4860.                 dataTypes.unshift(finalDataType);
  4861.             }
  4862.             return responses[finalDataType];
  4863.         }
  4864.     }
  4865.  
  4866.     function ajaxConvert(s, response, jqXHR, isSuccess) {
  4867.         var conv2, current, conv, tmp, prev, converters = {},
  4868.             dataTypes = s.dataTypes.slice();
  4869.         if (dataTypes[1]) {
  4870.             for (conv in s.converters) {
  4871.                 converters[conv.toLowerCase()] = s.converters[conv];
  4872.             }
  4873.         }
  4874.         current = dataTypes.shift();
  4875.         while (current) {
  4876.             if (s.responseFields[current]) {
  4877.                 jqXHR[s.responseFields[current]] = response;
  4878.             }
  4879.             if (!prev && isSuccess && s.dataFilter) {
  4880.                 response = s.dataFilter(response, s.dataType);
  4881.             }
  4882.             prev = current;
  4883.             current = dataTypes.shift();
  4884.             if (current) {
  4885.                 if (current === "*") {
  4886.                     current = prev;
  4887.                 } else if (prev !== "*" && prev !== current) {
  4888.                     conv = converters[prev + " " + current] || converters["* " + current];
  4889.                     if (!conv) {
  4890.                         for (conv2 in converters) {
  4891.                             tmp = conv2.split(" ");
  4892.                             if (tmp[1] === current) {
  4893.                                 conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
  4894.                                 if (conv) {
  4895.                                     if (conv === true) {
  4896.                                         conv = converters[conv2];
  4897.                                     } else if (converters[conv2] !== true) {
  4898.                                         current = tmp[0];
  4899.                                         dataTypes.unshift(tmp[1]);
  4900.                                     }
  4901.                                     break;
  4902.                                 }
  4903.                             }
  4904.                         }
  4905.                     }
  4906.                     if (conv !== true) {
  4907.                         if (conv && s["throws"]) {
  4908.                             response = conv(response);
  4909.                         } else {
  4910.                             try {
  4911.                                 response = conv(response);
  4912.                             } catch (e) {
  4913.                                 return {
  4914.                                     state: "parsererror",
  4915.                                     error: conv ? e : "No conversion from " + prev + " to " + current
  4916.                                 };
  4917.                             }
  4918.                         }
  4919.                     }
  4920.                 }
  4921.             }
  4922.         }
  4923.         return {
  4924.             state: "success",
  4925.             data: response
  4926.         };
  4927.     }
  4928.     jQuery.extend({
  4929.         active: 0,
  4930.         lastModified: {},
  4931.         etag: {},
  4932.         ajaxSettings: {
  4933.             url: ajaxLocation,
  4934.             type: "GET",
  4935.             isLocal: rlocalProtocol.test(ajaxLocParts[1]),
  4936.             global: true,
  4937.             processData: true,
  4938.             async: true,
  4939.             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  4940.             accepts: {
  4941.                 "*": allTypes,
  4942.                 text: "text/plain",
  4943.                 html: "text/html",
  4944.                 xml: "application/xml, text/xml",
  4945.                 json: "application/json, text/javascript"
  4946.             },
  4947.             contents: {
  4948.                 xml: /xml/,
  4949.                 html: /html/,
  4950.                 json: /json/
  4951.             },
  4952.             responseFields: {
  4953.                 xml: "responseXML",
  4954.                 text: "responseText",
  4955.                 json: "responseJSON"
  4956.             },
  4957.             converters: {
  4958.                 "* text": String,
  4959.                 "text html": true,
  4960.                 "text json": jQuery.parseJSON,
  4961.                 "text xml": jQuery.parseXML
  4962.             },
  4963.             flatOptions: {
  4964.                 url: true,
  4965.                 context: true
  4966.             }
  4967.         },
  4968.         ajaxSetup: function(target, settings) {
  4969.             return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target);
  4970.         },
  4971.         ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
  4972.         ajaxTransport: addToPrefiltersOrTransports(transports),
  4973.         ajax: function(url, options) {
  4974.             if (typeof url === "object") {
  4975.                 options = url;
  4976.                 url = undefined;
  4977.             }
  4978.             options = options || {};
  4979.             var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, parts, fireGlobals, i, s = jQuery.ajaxSetup({}, options),
  4980.                 callbackContext = s.context || s,
  4981.                 globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event,
  4982.                 deferred = jQuery.Deferred(),
  4983.                 completeDeferred = jQuery.Callbacks("once memory"),
  4984.                 statusCode = s.statusCode || {},
  4985.                 requestHeaders = {},
  4986.                 requestHeadersNames = {},
  4987.                 state = 0,
  4988.                 strAbort = "canceled",
  4989.                 jqXHR = {
  4990.                     readyState: 0,
  4991.                     getResponseHeader: function(key) {
  4992.                         var match;
  4993.                         if (state === 2) {
  4994.                             if (!responseHeaders) {
  4995.                                 responseHeaders = {};
  4996.                                 while ((match = rheaders.exec(responseHeadersString))) {
  4997.                                     responseHeaders[match[1].toLowerCase()] = match[2];
  4998.                                 }
  4999.                             }
  5000.                             match = responseHeaders[key.toLowerCase()];
  5001.                         }
  5002.                         return match == null ? null : match;
  5003.                     },
  5004.                     getAllResponseHeaders: function() {
  5005.                         return state === 2 ? responseHeadersString : null;
  5006.                     },
  5007.                     setRequestHeader: function(name, value) {
  5008.                         var lname = name.toLowerCase();
  5009.                         if (!state) {
  5010.                             name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
  5011.                             requestHeaders[name] = value;
  5012.                         }
  5013.                         return this;
  5014.                     },
  5015.                     overrideMimeType: function(type) {
  5016.                         if (!state) {
  5017.                             s.mimeType = type;
  5018.                         }
  5019.                         return this;
  5020.                     },
  5021.                     statusCode: function(map) {
  5022.                         var code;
  5023.                         if (map) {
  5024.                             if (state < 2) {
  5025.                                 for (code in map) {
  5026.                                     statusCode[code] = [statusCode[code], map[code]];
  5027.                                 }
  5028.                             } else {
  5029.                                 jqXHR.always(map[jqXHR.status]);
  5030.                             }
  5031.                         }
  5032.                         return this;
  5033.                     },
  5034.                     abort: function(statusText) {
  5035.                         var finalText = statusText || strAbort;
  5036.                         if (transport) {
  5037.                             transport.abort(finalText);
  5038.                         }
  5039.                         done(0, finalText);
  5040.                         return this;
  5041.                     }
  5042.                 };
  5043.             deferred.promise(jqXHR).complete = completeDeferred.add;
  5044.             jqXHR.success = jqXHR.done;
  5045.             jqXHR.error = jqXHR.fail;
  5046.             s.url = ((url || s.url || ajaxLocation) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
  5047.             s.type = options.method || options.type || s.method || s.type;
  5048.             s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(rnotwhite) || [""];
  5049.             if (s.crossDomain == null) {
  5050.                 parts = rurl.exec(s.url.toLowerCase());
  5051.                 s.crossDomain = !!(parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? "80" : "443")) !== (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? "80" : "443"))));
  5052.             }
  5053.             if (s.data && s.processData && typeof s.data !== "string") {
  5054.                 s.data = jQuery.param(s.data, s.traditional);
  5055.             }
  5056.             inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
  5057.             if (state === 2) {
  5058.                 return jqXHR;
  5059.             }
  5060.             fireGlobals = jQuery.event && s.global;
  5061.             if (fireGlobals && jQuery.active++ === 0) {
  5062.                 jQuery.event.trigger("ajaxStart");
  5063.             }
  5064.             s.type = s.type.toUpperCase();
  5065.             s.hasContent = !rnoContent.test(s.type);
  5066.             cacheURL = s.url;
  5067.             if (!s.hasContent) {
  5068.                 if (s.data) {
  5069.                     cacheURL = (s.url += (rquery.test(cacheURL) ? "&" : "?") + s.data);
  5070.                     delete s.data;
  5071.                 }
  5072.                 if (s.cache === false) {
  5073.                     s.url = rts.test(cacheURL) ? cacheURL.replace(rts, "$1_=" + nonce++) : cacheURL + (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce++;
  5074.                 }
  5075.             }
  5076.             if (s.ifModified) {
  5077.                 if (jQuery.lastModified[cacheURL]) {
  5078.                     jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
  5079.                 }
  5080.                 if (jQuery.etag[cacheURL]) {
  5081.                     jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
  5082.                 }
  5083.             }
  5084.             if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
  5085.                 jqXHR.setRequestHeader("Content-Type", s.contentType);
  5086.             }
  5087.             jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]);
  5088.             for (i in s.headers) {
  5089.                 jqXHR.setRequestHeader(i, s.headers[i]);
  5090.             }
  5091.             if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
  5092.                 return jqXHR.abort();
  5093.             }
  5094.             strAbort = "abort";
  5095.             for (i in {
  5096.                     success: 1,
  5097.                     error: 1,
  5098.                     complete: 1
  5099.                 }) {
  5100.                 jqXHR[i](s[i]);
  5101.             }
  5102.             transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
  5103.             if (!transport) {
  5104.                 done(-1, "No Transport");
  5105.             } else {
  5106.                 jqXHR.readyState = 1;
  5107.                 if (fireGlobals) {
  5108.                     globalEventContext.trigger("ajaxSend", [jqXHR, s]);
  5109.                 }
  5110.                 if (s.async && s.timeout > 0) {
  5111.                     timeoutTimer = setTimeout(function() {
  5112.                         jqXHR.abort("timeout");
  5113.                     }, s.timeout);
  5114.                 }
  5115.                 try {
  5116.                     state = 1;
  5117.                     transport.send(requestHeaders, done);
  5118.                 } catch (e) {
  5119.                     if (state < 2) {
  5120.                         done(-1, e);
  5121.                     } else {
  5122.                         throw e;
  5123.                     }
  5124.                 }
  5125.             }
  5126.  
  5127.             function done(status, nativeStatusText, responses, headers) {
  5128.                 var isSuccess, success, error, response, modified, statusText = nativeStatusText;
  5129.                 if (state === 2) {
  5130.                     return;
  5131.                 }
  5132.                 state = 2;
  5133.                 if (timeoutTimer) {
  5134.                     clearTimeout(timeoutTimer);
  5135.                 }
  5136.                 transport = undefined;
  5137.                 responseHeadersString = headers || "";
  5138.                 jqXHR.readyState = status > 0 ? 4 : 0;
  5139.                 isSuccess = status >= 200 && status < 300 || status === 304;
  5140.                 if (responses) {
  5141.                     response = ajaxHandleResponses(s, jqXHR, responses);
  5142.                 }
  5143.                 response = ajaxConvert(s, response, jqXHR, isSuccess);
  5144.                 if (isSuccess) {
  5145.                     if (s.ifModified) {
  5146.                         modified = jqXHR.getResponseHeader("Last-Modified");
  5147.                         if (modified) {
  5148.                             jQuery.lastModified[cacheURL] = modified;
  5149.                         }
  5150.                         modified = jqXHR.getResponseHeader("etag");
  5151.                         if (modified) {
  5152.                             jQuery.etag[cacheURL] = modified;
  5153.                         }
  5154.                     }
  5155.                     if (status === 204 || s.type === "HEAD") {
  5156.                         statusText = "nocontent";
  5157.                     } else if (status === 304) {
  5158.                         statusText = "notmodified";
  5159.                     } else {
  5160.                         statusText = response.state;
  5161.                         success = response.data;
  5162.                         error = response.error;
  5163.                         isSuccess = !error;
  5164.                     }
  5165.                 } else {
  5166.                     error = statusText;
  5167.                     if (status || !statusText) {
  5168.                         statusText = "error";
  5169.                         if (status < 0) {
  5170.                             status = 0;
  5171.                         }
  5172.                     }
  5173.                 }
  5174.                 jqXHR.status = status;
  5175.                 jqXHR.statusText = (nativeStatusText || statusText) + "";
  5176.                 if (isSuccess) {
  5177.                     deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
  5178.                 } else {
  5179.                     deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
  5180.                 }
  5181.                 jqXHR.statusCode(statusCode);
  5182.                 statusCode = undefined;
  5183.                 if (fireGlobals) {
  5184.                     globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]);
  5185.                 }
  5186.                 completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
  5187.                 if (fireGlobals) {
  5188.                     globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
  5189.                     if (!(--jQuery.active)) {
  5190.                         jQuery.event.trigger("ajaxStop");
  5191.                     }
  5192.                 }
  5193.             }
  5194.             return jqXHR;
  5195.         },
  5196.         getJSON: function(url, data, callback) {
  5197.             return jQuery.get(url, data, callback, "json");
  5198.         },
  5199.         getScript: function(url, callback) {
  5200.             return jQuery.get(url, undefined, callback, "script");
  5201.         }
  5202.     });
  5203.     jQuery.each(["get", "post"], function(i, method) {
  5204.         jQuery[method] = function(url, data, callback, type) {
  5205.             if (jQuery.isFunction(data)) {
  5206.                 type = type || callback;
  5207.                 callback = data;
  5208.                 data = undefined;
  5209.             }
  5210.             return jQuery.ajax({
  5211.                 url: url,
  5212.                 type: method,
  5213.                 dataType: type,
  5214.                 data: data,
  5215.                 success: callback
  5216.             });
  5217.         };
  5218.     });
  5219.     jQuery._evalUrl = function(url) {
  5220.         return jQuery.ajax({
  5221.             url: url,
  5222.             type: "GET",
  5223.             dataType: "script",
  5224.             async: false,
  5225.             global: false,
  5226.             "throws": true
  5227.         });
  5228.     };
  5229.     jQuery.fn.extend({
  5230.         wrapAll: function(html) {
  5231.             var wrap;
  5232.             if (jQuery.isFunction(html)) {
  5233.                 return this.each(function(i) {
  5234.                     jQuery(this).wrapAll(html.call(this, i));
  5235.                 });
  5236.             }
  5237.             if (this[0]) {
  5238.                 wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
  5239.                 if (this[0].parentNode) {
  5240.                     wrap.insertBefore(this[0]);
  5241.                 }
  5242.                 wrap.map(function() {
  5243.                     var elem = this;
  5244.                     while (elem.firstElementChild) {
  5245.                         elem = elem.firstElementChild;
  5246.                     }
  5247.                     return elem;
  5248.                 }).append(this);
  5249.             }
  5250.             return this;
  5251.         },
  5252.         wrapInner: function(html) {
  5253.             if (jQuery.isFunction(html)) {
  5254.                 return this.each(function(i) {
  5255.                     jQuery(this).wrapInner(html.call(this, i));
  5256.                 });
  5257.             }
  5258.             return this.each(function() {
  5259.                 var self = jQuery(this),
  5260.                     contents = self.contents();
  5261.                 if (contents.length) {
  5262.                     contents.wrapAll(html);
  5263.                 } else {
  5264.                     self.append(html);
  5265.                 }
  5266.             });
  5267.         },
  5268.         wrap: function(html) {
  5269.             var isFunction = jQuery.isFunction(html);
  5270.             return this.each(function(i) {
  5271.                 jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
  5272.             });
  5273.         },
  5274.         unwrap: function() {
  5275.             return this.parent().each(function() {
  5276.                 if (!jQuery.nodeName(this, "body")) {
  5277.                     jQuery(this).replaceWith(this.childNodes);
  5278.                 }
  5279.             }).end();
  5280.         }
  5281.     });
  5282.     jQuery.expr.filters.hidden = function(elem) {
  5283.         return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
  5284.     };
  5285.     jQuery.expr.filters.visible = function(elem) {
  5286.         return !jQuery.expr.filters.hidden(elem);
  5287.     };
  5288.     var r20 = /%20/g,
  5289.         rbracket = /\[\]$/,
  5290.         rCRLF = /\r?\n/g,
  5291.         rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
  5292.         rsubmittable = /^(?:input|select|textarea|keygen)/i;
  5293.  
  5294.     function buildParams(prefix, obj, traditional, add) {
  5295.         var name;
  5296.         if (jQuery.isArray(obj)) {
  5297.             jQuery.each(obj, function(i, v) {
  5298.                 if (traditional || rbracket.test(prefix)) {
  5299.                     add(prefix, v);
  5300.                 } else {
  5301.                     buildParams(prefix + "[" + (typeof v === "object" ? i : "") + "]", v, traditional, add);
  5302.                 }
  5303.             });
  5304.         } else if (!traditional && jQuery.type(obj) === "object") {
  5305.             for (name in obj) {
  5306.                 buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
  5307.             }
  5308.         } else {
  5309.             add(prefix, obj);
  5310.         }
  5311.     }
  5312.     jQuery.param = function(a, traditional) {
  5313.         var prefix, s = [],
  5314.             add = function(key, value) {
  5315.                 value = jQuery.isFunction(value) ? value() : (value == null ? "" : value);
  5316.                 s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
  5317.             };
  5318.         if (traditional === undefined) {
  5319.             traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
  5320.         }
  5321.         if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
  5322.             jQuery.each(a, function() {
  5323.                 add(this.name, this.value);
  5324.             });
  5325.         } else {
  5326.             for (prefix in a) {
  5327.                 buildParams(prefix, a[prefix], traditional, add);
  5328.             }
  5329.         }
  5330.         return s.join("&").replace(r20, "+");
  5331.     };
  5332.     jQuery.fn.extend({
  5333.         serialize: function() {
  5334.             return jQuery.param(this.serializeArray());
  5335.         },
  5336.         serializeArray: function() {
  5337.             return this.map(function() {
  5338.                 var elements = jQuery.prop(this, "elements");
  5339.                 return elements ? jQuery.makeArray(elements) : this;
  5340.             }).filter(function() {
  5341.                 var type = this.type;
  5342.                 return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
  5343.             }).map(function(i, elem) {
  5344.                 var val = jQuery(this).val();
  5345.                 return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function(val) {
  5346.                     return {
  5347.                         name: elem.name,
  5348.                         value: val.replace(rCRLF, "\r\n")
  5349.                     };
  5350.                 }) : {
  5351.                     name: elem.name,
  5352.                     value: val.replace(rCRLF, "\r\n")
  5353.                 };
  5354.             }).get();
  5355.         }
  5356.     });
  5357.     jQuery.ajaxSettings.xhr = function() {
  5358.         try {
  5359.             return new XMLHttpRequest();
  5360.         } catch (e) {}
  5361.     };
  5362.     var xhrId = 0,
  5363.         xhrCallbacks = {},
  5364.         xhrSuccessStatus = {
  5365.             0: 200,
  5366.             1223: 204
  5367.         },
  5368.         xhrSupported = jQuery.ajaxSettings.xhr();
  5369.     if (window.attachEvent) {
  5370.         window.attachEvent("onunload", function() {
  5371.             for (var key in xhrCallbacks) {
  5372.                 xhrCallbacks[key]();
  5373.             }
  5374.         });
  5375.     }
  5376.     support.cors = !!xhrSupported && ("withCredentials" in xhrSupported);
  5377.     support.ajax = xhrSupported = !!xhrSupported;
  5378.     jQuery.ajaxTransport(function(options) {
  5379.         var callback;
  5380.         if (support.cors || xhrSupported && !options.crossDomain) {
  5381.             return {
  5382.                 send: function(headers, complete) {
  5383.                     var i, xhr = options.xhr(),
  5384.                         id = ++xhrId;
  5385.                     xhr.open(options.type, options.url, options.async, options.username, options.password);
  5386.                     if (options.xhrFields) {
  5387.                         for (i in options.xhrFields) {
  5388.                             xhr[i] = options.xhrFields[i];
  5389.                         }
  5390.                     }
  5391.                     if (options.mimeType && xhr.overrideMimeType) {
  5392.                         xhr.overrideMimeType(options.mimeType);
  5393.                     }
  5394.                     if (!options.crossDomain && !headers["X-Requested-With"]) {
  5395.                         headers["X-Requested-With"] = "XMLHttpRequest";
  5396.                     }
  5397.                     for (i in headers) {
  5398.                         xhr.setRequestHeader(i, headers[i]);
  5399.                     }
  5400.                     callback = function(type) {
  5401.                         return function() {
  5402.                             if (callback) {
  5403.                                 delete xhrCallbacks[id];
  5404.                                 callback = xhr.onload = xhr.onerror = null;
  5405.                                 if (type === "abort") {
  5406.                                     xhr.abort();
  5407.                                 } else if (type === "error") {
  5408.                                     complete(xhr.status, xhr.statusText);
  5409.                                 } else {
  5410.                                     complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, typeof xhr.responseText === "string" ? {
  5411.                                         text: xhr.responseText
  5412.                                     } : undefined, xhr.getAllResponseHeaders());
  5413.                                 }
  5414.                             }
  5415.                         };
  5416.                     };
  5417.                     xhr.onload = callback();
  5418.                     xhr.onerror = callback("error");
  5419.                     callback = xhrCallbacks[id] = callback("abort");
  5420.                     try {
  5421.                         xhr.send(options.hasContent && options.data || null);
  5422.                     } catch (e) {
  5423.                         if (callback) {
  5424.                             throw e;
  5425.                         }
  5426.                     }
  5427.                 },
  5428.                 abort: function() {
  5429.                     if (callback) {
  5430.                         callback();
  5431.                     }
  5432.                 }
  5433.             };
  5434.         }
  5435.     });
  5436.     jQuery.ajaxSetup({
  5437.         accepts: {
  5438.             script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  5439.         },
  5440.         contents: {
  5441.             script: /(?:java|ecma)script/
  5442.         },
  5443.         converters: {
  5444.             "text script": function(text) {
  5445.                 jQuery.globalEval(text);
  5446.                 return text;
  5447.             }
  5448.         }
  5449.     });
  5450.     jQuery.ajaxPrefilter("script", function(s) {
  5451.         if (s.cache === undefined) {
  5452.             s.cache = false;
  5453.         }
  5454.         if (s.crossDomain) {
  5455.             s.type = "GET";
  5456.         }
  5457.     });
  5458.     jQuery.ajaxTransport("script", function(s) {
  5459.         if (s.crossDomain) {
  5460.             var script, callback;
  5461.             return {
  5462.                 send: function(_, complete) {
  5463.                     script = jQuery("<script>").prop({
  5464.                         async: true,
  5465.                         charset: s.scriptCharset,
  5466.                         src: s.url
  5467.                     }).on("load error", callback = function(evt) {
  5468.                         script.remove();
  5469.                         callback = null;
  5470.                         if (evt) {
  5471.                             complete(evt.type === "error" ? 404 : 200, evt.type);
  5472.                         }
  5473.                     });
  5474.                     document.head.appendChild(script[0]);
  5475.                 },
  5476.                 abort: function() {
  5477.                     if (callback) {
  5478.                         callback();
  5479.                     }
  5480.                 }
  5481.             };
  5482.         }
  5483.     });
  5484.     var oldCallbacks = [],
  5485.         rjsonp = /(=)\?(?=&|$)|\?\?/;
  5486.     jQuery.ajaxSetup({
  5487.         jsonp: "callback",
  5488.         jsonpCallback: function() {
  5489.             var callback = oldCallbacks.pop() || (jQuery.expando + "_" + (nonce++));
  5490.             this[callback] = true;
  5491.             return callback;
  5492.         }
  5493.     });
  5494.     jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
  5495.         var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
  5496.         if (jsonProp || s.dataTypes[0] === "jsonp") {
  5497.             callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
  5498.             if (jsonProp) {
  5499.                 s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
  5500.             } else if (s.jsonp !== false) {
  5501.                 s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
  5502.             }
  5503.             s.converters["script json"] = function() {
  5504.                 if (!responseContainer) {
  5505.                     jQuery.error(callbackName + " was not called");
  5506.                 }
  5507.                 return responseContainer[0];
  5508.             };
  5509.             s.dataTypes[0] = "json";
  5510.             overwritten = window[callbackName];
  5511.             window[callbackName] = function() {
  5512.                 responseContainer = arguments;
  5513.             };
  5514.             jqXHR.always(function() {
  5515.                 window[callbackName] = overwritten;
  5516.                 if (s[callbackName]) {
  5517.                     s.jsonpCallback = originalSettings.jsonpCallback;
  5518.                     oldCallbacks.push(callbackName);
  5519.                 }
  5520.                 if (responseContainer && jQuery.isFunction(overwritten)) {
  5521.                     overwritten(responseContainer[0]);
  5522.                 }
  5523.                 responseContainer = overwritten = undefined;
  5524.             });
  5525.             return "script";
  5526.         }
  5527.     });
  5528.     jQuery.parseHTML = function(data, context, keepScripts) {
  5529.         if (!data || typeof data !== "string") {
  5530.             return null;
  5531.         }
  5532.         if (typeof context === "boolean") {
  5533.             keepScripts = context;
  5534.             context = false;
  5535.         }
  5536.         context = context || document;
  5537.         var parsed = rsingleTag.exec(data),
  5538.             scripts = !keepScripts && [];
  5539.         if (parsed) {
  5540.             return [context.createElement(parsed[1])];
  5541.         }
  5542.         parsed = jQuery.buildFragment([data], context, scripts);
  5543.         if (scripts && scripts.length) {
  5544.             jQuery(scripts).remove();
  5545.         }
  5546.         return jQuery.merge([], parsed.childNodes);
  5547.     };
  5548.     var _load = jQuery.fn.load;
  5549.     jQuery.fn.load = function(url, params, callback) {
  5550.         if (typeof url !== "string" && _load) {
  5551.             return _load.apply(this, arguments);
  5552.         }
  5553.         var selector, type, response, self = this,
  5554.             off = url.indexOf(" ");
  5555.         if (off >= 0) {
  5556.             selector = jQuery.trim(url.slice(off));
  5557.             url = url.slice(0, off);
  5558.         }
  5559.         if (jQuery.isFunction(params)) {
  5560.             callback = params;
  5561.             params = undefined;
  5562.         } else if (params && typeof params === "object") {
  5563.             type = "POST";
  5564.         }
  5565.         if (self.length > 0) {
  5566.             jQuery.ajax({
  5567.                 url: url,
  5568.                 type: type,
  5569.                 dataType: "html",
  5570.                 data: params
  5571.             }).done(function(responseText) {
  5572.                 response = arguments;
  5573.                 self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText);
  5574.             }).complete(callback && function(jqXHR, status) {
  5575.                 self.each(callback, response || [jqXHR.responseText, status, jqXHR]);
  5576.             });
  5577.         }
  5578.         return this;
  5579.     };
  5580.     jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(i, type) {
  5581.         jQuery.fn[type] = function(fn) {
  5582.             return this.on(type, fn);
  5583.         };
  5584.     });
  5585.     jQuery.expr.filters.animated = function(elem) {
  5586.         return jQuery.grep(jQuery.timers, function(fn) {
  5587.             return elem === fn.elem;
  5588.         }).length;
  5589.     };
  5590.     var docElem = window.document.documentElement;
  5591.  
  5592.     function getWindow(elem) {
  5593.         return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
  5594.     }
  5595.     jQuery.offset = {
  5596.         setOffset: function(elem, options, i) {
  5597.             var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css(elem, "position"),
  5598.                 curElem = jQuery(elem),
  5599.                 props = {};
  5600.             if (position === "static") {
  5601.                 elem.style.position = "relative";
  5602.             }
  5603.             curOffset = curElem.offset();
  5604.             curCSSTop = jQuery.css(elem, "top");
  5605.             curCSSLeft = jQuery.css(elem, "left");
  5606.             calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
  5607.             if (calculatePosition) {
  5608.                 curPosition = curElem.position();
  5609.                 curTop = curPosition.top;
  5610.                 curLeft = curPosition.left;
  5611.             } else {
  5612.                 curTop = parseFloat(curCSSTop) || 0;
  5613.                 curLeft = parseFloat(curCSSLeft) || 0;
  5614.             }
  5615.             if (jQuery.isFunction(options)) {
  5616.                 options = options.call(elem, i, curOffset);
  5617.             }
  5618.             if (options.top != null) {
  5619.                 props.top = (options.top - curOffset.top) + curTop;
  5620.             }
  5621.             if (options.left != null) {
  5622.                 props.left = (options.left - curOffset.left) + curLeft;
  5623.             }
  5624.             if ("using" in options) {
  5625.                 options.using.call(elem, props);
  5626.             } else {
  5627.                 curElem.css(props);
  5628.             }
  5629.         }
  5630.     };
  5631.     jQuery.fn.extend({
  5632.         offset: function(options) {
  5633.             if (arguments.length) {
  5634.                 return options === undefined ? this : this.each(function(i) {
  5635.                     jQuery.offset.setOffset(this, options, i);
  5636.                 });
  5637.             }
  5638.             var docElem, win, elem = this[0],
  5639.                 box = {
  5640.                     top: 0,
  5641.                     left: 0
  5642.                 },
  5643.                 doc = elem && elem.ownerDocument;
  5644.             if (!doc) {
  5645.                 return;
  5646.             }
  5647.             docElem = doc.documentElement;
  5648.             if (!jQuery.contains(docElem, elem)) {
  5649.                 return box;
  5650.             }
  5651.             if (typeof elem.getBoundingClientRect !== strundefined) {
  5652.                 box = elem.getBoundingClientRect();
  5653.             }
  5654.             win = getWindow(doc);
  5655.             return {
  5656.                 top: box.top + win.pageYOffset - docElem.clientTop,
  5657.                 left: box.left + win.pageXOffset - docElem.clientLeft
  5658.             };
  5659.         },
  5660.         position: function() {
  5661.             if (!this[0]) {
  5662.                 return;
  5663.             }
  5664.             var offsetParent, offset, elem = this[0],
  5665.                 parentOffset = {
  5666.                     top: 0,
  5667.                     left: 0
  5668.                 };
  5669.             if (jQuery.css(elem, "position") === "fixed") {
  5670.                 offset = elem.getBoundingClientRect();
  5671.             } else {
  5672.                 offsetParent = this.offsetParent();
  5673.                 offset = this.offset();
  5674.                 if (!jQuery.nodeName(offsetParent[0], "html")) {
  5675.                     parentOffset = offsetParent.offset();
  5676.                 }
  5677.                 parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true);
  5678.                 parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true);
  5679.             }
  5680.             return {
  5681.                 top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
  5682.                 left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
  5683.             };
  5684.         },
  5685.         offsetParent: function() {
  5686.             return this.map(function() {
  5687.                 var offsetParent = this.offsetParent || docElem;
  5688.                 while (offsetParent && (!jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static")) {
  5689.                     offsetParent = offsetParent.offsetParent;
  5690.                 }
  5691.                 return offsetParent || docElem;
  5692.             });
  5693.         }
  5694.     });
  5695.     jQuery.each({
  5696.         scrollLeft: "pageXOffset",
  5697.         scrollTop: "pageYOffset"
  5698.     }, function(method, prop) {
  5699.         var top = "pageYOffset" === prop;
  5700.         jQuery.fn[method] = function(val) {
  5701.             return access(this, function(elem, method, val) {
  5702.                 var win = getWindow(elem);
  5703.                 if (val === undefined) {
  5704.                     return win ? win[prop] : elem[method];
  5705.                 }
  5706.                 if (win) {
  5707.                     win.scrollTo(!top ? val : window.pageXOffset, top ? val : window.pageYOffset);
  5708.                 } else {
  5709.                     elem[method] = val;
  5710.                 }
  5711.             }, method, val, arguments.length, null);
  5712.         };
  5713.     });
  5714.     jQuery.each(["top", "left"], function(i, prop) {
  5715.         jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function(elem, computed) {
  5716.             if (computed) {
  5717.                 computed = curCSS(elem, prop);
  5718.                 return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed;
  5719.             }
  5720.         });
  5721.     });
  5722.     jQuery.each({
  5723.         Height: "height",
  5724.         Width: "width"
  5725.     }, function(name, type) {
  5726.         jQuery.each({
  5727.             padding: "inner" + name,
  5728.             content: type,
  5729.             "": "outer" + name
  5730.         }, function(defaultExtra, funcName) {
  5731.             jQuery.fn[funcName] = function(margin, value) {
  5732.                 var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"),
  5733.                     extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
  5734.                 return access(this, function(elem, type, value) {
  5735.                     var doc;
  5736.                     if (jQuery.isWindow(elem)) {
  5737.                         return elem.document.documentElement["client" + name];
  5738.                     }
  5739.                     if (elem.nodeType === 9) {
  5740.                         doc = elem.documentElement;
  5741.                         return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]);
  5742.                     }
  5743.                     return value === undefined ? jQuery.css(elem, type, extra) : jQuery.style(elem, type, value, extra);
  5744.                 }, type, chainable ? margin : undefined, chainable, null);
  5745.             };
  5746.         });
  5747.     });
  5748.     jQuery.fn.size = function() {
  5749.         return this.length;
  5750.     };
  5751.     jQuery.fn.andSelf = jQuery.fn.addBack;
  5752.     if (typeof define === "function" && define.amd) {
  5753.         define("jquery", [], function() {
  5754.             return jQuery;
  5755.         });
  5756.     }
  5757.     var
  5758.         _jQuery = window.jQuery,
  5759.         _$ = window.$;
  5760.     jQuery.noConflict = function(deep) {
  5761.         if (window.$ === jQuery) {
  5762.             window.$ = _$;
  5763.         }
  5764.         if (deep && window.jQuery === jQuery) {
  5765.             window.jQuery = _jQuery;
  5766.         }
  5767.         return jQuery;
  5768.     };
  5769.     if (typeof noGlobal === strundefined) {
  5770.         window.jQuery = window.$ = jQuery;
  5771.     }
  5772.     return jQuery;
  5773. }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement