Path: blob/master/web-gui/buildyourownbotnet/assets/js/datatables/jQuery-1.11.3/jquery-1.11.3.js
1293 views
/*!1* jQuery JavaScript Library v1.11.32* http://jquery.com/3*4* Includes Sizzle.js5* http://sizzlejs.com/6*7* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors8* Released under the MIT license9* http://jquery.org/license10*11* Date: 2015-04-28T16:19Z12*/1314(function( global, factory ) {1516if ( typeof module === "object" && typeof module.exports === "object" ) {17// For CommonJS and CommonJS-like environments where a proper window is present,18// execute the factory and get jQuery19// For environments that do not inherently posses a window with a document20// (such as Node.js), expose a jQuery-making factory as module.exports21// This accentuates the need for the creation of a real window22// e.g. var jQuery = require("jquery")(window);23// See ticket #14549 for more info24module.exports = global.document ?25factory( global, true ) :26function( w ) {27if ( !w.document ) {28throw new Error( "jQuery requires a window with a document" );29}30return factory( w );31};32} else {33factory( global );34}3536// Pass this if window is not defined yet37}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {3839// Can't do this because several apps including ASP.NET trace40// the stack via arguments.caller.callee and Firefox dies if41// you try to trace through "use strict" call chains. (#13335)42// Support: Firefox 18+43//4445var deletedIds = [];4647var slice = deletedIds.slice;4849var concat = deletedIds.concat;5051var push = deletedIds.push;5253var indexOf = deletedIds.indexOf;5455var class2type = {};5657var toString = class2type.toString;5859var hasOwn = class2type.hasOwnProperty;6061var support = {};62636465var66version = "1.11.3",6768// Define a local copy of jQuery69jQuery = function( selector, context ) {70// The jQuery object is actually just the init constructor 'enhanced'71// Need init if jQuery is called (just allow error to be thrown if not included)72return new jQuery.fn.init( selector, context );73},7475// Support: Android<4.1, IE<976// Make sure we trim BOM and NBSP77rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,7879// Matches dashed string for camelizing80rmsPrefix = /^-ms-/,81rdashAlpha = /-([\da-z])/gi,8283// Used by jQuery.camelCase as callback to replace()84fcamelCase = function( all, letter ) {85return letter.toUpperCase();86};8788jQuery.fn = jQuery.prototype = {89// The current version of jQuery being used90jquery: version,9192constructor: jQuery,9394// Start with an empty selector95selector: "",9697// The default length of a jQuery object is 098length: 0,99100toArray: function() {101return slice.call( this );102},103104// Get the Nth element in the matched element set OR105// Get the whole matched element set as a clean array106get: function( num ) {107return num != null ?108109// Return just the one element from the set110( num < 0 ? this[ num + this.length ] : this[ num ] ) :111112// Return all the elements in a clean array113slice.call( this );114},115116// Take an array of elements and push it onto the stack117// (returning the new matched element set)118pushStack: function( elems ) {119120// Build a new jQuery matched element set121var ret = jQuery.merge( this.constructor(), elems );122123// Add the old object onto the stack (as a reference)124ret.prevObject = this;125ret.context = this.context;126127// Return the newly-formed element set128return ret;129},130131// Execute a callback for every element in the matched set.132// (You can seed the arguments with an array of args, but this is133// only used internally.)134each: function( callback, args ) {135return jQuery.each( this, callback, args );136},137138map: function( callback ) {139return this.pushStack( jQuery.map(this, function( elem, i ) {140return callback.call( elem, i, elem );141}));142},143144slice: function() {145return this.pushStack( slice.apply( this, arguments ) );146},147148first: function() {149return this.eq( 0 );150},151152last: function() {153return this.eq( -1 );154},155156eq: function( i ) {157var len = this.length,158j = +i + ( i < 0 ? len : 0 );159return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );160},161162end: function() {163return this.prevObject || this.constructor(null);164},165166// For internal use only.167// Behaves like an Array's method, not like a jQuery method.168push: push,169sort: deletedIds.sort,170splice: deletedIds.splice171};172173jQuery.extend = jQuery.fn.extend = function() {174var src, copyIsArray, copy, name, options, clone,175target = arguments[0] || {},176i = 1,177length = arguments.length,178deep = false;179180// Handle a deep copy situation181if ( typeof target === "boolean" ) {182deep = target;183184// skip the boolean and the target185target = arguments[ i ] || {};186i++;187}188189// Handle case when target is a string or something (possible in deep copy)190if ( typeof target !== "object" && !jQuery.isFunction(target) ) {191target = {};192}193194// extend jQuery itself if only one argument is passed195if ( i === length ) {196target = this;197i--;198}199200for ( ; i < length; i++ ) {201// Only deal with non-null/undefined values202if ( (options = arguments[ i ]) != null ) {203// Extend the base object204for ( name in options ) {205src = target[ name ];206copy = options[ name ];207208// Prevent never-ending loop209if ( target === copy ) {210continue;211}212213// Recurse if we're merging plain objects or arrays214if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {215if ( copyIsArray ) {216copyIsArray = false;217clone = src && jQuery.isArray(src) ? src : [];218219} else {220clone = src && jQuery.isPlainObject(src) ? src : {};221}222223// Never move original objects, clone them224target[ name ] = jQuery.extend( deep, clone, copy );225226// Don't bring in undefined values227} else if ( copy !== undefined ) {228target[ name ] = copy;229}230}231}232}233234// Return the modified object235return target;236};237238jQuery.extend({239// Unique for each copy of jQuery on the page240expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),241242// Assume jQuery is ready without the ready module243isReady: true,244245error: function( msg ) {246throw new Error( msg );247},248249noop: function() {},250251// See test/unit/core.js for details concerning isFunction.252// Since version 1.3, DOM methods and functions like alert253// aren't supported. They return false on IE (#2968).254isFunction: function( obj ) {255return jQuery.type(obj) === "function";256},257258isArray: Array.isArray || function( obj ) {259return jQuery.type(obj) === "array";260},261262isWindow: function( obj ) {263/* jshint eqeqeq: false */264return obj != null && obj == obj.window;265},266267isNumeric: function( obj ) {268// parseFloat NaNs numeric-cast false positives (null|true|false|"")269// ...but misinterprets leading-number strings, particularly hex literals ("0x...")270// subtraction forces infinities to NaN271// adding 1 corrects loss of precision from parseFloat (#15100)272return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;273},274275isEmptyObject: function( obj ) {276var name;277for ( name in obj ) {278return false;279}280return true;281},282283isPlainObject: function( obj ) {284var key;285286// Must be an Object.287// Because of IE, we also have to check the presence of the constructor property.288// Make sure that DOM nodes and window objects don't pass through, as well289if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {290return false;291}292293try {294// Not own constructor property must be Object295if ( obj.constructor &&296!hasOwn.call(obj, "constructor") &&297!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {298return false;299}300} catch ( e ) {301// IE8,9 Will throw exceptions on certain host objects #9897302return false;303}304305// Support: IE<9306// Handle iteration over inherited properties before own properties.307if ( support.ownLast ) {308for ( key in obj ) {309return hasOwn.call( obj, key );310}311}312313// Own properties are enumerated firstly, so to speed up,314// if last one is own, then all properties are own.315for ( key in obj ) {}316317return key === undefined || hasOwn.call( obj, key );318},319320type: function( obj ) {321if ( obj == null ) {322return obj + "";323}324return typeof obj === "object" || typeof obj === "function" ?325class2type[ toString.call(obj) ] || "object" :326typeof obj;327},328329// Evaluates a script in a global context330// Workarounds based on findings by Jim Driscoll331// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context332globalEval: function( data ) {333if ( data && jQuery.trim( data ) ) {334// We use execScript on Internet Explorer335// We use an anonymous function so that context is window336// rather than jQuery in Firefox337( window.execScript || function( data ) {338window[ "eval" ].call( window, data );339} )( data );340}341},342343// Convert dashed to camelCase; used by the css and data modules344// Microsoft forgot to hump their vendor prefix (#9572)345camelCase: function( string ) {346return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );347},348349nodeName: function( elem, name ) {350return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();351},352353// args is for internal usage only354each: function( obj, callback, args ) {355var value,356i = 0,357length = obj.length,358isArray = isArraylike( obj );359360if ( args ) {361if ( isArray ) {362for ( ; i < length; i++ ) {363value = callback.apply( obj[ i ], args );364365if ( value === false ) {366break;367}368}369} else {370for ( i in obj ) {371value = callback.apply( obj[ i ], args );372373if ( value === false ) {374break;375}376}377}378379// A special, fast, case for the most common use of each380} else {381if ( isArray ) {382for ( ; i < length; i++ ) {383value = callback.call( obj[ i ], i, obj[ i ] );384385if ( value === false ) {386break;387}388}389} else {390for ( i in obj ) {391value = callback.call( obj[ i ], i, obj[ i ] );392393if ( value === false ) {394break;395}396}397}398}399400return obj;401},402403// Support: Android<4.1, IE<9404trim: function( text ) {405return text == null ?406"" :407( text + "" ).replace( rtrim, "" );408},409410// results is for internal usage only411makeArray: function( arr, results ) {412var ret = results || [];413414if ( arr != null ) {415if ( isArraylike( Object(arr) ) ) {416jQuery.merge( ret,417typeof arr === "string" ?418[ arr ] : arr419);420} else {421push.call( ret, arr );422}423}424425return ret;426},427428inArray: function( elem, arr, i ) {429var len;430431if ( arr ) {432if ( indexOf ) {433return indexOf.call( arr, elem, i );434}435436len = arr.length;437i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;438439for ( ; i < len; i++ ) {440// Skip accessing in sparse arrays441if ( i in arr && arr[ i ] === elem ) {442return i;443}444}445}446447return -1;448},449450merge: function( first, second ) {451var len = +second.length,452j = 0,453i = first.length;454455while ( j < len ) {456first[ i++ ] = second[ j++ ];457}458459// Support: IE<9460// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)461if ( len !== len ) {462while ( second[j] !== undefined ) {463first[ i++ ] = second[ j++ ];464}465}466467first.length = i;468469return first;470},471472grep: function( elems, callback, invert ) {473var callbackInverse,474matches = [],475i = 0,476length = elems.length,477callbackExpect = !invert;478479// Go through the array, only saving the items480// that pass the validator function481for ( ; i < length; i++ ) {482callbackInverse = !callback( elems[ i ], i );483if ( callbackInverse !== callbackExpect ) {484matches.push( elems[ i ] );485}486}487488return matches;489},490491// arg is for internal usage only492map: function( elems, callback, arg ) {493var value,494i = 0,495length = elems.length,496isArray = isArraylike( elems ),497ret = [];498499// Go through the array, translating each of the items to their new values500if ( isArray ) {501for ( ; i < length; i++ ) {502value = callback( elems[ i ], i, arg );503504if ( value != null ) {505ret.push( value );506}507}508509// Go through every key on the object,510} else {511for ( i in elems ) {512value = callback( elems[ i ], i, arg );513514if ( value != null ) {515ret.push( value );516}517}518}519520// Flatten any nested arrays521return concat.apply( [], ret );522},523524// A global GUID counter for objects525guid: 1,526527// Bind a function to a context, optionally partially applying any528// arguments.529proxy: function( fn, context ) {530var args, proxy, tmp;531532if ( typeof context === "string" ) {533tmp = fn[ context ];534context = fn;535fn = tmp;536}537538// Quick check to determine if target is callable, in the spec539// this throws a TypeError, but we will just return undefined.540if ( !jQuery.isFunction( fn ) ) {541return undefined;542}543544// Simulated bind545args = slice.call( arguments, 2 );546proxy = function() {547return fn.apply( context || this, args.concat( slice.call( arguments ) ) );548};549550// Set the guid of unique handler to the same of original handler, so it can be removed551proxy.guid = fn.guid = fn.guid || jQuery.guid++;552553return proxy;554},555556now: function() {557return +( new Date() );558},559560// jQuery.support is not used in Core but other projects attach their561// properties to it so it needs to exist.562support: support563});564565// Populate the class2type map566jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {567class2type[ "[object " + name + "]" ] = name.toLowerCase();568});569570function isArraylike( obj ) {571572// Support: iOS 8.2 (not reproducible in simulator)573// `in` check used to prevent JIT error (gh-2145)574// hasOwn isn't used here due to false negatives575// regarding Nodelist length in IE576var length = "length" in obj && obj.length,577type = jQuery.type( obj );578579if ( type === "function" || jQuery.isWindow( obj ) ) {580return false;581}582583if ( obj.nodeType === 1 && length ) {584return true;585}586587return type === "array" || length === 0 ||588typeof length === "number" && length > 0 && ( length - 1 ) in obj;589}590var Sizzle =591/*!592* Sizzle CSS Selector Engine v2.2.0-pre593* http://sizzlejs.com/594*595* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors596* Released under the MIT license597* http://jquery.org/license598*599* Date: 2014-12-16600*/601(function( window ) {602603var i,604support,605Expr,606getText,607isXML,608tokenize,609compile,610select,611outermostContext,612sortInput,613hasDuplicate,614615// Local document vars616setDocument,617document,618docElem,619documentIsHTML,620rbuggyQSA,621rbuggyMatches,622matches,623contains,624625// Instance-specific data626expando = "sizzle" + 1 * new Date(),627preferredDoc = window.document,628dirruns = 0,629done = 0,630classCache = createCache(),631tokenCache = createCache(),632compilerCache = createCache(),633sortOrder = function( a, b ) {634if ( a === b ) {635hasDuplicate = true;636}637return 0;638},639640// General-purpose constants641MAX_NEGATIVE = 1 << 31,642643// Instance methods644hasOwn = ({}).hasOwnProperty,645arr = [],646pop = arr.pop,647push_native = arr.push,648push = arr.push,649slice = arr.slice,650// Use a stripped-down indexOf as it's faster than native651// http://jsperf.com/thor-indexof-vs-for/5652indexOf = function( list, elem ) {653var i = 0,654len = list.length;655for ( ; i < len; i++ ) {656if ( list[i] === elem ) {657return i;658}659}660return -1;661},662663booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",664665// Regular expressions666667// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace668whitespace = "[\\x20\\t\\r\\n\\f]",669// http://www.w3.org/TR/css3-syntax/#characters670characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",671672// Loosely modeled on CSS identifier characters673// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors674// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier675identifier = characterEncoding.replace( "w", "w#" ),676677// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors678attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +679// Operator (capture 2)680"*([*^$|!~]?=)" + whitespace +681// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"682"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +683"*\\]",684685pseudos = ":(" + characterEncoding + ")(?:\\((" +686// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:687// 1. quoted (capture 3; capture 4 or capture 5)688"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +689// 2. simple (capture 6)690"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +691// 3. anything else (capture 2)692".*" +693")\\)|)",694695// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter696rwhitespace = new RegExp( whitespace + "+", "g" ),697rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),698699rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),700rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),701702rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),703704rpseudo = new RegExp( pseudos ),705ridentifier = new RegExp( "^" + identifier + "$" ),706707matchExpr = {708"ID": new RegExp( "^#(" + characterEncoding + ")" ),709"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),710"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),711"ATTR": new RegExp( "^" + attributes ),712"PSEUDO": new RegExp( "^" + pseudos ),713"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +714"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +715"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),716"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),717// For use in libraries implementing .is()718// We use this for POS matching in `select`719"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +720whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )721},722723rinputs = /^(?:input|select|textarea|button)$/i,724rheader = /^h\d$/i,725726rnative = /^[^{]+\{\s*\[native \w/,727728// Easily-parseable/retrievable ID or TAG or CLASS selectors729rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,730731rsibling = /[+~]/,732rescape = /'|\\/g,733734// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters735runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),736funescape = function( _, escaped, escapedWhitespace ) {737var high = "0x" + escaped - 0x10000;738// NaN means non-codepoint739// Support: Firefox<24740// Workaround erroneous numeric interpretation of +"0x"741return high !== high || escapedWhitespace ?742escaped :743high < 0 ?744// BMP codepoint745String.fromCharCode( high + 0x10000 ) :746// Supplemental Plane codepoint (surrogate pair)747String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );748},749750// Used for iframes751// See setDocument()752// Removing the function wrapper causes a "Permission Denied"753// error in IE754unloadHandler = function() {755setDocument();756};757758// Optimize for push.apply( _, NodeList )759try {760push.apply(761(arr = slice.call( preferredDoc.childNodes )),762preferredDoc.childNodes763);764// Support: Android<4.0765// Detect silently failing push.apply766arr[ preferredDoc.childNodes.length ].nodeType;767} catch ( e ) {768push = { apply: arr.length ?769770// Leverage slice if possible771function( target, els ) {772push_native.apply( target, slice.call(els) );773} :774775// Support: IE<9776// Otherwise append directly777function( target, els ) {778var j = target.length,779i = 0;780// Can't trust NodeList.length781while ( (target[j++] = els[i++]) ) {}782target.length = j - 1;783}784};785}786787function Sizzle( selector, context, results, seed ) {788var match, elem, m, nodeType,789// QSA vars790i, groups, old, nid, newContext, newSelector;791792if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {793setDocument( context );794}795796context = context || document;797results = results || [];798nodeType = context.nodeType;799800if ( typeof selector !== "string" || !selector ||801nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {802803return results;804}805806if ( !seed && documentIsHTML ) {807808// Try to shortcut find operations when possible (e.g., not under DocumentFragment)809if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {810// Speed-up: Sizzle("#ID")811if ( (m = match[1]) ) {812if ( nodeType === 9 ) {813elem = context.getElementById( m );814// Check parentNode to catch when Blackberry 4.6 returns815// nodes that are no longer in the document (jQuery #6963)816if ( elem && elem.parentNode ) {817// Handle the case where IE, Opera, and Webkit return items818// by name instead of ID819if ( elem.id === m ) {820results.push( elem );821return results;822}823} else {824return results;825}826} else {827// Context is not a document828if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&829contains( context, elem ) && elem.id === m ) {830results.push( elem );831return results;832}833}834835// Speed-up: Sizzle("TAG")836} else if ( match[2] ) {837push.apply( results, context.getElementsByTagName( selector ) );838return results;839840// Speed-up: Sizzle(".CLASS")841} else if ( (m = match[3]) && support.getElementsByClassName ) {842push.apply( results, context.getElementsByClassName( m ) );843return results;844}845}846847// QSA path848if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {849nid = old = expando;850newContext = context;851newSelector = nodeType !== 1 && selector;852853// qSA works strangely on Element-rooted queries854// We can work around this by specifying an extra ID on the root855// and working up from there (Thanks to Andrew Dupont for the technique)856// IE 8 doesn't work on object elements857if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {858groups = tokenize( selector );859860if ( (old = context.getAttribute("id")) ) {861nid = old.replace( rescape, "\\$&" );862} else {863context.setAttribute( "id", nid );864}865nid = "[id='" + nid + "'] ";866867i = groups.length;868while ( i-- ) {869groups[i] = nid + toSelector( groups[i] );870}871newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;872newSelector = groups.join(",");873}874875if ( newSelector ) {876try {877push.apply( results,878newContext.querySelectorAll( newSelector )879);880return results;881} catch(qsaError) {882} finally {883if ( !old ) {884context.removeAttribute("id");885}886}887}888}889}890891// All others892return select( selector.replace( rtrim, "$1" ), context, results, seed );893}894895/**896* Create key-value caches of limited size897* @returns {Function(string, Object)} Returns the Object data after storing it on itself with898* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)899* deleting the oldest entry900*/901function createCache() {902var keys = [];903904function cache( key, value ) {905// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)906if ( keys.push( key + " " ) > Expr.cacheLength ) {907// Only keep the most recent entries908delete cache[ keys.shift() ];909}910return (cache[ key + " " ] = value);911}912return cache;913}914915/**916* Mark a function for special use by Sizzle917* @param {Function} fn The function to mark918*/919function markFunction( fn ) {920fn[ expando ] = true;921return fn;922}923924/**925* Support testing using an element926* @param {Function} fn Passed the created div and expects a boolean result927*/928function assert( fn ) {929var div = document.createElement("div");930931try {932return !!fn( div );933} catch (e) {934return false;935} finally {936// Remove from its parent by default937if ( div.parentNode ) {938div.parentNode.removeChild( div );939}940// release memory in IE941div = null;942}943}944945/**946* Adds the same handler for all of the specified attrs947* @param {String} attrs Pipe-separated list of attributes948* @param {Function} handler The method that will be applied949*/950function addHandle( attrs, handler ) {951var arr = attrs.split("|"),952i = attrs.length;953954while ( i-- ) {955Expr.attrHandle[ arr[i] ] = handler;956}957}958959/**960* Checks document order of two siblings961* @param {Element} a962* @param {Element} b963* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b964*/965function siblingCheck( a, b ) {966var cur = b && a,967diff = cur && a.nodeType === 1 && b.nodeType === 1 &&968( ~b.sourceIndex || MAX_NEGATIVE ) -969( ~a.sourceIndex || MAX_NEGATIVE );970971// Use IE sourceIndex if available on both nodes972if ( diff ) {973return diff;974}975976// Check if b follows a977if ( cur ) {978while ( (cur = cur.nextSibling) ) {979if ( cur === b ) {980return -1;981}982}983}984985return a ? 1 : -1;986}987988/**989* Returns a function to use in pseudos for input types990* @param {String} type991*/992function createInputPseudo( type ) {993return function( elem ) {994var name = elem.nodeName.toLowerCase();995return name === "input" && elem.type === type;996};997}998999/**1000* Returns a function to use in pseudos for buttons1001* @param {String} type1002*/1003function createButtonPseudo( type ) {1004return function( elem ) {1005var name = elem.nodeName.toLowerCase();1006return (name === "input" || name === "button") && elem.type === type;1007};1008}10091010/**1011* Returns a function to use in pseudos for positionals1012* @param {Function} fn1013*/1014function createPositionalPseudo( fn ) {1015return markFunction(function( argument ) {1016argument = +argument;1017return markFunction(function( seed, matches ) {1018var j,1019matchIndexes = fn( [], seed.length, argument ),1020i = matchIndexes.length;10211022// Match elements found at the specified indexes1023while ( i-- ) {1024if ( seed[ (j = matchIndexes[i]) ] ) {1025seed[j] = !(matches[j] = seed[j]);1026}1027}1028});1029});1030}10311032/**1033* Checks a node for validity as a Sizzle context1034* @param {Element|Object=} context1035* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value1036*/1037function testContext( context ) {1038return context && typeof context.getElementsByTagName !== "undefined" && context;1039}10401041// Expose support vars for convenience1042support = Sizzle.support = {};10431044/**1045* Detects XML nodes1046* @param {Element|Object} elem An element or a document1047* @returns {Boolean} True iff elem is a non-HTML XML node1048*/1049isXML = Sizzle.isXML = function( elem ) {1050// documentElement is verified for cases where it doesn't yet exist1051// (such as loading iframes in IE - #4833)1052var documentElement = elem && (elem.ownerDocument || elem).documentElement;1053return documentElement ? documentElement.nodeName !== "HTML" : false;1054};10551056/**1057* Sets document-related variables once based on the current document1058* @param {Element|Object} [doc] An element or document object to use to set the document1059* @returns {Object} Returns the current document1060*/1061setDocument = Sizzle.setDocument = function( node ) {1062var hasCompare, parent,1063doc = node ? node.ownerDocument || node : preferredDoc;10641065// If no document and documentElement is available, return1066if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {1067return document;1068}10691070// Set our document1071document = doc;1072docElem = doc.documentElement;1073parent = doc.defaultView;10741075// Support: IE>81076// If iframe document is assigned to "document" variable and if iframe has been reloaded,1077// IE will throw "permission denied" error when accessing "document" variable, see jQuery #139361078// IE6-8 do not support the defaultView property so parent will be undefined1079if ( parent && parent !== parent.top ) {1080// IE11 does not have attachEvent, so all must suffer1081if ( parent.addEventListener ) {1082parent.addEventListener( "unload", unloadHandler, false );1083} else if ( parent.attachEvent ) {1084parent.attachEvent( "onunload", unloadHandler );1085}1086}10871088/* Support tests1089---------------------------------------------------------------------- */1090documentIsHTML = !isXML( doc );10911092/* Attributes1093---------------------------------------------------------------------- */10941095// Support: IE<81096// Verify that getAttribute really returns attributes and not properties1097// (excepting IE8 booleans)1098support.attributes = assert(function( div ) {1099div.className = "i";1100return !div.getAttribute("className");1101});11021103/* getElement(s)By*1104---------------------------------------------------------------------- */11051106// Check if getElementsByTagName("*") returns only elements1107support.getElementsByTagName = assert(function( div ) {1108div.appendChild( doc.createComment("") );1109return !div.getElementsByTagName("*").length;1110});11111112// Support: IE<91113support.getElementsByClassName = rnative.test( doc.getElementsByClassName );11141115// Support: IE<101116// Check if getElementById returns elements by name1117// The broken getElementById methods don't pick up programatically-set names,1118// so use a roundabout getElementsByName test1119support.getById = assert(function( div ) {1120docElem.appendChild( div ).id = expando;1121return !doc.getElementsByName || !doc.getElementsByName( expando ).length;1122});11231124// ID find and filter1125if ( support.getById ) {1126Expr.find["ID"] = function( id, context ) {1127if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {1128var m = context.getElementById( id );1129// Check parentNode to catch when Blackberry 4.6 returns1130// nodes that are no longer in the document #69631131return m && m.parentNode ? [ m ] : [];1132}1133};1134Expr.filter["ID"] = function( id ) {1135var attrId = id.replace( runescape, funescape );1136return function( elem ) {1137return elem.getAttribute("id") === attrId;1138};1139};1140} else {1141// Support: IE6/71142// getElementById is not reliable as a find shortcut1143delete Expr.find["ID"];11441145Expr.filter["ID"] = function( id ) {1146var attrId = id.replace( runescape, funescape );1147return function( elem ) {1148var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");1149return node && node.value === attrId;1150};1151};1152}11531154// Tag1155Expr.find["TAG"] = support.getElementsByTagName ?1156function( tag, context ) {1157if ( typeof context.getElementsByTagName !== "undefined" ) {1158return context.getElementsByTagName( tag );11591160// DocumentFragment nodes don't have gEBTN1161} else if ( support.qsa ) {1162return context.querySelectorAll( tag );1163}1164} :11651166function( tag, context ) {1167var elem,1168tmp = [],1169i = 0,1170// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too1171results = context.getElementsByTagName( tag );11721173// Filter out possible comments1174if ( tag === "*" ) {1175while ( (elem = results[i++]) ) {1176if ( elem.nodeType === 1 ) {1177tmp.push( elem );1178}1179}11801181return tmp;1182}1183return results;1184};11851186// Class1187Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {1188if ( documentIsHTML ) {1189return context.getElementsByClassName( className );1190}1191};11921193/* QSA/matchesSelector1194---------------------------------------------------------------------- */11951196// QSA and matchesSelector support11971198// matchesSelector(:active) reports false when true (IE9/Opera 11.5)1199rbuggyMatches = [];12001201// qSa(:focus) reports false when true (Chrome 21)1202// We allow this because of a bug in IE8/9 that throws an error1203// whenever `document.activeElement` is accessed on an iframe1204// So, we allow :focus to pass through QSA all the time to avoid the IE error1205// See http://bugs.jquery.com/ticket/133781206rbuggyQSA = [];12071208if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {1209// Build QSA regex1210// Regex strategy adopted from Diego Perini1211assert(function( div ) {1212// Select is set to empty string on purpose1213// This is to test IE's treatment of not explicitly1214// setting a boolean content attribute,1215// since its presence should be enough1216// http://bugs.jquery.com/ticket/123591217docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +1218"<select id='" + expando + "-\f]' msallowcapture=''>" +1219"<option selected=''></option></select>";12201221// Support: IE8, Opera 11-12.161222// Nothing should be selected when empty strings follow ^= or $= or *=1223// The test attribute must be unknown in Opera but "safe" for WinRT1224// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section1225if ( div.querySelectorAll("[msallowcapture^='']").length ) {1226rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );1227}12281229// Support: IE81230// Boolean attributes and "value" are not treated correctly1231if ( !div.querySelectorAll("[selected]").length ) {1232rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );1233}12341235// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+1236if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {1237rbuggyQSA.push("~=");1238}12391240// Webkit/Opera - :checked should return selected option elements1241// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked1242// IE8 throws error here and will not see later tests1243if ( !div.querySelectorAll(":checked").length ) {1244rbuggyQSA.push(":checked");1245}12461247// Support: Safari 8+, iOS 8+1248// https://bugs.webkit.org/show_bug.cgi?id=1368511249// In-page `selector#id sibing-combinator selector` fails1250if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {1251rbuggyQSA.push(".#.+[+~]");1252}1253});12541255assert(function( div ) {1256// Support: Windows 8 Native Apps1257// The type and name attributes are restricted during .innerHTML assignment1258var input = doc.createElement("input");1259input.setAttribute( "type", "hidden" );1260div.appendChild( input ).setAttribute( "name", "D" );12611262// Support: IE81263// Enforce case-sensitivity of name attribute1264if ( div.querySelectorAll("[name=d]").length ) {1265rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );1266}12671268// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)1269// IE8 throws error here and will not see later tests1270if ( !div.querySelectorAll(":enabled").length ) {1271rbuggyQSA.push( ":enabled", ":disabled" );1272}12731274// Opera 10-11 does not throw on post-comma invalid pseudos1275div.querySelectorAll("*,:x");1276rbuggyQSA.push(",.*:");1277});1278}12791280if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||1281docElem.webkitMatchesSelector ||1282docElem.mozMatchesSelector ||1283docElem.oMatchesSelector ||1284docElem.msMatchesSelector) )) ) {12851286assert(function( div ) {1287// Check to see if it's possible to do matchesSelector1288// on a disconnected node (IE 9)1289support.disconnectedMatch = matches.call( div, "div" );12901291// This should fail with an exception1292// Gecko does not error, returns false instead1293matches.call( div, "[s!='']:x" );1294rbuggyMatches.push( "!=", pseudos );1295});1296}12971298rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );1299rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );13001301/* Contains1302---------------------------------------------------------------------- */1303hasCompare = rnative.test( docElem.compareDocumentPosition );13041305// Element contains another1306// Purposefully does not implement inclusive descendent1307// As in, an element does not contain itself1308contains = hasCompare || rnative.test( docElem.contains ) ?1309function( a, b ) {1310var adown = a.nodeType === 9 ? a.documentElement : a,1311bup = b && b.parentNode;1312return a === bup || !!( bup && bup.nodeType === 1 && (1313adown.contains ?1314adown.contains( bup ) :1315a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 161316));1317} :1318function( a, b ) {1319if ( b ) {1320while ( (b = b.parentNode) ) {1321if ( b === a ) {1322return true;1323}1324}1325}1326return false;1327};13281329/* Sorting1330---------------------------------------------------------------------- */13311332// Document order sorting1333sortOrder = hasCompare ?1334function( a, b ) {13351336// Flag for duplicate removal1337if ( a === b ) {1338hasDuplicate = true;1339return 0;1340}13411342// Sort on method existence if only one input has compareDocumentPosition1343var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;1344if ( compare ) {1345return compare;1346}13471348// Calculate position if both inputs belong to the same document1349compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?1350a.compareDocumentPosition( b ) :13511352// Otherwise we know they are disconnected13531;13541355// Disconnected nodes1356if ( compare & 1 ||1357(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {13581359// Choose the first element that is related to our preferred document1360if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {1361return -1;1362}1363if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {1364return 1;1365}13661367// Maintain original order1368return sortInput ?1369( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :13700;1371}13721373return compare & 4 ? -1 : 1;1374} :1375function( a, b ) {1376// Exit early if the nodes are identical1377if ( a === b ) {1378hasDuplicate = true;1379return 0;1380}13811382var cur,1383i = 0,1384aup = a.parentNode,1385bup = b.parentNode,1386ap = [ a ],1387bp = [ b ];13881389// Parentless nodes are either documents or disconnected1390if ( !aup || !bup ) {1391return a === doc ? -1 :1392b === doc ? 1 :1393aup ? -1 :1394bup ? 1 :1395sortInput ?1396( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :13970;13981399// If the nodes are siblings, we can do a quick check1400} else if ( aup === bup ) {1401return siblingCheck( a, b );1402}14031404// Otherwise we need full lists of their ancestors for comparison1405cur = a;1406while ( (cur = cur.parentNode) ) {1407ap.unshift( cur );1408}1409cur = b;1410while ( (cur = cur.parentNode) ) {1411bp.unshift( cur );1412}14131414// Walk down the tree looking for a discrepancy1415while ( ap[i] === bp[i] ) {1416i++;1417}14181419return i ?1420// Do a sibling check if the nodes have a common ancestor1421siblingCheck( ap[i], bp[i] ) :14221423// Otherwise nodes in our document sort first1424ap[i] === preferredDoc ? -1 :1425bp[i] === preferredDoc ? 1 :14260;1427};14281429return doc;1430};14311432Sizzle.matches = function( expr, elements ) {1433return Sizzle( expr, null, null, elements );1434};14351436Sizzle.matchesSelector = function( elem, expr ) {1437// Set document vars if needed1438if ( ( elem.ownerDocument || elem ) !== document ) {1439setDocument( elem );1440}14411442// Make sure that attribute selectors are quoted1443expr = expr.replace( rattributeQuotes, "='$1']" );14441445if ( support.matchesSelector && documentIsHTML &&1446( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&1447( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {14481449try {1450var ret = matches.call( elem, expr );14511452// IE 9's matchesSelector returns false on disconnected nodes1453if ( ret || support.disconnectedMatch ||1454// As well, disconnected nodes are said to be in a document1455// fragment in IE 91456elem.document && elem.document.nodeType !== 11 ) {1457return ret;1458}1459} catch (e) {}1460}14611462return Sizzle( expr, document, null, [ elem ] ).length > 0;1463};14641465Sizzle.contains = function( context, elem ) {1466// Set document vars if needed1467if ( ( context.ownerDocument || context ) !== document ) {1468setDocument( context );1469}1470return contains( context, elem );1471};14721473Sizzle.attr = function( elem, name ) {1474// Set document vars if needed1475if ( ( elem.ownerDocument || elem ) !== document ) {1476setDocument( elem );1477}14781479var fn = Expr.attrHandle[ name.toLowerCase() ],1480// Don't get fooled by Object.prototype properties (jQuery #13807)1481val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?1482fn( elem, name, !documentIsHTML ) :1483undefined;14841485return val !== undefined ?1486val :1487support.attributes || !documentIsHTML ?1488elem.getAttribute( name ) :1489(val = elem.getAttributeNode(name)) && val.specified ?1490val.value :1491null;1492};14931494Sizzle.error = function( msg ) {1495throw new Error( "Syntax error, unrecognized expression: " + msg );1496};14971498/**1499* Document sorting and removing duplicates1500* @param {ArrayLike} results1501*/1502Sizzle.uniqueSort = function( results ) {1503var elem,1504duplicates = [],1505j = 0,1506i = 0;15071508// Unless we *know* we can detect duplicates, assume their presence1509hasDuplicate = !support.detectDuplicates;1510sortInput = !support.sortStable && results.slice( 0 );1511results.sort( sortOrder );15121513if ( hasDuplicate ) {1514while ( (elem = results[i++]) ) {1515if ( elem === results[ i ] ) {1516j = duplicates.push( i );1517}1518}1519while ( j-- ) {1520results.splice( duplicates[ j ], 1 );1521}1522}15231524// Clear input after sorting to release objects1525// See https://github.com/jquery/sizzle/pull/2251526sortInput = null;15271528return results;1529};15301531/**1532* Utility function for retrieving the text value of an array of DOM nodes1533* @param {Array|Element} elem1534*/1535getText = Sizzle.getText = function( elem ) {1536var node,1537ret = "",1538i = 0,1539nodeType = elem.nodeType;15401541if ( !nodeType ) {1542// If no nodeType, this is expected to be an array1543while ( (node = elem[i++]) ) {1544// Do not traverse comment nodes1545ret += getText( node );1546}1547} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {1548// Use textContent for elements1549// innerText usage removed for consistency of new lines (jQuery #11153)1550if ( typeof elem.textContent === "string" ) {1551return elem.textContent;1552} else {1553// Traverse its children1554for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {1555ret += getText( elem );1556}1557}1558} else if ( nodeType === 3 || nodeType === 4 ) {1559return elem.nodeValue;1560}1561// Do not include comment or processing instruction nodes15621563return ret;1564};15651566Expr = Sizzle.selectors = {15671568// Can be adjusted by the user1569cacheLength: 50,15701571createPseudo: markFunction,15721573match: matchExpr,15741575attrHandle: {},15761577find: {},15781579relative: {1580">": { dir: "parentNode", first: true },1581" ": { dir: "parentNode" },1582"+": { dir: "previousSibling", first: true },1583"~": { dir: "previousSibling" }1584},15851586preFilter: {1587"ATTR": function( match ) {1588match[1] = match[1].replace( runescape, funescape );15891590// Move the given value to match[3] whether quoted or unquoted1591match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );15921593if ( match[2] === "~=" ) {1594match[3] = " " + match[3] + " ";1595}15961597return match.slice( 0, 4 );1598},15991600"CHILD": function( match ) {1601/* matches from matchExpr["CHILD"]16021 type (only|nth|...)16032 what (child|of-type)16043 argument (even|odd|\d*|\d*n([+-]\d+)?|...)16054 xn-component of xn+y argument ([+-]?\d*n|)16065 sign of xn-component16076 x of xn-component16087 sign of y-component16098 y of y-component1610*/1611match[1] = match[1].toLowerCase();16121613if ( match[1].slice( 0, 3 ) === "nth" ) {1614// nth-* requires argument1615if ( !match[3] ) {1616Sizzle.error( match[0] );1617}16181619// numeric x and y parameters for Expr.filter.CHILD1620// remember that false/true cast respectively to 0/11621match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );1622match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );16231624// other types prohibit arguments1625} else if ( match[3] ) {1626Sizzle.error( match[0] );1627}16281629return match;1630},16311632"PSEUDO": function( match ) {1633var excess,1634unquoted = !match[6] && match[2];16351636if ( matchExpr["CHILD"].test( match[0] ) ) {1637return null;1638}16391640// Accept quoted arguments as-is1641if ( match[3] ) {1642match[2] = match[4] || match[5] || "";16431644// Strip excess characters from unquoted arguments1645} else if ( unquoted && rpseudo.test( unquoted ) &&1646// Get excess from tokenize (recursively)1647(excess = tokenize( unquoted, true )) &&1648// advance to the next closing parenthesis1649(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {16501651// excess is a negative index1652match[0] = match[0].slice( 0, excess );1653match[2] = unquoted.slice( 0, excess );1654}16551656// Return only captures needed by the pseudo filter method (type and argument)1657return match.slice( 0, 3 );1658}1659},16601661filter: {16621663"TAG": function( nodeNameSelector ) {1664var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();1665return nodeNameSelector === "*" ?1666function() { return true; } :1667function( elem ) {1668return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;1669};1670},16711672"CLASS": function( className ) {1673var pattern = classCache[ className + " " ];16741675return pattern ||1676(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&1677classCache( className, function( elem ) {1678return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );1679});1680},16811682"ATTR": function( name, operator, check ) {1683return function( elem ) {1684var result = Sizzle.attr( elem, name );16851686if ( result == null ) {1687return operator === "!=";1688}1689if ( !operator ) {1690return true;1691}16921693result += "";16941695return operator === "=" ? result === check :1696operator === "!=" ? result !== check :1697operator === "^=" ? check && result.indexOf( check ) === 0 :1698operator === "*=" ? check && result.indexOf( check ) > -1 :1699operator === "$=" ? check && result.slice( -check.length ) === check :1700operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :1701operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :1702false;1703};1704},17051706"CHILD": function( type, what, argument, first, last ) {1707var simple = type.slice( 0, 3 ) !== "nth",1708forward = type.slice( -4 ) !== "last",1709ofType = what === "of-type";17101711return first === 1 && last === 0 ?17121713// Shortcut for :nth-*(n)1714function( elem ) {1715return !!elem.parentNode;1716} :17171718function( elem, context, xml ) {1719var cache, outerCache, node, diff, nodeIndex, start,1720dir = simple !== forward ? "nextSibling" : "previousSibling",1721parent = elem.parentNode,1722name = ofType && elem.nodeName.toLowerCase(),1723useCache = !xml && !ofType;17241725if ( parent ) {17261727// :(first|last|only)-(child|of-type)1728if ( simple ) {1729while ( dir ) {1730node = elem;1731while ( (node = node[ dir ]) ) {1732if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {1733return false;1734}1735}1736// Reverse direction for :only-* (if we haven't yet done so)1737start = dir = type === "only" && !start && "nextSibling";1738}1739return true;1740}17411742start = [ forward ? parent.firstChild : parent.lastChild ];17431744// non-xml :nth-child(...) stores cache data on `parent`1745if ( forward && useCache ) {1746// Seek `elem` from a previously-cached index1747outerCache = parent[ expando ] || (parent[ expando ] = {});1748cache = outerCache[ type ] || [];1749nodeIndex = cache[0] === dirruns && cache[1];1750diff = cache[0] === dirruns && cache[2];1751node = nodeIndex && parent.childNodes[ nodeIndex ];17521753while ( (node = ++nodeIndex && node && node[ dir ] ||17541755// Fallback to seeking `elem` from the start1756(diff = nodeIndex = 0) || start.pop()) ) {17571758// When found, cache indexes on `parent` and break1759if ( node.nodeType === 1 && ++diff && node === elem ) {1760outerCache[ type ] = [ dirruns, nodeIndex, diff ];1761break;1762}1763}17641765// Use previously-cached element index if available1766} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {1767diff = cache[1];17681769// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)1770} else {1771// Use the same loop as above to seek `elem` from the start1772while ( (node = ++nodeIndex && node && node[ dir ] ||1773(diff = nodeIndex = 0) || start.pop()) ) {17741775if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {1776// Cache the index of each encountered element1777if ( useCache ) {1778(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];1779}17801781if ( node === elem ) {1782break;1783}1784}1785}1786}17871788// Incorporate the offset, then check against cycle size1789diff -= last;1790return diff === first || ( diff % first === 0 && diff / first >= 0 );1791}1792};1793},17941795"PSEUDO": function( pseudo, argument ) {1796// pseudo-class names are case-insensitive1797// http://www.w3.org/TR/selectors/#pseudo-classes1798// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters1799// Remember that setFilters inherits from pseudos1800var args,1801fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||1802Sizzle.error( "unsupported pseudo: " + pseudo );18031804// The user may use createPseudo to indicate that1805// arguments are needed to create the filter function1806// just as Sizzle does1807if ( fn[ expando ] ) {1808return fn( argument );1809}18101811// But maintain support for old signatures1812if ( fn.length > 1 ) {1813args = [ pseudo, pseudo, "", argument ];1814return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?1815markFunction(function( seed, matches ) {1816var idx,1817matched = fn( seed, argument ),1818i = matched.length;1819while ( i-- ) {1820idx = indexOf( seed, matched[i] );1821seed[ idx ] = !( matches[ idx ] = matched[i] );1822}1823}) :1824function( elem ) {1825return fn( elem, 0, args );1826};1827}18281829return fn;1830}1831},18321833pseudos: {1834// Potentially complex pseudos1835"not": markFunction(function( selector ) {1836// Trim the selector passed to compile1837// to avoid treating leading and trailing1838// spaces as combinators1839var input = [],1840results = [],1841matcher = compile( selector.replace( rtrim, "$1" ) );18421843return matcher[ expando ] ?1844markFunction(function( seed, matches, context, xml ) {1845var elem,1846unmatched = matcher( seed, null, xml, [] ),1847i = seed.length;18481849// Match elements unmatched by `matcher`1850while ( i-- ) {1851if ( (elem = unmatched[i]) ) {1852seed[i] = !(matches[i] = elem);1853}1854}1855}) :1856function( elem, context, xml ) {1857input[0] = elem;1858matcher( input, null, xml, results );1859// Don't keep the element (issue #299)1860input[0] = null;1861return !results.pop();1862};1863}),18641865"has": markFunction(function( selector ) {1866return function( elem ) {1867return Sizzle( selector, elem ).length > 0;1868};1869}),18701871"contains": markFunction(function( text ) {1872text = text.replace( runescape, funescape );1873return function( elem ) {1874return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;1875};1876}),18771878// "Whether an element is represented by a :lang() selector1879// is based solely on the element's language value1880// being equal to the identifier C,1881// or beginning with the identifier C immediately followed by "-".1882// The matching of C against the element's language value is performed case-insensitively.1883// The identifier C does not have to be a valid language name."1884// http://www.w3.org/TR/selectors/#lang-pseudo1885"lang": markFunction( function( lang ) {1886// lang value must be a valid identifier1887if ( !ridentifier.test(lang || "") ) {1888Sizzle.error( "unsupported lang: " + lang );1889}1890lang = lang.replace( runescape, funescape ).toLowerCase();1891return function( elem ) {1892var elemLang;1893do {1894if ( (elemLang = documentIsHTML ?1895elem.lang :1896elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {18971898elemLang = elemLang.toLowerCase();1899return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;1900}1901} while ( (elem = elem.parentNode) && elem.nodeType === 1 );1902return false;1903};1904}),19051906// Miscellaneous1907"target": function( elem ) {1908var hash = window.location && window.location.hash;1909return hash && hash.slice( 1 ) === elem.id;1910},19111912"root": function( elem ) {1913return elem === docElem;1914},19151916"focus": function( elem ) {1917return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);1918},19191920// Boolean properties1921"enabled": function( elem ) {1922return elem.disabled === false;1923},19241925"disabled": function( elem ) {1926return elem.disabled === true;1927},19281929"checked": function( elem ) {1930// In CSS3, :checked should return both checked and selected elements1931// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked1932var nodeName = elem.nodeName.toLowerCase();1933return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);1934},19351936"selected": function( elem ) {1937// Accessing this property makes selected-by-default1938// options in Safari work properly1939if ( elem.parentNode ) {1940elem.parentNode.selectedIndex;1941}19421943return elem.selected === true;1944},19451946// Contents1947"empty": function( elem ) {1948// http://www.w3.org/TR/selectors/#empty-pseudo1949// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),1950// but not by others (comment: 8; processing instruction: 7; etc.)1951// nodeType < 6 works because attributes (2) do not appear as children1952for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {1953if ( elem.nodeType < 6 ) {1954return false;1955}1956}1957return true;1958},19591960"parent": function( elem ) {1961return !Expr.pseudos["empty"]( elem );1962},19631964// Element/input types1965"header": function( elem ) {1966return rheader.test( elem.nodeName );1967},19681969"input": function( elem ) {1970return rinputs.test( elem.nodeName );1971},19721973"button": function( elem ) {1974var name = elem.nodeName.toLowerCase();1975return name === "input" && elem.type === "button" || name === "button";1976},19771978"text": function( elem ) {1979var attr;1980return elem.nodeName.toLowerCase() === "input" &&1981elem.type === "text" &&19821983// Support: IE<81984// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"1985( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );1986},19871988// Position-in-collection1989"first": createPositionalPseudo(function() {1990return [ 0 ];1991}),19921993"last": createPositionalPseudo(function( matchIndexes, length ) {1994return [ length - 1 ];1995}),19961997"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {1998return [ argument < 0 ? argument + length : argument ];1999}),20002001"even": createPositionalPseudo(function( matchIndexes, length ) {2002var i = 0;2003for ( ; i < length; i += 2 ) {2004matchIndexes.push( i );2005}2006return matchIndexes;2007}),20082009"odd": createPositionalPseudo(function( matchIndexes, length ) {2010var i = 1;2011for ( ; i < length; i += 2 ) {2012matchIndexes.push( i );2013}2014return matchIndexes;2015}),20162017"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {2018var i = argument < 0 ? argument + length : argument;2019for ( ; --i >= 0; ) {2020matchIndexes.push( i );2021}2022return matchIndexes;2023}),20242025"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {2026var i = argument < 0 ? argument + length : argument;2027for ( ; ++i < length; ) {2028matchIndexes.push( i );2029}2030return matchIndexes;2031})2032}2033};20342035Expr.pseudos["nth"] = Expr.pseudos["eq"];20362037// Add button/input type pseudos2038for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {2039Expr.pseudos[ i ] = createInputPseudo( i );2040}2041for ( i in { submit: true, reset: true } ) {2042Expr.pseudos[ i ] = createButtonPseudo( i );2043}20442045// Easy API for creating new setFilters2046function setFilters() {}2047setFilters.prototype = Expr.filters = Expr.pseudos;2048Expr.setFilters = new setFilters();20492050tokenize = Sizzle.tokenize = function( selector, parseOnly ) {2051var matched, match, tokens, type,2052soFar, groups, preFilters,2053cached = tokenCache[ selector + " " ];20542055if ( cached ) {2056return parseOnly ? 0 : cached.slice( 0 );2057}20582059soFar = selector;2060groups = [];2061preFilters = Expr.preFilter;20622063while ( soFar ) {20642065// Comma and first run2066if ( !matched || (match = rcomma.exec( soFar )) ) {2067if ( match ) {2068// Don't consume trailing commas as valid2069soFar = soFar.slice( match[0].length ) || soFar;2070}2071groups.push( (tokens = []) );2072}20732074matched = false;20752076// Combinators2077if ( (match = rcombinators.exec( soFar )) ) {2078matched = match.shift();2079tokens.push({2080value: matched,2081// Cast descendant combinators to space2082type: match[0].replace( rtrim, " " )2083});2084soFar = soFar.slice( matched.length );2085}20862087// Filters2088for ( type in Expr.filter ) {2089if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||2090(match = preFilters[ type ]( match ))) ) {2091matched = match.shift();2092tokens.push({2093value: matched,2094type: type,2095matches: match2096});2097soFar = soFar.slice( matched.length );2098}2099}21002101if ( !matched ) {2102break;2103}2104}21052106// Return the length of the invalid excess2107// if we're just parsing2108// Otherwise, throw an error or return tokens2109return parseOnly ?2110soFar.length :2111soFar ?2112Sizzle.error( selector ) :2113// Cache the tokens2114tokenCache( selector, groups ).slice( 0 );2115};21162117function toSelector( tokens ) {2118var i = 0,2119len = tokens.length,2120selector = "";2121for ( ; i < len; i++ ) {2122selector += tokens[i].value;2123}2124return selector;2125}21262127function addCombinator( matcher, combinator, base ) {2128var dir = combinator.dir,2129checkNonElements = base && dir === "parentNode",2130doneName = done++;21312132return combinator.first ?2133// Check against closest ancestor/preceding element2134function( elem, context, xml ) {2135while ( (elem = elem[ dir ]) ) {2136if ( elem.nodeType === 1 || checkNonElements ) {2137return matcher( elem, context, xml );2138}2139}2140} :21412142// Check against all ancestor/preceding elements2143function( elem, context, xml ) {2144var oldCache, outerCache,2145newCache = [ dirruns, doneName ];21462147// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching2148if ( xml ) {2149while ( (elem = elem[ dir ]) ) {2150if ( elem.nodeType === 1 || checkNonElements ) {2151if ( matcher( elem, context, xml ) ) {2152return true;2153}2154}2155}2156} else {2157while ( (elem = elem[ dir ]) ) {2158if ( elem.nodeType === 1 || checkNonElements ) {2159outerCache = elem[ expando ] || (elem[ expando ] = {});2160if ( (oldCache = outerCache[ dir ]) &&2161oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {21622163// Assign to newCache so results back-propagate to previous elements2164return (newCache[ 2 ] = oldCache[ 2 ]);2165} else {2166// Reuse newcache so results back-propagate to previous elements2167outerCache[ dir ] = newCache;21682169// A match means we're done; a fail means we have to keep checking2170if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {2171return true;2172}2173}2174}2175}2176}2177};2178}21792180function elementMatcher( matchers ) {2181return matchers.length > 1 ?2182function( elem, context, xml ) {2183var i = matchers.length;2184while ( i-- ) {2185if ( !matchers[i]( elem, context, xml ) ) {2186return false;2187}2188}2189return true;2190} :2191matchers[0];2192}21932194function multipleContexts( selector, contexts, results ) {2195var i = 0,2196len = contexts.length;2197for ( ; i < len; i++ ) {2198Sizzle( selector, contexts[i], results );2199}2200return results;2201}22022203function condense( unmatched, map, filter, context, xml ) {2204var elem,2205newUnmatched = [],2206i = 0,2207len = unmatched.length,2208mapped = map != null;22092210for ( ; i < len; i++ ) {2211if ( (elem = unmatched[i]) ) {2212if ( !filter || filter( elem, context, xml ) ) {2213newUnmatched.push( elem );2214if ( mapped ) {2215map.push( i );2216}2217}2218}2219}22202221return newUnmatched;2222}22232224function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {2225if ( postFilter && !postFilter[ expando ] ) {2226postFilter = setMatcher( postFilter );2227}2228if ( postFinder && !postFinder[ expando ] ) {2229postFinder = setMatcher( postFinder, postSelector );2230}2231return markFunction(function( seed, results, context, xml ) {2232var temp, i, elem,2233preMap = [],2234postMap = [],2235preexisting = results.length,22362237// Get initial elements from seed or context2238elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),22392240// Prefilter to get matcher input, preserving a map for seed-results synchronization2241matcherIn = preFilter && ( seed || !selector ) ?2242condense( elems, preMap, preFilter, context, xml ) :2243elems,22442245matcherOut = matcher ?2246// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,2247postFinder || ( seed ? preFilter : preexisting || postFilter ) ?22482249// ...intermediate processing is necessary2250[] :22512252// ...otherwise use results directly2253results :2254matcherIn;22552256// Find primary matches2257if ( matcher ) {2258matcher( matcherIn, matcherOut, context, xml );2259}22602261// Apply postFilter2262if ( postFilter ) {2263temp = condense( matcherOut, postMap );2264postFilter( temp, [], context, xml );22652266// Un-match failing elements by moving them back to matcherIn2267i = temp.length;2268while ( i-- ) {2269if ( (elem = temp[i]) ) {2270matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);2271}2272}2273}22742275if ( seed ) {2276if ( postFinder || preFilter ) {2277if ( postFinder ) {2278// Get the final matcherOut by condensing this intermediate into postFinder contexts2279temp = [];2280i = matcherOut.length;2281while ( i-- ) {2282if ( (elem = matcherOut[i]) ) {2283// Restore matcherIn since elem is not yet a final match2284temp.push( (matcherIn[i] = elem) );2285}2286}2287postFinder( null, (matcherOut = []), temp, xml );2288}22892290// Move matched elements from seed to results to keep them synchronized2291i = matcherOut.length;2292while ( i-- ) {2293if ( (elem = matcherOut[i]) &&2294(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {22952296seed[temp] = !(results[temp] = elem);2297}2298}2299}23002301// Add elements to results, through postFinder if defined2302} else {2303matcherOut = condense(2304matcherOut === results ?2305matcherOut.splice( preexisting, matcherOut.length ) :2306matcherOut2307);2308if ( postFinder ) {2309postFinder( null, results, matcherOut, xml );2310} else {2311push.apply( results, matcherOut );2312}2313}2314});2315}23162317function matcherFromTokens( tokens ) {2318var checkContext, matcher, j,2319len = tokens.length,2320leadingRelative = Expr.relative[ tokens[0].type ],2321implicitRelative = leadingRelative || Expr.relative[" "],2322i = leadingRelative ? 1 : 0,23232324// The foundational matcher ensures that elements are reachable from top-level context(s)2325matchContext = addCombinator( function( elem ) {2326return elem === checkContext;2327}, implicitRelative, true ),2328matchAnyContext = addCombinator( function( elem ) {2329return indexOf( checkContext, elem ) > -1;2330}, implicitRelative, true ),2331matchers = [ function( elem, context, xml ) {2332var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (2333(checkContext = context).nodeType ?2334matchContext( elem, context, xml ) :2335matchAnyContext( elem, context, xml ) );2336// Avoid hanging onto element (issue #299)2337checkContext = null;2338return ret;2339} ];23402341for ( ; i < len; i++ ) {2342if ( (matcher = Expr.relative[ tokens[i].type ]) ) {2343matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];2344} else {2345matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );23462347// Return special upon seeing a positional matcher2348if ( matcher[ expando ] ) {2349// Find the next relative operator (if any) for proper handling2350j = ++i;2351for ( ; j < len; j++ ) {2352if ( Expr.relative[ tokens[j].type ] ) {2353break;2354}2355}2356return setMatcher(2357i > 1 && elementMatcher( matchers ),2358i > 1 && toSelector(2359// If the preceding token was a descendant combinator, insert an implicit any-element `*`2360tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })2361).replace( rtrim, "$1" ),2362matcher,2363i < j && matcherFromTokens( tokens.slice( i, j ) ),2364j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),2365j < len && toSelector( tokens )2366);2367}2368matchers.push( matcher );2369}2370}23712372return elementMatcher( matchers );2373}23742375function matcherFromGroupMatchers( elementMatchers, setMatchers ) {2376var bySet = setMatchers.length > 0,2377byElement = elementMatchers.length > 0,2378superMatcher = function( seed, context, xml, results, outermost ) {2379var elem, j, matcher,2380matchedCount = 0,2381i = "0",2382unmatched = seed && [],2383setMatched = [],2384contextBackup = outermostContext,2385// We must always have either seed elements or outermost context2386elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),2387// Use integer dirruns iff this is the outermost matcher2388dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),2389len = elems.length;23902391if ( outermost ) {2392outermostContext = context !== document && context;2393}23942395// Add elements passing elementMatchers directly to results2396// Keep `i` a string if there are no elements so `matchedCount` will be "00" below2397// Support: IE<9, Safari2398// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id2399for ( ; i !== len && (elem = elems[i]) != null; i++ ) {2400if ( byElement && elem ) {2401j = 0;2402while ( (matcher = elementMatchers[j++]) ) {2403if ( matcher( elem, context, xml ) ) {2404results.push( elem );2405break;2406}2407}2408if ( outermost ) {2409dirruns = dirrunsUnique;2410}2411}24122413// Track unmatched elements for set filters2414if ( bySet ) {2415// They will have gone through all possible matchers2416if ( (elem = !matcher && elem) ) {2417matchedCount--;2418}24192420// Lengthen the array for every element, matched or not2421if ( seed ) {2422unmatched.push( elem );2423}2424}2425}24262427// Apply set filters to unmatched elements2428matchedCount += i;2429if ( bySet && i !== matchedCount ) {2430j = 0;2431while ( (matcher = setMatchers[j++]) ) {2432matcher( unmatched, setMatched, context, xml );2433}24342435if ( seed ) {2436// Reintegrate element matches to eliminate the need for sorting2437if ( matchedCount > 0 ) {2438while ( i-- ) {2439if ( !(unmatched[i] || setMatched[i]) ) {2440setMatched[i] = pop.call( results );2441}2442}2443}24442445// Discard index placeholder values to get only actual matches2446setMatched = condense( setMatched );2447}24482449// Add matches to results2450push.apply( results, setMatched );24512452// Seedless set matches succeeding multiple successful matchers stipulate sorting2453if ( outermost && !seed && setMatched.length > 0 &&2454( matchedCount + setMatchers.length ) > 1 ) {24552456Sizzle.uniqueSort( results );2457}2458}24592460// Override manipulation of globals by nested matchers2461if ( outermost ) {2462dirruns = dirrunsUnique;2463outermostContext = contextBackup;2464}24652466return unmatched;2467};24682469return bySet ?2470markFunction( superMatcher ) :2471superMatcher;2472}24732474compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {2475var i,2476setMatchers = [],2477elementMatchers = [],2478cached = compilerCache[ selector + " " ];24792480if ( !cached ) {2481// Generate a function of recursive functions that can be used to check each element2482if ( !match ) {2483match = tokenize( selector );2484}2485i = match.length;2486while ( i-- ) {2487cached = matcherFromTokens( match[i] );2488if ( cached[ expando ] ) {2489setMatchers.push( cached );2490} else {2491elementMatchers.push( cached );2492}2493}24942495// Cache the compiled function2496cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );24972498// Save selector and tokenization2499cached.selector = selector;2500}2501return cached;2502};25032504/**2505* A low-level selection function that works with Sizzle's compiled2506* selector functions2507* @param {String|Function} selector A selector or a pre-compiled2508* selector function built with Sizzle.compile2509* @param {Element} context2510* @param {Array} [results]2511* @param {Array} [seed] A set of elements to match against2512*/2513select = Sizzle.select = function( selector, context, results, seed ) {2514var i, tokens, token, type, find,2515compiled = typeof selector === "function" && selector,2516match = !seed && tokenize( (selector = compiled.selector || selector) );25172518results = results || [];25192520// Try to minimize operations if there is no seed and only one group2521if ( match.length === 1 ) {25222523// Take a shortcut and set the context if the root selector is an ID2524tokens = match[0] = match[0].slice( 0 );2525if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&2526support.getById && context.nodeType === 9 && documentIsHTML &&2527Expr.relative[ tokens[1].type ] ) {25282529context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];2530if ( !context ) {2531return results;25322533// Precompiled matchers will still verify ancestry, so step up a level2534} else if ( compiled ) {2535context = context.parentNode;2536}25372538selector = selector.slice( tokens.shift().value.length );2539}25402541// Fetch a seed set for right-to-left matching2542i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;2543while ( i-- ) {2544token = tokens[i];25452546// Abort if we hit a combinator2547if ( Expr.relative[ (type = token.type) ] ) {2548break;2549}2550if ( (find = Expr.find[ type ]) ) {2551// Search, expanding context for leading sibling combinators2552if ( (seed = find(2553token.matches[0].replace( runescape, funescape ),2554rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context2555)) ) {25562557// If seed is empty or no tokens remain, we can return early2558tokens.splice( i, 1 );2559selector = seed.length && toSelector( tokens );2560if ( !selector ) {2561push.apply( results, seed );2562return results;2563}25642565break;2566}2567}2568}2569}25702571// Compile and execute a filtering function if one is not provided2572// Provide `match` to avoid retokenization if we modified the selector above2573( compiled || compile( selector, match ) )(2574seed,2575context,2576!documentIsHTML,2577results,2578rsibling.test( selector ) && testContext( context.parentNode ) || context2579);2580return results;2581};25822583// One-time assignments25842585// Sort stability2586support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;25872588// Support: Chrome 14-35+2589// Always assume duplicates if they aren't passed to the comparison function2590support.detectDuplicates = !!hasDuplicate;25912592// Initialize against the default document2593setDocument();25942595// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)2596// Detached nodes confoundingly follow *each other*2597support.sortDetached = assert(function( div1 ) {2598// Should return 1, but returns 4 (following)2599return div1.compareDocumentPosition( document.createElement("div") ) & 1;2600});26012602// Support: IE<82603// Prevent attribute/property "interpolation"2604// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx2605if ( !assert(function( div ) {2606div.innerHTML = "<a href='#'></a>";2607return div.firstChild.getAttribute("href") === "#" ;2608}) ) {2609addHandle( "type|href|height|width", function( elem, name, isXML ) {2610if ( !isXML ) {2611return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );2612}2613});2614}26152616// Support: IE<92617// Use defaultValue in place of getAttribute("value")2618if ( !support.attributes || !assert(function( div ) {2619div.innerHTML = "<input/>";2620div.firstChild.setAttribute( "value", "" );2621return div.firstChild.getAttribute( "value" ) === "";2622}) ) {2623addHandle( "value", function( elem, name, isXML ) {2624if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {2625return elem.defaultValue;2626}2627});2628}26292630// Support: IE<92631// Use getAttributeNode to fetch booleans when getAttribute lies2632if ( !assert(function( div ) {2633return div.getAttribute("disabled") == null;2634}) ) {2635addHandle( booleans, function( elem, name, isXML ) {2636var val;2637if ( !isXML ) {2638return elem[ name ] === true ? name.toLowerCase() :2639(val = elem.getAttributeNode( name )) && val.specified ?2640val.value :2641null;2642}2643});2644}26452646return Sizzle;26472648})( window );2649265026512652jQuery.find = Sizzle;2653jQuery.expr = Sizzle.selectors;2654jQuery.expr[":"] = jQuery.expr.pseudos;2655jQuery.unique = Sizzle.uniqueSort;2656jQuery.text = Sizzle.getText;2657jQuery.isXMLDoc = Sizzle.isXML;2658jQuery.contains = Sizzle.contains;2659266026612662var rneedsContext = jQuery.expr.match.needsContext;26632664var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);2665266626672668var risSimple = /^.[^:#\[\.,]*$/;26692670// Implement the identical functionality for filter and not2671function winnow( elements, qualifier, not ) {2672if ( jQuery.isFunction( qualifier ) ) {2673return jQuery.grep( elements, function( elem, i ) {2674/* jshint -W018 */2675return !!qualifier.call( elem, i, elem ) !== not;2676});26772678}26792680if ( qualifier.nodeType ) {2681return jQuery.grep( elements, function( elem ) {2682return ( elem === qualifier ) !== not;2683});26842685}26862687if ( typeof qualifier === "string" ) {2688if ( risSimple.test( qualifier ) ) {2689return jQuery.filter( qualifier, elements, not );2690}26912692qualifier = jQuery.filter( qualifier, elements );2693}26942695return jQuery.grep( elements, function( elem ) {2696return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;2697});2698}26992700jQuery.filter = function( expr, elems, not ) {2701var elem = elems[ 0 ];27022703if ( not ) {2704expr = ":not(" + expr + ")";2705}27062707return elems.length === 1 && elem.nodeType === 1 ?2708jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :2709jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {2710return elem.nodeType === 1;2711}));2712};27132714jQuery.fn.extend({2715find: function( selector ) {2716var i,2717ret = [],2718self = this,2719len = self.length;27202721if ( typeof selector !== "string" ) {2722return this.pushStack( jQuery( selector ).filter(function() {2723for ( i = 0; i < len; i++ ) {2724if ( jQuery.contains( self[ i ], this ) ) {2725return true;2726}2727}2728}) );2729}27302731for ( i = 0; i < len; i++ ) {2732jQuery.find( selector, self[ i ], ret );2733}27342735// Needed because $( selector, context ) becomes $( context ).find( selector )2736ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );2737ret.selector = this.selector ? this.selector + " " + selector : selector;2738return ret;2739},2740filter: function( selector ) {2741return this.pushStack( winnow(this, selector || [], false) );2742},2743not: function( selector ) {2744return this.pushStack( winnow(this, selector || [], true) );2745},2746is: function( selector ) {2747return !!winnow(2748this,27492750// If this is a positional/relative selector, check membership in the returned set2751// so $("p:first").is("p:last") won't return true for a doc with two "p".2752typeof selector === "string" && rneedsContext.test( selector ) ?2753jQuery( selector ) :2754selector || [],2755false2756).length;2757}2758});275927602761// Initialize a jQuery object276227632764// A central reference to the root jQuery(document)2765var rootjQuery,27662767// Use the correct document accordingly with window argument (sandbox)2768document = window.document,27692770// A simple way to check for HTML strings2771// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)2772// Strict HTML recognition (#11290: must start with <)2773rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,27742775init = jQuery.fn.init = function( selector, context ) {2776var match, elem;27772778// HANDLE: $(""), $(null), $(undefined), $(false)2779if ( !selector ) {2780return this;2781}27822783// Handle HTML strings2784if ( typeof selector === "string" ) {2785if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {2786// Assume that strings that start and end with <> are HTML and skip the regex check2787match = [ null, selector, null ];27882789} else {2790match = rquickExpr.exec( selector );2791}27922793// Match html or make sure no context is specified for #id2794if ( match && (match[1] || !context) ) {27952796// HANDLE: $(html) -> $(array)2797if ( match[1] ) {2798context = context instanceof jQuery ? context[0] : context;27992800// scripts is true for back-compat2801// Intentionally let the error be thrown if parseHTML is not present2802jQuery.merge( this, jQuery.parseHTML(2803match[1],2804context && context.nodeType ? context.ownerDocument || context : document,2805true2806) );28072808// HANDLE: $(html, props)2809if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {2810for ( match in context ) {2811// Properties of context are called as methods if possible2812if ( jQuery.isFunction( this[ match ] ) ) {2813this[ match ]( context[ match ] );28142815// ...and otherwise set as attributes2816} else {2817this.attr( match, context[ match ] );2818}2819}2820}28212822return this;28232824// HANDLE: $(#id)2825} else {2826elem = document.getElementById( match[2] );28272828// Check parentNode to catch when Blackberry 4.6 returns2829// nodes that are no longer in the document #69632830if ( elem && elem.parentNode ) {2831// Handle the case where IE and Opera return items2832// by name instead of ID2833if ( elem.id !== match[2] ) {2834return rootjQuery.find( selector );2835}28362837// Otherwise, we inject the element directly into the jQuery object2838this.length = 1;2839this[0] = elem;2840}28412842this.context = document;2843this.selector = selector;2844return this;2845}28462847// HANDLE: $(expr, $(...))2848} else if ( !context || context.jquery ) {2849return ( context || rootjQuery ).find( selector );28502851// HANDLE: $(expr, context)2852// (which is just equivalent to: $(context).find(expr)2853} else {2854return this.constructor( context ).find( selector );2855}28562857// HANDLE: $(DOMElement)2858} else if ( selector.nodeType ) {2859this.context = this[0] = selector;2860this.length = 1;2861return this;28622863// HANDLE: $(function)2864// Shortcut for document ready2865} else if ( jQuery.isFunction( selector ) ) {2866return typeof rootjQuery.ready !== "undefined" ?2867rootjQuery.ready( selector ) :2868// Execute immediately if ready is not present2869selector( jQuery );2870}28712872if ( selector.selector !== undefined ) {2873this.selector = selector.selector;2874this.context = selector.context;2875}28762877return jQuery.makeArray( selector, this );2878};28792880// Give the init function the jQuery prototype for later instantiation2881init.prototype = jQuery.fn;28822883// Initialize central reference2884rootjQuery = jQuery( document );288528862887var rparentsprev = /^(?:parents|prev(?:Until|All))/,2888// methods guaranteed to produce a unique set when starting from a unique set2889guaranteedUnique = {2890children: true,2891contents: true,2892next: true,2893prev: true2894};28952896jQuery.extend({2897dir: function( elem, dir, until ) {2898var matched = [],2899cur = elem[ dir ];29002901while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {2902if ( cur.nodeType === 1 ) {2903matched.push( cur );2904}2905cur = cur[dir];2906}2907return matched;2908},29092910sibling: function( n, elem ) {2911var r = [];29122913for ( ; n; n = n.nextSibling ) {2914if ( n.nodeType === 1 && n !== elem ) {2915r.push( n );2916}2917}29182919return r;2920}2921});29222923jQuery.fn.extend({2924has: function( target ) {2925var i,2926targets = jQuery( target, this ),2927len = targets.length;29282929return this.filter(function() {2930for ( i = 0; i < len; i++ ) {2931if ( jQuery.contains( this, targets[i] ) ) {2932return true;2933}2934}2935});2936},29372938closest: function( selectors, context ) {2939var cur,2940i = 0,2941l = this.length,2942matched = [],2943pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?2944jQuery( selectors, context || this.context ) :29450;29462947for ( ; i < l; i++ ) {2948for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {2949// Always skip document fragments2950if ( cur.nodeType < 11 && (pos ?2951pos.index(cur) > -1 :29522953// Don't pass non-elements to Sizzle2954cur.nodeType === 1 &&2955jQuery.find.matchesSelector(cur, selectors)) ) {29562957matched.push( cur );2958break;2959}2960}2961}29622963return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );2964},29652966// Determine the position of an element within2967// the matched set of elements2968index: function( elem ) {29692970// No argument, return index in parent2971if ( !elem ) {2972return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;2973}29742975// index in selector2976if ( typeof elem === "string" ) {2977return jQuery.inArray( this[0], jQuery( elem ) );2978}29792980// Locate the position of the desired element2981return jQuery.inArray(2982// If it receives a jQuery object, the first element is used2983elem.jquery ? elem[0] : elem, this );2984},29852986add: function( selector, context ) {2987return this.pushStack(2988jQuery.unique(2989jQuery.merge( this.get(), jQuery( selector, context ) )2990)2991);2992},29932994addBack: function( selector ) {2995return this.add( selector == null ?2996this.prevObject : this.prevObject.filter(selector)2997);2998}2999});30003001function sibling( cur, dir ) {3002do {3003cur = cur[ dir ];3004} while ( cur && cur.nodeType !== 1 );30053006return cur;3007}30083009jQuery.each({3010parent: function( elem ) {3011var parent = elem.parentNode;3012return parent && parent.nodeType !== 11 ? parent : null;3013},3014parents: function( elem ) {3015return jQuery.dir( elem, "parentNode" );3016},3017parentsUntil: function( elem, i, until ) {3018return jQuery.dir( elem, "parentNode", until );3019},3020next: function( elem ) {3021return sibling( elem, "nextSibling" );3022},3023prev: function( elem ) {3024return sibling( elem, "previousSibling" );3025},3026nextAll: function( elem ) {3027return jQuery.dir( elem, "nextSibling" );3028},3029prevAll: function( elem ) {3030return jQuery.dir( elem, "previousSibling" );3031},3032nextUntil: function( elem, i, until ) {3033return jQuery.dir( elem, "nextSibling", until );3034},3035prevUntil: function( elem, i, until ) {3036return jQuery.dir( elem, "previousSibling", until );3037},3038siblings: function( elem ) {3039return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );3040},3041children: function( elem ) {3042return jQuery.sibling( elem.firstChild );3043},3044contents: function( elem ) {3045return jQuery.nodeName( elem, "iframe" ) ?3046elem.contentDocument || elem.contentWindow.document :3047jQuery.merge( [], elem.childNodes );3048}3049}, function( name, fn ) {3050jQuery.fn[ name ] = function( until, selector ) {3051var ret = jQuery.map( this, fn, until );30523053if ( name.slice( -5 ) !== "Until" ) {3054selector = until;3055}30563057if ( selector && typeof selector === "string" ) {3058ret = jQuery.filter( selector, ret );3059}30603061if ( this.length > 1 ) {3062// Remove duplicates3063if ( !guaranteedUnique[ name ] ) {3064ret = jQuery.unique( ret );3065}30663067// Reverse order for parents* and prev-derivatives3068if ( rparentsprev.test( name ) ) {3069ret = ret.reverse();3070}3071}30723073return this.pushStack( ret );3074};3075});3076var rnotwhite = (/\S+/g);3077307830793080// String to Object options format cache3081var optionsCache = {};30823083// Convert String-formatted options into Object-formatted ones and store in cache3084function createOptions( options ) {3085var object = optionsCache[ options ] = {};3086jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {3087object[ flag ] = true;3088});3089return object;3090}30913092/*3093* Create a callback list using the following parameters:3094*3095* options: an optional list of space-separated options that will change how3096* the callback list behaves or a more traditional option object3097*3098* By default a callback list will act like an event callback list and can be3099* "fired" multiple times.3100*3101* Possible options:3102*3103* once: will ensure the callback list can only be fired once (like a Deferred)3104*3105* memory: will keep track of previous values and will call any callback added3106* after the list has been fired right away with the latest "memorized"3107* values (like a Deferred)3108*3109* unique: will ensure a callback can only be added once (no duplicate in the list)3110*3111* stopOnFalse: interrupt callings when a callback returns false3112*3113*/3114jQuery.Callbacks = function( options ) {31153116// Convert options from String-formatted to Object-formatted if needed3117// (we check in cache first)3118options = typeof options === "string" ?3119( optionsCache[ options ] || createOptions( options ) ) :3120jQuery.extend( {}, options );31213122var // Flag to know if list is currently firing3123firing,3124// Last fire value (for non-forgettable lists)3125memory,3126// Flag to know if list was already fired3127fired,3128// End of the loop when firing3129firingLength,3130// Index of currently firing callback (modified by remove if needed)3131firingIndex,3132// First callback to fire (used internally by add and fireWith)3133firingStart,3134// Actual callback list3135list = [],3136// Stack of fire calls for repeatable lists3137stack = !options.once && [],3138// Fire callbacks3139fire = function( data ) {3140memory = options.memory && data;3141fired = true;3142firingIndex = firingStart || 0;3143firingStart = 0;3144firingLength = list.length;3145firing = true;3146for ( ; list && firingIndex < firingLength; firingIndex++ ) {3147if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {3148memory = false; // To prevent further calls using add3149break;3150}3151}3152firing = false;3153if ( list ) {3154if ( stack ) {3155if ( stack.length ) {3156fire( stack.shift() );3157}3158} else if ( memory ) {3159list = [];3160} else {3161self.disable();3162}3163}3164},3165// Actual Callbacks object3166self = {3167// Add a callback or a collection of callbacks to the list3168add: function() {3169if ( list ) {3170// First, we save the current length3171var start = list.length;3172(function add( args ) {3173jQuery.each( args, function( _, arg ) {3174var type = jQuery.type( arg );3175if ( type === "function" ) {3176if ( !options.unique || !self.has( arg ) ) {3177list.push( arg );3178}3179} else if ( arg && arg.length && type !== "string" ) {3180// Inspect recursively3181add( arg );3182}3183});3184})( arguments );3185// Do we need to add the callbacks to the3186// current firing batch?3187if ( firing ) {3188firingLength = list.length;3189// With memory, if we're not firing then3190// we should call right away3191} else if ( memory ) {3192firingStart = start;3193fire( memory );3194}3195}3196return this;3197},3198// Remove a callback from the list3199remove: function() {3200if ( list ) {3201jQuery.each( arguments, function( _, arg ) {3202var index;3203while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {3204list.splice( index, 1 );3205// Handle firing indexes3206if ( firing ) {3207if ( index <= firingLength ) {3208firingLength--;3209}3210if ( index <= firingIndex ) {3211firingIndex--;3212}3213}3214}3215});3216}3217return this;3218},3219// Check if a given callback is in the list.3220// If no argument is given, return whether or not list has callbacks attached.3221has: function( fn ) {3222return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );3223},3224// Remove all callbacks from the list3225empty: function() {3226list = [];3227firingLength = 0;3228return this;3229},3230// Have the list do nothing anymore3231disable: function() {3232list = stack = memory = undefined;3233return this;3234},3235// Is it disabled?3236disabled: function() {3237return !list;3238},3239// Lock the list in its current state3240lock: function() {3241stack = undefined;3242if ( !memory ) {3243self.disable();3244}3245return this;3246},3247// Is it locked?3248locked: function() {3249return !stack;3250},3251// Call all callbacks with the given context and arguments3252fireWith: function( context, args ) {3253if ( list && ( !fired || stack ) ) {3254args = args || [];3255args = [ context, args.slice ? args.slice() : args ];3256if ( firing ) {3257stack.push( args );3258} else {3259fire( args );3260}3261}3262return this;3263},3264// Call all the callbacks with the given arguments3265fire: function() {3266self.fireWith( this, arguments );3267return this;3268},3269// To know if the callbacks have already been called at least once3270fired: function() {3271return !!fired;3272}3273};32743275return self;3276};327732783279jQuery.extend({32803281Deferred: function( func ) {3282var tuples = [3283// action, add listener, listener list, final state3284[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],3285[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],3286[ "notify", "progress", jQuery.Callbacks("memory") ]3287],3288state = "pending",3289promise = {3290state: function() {3291return state;3292},3293always: function() {3294deferred.done( arguments ).fail( arguments );3295return this;3296},3297then: function( /* fnDone, fnFail, fnProgress */ ) {3298var fns = arguments;3299return jQuery.Deferred(function( newDefer ) {3300jQuery.each( tuples, function( i, tuple ) {3301var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];3302// deferred[ done | fail | progress ] for forwarding actions to newDefer3303deferred[ tuple[1] ](function() {3304var returned = fn && fn.apply( this, arguments );3305if ( returned && jQuery.isFunction( returned.promise ) ) {3306returned.promise()3307.done( newDefer.resolve )3308.fail( newDefer.reject )3309.progress( newDefer.notify );3310} else {3311newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );3312}3313});3314});3315fns = null;3316}).promise();3317},3318// Get a promise for this deferred3319// If obj is provided, the promise aspect is added to the object3320promise: function( obj ) {3321return obj != null ? jQuery.extend( obj, promise ) : promise;3322}3323},3324deferred = {};33253326// Keep pipe for back-compat3327promise.pipe = promise.then;33283329// Add list-specific methods3330jQuery.each( tuples, function( i, tuple ) {3331var list = tuple[ 2 ],3332stateString = tuple[ 3 ];33333334// promise[ done | fail | progress ] = list.add3335promise[ tuple[1] ] = list.add;33363337// Handle state3338if ( stateString ) {3339list.add(function() {3340// state = [ resolved | rejected ]3341state = stateString;33423343// [ reject_list | resolve_list ].disable; progress_list.lock3344}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );3345}33463347// deferred[ resolve | reject | notify ]3348deferred[ tuple[0] ] = function() {3349deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );3350return this;3351};3352deferred[ tuple[0] + "With" ] = list.fireWith;3353});33543355// Make the deferred a promise3356promise.promise( deferred );33573358// Call given func if any3359if ( func ) {3360func.call( deferred, deferred );3361}33623363// All done!3364return deferred;3365},33663367// Deferred helper3368when: function( subordinate /* , ..., subordinateN */ ) {3369var i = 0,3370resolveValues = slice.call( arguments ),3371length = resolveValues.length,33723373// the count of uncompleted subordinates3374remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,33753376// the master Deferred. If resolveValues consist of only a single Deferred, just use that.3377deferred = remaining === 1 ? subordinate : jQuery.Deferred(),33783379// Update function for both resolve and progress values3380updateFunc = function( i, contexts, values ) {3381return function( value ) {3382contexts[ i ] = this;3383values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;3384if ( values === progressValues ) {3385deferred.notifyWith( contexts, values );33863387} else if ( !(--remaining) ) {3388deferred.resolveWith( contexts, values );3389}3390};3391},33923393progressValues, progressContexts, resolveContexts;33943395// add listeners to Deferred subordinates; treat others as resolved3396if ( length > 1 ) {3397progressValues = new Array( length );3398progressContexts = new Array( length );3399resolveContexts = new Array( length );3400for ( ; i < length; i++ ) {3401if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {3402resolveValues[ i ].promise()3403.done( updateFunc( i, resolveContexts, resolveValues ) )3404.fail( deferred.reject )3405.progress( updateFunc( i, progressContexts, progressValues ) );3406} else {3407--remaining;3408}3409}3410}34113412// if we're not waiting on anything, resolve the master3413if ( !remaining ) {3414deferred.resolveWith( resolveContexts, resolveValues );3415}34163417return deferred.promise();3418}3419});342034213422// The deferred used on DOM ready3423var readyList;34243425jQuery.fn.ready = function( fn ) {3426// Add the callback3427jQuery.ready.promise().done( fn );34283429return this;3430};34313432jQuery.extend({3433// Is the DOM ready to be used? Set to true once it occurs.3434isReady: false,34353436// A counter to track how many items to wait for before3437// the ready event fires. See #67813438readyWait: 1,34393440// Hold (or release) the ready event3441holdReady: function( hold ) {3442if ( hold ) {3443jQuery.readyWait++;3444} else {3445jQuery.ready( true );3446}3447},34483449// Handle when the DOM is ready3450ready: function( wait ) {34513452// Abort if there are pending holds or we're already ready3453if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {3454return;3455}34563457// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).3458if ( !document.body ) {3459return setTimeout( jQuery.ready );3460}34613462// Remember that the DOM is ready3463jQuery.isReady = true;34643465// If a normal DOM Ready event fired, decrement, and wait if need be3466if ( wait !== true && --jQuery.readyWait > 0 ) {3467return;3468}34693470// If there are functions bound, to execute3471readyList.resolveWith( document, [ jQuery ] );34723473// Trigger any bound ready events3474if ( jQuery.fn.triggerHandler ) {3475jQuery( document ).triggerHandler( "ready" );3476jQuery( document ).off( "ready" );3477}3478}3479});34803481/**3482* Clean-up method for dom ready events3483*/3484function detach() {3485if ( document.addEventListener ) {3486document.removeEventListener( "DOMContentLoaded", completed, false );3487window.removeEventListener( "load", completed, false );34883489} else {3490document.detachEvent( "onreadystatechange", completed );3491window.detachEvent( "onload", completed );3492}3493}34943495/**3496* The ready event handler and self cleanup method3497*/3498function completed() {3499// readyState === "complete" is good enough for us to call the dom ready in oldIE3500if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {3501detach();3502jQuery.ready();3503}3504}35053506jQuery.ready.promise = function( obj ) {3507if ( !readyList ) {35083509readyList = jQuery.Deferred();35103511// Catch cases where $(document).ready() is called after the browser event has already occurred.3512// we once tried to use readyState "interactive" here, but it caused issues like the one3513// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:153514if ( document.readyState === "complete" ) {3515// Handle it asynchronously to allow scripts the opportunity to delay ready3516setTimeout( jQuery.ready );35173518// Standards-based browsers support DOMContentLoaded3519} else if ( document.addEventListener ) {3520// Use the handy event callback3521document.addEventListener( "DOMContentLoaded", completed, false );35223523// A fallback to window.onload, that will always work3524window.addEventListener( "load", completed, false );35253526// If IE event model is used3527} else {3528// Ensure firing before onload, maybe late but safe also for iframes3529document.attachEvent( "onreadystatechange", completed );35303531// A fallback to window.onload, that will always work3532window.attachEvent( "onload", completed );35333534// If IE and not a frame3535// continually check to see if the document is ready3536var top = false;35373538try {3539top = window.frameElement == null && document.documentElement;3540} catch(e) {}35413542if ( top && top.doScroll ) {3543(function doScrollCheck() {3544if ( !jQuery.isReady ) {35453546try {3547// Use the trick by Diego Perini3548// http://javascript.nwbox.com/IEContentLoaded/3549top.doScroll("left");3550} catch(e) {3551return setTimeout( doScrollCheck, 50 );3552}35533554// detach all dom ready events3555detach();35563557// and execute any waiting functions3558jQuery.ready();3559}3560})();3561}3562}3563}3564return readyList.promise( obj );3565};356635673568var strundefined = typeof undefined;3569357035713572// Support: IE<93573// Iteration over object's inherited properties before its own3574var i;3575for ( i in jQuery( support ) ) {3576break;3577}3578support.ownLast = i !== "0";35793580// Note: most support tests are defined in their respective modules.3581// false until the test is run3582support.inlineBlockNeedsLayout = false;35833584// Execute ASAP in case we need to set body.style.zoom3585jQuery(function() {3586// Minified: var a,b,c,d3587var val, div, body, container;35883589body = document.getElementsByTagName( "body" )[ 0 ];3590if ( !body || !body.style ) {3591// Return for frameset docs that don't have a body3592return;3593}35943595// Setup3596div = document.createElement( "div" );3597container = document.createElement( "div" );3598container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";3599body.appendChild( container ).appendChild( div );36003601if ( typeof div.style.zoom !== strundefined ) {3602// Support: IE<83603// Check if natively block-level elements act like inline-block3604// elements when setting their display to 'inline' and giving3605// them layout3606div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";36073608support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;3609if ( val ) {3610// Prevent IE 6 from affecting layout for positioned elements #110483611// Prevent IE from shrinking the body in IE 7 mode #128693612// Support: IE<83613body.style.zoom = 1;3614}3615}36163617body.removeChild( container );3618});36193620362136223623(function() {3624var div = document.createElement( "div" );36253626// Execute the test only if not already executed in another module.3627if (support.deleteExpando == null) {3628// Support: IE<93629support.deleteExpando = true;3630try {3631delete div.test;3632} catch( e ) {3633support.deleteExpando = false;3634}3635}36363637// Null elements to avoid leaks in IE.3638div = null;3639})();364036413642/**3643* Determines whether an object can have data3644*/3645jQuery.acceptData = function( elem ) {3646var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],3647nodeType = +elem.nodeType || 1;36483649// Do not set data on non-element DOM nodes because it will not be cleared (#8335).3650return nodeType !== 1 && nodeType !== 9 ?3651false :36523653// Nodes accept data unless otherwise specified; rejection can be conditional3654!noData || noData !== true && elem.getAttribute("classid") === noData;3655};365636573658var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,3659rmultiDash = /([A-Z])/g;36603661function dataAttr( elem, key, data ) {3662// If nothing was found internally, try to fetch any3663// data from the HTML5 data-* attribute3664if ( data === undefined && elem.nodeType === 1 ) {36653666var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();36673668data = elem.getAttribute( name );36693670if ( typeof data === "string" ) {3671try {3672data = data === "true" ? true :3673data === "false" ? false :3674data === "null" ? null :3675// Only convert to a number if it doesn't change the string3676+data + "" === data ? +data :3677rbrace.test( data ) ? jQuery.parseJSON( data ) :3678data;3679} catch( e ) {}36803681// Make sure we set the data so it isn't changed later3682jQuery.data( elem, key, data );36833684} else {3685data = undefined;3686}3687}36883689return data;3690}36913692// checks a cache object for emptiness3693function isEmptyDataObject( obj ) {3694var name;3695for ( name in obj ) {36963697// if the public data object is empty, the private is still empty3698if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {3699continue;3700}3701if ( name !== "toJSON" ) {3702return false;3703}3704}37053706return true;3707}37083709function internalData( elem, name, data, pvt /* Internal Use Only */ ) {3710if ( !jQuery.acceptData( elem ) ) {3711return;3712}37133714var ret, thisCache,3715internalKey = jQuery.expando,37163717// We have to handle DOM nodes and JS objects differently because IE6-73718// can't GC object references properly across the DOM-JS boundary3719isNode = elem.nodeType,37203721// Only DOM nodes need the global jQuery cache; JS object data is3722// attached directly to the object so GC can occur automatically3723cache = isNode ? jQuery.cache : elem,37243725// Only defining an ID for JS objects if its cache already exists allows3726// the code to shortcut on the same path as a DOM node with no cache3727id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;37283729// Avoid doing any more work than we need to when trying to get data on an3730// object that has no data at all3731if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {3732return;3733}37343735if ( !id ) {3736// Only DOM nodes need a new unique ID for each element since their data3737// ends up in the global cache3738if ( isNode ) {3739id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;3740} else {3741id = internalKey;3742}3743}37443745if ( !cache[ id ] ) {3746// Avoid exposing jQuery metadata on plain JS objects when the object3747// is serialized using JSON.stringify3748cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };3749}37503751// An object can be passed to jQuery.data instead of a key/value pair; this gets3752// shallow copied over onto the existing cache3753if ( typeof name === "object" || typeof name === "function" ) {3754if ( pvt ) {3755cache[ id ] = jQuery.extend( cache[ id ], name );3756} else {3757cache[ id ].data = jQuery.extend( cache[ id ].data, name );3758}3759}37603761thisCache = cache[ id ];37623763// jQuery data() is stored in a separate object inside the object's internal data3764// cache in order to avoid key collisions between internal data and user-defined3765// data.3766if ( !pvt ) {3767if ( !thisCache.data ) {3768thisCache.data = {};3769}37703771thisCache = thisCache.data;3772}37733774if ( data !== undefined ) {3775thisCache[ jQuery.camelCase( name ) ] = data;3776}37773778// Check for both converted-to-camel and non-converted data property names3779// If a data property was specified3780if ( typeof name === "string" ) {37813782// First Try to find as-is property data3783ret = thisCache[ name ];37843785// Test for null|undefined property data3786if ( ret == null ) {37873788// Try to find the camelCased property3789ret = thisCache[ jQuery.camelCase( name ) ];3790}3791} else {3792ret = thisCache;3793}37943795return ret;3796}37973798function internalRemoveData( elem, name, pvt ) {3799if ( !jQuery.acceptData( elem ) ) {3800return;3801}38023803var thisCache, i,3804isNode = elem.nodeType,38053806// See jQuery.data for more information3807cache = isNode ? jQuery.cache : elem,3808id = isNode ? elem[ jQuery.expando ] : jQuery.expando;38093810// If there is already no cache entry for this object, there is no3811// purpose in continuing3812if ( !cache[ id ] ) {3813return;3814}38153816if ( name ) {38173818thisCache = pvt ? cache[ id ] : cache[ id ].data;38193820if ( thisCache ) {38213822// Support array or space separated string names for data keys3823if ( !jQuery.isArray( name ) ) {38243825// try the string as a key before any manipulation3826if ( name in thisCache ) {3827name = [ name ];3828} else {38293830// split the camel cased version by spaces unless a key with the spaces exists3831name = jQuery.camelCase( name );3832if ( name in thisCache ) {3833name = [ name ];3834} else {3835name = name.split(" ");3836}3837}3838} else {3839// If "name" is an array of keys...3840// When data is initially created, via ("key", "val") signature,3841// keys will be converted to camelCase.3842// Since there is no way to tell _how_ a key was added, remove3843// both plain key and camelCase key. #127863844// This will only penalize the array argument path.3845name = name.concat( jQuery.map( name, jQuery.camelCase ) );3846}38473848i = name.length;3849while ( i-- ) {3850delete thisCache[ name[i] ];3851}38523853// If there is no data left in the cache, we want to continue3854// and let the cache object itself get destroyed3855if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {3856return;3857}3858}3859}38603861// See jQuery.data for more information3862if ( !pvt ) {3863delete cache[ id ].data;38643865// Don't destroy the parent cache unless the internal data object3866// had been the only thing left in it3867if ( !isEmptyDataObject( cache[ id ] ) ) {3868return;3869}3870}38713872// Destroy the cache3873if ( isNode ) {3874jQuery.cleanData( [ elem ], true );38753876// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)3877/* jshint eqeqeq: false */3878} else if ( support.deleteExpando || cache != cache.window ) {3879/* jshint eqeqeq: true */3880delete cache[ id ];38813882// When all else fails, null3883} else {3884cache[ id ] = null;3885}3886}38873888jQuery.extend({3889cache: {},38903891// The following elements (space-suffixed to avoid Object.prototype collisions)3892// throw uncatchable exceptions if you attempt to set expando properties3893noData: {3894"applet ": true,3895"embed ": true,3896// ...but Flash objects (which have this classid) *can* handle expandos3897"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"3898},38993900hasData: function( elem ) {3901elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];3902return !!elem && !isEmptyDataObject( elem );3903},39043905data: function( elem, name, data ) {3906return internalData( elem, name, data );3907},39083909removeData: function( elem, name ) {3910return internalRemoveData( elem, name );3911},39123913// For internal use only.3914_data: function( elem, name, data ) {3915return internalData( elem, name, data, true );3916},39173918_removeData: function( elem, name ) {3919return internalRemoveData( elem, name, true );3920}3921});39223923jQuery.fn.extend({3924data: function( key, value ) {3925var i, name, data,3926elem = this[0],3927attrs = elem && elem.attributes;39283929// Special expections of .data basically thwart jQuery.access,3930// so implement the relevant behavior ourselves39313932// Gets all values3933if ( key === undefined ) {3934if ( this.length ) {3935data = jQuery.data( elem );39363937if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {3938i = attrs.length;3939while ( i-- ) {39403941// Support: IE11+3942// The attrs elements can be null (#14894)3943if ( attrs[ i ] ) {3944name = attrs[ i ].name;3945if ( name.indexOf( "data-" ) === 0 ) {3946name = jQuery.camelCase( name.slice(5) );3947dataAttr( elem, name, data[ name ] );3948}3949}3950}3951jQuery._data( elem, "parsedAttrs", true );3952}3953}39543955return data;3956}39573958// Sets multiple values3959if ( typeof key === "object" ) {3960return this.each(function() {3961jQuery.data( this, key );3962});3963}39643965return arguments.length > 1 ?39663967// Sets one value3968this.each(function() {3969jQuery.data( this, key, value );3970}) :39713972// Gets one value3973// Try to fetch any internally stored data first3974elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;3975},39763977removeData: function( key ) {3978return this.each(function() {3979jQuery.removeData( this, key );3980});3981}3982});398339843985jQuery.extend({3986queue: function( elem, type, data ) {3987var queue;39883989if ( elem ) {3990type = ( type || "fx" ) + "queue";3991queue = jQuery._data( elem, type );39923993// Speed up dequeue by getting out quickly if this is just a lookup3994if ( data ) {3995if ( !queue || jQuery.isArray(data) ) {3996queue = jQuery._data( elem, type, jQuery.makeArray(data) );3997} else {3998queue.push( data );3999}4000}4001return queue || [];4002}4003},40044005dequeue: function( elem, type ) {4006type = type || "fx";40074008var queue = jQuery.queue( elem, type ),4009startLength = queue.length,4010fn = queue.shift(),4011hooks = jQuery._queueHooks( elem, type ),4012next = function() {4013jQuery.dequeue( elem, type );4014};40154016// If the fx queue is dequeued, always remove the progress sentinel4017if ( fn === "inprogress" ) {4018fn = queue.shift();4019startLength--;4020}40214022if ( fn ) {40234024// Add a progress sentinel to prevent the fx queue from being4025// automatically dequeued4026if ( type === "fx" ) {4027queue.unshift( "inprogress" );4028}40294030// clear up the last queue stop function4031delete hooks.stop;4032fn.call( elem, next, hooks );4033}40344035if ( !startLength && hooks ) {4036hooks.empty.fire();4037}4038},40394040// not intended for public consumption - generates a queueHooks object, or returns the current one4041_queueHooks: function( elem, type ) {4042var key = type + "queueHooks";4043return jQuery._data( elem, key ) || jQuery._data( elem, key, {4044empty: jQuery.Callbacks("once memory").add(function() {4045jQuery._removeData( elem, type + "queue" );4046jQuery._removeData( elem, key );4047})4048});4049}4050});40514052jQuery.fn.extend({4053queue: function( type, data ) {4054var setter = 2;40554056if ( typeof type !== "string" ) {4057data = type;4058type = "fx";4059setter--;4060}40614062if ( arguments.length < setter ) {4063return jQuery.queue( this[0], type );4064}40654066return data === undefined ?4067this :4068this.each(function() {4069var queue = jQuery.queue( this, type, data );40704071// ensure a hooks for this queue4072jQuery._queueHooks( this, type );40734074if ( type === "fx" && queue[0] !== "inprogress" ) {4075jQuery.dequeue( this, type );4076}4077});4078},4079dequeue: function( type ) {4080return this.each(function() {4081jQuery.dequeue( this, type );4082});4083},4084clearQueue: function( type ) {4085return this.queue( type || "fx", [] );4086},4087// Get a promise resolved when queues of a certain type4088// are emptied (fx is the type by default)4089promise: function( type, obj ) {4090var tmp,4091count = 1,4092defer = jQuery.Deferred(),4093elements = this,4094i = this.length,4095resolve = function() {4096if ( !( --count ) ) {4097defer.resolveWith( elements, [ elements ] );4098}4099};41004101if ( typeof type !== "string" ) {4102obj = type;4103type = undefined;4104}4105type = type || "fx";41064107while ( i-- ) {4108tmp = jQuery._data( elements[ i ], type + "queueHooks" );4109if ( tmp && tmp.empty ) {4110count++;4111tmp.empty.add( resolve );4112}4113}4114resolve();4115return defer.promise( obj );4116}4117});4118var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;41194120var cssExpand = [ "Top", "Right", "Bottom", "Left" ];41214122var isHidden = function( elem, el ) {4123// isHidden might be called from jQuery#filter function;4124// in that case, element will be second argument4125elem = el || elem;4126return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );4127};4128412941304131// Multifunctional method to get and set values of a collection4132// The value/s can optionally be executed if it's a function4133var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {4134var i = 0,4135length = elems.length,4136bulk = key == null;41374138// Sets many values4139if ( jQuery.type( key ) === "object" ) {4140chainable = true;4141for ( i in key ) {4142jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );4143}41444145// Sets one value4146} else if ( value !== undefined ) {4147chainable = true;41484149if ( !jQuery.isFunction( value ) ) {4150raw = true;4151}41524153if ( bulk ) {4154// Bulk operations run against the entire set4155if ( raw ) {4156fn.call( elems, value );4157fn = null;41584159// ...except when executing function values4160} else {4161bulk = fn;4162fn = function( elem, key, value ) {4163return bulk.call( jQuery( elem ), value );4164};4165}4166}41674168if ( fn ) {4169for ( ; i < length; i++ ) {4170fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );4171}4172}4173}41744175return chainable ?4176elems :41774178// Gets4179bulk ?4180fn.call( elems ) :4181length ? fn( elems[0], key ) : emptyGet;4182};4183var rcheckableType = (/^(?:checkbox|radio)$/i);4184418541864187(function() {4188// Minified: var a,b,c4189var input = document.createElement( "input" ),4190div = document.createElement( "div" ),4191fragment = document.createDocumentFragment();41924193// Setup4194div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";41954196// IE strips leading whitespace when .innerHTML is used4197support.leadingWhitespace = div.firstChild.nodeType === 3;41984199// Make sure that tbody elements aren't automatically inserted4200// IE will insert them into empty tables4201support.tbody = !div.getElementsByTagName( "tbody" ).length;42024203// Make sure that link elements get serialized correctly by innerHTML4204// This requires a wrapper element in IE4205support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;42064207// Makes sure cloning an html5 element does not cause problems4208// Where outerHTML is undefined, this still works4209support.html5Clone =4210document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";42114212// Check if a disconnected checkbox will retain its checked4213// value of true after appended to the DOM (IE6/7)4214input.type = "checkbox";4215input.checked = true;4216fragment.appendChild( input );4217support.appendChecked = input.checked;42184219// Make sure textarea (and checkbox) defaultValue is properly cloned4220// Support: IE6-IE11+4221div.innerHTML = "<textarea>x</textarea>";4222support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;42234224// #11217 - WebKit loses check when the name is after the checked attribute4225fragment.appendChild( div );4226div.innerHTML = "<input type='radio' checked='checked' name='t'/>";42274228// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.34229// old WebKit doesn't clone checked state correctly in fragments4230support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;42314232// Support: IE<94233// Opera does not clone events (and typeof div.attachEvent === undefined).4234// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()4235support.noCloneEvent = true;4236if ( div.attachEvent ) {4237div.attachEvent( "onclick", function() {4238support.noCloneEvent = false;4239});42404241div.cloneNode( true ).click();4242}42434244// Execute the test only if not already executed in another module.4245if (support.deleteExpando == null) {4246// Support: IE<94247support.deleteExpando = true;4248try {4249delete div.test;4250} catch( e ) {4251support.deleteExpando = false;4252}4253}4254})();425542564257(function() {4258var i, eventName,4259div = document.createElement( "div" );42604261// Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)4262for ( i in { submit: true, change: true, focusin: true }) {4263eventName = "on" + i;42644265if ( !(support[ i + "Bubbles" ] = eventName in window) ) {4266// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)4267div.setAttribute( eventName, "t" );4268support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;4269}4270}42714272// Null elements to avoid leaks in IE.4273div = null;4274})();427542764277var rformElems = /^(?:input|select|textarea)$/i,4278rkeyEvent = /^key/,4279rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,4280rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,4281rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;42824283function returnTrue() {4284return true;4285}42864287function returnFalse() {4288return false;4289}42904291function safeActiveElement() {4292try {4293return document.activeElement;4294} catch ( err ) { }4295}42964297/*4298* Helper functions for managing events -- not part of the public interface.4299* Props to Dean Edwards' addEvent library for many of the ideas.4300*/4301jQuery.event = {43024303global: {},43044305add: function( elem, types, handler, data, selector ) {4306var tmp, events, t, handleObjIn,4307special, eventHandle, handleObj,4308handlers, type, namespaces, origType,4309elemData = jQuery._data( elem );43104311// Don't attach events to noData or text/comment nodes (but allow plain objects)4312if ( !elemData ) {4313return;4314}43154316// Caller can pass in an object of custom data in lieu of the handler4317if ( handler.handler ) {4318handleObjIn = handler;4319handler = handleObjIn.handler;4320selector = handleObjIn.selector;4321}43224323// Make sure that the handler has a unique ID, used to find/remove it later4324if ( !handler.guid ) {4325handler.guid = jQuery.guid++;4326}43274328// Init the element's event structure and main handler, if this is the first4329if ( !(events = elemData.events) ) {4330events = elemData.events = {};4331}4332if ( !(eventHandle = elemData.handle) ) {4333eventHandle = elemData.handle = function( e ) {4334// Discard the second event of a jQuery.event.trigger() and4335// when an event is called after a page has unloaded4336return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?4337jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :4338undefined;4339};4340// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events4341eventHandle.elem = elem;4342}43434344// Handle multiple events separated by a space4345types = ( types || "" ).match( rnotwhite ) || [ "" ];4346t = types.length;4347while ( t-- ) {4348tmp = rtypenamespace.exec( types[t] ) || [];4349type = origType = tmp[1];4350namespaces = ( tmp[2] || "" ).split( "." ).sort();43514352// There *must* be a type, no attaching namespace-only handlers4353if ( !type ) {4354continue;4355}43564357// If event changes its type, use the special event handlers for the changed type4358special = jQuery.event.special[ type ] || {};43594360// If selector defined, determine special event api type, otherwise given type4361type = ( selector ? special.delegateType : special.bindType ) || type;43624363// Update special based on newly reset type4364special = jQuery.event.special[ type ] || {};43654366// handleObj is passed to all event handlers4367handleObj = jQuery.extend({4368type: type,4369origType: origType,4370data: data,4371handler: handler,4372guid: handler.guid,4373selector: selector,4374needsContext: selector && jQuery.expr.match.needsContext.test( selector ),4375namespace: namespaces.join(".")4376}, handleObjIn );43774378// Init the event handler queue if we're the first4379if ( !(handlers = events[ type ]) ) {4380handlers = events[ type ] = [];4381handlers.delegateCount = 0;43824383// Only use addEventListener/attachEvent if the special events handler returns false4384if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {4385// Bind the global event handler to the element4386if ( elem.addEventListener ) {4387elem.addEventListener( type, eventHandle, false );43884389} else if ( elem.attachEvent ) {4390elem.attachEvent( "on" + type, eventHandle );4391}4392}4393}43944395if ( special.add ) {4396special.add.call( elem, handleObj );43974398if ( !handleObj.handler.guid ) {4399handleObj.handler.guid = handler.guid;4400}4401}44024403// Add to the element's handler list, delegates in front4404if ( selector ) {4405handlers.splice( handlers.delegateCount++, 0, handleObj );4406} else {4407handlers.push( handleObj );4408}44094410// Keep track of which events have ever been used, for event optimization4411jQuery.event.global[ type ] = true;4412}44134414// Nullify elem to prevent memory leaks in IE4415elem = null;4416},44174418// Detach an event or set of events from an element4419remove: function( elem, types, handler, selector, mappedTypes ) {4420var j, handleObj, tmp,4421origCount, t, events,4422special, handlers, type,4423namespaces, origType,4424elemData = jQuery.hasData( elem ) && jQuery._data( elem );44254426if ( !elemData || !(events = elemData.events) ) {4427return;4428}44294430// Once for each type.namespace in types; type may be omitted4431types = ( types || "" ).match( rnotwhite ) || [ "" ];4432t = types.length;4433while ( t-- ) {4434tmp = rtypenamespace.exec( types[t] ) || [];4435type = origType = tmp[1];4436namespaces = ( tmp[2] || "" ).split( "." ).sort();44374438// Unbind all events (on this namespace, if provided) for the element4439if ( !type ) {4440for ( type in events ) {4441jQuery.event.remove( elem, type + types[ t ], handler, selector, true );4442}4443continue;4444}44454446special = jQuery.event.special[ type ] || {};4447type = ( selector ? special.delegateType : special.bindType ) || type;4448handlers = events[ type ] || [];4449tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );44504451// Remove matching events4452origCount = j = handlers.length;4453while ( j-- ) {4454handleObj = handlers[ j ];44554456if ( ( mappedTypes || origType === handleObj.origType ) &&4457( !handler || handler.guid === handleObj.guid ) &&4458( !tmp || tmp.test( handleObj.namespace ) ) &&4459( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {4460handlers.splice( j, 1 );44614462if ( handleObj.selector ) {4463handlers.delegateCount--;4464}4465if ( special.remove ) {4466special.remove.call( elem, handleObj );4467}4468}4469}44704471// Remove generic event handler if we removed something and no more handlers exist4472// (avoids potential for endless recursion during removal of special event handlers)4473if ( origCount && !handlers.length ) {4474if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {4475jQuery.removeEvent( elem, type, elemData.handle );4476}44774478delete events[ type ];4479}4480}44814482// Remove the expando if it's no longer used4483if ( jQuery.isEmptyObject( events ) ) {4484delete elemData.handle;44854486// removeData also checks for emptiness and clears the expando if empty4487// so use it instead of delete4488jQuery._removeData( elem, "events" );4489}4490},44914492trigger: function( event, data, elem, onlyHandlers ) {4493var handle, ontype, cur,4494bubbleType, special, tmp, i,4495eventPath = [ elem || document ],4496type = hasOwn.call( event, "type" ) ? event.type : event,4497namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];44984499cur = tmp = elem = elem || document;45004501// Don't do events on text and comment nodes4502if ( elem.nodeType === 3 || elem.nodeType === 8 ) {4503return;4504}45054506// focus/blur morphs to focusin/out; ensure we're not firing them right now4507if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {4508return;4509}45104511if ( type.indexOf(".") >= 0 ) {4512// Namespaced trigger; create a regexp to match event type in handle()4513namespaces = type.split(".");4514type = namespaces.shift();4515namespaces.sort();4516}4517ontype = type.indexOf(":") < 0 && "on" + type;45184519// Caller can pass in a jQuery.Event object, Object, or just an event type string4520event = event[ jQuery.expando ] ?4521event :4522new jQuery.Event( type, typeof event === "object" && event );45234524// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)4525event.isTrigger = onlyHandlers ? 2 : 3;4526event.namespace = namespaces.join(".");4527event.namespace_re = event.namespace ?4528new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :4529null;45304531// Clean up the event in case it is being reused4532event.result = undefined;4533if ( !event.target ) {4534event.target = elem;4535}45364537// Clone any incoming data and prepend the event, creating the handler arg list4538data = data == null ?4539[ event ] :4540jQuery.makeArray( data, [ event ] );45414542// Allow special events to draw outside the lines4543special = jQuery.event.special[ type ] || {};4544if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {4545return;4546}45474548// Determine event propagation path in advance, per W3C events spec (#9951)4549// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)4550if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {45514552bubbleType = special.delegateType || type;4553if ( !rfocusMorph.test( bubbleType + type ) ) {4554cur = cur.parentNode;4555}4556for ( ; cur; cur = cur.parentNode ) {4557eventPath.push( cur );4558tmp = cur;4559}45604561// Only add window if we got to document (e.g., not plain obj or detached DOM)4562if ( tmp === (elem.ownerDocument || document) ) {4563eventPath.push( tmp.defaultView || tmp.parentWindow || window );4564}4565}45664567// Fire handlers on the event path4568i = 0;4569while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {45704571event.type = i > 1 ?4572bubbleType :4573special.bindType || type;45744575// jQuery handler4576handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );4577if ( handle ) {4578handle.apply( cur, data );4579}45804581// Native handler4582handle = ontype && cur[ ontype ];4583if ( handle && handle.apply && jQuery.acceptData( cur ) ) {4584event.result = handle.apply( cur, data );4585if ( event.result === false ) {4586event.preventDefault();4587}4588}4589}4590event.type = type;45914592// If nobody prevented the default action, do it now4593if ( !onlyHandlers && !event.isDefaultPrevented() ) {45944595if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&4596jQuery.acceptData( elem ) ) {45974598// Call a native DOM method on the target with the same name name as the event.4599// Can't use an .isFunction() check here because IE6/7 fails that test.4600// Don't do default actions on window, that's where global variables be (#6170)4601if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {46024603// Don't re-trigger an onFOO event when we call its FOO() method4604tmp = elem[ ontype ];46054606if ( tmp ) {4607elem[ ontype ] = null;4608}46094610// Prevent re-triggering of the same event, since we already bubbled it above4611jQuery.event.triggered = type;4612try {4613elem[ type ]();4614} catch ( e ) {4615// IE<9 dies on focus/blur to hidden element (#1486,#12518)4616// only reproducible on winXP IE8 native, not IE9 in IE8 mode4617}4618jQuery.event.triggered = undefined;46194620if ( tmp ) {4621elem[ ontype ] = tmp;4622}4623}4624}4625}46264627return event.result;4628},46294630dispatch: function( event ) {46314632// Make a writable jQuery.Event from the native event object4633event = jQuery.event.fix( event );46344635var i, ret, handleObj, matched, j,4636handlerQueue = [],4637args = slice.call( arguments ),4638handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],4639special = jQuery.event.special[ event.type ] || {};46404641// Use the fix-ed jQuery.Event rather than the (read-only) native event4642args[0] = event;4643event.delegateTarget = this;46444645// Call the preDispatch hook for the mapped type, and let it bail if desired4646if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {4647return;4648}46494650// Determine handlers4651handlerQueue = jQuery.event.handlers.call( this, event, handlers );46524653// Run delegates first; they may want to stop propagation beneath us4654i = 0;4655while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {4656event.currentTarget = matched.elem;46574658j = 0;4659while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {46604661// Triggered event must either 1) have no namespace, or4662// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).4663if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {46644665event.handleObj = handleObj;4666event.data = handleObj.data;46674668ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )4669.apply( matched.elem, args );46704671if ( ret !== undefined ) {4672if ( (event.result = ret) === false ) {4673event.preventDefault();4674event.stopPropagation();4675}4676}4677}4678}4679}46804681// Call the postDispatch hook for the mapped type4682if ( special.postDispatch ) {4683special.postDispatch.call( this, event );4684}46854686return event.result;4687},46884689handlers: function( event, handlers ) {4690var sel, handleObj, matches, i,4691handlerQueue = [],4692delegateCount = handlers.delegateCount,4693cur = event.target;46944695// Find delegate handlers4696// Black-hole SVG <use> instance trees (#13180)4697// Avoid non-left-click bubbling in Firefox (#3861)4698if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {46994700/* jshint eqeqeq: false */4701for ( ; cur != this; cur = cur.parentNode || this ) {4702/* jshint eqeqeq: true */47034704// Don't check non-elements (#13208)4705// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)4706if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {4707matches = [];4708for ( i = 0; i < delegateCount; i++ ) {4709handleObj = handlers[ i ];47104711// Don't conflict with Object.prototype properties (#13203)4712sel = handleObj.selector + " ";47134714if ( matches[ sel ] === undefined ) {4715matches[ sel ] = handleObj.needsContext ?4716jQuery( sel, this ).index( cur ) >= 0 :4717jQuery.find( sel, this, null, [ cur ] ).length;4718}4719if ( matches[ sel ] ) {4720matches.push( handleObj );4721}4722}4723if ( matches.length ) {4724handlerQueue.push({ elem: cur, handlers: matches });4725}4726}4727}4728}47294730// Add the remaining (directly-bound) handlers4731if ( delegateCount < handlers.length ) {4732handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });4733}47344735return handlerQueue;4736},47374738fix: function( event ) {4739if ( event[ jQuery.expando ] ) {4740return event;4741}47424743// Create a writable copy of the event object and normalize some properties4744var i, prop, copy,4745type = event.type,4746originalEvent = event,4747fixHook = this.fixHooks[ type ];47484749if ( !fixHook ) {4750this.fixHooks[ type ] = fixHook =4751rmouseEvent.test( type ) ? this.mouseHooks :4752rkeyEvent.test( type ) ? this.keyHooks :4753{};4754}4755copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;47564757event = new jQuery.Event( originalEvent );47584759i = copy.length;4760while ( i-- ) {4761prop = copy[ i ];4762event[ prop ] = originalEvent[ prop ];4763}47644765// Support: IE<94766// Fix target property (#1925)4767if ( !event.target ) {4768event.target = originalEvent.srcElement || document;4769}47704771// Support: Chrome 23+, Safari?4772// Target should not be a text node (#504, #13143)4773if ( event.target.nodeType === 3 ) {4774event.target = event.target.parentNode;4775}47764777// Support: IE<94778// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)4779event.metaKey = !!event.metaKey;47804781return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;4782},47834784// Includes some event props shared by KeyEvent and MouseEvent4785props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),47864787fixHooks: {},47884789keyHooks: {4790props: "char charCode key keyCode".split(" "),4791filter: function( event, original ) {47924793// Add which for key events4794if ( event.which == null ) {4795event.which = original.charCode != null ? original.charCode : original.keyCode;4796}47974798return event;4799}4800},48014802mouseHooks: {4803props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),4804filter: function( event, original ) {4805var body, eventDoc, doc,4806button = original.button,4807fromElement = original.fromElement;48084809// Calculate pageX/Y if missing and clientX/Y available4810if ( event.pageX == null && original.clientX != null ) {4811eventDoc = event.target.ownerDocument || document;4812doc = eventDoc.documentElement;4813body = eventDoc.body;48144815event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );4816event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );4817}48184819// Add relatedTarget, if necessary4820if ( !event.relatedTarget && fromElement ) {4821event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;4822}48234824// Add which for click: 1 === left; 2 === middle; 3 === right4825// Note: button is not normalized, so don't use it4826if ( !event.which && button !== undefined ) {4827event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );4828}48294830return event;4831}4832},48334834special: {4835load: {4836// Prevent triggered image.load events from bubbling to window.load4837noBubble: true4838},4839focus: {4840// Fire native event if possible so blur/focus sequence is correct4841trigger: function() {4842if ( this !== safeActiveElement() && this.focus ) {4843try {4844this.focus();4845return false;4846} catch ( e ) {4847// Support: IE<94848// If we error on focus to hidden element (#1486, #12518),4849// let .trigger() run the handlers4850}4851}4852},4853delegateType: "focusin"4854},4855blur: {4856trigger: function() {4857if ( this === safeActiveElement() && this.blur ) {4858this.blur();4859return false;4860}4861},4862delegateType: "focusout"4863},4864click: {4865// For checkbox, fire native event so checked state will be right4866trigger: function() {4867if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {4868this.click();4869return false;4870}4871},48724873// For cross-browser consistency, don't fire native .click() on links4874_default: function( event ) {4875return jQuery.nodeName( event.target, "a" );4876}4877},48784879beforeunload: {4880postDispatch: function( event ) {48814882// Support: Firefox 20+4883// Firefox doesn't alert if the returnValue field is not set.4884if ( event.result !== undefined && event.originalEvent ) {4885event.originalEvent.returnValue = event.result;4886}4887}4888}4889},48904891simulate: function( type, elem, event, bubble ) {4892// Piggyback on a donor event to simulate a different one.4893// Fake originalEvent to avoid donor's stopPropagation, but if the4894// simulated event prevents default then we do the same on the donor.4895var e = jQuery.extend(4896new jQuery.Event(),4897event,4898{4899type: type,4900isSimulated: true,4901originalEvent: {}4902}4903);4904if ( bubble ) {4905jQuery.event.trigger( e, null, elem );4906} else {4907jQuery.event.dispatch.call( elem, e );4908}4909if ( e.isDefaultPrevented() ) {4910event.preventDefault();4911}4912}4913};49144915jQuery.removeEvent = document.removeEventListener ?4916function( elem, type, handle ) {4917if ( elem.removeEventListener ) {4918elem.removeEventListener( type, handle, false );4919}4920} :4921function( elem, type, handle ) {4922var name = "on" + type;49234924if ( elem.detachEvent ) {49254926// #8545, #7054, preventing memory leaks for custom events in IE6-84927// detachEvent needed property on element, by name of that event, to properly expose it to GC4928if ( typeof elem[ name ] === strundefined ) {4929elem[ name ] = null;4930}49314932elem.detachEvent( name, handle );4933}4934};49354936jQuery.Event = function( src, props ) {4937// Allow instantiation without the 'new' keyword4938if ( !(this instanceof jQuery.Event) ) {4939return new jQuery.Event( src, props );4940}49414942// Event object4943if ( src && src.type ) {4944this.originalEvent = src;4945this.type = src.type;49464947// Events bubbling up the document may have been marked as prevented4948// by a handler lower down the tree; reflect the correct value.4949this.isDefaultPrevented = src.defaultPrevented ||4950src.defaultPrevented === undefined &&4951// Support: IE < 9, Android < 4.04952src.returnValue === false ?4953returnTrue :4954returnFalse;49554956// Event type4957} else {4958this.type = src;4959}49604961// Put explicitly provided properties onto the event object4962if ( props ) {4963jQuery.extend( this, props );4964}49654966// Create a timestamp if incoming event doesn't have one4967this.timeStamp = src && src.timeStamp || jQuery.now();49684969// Mark it as fixed4970this[ jQuery.expando ] = true;4971};49724973// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding4974// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html4975jQuery.Event.prototype = {4976isDefaultPrevented: returnFalse,4977isPropagationStopped: returnFalse,4978isImmediatePropagationStopped: returnFalse,49794980preventDefault: function() {4981var e = this.originalEvent;49824983this.isDefaultPrevented = returnTrue;4984if ( !e ) {4985return;4986}49874988// If preventDefault exists, run it on the original event4989if ( e.preventDefault ) {4990e.preventDefault();49914992// Support: IE4993// Otherwise set the returnValue property of the original event to false4994} else {4995e.returnValue = false;4996}4997},4998stopPropagation: function() {4999var e = this.originalEvent;50005001this.isPropagationStopped = returnTrue;5002if ( !e ) {5003return;5004}5005// If stopPropagation exists, run it on the original event5006if ( e.stopPropagation ) {5007e.stopPropagation();5008}50095010// Support: IE5011// Set the cancelBubble property of the original event to true5012e.cancelBubble = true;5013},5014stopImmediatePropagation: function() {5015var e = this.originalEvent;50165017this.isImmediatePropagationStopped = returnTrue;50185019if ( e && e.stopImmediatePropagation ) {5020e.stopImmediatePropagation();5021}50225023this.stopPropagation();5024}5025};50265027// Create mouseenter/leave events using mouseover/out and event-time checks5028jQuery.each({5029mouseenter: "mouseover",5030mouseleave: "mouseout",5031pointerenter: "pointerover",5032pointerleave: "pointerout"5033}, function( orig, fix ) {5034jQuery.event.special[ orig ] = {5035delegateType: fix,5036bindType: fix,50375038handle: function( event ) {5039var ret,5040target = this,5041related = event.relatedTarget,5042handleObj = event.handleObj;50435044// For mousenter/leave call the handler if related is outside the target.5045// NB: No relatedTarget if the mouse left/entered the browser window5046if ( !related || (related !== target && !jQuery.contains( target, related )) ) {5047event.type = handleObj.origType;5048ret = handleObj.handler.apply( this, arguments );5049event.type = fix;5050}5051return ret;5052}5053};5054});50555056// IE submit delegation5057if ( !support.submitBubbles ) {50585059jQuery.event.special.submit = {5060setup: function() {5061// Only need this for delegated form submit events5062if ( jQuery.nodeName( this, "form" ) ) {5063return false;5064}50655066// Lazy-add a submit handler when a descendant form may potentially be submitted5067jQuery.event.add( this, "click._submit keypress._submit", function( e ) {5068// Node name check avoids a VML-related crash in IE (#9807)5069var elem = e.target,5070form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;5071if ( form && !jQuery._data( form, "submitBubbles" ) ) {5072jQuery.event.add( form, "submit._submit", function( event ) {5073event._submit_bubble = true;5074});5075jQuery._data( form, "submitBubbles", true );5076}5077});5078// return undefined since we don't need an event listener5079},50805081postDispatch: function( event ) {5082// If form was submitted by the user, bubble the event up the tree5083if ( event._submit_bubble ) {5084delete event._submit_bubble;5085if ( this.parentNode && !event.isTrigger ) {5086jQuery.event.simulate( "submit", this.parentNode, event, true );5087}5088}5089},50905091teardown: function() {5092// Only need this for delegated form submit events5093if ( jQuery.nodeName( this, "form" ) ) {5094return false;5095}50965097// Remove delegated handlers; cleanData eventually reaps submit handlers attached above5098jQuery.event.remove( this, "._submit" );5099}5100};5101}51025103// IE change delegation and checkbox/radio fix5104if ( !support.changeBubbles ) {51055106jQuery.event.special.change = {51075108setup: function() {51095110if ( rformElems.test( this.nodeName ) ) {5111// IE doesn't fire change on a check/radio until blur; trigger it on click5112// after a propertychange. Eat the blur-change in special.change.handle.5113// This still fires onchange a second time for check/radio after blur.5114if ( this.type === "checkbox" || this.type === "radio" ) {5115jQuery.event.add( this, "propertychange._change", function( event ) {5116if ( event.originalEvent.propertyName === "checked" ) {5117this._just_changed = true;5118}5119});5120jQuery.event.add( this, "click._change", function( event ) {5121if ( this._just_changed && !event.isTrigger ) {5122this._just_changed = false;5123}5124// Allow triggered, simulated change events (#11500)5125jQuery.event.simulate( "change", this, event, true );5126});5127}5128return false;5129}5130// Delegated event; lazy-add a change handler on descendant inputs5131jQuery.event.add( this, "beforeactivate._change", function( e ) {5132var elem = e.target;51335134if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {5135jQuery.event.add( elem, "change._change", function( event ) {5136if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {5137jQuery.event.simulate( "change", this.parentNode, event, true );5138}5139});5140jQuery._data( elem, "changeBubbles", true );5141}5142});5143},51445145handle: function( event ) {5146var elem = event.target;51475148// Swallow native change events from checkbox/radio, we already triggered them above5149if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {5150return event.handleObj.handler.apply( this, arguments );5151}5152},51535154teardown: function() {5155jQuery.event.remove( this, "._change" );51565157return !rformElems.test( this.nodeName );5158}5159};5160}51615162// Create "bubbling" focus and blur events5163if ( !support.focusinBubbles ) {5164jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {51655166// Attach a single capturing handler on the document while someone wants focusin/focusout5167var handler = function( event ) {5168jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );5169};51705171jQuery.event.special[ fix ] = {5172setup: function() {5173var doc = this.ownerDocument || this,5174attaches = jQuery._data( doc, fix );51755176if ( !attaches ) {5177doc.addEventListener( orig, handler, true );5178}5179jQuery._data( doc, fix, ( attaches || 0 ) + 1 );5180},5181teardown: function() {5182var doc = this.ownerDocument || this,5183attaches = jQuery._data( doc, fix ) - 1;51845185if ( !attaches ) {5186doc.removeEventListener( orig, handler, true );5187jQuery._removeData( doc, fix );5188} else {5189jQuery._data( doc, fix, attaches );5190}5191}5192};5193});5194}51955196jQuery.fn.extend({51975198on: function( types, selector, data, fn, /*INTERNAL*/ one ) {5199var type, origFn;52005201// Types can be a map of types/handlers5202if ( typeof types === "object" ) {5203// ( types-Object, selector, data )5204if ( typeof selector !== "string" ) {5205// ( types-Object, data )5206data = data || selector;5207selector = undefined;5208}5209for ( type in types ) {5210this.on( type, selector, data, types[ type ], one );5211}5212return this;5213}52145215if ( data == null && fn == null ) {5216// ( types, fn )5217fn = selector;5218data = selector = undefined;5219} else if ( fn == null ) {5220if ( typeof selector === "string" ) {5221// ( types, selector, fn )5222fn = data;5223data = undefined;5224} else {5225// ( types, data, fn )5226fn = data;5227data = selector;5228selector = undefined;5229}5230}5231if ( fn === false ) {5232fn = returnFalse;5233} else if ( !fn ) {5234return this;5235}52365237if ( one === 1 ) {5238origFn = fn;5239fn = function( event ) {5240// Can use an empty set, since event contains the info5241jQuery().off( event );5242return origFn.apply( this, arguments );5243};5244// Use same guid so caller can remove using origFn5245fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );5246}5247return this.each( function() {5248jQuery.event.add( this, types, fn, data, selector );5249});5250},5251one: function( types, selector, data, fn ) {5252return this.on( types, selector, data, fn, 1 );5253},5254off: function( types, selector, fn ) {5255var handleObj, type;5256if ( types && types.preventDefault && types.handleObj ) {5257// ( event ) dispatched jQuery.Event5258handleObj = types.handleObj;5259jQuery( types.delegateTarget ).off(5260handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,5261handleObj.selector,5262handleObj.handler5263);5264return this;5265}5266if ( typeof types === "object" ) {5267// ( types-object [, selector] )5268for ( type in types ) {5269this.off( type, selector, types[ type ] );5270}5271return this;5272}5273if ( selector === false || typeof selector === "function" ) {5274// ( types [, fn] )5275fn = selector;5276selector = undefined;5277}5278if ( fn === false ) {5279fn = returnFalse;5280}5281return this.each(function() {5282jQuery.event.remove( this, types, fn, selector );5283});5284},52855286trigger: function( type, data ) {5287return this.each(function() {5288jQuery.event.trigger( type, data, this );5289});5290},5291triggerHandler: function( type, data ) {5292var elem = this[0];5293if ( elem ) {5294return jQuery.event.trigger( type, data, elem, true );5295}5296}5297});529852995300function createSafeFragment( document ) {5301var list = nodeNames.split( "|" ),5302safeFrag = document.createDocumentFragment();53035304if ( safeFrag.createElement ) {5305while ( list.length ) {5306safeFrag.createElement(5307list.pop()5308);5309}5310}5311return safeFrag;5312}53135314var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +5315"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",5316rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,5317rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),5318rleadingWhitespace = /^\s+/,5319rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,5320rtagName = /<([\w:]+)/,5321rtbody = /<tbody/i,5322rhtml = /<|&#?\w+;/,5323rnoInnerhtml = /<(?:script|style|link)/i,5324// checked="checked" or checked5325rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,5326rscriptType = /^$|\/(?:java|ecma)script/i,5327rscriptTypeMasked = /^true\/(.*)/,5328rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,53295330// We have to close these tags to support XHTML (#13200)5331wrapMap = {5332option: [ 1, "<select multiple='multiple'>", "</select>" ],5333legend: [ 1, "<fieldset>", "</fieldset>" ],5334area: [ 1, "<map>", "</map>" ],5335param: [ 1, "<object>", "</object>" ],5336thead: [ 1, "<table>", "</table>" ],5337tr: [ 2, "<table><tbody>", "</tbody></table>" ],5338col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],5339td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],53405341// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,5342// unless wrapped in a div with non-breaking characters in front of it.5343_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]5344},5345safeFragment = createSafeFragment( document ),5346fragmentDiv = safeFragment.appendChild( document.createElement("div") );53475348wrapMap.optgroup = wrapMap.option;5349wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;5350wrapMap.th = wrapMap.td;53515352function getAll( context, tag ) {5353var elems, elem,5354i = 0,5355found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :5356typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :5357undefined;53585359if ( !found ) {5360for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {5361if ( !tag || jQuery.nodeName( elem, tag ) ) {5362found.push( elem );5363} else {5364jQuery.merge( found, getAll( elem, tag ) );5365}5366}5367}53685369return tag === undefined || tag && jQuery.nodeName( context, tag ) ?5370jQuery.merge( [ context ], found ) :5371found;5372}53735374// Used in buildFragment, fixes the defaultChecked property5375function fixDefaultChecked( elem ) {5376if ( rcheckableType.test( elem.type ) ) {5377elem.defaultChecked = elem.checked;5378}5379}53805381// Support: IE<85382// Manipulating tables requires a tbody5383function manipulationTarget( elem, content ) {5384return jQuery.nodeName( elem, "table" ) &&5385jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?53865387elem.getElementsByTagName("tbody")[0] ||5388elem.appendChild( elem.ownerDocument.createElement("tbody") ) :5389elem;5390}53915392// Replace/restore the type attribute of script elements for safe DOM manipulation5393function disableScript( elem ) {5394elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;5395return elem;5396}5397function restoreScript( elem ) {5398var match = rscriptTypeMasked.exec( elem.type );5399if ( match ) {5400elem.type = match[1];5401} else {5402elem.removeAttribute("type");5403}5404return elem;5405}54065407// Mark scripts as having already been evaluated5408function setGlobalEval( elems, refElements ) {5409var elem,5410i = 0;5411for ( ; (elem = elems[i]) != null; i++ ) {5412jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );5413}5414}54155416function cloneCopyEvent( src, dest ) {54175418if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {5419return;5420}54215422var type, i, l,5423oldData = jQuery._data( src ),5424curData = jQuery._data( dest, oldData ),5425events = oldData.events;54265427if ( events ) {5428delete curData.handle;5429curData.events = {};54305431for ( type in events ) {5432for ( i = 0, l = events[ type ].length; i < l; i++ ) {5433jQuery.event.add( dest, type, events[ type ][ i ] );5434}5435}5436}54375438// make the cloned public data object a copy from the original5439if ( curData.data ) {5440curData.data = jQuery.extend( {}, curData.data );5441}5442}54435444function fixCloneNodeIssues( src, dest ) {5445var nodeName, e, data;54465447// We do not need to do anything for non-Elements5448if ( dest.nodeType !== 1 ) {5449return;5450}54515452nodeName = dest.nodeName.toLowerCase();54535454// IE6-8 copies events bound via attachEvent when using cloneNode.5455if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {5456data = jQuery._data( dest );54575458for ( e in data.events ) {5459jQuery.removeEvent( dest, e, data.handle );5460}54615462// Event data gets referenced instead of copied if the expando gets copied too5463dest.removeAttribute( jQuery.expando );5464}54655466// IE blanks contents when cloning scripts, and tries to evaluate newly-set text5467if ( nodeName === "script" && dest.text !== src.text ) {5468disableScript( dest ).text = src.text;5469restoreScript( dest );54705471// IE6-10 improperly clones children of object elements using classid.5472// IE10 throws NoModificationAllowedError if parent is null, #12132.5473} else if ( nodeName === "object" ) {5474if ( dest.parentNode ) {5475dest.outerHTML = src.outerHTML;5476}54775478// This path appears unavoidable for IE9. When cloning an object5479// element in IE9, the outerHTML strategy above is not sufficient.5480// If the src has innerHTML and the destination does not,5481// copy the src.innerHTML into the dest.innerHTML. #103245482if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {5483dest.innerHTML = src.innerHTML;5484}54855486} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {5487// IE6-8 fails to persist the checked state of a cloned checkbox5488// or radio button. Worse, IE6-7 fail to give the cloned element5489// a checked appearance if the defaultChecked value isn't also set54905491dest.defaultChecked = dest.checked = src.checked;54925493// IE6-7 get confused and end up setting the value of a cloned5494// checkbox/radio button to an empty string instead of "on"5495if ( dest.value !== src.value ) {5496dest.value = src.value;5497}54985499// IE6-8 fails to return the selected option to the default selected5500// state when cloning options5501} else if ( nodeName === "option" ) {5502dest.defaultSelected = dest.selected = src.defaultSelected;55035504// IE6-8 fails to set the defaultValue to the correct value when5505// cloning other types of input fields5506} else if ( nodeName === "input" || nodeName === "textarea" ) {5507dest.defaultValue = src.defaultValue;5508}5509}55105511jQuery.extend({5512clone: function( elem, dataAndEvents, deepDataAndEvents ) {5513var destElements, node, clone, i, srcElements,5514inPage = jQuery.contains( elem.ownerDocument, elem );55155516if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {5517clone = elem.cloneNode( true );55185519// IE<=8 does not properly clone detached, unknown element nodes5520} else {5521fragmentDiv.innerHTML = elem.outerHTML;5522fragmentDiv.removeChild( clone = fragmentDiv.firstChild );5523}55245525if ( (!support.noCloneEvent || !support.noCloneChecked) &&5526(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {55275528// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/25529destElements = getAll( clone );5530srcElements = getAll( elem );55315532// Fix all IE cloning issues5533for ( i = 0; (node = srcElements[i]) != null; ++i ) {5534// Ensure that the destination node is not null; Fixes #95875535if ( destElements[i] ) {5536fixCloneNodeIssues( node, destElements[i] );5537}5538}5539}55405541// Copy the events from the original to the clone5542if ( dataAndEvents ) {5543if ( deepDataAndEvents ) {5544srcElements = srcElements || getAll( elem );5545destElements = destElements || getAll( clone );55465547for ( i = 0; (node = srcElements[i]) != null; i++ ) {5548cloneCopyEvent( node, destElements[i] );5549}5550} else {5551cloneCopyEvent( elem, clone );5552}5553}55545555// Preserve script evaluation history5556destElements = getAll( clone, "script" );5557if ( destElements.length > 0 ) {5558setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );5559}55605561destElements = srcElements = node = null;55625563// Return the cloned set5564return clone;5565},55665567buildFragment: function( elems, context, scripts, selection ) {5568var j, elem, contains,5569tmp, tag, tbody, wrap,5570l = elems.length,55715572// Ensure a safe fragment5573safe = createSafeFragment( context ),55745575nodes = [],5576i = 0;55775578for ( ; i < l; i++ ) {5579elem = elems[ i ];55805581if ( elem || elem === 0 ) {55825583// Add nodes directly5584if ( jQuery.type( elem ) === "object" ) {5585jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );55865587// Convert non-html into a text node5588} else if ( !rhtml.test( elem ) ) {5589nodes.push( context.createTextNode( elem ) );55905591// Convert html into DOM nodes5592} else {5593tmp = tmp || safe.appendChild( context.createElement("div") );55945595// Deserialize a standard representation5596tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase();5597wrap = wrapMap[ tag ] || wrapMap._default;55985599tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];56005601// Descend through wrappers to the right content5602j = wrap[0];5603while ( j-- ) {5604tmp = tmp.lastChild;5605}56065607// Manually add leading whitespace removed by IE5608if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {5609nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );5610}56115612// Remove IE's autoinserted <tbody> from table fragments5613if ( !support.tbody ) {56145615// String was a <table>, *may* have spurious <tbody>5616elem = tag === "table" && !rtbody.test( elem ) ?5617tmp.firstChild :56185619// String was a bare <thead> or <tfoot>5620wrap[1] === "<table>" && !rtbody.test( elem ) ?5621tmp :56220;56235624j = elem && elem.childNodes.length;5625while ( j-- ) {5626if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {5627elem.removeChild( tbody );5628}5629}5630}56315632jQuery.merge( nodes, tmp.childNodes );56335634// Fix #12392 for WebKit and IE > 95635tmp.textContent = "";56365637// Fix #12392 for oldIE5638while ( tmp.firstChild ) {5639tmp.removeChild( tmp.firstChild );5640}56415642// Remember the top-level container for proper cleanup5643tmp = safe.lastChild;5644}5645}5646}56475648// Fix #11356: Clear elements from fragment5649if ( tmp ) {5650safe.removeChild( tmp );5651}56525653// Reset defaultChecked for any radios and checkboxes5654// about to be appended to the DOM in IE 6/7 (#8060)5655if ( !support.appendChecked ) {5656jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );5657}56585659i = 0;5660while ( (elem = nodes[ i++ ]) ) {56615662// #4087 - If origin and destination elements are the same, and this is5663// that element, do not do anything5664if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {5665continue;5666}56675668contains = jQuery.contains( elem.ownerDocument, elem );56695670// Append to fragment5671tmp = getAll( safe.appendChild( elem ), "script" );56725673// Preserve script evaluation history5674if ( contains ) {5675setGlobalEval( tmp );5676}56775678// Capture executables5679if ( scripts ) {5680j = 0;5681while ( (elem = tmp[ j++ ]) ) {5682if ( rscriptType.test( elem.type || "" ) ) {5683scripts.push( elem );5684}5685}5686}5687}56885689tmp = null;56905691return safe;5692},56935694cleanData: function( elems, /* internal */ acceptData ) {5695var elem, type, id, data,5696i = 0,5697internalKey = jQuery.expando,5698cache = jQuery.cache,5699deleteExpando = support.deleteExpando,5700special = jQuery.event.special;57015702for ( ; (elem = elems[i]) != null; i++ ) {5703if ( acceptData || jQuery.acceptData( elem ) ) {57045705id = elem[ internalKey ];5706data = id && cache[ id ];57075708if ( data ) {5709if ( data.events ) {5710for ( type in data.events ) {5711if ( special[ type ] ) {5712jQuery.event.remove( elem, type );57135714// This is a shortcut to avoid jQuery.event.remove's overhead5715} else {5716jQuery.removeEvent( elem, type, data.handle );5717}5718}5719}57205721// Remove cache only if it was not already removed by jQuery.event.remove5722if ( cache[ id ] ) {57235724delete cache[ id ];57255726// IE does not allow us to delete expando properties from nodes,5727// nor does it have a removeAttribute function on Document nodes;5728// we must handle all of these cases5729if ( deleteExpando ) {5730delete elem[ internalKey ];57315732} else if ( typeof elem.removeAttribute !== strundefined ) {5733elem.removeAttribute( internalKey );57345735} else {5736elem[ internalKey ] = null;5737}57385739deletedIds.push( id );5740}5741}5742}5743}5744}5745});57465747jQuery.fn.extend({5748text: function( value ) {5749return access( this, function( value ) {5750return value === undefined ?5751jQuery.text( this ) :5752this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );5753}, null, value, arguments.length );5754},57555756append: function() {5757return this.domManip( arguments, function( elem ) {5758if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {5759var target = manipulationTarget( this, elem );5760target.appendChild( elem );5761}5762});5763},57645765prepend: function() {5766return this.domManip( arguments, function( elem ) {5767if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {5768var target = manipulationTarget( this, elem );5769target.insertBefore( elem, target.firstChild );5770}5771});5772},57735774before: function() {5775return this.domManip( arguments, function( elem ) {5776if ( this.parentNode ) {5777this.parentNode.insertBefore( elem, this );5778}5779});5780},57815782after: function() {5783return this.domManip( arguments, function( elem ) {5784if ( this.parentNode ) {5785this.parentNode.insertBefore( elem, this.nextSibling );5786}5787});5788},57895790remove: function( selector, keepData /* Internal Use Only */ ) {5791var elem,5792elems = selector ? jQuery.filter( selector, this ) : this,5793i = 0;57945795for ( ; (elem = elems[i]) != null; i++ ) {57965797if ( !keepData && elem.nodeType === 1 ) {5798jQuery.cleanData( getAll( elem ) );5799}58005801if ( elem.parentNode ) {5802if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {5803setGlobalEval( getAll( elem, "script" ) );5804}5805elem.parentNode.removeChild( elem );5806}5807}58085809return this;5810},58115812empty: function() {5813var elem,5814i = 0;58155816for ( ; (elem = this[i]) != null; i++ ) {5817// Remove element nodes and prevent memory leaks5818if ( elem.nodeType === 1 ) {5819jQuery.cleanData( getAll( elem, false ) );5820}58215822// Remove any remaining nodes5823while ( elem.firstChild ) {5824elem.removeChild( elem.firstChild );5825}58265827// If this is a select, ensure that it displays empty (#12336)5828// Support: IE<95829if ( elem.options && jQuery.nodeName( elem, "select" ) ) {5830elem.options.length = 0;5831}5832}58335834return this;5835},58365837clone: function( dataAndEvents, deepDataAndEvents ) {5838dataAndEvents = dataAndEvents == null ? false : dataAndEvents;5839deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;58405841return this.map(function() {5842return jQuery.clone( this, dataAndEvents, deepDataAndEvents );5843});5844},58455846html: function( value ) {5847return access( this, function( value ) {5848var elem = this[ 0 ] || {},5849i = 0,5850l = this.length;58515852if ( value === undefined ) {5853return elem.nodeType === 1 ?5854elem.innerHTML.replace( rinlinejQuery, "" ) :5855undefined;5856}58575858// See if we can take a shortcut and just use innerHTML5859if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&5860( support.htmlSerialize || !rnoshimcache.test( value ) ) &&5861( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&5862!wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {58635864value = value.replace( rxhtmlTag, "<$1></$2>" );58655866try {5867for (; i < l; i++ ) {5868// Remove element nodes and prevent memory leaks5869elem = this[i] || {};5870if ( elem.nodeType === 1 ) {5871jQuery.cleanData( getAll( elem, false ) );5872elem.innerHTML = value;5873}5874}58755876elem = 0;58775878// If using innerHTML throws an exception, use the fallback method5879} catch(e) {}5880}58815882if ( elem ) {5883this.empty().append( value );5884}5885}, null, value, arguments.length );5886},58875888replaceWith: function() {5889var arg = arguments[ 0 ];58905891// Make the changes, replacing each context element with the new content5892this.domManip( arguments, function( elem ) {5893arg = this.parentNode;58945895jQuery.cleanData( getAll( this ) );58965897if ( arg ) {5898arg.replaceChild( elem, this );5899}5900});59015902// Force removal if there was no new content (e.g., from empty arguments)5903return arg && (arg.length || arg.nodeType) ? this : this.remove();5904},59055906detach: function( selector ) {5907return this.remove( selector, true );5908},59095910domManip: function( args, callback ) {59115912// Flatten any nested arrays5913args = concat.apply( [], args );59145915var first, node, hasScripts,5916scripts, doc, fragment,5917i = 0,5918l = this.length,5919set = this,5920iNoClone = l - 1,5921value = args[0],5922isFunction = jQuery.isFunction( value );59235924// We can't cloneNode fragments that contain checked, in WebKit5925if ( isFunction ||5926( l > 1 && typeof value === "string" &&5927!support.checkClone && rchecked.test( value ) ) ) {5928return this.each(function( index ) {5929var self = set.eq( index );5930if ( isFunction ) {5931args[0] = value.call( this, index, self.html() );5932}5933self.domManip( args, callback );5934});5935}59365937if ( l ) {5938fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );5939first = fragment.firstChild;59405941if ( fragment.childNodes.length === 1 ) {5942fragment = first;5943}59445945if ( first ) {5946scripts = jQuery.map( getAll( fragment, "script" ), disableScript );5947hasScripts = scripts.length;59485949// Use the original fragment for the last item instead of the first because it can end up5950// being emptied incorrectly in certain situations (#8070).5951for ( ; i < l; i++ ) {5952node = fragment;59535954if ( i !== iNoClone ) {5955node = jQuery.clone( node, true, true );59565957// Keep references to cloned scripts for later restoration5958if ( hasScripts ) {5959jQuery.merge( scripts, getAll( node, "script" ) );5960}5961}59625963callback.call( this[i], node, i );5964}59655966if ( hasScripts ) {5967doc = scripts[ scripts.length - 1 ].ownerDocument;59685969// Reenable scripts5970jQuery.map( scripts, restoreScript );59715972// Evaluate executable scripts on first document insertion5973for ( i = 0; i < hasScripts; i++ ) {5974node = scripts[ i ];5975if ( rscriptType.test( node.type || "" ) &&5976!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {59775978if ( node.src ) {5979// Optional AJAX dependency, but won't run scripts if not present5980if ( jQuery._evalUrl ) {5981jQuery._evalUrl( node.src );5982}5983} else {5984jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );5985}5986}5987}5988}59895990// Fix #11809: Avoid leaking memory5991fragment = first = null;5992}5993}59945995return this;5996}5997});59985999jQuery.each({6000appendTo: "append",6001prependTo: "prepend",6002insertBefore: "before",6003insertAfter: "after",6004replaceAll: "replaceWith"6005}, function( name, original ) {6006jQuery.fn[ name ] = function( selector ) {6007var elems,6008i = 0,6009ret = [],6010insert = jQuery( selector ),6011last = insert.length - 1;60126013for ( ; i <= last; i++ ) {6014elems = i === last ? this : this.clone(true);6015jQuery( insert[i] )[ original ]( elems );60166017// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()6018push.apply( ret, elems.get() );6019}60206021return this.pushStack( ret );6022};6023});602460256026var iframe,6027elemdisplay = {};60286029/**6030* Retrieve the actual display of a element6031* @param {String} name nodeName of the element6032* @param {Object} doc Document object6033*/6034// Called only from within defaultDisplay6035function actualDisplay( name, doc ) {6036var style,6037elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),60386039// getDefaultComputedStyle might be reliably used only on attached element6040display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?60416042// Use of this method is a temporary fix (more like optmization) until something better comes along,6043// since it was removed from specification and supported only in FF6044style.display : jQuery.css( elem[ 0 ], "display" );60456046// We don't have any data stored on the element,6047// so use "detach" method as fast way to get rid of the element6048elem.detach();60496050return display;6051}60526053/**6054* Try to determine the default display value of an element6055* @param {String} nodeName6056*/6057function defaultDisplay( nodeName ) {6058var doc = document,6059display = elemdisplay[ nodeName ];60606061if ( !display ) {6062display = actualDisplay( nodeName, doc );60636064// If the simple way fails, read from inside an iframe6065if ( display === "none" || !display ) {60666067// Use the already-created iframe if possible6068iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );60696070// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse6071doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;60726073// Support: IE6074doc.write();6075doc.close();60766077display = actualDisplay( nodeName, doc );6078iframe.detach();6079}60806081// Store the correct default display6082elemdisplay[ nodeName ] = display;6083}60846085return display;6086}608760886089(function() {6090var shrinkWrapBlocksVal;60916092support.shrinkWrapBlocks = function() {6093if ( shrinkWrapBlocksVal != null ) {6094return shrinkWrapBlocksVal;6095}60966097// Will be changed later if needed.6098shrinkWrapBlocksVal = false;60996100// Minified: var b,c,d6101var div, body, container;61026103body = document.getElementsByTagName( "body" )[ 0 ];6104if ( !body || !body.style ) {6105// Test fired too early or in an unsupported environment, exit.6106return;6107}61086109// Setup6110div = document.createElement( "div" );6111container = document.createElement( "div" );6112container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";6113body.appendChild( container ).appendChild( div );61146115// Support: IE66116// Check if elements with layout shrink-wrap their children6117if ( typeof div.style.zoom !== strundefined ) {6118// Reset CSS: box-sizing; display; margin; border6119div.style.cssText =6120// Support: Firefox<29, Android 2.36121// Vendor-prefix box-sizing6122"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +6123"box-sizing:content-box;display:block;margin:0;border:0;" +6124"padding:1px;width:1px;zoom:1";6125div.appendChild( document.createElement( "div" ) ).style.width = "5px";6126shrinkWrapBlocksVal = div.offsetWidth !== 3;6127}61286129body.removeChild( container );61306131return shrinkWrapBlocksVal;6132};61336134})();6135var rmargin = (/^margin/);61366137var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );6138613961406141var getStyles, curCSS,6142rposition = /^(top|right|bottom|left)$/;61436144if ( window.getComputedStyle ) {6145getStyles = function( elem ) {6146// Support: IE<=11+, Firefox<=30+ (#15098, #14150)6147// IE throws on elements created in popups6148// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"6149if ( elem.ownerDocument.defaultView.opener ) {6150return elem.ownerDocument.defaultView.getComputedStyle( elem, null );6151}61526153return window.getComputedStyle( elem, null );6154};61556156curCSS = function( elem, name, computed ) {6157var width, minWidth, maxWidth, ret,6158style = elem.style;61596160computed = computed || getStyles( elem );61616162// getPropertyValue is only needed for .css('filter') in IE9, see #125376163ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;61646165if ( computed ) {61666167if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {6168ret = jQuery.style( elem, name );6169}61706171// A tribute to the "awesome hack by Dean Edwards"6172// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right6173// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels6174// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values6175if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {61766177// Remember the original values6178width = style.width;6179minWidth = style.minWidth;6180maxWidth = style.maxWidth;61816182// Put in the new values to get a computed value out6183style.minWidth = style.maxWidth = style.width = ret;6184ret = computed.width;61856186// Revert the changed values6187style.width = width;6188style.minWidth = minWidth;6189style.maxWidth = maxWidth;6190}6191}61926193// Support: IE6194// IE returns zIndex value as an integer.6195return ret === undefined ?6196ret :6197ret + "";6198};6199} else if ( document.documentElement.currentStyle ) {6200getStyles = function( elem ) {6201return elem.currentStyle;6202};62036204curCSS = function( elem, name, computed ) {6205var left, rs, rsLeft, ret,6206style = elem.style;62076208computed = computed || getStyles( elem );6209ret = computed ? computed[ name ] : undefined;62106211// Avoid setting ret to empty string here6212// so we don't default to auto6213if ( ret == null && style && style[ name ] ) {6214ret = style[ name ];6215}62166217// From the awesome hack by Dean Edwards6218// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-10229162196220// If we're not dealing with a regular pixel number6221// but a number that has a weird ending, we need to convert it to pixels6222// but not position css attributes, as those are proportional to the parent element instead6223// and we can't measure the parent instead because it might trigger a "stacking dolls" problem6224if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {62256226// Remember the original values6227left = style.left;6228rs = elem.runtimeStyle;6229rsLeft = rs && rs.left;62306231// Put in the new values to get a computed value out6232if ( rsLeft ) {6233rs.left = elem.currentStyle.left;6234}6235style.left = name === "fontSize" ? "1em" : ret;6236ret = style.pixelLeft + "px";62376238// Revert the changed values6239style.left = left;6240if ( rsLeft ) {6241rs.left = rsLeft;6242}6243}62446245// Support: IE6246// IE returns zIndex value as an integer.6247return ret === undefined ?6248ret :6249ret + "" || "auto";6250};6251}62526253625462556256function addGetHookIf( conditionFn, hookFn ) {6257// Define the hook, we'll check on the first run if it's really needed.6258return {6259get: function() {6260var condition = conditionFn();62616262if ( condition == null ) {6263// The test was not ready at this point; screw the hook this time6264// but check again when needed next time.6265return;6266}62676268if ( condition ) {6269// Hook not needed (or it's not possible to use it due to missing dependency),6270// remove it.6271// Since there are no other hooks for marginRight, remove the whole object.6272delete this.get;6273return;6274}62756276// Hook needed; redefine it so that the support test is not executed again.62776278return (this.get = hookFn).apply( this, arguments );6279}6280};6281}628262836284(function() {6285// Minified: var b,c,d,e,f,g, h,i6286var div, style, a, pixelPositionVal, boxSizingReliableVal,6287reliableHiddenOffsetsVal, reliableMarginRightVal;62886289// Setup6290div = document.createElement( "div" );6291div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";6292a = div.getElementsByTagName( "a" )[ 0 ];6293style = a && a.style;62946295// Finish early in limited (non-browser) environments6296if ( !style ) {6297return;6298}62996300style.cssText = "float:left;opacity:.5";63016302// Support: IE<96303// Make sure that element opacity exists (as opposed to filter)6304support.opacity = style.opacity === "0.5";63056306// Verify style float existence6307// (IE uses styleFloat instead of cssFloat)6308support.cssFloat = !!style.cssFloat;63096310div.style.backgroundClip = "content-box";6311div.cloneNode( true ).style.backgroundClip = "";6312support.clearCloneStyle = div.style.backgroundClip === "content-box";63136314// Support: Firefox<29, Android 2.36315// Vendor-prefix box-sizing6316support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||6317style.WebkitBoxSizing === "";63186319jQuery.extend(support, {6320reliableHiddenOffsets: function() {6321if ( reliableHiddenOffsetsVal == null ) {6322computeStyleTests();6323}6324return reliableHiddenOffsetsVal;6325},63266327boxSizingReliable: function() {6328if ( boxSizingReliableVal == null ) {6329computeStyleTests();6330}6331return boxSizingReliableVal;6332},63336334pixelPosition: function() {6335if ( pixelPositionVal == null ) {6336computeStyleTests();6337}6338return pixelPositionVal;6339},63406341// Support: Android 2.36342reliableMarginRight: function() {6343if ( reliableMarginRightVal == null ) {6344computeStyleTests();6345}6346return reliableMarginRightVal;6347}6348});63496350function computeStyleTests() {6351// Minified: var b,c,d,j6352var div, body, container, contents;63536354body = document.getElementsByTagName( "body" )[ 0 ];6355if ( !body || !body.style ) {6356// Test fired too early or in an unsupported environment, exit.6357return;6358}63596360// Setup6361div = document.createElement( "div" );6362container = document.createElement( "div" );6363container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";6364body.appendChild( container ).appendChild( div );63656366div.style.cssText =6367// Support: Firefox<29, Android 2.36368// Vendor-prefix box-sizing6369"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +6370"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +6371"border:1px;padding:1px;width:4px;position:absolute";63726373// Support: IE<96374// Assume reasonable values in the absence of getComputedStyle6375pixelPositionVal = boxSizingReliableVal = false;6376reliableMarginRightVal = true;63776378// Check for getComputedStyle so that this code is not run in IE<9.6379if ( window.getComputedStyle ) {6380pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";6381boxSizingReliableVal =6382( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";63836384// Support: Android 2.36385// Div with explicit width and no margin-right incorrectly6386// gets computed margin-right based on width of container (#3333)6387// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right6388contents = div.appendChild( document.createElement( "div" ) );63896390// Reset CSS: box-sizing; display; margin; border; padding6391contents.style.cssText = div.style.cssText =6392// Support: Firefox<29, Android 2.36393// Vendor-prefix box-sizing6394"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +6395"box-sizing:content-box;display:block;margin:0;border:0;padding:0";6396contents.style.marginRight = contents.style.width = "0";6397div.style.width = "1px";63986399reliableMarginRightVal =6400!parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );64016402div.removeChild( contents );6403}64046405// Support: IE86406// Check if table cells still have offsetWidth/Height when they are set6407// to display:none and there are still other visible table cells in a6408// table row; if so, offsetWidth/Height are not reliable for use when6409// determining if an element has been hidden directly using6410// display:none (it is still safe to use offsets if a parent element is6411// hidden; don safety goggles and see bug #4512 for more information).6412div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";6413contents = div.getElementsByTagName( "td" );6414contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";6415reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;6416if ( reliableHiddenOffsetsVal ) {6417contents[ 0 ].style.display = "";6418contents[ 1 ].style.display = "none";6419reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;6420}64216422body.removeChild( container );6423}64246425})();642664276428// A method for quickly swapping in/out CSS properties to get correct calculations.6429jQuery.swap = function( elem, options, callback, args ) {6430var ret, name,6431old = {};64326433// Remember the old values, and insert the new ones6434for ( name in options ) {6435old[ name ] = elem.style[ name ];6436elem.style[ name ] = options[ name ];6437}64386439ret = callback.apply( elem, args || [] );64406441// Revert the old values6442for ( name in options ) {6443elem.style[ name ] = old[ name ];6444}64456446return ret;6447};644864496450var6451ralpha = /alpha\([^)]*\)/i,6452ropacity = /opacity\s*=\s*([^)]*)/,64536454// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"6455// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display6456rdisplayswap = /^(none|table(?!-c[ea]).+)/,6457rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),6458rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),64596460cssShow = { position: "absolute", visibility: "hidden", display: "block" },6461cssNormalTransform = {6462letterSpacing: "0",6463fontWeight: "400"6464},64656466cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];646764686469// return a css property mapped to a potentially vendor prefixed property6470function vendorPropName( style, name ) {64716472// shortcut for names that are not vendor prefixed6473if ( name in style ) {6474return name;6475}64766477// check for vendor prefixed names6478var capName = name.charAt(0).toUpperCase() + name.slice(1),6479origName = name,6480i = cssPrefixes.length;64816482while ( i-- ) {6483name = cssPrefixes[ i ] + capName;6484if ( name in style ) {6485return name;6486}6487}64886489return origName;6490}64916492function showHide( elements, show ) {6493var display, elem, hidden,6494values = [],6495index = 0,6496length = elements.length;64976498for ( ; index < length; index++ ) {6499elem = elements[ index ];6500if ( !elem.style ) {6501continue;6502}65036504values[ index ] = jQuery._data( elem, "olddisplay" );6505display = elem.style.display;6506if ( show ) {6507// Reset the inline display of this element to learn if it is6508// being hidden by cascaded rules or not6509if ( !values[ index ] && display === "none" ) {6510elem.style.display = "";6511}65126513// Set elements which have been overridden with display: none6514// in a stylesheet to whatever the default browser style is6515// for such an element6516if ( elem.style.display === "" && isHidden( elem ) ) {6517values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );6518}6519} else {6520hidden = isHidden( elem );65216522if ( display && display !== "none" || !hidden ) {6523jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );6524}6525}6526}65276528// Set the display of most of the elements in a second loop6529// to avoid the constant reflow6530for ( index = 0; index < length; index++ ) {6531elem = elements[ index ];6532if ( !elem.style ) {6533continue;6534}6535if ( !show || elem.style.display === "none" || elem.style.display === "" ) {6536elem.style.display = show ? values[ index ] || "" : "none";6537}6538}65396540return elements;6541}65426543function setPositiveNumber( elem, value, subtract ) {6544var matches = rnumsplit.exec( value );6545return matches ?6546// Guard against undefined "subtract", e.g., when used as in cssHooks6547Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :6548value;6549}65506551function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {6552var i = extra === ( isBorderBox ? "border" : "content" ) ?6553// If we already have the right measurement, avoid augmentation65544 :6555// Otherwise initialize for horizontal or vertical properties6556name === "width" ? 1 : 0,65576558val = 0;65596560for ( ; i < 4; i += 2 ) {6561// both box models exclude margin, so add it if we want it6562if ( extra === "margin" ) {6563val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );6564}65656566if ( isBorderBox ) {6567// border-box includes padding, so remove it if we want content6568if ( extra === "content" ) {6569val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );6570}65716572// at this point, extra isn't border nor margin, so remove border6573if ( extra !== "margin" ) {6574val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );6575}6576} else {6577// at this point, extra isn't content, so add padding6578val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );65796580// at this point, extra isn't content nor padding, so add border6581if ( extra !== "padding" ) {6582val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );6583}6584}6585}65866587return val;6588}65896590function getWidthOrHeight( elem, name, extra ) {65916592// Start with offset property, which is equivalent to the border-box value6593var valueIsBorderBox = true,6594val = name === "width" ? elem.offsetWidth : elem.offsetHeight,6595styles = getStyles( elem ),6596isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";65976598// some non-html elements return undefined for offsetWidth, so check for null/undefined6599// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=6492856600// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=4916686601if ( val <= 0 || val == null ) {6602// Fall back to computed then uncomputed css if necessary6603val = curCSS( elem, name, styles );6604if ( val < 0 || val == null ) {6605val = elem.style[ name ];6606}66076608// Computed unit is not pixels. Stop here and return.6609if ( rnumnonpx.test(val) ) {6610return val;6611}66126613// we need the check for style in case a browser which returns unreliable values6614// for getComputedStyle silently falls back to the reliable elem.style6615valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] );66166617// Normalize "", auto, and prepare for extra6618val = parseFloat( val ) || 0;6619}66206621// use the active box-sizing model to add/subtract irrelevant styles6622return ( val +6623augmentWidthOrHeight(6624elem,6625name,6626extra || ( isBorderBox ? "border" : "content" ),6627valueIsBorderBox,6628styles6629)6630) + "px";6631}66326633jQuery.extend({6634// Add in style property hooks for overriding the default6635// behavior of getting and setting a style property6636cssHooks: {6637opacity: {6638get: function( elem, computed ) {6639if ( computed ) {6640// We should always get a number back from opacity6641var ret = curCSS( elem, "opacity" );6642return ret === "" ? "1" : ret;6643}6644}6645}6646},66476648// Don't automatically add "px" to these possibly-unitless properties6649cssNumber: {6650"columnCount": true,6651"fillOpacity": true,6652"flexGrow": true,6653"flexShrink": true,6654"fontWeight": true,6655"lineHeight": true,6656"opacity": true,6657"order": true,6658"orphans": true,6659"widows": true,6660"zIndex": true,6661"zoom": true6662},66636664// Add in properties whose names you wish to fix before6665// setting or getting the value6666cssProps: {6667// normalize float css property6668"float": support.cssFloat ? "cssFloat" : "styleFloat"6669},66706671// Get and set the style property on a DOM Node6672style: function( elem, name, value, extra ) {6673// Don't set styles on text and comment nodes6674if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {6675return;6676}66776678// Make sure that we're working with the right name6679var ret, type, hooks,6680origName = jQuery.camelCase( name ),6681style = elem.style;66826683name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );66846685// gets hook for the prefixed version6686// followed by the unprefixed version6687hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];66886689// Check if we're setting a value6690if ( value !== undefined ) {6691type = typeof value;66926693// convert relative number strings (+= or -=) to relative numbers. #73456694if ( type === "string" && (ret = rrelNum.exec( value )) ) {6695value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );6696// Fixes bug #92376697type = "number";6698}66996700// Make sure that null and NaN values aren't set. See: #71166701if ( value == null || value !== value ) {6702return;6703}67046705// If a number was passed in, add 'px' to the (except for certain CSS properties)6706if ( type === "number" && !jQuery.cssNumber[ origName ] ) {6707value += "px";6708}67096710// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,6711// but it would mean to define eight (for every problematic property) identical functions6712if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {6713style[ name ] = "inherit";6714}67156716// If a hook was provided, use that value, otherwise just set the specified value6717if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {67186719// Support: IE6720// Swallow errors from 'invalid' CSS values (#5509)6721try {6722style[ name ] = value;6723} catch(e) {}6724}67256726} else {6727// If a hook was provided get the non-computed value from there6728if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {6729return ret;6730}67316732// Otherwise just get the value from the style object6733return style[ name ];6734}6735},67366737css: function( elem, name, extra, styles ) {6738var num, val, hooks,6739origName = jQuery.camelCase( name );67406741// Make sure that we're working with the right name6742name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );67436744// gets hook for the prefixed version6745// followed by the unprefixed version6746hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];67476748// If a hook was provided get the computed value from there6749if ( hooks && "get" in hooks ) {6750val = hooks.get( elem, true, extra );6751}67526753// Otherwise, if a way to get the computed value exists, use that6754if ( val === undefined ) {6755val = curCSS( elem, name, styles );6756}67576758//convert "normal" to computed value6759if ( val === "normal" && name in cssNormalTransform ) {6760val = cssNormalTransform[ name ];6761}67626763// Return, converting to number if forced or a qualifier was provided and val looks numeric6764if ( extra === "" || extra ) {6765num = parseFloat( val );6766return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;6767}6768return val;6769}6770});67716772jQuery.each([ "height", "width" ], function( i, name ) {6773jQuery.cssHooks[ name ] = {6774get: function( elem, computed, extra ) {6775if ( computed ) {6776// certain elements can have dimension info if we invisibly show them6777// however, it must have a current display style that would benefit from this6778return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?6779jQuery.swap( elem, cssShow, function() {6780return getWidthOrHeight( elem, name, extra );6781}) :6782getWidthOrHeight( elem, name, extra );6783}6784},67856786set: function( elem, value, extra ) {6787var styles = extra && getStyles( elem );6788return setPositiveNumber( elem, value, extra ?6789augmentWidthOrHeight(6790elem,6791name,6792extra,6793support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",6794styles6795) : 06796);6797}6798};6799});68006801if ( !support.opacity ) {6802jQuery.cssHooks.opacity = {6803get: function( elem, computed ) {6804// IE uses filters for opacity6805return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?6806( 0.01 * parseFloat( RegExp.$1 ) ) + "" :6807computed ? "1" : "";6808},68096810set: function( elem, value ) {6811var style = elem.style,6812currentStyle = elem.currentStyle,6813opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",6814filter = currentStyle && currentStyle.filter || style.filter || "";68156816// IE has trouble with opacity if it does not have layout6817// Force it by setting the zoom level6818style.zoom = 1;68196820// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #66526821// if value === "", then remove inline opacity #126856822if ( ( value >= 1 || value === "" ) &&6823jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&6824style.removeAttribute ) {68256826// Setting style.filter to null, "" & " " still leave "filter:" in the cssText6827// if "filter:" is present at all, clearType is disabled, we want to avoid this6828// style.removeAttribute is IE Only, but so apparently is this code path...6829style.removeAttribute( "filter" );68306831// if there is no filter style applied in a css rule or unset inline opacity, we are done6832if ( value === "" || currentStyle && !currentStyle.filter ) {6833return;6834}6835}68366837// otherwise, set new filter values6838style.filter = ralpha.test( filter ) ?6839filter.replace( ralpha, opacity ) :6840filter + " " + opacity;6841}6842};6843}68446845jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,6846function( elem, computed ) {6847if ( computed ) {6848// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right6849// Work around by temporarily setting element display to inline-block6850return jQuery.swap( elem, { "display": "inline-block" },6851curCSS, [ elem, "marginRight" ] );6852}6853}6854);68556856// These hooks are used by animate to expand properties6857jQuery.each({6858margin: "",6859padding: "",6860border: "Width"6861}, function( prefix, suffix ) {6862jQuery.cssHooks[ prefix + suffix ] = {6863expand: function( value ) {6864var i = 0,6865expanded = {},68666867// assumes a single number if not a string6868parts = typeof value === "string" ? value.split(" ") : [ value ];68696870for ( ; i < 4; i++ ) {6871expanded[ prefix + cssExpand[ i ] + suffix ] =6872parts[ i ] || parts[ i - 2 ] || parts[ 0 ];6873}68746875return expanded;6876}6877};68786879if ( !rmargin.test( prefix ) ) {6880jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;6881}6882});68836884jQuery.fn.extend({6885css: function( name, value ) {6886return access( this, function( elem, name, value ) {6887var styles, len,6888map = {},6889i = 0;68906891if ( jQuery.isArray( name ) ) {6892styles = getStyles( elem );6893len = name.length;68946895for ( ; i < len; i++ ) {6896map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );6897}68986899return map;6900}69016902return value !== undefined ?6903jQuery.style( elem, name, value ) :6904jQuery.css( elem, name );6905}, name, value, arguments.length > 1 );6906},6907show: function() {6908return showHide( this, true );6909},6910hide: function() {6911return showHide( this );6912},6913toggle: function( state ) {6914if ( typeof state === "boolean" ) {6915return state ? this.show() : this.hide();6916}69176918return this.each(function() {6919if ( isHidden( this ) ) {6920jQuery( this ).show();6921} else {6922jQuery( this ).hide();6923}6924});6925}6926});692769286929function Tween( elem, options, prop, end, easing ) {6930return new Tween.prototype.init( elem, options, prop, end, easing );6931}6932jQuery.Tween = Tween;69336934Tween.prototype = {6935constructor: Tween,6936init: function( elem, options, prop, end, easing, unit ) {6937this.elem = elem;6938this.prop = prop;6939this.easing = easing || "swing";6940this.options = options;6941this.start = this.now = this.cur();6942this.end = end;6943this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );6944},6945cur: function() {6946var hooks = Tween.propHooks[ this.prop ];69476948return hooks && hooks.get ?6949hooks.get( this ) :6950Tween.propHooks._default.get( this );6951},6952run: function( percent ) {6953var eased,6954hooks = Tween.propHooks[ this.prop ];69556956if ( this.options.duration ) {6957this.pos = eased = jQuery.easing[ this.easing ](6958percent, this.options.duration * percent, 0, 1, this.options.duration6959);6960} else {6961this.pos = eased = percent;6962}6963this.now = ( this.end - this.start ) * eased + this.start;69646965if ( this.options.step ) {6966this.options.step.call( this.elem, this.now, this );6967}69686969if ( hooks && hooks.set ) {6970hooks.set( this );6971} else {6972Tween.propHooks._default.set( this );6973}6974return this;6975}6976};69776978Tween.prototype.init.prototype = Tween.prototype;69796980Tween.propHooks = {6981_default: {6982get: function( tween ) {6983var result;69846985if ( tween.elem[ tween.prop ] != null &&6986(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {6987return tween.elem[ tween.prop ];6988}69896990// passing an empty string as a 3rd parameter to .css will automatically6991// attempt a parseFloat and fallback to a string if the parse fails6992// so, simple values such as "10px" are parsed to Float.6993// complex values such as "rotate(1rad)" are returned as is.6994result = jQuery.css( tween.elem, tween.prop, "" );6995// Empty strings, null, undefined and "auto" are converted to 0.6996return !result || result === "auto" ? 0 : result;6997},6998set: function( tween ) {6999// use step hook for back compat - use cssHook if its there - use .style if its7000// available and use plain properties where available7001if ( jQuery.fx.step[ tween.prop ] ) {7002jQuery.fx.step[ tween.prop ]( tween );7003} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {7004jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );7005} else {7006tween.elem[ tween.prop ] = tween.now;7007}7008}7009}7010};70117012// Support: IE <=97013// Panic based approach to setting things on disconnected nodes70147015Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {7016set: function( tween ) {7017if ( tween.elem.nodeType && tween.elem.parentNode ) {7018tween.elem[ tween.prop ] = tween.now;7019}7020}7021};70227023jQuery.easing = {7024linear: function( p ) {7025return p;7026},7027swing: function( p ) {7028return 0.5 - Math.cos( p * Math.PI ) / 2;7029}7030};70317032jQuery.fx = Tween.prototype.init;70337034// Back Compat <1.8 extension point7035jQuery.fx.step = {};70367037703870397040var7041fxNow, timerId,7042rfxtypes = /^(?:toggle|show|hide)$/,7043rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),7044rrun = /queueHooks$/,7045animationPrefilters = [ defaultPrefilter ],7046tweeners = {7047"*": [ function( prop, value ) {7048var tween = this.createTween( prop, value ),7049target = tween.cur(),7050parts = rfxnum.exec( value ),7051unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),70527053// Starting value computation is required for potential unit mismatches7054start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&7055rfxnum.exec( jQuery.css( tween.elem, prop ) ),7056scale = 1,7057maxIterations = 20;70587059if ( start && start[ 3 ] !== unit ) {7060// Trust units reported by jQuery.css7061unit = unit || start[ 3 ];70627063// Make sure we update the tween properties later on7064parts = parts || [];70657066// Iteratively approximate from a nonzero starting point7067start = +target || 1;70687069do {7070// If previous iteration zeroed out, double until we get *something*7071// Use a string for doubling factor so we don't accidentally see scale as unchanged below7072scale = scale || ".5";70737074// Adjust and apply7075start = start / scale;7076jQuery.style( tween.elem, prop, start + unit );70777078// Update scale, tolerating zero or NaN from tween.cur()7079// And breaking the loop if scale is unchanged or perfect, or if we've just had enough7080} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );7081}70827083// Update tween properties7084if ( parts ) {7085start = tween.start = +start || +target || 0;7086tween.unit = unit;7087// If a +=/-= token was provided, we're doing a relative animation7088tween.end = parts[ 1 ] ?7089start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :7090+parts[ 2 ];7091}70927093return tween;7094} ]7095};70967097// Animations created synchronously will run synchronously7098function createFxNow() {7099setTimeout(function() {7100fxNow = undefined;7101});7102return ( fxNow = jQuery.now() );7103}71047105// Generate parameters to create a standard animation7106function genFx( type, includeWidth ) {7107var which,7108attrs = { height: type },7109i = 0;71107111// if we include width, step value is 1 to do all cssExpand values,7112// if we don't include width, step value is 2 to skip over Left and Right7113includeWidth = includeWidth ? 1 : 0;7114for ( ; i < 4 ; i += 2 - includeWidth ) {7115which = cssExpand[ i ];7116attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;7117}71187119if ( includeWidth ) {7120attrs.opacity = attrs.width = type;7121}71227123return attrs;7124}71257126function createTween( value, prop, animation ) {7127var tween,7128collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),7129index = 0,7130length = collection.length;7131for ( ; index < length; index++ ) {7132if ( (tween = collection[ index ].call( animation, prop, value )) ) {71337134// we're done with this property7135return tween;7136}7137}7138}71397140function defaultPrefilter( elem, props, opts ) {7141/* jshint validthis: true */7142var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,7143anim = this,7144orig = {},7145style = elem.style,7146hidden = elem.nodeType && isHidden( elem ),7147dataShow = jQuery._data( elem, "fxshow" );71487149// handle queue: false promises7150if ( !opts.queue ) {7151hooks = jQuery._queueHooks( elem, "fx" );7152if ( hooks.unqueued == null ) {7153hooks.unqueued = 0;7154oldfire = hooks.empty.fire;7155hooks.empty.fire = function() {7156if ( !hooks.unqueued ) {7157oldfire();7158}7159};7160}7161hooks.unqueued++;71627163anim.always(function() {7164// doing this makes sure that the complete handler will be called7165// before this completes7166anim.always(function() {7167hooks.unqueued--;7168if ( !jQuery.queue( elem, "fx" ).length ) {7169hooks.empty.fire();7170}7171});7172});7173}71747175// height/width overflow pass7176if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {7177// Make sure that nothing sneaks out7178// Record all 3 overflow attributes because IE does not7179// change the overflow attribute when overflowX and7180// overflowY are set to the same value7181opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];71827183// Set display property to inline-block for height/width7184// animations on inline elements that are having width/height animated7185display = jQuery.css( elem, "display" );71867187// Test default display if display is currently "none"7188checkDisplay = display === "none" ?7189jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;71907191if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {71927193// inline-level elements accept inline-block;7194// block-level elements need to be inline with layout7195if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {7196style.display = "inline-block";7197} else {7198style.zoom = 1;7199}7200}7201}72027203if ( opts.overflow ) {7204style.overflow = "hidden";7205if ( !support.shrinkWrapBlocks() ) {7206anim.always(function() {7207style.overflow = opts.overflow[ 0 ];7208style.overflowX = opts.overflow[ 1 ];7209style.overflowY = opts.overflow[ 2 ];7210});7211}7212}72137214// show/hide pass7215for ( prop in props ) {7216value = props[ prop ];7217if ( rfxtypes.exec( value ) ) {7218delete props[ prop ];7219toggle = toggle || value === "toggle";7220if ( value === ( hidden ? "hide" : "show" ) ) {72217222// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden7223if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {7224hidden = true;7225} else {7226continue;7227}7228}7229orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );72307231// Any non-fx value stops us from restoring the original display value7232} else {7233display = undefined;7234}7235}72367237if ( !jQuery.isEmptyObject( orig ) ) {7238if ( dataShow ) {7239if ( "hidden" in dataShow ) {7240hidden = dataShow.hidden;7241}7242} else {7243dataShow = jQuery._data( elem, "fxshow", {} );7244}72457246// store state if its toggle - enables .stop().toggle() to "reverse"7247if ( toggle ) {7248dataShow.hidden = !hidden;7249}7250if ( hidden ) {7251jQuery( elem ).show();7252} else {7253anim.done(function() {7254jQuery( elem ).hide();7255});7256}7257anim.done(function() {7258var prop;7259jQuery._removeData( elem, "fxshow" );7260for ( prop in orig ) {7261jQuery.style( elem, prop, orig[ prop ] );7262}7263});7264for ( prop in orig ) {7265tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );72667267if ( !( prop in dataShow ) ) {7268dataShow[ prop ] = tween.start;7269if ( hidden ) {7270tween.end = tween.start;7271tween.start = prop === "width" || prop === "height" ? 1 : 0;7272}7273}7274}72757276// If this is a noop like .hide().hide(), restore an overwritten display value7277} else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {7278style.display = display;7279}7280}72817282function propFilter( props, specialEasing ) {7283var index, name, easing, value, hooks;72847285// camelCase, specialEasing and expand cssHook pass7286for ( index in props ) {7287name = jQuery.camelCase( index );7288easing = specialEasing[ name ];7289value = props[ index ];7290if ( jQuery.isArray( value ) ) {7291easing = value[ 1 ];7292value = props[ index ] = value[ 0 ];7293}72947295if ( index !== name ) {7296props[ name ] = value;7297delete props[ index ];7298}72997300hooks = jQuery.cssHooks[ name ];7301if ( hooks && "expand" in hooks ) {7302value = hooks.expand( value );7303delete props[ name ];73047305// not quite $.extend, this wont overwrite keys already present.7306// also - reusing 'index' from above because we have the correct "name"7307for ( index in value ) {7308if ( !( index in props ) ) {7309props[ index ] = value[ index ];7310specialEasing[ index ] = easing;7311}7312}7313} else {7314specialEasing[ name ] = easing;7315}7316}7317}73187319function Animation( elem, properties, options ) {7320var result,7321stopped,7322index = 0,7323length = animationPrefilters.length,7324deferred = jQuery.Deferred().always( function() {7325// don't match elem in the :animated selector7326delete tick.elem;7327}),7328tick = function() {7329if ( stopped ) {7330return false;7331}7332var currentTime = fxNow || createFxNow(),7333remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),7334// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)7335temp = remaining / animation.duration || 0,7336percent = 1 - temp,7337index = 0,7338length = animation.tweens.length;73397340for ( ; index < length ; index++ ) {7341animation.tweens[ index ].run( percent );7342}73437344deferred.notifyWith( elem, [ animation, percent, remaining ]);73457346if ( percent < 1 && length ) {7347return remaining;7348} else {7349deferred.resolveWith( elem, [ animation ] );7350return false;7351}7352},7353animation = deferred.promise({7354elem: elem,7355props: jQuery.extend( {}, properties ),7356opts: jQuery.extend( true, { specialEasing: {} }, options ),7357originalProperties: properties,7358originalOptions: options,7359startTime: fxNow || createFxNow(),7360duration: options.duration,7361tweens: [],7362createTween: function( prop, end ) {7363var tween = jQuery.Tween( elem, animation.opts, prop, end,7364animation.opts.specialEasing[ prop ] || animation.opts.easing );7365animation.tweens.push( tween );7366return tween;7367},7368stop: function( gotoEnd ) {7369var index = 0,7370// if we are going to the end, we want to run all the tweens7371// otherwise we skip this part7372length = gotoEnd ? animation.tweens.length : 0;7373if ( stopped ) {7374return this;7375}7376stopped = true;7377for ( ; index < length ; index++ ) {7378animation.tweens[ index ].run( 1 );7379}73807381// resolve when we played the last frame7382// otherwise, reject7383if ( gotoEnd ) {7384deferred.resolveWith( elem, [ animation, gotoEnd ] );7385} else {7386deferred.rejectWith( elem, [ animation, gotoEnd ] );7387}7388return this;7389}7390}),7391props = animation.props;73927393propFilter( props, animation.opts.specialEasing );73947395for ( ; index < length ; index++ ) {7396result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );7397if ( result ) {7398return result;7399}7400}74017402jQuery.map( props, createTween, animation );74037404if ( jQuery.isFunction( animation.opts.start ) ) {7405animation.opts.start.call( elem, animation );7406}74077408jQuery.fx.timer(7409jQuery.extend( tick, {7410elem: elem,7411anim: animation,7412queue: animation.opts.queue7413})7414);74157416// attach callbacks from options7417return animation.progress( animation.opts.progress )7418.done( animation.opts.done, animation.opts.complete )7419.fail( animation.opts.fail )7420.always( animation.opts.always );7421}74227423jQuery.Animation = jQuery.extend( Animation, {7424tweener: function( props, callback ) {7425if ( jQuery.isFunction( props ) ) {7426callback = props;7427props = [ "*" ];7428} else {7429props = props.split(" ");7430}74317432var prop,7433index = 0,7434length = props.length;74357436for ( ; index < length ; index++ ) {7437prop = props[ index ];7438tweeners[ prop ] = tweeners[ prop ] || [];7439tweeners[ prop ].unshift( callback );7440}7441},74427443prefilter: function( callback, prepend ) {7444if ( prepend ) {7445animationPrefilters.unshift( callback );7446} else {7447animationPrefilters.push( callback );7448}7449}7450});74517452jQuery.speed = function( speed, easing, fn ) {7453var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {7454complete: fn || !fn && easing ||7455jQuery.isFunction( speed ) && speed,7456duration: speed,7457easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing7458};74597460opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :7461opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;74627463// normalize opt.queue - true/undefined/null -> "fx"7464if ( opt.queue == null || opt.queue === true ) {7465opt.queue = "fx";7466}74677468// Queueing7469opt.old = opt.complete;74707471opt.complete = function() {7472if ( jQuery.isFunction( opt.old ) ) {7473opt.old.call( this );7474}74757476if ( opt.queue ) {7477jQuery.dequeue( this, opt.queue );7478}7479};74807481return opt;7482};74837484jQuery.fn.extend({7485fadeTo: function( speed, to, easing, callback ) {74867487// show any hidden elements after setting opacity to 07488return this.filter( isHidden ).css( "opacity", 0 ).show()74897490// animate to the value specified7491.end().animate({ opacity: to }, speed, easing, callback );7492},7493animate: function( prop, speed, easing, callback ) {7494var empty = jQuery.isEmptyObject( prop ),7495optall = jQuery.speed( speed, easing, callback ),7496doAnimation = function() {7497// Operate on a copy of prop so per-property easing won't be lost7498var anim = Animation( this, jQuery.extend( {}, prop ), optall );74997500// Empty animations, or finishing resolves immediately7501if ( empty || jQuery._data( this, "finish" ) ) {7502anim.stop( true );7503}7504};7505doAnimation.finish = doAnimation;75067507return empty || optall.queue === false ?7508this.each( doAnimation ) :7509this.queue( optall.queue, doAnimation );7510},7511stop: function( type, clearQueue, gotoEnd ) {7512var stopQueue = function( hooks ) {7513var stop = hooks.stop;7514delete hooks.stop;7515stop( gotoEnd );7516};75177518if ( typeof type !== "string" ) {7519gotoEnd = clearQueue;7520clearQueue = type;7521type = undefined;7522}7523if ( clearQueue && type !== false ) {7524this.queue( type || "fx", [] );7525}75267527return this.each(function() {7528var dequeue = true,7529index = type != null && type + "queueHooks",7530timers = jQuery.timers,7531data = jQuery._data( this );75327533if ( index ) {7534if ( data[ index ] && data[ index ].stop ) {7535stopQueue( data[ index ] );7536}7537} else {7538for ( index in data ) {7539if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {7540stopQueue( data[ index ] );7541}7542}7543}75447545for ( index = timers.length; index--; ) {7546if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {7547timers[ index ].anim.stop( gotoEnd );7548dequeue = false;7549timers.splice( index, 1 );7550}7551}75527553// start the next in the queue if the last step wasn't forced7554// timers currently will call their complete callbacks, which will dequeue7555// but only if they were gotoEnd7556if ( dequeue || !gotoEnd ) {7557jQuery.dequeue( this, type );7558}7559});7560},7561finish: function( type ) {7562if ( type !== false ) {7563type = type || "fx";7564}7565return this.each(function() {7566var index,7567data = jQuery._data( this ),7568queue = data[ type + "queue" ],7569hooks = data[ type + "queueHooks" ],7570timers = jQuery.timers,7571length = queue ? queue.length : 0;75727573// enable finishing flag on private data7574data.finish = true;75757576// empty the queue first7577jQuery.queue( this, type, [] );75787579if ( hooks && hooks.stop ) {7580hooks.stop.call( this, true );7581}75827583// look for any active animations, and finish them7584for ( index = timers.length; index--; ) {7585if ( timers[ index ].elem === this && timers[ index ].queue === type ) {7586timers[ index ].anim.stop( true );7587timers.splice( index, 1 );7588}7589}75907591// look for any animations in the old queue and finish them7592for ( index = 0; index < length; index++ ) {7593if ( queue[ index ] && queue[ index ].finish ) {7594queue[ index ].finish.call( this );7595}7596}75977598// turn off finishing flag7599delete data.finish;7600});7601}7602});76037604jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {7605var cssFn = jQuery.fn[ name ];7606jQuery.fn[ name ] = function( speed, easing, callback ) {7607return speed == null || typeof speed === "boolean" ?7608cssFn.apply( this, arguments ) :7609this.animate( genFx( name, true ), speed, easing, callback );7610};7611});76127613// Generate shortcuts for custom animations7614jQuery.each({7615slideDown: genFx("show"),7616slideUp: genFx("hide"),7617slideToggle: genFx("toggle"),7618fadeIn: { opacity: "show" },7619fadeOut: { opacity: "hide" },7620fadeToggle: { opacity: "toggle" }7621}, function( name, props ) {7622jQuery.fn[ name ] = function( speed, easing, callback ) {7623return this.animate( props, speed, easing, callback );7624};7625});76267627jQuery.timers = [];7628jQuery.fx.tick = function() {7629var timer,7630timers = jQuery.timers,7631i = 0;76327633fxNow = jQuery.now();76347635for ( ; i < timers.length; i++ ) {7636timer = timers[ i ];7637// Checks the timer has not already been removed7638if ( !timer() && timers[ i ] === timer ) {7639timers.splice( i--, 1 );7640}7641}76427643if ( !timers.length ) {7644jQuery.fx.stop();7645}7646fxNow = undefined;7647};76487649jQuery.fx.timer = function( timer ) {7650jQuery.timers.push( timer );7651if ( timer() ) {7652jQuery.fx.start();7653} else {7654jQuery.timers.pop();7655}7656};76577658jQuery.fx.interval = 13;76597660jQuery.fx.start = function() {7661if ( !timerId ) {7662timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );7663}7664};76657666jQuery.fx.stop = function() {7667clearInterval( timerId );7668timerId = null;7669};76707671jQuery.fx.speeds = {7672slow: 600,7673fast: 200,7674// Default speed7675_default: 4007676};767776787679// Based off of the plugin by Clint Helfers, with permission.7680// http://blindsignals.com/index.php/2009/07/jquery-delay/7681jQuery.fn.delay = function( time, type ) {7682time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;7683type = type || "fx";76847685return this.queue( type, function( next, hooks ) {7686var timeout = setTimeout( next, time );7687hooks.stop = function() {7688clearTimeout( timeout );7689};7690});7691};769276937694(function() {7695// Minified: var a,b,c,d,e7696var input, div, select, a, opt;76977698// Setup7699div = document.createElement( "div" );7700div.setAttribute( "className", "t" );7701div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";7702a = div.getElementsByTagName("a")[ 0 ];77037704// First batch of tests.7705select = document.createElement("select");7706opt = select.appendChild( document.createElement("option") );7707input = div.getElementsByTagName("input")[ 0 ];77087709a.style.cssText = "top:1px";77107711// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)7712support.getSetAttribute = div.className !== "t";77137714// Get the style information from getAttribute7715// (IE uses .cssText instead)7716support.style = /top/.test( a.getAttribute("style") );77177718// Make sure that URLs aren't manipulated7719// (IE normalizes it by default)7720support.hrefNormalized = a.getAttribute("href") === "/a";77217722// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)7723support.checkOn = !!input.value;77247725// Make sure that a selected-by-default option has a working selected property.7726// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)7727support.optSelected = opt.selected;77287729// Tests for enctype support on a form (#6743)7730support.enctype = !!document.createElement("form").enctype;77317732// Make sure that the options inside disabled selects aren't marked as disabled7733// (WebKit marks them as disabled)7734select.disabled = true;7735support.optDisabled = !opt.disabled;77367737// Support: IE8 only7738// Check if we can trust getAttribute("value")7739input = document.createElement( "input" );7740input.setAttribute( "value", "" );7741support.input = input.getAttribute( "value" ) === "";77427743// Check if an input maintains its value after becoming a radio7744input.value = "t";7745input.setAttribute( "type", "radio" );7746support.radioValue = input.value === "t";7747})();774877497750var rreturn = /\r/g;77517752jQuery.fn.extend({7753val: function( value ) {7754var hooks, ret, isFunction,7755elem = this[0];77567757if ( !arguments.length ) {7758if ( elem ) {7759hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];77607761if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {7762return ret;7763}77647765ret = elem.value;77667767return typeof ret === "string" ?7768// handle most common string cases7769ret.replace(rreturn, "") :7770// handle cases where value is null/undef or number7771ret == null ? "" : ret;7772}77737774return;7775}77767777isFunction = jQuery.isFunction( value );77787779return this.each(function( i ) {7780var val;77817782if ( this.nodeType !== 1 ) {7783return;7784}77857786if ( isFunction ) {7787val = value.call( this, i, jQuery( this ).val() );7788} else {7789val = value;7790}77917792// Treat null/undefined as ""; convert numbers to string7793if ( val == null ) {7794val = "";7795} else if ( typeof val === "number" ) {7796val += "";7797} else if ( jQuery.isArray( val ) ) {7798val = jQuery.map( val, function( value ) {7799return value == null ? "" : value + "";7800});7801}78027803hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];78047805// If set returns undefined, fall back to normal setting7806if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {7807this.value = val;7808}7809});7810}7811});78127813jQuery.extend({7814valHooks: {7815option: {7816get: function( elem ) {7817var val = jQuery.find.attr( elem, "value" );7818return val != null ?7819val :7820// Support: IE10-11+7821// option.text throws exceptions (#14686, #14858)7822jQuery.trim( jQuery.text( elem ) );7823}7824},7825select: {7826get: function( elem ) {7827var value, option,7828options = elem.options,7829index = elem.selectedIndex,7830one = elem.type === "select-one" || index < 0,7831values = one ? null : [],7832max = one ? index + 1 : options.length,7833i = index < 0 ?7834max :7835one ? index : 0;78367837// Loop through all the selected options7838for ( ; i < max; i++ ) {7839option = options[ i ];78407841// oldIE doesn't update selected after form reset (#2551)7842if ( ( option.selected || i === index ) &&7843// Don't return options that are disabled or in a disabled optgroup7844( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&7845( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {78467847// Get the specific value for the option7848value = jQuery( option ).val();78497850// We don't need an array for one selects7851if ( one ) {7852return value;7853}78547855// Multi-Selects return an array7856values.push( value );7857}7858}78597860return values;7861},78627863set: function( elem, value ) {7864var optionSet, option,7865options = elem.options,7866values = jQuery.makeArray( value ),7867i = options.length;78687869while ( i-- ) {7870option = options[ i ];78717872if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {78737874// Support: IE67875// When new option element is added to select box we need to7876// force reflow of newly added node in order to workaround delay7877// of initialization properties7878try {7879option.selected = optionSet = true;78807881} catch ( _ ) {78827883// Will be executed only in IE67884option.scrollHeight;7885}78867887} else {7888option.selected = false;7889}7890}78917892// Force browsers to behave consistently when non-matching value is set7893if ( !optionSet ) {7894elem.selectedIndex = -1;7895}78967897return options;7898}7899}7900}7901});79027903// Radios and checkboxes getter/setter7904jQuery.each([ "radio", "checkbox" ], function() {7905jQuery.valHooks[ this ] = {7906set: function( elem, value ) {7907if ( jQuery.isArray( value ) ) {7908return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );7909}7910}7911};7912if ( !support.checkOn ) {7913jQuery.valHooks[ this ].get = function( elem ) {7914// Support: Webkit7915// "" is returned instead of "on" if a value isn't specified7916return elem.getAttribute("value") === null ? "on" : elem.value;7917};7918}7919});79207921792279237924var nodeHook, boolHook,7925attrHandle = jQuery.expr.attrHandle,7926ruseDefault = /^(?:checked|selected)$/i,7927getSetAttribute = support.getSetAttribute,7928getSetInput = support.input;79297930jQuery.fn.extend({7931attr: function( name, value ) {7932return access( this, jQuery.attr, name, value, arguments.length > 1 );7933},79347935removeAttr: function( name ) {7936return this.each(function() {7937jQuery.removeAttr( this, name );7938});7939}7940});79417942jQuery.extend({7943attr: function( elem, name, value ) {7944var hooks, ret,7945nType = elem.nodeType;79467947// don't get/set attributes on text, comment and attribute nodes7948if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {7949return;7950}79517952// Fallback to prop when attributes are not supported7953if ( typeof elem.getAttribute === strundefined ) {7954return jQuery.prop( elem, name, value );7955}79567957// All attributes are lowercase7958// Grab necessary hook if one is defined7959if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {7960name = name.toLowerCase();7961hooks = jQuery.attrHooks[ name ] ||7962( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );7963}79647965if ( value !== undefined ) {79667967if ( value === null ) {7968jQuery.removeAttr( elem, name );79697970} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {7971return ret;79727973} else {7974elem.setAttribute( name, value + "" );7975return value;7976}79777978} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {7979return ret;79807981} else {7982ret = jQuery.find.attr( elem, name );79837984// Non-existent attributes return null, we normalize to undefined7985return ret == null ?7986undefined :7987ret;7988}7989},79907991removeAttr: function( elem, value ) {7992var name, propName,7993i = 0,7994attrNames = value && value.match( rnotwhite );79957996if ( attrNames && elem.nodeType === 1 ) {7997while ( (name = attrNames[i++]) ) {7998propName = jQuery.propFix[ name ] || name;79998000// Boolean attributes get special treatment (#10870)8001if ( jQuery.expr.match.bool.test( name ) ) {8002// Set corresponding property to false8003if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {8004elem[ propName ] = false;8005// Support: IE<98006// Also clear defaultChecked/defaultSelected (if appropriate)8007} else {8008elem[ jQuery.camelCase( "default-" + name ) ] =8009elem[ propName ] = false;8010}80118012// See #9699 for explanation of this approach (setting first, then removal)8013} else {8014jQuery.attr( elem, name, "" );8015}80168017elem.removeAttribute( getSetAttribute ? name : propName );8018}8019}8020},80218022attrHooks: {8023type: {8024set: function( elem, value ) {8025if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {8026// Setting the type on a radio button after the value resets the value in IE6-98027// Reset value to default in case type is set after value during creation8028var val = elem.value;8029elem.setAttribute( "type", value );8030if ( val ) {8031elem.value = val;8032}8033return value;8034}8035}8036}8037}8038});80398040// Hook for boolean attributes8041boolHook = {8042set: function( elem, value, name ) {8043if ( value === false ) {8044// Remove boolean attributes when set to false8045jQuery.removeAttr( elem, name );8046} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {8047// IE<8 needs the *property* name8048elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );80498050// Use defaultChecked and defaultSelected for oldIE8051} else {8052elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;8053}80548055return name;8056}8057};80588059// Retrieve booleans specially8060jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {80618062var getter = attrHandle[ name ] || jQuery.find.attr;80638064attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?8065function( elem, name, isXML ) {8066var ret, handle;8067if ( !isXML ) {8068// Avoid an infinite loop by temporarily removing this function from the getter8069handle = attrHandle[ name ];8070attrHandle[ name ] = ret;8071ret = getter( elem, name, isXML ) != null ?8072name.toLowerCase() :8073null;8074attrHandle[ name ] = handle;8075}8076return ret;8077} :8078function( elem, name, isXML ) {8079if ( !isXML ) {8080return elem[ jQuery.camelCase( "default-" + name ) ] ?8081name.toLowerCase() :8082null;8083}8084};8085});80868087// fix oldIE attroperties8088if ( !getSetInput || !getSetAttribute ) {8089jQuery.attrHooks.value = {8090set: function( elem, value, name ) {8091if ( jQuery.nodeName( elem, "input" ) ) {8092// Does not return so that setAttribute is also used8093elem.defaultValue = value;8094} else {8095// Use nodeHook if defined (#1954); otherwise setAttribute is fine8096return nodeHook && nodeHook.set( elem, value, name );8097}8098}8099};8100}81018102// IE6/7 do not support getting/setting some attributes with get/setAttribute8103if ( !getSetAttribute ) {81048105// Use this for any attribute in IE6/78106// This fixes almost every IE6/7 issue8107nodeHook = {8108set: function( elem, value, name ) {8109// Set the existing or create a new attribute node8110var ret = elem.getAttributeNode( name );8111if ( !ret ) {8112elem.setAttributeNode(8113(ret = elem.ownerDocument.createAttribute( name ))8114);8115}81168117ret.value = value += "";81188119// Break association with cloned elements by also using setAttribute (#9646)8120if ( name === "value" || value === elem.getAttribute( name ) ) {8121return value;8122}8123}8124};81258126// Some attributes are constructed with empty-string values when not defined8127attrHandle.id = attrHandle.name = attrHandle.coords =8128function( elem, name, isXML ) {8129var ret;8130if ( !isXML ) {8131return (ret = elem.getAttributeNode( name )) && ret.value !== "" ?8132ret.value :8133null;8134}8135};81368137// Fixing value retrieval on a button requires this module8138jQuery.valHooks.button = {8139get: function( elem, name ) {8140var ret = elem.getAttributeNode( name );8141if ( ret && ret.specified ) {8142return ret.value;8143}8144},8145set: nodeHook.set8146};81478148// Set contenteditable to false on removals(#10429)8149// Setting to empty string throws an error as an invalid value8150jQuery.attrHooks.contenteditable = {8151set: function( elem, value, name ) {8152nodeHook.set( elem, value === "" ? false : value, name );8153}8154};81558156// Set width and height to auto instead of 0 on empty string( Bug #8150 )8157// This is for removals8158jQuery.each([ "width", "height" ], function( i, name ) {8159jQuery.attrHooks[ name ] = {8160set: function( elem, value ) {8161if ( value === "" ) {8162elem.setAttribute( name, "auto" );8163return value;8164}8165}8166};8167});8168}81698170if ( !support.style ) {8171jQuery.attrHooks.style = {8172get: function( elem ) {8173// Return undefined in the case of empty string8174// Note: IE uppercases css property names, but if we were to .toLowerCase()8175// .cssText, that would destroy case senstitivity in URL's, like in "background"8176return elem.style.cssText || undefined;8177},8178set: function( elem, value ) {8179return ( elem.style.cssText = value + "" );8180}8181};8182}81838184818581868187var rfocusable = /^(?:input|select|textarea|button|object)$/i,8188rclickable = /^(?:a|area)$/i;81898190jQuery.fn.extend({8191prop: function( name, value ) {8192return access( this, jQuery.prop, name, value, arguments.length > 1 );8193},81948195removeProp: function( name ) {8196name = jQuery.propFix[ name ] || name;8197return this.each(function() {8198// try/catch handles cases where IE balks (such as removing a property on window)8199try {8200this[ name ] = undefined;8201delete this[ name ];8202} catch( e ) {}8203});8204}8205});82068207jQuery.extend({8208propFix: {8209"for": "htmlFor",8210"class": "className"8211},82128213prop: function( elem, name, value ) {8214var ret, hooks, notxml,8215nType = elem.nodeType;82168217// don't get/set properties on text, comment and attribute nodes8218if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {8219return;8220}82218222notxml = nType !== 1 || !jQuery.isXMLDoc( elem );82238224if ( notxml ) {8225// Fix name and attach hooks8226name = jQuery.propFix[ name ] || name;8227hooks = jQuery.propHooks[ name ];8228}82298230if ( value !== undefined ) {8231return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?8232ret :8233( elem[ name ] = value );82348235} else {8236return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?8237ret :8238elem[ name ];8239}8240},82418242propHooks: {8243tabIndex: {8244get: function( elem ) {8245// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set8246// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/8247// Use proper attribute retrieval(#12072)8248var tabindex = jQuery.find.attr( elem, "tabindex" );82498250return tabindex ?8251parseInt( tabindex, 10 ) :8252rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?82530 :8254-1;8255}8256}8257}8258});82598260// Some attributes require a special call on IE8261// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx8262if ( !support.hrefNormalized ) {8263// href/src property should get the full normalized URL (#10299/#12915)8264jQuery.each([ "href", "src" ], function( i, name ) {8265jQuery.propHooks[ name ] = {8266get: function( elem ) {8267return elem.getAttribute( name, 4 );8268}8269};8270});8271}82728273// Support: Safari, IE9+8274// mis-reports the default selected property of an option8275// Accessing the parent's selectedIndex property fixes it8276if ( !support.optSelected ) {8277jQuery.propHooks.selected = {8278get: function( elem ) {8279var parent = elem.parentNode;82808281if ( parent ) {8282parent.selectedIndex;82838284// Make sure that it also works with optgroups, see #57018285if ( parent.parentNode ) {8286parent.parentNode.selectedIndex;8287}8288}8289return null;8290}8291};8292}82938294jQuery.each([8295"tabIndex",8296"readOnly",8297"maxLength",8298"cellSpacing",8299"cellPadding",8300"rowSpan",8301"colSpan",8302"useMap",8303"frameBorder",8304"contentEditable"8305], function() {8306jQuery.propFix[ this.toLowerCase() ] = this;8307});83088309// IE6/7 call enctype encoding8310if ( !support.enctype ) {8311jQuery.propFix.enctype = "encoding";8312}83138314831583168317var rclass = /[\t\r\n\f]/g;83188319jQuery.fn.extend({8320addClass: function( value ) {8321var classes, elem, cur, clazz, j, finalValue,8322i = 0,8323len = this.length,8324proceed = typeof value === "string" && value;83258326if ( jQuery.isFunction( value ) ) {8327return this.each(function( j ) {8328jQuery( this ).addClass( value.call( this, j, this.className ) );8329});8330}83318332if ( proceed ) {8333// The disjunction here is for better compressibility (see removeClass)8334classes = ( value || "" ).match( rnotwhite ) || [];83358336for ( ; i < len; i++ ) {8337elem = this[ i ];8338cur = elem.nodeType === 1 && ( elem.className ?8339( " " + elem.className + " " ).replace( rclass, " " ) :8340" "8341);83428343if ( cur ) {8344j = 0;8345while ( (clazz = classes[j++]) ) {8346if ( cur.indexOf( " " + clazz + " " ) < 0 ) {8347cur += clazz + " ";8348}8349}83508351// only assign if different to avoid unneeded rendering.8352finalValue = jQuery.trim( cur );8353if ( elem.className !== finalValue ) {8354elem.className = finalValue;8355}8356}8357}8358}83598360return this;8361},83628363removeClass: function( value ) {8364var classes, elem, cur, clazz, j, finalValue,8365i = 0,8366len = this.length,8367proceed = arguments.length === 0 || typeof value === "string" && value;83688369if ( jQuery.isFunction( value ) ) {8370return this.each(function( j ) {8371jQuery( this ).removeClass( value.call( this, j, this.className ) );8372});8373}8374if ( proceed ) {8375classes = ( value || "" ).match( rnotwhite ) || [];83768377for ( ; i < len; i++ ) {8378elem = this[ i ];8379// This expression is here for better compressibility (see addClass)8380cur = elem.nodeType === 1 && ( elem.className ?8381( " " + elem.className + " " ).replace( rclass, " " ) :8382""8383);83848385if ( cur ) {8386j = 0;8387while ( (clazz = classes[j++]) ) {8388// Remove *all* instances8389while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {8390cur = cur.replace( " " + clazz + " ", " " );8391}8392}83938394// only assign if different to avoid unneeded rendering.8395finalValue = value ? jQuery.trim( cur ) : "";8396if ( elem.className !== finalValue ) {8397elem.className = finalValue;8398}8399}8400}8401}84028403return this;8404},84058406toggleClass: function( value, stateVal ) {8407var type = typeof value;84088409if ( typeof stateVal === "boolean" && type === "string" ) {8410return stateVal ? this.addClass( value ) : this.removeClass( value );8411}84128413if ( jQuery.isFunction( value ) ) {8414return this.each(function( i ) {8415jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );8416});8417}84188419return this.each(function() {8420if ( type === "string" ) {8421// toggle individual class names8422var className,8423i = 0,8424self = jQuery( this ),8425classNames = value.match( rnotwhite ) || [];84268427while ( (className = classNames[ i++ ]) ) {8428// check each className given, space separated list8429if ( self.hasClass( className ) ) {8430self.removeClass( className );8431} else {8432self.addClass( className );8433}8434}84358436// Toggle whole class name8437} else if ( type === strundefined || type === "boolean" ) {8438if ( this.className ) {8439// store className if set8440jQuery._data( this, "__className__", this.className );8441}84428443// If the element has a class name or if we're passed "false",8444// then remove the whole classname (if there was one, the above saved it).8445// Otherwise bring back whatever was previously saved (if anything),8446// falling back to the empty string if nothing was stored.8447this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";8448}8449});8450},84518452hasClass: function( selector ) {8453var className = " " + selector + " ",8454i = 0,8455l = this.length;8456for ( ; i < l; i++ ) {8457if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {8458return true;8459}8460}84618462return false;8463}8464});84658466846784688469// Return jQuery for attributes-only inclusion847084718472jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +8473"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +8474"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {84758476// Handle event binding8477jQuery.fn[ name ] = function( data, fn ) {8478return arguments.length > 0 ?8479this.on( name, null, data, fn ) :8480this.trigger( name );8481};8482});84838484jQuery.fn.extend({8485hover: function( fnOver, fnOut ) {8486return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );8487},84888489bind: function( types, data, fn ) {8490return this.on( types, null, data, fn );8491},8492unbind: function( types, fn ) {8493return this.off( types, null, fn );8494},84958496delegate: function( selector, types, data, fn ) {8497return this.on( types, selector, data, fn );8498},8499undelegate: function( selector, types, fn ) {8500// ( namespace ) or ( selector, types [, fn] )8501return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );8502}8503});850485058506var nonce = jQuery.now();85078508var rquery = (/\?/);8509851085118512var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;85138514jQuery.parseJSON = function( data ) {8515// Attempt to parse using the native JSON parser first8516if ( window.JSON && window.JSON.parse ) {8517// Support: Android 2.38518// Workaround failure to string-cast null input8519return window.JSON.parse( data + "" );8520}85218522var requireNonComma,8523depth = null,8524str = jQuery.trim( data + "" );85258526// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains8527// after removing valid tokens8528return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {85298530// Force termination if we see a misplaced comma8531if ( requireNonComma && comma ) {8532depth = 0;8533}85348535// Perform no more replacements after returning to outermost depth8536if ( depth === 0 ) {8537return token;8538}85398540// Commas must not follow "[", "{", or ","8541requireNonComma = open || comma;85428543// Determine new depth8544// array/object open ("[" or "{"): depth += true - false (increment)8545// array/object close ("]" or "}"): depth += false - true (decrement)8546// other cases ("," or primitive): depth += true - true (numeric cast)8547depth += !close - !open;85488549// Remove this token8550return "";8551}) ) ?8552( Function( "return " + str ) )() :8553jQuery.error( "Invalid JSON: " + data );8554};855585568557// Cross-browser xml parsing8558jQuery.parseXML = function( data ) {8559var xml, tmp;8560if ( !data || typeof data !== "string" ) {8561return null;8562}8563try {8564if ( window.DOMParser ) { // Standard8565tmp = new DOMParser();8566xml = tmp.parseFromString( data, "text/xml" );8567} else { // IE8568xml = new ActiveXObject( "Microsoft.XMLDOM" );8569xml.async = "false";8570xml.loadXML( data );8571}8572} catch( e ) {8573xml = undefined;8574}8575if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {8576jQuery.error( "Invalid XML: " + data );8577}8578return xml;8579};858085818582var8583// Document location8584ajaxLocParts,8585ajaxLocation,85868587rhash = /#.*$/,8588rts = /([?&])_=[^&]*/,8589rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL8590// #7653, #8125, #8152: local protocol detection8591rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,8592rnoContent = /^(?:GET|HEAD)$/,8593rprotocol = /^\/\//,8594rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,85958596/* Prefilters8597* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)8598* 2) These are called:8599* - BEFORE asking for a transport8600* - AFTER param serialization (s.data is a string if s.processData is true)8601* 3) key is the dataType8602* 4) the catchall symbol "*" can be used8603* 5) execution will start with transport dataType and THEN continue down to "*" if needed8604*/8605prefilters = {},86068607/* Transports bindings8608* 1) key is the dataType8609* 2) the catchall symbol "*" can be used8610* 3) selection will start with transport dataType and THEN go to "*" if needed8611*/8612transports = {},86138614// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression8615allTypes = "*/".concat("*");86168617// #8138, IE may throw an exception when accessing8618// a field from window.location if document.domain has been set8619try {8620ajaxLocation = location.href;8621} catch( e ) {8622// Use the href attribute of an A element8623// since IE will modify it given document.location8624ajaxLocation = document.createElement( "a" );8625ajaxLocation.href = "";8626ajaxLocation = ajaxLocation.href;8627}86288629// Segment location into parts8630ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];86318632// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport8633function addToPrefiltersOrTransports( structure ) {86348635// dataTypeExpression is optional and defaults to "*"8636return function( dataTypeExpression, func ) {86378638if ( typeof dataTypeExpression !== "string" ) {8639func = dataTypeExpression;8640dataTypeExpression = "*";8641}86428643var dataType,8644i = 0,8645dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];86468647if ( jQuery.isFunction( func ) ) {8648// For each dataType in the dataTypeExpression8649while ( (dataType = dataTypes[i++]) ) {8650// Prepend if requested8651if ( dataType.charAt( 0 ) === "+" ) {8652dataType = dataType.slice( 1 ) || "*";8653(structure[ dataType ] = structure[ dataType ] || []).unshift( func );86548655// Otherwise append8656} else {8657(structure[ dataType ] = structure[ dataType ] || []).push( func );8658}8659}8660}8661};8662}86638664// Base inspection function for prefilters and transports8665function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {86668667var inspected = {},8668seekingTransport = ( structure === transports );86698670function inspect( dataType ) {8671var selected;8672inspected[ dataType ] = true;8673jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {8674var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );8675if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {8676options.dataTypes.unshift( dataTypeOrTransport );8677inspect( dataTypeOrTransport );8678return false;8679} else if ( seekingTransport ) {8680return !( selected = dataTypeOrTransport );8681}8682});8683return selected;8684}86858686return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );8687}86888689// A special extend for ajax options8690// that takes "flat" options (not to be deep extended)8691// Fixes #98878692function ajaxExtend( target, src ) {8693var deep, key,8694flatOptions = jQuery.ajaxSettings.flatOptions || {};86958696for ( key in src ) {8697if ( src[ key ] !== undefined ) {8698( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];8699}8700}8701if ( deep ) {8702jQuery.extend( true, target, deep );8703}87048705return target;8706}87078708/* Handles responses to an ajax request:8709* - finds the right dataType (mediates between content-type and expected dataType)8710* - returns the corresponding response8711*/8712function ajaxHandleResponses( s, jqXHR, responses ) {8713var firstDataType, ct, finalDataType, type,8714contents = s.contents,8715dataTypes = s.dataTypes;87168717// Remove auto dataType and get content-type in the process8718while ( dataTypes[ 0 ] === "*" ) {8719dataTypes.shift();8720if ( ct === undefined ) {8721ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");8722}8723}87248725// Check if we're dealing with a known content-type8726if ( ct ) {8727for ( type in contents ) {8728if ( contents[ type ] && contents[ type ].test( ct ) ) {8729dataTypes.unshift( type );8730break;8731}8732}8733}87348735// Check to see if we have a response for the expected dataType8736if ( dataTypes[ 0 ] in responses ) {8737finalDataType = dataTypes[ 0 ];8738} else {8739// Try convertible dataTypes8740for ( type in responses ) {8741if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {8742finalDataType = type;8743break;8744}8745if ( !firstDataType ) {8746firstDataType = type;8747}8748}8749// Or just use first one8750finalDataType = finalDataType || firstDataType;8751}87528753// If we found a dataType8754// We add the dataType to the list if needed8755// and return the corresponding response8756if ( finalDataType ) {8757if ( finalDataType !== dataTypes[ 0 ] ) {8758dataTypes.unshift( finalDataType );8759}8760return responses[ finalDataType ];8761}8762}87638764/* Chain conversions given the request and the original response8765* Also sets the responseXXX fields on the jqXHR instance8766*/8767function ajaxConvert( s, response, jqXHR, isSuccess ) {8768var conv2, current, conv, tmp, prev,8769converters = {},8770// Work with a copy of dataTypes in case we need to modify it for conversion8771dataTypes = s.dataTypes.slice();87728773// Create converters map with lowercased keys8774if ( dataTypes[ 1 ] ) {8775for ( conv in s.converters ) {8776converters[ conv.toLowerCase() ] = s.converters[ conv ];8777}8778}87798780current = dataTypes.shift();87818782// Convert to each sequential dataType8783while ( current ) {87848785if ( s.responseFields[ current ] ) {8786jqXHR[ s.responseFields[ current ] ] = response;8787}87888789// Apply the dataFilter if provided8790if ( !prev && isSuccess && s.dataFilter ) {8791response = s.dataFilter( response, s.dataType );8792}87938794prev = current;8795current = dataTypes.shift();87968797if ( current ) {87988799// There's only work to do if current dataType is non-auto8800if ( current === "*" ) {88018802current = prev;88038804// Convert response if prev dataType is non-auto and differs from current8805} else if ( prev !== "*" && prev !== current ) {88068807// Seek a direct converter8808conv = converters[ prev + " " + current ] || converters[ "* " + current ];88098810// If none found, seek a pair8811if ( !conv ) {8812for ( conv2 in converters ) {88138814// If conv2 outputs current8815tmp = conv2.split( " " );8816if ( tmp[ 1 ] === current ) {88178818// If prev can be converted to accepted input8819conv = converters[ prev + " " + tmp[ 0 ] ] ||8820converters[ "* " + tmp[ 0 ] ];8821if ( conv ) {8822// Condense equivalence converters8823if ( conv === true ) {8824conv = converters[ conv2 ];88258826// Otherwise, insert the intermediate dataType8827} else if ( converters[ conv2 ] !== true ) {8828current = tmp[ 0 ];8829dataTypes.unshift( tmp[ 1 ] );8830}8831break;8832}8833}8834}8835}88368837// Apply converter (if not an equivalence)8838if ( conv !== true ) {88398840// Unless errors are allowed to bubble, catch and return them8841if ( conv && s[ "throws" ] ) {8842response = conv( response );8843} else {8844try {8845response = conv( response );8846} catch ( e ) {8847return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };8848}8849}8850}8851}8852}8853}88548855return { state: "success", data: response };8856}88578858jQuery.extend({88598860// Counter for holding the number of active queries8861active: 0,88628863// Last-Modified header cache for next request8864lastModified: {},8865etag: {},88668867ajaxSettings: {8868url: ajaxLocation,8869type: "GET",8870isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),8871global: true,8872processData: true,8873async: true,8874contentType: "application/x-www-form-urlencoded; charset=UTF-8",8875/*8876timeout: 0,8877data: null,8878dataType: null,8879username: null,8880password: null,8881cache: null,8882throws: false,8883traditional: false,8884headers: {},8885*/88868887accepts: {8888"*": allTypes,8889text: "text/plain",8890html: "text/html",8891xml: "application/xml, text/xml",8892json: "application/json, text/javascript"8893},88948895contents: {8896xml: /xml/,8897html: /html/,8898json: /json/8899},89008901responseFields: {8902xml: "responseXML",8903text: "responseText",8904json: "responseJSON"8905},89068907// Data converters8908// Keys separate source (or catchall "*") and destination types with a single space8909converters: {89108911// Convert anything to text8912"* text": String,89138914// Text to html (true = no transformation)8915"text html": true,89168917// Evaluate text as a json expression8918"text json": jQuery.parseJSON,89198920// Parse text as xml8921"text xml": jQuery.parseXML8922},89238924// For options that shouldn't be deep extended:8925// you can add your own custom options here if8926// and when you create one that shouldn't be8927// deep extended (see ajaxExtend)8928flatOptions: {8929url: true,8930context: true8931}8932},89338934// Creates a full fledged settings object into target8935// with both ajaxSettings and settings fields.8936// If target is omitted, writes into ajaxSettings.8937ajaxSetup: function( target, settings ) {8938return settings ?89398940// Building a settings object8941ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :89428943// Extending ajaxSettings8944ajaxExtend( jQuery.ajaxSettings, target );8945},89468947ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),8948ajaxTransport: addToPrefiltersOrTransports( transports ),89498950// Main method8951ajax: function( url, options ) {89528953// If url is an object, simulate pre-1.5 signature8954if ( typeof url === "object" ) {8955options = url;8956url = undefined;8957}89588959// Force options to be an object8960options = options || {};89618962var // Cross-domain detection vars8963parts,8964// Loop variable8965i,8966// URL without anti-cache param8967cacheURL,8968// Response headers as string8969responseHeadersString,8970// timeout handle8971timeoutTimer,89728973// To know if global events are to be dispatched8974fireGlobals,89758976transport,8977// Response headers8978responseHeaders,8979// Create the final options object8980s = jQuery.ajaxSetup( {}, options ),8981// Callbacks context8982callbackContext = s.context || s,8983// Context for global events is callbackContext if it is a DOM node or jQuery collection8984globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?8985jQuery( callbackContext ) :8986jQuery.event,8987// Deferreds8988deferred = jQuery.Deferred(),8989completeDeferred = jQuery.Callbacks("once memory"),8990// Status-dependent callbacks8991statusCode = s.statusCode || {},8992// Headers (they are sent all at once)8993requestHeaders = {},8994requestHeadersNames = {},8995// The jqXHR state8996state = 0,8997// Default abort message8998strAbort = "canceled",8999// Fake xhr9000jqXHR = {9001readyState: 0,90029003// Builds headers hashtable if needed9004getResponseHeader: function( key ) {9005var match;9006if ( state === 2 ) {9007if ( !responseHeaders ) {9008responseHeaders = {};9009while ( (match = rheaders.exec( responseHeadersString )) ) {9010responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];9011}9012}9013match = responseHeaders[ key.toLowerCase() ];9014}9015return match == null ? null : match;9016},90179018// Raw string9019getAllResponseHeaders: function() {9020return state === 2 ? responseHeadersString : null;9021},90229023// Caches the header9024setRequestHeader: function( name, value ) {9025var lname = name.toLowerCase();9026if ( !state ) {9027name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;9028requestHeaders[ name ] = value;9029}9030return this;9031},90329033// Overrides response content-type header9034overrideMimeType: function( type ) {9035if ( !state ) {9036s.mimeType = type;9037}9038return this;9039},90409041// Status-dependent callbacks9042statusCode: function( map ) {9043var code;9044if ( map ) {9045if ( state < 2 ) {9046for ( code in map ) {9047// Lazy-add the new callback in a way that preserves old ones9048statusCode[ code ] = [ statusCode[ code ], map[ code ] ];9049}9050} else {9051// Execute the appropriate callbacks9052jqXHR.always( map[ jqXHR.status ] );9053}9054}9055return this;9056},90579058// Cancel the request9059abort: function( statusText ) {9060var finalText = statusText || strAbort;9061if ( transport ) {9062transport.abort( finalText );9063}9064done( 0, finalText );9065return this;9066}9067};90689069// Attach deferreds9070deferred.promise( jqXHR ).complete = completeDeferred.add;9071jqXHR.success = jqXHR.done;9072jqXHR.error = jqXHR.fail;90739074// Remove hash character (#7531: and string promotion)9075// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)9076// Handle falsy url in the settings object (#10093: consistency with old signature)9077// We also use the url parameter if available9078s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );90799080// Alias method option to type as per ticket #120049081s.type = options.method || options.type || s.method || s.type;90829083// Extract dataTypes list9084s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];90859086// A cross-domain request is in order when we have a protocol:host:port mismatch9087if ( s.crossDomain == null ) {9088parts = rurl.exec( s.url.toLowerCase() );9089s.crossDomain = !!( parts &&9090( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||9091( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==9092( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )9093);9094}90959096// Convert data if not already a string9097if ( s.data && s.processData && typeof s.data !== "string" ) {9098s.data = jQuery.param( s.data, s.traditional );9099}91009101// Apply prefilters9102inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );91039104// If request was aborted inside a prefilter, stop there9105if ( state === 2 ) {9106return jqXHR;9107}91089109// We can fire global events as of now if asked to9110// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)9111fireGlobals = jQuery.event && s.global;91129113// Watch for a new set of requests9114if ( fireGlobals && jQuery.active++ === 0 ) {9115jQuery.event.trigger("ajaxStart");9116}91179118// Uppercase the type9119s.type = s.type.toUpperCase();91209121// Determine if request has content9122s.hasContent = !rnoContent.test( s.type );91239124// Save the URL in case we're toying with the If-Modified-Since9125// and/or If-None-Match header later on9126cacheURL = s.url;91279128// More options handling for requests with no content9129if ( !s.hasContent ) {91309131// If data is available, append data to url9132if ( s.data ) {9133cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );9134// #9682: remove data so that it's not used in an eventual retry9135delete s.data;9136}91379138// Add anti-cache in url if needed9139if ( s.cache === false ) {9140s.url = rts.test( cacheURL ) ?91419142// If there is already a '_' parameter, set its value9143cacheURL.replace( rts, "$1_=" + nonce++ ) :91449145// Otherwise add one to the end9146cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;9147}9148}91499150// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.9151if ( s.ifModified ) {9152if ( jQuery.lastModified[ cacheURL ] ) {9153jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );9154}9155if ( jQuery.etag[ cacheURL ] ) {9156jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );9157}9158}91599160// Set the correct header, if data is being sent9161if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {9162jqXHR.setRequestHeader( "Content-Type", s.contentType );9163}91649165// Set the Accepts header for the server, depending on the dataType9166jqXHR.setRequestHeader(9167"Accept",9168s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?9169s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :9170s.accepts[ "*" ]9171);91729173// Check for headers option9174for ( i in s.headers ) {9175jqXHR.setRequestHeader( i, s.headers[ i ] );9176}91779178// Allow custom headers/mimetypes and early abort9179if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {9180// Abort if not done already and return9181return jqXHR.abort();9182}91839184// aborting is no longer a cancellation9185strAbort = "abort";91869187// Install callbacks on deferreds9188for ( i in { success: 1, error: 1, complete: 1 } ) {9189jqXHR[ i ]( s[ i ] );9190}91919192// Get transport9193transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );91949195// If no transport, we auto-abort9196if ( !transport ) {9197done( -1, "No Transport" );9198} else {9199jqXHR.readyState = 1;92009201// Send global event9202if ( fireGlobals ) {9203globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );9204}9205// Timeout9206if ( s.async && s.timeout > 0 ) {9207timeoutTimer = setTimeout(function() {9208jqXHR.abort("timeout");9209}, s.timeout );9210}92119212try {9213state = 1;9214transport.send( requestHeaders, done );9215} catch ( e ) {9216// Propagate exception as error if not done9217if ( state < 2 ) {9218done( -1, e );9219// Simply rethrow otherwise9220} else {9221throw e;9222}9223}9224}92259226// Callback for when everything is done9227function done( status, nativeStatusText, responses, headers ) {9228var isSuccess, success, error, response, modified,9229statusText = nativeStatusText;92309231// Called once9232if ( state === 2 ) {9233return;9234}92359236// State is "done" now9237state = 2;92389239// Clear timeout if it exists9240if ( timeoutTimer ) {9241clearTimeout( timeoutTimer );9242}92439244// Dereference transport for early garbage collection9245// (no matter how long the jqXHR object will be used)9246transport = undefined;92479248// Cache response headers9249responseHeadersString = headers || "";92509251// Set readyState9252jqXHR.readyState = status > 0 ? 4 : 0;92539254// Determine if successful9255isSuccess = status >= 200 && status < 300 || status === 304;92569257// Get response data9258if ( responses ) {9259response = ajaxHandleResponses( s, jqXHR, responses );9260}92619262// Convert no matter what (that way responseXXX fields are always set)9263response = ajaxConvert( s, response, jqXHR, isSuccess );92649265// If successful, handle type chaining9266if ( isSuccess ) {92679268// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.9269if ( s.ifModified ) {9270modified = jqXHR.getResponseHeader("Last-Modified");9271if ( modified ) {9272jQuery.lastModified[ cacheURL ] = modified;9273}9274modified = jqXHR.getResponseHeader("etag");9275if ( modified ) {9276jQuery.etag[ cacheURL ] = modified;9277}9278}92799280// if no content9281if ( status === 204 || s.type === "HEAD" ) {9282statusText = "nocontent";92839284// if not modified9285} else if ( status === 304 ) {9286statusText = "notmodified";92879288// If we have data, let's convert it9289} else {9290statusText = response.state;9291success = response.data;9292error = response.error;9293isSuccess = !error;9294}9295} else {9296// We extract error from statusText9297// then normalize statusText and status for non-aborts9298error = statusText;9299if ( status || !statusText ) {9300statusText = "error";9301if ( status < 0 ) {9302status = 0;9303}9304}9305}93069307// Set data for the fake xhr object9308jqXHR.status = status;9309jqXHR.statusText = ( nativeStatusText || statusText ) + "";93109311// Success/Error9312if ( isSuccess ) {9313deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );9314} else {9315deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );9316}93179318// Status-dependent callbacks9319jqXHR.statusCode( statusCode );9320statusCode = undefined;93219322if ( fireGlobals ) {9323globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",9324[ jqXHR, s, isSuccess ? success : error ] );9325}93269327// Complete9328completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );93299330if ( fireGlobals ) {9331globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );9332// Handle the global AJAX counter9333if ( !( --jQuery.active ) ) {9334jQuery.event.trigger("ajaxStop");9335}9336}9337}93389339return jqXHR;9340},93419342getJSON: function( url, data, callback ) {9343return jQuery.get( url, data, callback, "json" );9344},93459346getScript: function( url, callback ) {9347return jQuery.get( url, undefined, callback, "script" );9348}9349});93509351jQuery.each( [ "get", "post" ], function( i, method ) {9352jQuery[ method ] = function( url, data, callback, type ) {9353// shift arguments if data argument was omitted9354if ( jQuery.isFunction( data ) ) {9355type = type || callback;9356callback = data;9357data = undefined;9358}93599360return jQuery.ajax({9361url: url,9362type: method,9363dataType: type,9364data: data,9365success: callback9366});9367};9368});936993709371jQuery._evalUrl = function( url ) {9372return jQuery.ajax({9373url: url,9374type: "GET",9375dataType: "script",9376async: false,9377global: false,9378"throws": true9379});9380};938193829383jQuery.fn.extend({9384wrapAll: function( html ) {9385if ( jQuery.isFunction( html ) ) {9386return this.each(function(i) {9387jQuery(this).wrapAll( html.call(this, i) );9388});9389}93909391if ( this[0] ) {9392// The elements to wrap the target around9393var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);93949395if ( this[0].parentNode ) {9396wrap.insertBefore( this[0] );9397}93989399wrap.map(function() {9400var elem = this;94019402while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {9403elem = elem.firstChild;9404}94059406return elem;9407}).append( this );9408}94099410return this;9411},94129413wrapInner: function( html ) {9414if ( jQuery.isFunction( html ) ) {9415return this.each(function(i) {9416jQuery(this).wrapInner( html.call(this, i) );9417});9418}94199420return this.each(function() {9421var self = jQuery( this ),9422contents = self.contents();94239424if ( contents.length ) {9425contents.wrapAll( html );94269427} else {9428self.append( html );9429}9430});9431},94329433wrap: function( html ) {9434var isFunction = jQuery.isFunction( html );94359436return this.each(function(i) {9437jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );9438});9439},94409441unwrap: function() {9442return this.parent().each(function() {9443if ( !jQuery.nodeName( this, "body" ) ) {9444jQuery( this ).replaceWith( this.childNodes );9445}9446}).end();9447}9448});944994509451jQuery.expr.filters.hidden = function( elem ) {9452// Support: Opera <= 12.129453// Opera reports offsetWidths and offsetHeights less than zero on some elements9454return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||9455(!support.reliableHiddenOffsets() &&9456((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");9457};94589459jQuery.expr.filters.visible = function( elem ) {9460return !jQuery.expr.filters.hidden( elem );9461};94629463946494659466var r20 = /%20/g,9467rbracket = /\[\]$/,9468rCRLF = /\r?\n/g,9469rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,9470rsubmittable = /^(?:input|select|textarea|keygen)/i;94719472function buildParams( prefix, obj, traditional, add ) {9473var name;94749475if ( jQuery.isArray( obj ) ) {9476// Serialize array item.9477jQuery.each( obj, function( i, v ) {9478if ( traditional || rbracket.test( prefix ) ) {9479// Treat each array item as a scalar.9480add( prefix, v );94819482} else {9483// Item is non-scalar (array or object), encode its numeric index.9484buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );9485}9486});94879488} else if ( !traditional && jQuery.type( obj ) === "object" ) {9489// Serialize object item.9490for ( name in obj ) {9491buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );9492}94939494} else {9495// Serialize scalar item.9496add( prefix, obj );9497}9498}94999500// Serialize an array of form elements or a set of9501// key/values into a query string9502jQuery.param = function( a, traditional ) {9503var prefix,9504s = [],9505add = function( key, value ) {9506// If value is a function, invoke it and return its value9507value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );9508s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );9509};95109511// Set traditional to true for jQuery <= 1.3.2 behavior.9512if ( traditional === undefined ) {9513traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;9514}95159516// If an array was passed in, assume that it is an array of form elements.9517if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {9518// Serialize the form elements9519jQuery.each( a, function() {9520add( this.name, this.value );9521});95229523} else {9524// If traditional, encode the "old" way (the way 1.3.2 or older9525// did it), otherwise encode params recursively.9526for ( prefix in a ) {9527buildParams( prefix, a[ prefix ], traditional, add );9528}9529}95309531// Return the resulting serialization9532return s.join( "&" ).replace( r20, "+" );9533};95349535jQuery.fn.extend({9536serialize: function() {9537return jQuery.param( this.serializeArray() );9538},9539serializeArray: function() {9540return this.map(function() {9541// Can add propHook for "elements" to filter or add form elements9542var elements = jQuery.prop( this, "elements" );9543return elements ? jQuery.makeArray( elements ) : this;9544})9545.filter(function() {9546var type = this.type;9547// Use .is(":disabled") so that fieldset[disabled] works9548return this.name && !jQuery( this ).is( ":disabled" ) &&9549rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&9550( this.checked || !rcheckableType.test( type ) );9551})9552.map(function( i, elem ) {9553var val = jQuery( this ).val();95549555return val == null ?9556null :9557jQuery.isArray( val ) ?9558jQuery.map( val, function( val ) {9559return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };9560}) :9561{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };9562}).get();9563}9564});956595669567// Create the request object9568// (This is still attached to ajaxSettings for backward compatibility)9569jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?9570// Support: IE6+9571function() {95729573// XHR cannot access local files, always use ActiveX for that case9574return !this.isLocal &&95759576// Support: IE7-89577// oldIE XHR does not support non-RFC2616 methods (#13240)9578// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx9579// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec99580// Although this check for six methods instead of eight9581// since IE also does not support "trace" and "connect"9582/^(get|post|head|put|delete|options)$/i.test( this.type ) &&95839584createStandardXHR() || createActiveXHR();9585} :9586// For all other browsers, use the standard XMLHttpRequest object9587createStandardXHR;95889589var xhrId = 0,9590xhrCallbacks = {},9591xhrSupported = jQuery.ajaxSettings.xhr();95929593// Support: IE<109594// Open requests must be manually aborted on unload (#5280)9595// See https://support.microsoft.com/kb/2856746 for more info9596if ( window.attachEvent ) {9597window.attachEvent( "onunload", function() {9598for ( var key in xhrCallbacks ) {9599xhrCallbacks[ key ]( undefined, true );9600}9601});9602}96039604// Determine support properties9605support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );9606xhrSupported = support.ajax = !!xhrSupported;96079608// Create transport if the browser can provide an xhr9609if ( xhrSupported ) {96109611jQuery.ajaxTransport(function( options ) {9612// Cross domain only allowed if supported through XMLHttpRequest9613if ( !options.crossDomain || support.cors ) {96149615var callback;96169617return {9618send: function( headers, complete ) {9619var i,9620xhr = options.xhr(),9621id = ++xhrId;96229623// Open the socket9624xhr.open( options.type, options.url, options.async, options.username, options.password );96259626// Apply custom fields if provided9627if ( options.xhrFields ) {9628for ( i in options.xhrFields ) {9629xhr[ i ] = options.xhrFields[ i ];9630}9631}96329633// Override mime type if needed9634if ( options.mimeType && xhr.overrideMimeType ) {9635xhr.overrideMimeType( options.mimeType );9636}96379638// X-Requested-With header9639// For cross-domain requests, seeing as conditions for a preflight are9640// akin to a jigsaw puzzle, we simply never set it to be sure.9641// (it can always be set on a per-request basis or even using ajaxSetup)9642// For same-domain requests, won't change header if already provided.9643if ( !options.crossDomain && !headers["X-Requested-With"] ) {9644headers["X-Requested-With"] = "XMLHttpRequest";9645}96469647// Set headers9648for ( i in headers ) {9649// Support: IE<99650// IE's ActiveXObject throws a 'Type Mismatch' exception when setting9651// request header to a null-value.9652//9653// To keep consistent with other XHR implementations, cast the value9654// to string and ignore `undefined`.9655if ( headers[ i ] !== undefined ) {9656xhr.setRequestHeader( i, headers[ i ] + "" );9657}9658}96599660// Do send the request9661// This may raise an exception which is actually9662// handled in jQuery.ajax (so no try/catch here)9663xhr.send( ( options.hasContent && options.data ) || null );96649665// Listener9666callback = function( _, isAbort ) {9667var status, statusText, responses;96689669// Was never called and is aborted or complete9670if ( callback && ( isAbort || xhr.readyState === 4 ) ) {9671// Clean up9672delete xhrCallbacks[ id ];9673callback = undefined;9674xhr.onreadystatechange = jQuery.noop;96759676// Abort manually if needed9677if ( isAbort ) {9678if ( xhr.readyState !== 4 ) {9679xhr.abort();9680}9681} else {9682responses = {};9683status = xhr.status;96849685// Support: IE<109686// Accessing binary-data responseText throws an exception9687// (#11426)9688if ( typeof xhr.responseText === "string" ) {9689responses.text = xhr.responseText;9690}96919692// Firefox throws an exception when accessing9693// statusText for faulty cross-domain requests9694try {9695statusText = xhr.statusText;9696} catch( e ) {9697// We normalize with Webkit giving an empty statusText9698statusText = "";9699}97009701// Filter status for non standard behaviors97029703// If the request is local and we have data: assume a success9704// (success with no data won't get notified, that's the best we9705// can do given current implementations)9706if ( !status && options.isLocal && !options.crossDomain ) {9707status = responses.text ? 200 : 404;9708// IE - #1450: sometimes returns 1223 when it should be 2049709} else if ( status === 1223 ) {9710status = 204;9711}9712}9713}97149715// Call complete if needed9716if ( responses ) {9717complete( status, statusText, responses, xhr.getAllResponseHeaders() );9718}9719};97209721if ( !options.async ) {9722// if we're in sync mode we fire the callback9723callback();9724} else if ( xhr.readyState === 4 ) {9725// (IE6 & IE7) if it's in cache and has been9726// retrieved directly we need to fire the callback9727setTimeout( callback );9728} else {9729// Add to the list of active xhr callbacks9730xhr.onreadystatechange = xhrCallbacks[ id ] = callback;9731}9732},97339734abort: function() {9735if ( callback ) {9736callback( undefined, true );9737}9738}9739};9740}9741});9742}97439744// Functions to create xhrs9745function createStandardXHR() {9746try {9747return new window.XMLHttpRequest();9748} catch( e ) {}9749}97509751function createActiveXHR() {9752try {9753return new window.ActiveXObject( "Microsoft.XMLHTTP" );9754} catch( e ) {}9755}97569757975897599760// Install script dataType9761jQuery.ajaxSetup({9762accepts: {9763script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"9764},9765contents: {9766script: /(?:java|ecma)script/9767},9768converters: {9769"text script": function( text ) {9770jQuery.globalEval( text );9771return text;9772}9773}9774});97759776// Handle cache's special case and global9777jQuery.ajaxPrefilter( "script", function( s ) {9778if ( s.cache === undefined ) {9779s.cache = false;9780}9781if ( s.crossDomain ) {9782s.type = "GET";9783s.global = false;9784}9785});97869787// Bind script tag hack transport9788jQuery.ajaxTransport( "script", function(s) {97899790// This transport only deals with cross domain requests9791if ( s.crossDomain ) {97929793var script,9794head = document.head || jQuery("head")[0] || document.documentElement;97959796return {97979798send: function( _, callback ) {97999800script = document.createElement("script");98019802script.async = true;98039804if ( s.scriptCharset ) {9805script.charset = s.scriptCharset;9806}98079808script.src = s.url;98099810// Attach handlers for all browsers9811script.onload = script.onreadystatechange = function( _, isAbort ) {98129813if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {98149815// Handle memory leak in IE9816script.onload = script.onreadystatechange = null;98179818// Remove the script9819if ( script.parentNode ) {9820script.parentNode.removeChild( script );9821}98229823// Dereference the script9824script = null;98259826// Callback if not abort9827if ( !isAbort ) {9828callback( 200, "success" );9829}9830}9831};98329833// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending9834// Use native DOM manipulation to avoid our domManip AJAX trickery9835head.insertBefore( script, head.firstChild );9836},98379838abort: function() {9839if ( script ) {9840script.onload( undefined, true );9841}9842}9843};9844}9845});98469847984898499850var oldCallbacks = [],9851rjsonp = /(=)\?(?=&|$)|\?\?/;98529853// Default jsonp settings9854jQuery.ajaxSetup({9855jsonp: "callback",9856jsonpCallback: function() {9857var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );9858this[ callback ] = true;9859return callback;9860}9861});98629863// Detect, normalize options and install callbacks for jsonp requests9864jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {98659866var callbackName, overwritten, responseContainer,9867jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?9868"url" :9869typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"9870);98719872// Handle iff the expected data type is "jsonp" or we have a parameter to set9873if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {98749875// Get callback name, remembering preexisting value associated with it9876callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?9877s.jsonpCallback() :9878s.jsonpCallback;98799880// Insert callback into url or form data9881if ( jsonProp ) {9882s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );9883} else if ( s.jsonp !== false ) {9884s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;9885}98869887// Use data converter to retrieve json after script execution9888s.converters["script json"] = function() {9889if ( !responseContainer ) {9890jQuery.error( callbackName + " was not called" );9891}9892return responseContainer[ 0 ];9893};98949895// force json dataType9896s.dataTypes[ 0 ] = "json";98979898// Install callback9899overwritten = window[ callbackName ];9900window[ callbackName ] = function() {9901responseContainer = arguments;9902};99039904// Clean-up function (fires after converters)9905jqXHR.always(function() {9906// Restore preexisting value9907window[ callbackName ] = overwritten;99089909// Save back as free9910if ( s[ callbackName ] ) {9911// make sure that re-using the options doesn't screw things around9912s.jsonpCallback = originalSettings.jsonpCallback;99139914// save the callback name for future use9915oldCallbacks.push( callbackName );9916}99179918// Call if it was a function and we have a response9919if ( responseContainer && jQuery.isFunction( overwritten ) ) {9920overwritten( responseContainer[ 0 ] );9921}99229923responseContainer = overwritten = undefined;9924});99259926// Delegate to script9927return "script";9928}9929});99309931993299339934// data: string of html9935// context (optional): If specified, the fragment will be created in this context, defaults to document9936// keepScripts (optional): If true, will include scripts passed in the html string9937jQuery.parseHTML = function( data, context, keepScripts ) {9938if ( !data || typeof data !== "string" ) {9939return null;9940}9941if ( typeof context === "boolean" ) {9942keepScripts = context;9943context = false;9944}9945context = context || document;99469947var parsed = rsingleTag.exec( data ),9948scripts = !keepScripts && [];99499950// Single tag9951if ( parsed ) {9952return [ context.createElement( parsed[1] ) ];9953}99549955parsed = jQuery.buildFragment( [ data ], context, scripts );99569957if ( scripts && scripts.length ) {9958jQuery( scripts ).remove();9959}99609961return jQuery.merge( [], parsed.childNodes );9962};996399649965// Keep a copy of the old load method9966var _load = jQuery.fn.load;99679968/**9969* Load a url into a page9970*/9971jQuery.fn.load = function( url, params, callback ) {9972if ( typeof url !== "string" && _load ) {9973return _load.apply( this, arguments );9974}99759976var selector, response, type,9977self = this,9978off = url.indexOf(" ");99799980if ( off >= 0 ) {9981selector = jQuery.trim( url.slice( off, url.length ) );9982url = url.slice( 0, off );9983}99849985// If it's a function9986if ( jQuery.isFunction( params ) ) {99879988// We assume that it's the callback9989callback = params;9990params = undefined;99919992// Otherwise, build a param string9993} else if ( params && typeof params === "object" ) {9994type = "POST";9995}99969997// If we have elements to modify, make the request9998if ( self.length > 0 ) {9999jQuery.ajax({10000url: url,1000110002// if "type" variable is undefined, then "GET" method will be used10003type: type,10004dataType: "html",10005data: params10006}).done(function( responseText ) {1000710008// Save response for use in complete callback10009response = arguments;1001010011self.html( selector ?1001210013// If a selector was specified, locate the right elements in a dummy div10014// Exclude scripts to avoid IE 'Permission Denied' errors10015jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :1001610017// Otherwise use the full result10018responseText );1001910020}).complete( callback && function( jqXHR, status ) {10021self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );10022});10023}1002410025return this;10026};1002710028100291003010031// Attach a bunch of functions for handling common AJAX events10032jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {10033jQuery.fn[ type ] = function( fn ) {10034return this.on( type, fn );10035};10036});1003710038100391004010041jQuery.expr.filters.animated = function( elem ) {10042return jQuery.grep(jQuery.timers, function( fn ) {10043return elem === fn.elem;10044}).length;10045};100461004710048100491005010051var docElem = window.document.documentElement;1005210053/**10054* Gets a window from an element10055*/10056function getWindow( elem ) {10057return jQuery.isWindow( elem ) ?10058elem :10059elem.nodeType === 9 ?10060elem.defaultView || elem.parentWindow :10061false;10062}1006310064jQuery.offset = {10065setOffset: function( elem, options, i ) {10066var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,10067position = jQuery.css( elem, "position" ),10068curElem = jQuery( elem ),10069props = {};1007010071// set position first, in-case top/left are set even on static elem10072if ( position === "static" ) {10073elem.style.position = "relative";10074}1007510076curOffset = curElem.offset();10077curCSSTop = jQuery.css( elem, "top" );10078curCSSLeft = jQuery.css( elem, "left" );10079calculatePosition = ( position === "absolute" || position === "fixed" ) &&10080jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;1008110082// need to be able to calculate position if either top or left is auto and position is either absolute or fixed10083if ( calculatePosition ) {10084curPosition = curElem.position();10085curTop = curPosition.top;10086curLeft = curPosition.left;10087} else {10088curTop = parseFloat( curCSSTop ) || 0;10089curLeft = parseFloat( curCSSLeft ) || 0;10090}1009110092if ( jQuery.isFunction( options ) ) {10093options = options.call( elem, i, curOffset );10094}1009510096if ( options.top != null ) {10097props.top = ( options.top - curOffset.top ) + curTop;10098}10099if ( options.left != null ) {10100props.left = ( options.left - curOffset.left ) + curLeft;10101}1010210103if ( "using" in options ) {10104options.using.call( elem, props );10105} else {10106curElem.css( props );10107}10108}10109};1011010111jQuery.fn.extend({10112offset: function( options ) {10113if ( arguments.length ) {10114return options === undefined ?10115this :10116this.each(function( i ) {10117jQuery.offset.setOffset( this, options, i );10118});10119}1012010121var docElem, win,10122box = { top: 0, left: 0 },10123elem = this[ 0 ],10124doc = elem && elem.ownerDocument;1012510126if ( !doc ) {10127return;10128}1012910130docElem = doc.documentElement;1013110132// Make sure it's not a disconnected DOM node10133if ( !jQuery.contains( docElem, elem ) ) {10134return box;10135}1013610137// If we don't have gBCR, just use 0,0 rather than error10138// BlackBerry 5, iOS 3 (original iPhone)10139if ( typeof elem.getBoundingClientRect !== strundefined ) {10140box = elem.getBoundingClientRect();10141}10142win = getWindow( doc );10143return {10144top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),10145left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )10146};10147},1014810149position: function() {10150if ( !this[ 0 ] ) {10151return;10152}1015310154var offsetParent, offset,10155parentOffset = { top: 0, left: 0 },10156elem = this[ 0 ];1015710158// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent10159if ( jQuery.css( elem, "position" ) === "fixed" ) {10160// we assume that getBoundingClientRect is available when computed position is fixed10161offset = elem.getBoundingClientRect();10162} else {10163// Get *real* offsetParent10164offsetParent = this.offsetParent();1016510166// Get correct offsets10167offset = this.offset();10168if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {10169parentOffset = offsetParent.offset();10170}1017110172// Add offsetParent borders10173parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );10174parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );10175}1017610177// Subtract parent offsets and element margins10178// note: when an element has margin: auto the offsetLeft and marginLeft10179// are the same in Safari causing offset.left to incorrectly be 010180return {10181top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),10182left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)10183};10184},1018510186offsetParent: function() {10187return this.map(function() {10188var offsetParent = this.offsetParent || docElem;1018910190while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {10191offsetParent = offsetParent.offsetParent;10192}10193return offsetParent || docElem;10194});10195}10196});1019710198// Create scrollLeft and scrollTop methods10199jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {10200var top = /Y/.test( prop );1020110202jQuery.fn[ method ] = function( val ) {10203return access( this, function( elem, method, val ) {10204var win = getWindow( elem );1020510206if ( val === undefined ) {10207return win ? (prop in win) ? win[ prop ] :10208win.document.documentElement[ method ] :10209elem[ method ];10210}1021110212if ( win ) {10213win.scrollTo(10214!top ? val : jQuery( win ).scrollLeft(),10215top ? val : jQuery( win ).scrollTop()10216);1021710218} else {10219elem[ method ] = val;10220}10221}, method, val, arguments.length, null );10222};10223});1022410225// Add the top/left cssHooks using jQuery.fn.position10226// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=2908410227// getComputedStyle returns percent when specified for top/left/bottom/right10228// rather than make the css module depend on the offset module, we just check for it here10229jQuery.each( [ "top", "left" ], function( i, prop ) {10230jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,10231function( elem, computed ) {10232if ( computed ) {10233computed = curCSS( elem, prop );10234// if curCSS returns percentage, fallback to offset10235return rnumnonpx.test( computed ) ?10236jQuery( elem ).position()[ prop ] + "px" :10237computed;10238}10239}10240);10241});102421024310244// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods10245jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {10246jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {10247// margin is only for outerHeight, outerWidth10248jQuery.fn[ funcName ] = function( margin, value ) {10249var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),10250extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );1025110252return access( this, function( elem, type, value ) {10253var doc;1025410255if ( jQuery.isWindow( elem ) ) {10256// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there10257// isn't a whole lot we can do. See pull request at this URL for discussion:10258// https://github.com/jquery/jquery/pull/76410259return elem.document.documentElement[ "client" + name ];10260}1026110262// Get document width or height10263if ( elem.nodeType === 9 ) {10264doc = elem.documentElement;1026510266// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest10267// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.10268return Math.max(10269elem.body[ "scroll" + name ], doc[ "scroll" + name ],10270elem.body[ "offset" + name ], doc[ "offset" + name ],10271doc[ "client" + name ]10272);10273}1027410275return value === undefined ?10276// Get width or height on the element, requesting but not forcing parseFloat10277jQuery.css( elem, type, extra ) :1027810279// Set width or height on the element10280jQuery.style( elem, type, value, extra );10281}, type, chainable ? margin : undefined, chainable, null );10282};10283});10284});102851028610287// The number of elements contained in the matched element set10288jQuery.fn.size = function() {10289return this.length;10290};1029110292jQuery.fn.andSelf = jQuery.fn.addBack;1029310294102951029610297// Register as a named AMD module, since jQuery can be concatenated with other10298// files that may use define, but not via a proper concatenation script that10299// understands anonymous AMD modules. A named AMD is safest and most robust10300// way to register. Lowercase jquery is used because AMD module names are10301// derived from file names, and jQuery is normally delivered in a lowercase10302// file name. Do this after creating the global so that if an AMD module wants10303// to call noConflict to hide this version of jQuery, it will work.1030410305// Note that for maximum portability, libraries that are not jQuery should10306// declare themselves as anonymous modules, and avoid setting a global if an10307// AMD loader is present. jQuery is a special case. For more information, see10308// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon1030910310if ( typeof define === "function" && define.amd ) {10311define( "jquery", [], function() {10312return jQuery;10313});10314}1031510316103171031810319var10320// Map over jQuery in case of overwrite10321_jQuery = window.jQuery,1032210323// Map over the $ in case of overwrite10324_$ = window.$;1032510326jQuery.noConflict = function( deep ) {10327if ( window.$ === jQuery ) {10328window.$ = _$;10329}1033010331if ( deep && window.jQuery === jQuery ) {10332window.jQuery = _jQuery;10333}1033410335return jQuery;10336};1033710338// Expose jQuery and $ identifiers, even in10339// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)10340// and CommonJS for browser emulators (#13566)10341if ( typeof noGlobal === strundefined ) {10342window.jQuery = window.$ = jQuery;10343}1034410345103461034710348return jQuery;1034910350}));103511035210353