"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/first-mate/benchmark/large.js" (7 Feb 2017, 242142 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*!
    2  * jQuery JavaScript Library v2.0.3
    3  * http://jquery.com/
    4  *
    5  * Includes Sizzle.js
    6  * http://sizzlejs.com/
    7  *
    8  * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
    9  * Released under the MIT license
   10  * http://jquery.org/license
   11  *
   12  * Date: 2013-07-03T13:30Z
   13  */
   14 (function( window, undefined ) {
   15 
   16 // Can't do this because several apps including ASP.NET trace
   17 // the stack via arguments.caller.callee and Firefox dies if
   18 // you try to trace through "use strict" call chains. (#13335)
   19 // Support: Firefox 18+
   20 //"use strict";
   21 var
   22     // A central reference to the root jQuery(document)
   23     rootjQuery,
   24 
   25     // The deferred used on DOM ready
   26     readyList,
   27 
   28     // Support: IE9
   29     // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
   30     core_strundefined = typeof undefined,
   31 
   32     // Use the correct document accordingly with window argument (sandbox)
   33     location = window.location,
   34     document = window.document,
   35     docElem = document.documentElement,
   36 
   37     // Map over jQuery in case of overwrite
   38     _jQuery = window.jQuery,
   39 
   40     // Map over the $ in case of overwrite
   41     _$ = window.$,
   42 
   43     // [[Class]] -> type pairs
   44     class2type = {},
   45 
   46     // List of deleted data cache ids, so we can reuse them
   47     core_deletedIds = [],
   48 
   49     core_version = "2.0.3",
   50 
   51     // Save a reference to some core methods
   52     core_concat = core_deletedIds.concat,
   53     core_push = core_deletedIds.push,
   54     core_slice = core_deletedIds.slice,
   55     core_indexOf = core_deletedIds.indexOf,
   56     core_toString = class2type.toString,
   57     core_hasOwn = class2type.hasOwnProperty,
   58     core_trim = core_version.trim,
   59 
   60     // Define a local copy of jQuery
   61     jQuery = function( selector, context ) {
   62         // The jQuery object is actually just the init constructor 'enhanced'
   63         return new jQuery.fn.init( selector, context, rootjQuery );
   64     },
   65 
   66     // Used for matching numbers
   67     core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
   68 
   69     // Used for splitting on whitespace
   70     core_rnotwhite = /\S+/g,
   71 
   72     // A simple way to check for HTML strings
   73     // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
   74     // Strict HTML recognition (#11290: must start with <)
   75     rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
   76 
   77     // Match a standalone tag
   78     rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
   79 
   80     // Matches dashed string for camelizing
   81     rmsPrefix = /^-ms-/,
   82     rdashAlpha = /-([\da-z])/gi,
   83 
   84     // Used by jQuery.camelCase as callback to replace()
   85     fcamelCase = function( all, letter ) {
   86         return letter.toUpperCase();
   87     },
   88 
   89     // The ready event handler and self cleanup method
   90     completed = function() {
   91         document.removeEventListener( "DOMContentLoaded", completed, false );
   92         window.removeEventListener( "load", completed, false );
   93         jQuery.ready();
   94     };
   95 
   96 jQuery.fn = jQuery.prototype = {
   97     // The current version of jQuery being used
   98     jquery: core_version,
   99 
  100     constructor: jQuery,
  101     init: function( selector, context, rootjQuery ) {
  102         var match, elem;
  103 
  104         // HANDLE: $(""), $(null), $(undefined), $(false)
  105         if ( !selector ) {
  106             return this;
  107         }
  108 
  109         // Handle HTML strings
  110         if ( typeof selector === "string" ) {
  111             if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
  112                 // Assume that strings that start and end with <> are HTML and skip the regex check
  113                 match = [ null, selector, null ];
  114 
  115             } else {
  116                 match = rquickExpr.exec( selector );
  117             }
  118 
  119             // Match html or make sure no context is specified for #id
  120             if ( match && (match[1] || !context) ) {
  121 
  122                 // HANDLE: $(html) -> $(array)
  123                 if ( match[1] ) {
  124                     context = context instanceof jQuery ? context[0] : context;
  125 
  126                     // scripts is true for back-compat
  127                     jQuery.merge( this, jQuery.parseHTML(
  128                         match[1],
  129                         context && context.nodeType ? context.ownerDocument || context : document,
  130                         true
  131                     ) );
  132 
  133                     // HANDLE: $(html, props)
  134                     if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
  135                         for ( match in context ) {
  136                             // Properties of context are called as methods if possible
  137                             if ( jQuery.isFunction( this[ match ] ) ) {
  138                                 this[ match ]( context[ match ] );
  139 
  140                             // ...and otherwise set as attributes
  141                             } else {
  142                                 this.attr( match, context[ match ] );
  143                             }
  144                         }
  145                     }
  146 
  147                     return this;
  148 
  149                 // HANDLE: $(#id)
  150                 } else {
  151                     elem = document.getElementById( match[2] );
  152 
  153                     // Check parentNode to catch when Blackberry 4.6 returns
  154                     // nodes that are no longer in the document #6963
  155                     if ( elem && elem.parentNode ) {
  156                         // Inject the element directly into the jQuery object
  157                         this.length = 1;
  158                         this[0] = elem;
  159                     }
  160 
  161                     this.context = document;
  162                     this.selector = selector;
  163                     return this;
  164                 }
  165 
  166             // HANDLE: $(expr, $(...))
  167             } else if ( !context || context.jquery ) {
  168                 return ( context || rootjQuery ).find( selector );
  169 
  170             // HANDLE: $(expr, context)
  171             // (which is just equivalent to: $(context).find(expr)
  172             } else {
  173                 return this.constructor( context ).find( selector );
  174             }
  175 
  176         // HANDLE: $(DOMElement)
  177         } else if ( selector.nodeType ) {
  178             this.context = this[0] = selector;
  179             this.length = 1;
  180             return this;
  181 
  182         // HANDLE: $(function)
  183         // Shortcut for document ready
  184         } else if ( jQuery.isFunction( selector ) ) {
  185             return rootjQuery.ready( selector );
  186         }
  187 
  188         if ( selector.selector !== undefined ) {
  189             this.selector = selector.selector;
  190             this.context = selector.context;
  191         }
  192 
  193         return jQuery.makeArray( selector, this );
  194     },
  195 
  196     // Start with an empty selector
  197     selector: "",
  198 
  199     // The default length of a jQuery object is 0
  200     length: 0,
  201 
  202     toArray: function() {
  203         return core_slice.call( this );
  204     },
  205 
  206     // Get the Nth element in the matched element set OR
  207     // Get the whole matched element set as a clean array
  208     get: function( num ) {
  209         return num == null ?
  210 
  211             // Return a 'clean' array
  212             this.toArray() :
  213 
  214             // Return just the object
  215             ( num < 0 ? this[ this.length + num ] : this[ num ] );
  216     },
  217 
  218     // Take an array of elements and push it onto the stack
  219     // (returning the new matched element set)
  220     pushStack: function( elems ) {
  221 
  222         // Build a new jQuery matched element set
  223         var ret = jQuery.merge( this.constructor(), elems );
  224 
  225         // Add the old object onto the stack (as a reference)
  226         ret.prevObject = this;
  227         ret.context = this.context;
  228 
  229         // Return the newly-formed element set
  230         return ret;
  231     },
  232 
  233     // Execute a callback for every element in the matched set.
  234     // (You can seed the arguments with an array of args, but this is
  235     // only used internally.)
  236     each: function( callback, args ) {
  237         return jQuery.each( this, callback, args );
  238     },
  239 
  240     ready: function( fn ) {
  241         // Add the callback
  242         jQuery.ready.promise().done( fn );
  243 
  244         return this;
  245     },
  246 
  247     slice: function() {
  248         return this.pushStack( core_slice.apply( this, arguments ) );
  249     },
  250 
  251     first: function() {
  252         return this.eq( 0 );
  253     },
  254 
  255     last: function() {
  256         return this.eq( -1 );
  257     },
  258 
  259     eq: function( i ) {
  260         var len = this.length,
  261             j = +i + ( i < 0 ? len : 0 );
  262         return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
  263     },
  264 
  265     map: function( callback ) {
  266         return this.pushStack( jQuery.map(this, function( elem, i ) {
  267             return callback.call( elem, i, elem );
  268         }));
  269     },
  270 
  271     end: function() {
  272         return this.prevObject || this.constructor(null);
  273     },
  274 
  275     // For internal use only.
  276     // Behaves like an Array's method, not like a jQuery method.
  277     push: core_push,
  278     sort: [].sort,
  279     splice: [].splice
  280 };
  281 
  282 // Give the init function the jQuery prototype for later instantiation
  283 jQuery.fn.init.prototype = jQuery.fn;
  284 
  285 jQuery.extend = jQuery.fn.extend = function() {
  286     var options, name, src, copy, copyIsArray, clone,
  287         target = arguments[0] || {},
  288         i = 1,
  289         length = arguments.length,
  290         deep = false;
  291 
  292     // Handle a deep copy situation
  293     if ( typeof target === "boolean" ) {
  294         deep = target;
  295         target = arguments[1] || {};
  296         // skip the boolean and the target
  297         i = 2;
  298     }
  299 
  300     // Handle case when target is a string or something (possible in deep copy)
  301     if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
  302         target = {};
  303     }
  304 
  305     // extend jQuery itself if only one argument is passed
  306     if ( length === i ) {
  307         target = this;
  308         --i;
  309     }
  310 
  311     for ( ; i < length; i++ ) {
  312         // Only deal with non-null/undefined values
  313         if ( (options = arguments[ i ]) != null ) {
  314             // Extend the base object
  315             for ( name in options ) {
  316                 src = target[ name ];
  317                 copy = options[ name ];
  318 
  319                 // Prevent never-ending loop
  320                 if ( target === copy ) {
  321                     continue;
  322                 }
  323 
  324                 // Recurse if we're merging plain objects or arrays
  325                 if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
  326                     if ( copyIsArray ) {
  327                         copyIsArray = false;
  328                         clone = src && jQuery.isArray(src) ? src : [];
  329 
  330                     } else {
  331                         clone = src && jQuery.isPlainObject(src) ? src : {};
  332                     }
  333 
  334                     // Never move original objects, clone them
  335                     target[ name ] = jQuery.extend( deep, clone, copy );
  336 
  337                 // Don't bring in undefined values
  338                 } else if ( copy !== undefined ) {
  339                     target[ name ] = copy;
  340                 }
  341             }
  342         }
  343     }
  344 
  345     // Return the modified object
  346     return target;
  347 };
  348 
  349 jQuery.extend({
  350     // Unique for each copy of jQuery on the page
  351     expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
  352 
  353     noConflict: function( deep ) {
  354         if ( window.$ === jQuery ) {
  355             window.$ = _$;
  356         }
  357 
  358         if ( deep && window.jQuery === jQuery ) {
  359             window.jQuery = _jQuery;
  360         }
  361 
  362         return jQuery;
  363     },
  364 
  365     // Is the DOM ready to be used? Set to true once it occurs.
  366     isReady: false,
  367 
  368     // A counter to track how many items to wait for before
  369     // the ready event fires. See #6781
  370     readyWait: 1,
  371 
  372     // Hold (or release) the ready event
  373     holdReady: function( hold ) {
  374         if ( hold ) {
  375             jQuery.readyWait++;
  376         } else {
  377             jQuery.ready( true );
  378         }
  379     },
  380 
  381     // Handle when the DOM is ready
  382     ready: function( wait ) {
  383 
  384         // Abort if there are pending holds or we're already ready
  385         if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
  386             return;
  387         }
  388 
  389         // Remember that the DOM is ready
  390         jQuery.isReady = true;
  391 
  392         // If a normal DOM Ready event fired, decrement, and wait if need be
  393         if ( wait !== true && --jQuery.readyWait > 0 ) {
  394             return;
  395         }
  396 
  397         // If there are functions bound, to execute
  398         readyList.resolveWith( document, [ jQuery ] );
  399 
  400         // Trigger any bound ready events
  401         if ( jQuery.fn.trigger ) {
  402             jQuery( document ).trigger("ready").off("ready");
  403         }
  404     },
  405 
  406     // See test/unit/core.js for details concerning isFunction.
  407     // Since version 1.3, DOM methods and functions like alert
  408     // aren't supported. They return false on IE (#2968).
  409     isFunction: function( obj ) {
  410         return jQuery.type(obj) === "function";
  411     },
  412 
  413     isArray: Array.isArray,
  414 
  415     isWindow: function( obj ) {
  416         return obj != null && obj === obj.window;
  417     },
  418 
  419     isNumeric: function( obj ) {
  420         return !isNaN( parseFloat(obj) ) && isFinite( obj );
  421     },
  422 
  423     type: function( obj ) {
  424         if ( obj == null ) {
  425             return String( obj );
  426         }
  427         // Support: Safari <= 5.1 (functionish RegExp)
  428         return typeof obj === "object" || typeof obj === "function" ?
  429             class2type[ core_toString.call(obj) ] || "object" :
  430             typeof obj;
  431     },
  432 
  433     isPlainObject: function( obj ) {
  434         // Not plain objects:
  435         // - Any object or value whose internal [[Class]] property is not "[object Object]"
  436         // - DOM nodes
  437         // - window
  438         if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
  439             return false;
  440         }
  441 
  442         // Support: Firefox <20
  443         // The try/catch suppresses exceptions thrown when attempting to access
  444         // the "constructor" property of certain host objects, ie. |window.location|
  445         // https://bugzilla.mozilla.org/show_bug.cgi?id=814622
  446         try {
  447             if ( obj.constructor &&
  448                     !core_hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
  449                 return false;
  450             }
  451         } catch ( e ) {
  452             return false;
  453         }
  454 
  455         // If the function hasn't returned already, we're confident that
  456         // |obj| is a plain object, created by {} or constructed with new Object
  457         return true;
  458     },
  459 
  460     isEmptyObject: function( obj ) {
  461         var name;
  462         for ( name in obj ) {
  463             return false;
  464         }
  465         return true;
  466     },
  467 
  468     error: function( msg ) {
  469         throw new Error( msg );
  470     },
  471 
  472     // data: string of html
  473     // context (optional): If specified, the fragment will be created in this context, defaults to document
  474     // keepScripts (optional): If true, will include scripts passed in the html string
  475     parseHTML: function( data, context, keepScripts ) {
  476         if ( !data || typeof data !== "string" ) {
  477             return null;
  478         }
  479         if ( typeof context === "boolean" ) {
  480             keepScripts = context;
  481             context = false;
  482         }
  483         context = context || document;
  484 
  485         var parsed = rsingleTag.exec( data ),
  486             scripts = !keepScripts && [];
  487 
  488         // Single tag
  489         if ( parsed ) {
  490             return [ context.createElement( parsed[1] ) ];
  491         }
  492 
  493         parsed = jQuery.buildFragment( [ data ], context, scripts );
  494 
  495         if ( scripts ) {
  496             jQuery( scripts ).remove();
  497         }
  498 
  499         return jQuery.merge( [], parsed.childNodes );
  500     },
  501 
  502     parseJSON: JSON.parse,
  503 
  504     // Cross-browser xml parsing
  505     parseXML: function( data ) {
  506         var xml, tmp;
  507         if ( !data || typeof data !== "string" ) {
  508             return null;
  509         }
  510 
  511         // Support: IE9
  512         try {
  513             tmp = new DOMParser();
  514             xml = tmp.parseFromString( data , "text/xml" );
  515         } catch ( e ) {
  516             xml = undefined;
  517         }
  518 
  519         if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
  520             jQuery.error( "Invalid XML: " + data );
  521         }
  522         return xml;
  523     },
  524 
  525     noop: function() {},
  526 
  527     // Evaluates a script in a global context
  528     globalEval: function( code ) {
  529         var script,
  530                 indirect = eval;
  531 
  532         code = jQuery.trim( code );
  533 
  534         if ( code ) {
  535             // If the code includes a valid, prologue position
  536             // strict mode pragma, execute code by injecting a
  537             // script tag into the document.
  538             if ( code.indexOf("use strict") === 1 ) {
  539                 script = document.createElement("script");
  540                 script.text = code;
  541                 document.head.appendChild( script ).parentNode.removeChild( script );
  542             } else {
  543             // Otherwise, avoid the DOM node creation, insertion
  544             // and removal by using an indirect global eval
  545                 indirect( code );
  546             }
  547         }
  548     },
  549 
  550     // Convert dashed to camelCase; used by the css and data modules
  551     // Microsoft forgot to hump their vendor prefix (#9572)
  552     camelCase: function( string ) {
  553         return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
  554     },
  555 
  556     nodeName: function( elem, name ) {
  557         return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
  558     },
  559 
  560     // args is for internal usage only
  561     each: function( obj, callback, args ) {
  562         var value,
  563             i = 0,
  564             length = obj.length,
  565             isArray = isArraylike( obj );
  566 
  567         if ( args ) {
  568             if ( isArray ) {
  569                 for ( ; i < length; i++ ) {
  570                     value = callback.apply( obj[ i ], args );
  571 
  572                     if ( value === false ) {
  573                         break;
  574                     }
  575                 }
  576             } else {
  577                 for ( i in obj ) {
  578                     value = callback.apply( obj[ i ], args );
  579 
  580                     if ( value === false ) {
  581                         break;
  582                     }
  583                 }
  584             }
  585 
  586         // A special, fast, case for the most common use of each
  587         } else {
  588             if ( isArray ) {
  589                 for ( ; i < length; i++ ) {
  590                     value = callback.call( obj[ i ], i, obj[ i ] );
  591 
  592                     if ( value === false ) {
  593                         break;
  594                     }
  595                 }
  596             } else {
  597                 for ( i in obj ) {
  598                     value = callback.call( obj[ i ], i, obj[ i ] );
  599 
  600                     if ( value === false ) {
  601                         break;
  602                     }
  603                 }
  604             }
  605         }
  606 
  607         return obj;
  608     },
  609 
  610     trim: function( text ) {
  611         return text == null ? "" : core_trim.call( text );
  612     },
  613 
  614     // results is for internal usage only
  615     makeArray: function( arr, results ) {
  616         var ret = results || [];
  617 
  618         if ( arr != null ) {
  619             if ( isArraylike( Object(arr) ) ) {
  620                 jQuery.merge( ret,
  621                     typeof arr === "string" ?
  622                     [ arr ] : arr
  623                 );
  624             } else {
  625                 core_push.call( ret, arr );
  626             }
  627         }
  628 
  629         return ret;
  630     },
  631 
  632     inArray: function( elem, arr, i ) {
  633         return arr == null ? -1 : core_indexOf.call( arr, elem, i );
  634     },
  635 
  636     merge: function( first, second ) {
  637         var l = second.length,
  638             i = first.length,
  639             j = 0;
  640 
  641         if ( typeof l === "number" ) {
  642             for ( ; j < l; j++ ) {
  643                 first[ i++ ] = second[ j ];
  644             }
  645         } else {
  646             while ( second[j] !== undefined ) {
  647                 first[ i++ ] = second[ j++ ];
  648             }
  649         }
  650 
  651         first.length = i;
  652 
  653         return first;
  654     },
  655 
  656     grep: function( elems, callback, inv ) {
  657         var retVal,
  658             ret = [],
  659             i = 0,
  660             length = elems.length;
  661         inv = !!inv;
  662 
  663         // Go through the array, only saving the items
  664         // that pass the validator function
  665         for ( ; i < length; i++ ) {
  666             retVal = !!callback( elems[ i ], i );
  667             if ( inv !== retVal ) {
  668                 ret.push( elems[ i ] );
  669             }
  670         }
  671 
  672         return ret;
  673     },
  674 
  675     // arg is for internal usage only
  676     map: function( elems, callback, arg ) {
  677         var value,
  678             i = 0,
  679             length = elems.length,
  680             isArray = isArraylike( elems ),
  681             ret = [];
  682 
  683         // Go through the array, translating each of the items to their
  684         if ( isArray ) {
  685             for ( ; i < length; i++ ) {
  686                 value = callback( elems[ i ], i, arg );
  687 
  688                 if ( value != null ) {
  689                     ret[ ret.length ] = value;
  690                 }
  691             }
  692 
  693         // Go through every key on the object,
  694         } else {
  695             for ( i in elems ) {
  696                 value = callback( elems[ i ], i, arg );
  697 
  698                 if ( value != null ) {
  699                     ret[ ret.length ] = value;
  700                 }
  701             }
  702         }
  703 
  704         // Flatten any nested arrays
  705         return core_concat.apply( [], ret );
  706     },
  707 
  708     // A global GUID counter for objects
  709     guid: 1,
  710 
  711     // Bind a function to a context, optionally partially applying any
  712     // arguments.
  713     proxy: function( fn, context ) {
  714         var tmp, args, proxy;
  715 
  716         if ( typeof context === "string" ) {
  717             tmp = fn[ context ];
  718             context = fn;
  719             fn = tmp;
  720         }
  721 
  722         // Quick check to determine if target is callable, in the spec
  723         // this throws a TypeError, but we will just return undefined.
  724         if ( !jQuery.isFunction( fn ) ) {
  725             return undefined;
  726         }
  727 
  728         // Simulated bind
  729         args = core_slice.call( arguments, 2 );
  730         proxy = function() {
  731             return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
  732         };
  733 
  734         // Set the guid of unique handler to the same of original handler, so it can be removed
  735         proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  736 
  737         return proxy;
  738     },
  739 
  740     // Multifunctional method to get and set values of a collection
  741     // The value/s can optionally be executed if it's a function
  742     access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
  743         var i = 0,
  744             length = elems.length,
  745             bulk = key == null;
  746 
  747         // Sets many values
  748         if ( jQuery.type( key ) === "object" ) {
  749             chainable = true;
  750             for ( i in key ) {
  751                 jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
  752             }
  753 
  754         // Sets one value
  755         } else if ( value !== undefined ) {
  756             chainable = true;
  757 
  758             if ( !jQuery.isFunction( value ) ) {
  759                 raw = true;
  760             }
  761 
  762             if ( bulk ) {
  763                 // Bulk operations run against the entire set
  764                 if ( raw ) {
  765                     fn.call( elems, value );
  766                     fn = null;
  767 
  768                 // ...except when executing function values
  769                 } else {
  770                     bulk = fn;
  771                     fn = function( elem, key, value ) {
  772                         return bulk.call( jQuery( elem ), value );
  773                     };
  774                 }
  775             }
  776 
  777             if ( fn ) {
  778                 for ( ; i < length; i++ ) {
  779                     fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
  780                 }
  781             }
  782         }
  783 
  784         return chainable ?
  785             elems :
  786 
  787             // Gets
  788             bulk ?
  789                 fn.call( elems ) :
  790                 length ? fn( elems[0], key ) : emptyGet;
  791     },
  792 
  793     now: Date.now,
  794 
  795     // A method for quickly swapping in/out CSS properties to get correct calculations.
  796     // Note: this method belongs to the css module but it's needed here for the support module.
  797     // If support gets modularized, this method should be moved back to the css module.
  798     swap: function( elem, options, callback, args ) {
  799         var ret, name,
  800             old = {};
  801 
  802         // Remember the old values, and insert the new ones
  803         for ( name in options ) {
  804             old[ name ] = elem.style[ name ];
  805             elem.style[ name ] = options[ name ];
  806         }
  807 
  808         ret = callback.apply( elem, args || [] );
  809 
  810         // Revert the old values
  811         for ( name in options ) {
  812             elem.style[ name ] = old[ name ];
  813         }
  814 
  815         return ret;
  816     }
  817 });
  818 
  819 jQuery.ready.promise = function( obj ) {
  820     if ( !readyList ) {
  821 
  822         readyList = jQuery.Deferred();
  823 
  824         // Catch cases where $(document).ready() is called after the browser event has already occurred.
  825         // we once tried to use readyState "interactive" here, but it caused issues like the one
  826         // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
  827         if ( document.readyState === "complete" ) {
  828             // Handle it asynchronously to allow scripts the opportunity to delay ready
  829             setTimeout( jQuery.ready );
  830 
  831         } else {
  832 
  833             // Use the handy event callback
  834             document.addEventListener( "DOMContentLoaded", completed, false );
  835 
  836             // A fallback to window.onload, that will always work
  837             window.addEventListener( "load", completed, false );
  838         }
  839     }
  840     return readyList.promise( obj );
  841 };
  842 
  843 // Populate the class2type map
  844 jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
  845     class2type[ "[object " + name + "]" ] = name.toLowerCase();
  846 });
  847 
  848 function isArraylike( obj ) {
  849     var length = obj.length,
  850         type = jQuery.type( obj );
  851 
  852     if ( jQuery.isWindow( obj ) ) {
  853         return false;
  854     }
  855 
  856     if ( obj.nodeType === 1 && length ) {
  857         return true;
  858     }
  859 
  860     return type === "array" || type !== "function" &&
  861         ( length === 0 ||
  862         typeof length === "number" && length > 0 && ( length - 1 ) in obj );
  863 }
  864 
  865 // All jQuery objects should point back to these
  866 rootjQuery = jQuery(document);
  867 /*!
  868  * Sizzle CSS Selector Engine v1.9.4-pre
  869  * http://sizzlejs.com/
  870  *
  871  * Copyright 2013 jQuery Foundation, Inc. and other contributors
  872  * Released under the MIT license
  873  * http://jquery.org/license
  874  *
  875  * Date: 2013-06-03
  876  */
  877 (function( window, undefined ) {
  878 
  879 var i,
  880     support,
  881     cachedruns,
  882     Expr,
  883     getText,
  884     isXML,
  885     compile,
  886     outermostContext,
  887     sortInput,
  888 
  889     // Local document vars
  890     setDocument,
  891     document,
  892     docElem,
  893     documentIsHTML,
  894     rbuggyQSA,
  895     rbuggyMatches,
  896     matches,
  897     contains,
  898 
  899     // Instance-specific data
  900     expando = "sizzle" + -(new Date()),
  901     preferredDoc = window.document,
  902     dirruns = 0,
  903     done = 0,
  904     classCache = createCache(),
  905     tokenCache = createCache(),
  906     compilerCache = createCache(),
  907     hasDuplicate = false,
  908     sortOrder = function( a, b ) {
  909         if ( a === b ) {
  910             hasDuplicate = true;
  911             return 0;
  912         }
  913         return 0;
  914     },
  915 
  916     // General-purpose constants
  917     strundefined = typeof undefined,
  918     MAX_NEGATIVE = 1 << 31,
  919 
  920     // Instance methods
  921     hasOwn = ({}).hasOwnProperty,
  922     arr = [],
  923     pop = arr.pop,
  924     push_native = arr.push,
  925     push = arr.push,
  926     slice = arr.slice,
  927     // Use a stripped-down indexOf if we can't use a native one
  928     indexOf = arr.indexOf || function( elem ) {
  929         var i = 0,
  930             len = this.length;
  931         for ( ; i < len; i++ ) {
  932             if ( this[i] === elem ) {
  933                 return i;
  934             }
  935         }
  936         return -1;
  937     },
  938 
  939     booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  940 
  941     // Regular expressions
  942 
  943     // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
  944     whitespace = "[\\x20\\t\\r\\n\\f]",
  945     // http://www.w3.org/TR/css3-syntax/#characters
  946     characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  947 
  948     // Loosely modeled on CSS identifier characters
  949     // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
  950     // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
  951     identifier = characterEncoding.replace( "w", "w#" ),
  952 
  953     // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
  954     attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
  955         "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
  956 
  957     // Prefer arguments quoted,
  958     //   then not containing pseudos/brackets,
  959     //   then attribute selectors/non-parenthetical expressions,
  960     //   then anything else
  961     // These preferences are here to reduce the number of selectors
  962     //   needing tokenize in the PSEUDO preFilter
  963     pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
  964 
  965     // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
  966     rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
  967 
  968     rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
  969     rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
  970 
  971     rsibling = new RegExp( whitespace + "*[+~]" ),
  972     rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
  973 
  974     rpseudo = new RegExp( pseudos ),
  975     ridentifier = new RegExp( "^" + identifier + "$" ),
  976 
  977     matchExpr = {
  978         "ID": new RegExp( "^#(" + characterEncoding + ")" ),
  979         "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
  980         "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
  981         "ATTR": new RegExp( "^" + attributes ),
  982         "PSEUDO": new RegExp( "^" + pseudos ),
  983         "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
  984             "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
  985             "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
  986         "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
  987         // For use in libraries implementing .is()
  988         // We use this for POS matching in `select`
  989         "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
  990             whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
  991     },
  992 
  993     rnative = /^[^{]+\{\s*\[native \w/,
  994 
  995     // Easily-parseable/retrievable ID or TAG or CLASS selectors
  996     rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  997 
  998     rinputs = /^(?:input|select|textarea|button)$/i,
  999     rheader = /^h\d$/i,
 1000 
 1001     rescape = /'|\\/g,
 1002 
 1003     // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
 1004     runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
 1005     funescape = function( _, escaped, escapedWhitespace ) {
 1006         var high = "0x" + escaped - 0x10000;
 1007         // NaN means non-codepoint
 1008         // Support: Firefox
 1009         // Workaround erroneous numeric interpretation of +"0x"
 1010         return high !== high || escapedWhitespace ?
 1011             escaped :
 1012             // BMP codepoint
 1013             high < 0 ?
 1014                 String.fromCharCode( high + 0x10000 ) :
 1015                 // Supplemental Plane codepoint (surrogate pair)
 1016                 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
 1017     };
 1018 
 1019 // Optimize for push.apply( _, NodeList )
 1020 try {
 1021     push.apply(
 1022         (arr = slice.call( preferredDoc.childNodes )),
 1023         preferredDoc.childNodes
 1024     );
 1025     // Support: Android<4.0
 1026     // Detect silently failing push.apply
 1027     arr[ preferredDoc.childNodes.length ].nodeType;
 1028 } catch ( e ) {
 1029     push = { apply: arr.length ?
 1030 
 1031         // Leverage slice if possible
 1032         function( target, els ) {
 1033             push_native.apply( target, slice.call(els) );
 1034         } :
 1035 
 1036         // Support: IE<9
 1037         // Otherwise append directly
 1038         function( target, els ) {
 1039             var j = target.length,
 1040                 i = 0;
 1041             // Can't trust NodeList.length
 1042             while ( (target[j++] = els[i++]) ) {}
 1043             target.length = j - 1;
 1044         }
 1045     };
 1046 }
 1047 
 1048 function Sizzle( selector, context, results, seed ) {
 1049     var match, elem, m, nodeType,
 1050         // QSA vars
 1051         i, groups, old, nid, newContext, newSelector;
 1052 
 1053     if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
 1054         setDocument( context );
 1055     }
 1056 
 1057     context = context || document;
 1058     results = results || [];
 1059 
 1060     if ( !selector || typeof selector !== "string" ) {
 1061         return results;
 1062     }
 1063 
 1064     if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
 1065         return [];
 1066     }
 1067 
 1068     if ( documentIsHTML && !seed ) {
 1069 
 1070         // Shortcuts
 1071         if ( (match = rquickExpr.exec( selector )) ) {
 1072             // Speed-up: Sizzle("#ID")
 1073             if ( (m = match[1]) ) {
 1074                 if ( nodeType === 9 ) {
 1075                     elem = context.getElementById( m );
 1076                     // Check parentNode to catch when Blackberry 4.6 returns
 1077                     // nodes that are no longer in the document #6963
 1078                     if ( elem && elem.parentNode ) {
 1079                         // Handle the case where IE, Opera, and Webkit return items
 1080                         // by name instead of ID
 1081                         if ( elem.id === m ) {
 1082                             results.push( elem );
 1083                             return results;
 1084                         }
 1085                     } else {
 1086                         return results;
 1087                     }
 1088                 } else {
 1089                     // Context is not a document
 1090                     if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
 1091                         contains( context, elem ) && elem.id === m ) {
 1092                         results.push( elem );
 1093                         return results;
 1094                     }
 1095                 }
 1096 
 1097             // Speed-up: Sizzle("TAG")
 1098             } else if ( match[2] ) {
 1099                 push.apply( results, context.getElementsByTagName( selector ) );
 1100                 return results;
 1101 
 1102             // Speed-up: Sizzle(".CLASS")
 1103             } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
 1104                 push.apply( results, context.getElementsByClassName( m ) );
 1105                 return results;
 1106             }
 1107         }
 1108 
 1109         // QSA path
 1110         if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
 1111             nid = old = expando;
 1112             newContext = context;
 1113             newSelector = nodeType === 9 && selector;
 1114 
 1115             // qSA works strangely on Element-rooted queries
 1116             // We can work around this by specifying an extra ID on the root
 1117             // and working up from there (Thanks to Andrew Dupont for the technique)
 1118             // IE 8 doesn't work on object elements
 1119             if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
 1120                 groups = tokenize( selector );
 1121 
 1122                 if ( (old = context.getAttribute("id")) ) {
 1123                     nid = old.replace( rescape, "\\$&" );
 1124                 } else {
 1125                     context.setAttribute( "id", nid );
 1126                 }
 1127                 nid = "[id='" + nid + "'] ";
 1128 
 1129                 i = groups.length;
 1130                 while ( i-- ) {
 1131                     groups[i] = nid + toSelector( groups[i] );
 1132                 }
 1133                 newContext = rsibling.test( selector ) && context.parentNode || context;
 1134                 newSelector = groups.join(",");
 1135             }
 1136 
 1137             if ( newSelector ) {
 1138                 try {
 1139                     push.apply( results,
 1140                         newContext.querySelectorAll( newSelector )
 1141                     );
 1142                     return results;
 1143                 } catch(qsaError) {
 1144                 } finally {
 1145                     if ( !old ) {
 1146                         context.removeAttribute("id");
 1147                     }
 1148                 }
 1149             }
 1150         }
 1151     }
 1152 
 1153     // All others
 1154     return select( selector.replace( rtrim, "$1" ), context, results, seed );
 1155 }
 1156 
 1157 /**
 1158  * Create key-value caches of limited size
 1159  * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
 1160  *  property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 1161  *  deleting the oldest entry
 1162  */
 1163 function createCache() {
 1164     var keys = [];
 1165 
 1166     function cache( key, value ) {
 1167         // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
 1168         if ( keys.push( key += " " ) > Expr.cacheLength ) {
 1169             // Only keep the most recent entries
 1170             delete cache[ keys.shift() ];
 1171         }
 1172         return (cache[ key ] = value);
 1173     }
 1174     return cache;
 1175 }
 1176 
 1177 /**
 1178  * Mark a function for special use by Sizzle
 1179  * @param {Function} fn The function to mark
 1180  */
 1181 function markFunction( fn ) {
 1182     fn[ expando ] = true;
 1183     return fn;
 1184 }
 1185 
 1186 /**
 1187  * Support testing using an element
 1188  * @param {Function} fn Passed the created div and expects a boolean result
 1189  */
 1190 function assert( fn ) {
 1191     var div = document.createElement("div");
 1192 
 1193     try {
 1194         return !!fn( div );
 1195     } catch (e) {
 1196         return false;
 1197     } finally {
 1198         // Remove from its parent by default
 1199         if ( div.parentNode ) {
 1200             div.parentNode.removeChild( div );
 1201         }
 1202         // release memory in IE
 1203         div = null;
 1204     }
 1205 }
 1206 
 1207 /**
 1208  * Adds the same handler for all of the specified attrs
 1209  * @param {String} attrs Pipe-separated list of attributes
 1210  * @param {Function} handler The method that will be applied
 1211  */
 1212 function addHandle( attrs, handler ) {
 1213     var arr = attrs.split("|"),
 1214         i = attrs.length;
 1215 
 1216     while ( i-- ) {
 1217         Expr.attrHandle[ arr[i] ] = handler;
 1218     }
 1219 }
 1220 
 1221 /**
 1222  * Checks document order of two siblings
 1223  * @param {Element} a
 1224  * @param {Element} b
 1225  * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
 1226  */
 1227 function siblingCheck( a, b ) {
 1228     var cur = b && a,
 1229         diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
 1230             ( ~b.sourceIndex || MAX_NEGATIVE ) -
 1231             ( ~a.sourceIndex || MAX_NEGATIVE );
 1232 
 1233     // Use IE sourceIndex if available on both nodes
 1234     if ( diff ) {
 1235         return diff;
 1236     }
 1237 
 1238     // Check if b follows a
 1239     if ( cur ) {
 1240         while ( (cur = cur.nextSibling) ) {
 1241             if ( cur === b ) {
 1242                 return -1;
 1243             }
 1244         }
 1245     }
 1246 
 1247     return a ? 1 : -1;
 1248 }
 1249 
 1250 /**
 1251  * Returns a function to use in pseudos for input types
 1252  * @param {String} type
 1253  */
 1254 function createInputPseudo( type ) {
 1255     return function( elem ) {
 1256         var name = elem.nodeName.toLowerCase();
 1257         return name === "input" && elem.type === type;
 1258     };
 1259 }
 1260 
 1261 /**
 1262  * Returns a function to use in pseudos for buttons
 1263  * @param {String} type
 1264  */
 1265 function createButtonPseudo( type ) {
 1266     return function( elem ) {
 1267         var name = elem.nodeName.toLowerCase();
 1268         return (name === "input" || name === "button") && elem.type === type;
 1269     };
 1270 }
 1271 
 1272 /**
 1273  * Returns a function to use in pseudos for positionals
 1274  * @param {Function} fn
 1275  */
 1276 function createPositionalPseudo( fn ) {
 1277     return markFunction(function( argument ) {
 1278         argument = +argument;
 1279         return markFunction(function( seed, matches ) {
 1280             var j,
 1281                 matchIndexes = fn( [], seed.length, argument ),
 1282                 i = matchIndexes.length;
 1283 
 1284             // Match elements found at the specified indexes
 1285             while ( i-- ) {
 1286                 if ( seed[ (j = matchIndexes[i]) ] ) {
 1287                     seed[j] = !(matches[j] = seed[j]);
 1288                 }
 1289             }
 1290         });
 1291     });
 1292 }
 1293 
 1294 /**
 1295  * Detect xml
 1296  * @param {Element|Object} elem An element or a document
 1297  */
 1298 isXML = Sizzle.isXML = function( elem ) {
 1299     // documentElement is verified for cases where it doesn't yet exist
 1300     // (such as loading iframes in IE - #4833)
 1301     var documentElement = elem && (elem.ownerDocument || elem).documentElement;
 1302     return documentElement ? documentElement.nodeName !== "HTML" : false;
 1303 };
 1304 
 1305 // Expose support vars for convenience
 1306 support = Sizzle.support = {};
 1307 
 1308 /**
 1309  * Sets document-related variables once based on the current document
 1310  * @param {Element|Object} [doc] An element or document object to use to set the document
 1311  * @returns {Object} Returns the current document
 1312  */
 1313 setDocument = Sizzle.setDocument = function( node ) {
 1314     var doc = node ? node.ownerDocument || node : preferredDoc,
 1315         parent = doc.defaultView;
 1316 
 1317     // If no document and documentElement is available, return
 1318     if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
 1319         return document;
 1320     }
 1321 
 1322     // Set our document
 1323     document = doc;
 1324     docElem = doc.documentElement;
 1325 
 1326     // Support tests
 1327     documentIsHTML = !isXML( doc );
 1328 
 1329     // Support: IE>8
 1330     // If iframe document is assigned to "document" variable and if iframe has been reloaded,
 1331     // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
 1332     // IE6-8 do not support the defaultView property so parent will be undefined
 1333     if ( parent && parent.attachEvent && parent !== parent.top ) {
 1334         parent.attachEvent( "onbeforeunload", function() {
 1335             setDocument();
 1336         });
 1337     }
 1338 
 1339     /* Attributes
 1340     ---------------------------------------------------------------------- */
 1341 
 1342     // Support: IE<8
 1343     // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
 1344     support.attributes = assert(function( div ) {
 1345         div.className = "i";
 1346         return !div.getAttribute("className");
 1347     });
 1348 
 1349     /* getElement(s)By*
 1350     ---------------------------------------------------------------------- */
 1351 
 1352     // Check if getElementsByTagName("*") returns only elements
 1353     support.getElementsByTagName = assert(function( div ) {
 1354         div.appendChild( doc.createComment("") );
 1355         return !div.getElementsByTagName("*").length;
 1356     });
 1357 
 1358     // Check if getElementsByClassName can be trusted
 1359     support.getElementsByClassName = assert(function( div ) {
 1360         div.innerHTML = "<div class='a'></div><div class='a i'></div>";
 1361 
 1362         // Support: Safari<4
 1363         // Catch class over-caching
 1364         div.firstChild.className = "i";
 1365         // Support: Opera<10
 1366         // Catch gEBCN failure to find non-leading classes
 1367         return div.getElementsByClassName("i").length === 2;
 1368     });
 1369 
 1370     // Support: IE<10
 1371     // Check if getElementById returns elements by name
 1372     // The broken getElementById methods don't pick up programatically-set names,
 1373     // so use a roundabout getElementsByName test
 1374     support.getById = assert(function( div ) {
 1375         docElem.appendChild( div ).id = expando;
 1376         return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
 1377     });
 1378 
 1379     // ID find and filter
 1380     if ( support.getById ) {
 1381         Expr.find["ID"] = function( id, context ) {
 1382             if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
 1383                 var m = context.getElementById( id );
 1384                 // Check parentNode to catch when Blackberry 4.6 returns
 1385                 // nodes that are no longer in the document #6963
 1386                 return m && m.parentNode ? [m] : [];
 1387             }
 1388         };
 1389         Expr.filter["ID"] = function( id ) {
 1390             var attrId = id.replace( runescape, funescape );
 1391             return function( elem ) {
 1392                 return elem.getAttribute("id") === attrId;
 1393             };
 1394         };
 1395     } else {
 1396         // Support: IE6/7
 1397         // getElementById is not reliable as a find shortcut
 1398         delete Expr.find["ID"];
 1399 
 1400         Expr.filter["ID"] =  function( id ) {
 1401             var attrId = id.replace( runescape, funescape );
 1402             return function( elem ) {
 1403                 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
 1404                 return node && node.value === attrId;
 1405             };
 1406         };
 1407     }
 1408 
 1409     // Tag
 1410     Expr.find["TAG"] = support.getElementsByTagName ?
 1411         function( tag, context ) {
 1412             if ( typeof context.getElementsByTagName !== strundefined ) {
 1413                 return context.getElementsByTagName( tag );
 1414             }
 1415         } :
 1416         function( tag, context ) {
 1417             var elem,
 1418                 tmp = [],
 1419                 i = 0,
 1420                 results = context.getElementsByTagName( tag );
 1421 
 1422             // Filter out possible comments
 1423             if ( tag === "*" ) {
 1424                 while ( (elem = results[i++]) ) {
 1425                     if ( elem.nodeType === 1 ) {
 1426                         tmp.push( elem );
 1427                     }
 1428                 }
 1429 
 1430                 return tmp;
 1431             }
 1432             return results;
 1433         };
 1434 
 1435     // Class
 1436     Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
 1437         if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
 1438             return context.getElementsByClassName( className );
 1439         }
 1440     };
 1441 
 1442     /* QSA/matchesSelector
 1443     ---------------------------------------------------------------------- */
 1444 
 1445     // QSA and matchesSelector support
 1446 
 1447     // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
 1448     rbuggyMatches = [];
 1449 
 1450     // qSa(:focus) reports false when true (Chrome 21)
 1451     // We allow this because of a bug in IE8/9 that throws an error
 1452     // whenever `document.activeElement` is accessed on an iframe
 1453     // So, we allow :focus to pass through QSA all the time to avoid the IE error
 1454     // See http://bugs.jquery.com/ticket/13378
 1455     rbuggyQSA = [];
 1456 
 1457     if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
 1458         // Build QSA regex
 1459         // Regex strategy adopted from Diego Perini
 1460         assert(function( div ) {
 1461             // Select is set to empty string on purpose
 1462             // This is to test IE's treatment of not explicitly
 1463             // setting a boolean content attribute,
 1464             // since its presence should be enough
 1465             // http://bugs.jquery.com/ticket/12359
 1466             div.innerHTML = "<select><option selected=''></option></select>";
 1467 
 1468             // Support: IE8
 1469             // Boolean attributes and "value" are not treated correctly
 1470             if ( !div.querySelectorAll("[selected]").length ) {
 1471                 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
 1472             }
 1473 
 1474             // Webkit/Opera - :checked should return selected option elements
 1475             // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
 1476             // IE8 throws error here and will not see later tests
 1477             if ( !div.querySelectorAll(":checked").length ) {
 1478                 rbuggyQSA.push(":checked");
 1479             }
 1480         });
 1481 
 1482         assert(function( div ) {
 1483 
 1484             // Support: Opera 10-12/IE8
 1485             // ^= $= *= and empty values
 1486             // Should not select anything
 1487             // Support: Windows 8 Native Apps
 1488             // The type attribute is restricted during .innerHTML assignment
 1489             var input = doc.createElement("input");
 1490             input.setAttribute( "type", "hidden" );
 1491             div.appendChild( input ).setAttribute( "t", "" );
 1492 
 1493             if ( div.querySelectorAll("[t^='']").length ) {
 1494                 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
 1495             }
 1496 
 1497             // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
 1498             // IE8 throws error here and will not see later tests
 1499             if ( !div.querySelectorAll(":enabled").length ) {
 1500                 rbuggyQSA.push( ":enabled", ":disabled" );
 1501             }
 1502 
 1503             // Opera 10-11 does not throw on post-comma invalid pseudos
 1504             div.querySelectorAll("*,:x");
 1505             rbuggyQSA.push(",.*:");
 1506         });
 1507     }
 1508 
 1509     if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
 1510         docElem.mozMatchesSelector ||
 1511         docElem.oMatchesSelector ||
 1512         docElem.msMatchesSelector) )) ) {
 1513 
 1514         assert(function( div ) {
 1515             // Check to see if it's possible to do matchesSelector
 1516             // on a disconnected node (IE 9)
 1517             support.disconnectedMatch = matches.call( div, "div" );
 1518 
 1519             // This should fail with an exception
 1520             // Gecko does not error, returns false instead
 1521             matches.call( div, "[s!='']:x" );
 1522             rbuggyMatches.push( "!=", pseudos );
 1523         });
 1524     }
 1525 
 1526     rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
 1527     rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
 1528 
 1529     /* Contains
 1530     ---------------------------------------------------------------------- */
 1531 
 1532     // Element contains another
 1533     // Purposefully does not implement inclusive descendent
 1534     // As in, an element does not contain itself
 1535     contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
 1536         function( a, b ) {
 1537             var adown = a.nodeType === 9 ? a.documentElement : a,
 1538                 bup = b && b.parentNode;
 1539             return a === bup || !!( bup && bup.nodeType === 1 && (
 1540                 adown.contains ?
 1541                     adown.contains( bup ) :
 1542                     a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
 1543             ));
 1544         } :
 1545         function( a, b ) {
 1546             if ( b ) {
 1547                 while ( (b = b.parentNode) ) {
 1548                     if ( b === a ) {
 1549                         return true;
 1550                     }
 1551                 }
 1552             }
 1553             return false;
 1554         };
 1555 
 1556     /* Sorting
 1557     ---------------------------------------------------------------------- */
 1558 
 1559     // Document order sorting
 1560     sortOrder = docElem.compareDocumentPosition ?
 1561     function( a, b ) {
 1562 
 1563         // Flag for duplicate removal
 1564         if ( a === b ) {
 1565             hasDuplicate = true;
 1566             return 0;
 1567         }
 1568 
 1569         var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
 1570 
 1571         if ( compare ) {
 1572             // Disconnected nodes
 1573             if ( compare & 1 ||
 1574                 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
 1575 
 1576                 // Choose the first element that is related to our preferred document
 1577                 if ( a === doc || contains(preferredDoc, a) ) {
 1578                     return -1;
 1579                 }
 1580                 if ( b === doc || contains(preferredDoc, b) ) {
 1581                     return 1;
 1582                 }
 1583 
 1584                 // Maintain original order
 1585                 return sortInput ?
 1586                     ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
 1587                     0;
 1588             }
 1589 
 1590             return compare & 4 ? -1 : 1;
 1591         }
 1592 
 1593         // Not directly comparable, sort on existence of method
 1594         return a.compareDocumentPosition ? -1 : 1;
 1595     } :
 1596     function( a, b ) {
 1597         var cur,
 1598             i = 0,
 1599             aup = a.parentNode,
 1600             bup = b.parentNode,
 1601             ap = [ a ],
 1602             bp = [ b ];
 1603 
 1604         // Exit early if the nodes are identical
 1605         if ( a === b ) {
 1606             hasDuplicate = true;
 1607             return 0;
 1608 
 1609         // Parentless nodes are either documents or disconnected
 1610         } else if ( !aup || !bup ) {
 1611             return a === doc ? -1 :
 1612                 b === doc ? 1 :
 1613                 aup ? -1 :
 1614                 bup ? 1 :
 1615                 sortInput ?
 1616                 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
 1617                 0;
 1618 
 1619         // If the nodes are siblings, we can do a quick check
 1620         } else if ( aup === bup ) {
 1621             return siblingCheck( a, b );
 1622         }
 1623 
 1624         // Otherwise we need full lists of their ancestors for comparison
 1625         cur = a;
 1626         while ( (cur = cur.parentNode) ) {
 1627             ap.unshift( cur );
 1628         }
 1629         cur = b;
 1630         while ( (cur = cur.parentNode) ) {
 1631             bp.unshift( cur );
 1632         }
 1633 
 1634         // Walk down the tree looking for a discrepancy
 1635         while ( ap[i] === bp[i] ) {
 1636             i++;
 1637         }
 1638 
 1639         return i ?
 1640             // Do a sibling check if the nodes have a common ancestor
 1641             siblingCheck( ap[i], bp[i] ) :
 1642 
 1643             // Otherwise nodes in our document sort first
 1644             ap[i] === preferredDoc ? -1 :
 1645             bp[i] === preferredDoc ? 1 :
 1646             0;
 1647     };
 1648 
 1649     return doc;
 1650 };
 1651 
 1652 Sizzle.matches = function( expr, elements ) {
 1653     return Sizzle( expr, null, null, elements );
 1654 };
 1655 
 1656 Sizzle.matchesSelector = function( elem, expr ) {
 1657     // Set document vars if needed
 1658     if ( ( elem.ownerDocument || elem ) !== document ) {
 1659         setDocument( elem );
 1660     }
 1661 
 1662     // Make sure that attribute selectors are quoted
 1663     expr = expr.replace( rattributeQuotes, "='$1']" );
 1664 
 1665     if ( support.matchesSelector && documentIsHTML &&
 1666         ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
 1667         ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
 1668 
 1669         try {
 1670             var ret = matches.call( elem, expr );
 1671 
 1672             // IE 9's matchesSelector returns false on disconnected nodes
 1673             if ( ret || support.disconnectedMatch ||
 1674                     // As well, disconnected nodes are said to be in a document
 1675                     // fragment in IE 9
 1676                     elem.document && elem.document.nodeType !== 11 ) {
 1677                 return ret;
 1678             }
 1679         } catch(e) {}
 1680     }
 1681 
 1682     return Sizzle( expr, document, null, [elem] ).length > 0;
 1683 };
 1684 
 1685 Sizzle.contains = function( context, elem ) {
 1686     // Set document vars if needed
 1687     if ( ( context.ownerDocument || context ) !== document ) {
 1688         setDocument( context );
 1689     }
 1690     return contains( context, elem );
 1691 };
 1692 
 1693 Sizzle.attr = function( elem, name ) {
 1694     // Set document vars if needed
 1695     if ( ( elem.ownerDocument || elem ) !== document ) {
 1696         setDocument( elem );
 1697     }
 1698 
 1699     var fn = Expr.attrHandle[ name.toLowerCase() ],
 1700         // Don't get fooled by Object.prototype properties (jQuery #13807)
 1701         val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
 1702             fn( elem, name, !documentIsHTML ) :
 1703             undefined;
 1704 
 1705     return val === undefined ?
 1706         support.attributes || !documentIsHTML ?
 1707             elem.getAttribute( name ) :
 1708             (val = elem.getAttributeNode(name)) && val.specified ?
 1709                 val.value :
 1710                 null :
 1711         val;
 1712 };
 1713 
 1714 Sizzle.error = function( msg ) {
 1715     throw new Error( "Syntax error, unrecognized expression: " + msg );
 1716 };
 1717 
 1718 /**
 1719  * Document sorting and removing duplicates
 1720  * @param {ArrayLike} results
 1721  */
 1722 Sizzle.uniqueSort = function( results ) {
 1723     var elem,
 1724         duplicates = [],
 1725         j = 0,
 1726         i = 0;
 1727 
 1728     // Unless we *know* we can detect duplicates, assume their presence
 1729     hasDuplicate = !support.detectDuplicates;
 1730     sortInput = !support.sortStable && results.slice( 0 );
 1731     results.sort( sortOrder );
 1732 
 1733     if ( hasDuplicate ) {
 1734         while ( (elem = results[i++]) ) {
 1735             if ( elem === results[ i ] ) {
 1736                 j = duplicates.push( i );
 1737             }
 1738         }
 1739         while ( j-- ) {
 1740             results.splice( duplicates[ j ], 1 );
 1741         }
 1742     }
 1743 
 1744     return results;
 1745 };
 1746 
 1747 /**
 1748  * Utility function for retrieving the text value of an array of DOM nodes
 1749  * @param {Array|Element} elem
 1750  */
 1751 getText = Sizzle.getText = function( elem ) {
 1752     var node,
 1753         ret = "",
 1754         i = 0,
 1755         nodeType = elem.nodeType;
 1756 
 1757     if ( !nodeType ) {
 1758         // If no nodeType, this is expected to be an array
 1759         for ( ; (node = elem[i]); i++ ) {
 1760             // Do not traverse comment nodes
 1761             ret += getText( node );
 1762         }
 1763     } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
 1764         // Use textContent for elements
 1765         // innerText usage removed for consistency of new lines (see #11153)
 1766         if ( typeof elem.textContent === "string" ) {
 1767             return elem.textContent;
 1768         } else {
 1769             // Traverse its children
 1770             for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
 1771                 ret += getText( elem );
 1772             }
 1773         }
 1774     } else if ( nodeType === 3 || nodeType === 4 ) {
 1775         return elem.nodeValue;
 1776     }
 1777     // Do not include comment or processing instruction nodes
 1778 
 1779     return ret;
 1780 };
 1781 
 1782 Expr = Sizzle.selectors = {
 1783 
 1784     // Can be adjusted by the user
 1785     cacheLength: 50,
 1786 
 1787     createPseudo: markFunction,
 1788 
 1789     match: matchExpr,
 1790 
 1791     attrHandle: {},
 1792 
 1793     find: {},
 1794 
 1795     relative: {
 1796         ">": { dir: "parentNode", first: true },
 1797         " ": { dir: "parentNode" },
 1798         "+": { dir: "previousSibling", first: true },
 1799         "~": { dir: "previousSibling" }
 1800     },
 1801 
 1802     preFilter: {
 1803         "ATTR": function( match ) {
 1804             match[1] = match[1].replace( runescape, funescape );
 1805 
 1806             // Move the given value to match[3] whether quoted or unquoted
 1807             match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
 1808 
 1809             if ( match[2] === "~=" ) {
 1810                 match[3] = " " + match[3] + " ";
 1811             }
 1812 
 1813             return match.slice( 0, 4 );
 1814         },
 1815 
 1816         "CHILD": function( match ) {
 1817             /* matches from matchExpr["CHILD"]
 1818                 1 type (only|nth|...)
 1819                 2 what (child|of-type)
 1820                 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
 1821                 4 xn-component of xn+y argument ([+-]?\d*n|)
 1822                 5 sign of xn-component
 1823                 6 x of xn-component
 1824                 7 sign of y-component
 1825                 8 y of y-component
 1826             */
 1827             match[1] = match[1].toLowerCase();
 1828 
 1829             if ( match[1].slice( 0, 3 ) === "nth" ) {
 1830                 // nth-* requires argument
 1831                 if ( !match[3] ) {
 1832                     Sizzle.error( match[0] );
 1833                 }
 1834 
 1835                 // numeric x and y parameters for Expr.filter.CHILD
 1836                 // remember that false/true cast respectively to 0/1
 1837                 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
 1838                 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
 1839 
 1840             // other types prohibit arguments
 1841             } else if ( match[3] ) {
 1842                 Sizzle.error( match[0] );
 1843             }
 1844 
 1845             return match;
 1846         },
 1847 
 1848         "PSEUDO": function( match ) {
 1849             var excess,
 1850                 unquoted = !match[5] && match[2];
 1851 
 1852             if ( matchExpr["CHILD"].test( match[0] ) ) {
 1853                 return null;
 1854             }
 1855 
 1856             // Accept quoted arguments as-is
 1857             if ( match[3] && match[4] !== undefined ) {
 1858                 match[2] = match[4];
 1859 
 1860             // Strip excess characters from unquoted arguments
 1861             } else if ( unquoted && rpseudo.test( unquoted ) &&
 1862                 // Get excess from tokenize (recursively)
 1863                 (excess = tokenize( unquoted, true )) &&
 1864                 // advance to the next closing parenthesis
 1865                 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
 1866 
 1867                 // excess is a negative index
 1868                 match[0] = match[0].slice( 0, excess );
 1869                 match[2] = unquoted.slice( 0, excess );
 1870             }
 1871 
 1872             // Return only captures needed by the pseudo filter method (type and argument)
 1873             return match.slice( 0, 3 );
 1874         }
 1875     },
 1876 
 1877     filter: {
 1878 
 1879         "TAG": function( nodeNameSelector ) {
 1880             var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
 1881             return nodeNameSelector === "*" ?
 1882                 function() { return true; } :
 1883                 function( elem ) {
 1884                     return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
 1885                 };
 1886         },
 1887 
 1888         "CLASS": function( className ) {
 1889             var pattern = classCache[ className + " " ];
 1890 
 1891             return pattern ||
 1892                 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
 1893                 classCache( className, function( elem ) {
 1894                     return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
 1895                 });
 1896         },
 1897 
 1898         "ATTR": function( name, operator, check ) {
 1899             return function( elem ) {
 1900                 var result = Sizzle.attr( elem, name );
 1901 
 1902                 if ( result == null ) {
 1903                     return operator === "!=";
 1904                 }
 1905                 if ( !operator ) {
 1906                     return true;
 1907                 }
 1908 
 1909                 result += "";
 1910 
 1911                 return operator === "=" ? result === check :
 1912                     operator === "!=" ? result !== check :
 1913                     operator === "^=" ? check && result.indexOf( check ) === 0 :
 1914                     operator === "*=" ? check && result.indexOf( check ) > -1 :
 1915                     operator === "$=" ? check && result.slice( -check.length ) === check :
 1916                     operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
 1917                     operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
 1918                     false;
 1919             };
 1920         },
 1921 
 1922         "CHILD": function( type, what, argument, first, last ) {
 1923             var simple = type.slice( 0, 3 ) !== "nth",
 1924                 forward = type.slice( -4 ) !== "last",
 1925                 ofType = what === "of-type";
 1926 
 1927             return first === 1 && last === 0 ?
 1928 
 1929                 // Shortcut for :nth-*(n)
 1930                 function( elem ) {
 1931                     return !!elem.parentNode;
 1932                 } :
 1933 
 1934                 function( elem, context, xml ) {
 1935                     var cache, outerCache, node, diff, nodeIndex, start,
 1936                         dir = simple !== forward ? "nextSibling" : "previousSibling",
 1937                         parent = elem.parentNode,
 1938                         name = ofType && elem.nodeName.toLowerCase(),
 1939                         useCache = !xml && !ofType;
 1940 
 1941                     if ( parent ) {
 1942 
 1943                         // :(first|last|only)-(child|of-type)
 1944                         if ( simple ) {
 1945                             while ( dir ) {
 1946                                 node = elem;
 1947                                 while ( (node = node[ dir ]) ) {
 1948                                     if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
 1949                                         return false;
 1950                                     }
 1951                                 }
 1952                                 // Reverse direction for :only-* (if we haven't yet done so)
 1953                                 start = dir = type === "only" && !start && "nextSibling";
 1954                             }
 1955                             return true;
 1956                         }
 1957 
 1958                         start = [ forward ? parent.firstChild : parent.lastChild ];
 1959 
 1960                         // non-xml :nth-child(...) stores cache data on `parent`
 1961                         if ( forward && useCache ) {
 1962                             // Seek `elem` from a previously-cached index
 1963                             outerCache = parent[ expando ] || (parent[ expando ] = {});
 1964                             cache = outerCache[ type ] || [];
 1965                             nodeIndex = cache[0] === dirruns && cache[1];
 1966                             diff = cache[0] === dirruns && cache[2];
 1967                             node = nodeIndex && parent.childNodes[ nodeIndex ];
 1968 
 1969                             while ( (node = ++nodeIndex && node && node[ dir ] ||
 1970 
 1971                                 // Fallback to seeking `elem` from the start
 1972                                 (diff = nodeIndex = 0) || start.pop()) ) {
 1973 
 1974                                 // When found, cache indexes on `parent` and break
 1975                                 if ( node.nodeType === 1 && ++diff && node === elem ) {
 1976                                     outerCache[ type ] = [ dirruns, nodeIndex, diff ];
 1977                                     break;
 1978                                 }
 1979                             }
 1980 
 1981                         // Use previously-cached element index if available
 1982                         } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
 1983                             diff = cache[1];
 1984 
 1985                         // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
 1986                         } else {
 1987                             // Use the same loop as above to seek `elem` from the start
 1988                             while ( (node = ++nodeIndex && node && node[ dir ] ||
 1989                                 (diff = nodeIndex = 0) || start.pop()) ) {
 1990 
 1991                                 if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
 1992                                     // Cache the index of each encountered element
 1993                                     if ( useCache ) {
 1994                                         (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
 1995                                     }
 1996 
 1997                                     if ( node === elem ) {
 1998                                         break;
 1999                                     }
 2000                                 }
 2001                             }
 2002                         }
 2003 
 2004                         // Incorporate the offset, then check against cycle size
 2005                         diff -= last;
 2006                         return diff === first || ( diff % first === 0 && diff / first >= 0 );
 2007                     }
 2008                 };
 2009         },
 2010 
 2011         "PSEUDO": function( pseudo, argument ) {
 2012             // pseudo-class names are case-insensitive
 2013             // http://www.w3.org/TR/selectors/#pseudo-classes
 2014             // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
 2015             // Remember that setFilters inherits from pseudos
 2016             var args,
 2017                 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
 2018                     Sizzle.error( "unsupported pseudo: " + pseudo );
 2019 
 2020             // The user may use createPseudo to indicate that
 2021             // arguments are needed to create the filter function
 2022             // just as Sizzle does
 2023             if ( fn[ expando ] ) {
 2024                 return fn( argument );
 2025             }
 2026 
 2027             // But maintain support for old signatures
 2028             if ( fn.length > 1 ) {
 2029                 args = [ pseudo, pseudo, "", argument ];
 2030                 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
 2031                     markFunction(function( seed, matches ) {
 2032                         var idx,
 2033                             matched = fn( seed, argument ),
 2034                             i = matched.length;
 2035                         while ( i-- ) {
 2036                             idx = indexOf.call( seed, matched[i] );
 2037                             seed[ idx ] = !( matches[ idx ] = matched[i] );
 2038                         }
 2039                     }) :
 2040                     function( elem ) {
 2041                         return fn( elem, 0, args );
 2042                     };
 2043             }
 2044 
 2045             return fn;
 2046         }
 2047     },
 2048 
 2049     pseudos: {
 2050         // Potentially complex pseudos
 2051         "not": markFunction(function( selector ) {
 2052             // Trim the selector passed to compile
 2053             // to avoid treating leading and trailing
 2054             // spaces as combinators
 2055             var input = [],
 2056                 results = [],
 2057                 matcher = compile( selector.replace( rtrim, "$1" ) );
 2058 
 2059             return matcher[ expando ] ?
 2060                 markFunction(function( seed, matches, context, xml ) {
 2061                     var elem,
 2062                         unmatched = matcher( seed, null, xml, [] ),
 2063                         i = seed.length;
 2064 
 2065                     // Match elements unmatched by `matcher`
 2066                     while ( i-- ) {
 2067                         if ( (elem = unmatched[i]) ) {
 2068                             seed[i] = !(matches[i] = elem);
 2069                         }
 2070                     }
 2071                 }) :
 2072                 function( elem, context, xml ) {
 2073                     input[0] = elem;
 2074                     matcher( input, null, xml, results );
 2075                     return !results.pop();
 2076                 };
 2077         }),
 2078 
 2079         "has": markFunction(function( selector ) {
 2080             return function( elem ) {
 2081                 return Sizzle( selector, elem ).length > 0;
 2082             };
 2083         }),
 2084 
 2085         "contains": markFunction(function( text ) {
 2086             return function( elem ) {
 2087                 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
 2088             };
 2089         }),
 2090 
 2091         // "Whether an element is represented by a :lang() selector
 2092         // is based solely on the element's language value
 2093         // being equal to the identifier C,
 2094         // or beginning with the identifier C immediately followed by "-".
 2095         // The matching of C against the element's language value is performed case-insensitively.
 2096         // The identifier C does not have to be a valid language name."
 2097         // http://www.w3.org/TR/selectors/#lang-pseudo
 2098         "lang": markFunction( function( lang ) {
 2099             // lang value must be a valid identifier
 2100             if ( !ridentifier.test(lang || "") ) {
 2101                 Sizzle.error( "unsupported lang: " + lang );
 2102             }
 2103             lang = lang.replace( runescape, funescape ).toLowerCase();
 2104             return function( elem ) {
 2105                 var elemLang;
 2106                 do {
 2107                     if ( (elemLang = documentIsHTML ?
 2108                         elem.lang :
 2109                         elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
 2110 
 2111                         elemLang = elemLang.toLowerCase();
 2112                         return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
 2113                     }
 2114                 } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
 2115                 return false;
 2116             };
 2117         }),
 2118 
 2119         // Miscellaneous
 2120         "target": function( elem ) {
 2121             var hash = window.location && window.location.hash;
 2122             return hash && hash.slice( 1 ) === elem.id;
 2123         },
 2124 
 2125         "root": function( elem ) {
 2126             return elem === docElem;
 2127         },
 2128 
 2129         "focus": function( elem ) {
 2130             return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
 2131         },
 2132 
 2133         // Boolean properties
 2134         "enabled": function( elem ) {
 2135             return elem.disabled === false;
 2136         },
 2137 
 2138         "disabled": function( elem ) {
 2139             return elem.disabled === true;
 2140         },
 2141 
 2142         "checked": function( elem ) {
 2143             // In CSS3, :checked should return both checked and selected elements
 2144             // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
 2145             var nodeName = elem.nodeName.toLowerCase();
 2146             return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
 2147         },
 2148 
 2149         "selected": function( elem ) {
 2150             // Accessing this property makes selected-by-default
 2151             // options in Safari work properly
 2152             if ( elem.parentNode ) {
 2153                 elem.parentNode.selectedIndex;
 2154             }
 2155 
 2156             return elem.selected === true;
 2157         },
 2158 
 2159         // Contents
 2160         "empty": function( elem ) {
 2161             // http://www.w3.org/TR/selectors/#empty-pseudo
 2162             // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
 2163             //   not comment, processing instructions, or others
 2164             // Thanks to Diego Perini for the nodeName shortcut
 2165             //   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
 2166             for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
 2167                 if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
 2168                     return false;
 2169                 }
 2170             }
 2171             return true;
 2172         },
 2173 
 2174         "parent": function( elem ) {
 2175             return !Expr.pseudos["empty"]( elem );
 2176         },
 2177 
 2178         // Element/input types
 2179         "header": function( elem ) {
 2180             return rheader.test( elem.nodeName );
 2181         },
 2182 
 2183         "input": function( elem ) {
 2184             return rinputs.test( elem.nodeName );
 2185         },
 2186 
 2187         "button": function( elem ) {
 2188             var name = elem.nodeName.toLowerCase();
 2189             return name === "input" && elem.type === "button" || name === "button";
 2190         },
 2191 
 2192         "text": function( elem ) {
 2193             var attr;
 2194             // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
 2195             // use getAttribute instead to test this case
 2196             return elem.nodeName.toLowerCase() === "input" &&
 2197                 elem.type === "text" &&
 2198                 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
 2199         },
 2200 
 2201         // Position-in-collection
 2202         "first": createPositionalPseudo(function() {
 2203             return [ 0 ];
 2204         }),
 2205 
 2206         "last": createPositionalPseudo(function( matchIndexes, length ) {
 2207             return [ length - 1 ];
 2208         }),
 2209 
 2210         "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
 2211             return [ argument < 0 ? argument + length : argument ];
 2212         }),
 2213 
 2214         "even": createPositionalPseudo(function( matchIndexes, length ) {
 2215             var i = 0;
 2216             for ( ; i < length; i += 2 ) {
 2217                 matchIndexes.push( i );
 2218             }
 2219             return matchIndexes;
 2220         }),
 2221 
 2222         "odd": createPositionalPseudo(function( matchIndexes, length ) {
 2223             var i = 1;
 2224             for ( ; i < length; i += 2 ) {
 2225                 matchIndexes.push( i );
 2226             }
 2227             return matchIndexes;
 2228         }),
 2229 
 2230         "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
 2231             var i = argument < 0 ? argument + length : argument;
 2232             for ( ; --i >= 0; ) {
 2233                 matchIndexes.push( i );
 2234             }
 2235             return matchIndexes;
 2236         }),
 2237 
 2238         "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
 2239             var i = argument < 0 ? argument + length : argument;
 2240             for ( ; ++i < length; ) {
 2241                 matchIndexes.push( i );
 2242             }
 2243             return matchIndexes;
 2244         })
 2245     }
 2246 };
 2247 
 2248 Expr.pseudos["nth"] = Expr.pseudos["eq"];
 2249 
 2250 // Add button/input type pseudos
 2251 for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
 2252     Expr.pseudos[ i ] = createInputPseudo( i );
 2253 }
 2254 for ( i in { submit: true, reset: true } ) {
 2255     Expr.pseudos[ i ] = createButtonPseudo( i );
 2256 }
 2257 
 2258 // Easy API for creating new setFilters
 2259 function setFilters() {}
 2260 setFilters.prototype = Expr.filters = Expr.pseudos;
 2261 Expr.setFilters = new setFilters();
 2262 
 2263 function tokenize( selector, parseOnly ) {
 2264     var matched, match, tokens, type,
 2265         soFar, groups, preFilters,
 2266         cached = tokenCache[ selector + " " ];
 2267 
 2268     if ( cached ) {
 2269         return parseOnly ? 0 : cached.slice( 0 );
 2270     }
 2271 
 2272     soFar = selector;
 2273     groups = [];
 2274     preFilters = Expr.preFilter;
 2275 
 2276     while ( soFar ) {
 2277 
 2278         // Comma and first run
 2279         if ( !matched || (match = rcomma.exec( soFar )) ) {
 2280             if ( match ) {
 2281                 // Don't consume trailing commas as valid
 2282                 soFar = soFar.slice( match[0].length ) || soFar;
 2283             }
 2284             groups.push( tokens = [] );
 2285         }
 2286 
 2287         matched = false;
 2288 
 2289         // Combinators
 2290         if ( (match = rcombinators.exec( soFar )) ) {
 2291             matched = match.shift();
 2292             tokens.push({
 2293                 value: matched,
 2294                 // Cast descendant combinators to space
 2295                 type: match[0].replace( rtrim, " " )
 2296             });
 2297             soFar = soFar.slice( matched.length );
 2298         }
 2299 
 2300         // Filters
 2301         for ( type in Expr.filter ) {
 2302             if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
 2303                 (match = preFilters[ type ]( match ))) ) {
 2304                 matched = match.shift();
 2305                 tokens.push({
 2306                     value: matched,
 2307                     type: type,
 2308                     matches: match
 2309                 });
 2310                 soFar = soFar.slice( matched.length );
 2311             }
 2312         }
 2313 
 2314         if ( !matched ) {
 2315             break;
 2316         }
 2317     }
 2318 
 2319     // Return the length of the invalid excess
 2320     // if we're just parsing
 2321     // Otherwise, throw an error or return tokens
 2322     return parseOnly ?
 2323         soFar.length :
 2324         soFar ?
 2325             Sizzle.error( selector ) :
 2326             // Cache the tokens
 2327             tokenCache( selector, groups ).slice( 0 );
 2328 }
 2329 
 2330 function toSelector( tokens ) {
 2331     var i = 0,
 2332         len = tokens.length,
 2333         selector = "";
 2334     for ( ; i < len; i++ ) {
 2335         selector += tokens[i].value;
 2336     }
 2337     return selector;
 2338 }
 2339 
 2340 function addCombinator( matcher, combinator, base ) {
 2341     var dir = combinator.dir,
 2342         checkNonElements = base && dir === "parentNode",
 2343         doneName = done++;
 2344 
 2345     return combinator.first ?
 2346         // Check against closest ancestor/preceding element
 2347         function( elem, context, xml ) {
 2348             while ( (elem = elem[ dir ]) ) {
 2349                 if ( elem.nodeType === 1 || checkNonElements ) {
 2350                     return matcher( elem, context, xml );
 2351                 }
 2352             }
 2353         } :
 2354 
 2355         // Check against all ancestor/preceding elements
 2356         function( elem, context, xml ) {
 2357             var data, cache, outerCache,
 2358                 dirkey = dirruns + " " + doneName;
 2359 
 2360             // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
 2361             if ( xml ) {
 2362                 while ( (elem = elem[ dir ]) ) {
 2363                     if ( elem.nodeType === 1 || checkNonElements ) {
 2364                         if ( matcher( elem, context, xml ) ) {
 2365                             return true;
 2366                         }
 2367                     }
 2368                 }
 2369             } else {
 2370                 while ( (elem = elem[ dir ]) ) {
 2371                     if ( elem.nodeType === 1 || checkNonElements ) {
 2372                         outerCache = elem[ expando ] || (elem[ expando ] = {});
 2373                         if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
 2374                             if ( (data = cache[1]) === true || data === cachedruns ) {
 2375                                 return data === true;
 2376                             }
 2377                         } else {
 2378                             cache = outerCache[ dir ] = [ dirkey ];
 2379                             cache[1] = matcher( elem, context, xml ) || cachedruns;
 2380                             if ( cache[1] === true ) {
 2381                                 return true;
 2382                             }
 2383                         }
 2384                     }
 2385                 }
 2386             }
 2387         };
 2388 }
 2389 
 2390 function elementMatcher( matchers ) {
 2391     return matchers.length > 1 ?
 2392         function( elem, context, xml ) {
 2393             var i = matchers.length;
 2394             while ( i-- ) {
 2395                 if ( !matchers[i]( elem, context, xml ) ) {
 2396                     return false;
 2397                 }
 2398             }
 2399             return true;
 2400         } :
 2401         matchers[0];
 2402 }
 2403 
 2404 function condense( unmatched, map, filter, context, xml ) {
 2405     var elem,
 2406         newUnmatched = [],
 2407         i = 0,
 2408         len = unmatched.length,
 2409         mapped = map != null;
 2410 
 2411     for ( ; i < len; i++ ) {
 2412         if ( (elem = unmatched[i]) ) {
 2413             if ( !filter || filter( elem, context, xml ) ) {
 2414                 newUnmatched.push( elem );
 2415                 if ( mapped ) {
 2416                     map.push( i );
 2417                 }
 2418             }
 2419         }
 2420     }
 2421 
 2422     return newUnmatched;
 2423 }
 2424 
 2425 function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
 2426     if ( postFilter && !postFilter[ expando ] ) {
 2427         postFilter = setMatcher( postFilter );
 2428     }
 2429     if ( postFinder && !postFinder[ expando ] ) {
 2430         postFinder = setMatcher( postFinder, postSelector );
 2431     }
 2432     return markFunction(function( seed, results, context, xml ) {
 2433         var temp, i, elem,
 2434             preMap = [],
 2435             postMap = [],
 2436             preexisting = results.length,
 2437 
 2438             // Get initial elements from seed or context
 2439             elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
 2440 
 2441             // Prefilter to get matcher input, preserving a map for seed-results synchronization
 2442             matcherIn = preFilter && ( seed || !selector ) ?
 2443                 condense( elems, preMap, preFilter, context, xml ) :
 2444                 elems,
 2445 
 2446             matcherOut = matcher ?
 2447                 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
 2448                 postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
 2449 
 2450                     // ...intermediate processing is necessary
 2451                     [] :
 2452 
 2453                     // ...otherwise use results directly
 2454                     results :
 2455                 matcherIn;
 2456 
 2457         // Find primary matches
 2458         if ( matcher ) {
 2459             matcher( matcherIn, matcherOut, context, xml );
 2460         }
 2461 
 2462         // Apply postFilter
 2463         if ( postFilter ) {
 2464             temp = condense( matcherOut, postMap );
 2465             postFilter( temp, [], context, xml );
 2466 
 2467             // Un-match failing elements by moving them back to matcherIn
 2468             i = temp.length;
 2469             while ( i-- ) {
 2470                 if ( (elem = temp[i]) ) {
 2471                     matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
 2472                 }
 2473             }
 2474         }
 2475 
 2476         if ( seed ) {
 2477             if ( postFinder || preFilter ) {
 2478                 if ( postFinder ) {
 2479                     // Get the final matcherOut by condensing this intermediate into postFinder contexts
 2480                     temp = [];
 2481                     i = matcherOut.length;
 2482                     while ( i-- ) {
 2483                         if ( (elem = matcherOut[i]) ) {
 2484                             // Restore matcherIn since elem is not yet a final match
 2485                             temp.push( (matcherIn[i] = elem) );
 2486                         }
 2487                     }
 2488                     postFinder( null, (matcherOut = []), temp, xml );
 2489                 }
 2490 
 2491                 // Move matched elements from seed to results to keep them synchronized
 2492                 i = matcherOut.length;
 2493                 while ( i-- ) {
 2494                     if ( (elem = matcherOut[i]) &&
 2495                         (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
 2496 
 2497                         seed[temp] = !(results[temp] = elem);
 2498                     }
 2499                 }
 2500             }
 2501 
 2502         // Add elements to results, through postFinder if defined
 2503         } else {
 2504             matcherOut = condense(
 2505                 matcherOut === results ?
 2506                     matcherOut.splice( preexisting, matcherOut.length ) :
 2507                     matcherOut
 2508             );
 2509             if ( postFinder ) {
 2510                 postFinder( null, results, matcherOut, xml );
 2511             } else {
 2512                 push.apply( results, matcherOut );
 2513             }
 2514         }
 2515     });
 2516 }
 2517 
 2518 function matcherFromTokens( tokens ) {
 2519     var checkContext, matcher, j,
 2520         len = tokens.length,
 2521         leadingRelative = Expr.relative[ tokens[0].type ],
 2522         implicitRelative = leadingRelative || Expr.relative[" "],
 2523         i = leadingRelative ? 1 : 0,
 2524 
 2525         // The foundational matcher ensures that elements are reachable from top-level context(s)
 2526         matchContext = addCombinator( function( elem ) {
 2527             return elem === checkContext;
 2528         }, implicitRelative, true ),
 2529         matchAnyContext = addCombinator( function( elem ) {
 2530             return indexOf.call( checkContext, elem ) > -1;
 2531         }, implicitRelative, true ),
 2532         matchers = [ function( elem, context, xml ) {
 2533             return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
 2534                 (checkContext = context).nodeType ?
 2535                     matchContext( elem, context, xml ) :
 2536                     matchAnyContext( elem, context, xml ) );
 2537         } ];
 2538 
 2539     for ( ; i < len; i++ ) {
 2540         if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
 2541             matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
 2542         } else {
 2543             matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
 2544 
 2545             // Return special upon seeing a positional matcher
 2546             if ( matcher[ expando ] ) {
 2547                 // Find the next relative operator (if any) for proper handling
 2548                 j = ++i;
 2549                 for ( ; j < len; j++ ) {
 2550                     if ( Expr.relative[ tokens[j].type ] ) {
 2551                         break;
 2552                     }
 2553                 }
 2554                 return setMatcher(
 2555                     i > 1 && elementMatcher( matchers ),
 2556                     i > 1 && toSelector(
 2557                         // If the preceding token was a descendant combinator, insert an implicit any-element `*`
 2558                         tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
 2559                     ).replace( rtrim, "$1" ),
 2560                     matcher,
 2561                     i < j && matcherFromTokens( tokens.slice( i, j ) ),
 2562                     j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
 2563                     j < len && toSelector( tokens )
 2564                 );
 2565             }
 2566             matchers.push( matcher );
 2567         }
 2568     }
 2569 
 2570     return elementMatcher( matchers );
 2571 }
 2572 
 2573 function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
 2574     // A counter to specify which element is currently being matched
 2575     var matcherCachedRuns = 0,
 2576         bySet = setMatchers.length > 0,
 2577         byElement = elementMatchers.length > 0,
 2578         superMatcher = function( seed, context, xml, results, expandContext ) {
 2579             var elem, j, matcher,
 2580                 setMatched = [],
 2581                 matchedCount = 0,
 2582                 i = "0",
 2583                 unmatched = seed && [],
 2584                 outermost = expandContext != null,
 2585                 contextBackup = outermostContext,
 2586                 // We must always have either seed elements or context
 2587                 elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
 2588                 // Use integer dirruns iff this is the outermost matcher
 2589                 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
 2590 
 2591             if ( outermost ) {
 2592                 outermostContext = context !== document && context;
 2593                 cachedruns = matcherCachedRuns;
 2594             }
 2595 
 2596             // Add elements passing elementMatchers directly to results
 2597             // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
 2598             for ( ; (elem = elems[i]) != null; i++ ) {
 2599                 if ( byElement && elem ) {
 2600                     j = 0;
 2601                     while ( (matcher = elementMatchers[j++]) ) {
 2602                         if ( matcher( elem, context, xml ) ) {
 2603                             results.push( elem );
 2604                             break;
 2605                         }
 2606                     }
 2607                     if ( outermost ) {
 2608                         dirruns = dirrunsUnique;
 2609                         cachedruns = ++matcherCachedRuns;
 2610                     }
 2611                 }
 2612 
 2613                 // Track unmatched elements for set filters
 2614                 if ( bySet ) {
 2615                     // They will have gone through all possible matchers
 2616                     if ( (elem = !matcher && elem) ) {
 2617                         matchedCount--;
 2618                     }
 2619 
 2620                     // Lengthen the array for every element, matched or not
 2621                     if ( seed ) {
 2622                         unmatched.push( elem );
 2623                     }
 2624                 }
 2625             }
 2626 
 2627             // Apply set filters to unmatched elements
 2628             matchedCount += i;
 2629             if ( bySet && i !== matchedCount ) {
 2630                 j = 0;
 2631                 while ( (matcher = setMatchers[j++]) ) {
 2632                     matcher( unmatched, setMatched, context, xml );
 2633                 }
 2634 
 2635                 if ( seed ) {
 2636                     // Reintegrate element matches to eliminate the need for sorting
 2637                     if ( matchedCount > 0 ) {
 2638                         while ( i-- ) {
 2639                             if ( !(unmatched[i] || setMatched[i]) ) {
 2640                                 setMatched[i] = pop.call( results );
 2641                             }
 2642                         }
 2643                     }
 2644 
 2645                     // Discard index placeholder values to get only actual matches
 2646                     setMatched = condense( setMatched );
 2647                 }
 2648 
 2649                 // Add matches to results
 2650                 push.apply( results, setMatched );
 2651 
 2652                 // Seedless set matches succeeding multiple successful matchers stipulate sorting
 2653                 if ( outermost && !seed && setMatched.length > 0 &&
 2654                     ( matchedCount + setMatchers.length ) > 1 ) {
 2655 
 2656                     Sizzle.uniqueSort( results );
 2657                 }
 2658             }
 2659 
 2660             // Override manipulation of globals by nested matchers
 2661             if ( outermost ) {
 2662                 dirruns = dirrunsUnique;
 2663                 outermostContext = contextBackup;
 2664             }
 2665 
 2666             return unmatched;
 2667         };
 2668 
 2669     return bySet ?
 2670         markFunction( superMatcher ) :
 2671         superMatcher;
 2672 }
 2673 
 2674 compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
 2675     var i,
 2676         setMatchers = [],
 2677         elementMatchers = [],
 2678         cached = compilerCache[ selector + " " ];
 2679 
 2680     if ( !cached ) {
 2681         // Generate a function of recursive functions that can be used to check each element
 2682         if ( !group ) {
 2683             group = tokenize( selector );
 2684         }
 2685         i = group.length;
 2686         while ( i-- ) {
 2687             cached = matcherFromTokens( group[i] );
 2688             if ( cached[ expando ] ) {
 2689                 setMatchers.push( cached );
 2690             } else {
 2691                 elementMatchers.push( cached );
 2692             }
 2693         }
 2694 
 2695         // Cache the compiled function
 2696         cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
 2697     }
 2698     return cached;
 2699 };
 2700 
 2701 function multipleContexts( selector, contexts, results ) {
 2702     var i = 0,
 2703         len = contexts.length;
 2704     for ( ; i < len; i++ ) {
 2705         Sizzle( selector, contexts[i], results );
 2706     }
 2707     return results;
 2708 }
 2709 
 2710 function select( selector, context, results, seed ) {
 2711     var i, tokens, token, type, find,
 2712         match = tokenize( selector );
 2713 
 2714     if ( !seed ) {
 2715         // Try to minimize operations if there is only one group
 2716         if ( match.length === 1 ) {
 2717 
 2718             // Take a shortcut and set the context if the root selector is an ID
 2719             tokens = match[0] = match[0].slice( 0 );
 2720             if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
 2721                     support.getById && context.nodeType === 9 && documentIsHTML &&
 2722                     Expr.relative[ tokens[1].type ] ) {
 2723 
 2724                 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
 2725                 if ( !context ) {
 2726                     return results;
 2727                 }
 2728                 selector = selector.slice( tokens.shift().value.length );
 2729             }
 2730 
 2731             // Fetch a seed set for right-to-left matching
 2732             i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
 2733             while ( i-- ) {
 2734                 token = tokens[i];
 2735 
 2736                 // Abort if we hit a combinator
 2737                 if ( Expr.relative[ (type = token.type) ] ) {
 2738                     break;
 2739                 }
 2740                 if ( (find = Expr.find[ type ]) ) {
 2741                     // Search, expanding context for leading sibling combinators
 2742                     if ( (seed = find(
 2743                         token.matches[0].replace( runescape, funescape ),
 2744                         rsibling.test( tokens[0].type ) && context.parentNode || context
 2745                     )) ) {
 2746 
 2747                         // If seed is empty or no tokens remain, we can return early
 2748                         tokens.splice( i, 1 );
 2749                         selector = seed.length && toSelector( tokens );
 2750                         if ( !selector ) {
 2751                             push.apply( results, seed );
 2752                             return results;
 2753                         }
 2754 
 2755                         break;
 2756                     }
 2757                 }
 2758             }
 2759         }
 2760     }
 2761 
 2762     // Compile and execute a filtering function
 2763     // Provide `match` to avoid retokenization if we modified the selector above
 2764     compile( selector, match )(
 2765         seed,
 2766         context,
 2767         !documentIsHTML,
 2768         results,
 2769         rsibling.test( selector )
 2770     );
 2771     return results;
 2772 }
 2773 
 2774 // One-time assignments
 2775 
 2776 // Sort stability
 2777 support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
 2778 
 2779 // Support: Chrome<14
 2780 // Always assume duplicates if they aren't passed to the comparison function
 2781 support.detectDuplicates = hasDuplicate;
 2782 
 2783 // Initialize against the default document
 2784 setDocument();
 2785 
 2786 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
 2787 // Detached nodes confoundingly follow *each other*
 2788 support.sortDetached = assert(function( div1 ) {
 2789     // Should return 1, but returns 4 (following)
 2790     return div1.compareDocumentPosition( document.createElement("div") ) & 1;
 2791 });
 2792 
 2793 // Support: IE<8
 2794 // Prevent attribute/property "interpolation"
 2795 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
 2796 if ( !assert(function( div ) {
 2797     div.innerHTML = "<a href='#'></a>";
 2798     return div.firstChild.getAttribute("href") === "#" ;
 2799 }) ) {
 2800     addHandle( "type|href|height|width", function( elem, name, isXML ) {
 2801         if ( !isXML ) {
 2802             return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
 2803         }
 2804     });
 2805 }
 2806 
 2807 // Support: IE<9
 2808 // Use defaultValue in place of getAttribute("value")
 2809 if ( !support.attributes || !assert(function( div ) {
 2810     div.innerHTML = "<input/>";
 2811     div.firstChild.setAttribute( "value", "" );
 2812     return div.firstChild.getAttribute( "value" ) === "";
 2813 }) ) {
 2814     addHandle( "value", function( elem, name, isXML ) {
 2815         if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
 2816             return elem.defaultValue;
 2817         }
 2818     });
 2819 }
 2820 
 2821 // Support: IE<9
 2822 // Use getAttributeNode to fetch booleans when getAttribute lies
 2823 if ( !assert(function( div ) {
 2824     return div.getAttribute("disabled") == null;
 2825 }) ) {
 2826     addHandle( booleans, function( elem, name, isXML ) {
 2827         var val;
 2828         if ( !isXML ) {
 2829             return (val = elem.getAttributeNode( name )) && val.specified ?
 2830                 val.value :
 2831                 elem[ name ] === true ? name.toLowerCase() : null;
 2832         }
 2833     });
 2834 }
 2835 
 2836 jQuery.find = Sizzle;
 2837 jQuery.expr = Sizzle.selectors;
 2838 jQuery.expr[":"] = jQuery.expr.pseudos;
 2839 jQuery.unique = Sizzle.uniqueSort;
 2840 jQuery.text = Sizzle.getText;
 2841 jQuery.isXMLDoc = Sizzle.isXML;
 2842 jQuery.contains = Sizzle.contains;
 2843 
 2844 
 2845 })( window );
 2846 // String to Object options format cache
 2847 var optionsCache = {};
 2848 
 2849 // Convert String-formatted options into Object-formatted ones and store in cache
 2850 function createOptions( options ) {
 2851     var object = optionsCache[ options ] = {};
 2852     jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
 2853         object[ flag ] = true;
 2854     });
 2855     return object;
 2856 }
 2857 
 2858 /*
 2859  * Create a callback list using the following parameters:
 2860  *
 2861  *  options: an optional list of space-separated options that will change how
 2862  *          the callback list behaves or a more traditional option object
 2863  *
 2864  * By default a callback list will act like an event callback list and can be
 2865  * "fired" multiple times.
 2866  *
 2867  * Possible options:
 2868  *
 2869  *  once:           will ensure the callback list can only be fired once (like a Deferred)
 2870  *
 2871  *  memory:         will keep track of previous values and will call any callback added
 2872  *                  after the list has been fired right away with the latest "memorized"
 2873  *                  values (like a Deferred)
 2874  *
 2875  *  unique:         will ensure a callback can only be added once (no duplicate in the list)
 2876  *
 2877  *  stopOnFalse:    interrupt callings when a callback returns false
 2878  *
 2879  */
 2880 jQuery.Callbacks = function( options ) {
 2881 
 2882     // Convert options from String-formatted to Object-formatted if needed
 2883     // (we check in cache first)
 2884     options = typeof options === "string" ?
 2885         ( optionsCache[ options ] || createOptions( options ) ) :
 2886         jQuery.extend( {}, options );
 2887 
 2888     var // Last fire value (for non-forgettable lists)
 2889         memory,
 2890         // Flag to know if list was already fired
 2891         fired,
 2892         // Flag to know if list is currently firing
 2893         firing,
 2894         // First callback to fire (used internally by add and fireWith)
 2895         firingStart,
 2896         // End of the loop when firing
 2897         firingLength,
 2898         // Index of currently firing callback (modified by remove if needed)
 2899         firingIndex,
 2900         // Actual callback list
 2901         list = [],
 2902         // Stack of fire calls for repeatable lists
 2903         stack = !options.once && [],
 2904         // Fire callbacks
 2905         fire = function( data ) {
 2906             memory = options.memory && data;
 2907             fired = true;
 2908             firingIndex = firingStart || 0;
 2909             firingStart = 0;
 2910             firingLength = list.length;
 2911             firing = true;
 2912             for ( ; list && firingIndex < firingLength; firingIndex++ ) {
 2913                 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
 2914                     memory = false; // To prevent further calls using add
 2915                     break;
 2916                 }
 2917             }
 2918             firing = false;
 2919             if ( list ) {
 2920                 if ( stack ) {
 2921                     if ( stack.length ) {
 2922                         fire( stack.shift() );
 2923                     }
 2924                 } else if ( memory ) {
 2925                     list = [];
 2926                 } else {
 2927                     self.disable();
 2928                 }
 2929             }
 2930         },
 2931         // Actual Callbacks object
 2932         self = {
 2933             // Add a callback or a collection of callbacks to the list
 2934             add: function() {
 2935                 if ( list ) {
 2936                     // First, we save the current length
 2937                     var start = list.length;
 2938                     (function add( args ) {
 2939                         jQuery.each( args, function( _, arg ) {
 2940                             var type = jQuery.type( arg );
 2941                             if ( type === "function" ) {
 2942                                 if ( !options.unique || !self.has( arg ) ) {
 2943                                     list.push( arg );
 2944                                 }
 2945                             } else if ( arg && arg.length && type !== "string" ) {
 2946                                 // Inspect recursively
 2947                                 add( arg );
 2948                             }
 2949                         });
 2950                     })( arguments );
 2951                     // Do we need to add the callbacks to the
 2952                     // current firing batch?
 2953                     if ( firing ) {
 2954                         firingLength = list.length;
 2955                     // With memory, if we're not firing then
 2956                     // we should call right away
 2957                     } else if ( memory ) {
 2958                         firingStart = start;
 2959                         fire( memory );
 2960                     }
 2961                 }
 2962                 return this;
 2963             },
 2964             // Remove a callback from the list
 2965             remove: function() {
 2966                 if ( list ) {
 2967                     jQuery.each( arguments, function( _, arg ) {
 2968                         var index;
 2969                         while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
 2970                             list.splice( index, 1 );
 2971                             // Handle firing indexes
 2972                             if ( firing ) {
 2973                                 if ( index <= firingLength ) {
 2974                                     firingLength--;
 2975                                 }
 2976                                 if ( index <= firingIndex ) {
 2977                                     firingIndex--;
 2978                                 }
 2979                             }
 2980                         }
 2981                     });
 2982                 }
 2983                 return this;
 2984             },
 2985             // Check if a given callback is in the list.
 2986             // If no argument is given, return whether or not list has callbacks attached.
 2987             has: function( fn ) {
 2988                 return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
 2989             },
 2990             // Remove all callbacks from the list
 2991             empty: function() {
 2992                 list = [];
 2993                 firingLength = 0;
 2994                 return this;
 2995             },
 2996             // Have the list do nothing anymore
 2997             disable: function() {
 2998                 list = stack = memory = undefined;
 2999                 return this;
 3000             },
 3001             // Is it disabled?
 3002             disabled: function() {
 3003                 return !list;
 3004             },
 3005             // Lock the list in its current state
 3006             lock: function() {
 3007                 stack = undefined;
 3008                 if ( !memory ) {
 3009                     self.disable();
 3010                 }
 3011                 return this;
 3012             },
 3013             // Is it locked?
 3014             locked: function() {
 3015                 return !stack;
 3016             },
 3017             // Call all callbacks with the given context and arguments
 3018             fireWith: function( context, args ) {
 3019                 if ( list && ( !fired || stack ) ) {
 3020                     args = args || [];
 3021                     args = [ context, args.slice ? args.slice() : args ];
 3022                     if ( firing ) {
 3023                         stack.push( args );
 3024                     } else {
 3025                         fire( args );
 3026                     }
 3027                 }
 3028                 return this;
 3029             },
 3030             // Call all the callbacks with the given arguments
 3031             fire: function() {
 3032                 self.fireWith( this, arguments );
 3033                 return this;
 3034             },
 3035             // To know if the callbacks have already been called at least once
 3036             fired: function() {
 3037                 return !!fired;
 3038             }
 3039         };
 3040 
 3041     return self;
 3042 };
 3043 jQuery.extend({
 3044 
 3045     Deferred: function( func ) {
 3046         var tuples = [
 3047                 // action, add listener, listener list, final state
 3048                 [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
 3049                 [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
 3050                 [ "notify", "progress", jQuery.Callbacks("memory") ]
 3051             ],
 3052             state = "pending",
 3053             promise = {
 3054                 state: function() {
 3055                     return state;
 3056                 },
 3057                 always: function() {
 3058                     deferred.done( arguments ).fail( arguments );
 3059                     return this;
 3060                 },
 3061                 then: function( /* fnDone, fnFail, fnProgress */ ) {
 3062                     var fns = arguments;
 3063                     return jQuery.Deferred(function( newDefer ) {
 3064                         jQuery.each( tuples, function( i, tuple ) {
 3065                             var action = tuple[ 0 ],
 3066                                 fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
 3067                             // deferred[ done | fail | progress ] for forwarding actions to newDefer
 3068                             deferred[ tuple[1] ](function() {
 3069                                 var returned = fn && fn.apply( this, arguments );
 3070                                 if ( returned && jQuery.isFunction( returned.promise ) ) {
 3071                                     returned.promise()
 3072                                         .done( newDefer.resolve )
 3073                                         .fail( newDefer.reject )
 3074                                         .progress( newDefer.notify );
 3075                                 } else {
 3076                                     newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
 3077                                 }
 3078                             });
 3079                         });
 3080                         fns = null;
 3081                     }).promise();
 3082                 },
 3083                 // Get a promise for this deferred
 3084                 // If obj is provided, the promise aspect is added to the object
 3085                 promise: function( obj ) {
 3086                     return obj != null ? jQuery.extend( obj, promise ) : promise;
 3087                 }
 3088             },
 3089             deferred = {};
 3090 
 3091         // Keep pipe for back-compat
 3092         promise.pipe = promise.then;
 3093 
 3094         // Add list-specific methods
 3095         jQuery.each( tuples, function( i, tuple ) {
 3096             var list = tuple[ 2 ],
 3097                 stateString = tuple[ 3 ];
 3098 
 3099             // promise[ done | fail | progress ] = list.add
 3100             promise[ tuple[1] ] = list.add;
 3101 
 3102             // Handle state
 3103             if ( stateString ) {
 3104                 list.add(function() {
 3105                     // state = [ resolved | rejected ]
 3106                     state = stateString;
 3107 
 3108                 // [ reject_list | resolve_list ].disable; progress_list.lock
 3109                 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
 3110             }
 3111 
 3112             // deferred[ resolve | reject | notify ]
 3113             deferred[ tuple[0] ] = function() {
 3114                 deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
 3115                 return this;
 3116             };
 3117             deferred[ tuple[0] + "With" ] = list.fireWith;
 3118         });
 3119 
 3120         // Make the deferred a promise
 3121         promise.promise( deferred );
 3122 
 3123         // Call given func if any
 3124         if ( func ) {
 3125             func.call( deferred, deferred );
 3126         }
 3127 
 3128         // All done!
 3129         return deferred;
 3130     },
 3131 
 3132     // Deferred helper
 3133     when: function( subordinate /* , ..., subordinateN */ ) {
 3134         var i = 0,
 3135             resolveValues = core_slice.call( arguments ),
 3136             length = resolveValues.length,
 3137 
 3138             // the count of uncompleted subordinates
 3139             remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
 3140 
 3141             // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
 3142             deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
 3143 
 3144             // Update function for both resolve and progress values
 3145             updateFunc = function( i, contexts, values ) {
 3146                 return function( value ) {
 3147                     contexts[ i ] = this;
 3148                     values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
 3149                     if( values === progressValues ) {
 3150                         deferred.notifyWith( contexts, values );
 3151                     } else if ( !( --remaining ) ) {
 3152                         deferred.resolveWith( contexts, values );
 3153                     }
 3154                 };
 3155             },
 3156 
 3157             progressValues, progressContexts, resolveContexts;
 3158 
 3159         // add listeners to Deferred subordinates; treat others as resolved
 3160         if ( length > 1 ) {
 3161             progressValues = new Array( length );
 3162             progressContexts = new Array( length );
 3163             resolveContexts = new Array( length );
 3164             for ( ; i < length; i++ ) {
 3165                 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
 3166                     resolveValues[ i ].promise()
 3167                         .done( updateFunc( i, resolveContexts, resolveValues ) )
 3168                         .fail( deferred.reject )
 3169                         .progress( updateFunc( i, progressContexts, progressValues ) );
 3170                 } else {
 3171                     --remaining;
 3172                 }
 3173             }
 3174         }
 3175 
 3176         // if we're not waiting on anything, resolve the master
 3177         if ( !remaining ) {
 3178             deferred.resolveWith( resolveContexts, resolveValues );
 3179         }
 3180 
 3181         return deferred.promise();
 3182     }
 3183 });
 3184 jQuery.support = (function( support ) {
 3185     var input = document.createElement("input"),
 3186         fragment = document.createDocumentFragment(),
 3187         div = document.createElement("div"),
 3188         select = document.createElement("select"),
 3189         opt = select.appendChild( document.createElement("option") );
 3190 
 3191     // Finish early in limited environments
 3192     if ( !input.type ) {
 3193         return support;
 3194     }
 3195 
 3196     input.type = "checkbox";
 3197 
 3198     // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
 3199     // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
 3200     support.checkOn = input.value !== "";
 3201 
 3202     // Must access the parent to make an option select properly
 3203     // Support: IE9, IE10
 3204     support.optSelected = opt.selected;
 3205 
 3206     // Will be defined later
 3207     support.reliableMarginRight = true;
 3208     support.boxSizingReliable = true;
 3209     support.pixelPosition = false;
 3210 
 3211     // Make sure checked status is properly cloned
 3212     // Support: IE9, IE10
 3213     input.checked = true;
 3214     support.noCloneChecked = input.cloneNode( true ).checked;
 3215 
 3216     // Make sure that the options inside disabled selects aren't marked as disabled
 3217     // (WebKit marks them as disabled)
 3218     select.disabled = true;
 3219     support.optDisabled = !opt.disabled;
 3220 
 3221     // Check if an input maintains its value after becoming a radio
 3222     // Support: IE9, IE10
 3223     input = document.createElement("input");
 3224     input.value = "t";
 3225     input.type = "radio";
 3226     support.radioValue = input.value === "t";
 3227 
 3228     // #11217 - WebKit loses check when the name is after the checked attribute
 3229     input.setAttribute( "checked", "t" );
 3230     input.setAttribute( "name", "t" );
 3231 
 3232     fragment.appendChild( input );
 3233 
 3234     // Support: Safari 5.1, Android 4.x, Android 2.3
 3235     // old WebKit doesn't clone checked state correctly in fragments
 3236     support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
 3237 
 3238     // Support: Firefox, Chrome, Safari
 3239     // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
 3240     support.focusinBubbles = "onfocusin" in window;
 3241 
 3242     div.style.backgroundClip = "content-box";
 3243     div.cloneNode( true ).style.backgroundClip = "";
 3244     support.clearCloneStyle = div.style.backgroundClip === "content-box";
 3245 
 3246     // Run tests that need a body at doc ready
 3247     jQuery(function() {
 3248         var container, marginDiv,
 3249             // Support: Firefox, Android 2.3 (Prefixed box-sizing versions).
 3250             divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",
 3251             body = document.getElementsByTagName("body")[ 0 ];
 3252 
 3253         if ( !body ) {
 3254             // Return for frameset docs that don't have a body
 3255             return;
 3256         }
 3257 
 3258         container = document.createElement("div");
 3259         container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
 3260 
 3261         // Check box-sizing and margin behavior.
 3262         body.appendChild( container ).appendChild( div );
 3263         div.innerHTML = "";
 3264         // Support: Firefox, Android 2.3 (Prefixed box-sizing versions).
 3265         div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%";
 3266 
 3267         // Workaround failing boxSizing test due to offsetWidth returning wrong value
 3268         // with some non-1 values of body zoom, ticket #13543
 3269         jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
 3270             support.boxSizing = div.offsetWidth === 4;
 3271         });
 3272 
 3273         // Use window.getComputedStyle because jsdom on node.js will break without it.
 3274         if ( window.getComputedStyle ) {
 3275             support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
 3276             support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
 3277 
 3278             // Support: Android 2.3
 3279             // Check if div with explicit width and no margin-right incorrectly
 3280             // gets computed margin-right based on width of container. (#3333)
 3281             // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
 3282             marginDiv = div.appendChild( document.createElement("div") );
 3283             marginDiv.style.cssText = div.style.cssText = divReset;
 3284             marginDiv.style.marginRight = marginDiv.style.width = "0";
 3285             div.style.width = "1px";
 3286 
 3287             support.reliableMarginRight =
 3288                 !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
 3289         }
 3290 
 3291         body.removeChild( container );
 3292     });
 3293 
 3294     return support;
 3295 })( {} );
 3296 
 3297 /*
 3298     Implementation Summary
 3299 
 3300     1. Enforce API surface and semantic compatibility with 1.9.x branch
 3301     2. Improve the module's maintainability by reducing the storage
 3302         paths to a single mechanism.
 3303     3. Use the same single mechanism to support "private" and "user" data.
 3304     4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
 3305     5. Avoid exposing implementation details on user objects (eg. expando properties)
 3306     6. Provide a clear path for implementation upgrade to WeakMap in 2014
 3307 */
 3308 var data_user, data_priv,
 3309     rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
 3310     rmultiDash = /([A-Z])/g;
 3311 
 3312 function Data() {
 3313     // Support: Android < 4,
 3314     // Old WebKit does not have Object.preventExtensions/freeze method,
 3315     // return new empty object instead with no [[set]] accessor
 3316     Object.defineProperty( this.cache = {}, 0, {
 3317         get: function() {
 3318             return {};
 3319         }
 3320     });
 3321 
 3322     this.expando = jQuery.expando + Math.random();
 3323 }
 3324 
 3325 Data.uid = 1;
 3326 
 3327 Data.accepts = function( owner ) {
 3328     // Accepts only:
 3329     //  - Node
 3330     //    - Node.ELEMENT_NODE
 3331     //    - Node.DOCUMENT_NODE
 3332     //  - Object
 3333     //    - Any
 3334     return owner.nodeType ?
 3335         owner.nodeType === 1 || owner.nodeType === 9 : true;
 3336 };
 3337 
 3338 Data.prototype = {
 3339     key: function( owner ) {
 3340         // We can accept data for non-element nodes in modern browsers,
 3341         // but we should not, see #8335.
 3342         // Always return the key for a frozen object.
 3343         if ( !Data.accepts( owner ) ) {
 3344             return 0;
 3345         }
 3346 
 3347         var descriptor = {},
 3348             // Check if the owner object already has a cache key
 3349             unlock = owner[ this.expando ];
 3350 
 3351         // If not, create one
 3352         if ( !unlock ) {
 3353             unlock = Data.uid++;
 3354 
 3355             // Secure it in a non-enumerable, non-writable property
 3356             try {
 3357                 descriptor[ this.expando ] = { value: unlock };
 3358                 Object.defineProperties( owner, descriptor );
 3359 
 3360             // Support: Android < 4
 3361             // Fallback to a less secure definition
 3362             } catch ( e ) {
 3363                 descriptor[ this.expando ] = unlock;
 3364                 jQuery.extend( owner, descriptor );
 3365             }
 3366         }
 3367 
 3368         // Ensure the cache object
 3369         if ( !this.cache[ unlock ] ) {
 3370             this.cache[ unlock ] = {};
 3371         }
 3372 
 3373         return unlock;
 3374     },
 3375     set: function( owner, data, value ) {
 3376         var prop,
 3377             // There may be an unlock assigned to this node,
 3378             // if there is no entry for this "owner", create one inline
 3379             // and set the unlock as though an owner entry had always existed
 3380             unlock = this.key( owner ),
 3381             cache = this.cache[ unlock ];
 3382 
 3383         // Handle: [ owner, key, value ] args
 3384         if ( typeof data === "string" ) {
 3385             cache[ data ] = value;
 3386 
 3387         // Handle: [ owner, { properties } ] args
 3388         } else {
 3389             // Fresh assignments by object are shallow copied
 3390             if ( jQuery.isEmptyObject( cache ) ) {
 3391                 jQuery.extend( this.cache[ unlock ], data );
 3392             // Otherwise, copy the properties one-by-one to the cache object
 3393             } else {
 3394                 for ( prop in data ) {
 3395                     cache[ prop ] = data[ prop ];
 3396                 }
 3397             }
 3398         }
 3399         return cache;
 3400     },
 3401     get: function( owner, key ) {
 3402         // Either a valid cache is found, or will be created.
 3403         // New caches will be created and the unlock returned,
 3404         // allowing direct access to the newly created
 3405         // empty data object. A valid owner object must be provided.
 3406         var cache = this.cache[ this.key( owner ) ];
 3407 
 3408         return key === undefined ?
 3409             cache : cache[ key ];
 3410     },
 3411     access: function( owner, key, value ) {
 3412         var stored;
 3413         // In cases where either:
 3414         //
 3415         //   1. No key was specified
 3416         //   2. A string key was specified, but no value provided
 3417         //
 3418         // Take the "read" path and allow the get method to determine
 3419         // which value to return, respectively either:
 3420         //
 3421         //   1. The entire cache object
 3422         //   2. The data stored at the key
 3423         //
 3424         if ( key === undefined ||
 3425                 ((key && typeof key === "string") && value === undefined) ) {
 3426 
 3427             stored = this.get( owner, key );
 3428 
 3429             return stored !== undefined ?
 3430                 stored : this.get( owner, jQuery.camelCase(key) );
 3431         }
 3432 
 3433         // [*]When the key is not a string, or both a key and value
 3434         // are specified, set or extend (existing objects) with either:
 3435         //
 3436         //   1. An object of properties
 3437         //   2. A key and value
 3438         //
 3439         this.set( owner, key, value );
 3440 
 3441         // Since the "set" path can have two possible entry points
 3442         // return the expected data based on which path was taken[*]
 3443         return value !== undefined ? value : key;
 3444     },
 3445     remove: function( owner, key ) {
 3446         var i, name, camel,
 3447             unlock = this.key( owner ),
 3448             cache = this.cache[ unlock ];
 3449 
 3450         if ( key === undefined ) {
 3451             this.cache[ unlock ] = {};
 3452 
 3453         } else {
 3454             // Support array or space separated string of keys
 3455             if ( jQuery.isArray( key ) ) {
 3456                 // If "name" is an array of keys...
 3457                 // When data is initially created, via ("key", "val") signature,
 3458                 // keys will be converted to camelCase.
 3459                 // Since there is no way to tell _how_ a key was added, remove
 3460                 // both plain key and camelCase key. #12786
 3461                 // This will only penalize the array argument path.
 3462                 name = key.concat( key.map( jQuery.camelCase ) );
 3463             } else {
 3464                 camel = jQuery.camelCase( key );
 3465                 // Try the string as a key before any manipulation
 3466                 if ( key in cache ) {
 3467                     name = [ key, camel ];
 3468                 } else {
 3469                     // If a key with the spaces exists, use it.
 3470                     // Otherwise, create an array by matching non-whitespace
 3471                     name = camel;
 3472                     name = name in cache ?
 3473                         [ name ] : ( name.match( core_rnotwhite ) || [] );
 3474                 }
 3475             }
 3476 
 3477             i = name.length;
 3478             while ( i-- ) {
 3479                 delete cache[ name[ i ] ];
 3480             }
 3481         }
 3482     },
 3483     hasData: function( owner ) {
 3484         return !jQuery.isEmptyObject(
 3485             this.cache[ owner[ this.expando ] ] || {}
 3486         );
 3487     },
 3488     discard: function( owner ) {
 3489         if ( owner[ this.expando ] ) {
 3490             delete this.cache[ owner[ this.expando ] ];
 3491         }
 3492     }
 3493 };
 3494 
 3495 // These may be used throughout the jQuery core codebase
 3496 data_user = new Data();
 3497 data_priv = new Data();
 3498 
 3499 
 3500 jQuery.extend({
 3501     acceptData: Data.accepts,
 3502 
 3503     hasData: function( elem ) {
 3504         return data_user.hasData( elem ) || data_priv.hasData( elem );
 3505     },
 3506 
 3507     data: function( elem, name, data ) {
 3508         return data_user.access( elem, name, data );
 3509     },
 3510 
 3511     removeData: function( elem, name ) {
 3512         data_user.remove( elem, name );
 3513     },
 3514 
 3515     // TODO: Now that all calls to _data and _removeData have been replaced
 3516     // with direct calls to data_priv methods, these can be deprecated.
 3517     _data: function( elem, name, data ) {
 3518         return data_priv.access( elem, name, data );
 3519     },
 3520 
 3521     _removeData: function( elem, name ) {
 3522         data_priv.remove( elem, name );
 3523     }
 3524 });
 3525 
 3526 jQuery.fn.extend({
 3527     data: function( key, value ) {
 3528         var attrs, name,
 3529             elem = this[ 0 ],
 3530             i = 0,
 3531             data = null;
 3532 
 3533         // Gets all values
 3534         if ( key === undefined ) {
 3535             if ( this.length ) {
 3536                 data = data_user.get( elem );
 3537 
 3538                 if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
 3539                     attrs = elem.attributes;
 3540                     for ( ; i < attrs.length; i++ ) {
 3541                         name = attrs[ i ].name;
 3542 
 3543                         if ( name.indexOf( "data-" ) === 0 ) {
 3544                             name = jQuery.camelCase( name.slice(5) );
 3545                             dataAttr( elem, name, data[ name ] );
 3546                         }
 3547                     }
 3548                     data_priv.set( elem, "hasDataAttrs", true );
 3549                 }
 3550             }
 3551 
 3552             return data;
 3553         }
 3554 
 3555         // Sets multiple values
 3556         if ( typeof key === "object" ) {
 3557             return this.each(function() {
 3558                 data_user.set( this, key );
 3559             });
 3560         }
 3561 
 3562         return jQuery.access( this, function( value ) {
 3563             var data,
 3564                 camelKey = jQuery.camelCase( key );
 3565 
 3566             // The calling jQuery object (element matches) is not empty
 3567             // (and therefore has an element appears at this[ 0 ]) and the
 3568             // `value` parameter was not undefined. An empty jQuery object
 3569             // will result in `undefined` for elem = this[ 0 ] which will
 3570             // throw an exception if an attempt to read a data cache is made.
 3571             if ( elem && value === undefined ) {
 3572                 // Attempt to get data from the cache
 3573                 // with the key as-is
 3574                 data = data_user.get( elem, key );
 3575                 if ( data !== undefined ) {
 3576                     return data;
 3577                 }
 3578 
 3579                 // Attempt to get data from the cache
 3580                 // with the key camelized
 3581                 data = data_user.get( elem, camelKey );
 3582                 if ( data !== undefined ) {
 3583                     return data;
 3584                 }
 3585 
 3586                 // Attempt to "discover" the data in
 3587                 // HTML5 custom data-* attrs
 3588                 data = dataAttr( elem, camelKey, undefined );
 3589                 if ( data !== undefined ) {
 3590                     return data;
 3591                 }
 3592 
 3593                 // We tried really hard, but the data doesn't exist.
 3594                 return;
 3595             }
 3596 
 3597             // Set the data...
 3598             this.each(function() {
 3599                 // First, attempt to store a copy or reference of any
 3600                 // data that might've been store with a camelCased key.
 3601                 var data = data_user.get( this, camelKey );
 3602 
 3603                 // For HTML5 data-* attribute interop, we have to
 3604                 // store property names with dashes in a camelCase form.
 3605                 // This might not apply to all properties...*
 3606                 data_user.set( this, camelKey, value );
 3607 
 3608                 // *... In the case of properties that might _actually_
 3609                 // have dashes, we need to also store a copy of that
 3610                 // unchanged property.
 3611                 if ( key.indexOf("-") !== -1 && data !== undefined ) {
 3612                     data_user.set( this, key, value );
 3613                 }
 3614             });
 3615         }, null, value, arguments.length > 1, null, true );
 3616     },
 3617 
 3618     removeData: function( key ) {
 3619         return this.each(function() {
 3620             data_user.remove( this, key );
 3621         });
 3622     }
 3623 });
 3624 
 3625 function dataAttr( elem, key, data ) {
 3626     var name;
 3627 
 3628     // If nothing was found internally, try to fetch any
 3629     // data from the HTML5 data-* attribute
 3630     if ( data === undefined && elem.nodeType === 1 ) {
 3631         name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
 3632         data = elem.getAttribute( name );
 3633 
 3634         if ( typeof data === "string" ) {
 3635             try {
 3636                 data = data === "true" ? true :
 3637                     data === "false" ? false :
 3638                     data === "null" ? null :
 3639                     // Only convert to a number if it doesn't change the string
 3640                     +data + "" === data ? +data :
 3641                     rbrace.test( data ) ? JSON.parse( data ) :
 3642                     data;
 3643             } catch( e ) {}
 3644 
 3645             // Make sure we set the data so it isn't changed later
 3646             data_user.set( elem, key, data );
 3647         } else {
 3648             data = undefined;
 3649         }
 3650     }
 3651     return data;
 3652 }
 3653 jQuery.extend({
 3654     queue: function( elem, type, data ) {
 3655         var queue;
 3656 
 3657         if ( elem ) {
 3658             type = ( type || "fx" ) + "queue";
 3659             queue = data_priv.get( elem, type );
 3660 
 3661             // Speed up dequeue by getting out quickly if this is just a lookup
 3662             if ( data ) {
 3663                 if ( !queue || jQuery.isArray( data ) ) {
 3664                     queue = data_priv.access( elem, type, jQuery.makeArray(data) );
 3665                 } else {
 3666                     queue.push( data );
 3667                 }
 3668             }
 3669             return queue || [];
 3670         }
 3671     },
 3672 
 3673     dequeue: function( elem, type ) {
 3674         type = type || "fx";
 3675 
 3676         var queue = jQuery.queue( elem, type ),
 3677             startLength = queue.length,
 3678             fn = queue.shift(),
 3679             hooks = jQuery._queueHooks( elem, type ),
 3680             next = function() {
 3681                 jQuery.dequeue( elem, type );
 3682             };
 3683 
 3684         // If the fx queue is dequeued, always remove the progress sentinel
 3685         if ( fn === "inprogress" ) {
 3686             fn = queue.shift();
 3687             startLength--;
 3688         }
 3689 
 3690         if ( fn ) {
 3691 
 3692             // Add a progress sentinel to prevent the fx queue from being
 3693             // automatically dequeued
 3694             if ( type === "fx" ) {
 3695                 queue.unshift( "inprogress" );
 3696             }
 3697 
 3698             // clear up the last queue stop function
 3699             delete hooks.stop;
 3700             fn.call( elem, next, hooks );
 3701         }
 3702 
 3703         if ( !startLength && hooks ) {
 3704             hooks.empty.fire();
 3705         }
 3706     },
 3707 
 3708     // not intended for public consumption - generates a queueHooks object, or returns the current one
 3709     _queueHooks: function( elem, type ) {
 3710         var key = type + "queueHooks";
 3711         return data_priv.get( elem, key ) || data_priv.access( elem, key, {
 3712             empty: jQuery.Callbacks("once memory").add(function() {
 3713                 data_priv.remove( elem, [ type + "queue", key ] );
 3714             })
 3715         });
 3716     }
 3717 });
 3718 
 3719 jQuery.fn.extend({
 3720     queue: function( type, data ) {
 3721         var setter = 2;
 3722 
 3723         if ( typeof type !== "string" ) {
 3724             data = type;
 3725             type = "fx";
 3726             setter--;
 3727         }
 3728 
 3729         if ( arguments.length < setter ) {
 3730             return jQuery.queue( this[0], type );
 3731         }
 3732 
 3733         return data === undefined ?
 3734             this :
 3735             this.each(function() {
 3736                 var queue = jQuery.queue( this, type, data );
 3737 
 3738                 // ensure a hooks for this queue
 3739                 jQuery._queueHooks( this, type );
 3740 
 3741                 if ( type === "fx" && queue[0] !== "inprogress" ) {
 3742                     jQuery.dequeue( this, type );
 3743                 }
 3744             });
 3745     },
 3746     dequeue: function( type ) {
 3747         return this.each(function() {
 3748             jQuery.dequeue( this, type );
 3749         });
 3750     },
 3751     // Based off of the plugin by Clint Helfers, with permission.
 3752     // http://blindsignals.com/index.php/2009/07/jquery-delay/
 3753     delay: function( time, type ) {
 3754         time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
 3755         type = type || "fx";
 3756 
 3757         return this.queue( type, function( next, hooks ) {
 3758             var timeout = setTimeout( next, time );
 3759             hooks.stop = function() {
 3760                 clearTimeout( timeout );
 3761             };
 3762         });
 3763     },
 3764     clearQueue: function( type ) {
 3765         return this.queue( type || "fx", [] );
 3766     },
 3767     // Get a promise resolved when queues of a certain type
 3768     // are emptied (fx is the type by default)
 3769     promise: function( type, obj ) {
 3770         var tmp,
 3771             count = 1,
 3772             defer = jQuery.Deferred(),
 3773             elements = this,
 3774             i = this.length,
 3775             resolve = function() {
 3776                 if ( !( --count ) ) {
 3777                     defer.resolveWith( elements, [ elements ] );
 3778                 }
 3779             };
 3780 
 3781         if ( typeof type !== "string" ) {
 3782             obj = type;
 3783             type = undefined;
 3784         }
 3785         type = type || "fx";
 3786 
 3787         while( i-- ) {
 3788             tmp = data_priv.get( elements[ i ], type + "queueHooks" );
 3789             if ( tmp && tmp.empty ) {
 3790                 count++;
 3791                 tmp.empty.add( resolve );
 3792             }
 3793         }
 3794         resolve();
 3795         return defer.promise( obj );
 3796     }
 3797 });
 3798 var nodeHook, boolHook,
 3799     rclass = /[\t\r\n\f]/g,
 3800     rreturn = /\r/g,
 3801     rfocusable = /^(?:input|select|textarea|button)$/i;
 3802 
 3803 jQuery.fn.extend({
 3804     attr: function( name, value ) {
 3805         return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
 3806     },
 3807 
 3808     removeAttr: function( name ) {
 3809         return this.each(function() {
 3810             jQuery.removeAttr( this, name );
 3811         });
 3812     },
 3813 
 3814     prop: function( name, value ) {
 3815         return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
 3816     },
 3817 
 3818     removeProp: function( name ) {
 3819         return this.each(function() {
 3820             delete this[ jQuery.propFix[ name ] || name ];
 3821         });
 3822     },
 3823 
 3824     addClass: function( value ) {
 3825         var classes, elem, cur, clazz, j,
 3826             i = 0,
 3827             len = this.length,
 3828             proceed = typeof value === "string" && value;
 3829 
 3830         if ( jQuery.isFunction( value ) ) {
 3831             return this.each(function( j ) {
 3832                 jQuery( this ).addClass( value.call( this, j, this.className ) );
 3833             });
 3834         }
 3835 
 3836         if ( proceed ) {
 3837             // The disjunction here is for better compressibility (see removeClass)
 3838             classes = ( value || "" ).match( core_rnotwhite ) || [];
 3839 
 3840             for ( ; i < len; i++ ) {
 3841                 elem = this[ i ];
 3842                 cur = elem.nodeType === 1 && ( elem.className ?
 3843                     ( " " + elem.className + " " ).replace( rclass, " " ) :
 3844                     " "
 3845                 );
 3846 
 3847                 if ( cur ) {
 3848                     j = 0;
 3849                     while ( (clazz = classes[j++]) ) {
 3850                         if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
 3851                             cur += clazz + " ";
 3852                         }
 3853                     }
 3854                     elem.className = jQuery.trim( cur );
 3855 
 3856                 }
 3857             }
 3858         }
 3859 
 3860         return this;
 3861     },
 3862 
 3863     removeClass: function( value ) {
 3864         var classes, elem, cur, clazz, j,
 3865             i = 0,
 3866             len = this.length,
 3867             proceed = arguments.length === 0 || typeof value === "string" && value;
 3868 
 3869         if ( jQuery.isFunction( value ) ) {
 3870             return this.each(function( j ) {
 3871                 jQuery( this ).removeClass( value.call( this, j, this.className ) );
 3872             });
 3873         }
 3874         if ( proceed ) {
 3875             classes = ( value || "" ).match( core_rnotwhite ) || [];
 3876 
 3877             for ( ; i < len; i++ ) {
 3878                 elem = this[ i ];
 3879                 // This expression is here for better compressibility (see addClass)
 3880                 cur = elem.nodeType === 1 && ( elem.className ?
 3881                     ( " " + elem.className + " " ).replace( rclass, " " ) :
 3882                     ""
 3883                 );
 3884 
 3885                 if ( cur ) {
 3886                     j = 0;
 3887                     while ( (clazz = classes[j++]) ) {
 3888                         // Remove *all* instances
 3889                         while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
 3890                             cur = cur.replace( " " + clazz + " ", " " );
 3891                         }
 3892                     }
 3893                     elem.className = value ? jQuery.trim( cur ) : "";
 3894                 }
 3895             }
 3896         }
 3897 
 3898         return this;
 3899     },
 3900 
 3901     toggleClass: function( value, stateVal ) {
 3902         var type = typeof value;
 3903 
 3904         if ( typeof stateVal === "boolean" && type === "string" ) {
 3905             return stateVal ? this.addClass( value ) : this.removeClass( value );
 3906         }
 3907 
 3908         if ( jQuery.isFunction( value ) ) {
 3909             return this.each(function( i ) {
 3910                 jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
 3911             });
 3912         }
 3913 
 3914         return this.each(function() {
 3915             if ( type === "string" ) {
 3916                 // toggle individual class names
 3917                 var className,
 3918                     i = 0,
 3919                     self = jQuery( this ),
 3920                     classNames = value.match( core_rnotwhite ) || [];
 3921 
 3922                 while ( (className = classNames[ i++ ]) ) {
 3923                     // check each className given, space separated list
 3924                     if ( self.hasClass( className ) ) {
 3925                         self.removeClass( className );
 3926                     } else {
 3927                         self.addClass( className );
 3928                     }
 3929                 }
 3930 
 3931             // Toggle whole class name
 3932             } else if ( type === core_strundefined || type === "boolean" ) {
 3933                 if ( this.className ) {
 3934                     // store className if set
 3935                     data_priv.set( this, "__className__", this.className );
 3936                 }
 3937 
 3938                 // If the element has a class name or if we're passed "false",
 3939                 // then remove the whole classname (if there was one, the above saved it).
 3940                 // Otherwise bring back whatever was previously saved (if anything),
 3941                 // falling back to the empty string if nothing was stored.
 3942                 this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
 3943             }
 3944         });
 3945     },
 3946 
 3947     hasClass: function( selector ) {
 3948         var className = " " + selector + " ",
 3949             i = 0,
 3950             l = this.length;
 3951         for ( ; i < l; i++ ) {
 3952             if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
 3953                 return true;
 3954             }
 3955         }
 3956 
 3957         return false;
 3958     },
 3959 
 3960     val: function( value ) {
 3961         var hooks, ret, isFunction,
 3962             elem = this[0];
 3963 
 3964         if ( !arguments.length ) {
 3965             if ( elem ) {
 3966                 hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
 3967 
 3968                 if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
 3969                     return ret;
 3970                 }
 3971 
 3972                 ret = elem.value;
 3973 
 3974                 return typeof ret === "string" ?
 3975                     // handle most common string cases
 3976                     ret.replace(rreturn, "") :
 3977                     // handle cases where value is null/undef or number
 3978                     ret == null ? "" : ret;
 3979             }
 3980 
 3981             return;
 3982         }
 3983 
 3984         isFunction = jQuery.isFunction( value );
 3985 
 3986         return this.each(function( i ) {
 3987             var val;
 3988 
 3989             if ( this.nodeType !== 1 ) {
 3990                 return;
 3991             }
 3992 
 3993             if ( isFunction ) {
 3994                 val = value.call( this, i, jQuery( this ).val() );
 3995             } else {
 3996                 val = value;
 3997             }
 3998 
 3999             // Treat null/undefined as ""; convert numbers to string
 4000             if ( val == null ) {
 4001                 val = "";
 4002             } else if ( typeof val === "number" ) {
 4003                 val += "";
 4004             } else if ( jQuery.isArray( val ) ) {
 4005                 val = jQuery.map(val, function ( value ) {
 4006                     return value == null ? "" : value + "";
 4007                 });
 4008             }
 4009 
 4010             hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
 4011 
 4012             // If set returns undefined, fall back to normal setting
 4013             if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
 4014                 this.value = val;
 4015             }
 4016         });
 4017     }
 4018 });
 4019 
 4020 jQuery.extend({
 4021     valHooks: {
 4022         option: {
 4023             get: function( elem ) {
 4024                 // attributes.value is undefined in Blackberry 4.7 but
 4025                 // uses .value. See #6932
 4026                 var val = elem.attributes.value;
 4027                 return !val || val.specified ? elem.value : elem.text;
 4028             }
 4029         },
 4030         select: {
 4031             get: function( elem ) {
 4032                 var value, option,
 4033                     options = elem.options,
 4034                     index = elem.selectedIndex,
 4035                     one = elem.type === "select-one" || index < 0,
 4036                     values = one ? null : [],
 4037                     max = one ? index + 1 : options.length,
 4038                     i = index < 0 ?
 4039                         max :
 4040                         one ? index : 0;
 4041 
 4042                 // Loop through all the selected options
 4043                 for ( ; i < max; i++ ) {
 4044                     option = options[ i ];
 4045 
 4046                     // IE6-9 doesn't update selected after form reset (#2551)
 4047                     if ( ( option.selected || i === index ) &&
 4048                             // Don't return options that are disabled or in a disabled optgroup
 4049                             ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
 4050                             ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
 4051 
 4052                         // Get the specific value for the option
 4053                         value = jQuery( option ).val();
 4054 
 4055                         // We don't need an array for one selects
 4056                         if ( one ) {
 4057                             return value;
 4058                         }
 4059 
 4060                         // Multi-Selects return an array
 4061                         values.push( value );
 4062                     }
 4063                 }
 4064 
 4065                 return values;
 4066             },
 4067 
 4068             set: function( elem, value ) {
 4069                 var optionSet, option,
 4070                     options = elem.options,
 4071                     values = jQuery.makeArray( value ),
 4072                     i = options.length;
 4073 
 4074                 while ( i-- ) {
 4075                     option = options[ i ];
 4076                     if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
 4077                         optionSet = true;
 4078                     }
 4079                 }
 4080 
 4081                 // force browsers to behave consistently when non-matching value is set
 4082                 if ( !optionSet ) {
 4083                     elem.selectedIndex = -1;
 4084                 }
 4085                 return values;
 4086             }
 4087         }
 4088     },
 4089 
 4090     attr: function( elem, name, value ) {
 4091         var hooks, ret,
 4092             nType = elem.nodeType;
 4093 
 4094         // don't get/set attributes on text, comment and attribute nodes
 4095         if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
 4096             return;
 4097         }
 4098 
 4099         // Fallback to prop when attributes are not supported
 4100         if ( typeof elem.getAttribute === core_strundefined ) {
 4101             return jQuery.prop( elem, name, value );
 4102         }
 4103 
 4104         // All attributes are lowercase
 4105         // Grab necessary hook if one is defined
 4106         if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
 4107             name = name.toLowerCase();
 4108             hooks = jQuery.attrHooks[ name ] ||
 4109                 ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
 4110         }
 4111 
 4112         if ( value !== undefined ) {
 4113 
 4114             if ( value === null ) {
 4115                 jQuery.removeAttr( elem, name );
 4116 
 4117             } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
 4118                 return ret;
 4119 
 4120             } else {
 4121                 elem.setAttribute( name, value + "" );
 4122                 return value;
 4123             }
 4124 
 4125         } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
 4126             return ret;
 4127 
 4128         } else {
 4129             ret = jQuery.find.attr( elem, name );
 4130 
 4131             // Non-existent attributes return null, we normalize to undefined
 4132             return ret == null ?
 4133                 undefined :
 4134                 ret;
 4135         }
 4136     },
 4137 
 4138     removeAttr: function( elem, value ) {
 4139         var name, propName,
 4140             i = 0,
 4141             attrNames = value && value.match( core_rnotwhite );
 4142 
 4143         if ( attrNames && elem.nodeType === 1 ) {
 4144             while ( (name = attrNames[i++]) ) {
 4145                 propName = jQuery.propFix[ name ] || name;
 4146 
 4147                 // Boolean attributes get special treatment (#10870)
 4148                 if ( jQuery.expr.match.bool.test( name ) ) {
 4149                     // Set corresponding property to false
 4150                     elem[ propName ] = false;
 4151                 }
 4152 
 4153                 elem.removeAttribute( name );
 4154             }
 4155         }
 4156     },
 4157 
 4158     attrHooks: {
 4159         type: {
 4160             set: function( elem, value ) {
 4161                 if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
 4162                     // Setting the type on a radio button after the value resets the value in IE6-9
 4163                     // Reset value to default in case type is set after value during creation
 4164                     var val = elem.value;
 4165                     elem.setAttribute( "type", value );
 4166                     if ( val ) {
 4167                         elem.value = val;
 4168                     }
 4169                     return value;
 4170                 }
 4171             }
 4172         }
 4173     },
 4174 
 4175     propFix: {
 4176         "for": "htmlFor",
 4177         "class": "className"
 4178     },
 4179 
 4180     prop: function( elem, name, value ) {
 4181         var ret, hooks, notxml,
 4182             nType = elem.nodeType;
 4183 
 4184         // don't get/set properties on text, comment and attribute nodes
 4185         if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
 4186             return;
 4187         }
 4188 
 4189         notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
 4190 
 4191         if ( notxml ) {
 4192             // Fix name and attach hooks
 4193             name = jQuery.propFix[ name ] || name;
 4194             hooks = jQuery.propHooks[ name ];
 4195         }
 4196 
 4197         if ( value !== undefined ) {
 4198             return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
 4199                 ret :
 4200                 ( elem[ name ] = value );
 4201 
 4202         } else {
 4203             return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
 4204                 ret :
 4205                 elem[ name ];
 4206         }
 4207     },
 4208 
 4209     propHooks: {
 4210         tabIndex: {
 4211             get: function( elem ) {
 4212                 return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
 4213                     elem.tabIndex :
 4214                     -1;
 4215             }
 4216         }
 4217     }
 4218 });
 4219 
 4220 // Hooks for boolean attributes
 4221 boolHook = {
 4222     set: function( elem, value, name ) {
 4223         if ( value === false ) {
 4224             // Remove boolean attributes when set to false
 4225             jQuery.removeAttr( elem, name );
 4226         } else {
 4227             elem.setAttribute( name, name );
 4228         }
 4229         return name;
 4230     }
 4231 };
 4232 jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
 4233     var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
 4234 
 4235     jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) {
 4236         var fn = jQuery.expr.attrHandle[ name ],
 4237             ret = isXML ?
 4238                 undefined :
 4239                 /* jshint eqeqeq: false */
 4240                 // Temporarily disable this handler to check existence
 4241                 (jQuery.expr.attrHandle[ name ] = undefined) !=
 4242                     getter( elem, name, isXML ) ?
 4243 
 4244                     name.toLowerCase() :
 4245                     null;
 4246 
 4247         // Restore handler
 4248         jQuery.expr.attrHandle[ name ] = fn;
 4249 
 4250         return ret;
 4251     };
 4252 });
 4253 
 4254 // Support: IE9+
 4255 // Selectedness for an option in an optgroup can be inaccurate
 4256 if ( !jQuery.support.optSelected ) {
 4257     jQuery.propHooks.selected = {
 4258         get: function( elem ) {
 4259             var parent = elem.parentNode;
 4260             if ( parent && parent.parentNode ) {
 4261                 parent.parentNode.selectedIndex;
 4262             }
 4263             return null;
 4264         }
 4265     };
 4266 }
 4267 
 4268 jQuery.each([
 4269     "tabIndex",
 4270     "readOnly",
 4271     "maxLength",
 4272     "cellSpacing",
 4273     "cellPadding",
 4274     "rowSpan",
 4275     "colSpan",
 4276     "useMap",
 4277     "frameBorder",
 4278     "contentEditable"
 4279 ], function() {
 4280     jQuery.propFix[ this.toLowerCase() ] = this;
 4281 });
 4282 
 4283 // Radios and checkboxes getter/setter
 4284 jQuery.each([ "radio", "checkbox" ], function() {
 4285     jQuery.valHooks[ this ] = {
 4286         set: function( elem, value ) {
 4287             if ( jQuery.isArray( value ) ) {
 4288                 return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
 4289             }
 4290         }
 4291     };
 4292     if ( !jQuery.support.checkOn ) {
 4293         jQuery.valHooks[ this ].get = function( elem ) {
 4294             // Support: Webkit
 4295             // "" is returned instead of "on" if a value isn't specified
 4296             return elem.getAttribute("value") === null ? "on" : elem.value;
 4297         };
 4298     }
 4299 });
 4300 var rkeyEvent = /^key/,
 4301     rmouseEvent = /^(?:mouse|contextmenu)|click/,
 4302     rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
 4303     rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
 4304 
 4305 function returnTrue() {
 4306     return true;
 4307 }
 4308 
 4309 function returnFalse() {
 4310     return false;
 4311 }
 4312 
 4313 function safeActiveElement() {
 4314     try {
 4315         return document.activeElement;
 4316     } catch ( err ) { }
 4317 }
 4318 
 4319 /*
 4320  * Helper functions for managing events -- not part of the public interface.
 4321  * Props to Dean Edwards' addEvent library for many of the ideas.
 4322  */
 4323 jQuery.event = {
 4324 
 4325     global: {},
 4326 
 4327     add: function( elem, types, handler, data, selector ) {
 4328 
 4329         var handleObjIn, eventHandle, tmp,
 4330             events, t, handleObj,
 4331             special, handlers, type, namespaces, origType,
 4332             elemData = data_priv.get( elem );
 4333 
 4334         // Don't attach events to noData or text/comment nodes (but allow plain objects)
 4335         if ( !elemData ) {
 4336             return;
 4337         }
 4338 
 4339         // Caller can pass in an object of custom data in lieu of the handler
 4340         if ( handler.handler ) {
 4341             handleObjIn = handler;
 4342             handler = handleObjIn.handler;
 4343             selector = handleObjIn.selector;
 4344         }
 4345 
 4346         // Make sure that the handler has a unique ID, used to find/remove it later
 4347         if ( !handler.guid ) {
 4348             handler.guid = jQuery.guid++;
 4349         }
 4350 
 4351         // Init the element's event structure and main handler, if this is the first
 4352         if ( !(events = elemData.events) ) {
 4353             events = elemData.events = {};
 4354         }
 4355         if ( !(eventHandle = elemData.handle) ) {
 4356             eventHandle = elemData.handle = function( e ) {
 4357                 // Discard the second event of a jQuery.event.trigger() and
 4358                 // when an event is called after a page has unloaded
 4359                 return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
 4360                     jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
 4361                     undefined;
 4362             };
 4363             // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
 4364             eventHandle.elem = elem;
 4365         }
 4366 
 4367         // Handle multiple events separated by a space
 4368         types = ( types || "" ).match( core_rnotwhite ) || [""];
 4369         t = types.length;
 4370         while ( t-- ) {
 4371             tmp = rtypenamespace.exec( types[t] ) || [];
 4372             type = origType = tmp[1];
 4373             namespaces = ( tmp[2] || "" ).split( "." ).sort();
 4374 
 4375             // There *must* be a type, no attaching namespace-only handlers
 4376             if ( !type ) {
 4377                 continue;
 4378             }
 4379 
 4380             // If event changes its type, use the special event handlers for the changed type
 4381             special = jQuery.event.special[ type ] || {};
 4382 
 4383             // If selector defined, determine special event api type, otherwise given type
 4384             type = ( selector ? special.delegateType : special.bindType ) || type;
 4385 
 4386             // Update special based on newly reset type
 4387             special = jQuery.event.special[ type ] || {};
 4388 
 4389             // handleObj is passed to all event handlers
 4390             handleObj = jQuery.extend({
 4391                 type: type,
 4392                 origType: origType,
 4393                 data: data,
 4394                 handler: handler,
 4395                 guid: handler.guid,
 4396                 selector: selector,
 4397                 needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
 4398                 namespace: namespaces.join(".")
 4399             }, handleObjIn );
 4400 
 4401             // Init the event handler queue if we're the first
 4402             if ( !(handlers = events[ type ]) ) {
 4403                 handlers = events[ type ] = [];
 4404                 handlers.delegateCount = 0;
 4405 
 4406                 // Only use addEventListener if the special events handler returns false
 4407                 if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
 4408                     if ( elem.addEventListener ) {
 4409                         elem.addEventListener( type, eventHandle, false );
 4410                     }
 4411                 }
 4412             }
 4413 
 4414             if ( special.add ) {
 4415                 special.add.call( elem, handleObj );
 4416 
 4417                 if ( !handleObj.handler.guid ) {
 4418                     handleObj.handler.guid = handler.guid;
 4419                 }
 4420             }
 4421 
 4422             // Add to the element's handler list, delegates in front
 4423             if ( selector ) {
 4424                 handlers.splice( handlers.delegateCount++, 0, handleObj );
 4425             } else {
 4426                 handlers.push( handleObj );
 4427             }
 4428 
 4429             // Keep track of which events have ever been used, for event optimization
 4430             jQuery.event.global[ type ] = true;
 4431         }
 4432 
 4433         // Nullify elem to prevent memory leaks in IE
 4434         elem = null;
 4435     },
 4436 
 4437     // Detach an event or set of events from an element
 4438     remove: function( elem, types, handler, selector, mappedTypes ) {
 4439 
 4440         var j, origCount, tmp,
 4441             events, t, handleObj,
 4442             special, handlers, type, namespaces, origType,
 4443             elemData = data_priv.hasData( elem ) && data_priv.get( elem );
 4444 
 4445         if ( !elemData || !(events = elemData.events) ) {
 4446             return;
 4447         }
 4448 
 4449         // Once for each type.namespace in types; type may be omitted
 4450         types = ( types || "" ).match( core_rnotwhite ) || [""];
 4451         t = types.length;
 4452         while ( t-- ) {
 4453             tmp = rtypenamespace.exec( types[t] ) || [];
 4454             type = origType = tmp[1];
 4455             namespaces = ( tmp[2] || "" ).split( "." ).sort();
 4456 
 4457             // Unbind all events (on this namespace, if provided) for the element
 4458             if ( !type ) {
 4459                 for ( type in events ) {
 4460                     jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
 4461                 }
 4462                 continue;
 4463             }
 4464 
 4465             special = jQuery.event.special[ type ] || {};
 4466             type = ( selector ? special.delegateType : special.bindType ) || type;
 4467             handlers = events[ type ] || [];
 4468             tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
 4469 
 4470             // Remove matching events
 4471             origCount = j = handlers.length;
 4472             while ( j-- ) {
 4473                 handleObj = handlers[ j ];
 4474 
 4475                 if ( ( mappedTypes || origType === handleObj.origType ) &&
 4476                     ( !handler || handler.guid === handleObj.guid ) &&
 4477                     ( !tmp || tmp.test( handleObj.namespace ) ) &&
 4478                     ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
 4479                     handlers.splice( j, 1 );
 4480 
 4481                     if ( handleObj.selector ) {
 4482                         handlers.delegateCount--;
 4483                     }
 4484                     if ( special.remove ) {
 4485                         special.remove.call( elem, handleObj );
 4486                     }
 4487                 }
 4488             }
 4489 
 4490             // Remove generic event handler if we removed something and no more handlers exist
 4491             // (avoids potential for endless recursion during removal of special event handlers)
 4492             if ( origCount && !handlers.length ) {
 4493                 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
 4494                     jQuery.removeEvent( elem, type, elemData.handle );
 4495                 }
 4496 
 4497                 delete events[ type ];
 4498             }
 4499         }
 4500 
 4501         // Remove the expando if it's no longer used
 4502         if ( jQuery.isEmptyObject( events ) ) {
 4503             delete elemData.handle;
 4504             data_priv.remove( elem, "events" );
 4505         }
 4506     },
 4507 
 4508     trigger: function( event, data, elem, onlyHandlers ) {
 4509 
 4510         var i, cur, tmp, bubbleType, ontype, handle, special,
 4511             eventPath = [ elem || document ],
 4512             type = core_hasOwn.call( event, "type" ) ? event.type : event,
 4513             namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
 4514 
 4515         cur = tmp = elem = elem || document;
 4516 
 4517         // Don't do events on text and comment nodes
 4518         if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
 4519             return;
 4520         }
 4521 
 4522         // focus/blur morphs to focusin/out; ensure we're not firing them right now
 4523         if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
 4524             return;
 4525         }
 4526 
 4527         if ( type.indexOf(".") >= 0 ) {
 4528             // Namespaced trigger; create a regexp to match event type in handle()
 4529             namespaces = type.split(".");
 4530             type = namespaces.shift();
 4531             namespaces.sort();
 4532         }
 4533         ontype = type.indexOf(":") < 0 && "on" + type;
 4534 
 4535         // Caller can pass in a jQuery.Event object, Object, or just an event type string
 4536         event = event[ jQuery.expando ] ?
 4537             event :
 4538             new jQuery.Event( type, typeof event === "object" && event );
 4539 
 4540         // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
 4541         event.isTrigger = onlyHandlers ? 2 : 3;
 4542         event.namespace = namespaces.join(".");
 4543         event.namespace_re = event.namespace ?
 4544             new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
 4545             null;
 4546 
 4547         // Clean up the event in case it is being reused
 4548         event.result = undefined;
 4549         if ( !event.target ) {
 4550             event.target = elem;
 4551         }
 4552 
 4553         // Clone any incoming data and prepend the event, creating the handler arg list
 4554         data = data == null ?
 4555             [ event ] :
 4556             jQuery.makeArray( data, [ event ] );
 4557 
 4558         // Allow special events to draw outside the lines
 4559         special = jQuery.event.special[ type ] || {};
 4560         if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
 4561             return;
 4562         }
 4563 
 4564         // Determine event propagation path in advance, per W3C events spec (#9951)
 4565         // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
 4566         if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
 4567 
 4568             bubbleType = special.delegateType || type;
 4569             if ( !rfocusMorph.test( bubbleType + type ) ) {
 4570                 cur = cur.parentNode;
 4571             }
 4572             for ( ; cur; cur = cur.parentNode ) {
 4573                 eventPath.push( cur );
 4574                 tmp = cur;
 4575             }
 4576 
 4577             // Only add window if we got to document (e.g., not plain obj or detached DOM)
 4578             if ( tmp === (elem.ownerDocument || document) ) {
 4579                 eventPath.push( tmp.defaultView || tmp.parentWindow || window );
 4580             }
 4581         }
 4582 
 4583         // Fire handlers on the event path
 4584         i = 0;
 4585         while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
 4586 
 4587             event.type = i > 1 ?
 4588                 bubbleType :
 4589                 special.bindType || type;
 4590 
 4591             // jQuery handler
 4592             handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
 4593             if ( handle ) {
 4594                 handle.apply( cur, data );
 4595             }
 4596 
 4597             // Native handler
 4598             handle = ontype && cur[ ontype ];
 4599             if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
 4600                 event.preventDefault();
 4601             }
 4602         }
 4603         event.type = type;
 4604 
 4605         // If nobody prevented the default action, do it now
 4606         if ( !onlyHandlers && !event.isDefaultPrevented() ) {
 4607 
 4608             if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
 4609                 jQuery.acceptData( elem ) ) {
 4610 
 4611                 // Call a native DOM method on the target with the same name name as the event.
 4612                 // Don't do default actions on window, that's where global variables be (#6170)
 4613                 if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
 4614 
 4615                     // Don't re-trigger an onFOO event when we call its FOO() method
 4616                     tmp = elem[ ontype ];
 4617 
 4618                     if ( tmp ) {
 4619                         elem[ ontype ] = null;
 4620                     }
 4621 
 4622                     // Prevent re-triggering of the same event, since we already bubbled it above
 4623                     jQuery.event.triggered = type;
 4624                     elem[ type ]();
 4625                     jQuery.event.triggered = undefined;
 4626 
 4627                     if ( tmp ) {
 4628                         elem[ ontype ] = tmp;
 4629                     }
 4630                 }
 4631             }
 4632         }
 4633 
 4634         return event.result;
 4635     },
 4636 
 4637     dispatch: function( event ) {
 4638 
 4639         // Make a writable jQuery.Event from the native event object
 4640         event = jQuery.event.fix( event );
 4641 
 4642         var i, j, ret, matched, handleObj,
 4643             handlerQueue = [],
 4644             args = core_slice.call( arguments ),
 4645             handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
 4646             special = jQuery.event.special[ event.type ] || {};
 4647 
 4648         // Use the fix-ed jQuery.Event rather than the (read-only) native event
 4649         args[0] = event;
 4650         event.delegateTarget = this;
 4651 
 4652         // Call the preDispatch hook for the mapped type, and let it bail if desired
 4653         if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
 4654             return;
 4655         }
 4656 
 4657         // Determine handlers
 4658         handlerQueue = jQuery.event.handlers.call( this, event, handlers );
 4659 
 4660         // Run delegates first; they may want to stop propagation beneath us
 4661         i = 0;
 4662         while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
 4663             event.currentTarget = matched.elem;
 4664 
 4665             j = 0;
 4666             while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
 4667 
 4668                 // Triggered event must either 1) have no namespace, or
 4669                 // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
 4670                 if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
 4671 
 4672                     event.handleObj = handleObj;
 4673                     event.data = handleObj.data;
 4674 
 4675                     ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
 4676                             .apply( matched.elem, args );
 4677 
 4678                     if ( ret !== undefined ) {
 4679                         if ( (event.result = ret) === false ) {
 4680                             event.preventDefault();
 4681                             event.stopPropagation();
 4682                         }
 4683                     }
 4684                 }
 4685             }
 4686         }
 4687 
 4688         // Call the postDispatch hook for the mapped type
 4689         if ( special.postDispatch ) {
 4690             special.postDispatch.call( this, event );
 4691         }
 4692 
 4693         return event.result;
 4694     },
 4695 
 4696     handlers: function( event, handlers ) {
 4697         var i, matches, sel, handleObj,
 4698             handlerQueue = [],
 4699             delegateCount = handlers.delegateCount,
 4700             cur = event.target;
 4701 
 4702         // Find delegate handlers
 4703         // Black-hole SVG <use> instance trees (#13180)
 4704         // Avoid non-left-click bubbling in Firefox (#3861)
 4705         if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
 4706 
 4707             for ( ; cur !== this; cur = cur.parentNode || this ) {
 4708 
 4709                 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
 4710                 if ( cur.disabled !== true || event.type !== "click" ) {
 4711                     matches = [];
 4712                     for ( i = 0; i < delegateCount; i++ ) {
 4713                         handleObj = handlers[ i ];
 4714 
 4715                         // Don't conflict with Object.prototype properties (#13203)
 4716                         sel = handleObj.selector + " ";
 4717 
 4718                         if ( matches[ sel ] === undefined ) {
 4719                             matches[ sel ] = handleObj.needsContext ?
 4720                                 jQuery( sel, this ).index( cur ) >= 0 :
 4721                                 jQuery.find( sel, this, null, [ cur ] ).length;
 4722                         }
 4723                         if ( matches[ sel ] ) {
 4724                             matches.push( handleObj );
 4725                         }
 4726                     }
 4727                     if ( matches.length ) {
 4728                         handlerQueue.push({ elem: cur, handlers: matches });
 4729                     }
 4730                 }
 4731             }
 4732         }
 4733 
 4734         // Add the remaining (directly-bound) handlers
 4735         if ( delegateCount < handlers.length ) {
 4736             handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
 4737         }
 4738 
 4739         return handlerQueue;
 4740     },
 4741 
 4742     // Includes some event props shared by KeyEvent and MouseEvent
 4743     props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
 4744 
 4745     fixHooks: {},
 4746 
 4747     keyHooks: {
 4748         props: "char charCode key keyCode".split(" "),
 4749         filter: function( event, original ) {
 4750 
 4751             // Add which for key events
 4752             if ( event.which == null ) {
 4753                 event.which = original.charCode != null ? original.charCode : original.keyCode;
 4754             }
 4755 
 4756             return event;
 4757         }
 4758     },
 4759 
 4760     mouseHooks: {
 4761         props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
 4762         filter: function( event, original ) {
 4763             var eventDoc, doc, body,
 4764                 button = original.button;
 4765 
 4766             // Calculate pageX/Y if missing and clientX/Y available
 4767             if ( event.pageX == null && original.clientX != null ) {
 4768                 eventDoc = event.target.ownerDocument || document;
 4769                 doc = eventDoc.documentElement;
 4770                 body = eventDoc.body;
 4771 
 4772                 event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
 4773                 event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
 4774             }
 4775 
 4776             // Add which for click: 1 === left; 2 === middle; 3 === right
 4777             // Note: button is not normalized, so don't use it
 4778             if ( !event.which && button !== undefined ) {
 4779                 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
 4780             }
 4781 
 4782             return event;
 4783         }
 4784     },
 4785 
 4786     fix: function( event ) {
 4787         if ( event[ jQuery.expando ] ) {
 4788             return event;
 4789         }
 4790 
 4791         // Create a writable copy of the event object and normalize some properties
 4792         var i, prop, copy,
 4793             type = event.type,
 4794             originalEvent = event,
 4795             fixHook = this.fixHooks[ type ];
 4796 
 4797         if ( !fixHook ) {
 4798             this.fixHooks[ type ] = fixHook =
 4799                 rmouseEvent.test( type ) ? this.mouseHooks :
 4800                 rkeyEvent.test( type ) ? this.keyHooks :
 4801                 {};
 4802         }
 4803         copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
 4804 
 4805         event = new jQuery.Event( originalEvent );
 4806 
 4807         i = copy.length;
 4808         while ( i-- ) {
 4809             prop = copy[ i ];
 4810             event[ prop ] = originalEvent[ prop ];
 4811         }
 4812 
 4813         // Support: Cordova 2.5 (WebKit) (#13255)
 4814         // All events should have a target; Cordova deviceready doesn't
 4815         if ( !event.target ) {
 4816             event.target = document;
 4817         }
 4818 
 4819         // Support: Safari 6.0+, Chrome < 28
 4820         // Target should not be a text node (#504, #13143)
 4821         if ( event.target.nodeType === 3 ) {
 4822             event.target = event.target.parentNode;
 4823         }
 4824 
 4825         return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
 4826     },
 4827 
 4828     special: {
 4829         load: {
 4830             // Prevent triggered image.load events from bubbling to window.load
 4831             noBubble: true
 4832         },
 4833         focus: {
 4834             // Fire native event if possible so blur/focus sequence is correct
 4835             trigger: function() {
 4836                 if ( this !== safeActiveElement() && this.focus ) {
 4837                     this.focus();
 4838                     return false;
 4839                 }
 4840             },
 4841             delegateType: "focusin"
 4842         },
 4843         blur: {
 4844             trigger: function() {
 4845                 if ( this === safeActiveElement() && this.blur ) {
 4846                     this.blur();
 4847                     return false;
 4848                 }
 4849             },
 4850             delegateType: "focusout"
 4851         },
 4852         click: {
 4853             // For checkbox, fire native event so checked state will be right
 4854             trigger: function() {
 4855                 if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
 4856                     this.click();
 4857                     return false;
 4858                 }
 4859             },
 4860 
 4861             // For cross-browser consistency, don't fire native .click() on links
 4862             _default: function( event ) {
 4863                 return jQuery.nodeName( event.target, "a" );
 4864             }
 4865         },
 4866 
 4867         beforeunload: {
 4868             postDispatch: function( event ) {
 4869 
 4870                 // Support: Firefox 20+
 4871                 // Firefox doesn't alert if the returnValue field is not set.
 4872                 if ( event.result !== undefined ) {
 4873                     event.originalEvent.returnValue = event.result;
 4874                 }
 4875             }
 4876         }
 4877     },
 4878 
 4879     simulate: function( type, elem, event, bubble ) {
 4880         // Piggyback on a donor event to simulate a different one.
 4881         // Fake originalEvent to avoid donor's stopPropagation, but if the
 4882         // simulated event prevents default then we do the same on the donor.
 4883         var e = jQuery.extend(
 4884             new jQuery.Event(),
 4885             event,
 4886             {
 4887                 type: type,
 4888                 isSimulated: true,
 4889                 originalEvent: {}
 4890             }
 4891         );
 4892         if ( bubble ) {
 4893             jQuery.event.trigger( e, null, elem );
 4894         } else {
 4895             jQuery.event.dispatch.call( elem, e );
 4896         }
 4897         if ( e.isDefaultPrevented() ) {
 4898             event.preventDefault();
 4899         }
 4900     }
 4901 };
 4902 
 4903 jQuery.removeEvent = function( elem, type, handle ) {
 4904     if ( elem.removeEventListener ) {
 4905         elem.removeEventListener( type, handle, false );
 4906     }
 4907 };
 4908 
 4909 jQuery.Event = function( src, props ) {
 4910     // Allow instantiation without the 'new' keyword
 4911     if ( !(this instanceof jQuery.Event) ) {
 4912         return new jQuery.Event( src, props );
 4913     }
 4914 
 4915     // Event object
 4916     if ( src && src.type ) {
 4917         this.originalEvent = src;
 4918         this.type = src.type;
 4919 
 4920         // Events bubbling up the document may have been marked as prevented
 4921         // by a handler lower down the tree; reflect the correct value.
 4922         this.isDefaultPrevented = ( src.defaultPrevented ||
 4923             src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
 4924 
 4925     // Event type
 4926     } else {
 4927         this.type = src;
 4928     }
 4929 
 4930     // Put explicitly provided properties onto the event object
 4931     if ( props ) {
 4932         jQuery.extend( this, props );
 4933     }
 4934 
 4935     // Create a timestamp if incoming event doesn't have one
 4936     this.timeStamp = src && src.timeStamp || jQuery.now();
 4937 
 4938     // Mark it as fixed
 4939     this[ jQuery.expando ] = true;
 4940 };
 4941 
 4942 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
 4943 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
 4944 jQuery.Event.prototype = {
 4945     isDefaultPrevented: returnFalse,
 4946     isPropagationStopped: returnFalse,
 4947     isImmediatePropagationStopped: returnFalse,
 4948 
 4949     preventDefault: function() {
 4950         var e = this.originalEvent;
 4951 
 4952         this.isDefaultPrevented = returnTrue;
 4953 
 4954         if ( e && e.preventDefault ) {
 4955             e.preventDefault();
 4956         }
 4957     },
 4958     stopPropagation: function() {
 4959         var e = this.originalEvent;
 4960 
 4961         this.isPropagationStopped = returnTrue;
 4962 
 4963         if ( e && e.stopPropagation ) {
 4964             e.stopPropagation();
 4965         }
 4966     },
 4967     stopImmediatePropagation: function() {
 4968         this.isImmediatePropagationStopped = returnTrue;
 4969         this.stopPropagation();
 4970     }
 4971 };
 4972 
 4973 // Create mouseenter/leave events using mouseover/out and event-time checks
 4974 // Support: Chrome 15+
 4975 jQuery.each({
 4976     mouseenter: "mouseover",
 4977     mouseleave: "mouseout"
 4978 }, function( orig, fix ) {
 4979     jQuery.event.special[ orig ] = {
 4980         delegateType: fix,
 4981         bindType: fix,
 4982 
 4983         handle: function( event ) {
 4984             var ret,
 4985                 target = this,
 4986                 related = event.relatedTarget,
 4987                 handleObj = event.handleObj;
 4988 
 4989             // For mousenter/leave call the handler if related is outside the target.
 4990             // NB: No relatedTarget if the mouse left/entered the browser window
 4991             if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
 4992                 event.type = handleObj.origType;
 4993                 ret = handleObj.handler.apply( this, arguments );
 4994                 event.type = fix;
 4995             }
 4996             return ret;
 4997         }
 4998     };
 4999 });
 5000 
 5001 // Create "bubbling" focus and blur events
 5002 // Support: Firefox, Chrome, Safari
 5003 if ( !jQuery.support.focusinBubbles ) {
 5004     jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
 5005 
 5006         // Attach a single capturing handler while someone wants focusin/focusout
 5007         var attaches = 0,
 5008             handler = function( event ) {
 5009                 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
 5010             };
 5011 
 5012         jQuery.event.special[ fix ] = {
 5013             setup: function() {
 5014                 if ( attaches++ === 0 ) {
 5015                     document.addEventListener( orig, handler, true );
 5016                 }
 5017             },
 5018             teardown: function() {
 5019                 if ( --attaches === 0 ) {
 5020                     document.removeEventListener( orig, handler, true );
 5021                 }
 5022             }
 5023         };
 5024     });
 5025 }
 5026 
 5027 jQuery.fn.extend({
 5028 
 5029     on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
 5030         var origFn, type;
 5031 
 5032         // Types can be a map of types/handlers
 5033         if ( typeof types === "object" ) {
 5034             // ( types-Object, selector, data )
 5035             if ( typeof selector !== "string" ) {
 5036                 // ( types-Object, data )
 5037                 data = data || selector;
 5038                 selector = undefined;
 5039             }
 5040             for ( type in types ) {
 5041                 this.on( type, selector, data, types[ type ], one );
 5042             }
 5043             return this;
 5044         }
 5045 
 5046         if ( data == null && fn == null ) {
 5047             // ( types, fn )
 5048             fn = selector;
 5049             data = selector = undefined;
 5050         } else if ( fn == null ) {
 5051             if ( typeof selector === "string" ) {
 5052                 // ( types, selector, fn )
 5053                 fn = data;
 5054                 data = undefined;
 5055             } else {
 5056                 // ( types, data, fn )
 5057                 fn = data;
 5058                 data = selector;
 5059                 selector = undefined;
 5060             }
 5061         }
 5062         if ( fn === false ) {
 5063             fn = returnFalse;
 5064         } else if ( !fn ) {
 5065             return this;
 5066         }
 5067 
 5068         if ( one === 1 ) {
 5069             origFn = fn;
 5070             fn = function( event ) {
 5071                 // Can use an empty set, since event contains the info
 5072                 jQuery().off( event );
 5073                 return origFn.apply( this, arguments );
 5074             };
 5075             // Use same guid so caller can remove using origFn
 5076             fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
 5077         }
 5078         return this.each( function() {
 5079             jQuery.event.add( this, types, fn, data, selector );
 5080         });
 5081     },
 5082     one: function( types, selector, data, fn ) {
 5083         return this.on( types, selector, data, fn, 1 );
 5084     },
 5085     off: function( types, selector, fn ) {
 5086         var handleObj, type;
 5087         if ( types && types.preventDefault && types.handleObj ) {
 5088             // ( event )  dispatched jQuery.Event
 5089             handleObj = types.handleObj;
 5090             jQuery( types.delegateTarget ).off(
 5091                 handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
 5092                 handleObj.selector,
 5093                 handleObj.handler
 5094             );
 5095             return this;
 5096         }
 5097         if ( typeof types === "object" ) {
 5098             // ( types-object [, selector] )
 5099             for ( type in types ) {
 5100                 this.off( type, selector, types[ type ] );
 5101             }
 5102             return this;
 5103         }
 5104         if ( selector === false || typeof selector === "function" ) {
 5105             // ( types [, fn] )
 5106 <