Path: blob/master/sites/icloud/jquery-1.10.2.js
777 views
/*!1* jQuery JavaScript Library v1.10.22* http://jquery.com/3*4* Includes Sizzle.js5* http://sizzlejs.com/6*7* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors8* Released under the MIT license9* http://jquery.org/license10*11* Date: 2013-07-03T13:48Z12*/13(function( window, undefined ) {1415// Can't do this because several apps including ASP.NET trace16// the stack via arguments.caller.callee and Firefox dies if17// you try to trace through "use strict" call chains. (#13335)18// Support: Firefox 18+19//"use strict";20var21// The deferred used on DOM ready22readyList,2324// A central reference to the root jQuery(document)25rootjQuery,2627// Support: IE<1028// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`29core_strundefined = typeof undefined,3031// Use the correct document accordingly with window argument (sandbox)32location = window.location,33document = window.document,34docElem = document.documentElement,3536// Map over jQuery in case of overwrite37_jQuery = window.jQuery,3839// Map over the $ in case of overwrite40_$ = window.$,4142// [[Class]] -> type pairs43class2type = {},4445// List of deleted data cache ids, so we can reuse them46core_deletedIds = [],4748core_version = "1.10.2",4950// Save a reference to some core methods51core_concat = core_deletedIds.concat,52core_push = core_deletedIds.push,53core_slice = core_deletedIds.slice,54core_indexOf = core_deletedIds.indexOf,55core_toString = class2type.toString,56core_hasOwn = class2type.hasOwnProperty,57core_trim = core_version.trim,5859// Define a local copy of jQuery60jQuery = function( selector, context ) {61// The jQuery object is actually just the init constructor 'enhanced'62return new jQuery.fn.init( selector, context, rootjQuery );63},6465// Used for matching numbers66core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,6768// Used for splitting on whitespace69core_rnotwhite = /\S+/g,7071// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)72rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,7374// A simple way to check for HTML strings75// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)76// Strict HTML recognition (#11290: must start with <)77rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,7879// Match a standalone tag80rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,8182// JSON RegExp83rvalidchars = /^[\],:{}\s]*$/,84rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,85rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,86rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,8788// Matches dashed string for camelizing89rmsPrefix = /^-ms-/,90rdashAlpha = /-([\da-z])/gi,9192// Used by jQuery.camelCase as callback to replace()93fcamelCase = function( all, letter ) {94return letter.toUpperCase();95},9697// The ready event handler98completed = function( event ) {99100// readyState === "complete" is good enough for us to call the dom ready in oldIE101if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {102detach();103jQuery.ready();104}105},106// Clean-up method for dom ready events107detach = function() {108if ( document.addEventListener ) {109document.removeEventListener( "DOMContentLoaded", completed, false );110window.removeEventListener( "load", completed, false );111112} else {113document.detachEvent( "onreadystatechange", completed );114window.detachEvent( "onload", completed );115}116};117118jQuery.fn = jQuery.prototype = {119// The current version of jQuery being used120jquery: core_version,121122constructor: jQuery,123init: function( selector, context, rootjQuery ) {124var match, elem;125126// HANDLE: $(""), $(null), $(undefined), $(false)127if ( !selector ) {128return this;129}130131// Handle HTML strings132if ( typeof selector === "string" ) {133if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {134// Assume that strings that start and end with <> are HTML and skip the regex check135match = [ null, selector, null ];136137} else {138match = rquickExpr.exec( selector );139}140141// Match html or make sure no context is specified for #id142if ( match && (match[1] || !context) ) {143144// HANDLE: $(html) -> $(array)145if ( match[1] ) {146context = context instanceof jQuery ? context[0] : context;147148// scripts is true for back-compat149jQuery.merge( this, jQuery.parseHTML(150match[1],151context && context.nodeType ? context.ownerDocument || context : document,152true153) );154155// HANDLE: $(html, props)156if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {157for ( match in context ) {158// Properties of context are called as methods if possible159if ( jQuery.isFunction( this[ match ] ) ) {160this[ match ]( context[ match ] );161162// ...and otherwise set as attributes163} else {164this.attr( match, context[ match ] );165}166}167}168169return this;170171// HANDLE: $(#id)172} else {173elem = document.getElementById( match[2] );174175// Check parentNode to catch when Blackberry 4.6 returns176// nodes that are no longer in the document #6963177if ( elem && elem.parentNode ) {178// Handle the case where IE and Opera return items179// by name instead of ID180if ( elem.id !== match[2] ) {181return rootjQuery.find( selector );182}183184// Otherwise, we inject the element directly into the jQuery object185this.length = 1;186this[0] = elem;187}188189this.context = document;190this.selector = selector;191return this;192}193194// HANDLE: $(expr, $(...))195} else if ( !context || context.jquery ) {196return ( context || rootjQuery ).find( selector );197198// HANDLE: $(expr, context)199// (which is just equivalent to: $(context).find(expr)200} else {201return this.constructor( context ).find( selector );202}203204// HANDLE: $(DOMElement)205} else if ( selector.nodeType ) {206this.context = this[0] = selector;207this.length = 1;208return this;209210// HANDLE: $(function)211// Shortcut for document ready212} else if ( jQuery.isFunction( selector ) ) {213return rootjQuery.ready( selector );214}215216if ( selector.selector !== undefined ) {217this.selector = selector.selector;218this.context = selector.context;219}220221return jQuery.makeArray( selector, this );222},223224// Start with an empty selector225selector: "",226227// The default length of a jQuery object is 0228length: 0,229230toArray: function() {231return core_slice.call( this );232},233234// Get the Nth element in the matched element set OR235// Get the whole matched element set as a clean array236get: function( num ) {237return num == null ?238239// Return a 'clean' array240this.toArray() :241242// Return just the object243( num < 0 ? this[ this.length + num ] : this[ num ] );244},245246// Take an array of elements and push it onto the stack247// (returning the new matched element set)248pushStack: function( elems ) {249250// Build a new jQuery matched element set251var ret = jQuery.merge( this.constructor(), elems );252253// Add the old object onto the stack (as a reference)254ret.prevObject = this;255ret.context = this.context;256257// Return the newly-formed element set258return ret;259},260261// Execute a callback for every element in the matched set.262// (You can seed the arguments with an array of args, but this is263// only used internally.)264each: function( callback, args ) {265return jQuery.each( this, callback, args );266},267268ready: function( fn ) {269// Add the callback270jQuery.ready.promise().done( fn );271272return this;273},274275slice: function() {276return this.pushStack( core_slice.apply( this, arguments ) );277},278279first: function() {280return this.eq( 0 );281},282283last: function() {284return this.eq( -1 );285},286287eq: function( i ) {288var len = this.length,289j = +i + ( i < 0 ? len : 0 );290return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );291},292293map: function( callback ) {294return this.pushStack( jQuery.map(this, function( elem, i ) {295return callback.call( elem, i, elem );296}));297},298299end: function() {300return this.prevObject || this.constructor(null);301},302303// For internal use only.304// Behaves like an Array's method, not like a jQuery method.305push: core_push,306sort: [].sort,307splice: [].splice308};309310// Give the init function the jQuery prototype for later instantiation311jQuery.fn.init.prototype = jQuery.fn;312313jQuery.extend = jQuery.fn.extend = function() {314var src, copyIsArray, copy, name, options, clone,315target = arguments[0] || {},316i = 1,317length = arguments.length,318deep = false;319320// Handle a deep copy situation321if ( typeof target === "boolean" ) {322deep = target;323target = arguments[1] || {};324// skip the boolean and the target325i = 2;326}327328// Handle case when target is a string or something (possible in deep copy)329if ( typeof target !== "object" && !jQuery.isFunction(target) ) {330target = {};331}332333// extend jQuery itself if only one argument is passed334if ( length === i ) {335target = this;336--i;337}338339for ( ; i < length; i++ ) {340// Only deal with non-null/undefined values341if ( (options = arguments[ i ]) != null ) {342// Extend the base object343for ( name in options ) {344src = target[ name ];345copy = options[ name ];346347// Prevent never-ending loop348if ( target === copy ) {349continue;350}351352// Recurse if we're merging plain objects or arrays353if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {354if ( copyIsArray ) {355copyIsArray = false;356clone = src && jQuery.isArray(src) ? src : [];357358} else {359clone = src && jQuery.isPlainObject(src) ? src : {};360}361362// Never move original objects, clone them363target[ name ] = jQuery.extend( deep, clone, copy );364365// Don't bring in undefined values366} else if ( copy !== undefined ) {367target[ name ] = copy;368}369}370}371}372373// Return the modified object374return target;375};376377jQuery.extend({378// Unique for each copy of jQuery on the page379// Non-digits removed to match rinlinejQuery380expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),381382noConflict: function( deep ) {383if ( window.$ === jQuery ) {384window.$ = _$;385}386387if ( deep && window.jQuery === jQuery ) {388window.jQuery = _jQuery;389}390391return jQuery;392},393394// Is the DOM ready to be used? Set to true once it occurs.395isReady: false,396397// A counter to track how many items to wait for before398// the ready event fires. See #6781399readyWait: 1,400401// Hold (or release) the ready event402holdReady: function( hold ) {403if ( hold ) {404jQuery.readyWait++;405} else {406jQuery.ready( true );407}408},409410// Handle when the DOM is ready411ready: function( wait ) {412413// Abort if there are pending holds or we're already ready414if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {415return;416}417418// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).419if ( !document.body ) {420return setTimeout( jQuery.ready );421}422423// Remember that the DOM is ready424jQuery.isReady = true;425426// If a normal DOM Ready event fired, decrement, and wait if need be427if ( wait !== true && --jQuery.readyWait > 0 ) {428return;429}430431// If there are functions bound, to execute432readyList.resolveWith( document, [ jQuery ] );433434// Trigger any bound ready events435if ( jQuery.fn.trigger ) {436jQuery( document ).trigger("ready").off("ready");437}438},439440// See test/unit/core.js for details concerning isFunction.441// Since version 1.3, DOM methods and functions like alert442// aren't supported. They return false on IE (#2968).443isFunction: function( obj ) {444return jQuery.type(obj) === "function";445},446447isArray: Array.isArray || function( obj ) {448return jQuery.type(obj) === "array";449},450451isWindow: function( obj ) {452/* jshint eqeqeq: false */453return obj != null && obj == obj.window;454},455456isNumeric: function( obj ) {457return !isNaN( parseFloat(obj) ) && isFinite( obj );458},459460type: function( obj ) {461if ( obj == null ) {462return String( obj );463}464return typeof obj === "object" || typeof obj === "function" ?465class2type[ core_toString.call(obj) ] || "object" :466typeof obj;467},468469isPlainObject: function( obj ) {470var key;471472// Must be an Object.473// Because of IE, we also have to check the presence of the constructor property.474// Make sure that DOM nodes and window objects don't pass through, as well475if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {476return false;477}478479try {480// Not own constructor property must be Object481if ( obj.constructor &&482!core_hasOwn.call(obj, "constructor") &&483!core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {484return false;485}486} catch ( e ) {487// IE8,9 Will throw exceptions on certain host objects #9897488return false;489}490491// Support: IE<9492// Handle iteration over inherited properties before own properties.493if ( jQuery.support.ownLast ) {494for ( key in obj ) {495return core_hasOwn.call( obj, key );496}497}498499// Own properties are enumerated firstly, so to speed up,500// if last one is own, then all properties are own.501for ( key in obj ) {}502503return key === undefined || core_hasOwn.call( obj, key );504},505506isEmptyObject: function( obj ) {507var name;508for ( name in obj ) {509return false;510}511return true;512},513514error: function( msg ) {515throw new Error( msg );516},517518// data: string of html519// context (optional): If specified, the fragment will be created in this context, defaults to document520// keepScripts (optional): If true, will include scripts passed in the html string521parseHTML: function( data, context, keepScripts ) {522if ( !data || typeof data !== "string" ) {523return null;524}525if ( typeof context === "boolean" ) {526keepScripts = context;527context = false;528}529context = context || document;530531var parsed = rsingleTag.exec( data ),532scripts = !keepScripts && [];533534// Single tag535if ( parsed ) {536return [ context.createElement( parsed[1] ) ];537}538539parsed = jQuery.buildFragment( [ data ], context, scripts );540if ( scripts ) {541jQuery( scripts ).remove();542}543return jQuery.merge( [], parsed.childNodes );544},545546parseJSON: function( data ) {547// Attempt to parse using the native JSON parser first548if ( window.JSON && window.JSON.parse ) {549return window.JSON.parse( data );550}551552if ( data === null ) {553return data;554}555556if ( typeof data === "string" ) {557558// Make sure leading/trailing whitespace is removed (IE can't handle it)559data = jQuery.trim( data );560561if ( data ) {562// Make sure the incoming data is actual JSON563// Logic borrowed from http://json.org/json2.js564if ( rvalidchars.test( data.replace( rvalidescape, "@" )565.replace( rvalidtokens, "]" )566.replace( rvalidbraces, "")) ) {567568return ( new Function( "return " + data ) )();569}570}571}572573jQuery.error( "Invalid JSON: " + data );574},575576// Cross-browser xml parsing577parseXML: function( data ) {578var xml, tmp;579if ( !data || typeof data !== "string" ) {580return null;581}582try {583if ( window.DOMParser ) { // Standard584tmp = new DOMParser();585xml = tmp.parseFromString( data , "text/xml" );586} else { // IE587xml = new ActiveXObject( "Microsoft.XMLDOM" );588xml.async = "false";589xml.loadXML( data );590}591} catch( e ) {592xml = undefined;593}594if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {595jQuery.error( "Invalid XML: " + data );596}597return xml;598},599600noop: function() {},601602// Evaluates a script in a global context603// Workarounds based on findings by Jim Driscoll604// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context605globalEval: function( data ) {606if ( data && jQuery.trim( data ) ) {607// We use execScript on Internet Explorer608// We use an anonymous function so that context is window609// rather than jQuery in Firefox610( window.execScript || function( data ) {611window[ "eval" ].call( window, data );612} )( data );613}614},615616// Convert dashed to camelCase; used by the css and data modules617// Microsoft forgot to hump their vendor prefix (#9572)618camelCase: function( string ) {619return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );620},621622nodeName: function( elem, name ) {623return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();624},625626// args is for internal usage only627each: function( obj, callback, args ) {628var value,629i = 0,630length = obj.length,631isArray = isArraylike( obj );632633if ( args ) {634if ( isArray ) {635for ( ; i < length; i++ ) {636value = callback.apply( obj[ i ], args );637638if ( value === false ) {639break;640}641}642} else {643for ( i in obj ) {644value = callback.apply( obj[ i ], args );645646if ( value === false ) {647break;648}649}650}651652// A special, fast, case for the most common use of each653} else {654if ( isArray ) {655for ( ; i < length; i++ ) {656value = callback.call( obj[ i ], i, obj[ i ] );657658if ( value === false ) {659break;660}661}662} else {663for ( i in obj ) {664value = callback.call( obj[ i ], i, obj[ i ] );665666if ( value === false ) {667break;668}669}670}671}672673return obj;674},675676// Use native String.trim function wherever possible677trim: core_trim && !core_trim.call("\uFEFF\xA0") ?678function( text ) {679return text == null ?680"" :681core_trim.call( text );682} :683684// Otherwise use our own trimming functionality685function( text ) {686return text == null ?687"" :688( text + "" ).replace( rtrim, "" );689},690691// results is for internal usage only692makeArray: function( arr, results ) {693var ret = results || [];694695if ( arr != null ) {696if ( isArraylike( Object(arr) ) ) {697jQuery.merge( ret,698typeof arr === "string" ?699[ arr ] : arr700);701} else {702core_push.call( ret, arr );703}704}705706return ret;707},708709inArray: function( elem, arr, i ) {710var len;711712if ( arr ) {713if ( core_indexOf ) {714return core_indexOf.call( arr, elem, i );715}716717len = arr.length;718i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;719720for ( ; i < len; i++ ) {721// Skip accessing in sparse arrays722if ( i in arr && arr[ i ] === elem ) {723return i;724}725}726}727728return -1;729},730731merge: function( first, second ) {732var l = second.length,733i = first.length,734j = 0;735736if ( typeof l === "number" ) {737for ( ; j < l; j++ ) {738first[ i++ ] = second[ j ];739}740} else {741while ( second[j] !== undefined ) {742first[ i++ ] = second[ j++ ];743}744}745746first.length = i;747748return first;749},750751grep: function( elems, callback, inv ) {752var retVal,753ret = [],754i = 0,755length = elems.length;756inv = !!inv;757758// Go through the array, only saving the items759// that pass the validator function760for ( ; i < length; i++ ) {761retVal = !!callback( elems[ i ], i );762if ( inv !== retVal ) {763ret.push( elems[ i ] );764}765}766767return ret;768},769770// arg is for internal usage only771map: function( elems, callback, arg ) {772var value,773i = 0,774length = elems.length,775isArray = isArraylike( elems ),776ret = [];777778// Go through the array, translating each of the items to their779if ( isArray ) {780for ( ; i < length; i++ ) {781value = callback( elems[ i ], i, arg );782783if ( value != null ) {784ret[ ret.length ] = value;785}786}787788// Go through every key on the object,789} else {790for ( i in elems ) {791value = callback( elems[ i ], i, arg );792793if ( value != null ) {794ret[ ret.length ] = value;795}796}797}798799// Flatten any nested arrays800return core_concat.apply( [], ret );801},802803// A global GUID counter for objects804guid: 1,805806// Bind a function to a context, optionally partially applying any807// arguments.808proxy: function( fn, context ) {809var args, proxy, tmp;810811if ( typeof context === "string" ) {812tmp = fn[ context ];813context = fn;814fn = tmp;815}816817// Quick check to determine if target is callable, in the spec818// this throws a TypeError, but we will just return undefined.819if ( !jQuery.isFunction( fn ) ) {820return undefined;821}822823// Simulated bind824args = core_slice.call( arguments, 2 );825proxy = function() {826return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );827};828829// Set the guid of unique handler to the same of original handler, so it can be removed830proxy.guid = fn.guid = fn.guid || jQuery.guid++;831832return proxy;833},834835// Multifunctional method to get and set values of a collection836// The value/s can optionally be executed if it's a function837access: function( elems, fn, key, value, chainable, emptyGet, raw ) {838var i = 0,839length = elems.length,840bulk = key == null;841842// Sets many values843if ( jQuery.type( key ) === "object" ) {844chainable = true;845for ( i in key ) {846jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );847}848849// Sets one value850} else if ( value !== undefined ) {851chainable = true;852853if ( !jQuery.isFunction( value ) ) {854raw = true;855}856857if ( bulk ) {858// Bulk operations run against the entire set859if ( raw ) {860fn.call( elems, value );861fn = null;862863// ...except when executing function values864} else {865bulk = fn;866fn = function( elem, key, value ) {867return bulk.call( jQuery( elem ), value );868};869}870}871872if ( fn ) {873for ( ; i < length; i++ ) {874fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );875}876}877}878879return chainable ?880elems :881882// Gets883bulk ?884fn.call( elems ) :885length ? fn( elems[0], key ) : emptyGet;886},887888now: function() {889return ( new Date() ).getTime();890},891892// A method for quickly swapping in/out CSS properties to get correct calculations.893// Note: this method belongs to the css module but it's needed here for the support module.894// If support gets modularized, this method should be moved back to the css module.895swap: function( elem, options, callback, args ) {896var ret, name,897old = {};898899// Remember the old values, and insert the new ones900for ( name in options ) {901old[ name ] = elem.style[ name ];902elem.style[ name ] = options[ name ];903}904905ret = callback.apply( elem, args || [] );906907// Revert the old values908for ( name in options ) {909elem.style[ name ] = old[ name ];910}911912return ret;913}914});915916jQuery.ready.promise = function( obj ) {917if ( !readyList ) {918919readyList = jQuery.Deferred();920921// Catch cases where $(document).ready() is called after the browser event has already occurred.922// we once tried to use readyState "interactive" here, but it caused issues like the one923// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15924if ( document.readyState === "complete" ) {925// Handle it asynchronously to allow scripts the opportunity to delay ready926setTimeout( jQuery.ready );927928// Standards-based browsers support DOMContentLoaded929} else if ( document.addEventListener ) {930// Use the handy event callback931document.addEventListener( "DOMContentLoaded", completed, false );932933// A fallback to window.onload, that will always work934window.addEventListener( "load", completed, false );935936// If IE event model is used937} else {938// Ensure firing before onload, maybe late but safe also for iframes939document.attachEvent( "onreadystatechange", completed );940941// A fallback to window.onload, that will always work942window.attachEvent( "onload", completed );943944// If IE and not a frame945// continually check to see if the document is ready946var top = false;947948try {949top = window.frameElement == null && document.documentElement;950} catch(e) {}951952if ( top && top.doScroll ) {953(function doScrollCheck() {954if ( !jQuery.isReady ) {955956try {957// Use the trick by Diego Perini958// http://javascript.nwbox.com/IEContentLoaded/959top.doScroll("left");960} catch(e) {961return setTimeout( doScrollCheck, 50 );962}963964// detach all dom ready events965detach();966967// and execute any waiting functions968jQuery.ready();969}970})();971}972}973}974return readyList.promise( obj );975};976977// Populate the class2type map978jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {979class2type[ "[object " + name + "]" ] = name.toLowerCase();980});981982function isArraylike( obj ) {983var length = obj.length,984type = jQuery.type( obj );985986if ( jQuery.isWindow( obj ) ) {987return false;988}989990if ( obj.nodeType === 1 && length ) {991return true;992}993994return type === "array" || type !== "function" &&995( length === 0 ||996typeof length === "number" && length > 0 && ( length - 1 ) in obj );997}998999// All jQuery objects should point back to these1000rootjQuery = jQuery(document);1001/*!1002* Sizzle CSS Selector Engine v1.10.21003* http://sizzlejs.com/1004*1005* Copyright 2013 jQuery Foundation, Inc. and other contributors1006* Released under the MIT license1007* http://jquery.org/license1008*1009* Date: 2013-07-031010*/1011(function( window, undefined ) {10121013var i,1014support,1015cachedruns,1016Expr,1017getText,1018isXML,1019compile,1020outermostContext,1021sortInput,10221023// Local document vars1024setDocument,1025document,1026docElem,1027documentIsHTML,1028rbuggyQSA,1029rbuggyMatches,1030matches,1031contains,10321033// Instance-specific data1034expando = "sizzle" + -(new Date()),1035preferredDoc = window.document,1036dirruns = 0,1037done = 0,1038classCache = createCache(),1039tokenCache = createCache(),1040compilerCache = createCache(),1041hasDuplicate = false,1042sortOrder = function( a, b ) {1043if ( a === b ) {1044hasDuplicate = true;1045return 0;1046}1047return 0;1048},10491050// General-purpose constants1051strundefined = typeof undefined,1052MAX_NEGATIVE = 1 << 31,10531054// Instance methods1055hasOwn = ({}).hasOwnProperty,1056arr = [],1057pop = arr.pop,1058push_native = arr.push,1059push = arr.push,1060slice = arr.slice,1061// Use a stripped-down indexOf if we can't use a native one1062indexOf = arr.indexOf || function( elem ) {1063var i = 0,1064len = this.length;1065for ( ; i < len; i++ ) {1066if ( this[i] === elem ) {1067return i;1068}1069}1070return -1;1071},10721073booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",10741075// Regular expressions10761077// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace1078whitespace = "[\\x20\\t\\r\\n\\f]",1079// http://www.w3.org/TR/css3-syntax/#characters1080characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",10811082// Loosely modeled on CSS identifier characters1083// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors1084// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier1085identifier = characterEncoding.replace( "w", "w#" ),10861087// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors1088attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +1089"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",10901091// Prefer arguments quoted,1092// then not containing pseudos/brackets,1093// then attribute selectors/non-parenthetical expressions,1094// then anything else1095// These preferences are here to reduce the number of selectors1096// needing tokenize in the PSEUDO preFilter1097pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",10981099// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter1100rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),11011102rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),1103rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),11041105rsibling = new RegExp( whitespace + "*[+~]" ),1106rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),11071108rpseudo = new RegExp( pseudos ),1109ridentifier = new RegExp( "^" + identifier + "$" ),11101111matchExpr = {1112"ID": new RegExp( "^#(" + characterEncoding + ")" ),1113"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),1114"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),1115"ATTR": new RegExp( "^" + attributes ),1116"PSEUDO": new RegExp( "^" + pseudos ),1117"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +1118"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +1119"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),1120"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),1121// For use in libraries implementing .is()1122// We use this for POS matching in `select`1123"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +1124whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )1125},11261127rnative = /^[^{]+\{\s*\[native \w/,11281129// Easily-parseable/retrievable ID or TAG or CLASS selectors1130rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,11311132rinputs = /^(?:input|select|textarea|button)$/i,1133rheader = /^h\d$/i,11341135rescape = /'|\\/g,11361137// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters1138runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),1139funescape = function( _, escaped, escapedWhitespace ) {1140var high = "0x" + escaped - 0x10000;1141// NaN means non-codepoint1142// Support: Firefox1143// Workaround erroneous numeric interpretation of +"0x"1144return high !== high || escapedWhitespace ?1145escaped :1146// BMP codepoint1147high < 0 ?1148String.fromCharCode( high + 0x10000 ) :1149// Supplemental Plane codepoint (surrogate pair)1150String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );1151};11521153// Optimize for push.apply( _, NodeList )1154try {1155push.apply(1156(arr = slice.call( preferredDoc.childNodes )),1157preferredDoc.childNodes1158);1159// Support: Android<4.01160// Detect silently failing push.apply1161arr[ preferredDoc.childNodes.length ].nodeType;1162} catch ( e ) {1163push = { apply: arr.length ?11641165// Leverage slice if possible1166function( target, els ) {1167push_native.apply( target, slice.call(els) );1168} :11691170// Support: IE<91171// Otherwise append directly1172function( target, els ) {1173var j = target.length,1174i = 0;1175// Can't trust NodeList.length1176while ( (target[j++] = els[i++]) ) {}1177target.length = j - 1;1178}1179};1180}11811182function Sizzle( selector, context, results, seed ) {1183var match, elem, m, nodeType,1184// QSA vars1185i, groups, old, nid, newContext, newSelector;11861187if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {1188setDocument( context );1189}11901191context = context || document;1192results = results || [];11931194if ( !selector || typeof selector !== "string" ) {1195return results;1196}11971198if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {1199return [];1200}12011202if ( documentIsHTML && !seed ) {12031204// Shortcuts1205if ( (match = rquickExpr.exec( selector )) ) {1206// Speed-up: Sizzle("#ID")1207if ( (m = match[1]) ) {1208if ( nodeType === 9 ) {1209elem = context.getElementById( m );1210// Check parentNode to catch when Blackberry 4.6 returns1211// nodes that are no longer in the document #69631212if ( elem && elem.parentNode ) {1213// Handle the case where IE, Opera, and Webkit return items1214// by name instead of ID1215if ( elem.id === m ) {1216results.push( elem );1217return results;1218}1219} else {1220return results;1221}1222} else {1223// Context is not a document1224if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&1225contains( context, elem ) && elem.id === m ) {1226results.push( elem );1227return results;1228}1229}12301231// Speed-up: Sizzle("TAG")1232} else if ( match[2] ) {1233push.apply( results, context.getElementsByTagName( selector ) );1234return results;12351236// Speed-up: Sizzle(".CLASS")1237} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {1238push.apply( results, context.getElementsByClassName( m ) );1239return results;1240}1241}12421243// QSA path1244if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {1245nid = old = expando;1246newContext = context;1247newSelector = nodeType === 9 && selector;12481249// qSA works strangely on Element-rooted queries1250// We can work around this by specifying an extra ID on the root1251// and working up from there (Thanks to Andrew Dupont for the technique)1252// IE 8 doesn't work on object elements1253if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {1254groups = tokenize( selector );12551256if ( (old = context.getAttribute("id")) ) {1257nid = old.replace( rescape, "\\$&" );1258} else {1259context.setAttribute( "id", nid );1260}1261nid = "[id='" + nid + "'] ";12621263i = groups.length;1264while ( i-- ) {1265groups[i] = nid + toSelector( groups[i] );1266}1267newContext = rsibling.test( selector ) && context.parentNode || context;1268newSelector = groups.join(",");1269}12701271if ( newSelector ) {1272try {1273push.apply( results,1274newContext.querySelectorAll( newSelector )1275);1276return results;1277} catch(qsaError) {1278} finally {1279if ( !old ) {1280context.removeAttribute("id");1281}1282}1283}1284}1285}12861287// All others1288return select( selector.replace( rtrim, "$1" ), context, results, seed );1289}12901291/**1292* Create key-value caches of limited size1293* @returns {Function(string, Object)} Returns the Object data after storing it on itself with1294* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)1295* deleting the oldest entry1296*/1297function createCache() {1298var keys = [];12991300function cache( key, value ) {1301// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)1302if ( keys.push( key += " " ) > Expr.cacheLength ) {1303// Only keep the most recent entries1304delete cache[ keys.shift() ];1305}1306return (cache[ key ] = value);1307}1308return cache;1309}13101311/**1312* Mark a function for special use by Sizzle1313* @param {Function} fn The function to mark1314*/1315function markFunction( fn ) {1316fn[ expando ] = true;1317return fn;1318}13191320/**1321* Support testing using an element1322* @param {Function} fn Passed the created div and expects a boolean result1323*/1324function assert( fn ) {1325var div = document.createElement("div");13261327try {1328return !!fn( div );1329} catch (e) {1330return false;1331} finally {1332// Remove from its parent by default1333if ( div.parentNode ) {1334div.parentNode.removeChild( div );1335}1336// release memory in IE1337div = null;1338}1339}13401341/**1342* Adds the same handler for all of the specified attrs1343* @param {String} attrs Pipe-separated list of attributes1344* @param {Function} handler The method that will be applied1345*/1346function addHandle( attrs, handler ) {1347var arr = attrs.split("|"),1348i = attrs.length;13491350while ( i-- ) {1351Expr.attrHandle[ arr[i] ] = handler;1352}1353}13541355/**1356* Checks document order of two siblings1357* @param {Element} a1358* @param {Element} b1359* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b1360*/1361function siblingCheck( a, b ) {1362var cur = b && a,1363diff = cur && a.nodeType === 1 && b.nodeType === 1 &&1364( ~b.sourceIndex || MAX_NEGATIVE ) -1365( ~a.sourceIndex || MAX_NEGATIVE );13661367// Use IE sourceIndex if available on both nodes1368if ( diff ) {1369return diff;1370}13711372// Check if b follows a1373if ( cur ) {1374while ( (cur = cur.nextSibling) ) {1375if ( cur === b ) {1376return -1;1377}1378}1379}13801381return a ? 1 : -1;1382}13831384/**1385* Returns a function to use in pseudos for input types1386* @param {String} type1387*/1388function createInputPseudo( type ) {1389return function( elem ) {1390var name = elem.nodeName.toLowerCase();1391return name === "input" && elem.type === type;1392};1393}13941395/**1396* Returns a function to use in pseudos for buttons1397* @param {String} type1398*/1399function createButtonPseudo( type ) {1400return function( elem ) {1401var name = elem.nodeName.toLowerCase();1402return (name === "input" || name === "button") && elem.type === type;1403};1404}14051406/**1407* Returns a function to use in pseudos for positionals1408* @param {Function} fn1409*/1410function createPositionalPseudo( fn ) {1411return markFunction(function( argument ) {1412argument = +argument;1413return markFunction(function( seed, matches ) {1414var j,1415matchIndexes = fn( [], seed.length, argument ),1416i = matchIndexes.length;14171418// Match elements found at the specified indexes1419while ( i-- ) {1420if ( seed[ (j = matchIndexes[i]) ] ) {1421seed[j] = !(matches[j] = seed[j]);1422}1423}1424});1425});1426}14271428/**1429* Detect xml1430* @param {Element|Object} elem An element or a document1431*/1432isXML = Sizzle.isXML = function( elem ) {1433// documentElement is verified for cases where it doesn't yet exist1434// (such as loading iframes in IE - #4833)1435var documentElement = elem && (elem.ownerDocument || elem).documentElement;1436return documentElement ? documentElement.nodeName !== "HTML" : false;1437};14381439// Expose support vars for convenience1440support = Sizzle.support = {};14411442/**1443* Sets document-related variables once based on the current document1444* @param {Element|Object} [doc] An element or document object to use to set the document1445* @returns {Object} Returns the current document1446*/1447setDocument = Sizzle.setDocument = function( node ) {1448var doc = node ? node.ownerDocument || node : preferredDoc,1449parent = doc.defaultView;14501451// If no document and documentElement is available, return1452if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {1453return document;1454}14551456// Set our document1457document = doc;1458docElem = doc.documentElement;14591460// Support tests1461documentIsHTML = !isXML( doc );14621463// Support: IE>81464// If iframe document is assigned to "document" variable and if iframe has been reloaded,1465// IE will throw "permission denied" error when accessing "document" variable, see jQuery #139361466// IE6-8 do not support the defaultView property so parent will be undefined1467if ( parent && parent.attachEvent && parent !== parent.top ) {1468parent.attachEvent( "onbeforeunload", function() {1469setDocument();1470});1471}14721473/* Attributes1474---------------------------------------------------------------------- */14751476// Support: IE<81477// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)1478support.attributes = assert(function( div ) {1479div.className = "i";1480return !div.getAttribute("className");1481});14821483/* getElement(s)By*1484---------------------------------------------------------------------- */14851486// Check if getElementsByTagName("*") returns only elements1487support.getElementsByTagName = assert(function( div ) {1488div.appendChild( doc.createComment("") );1489return !div.getElementsByTagName("*").length;1490});14911492// Check if getElementsByClassName can be trusted1493support.getElementsByClassName = assert(function( div ) {1494div.innerHTML = "<div class='a'></div><div class='a i'></div>";14951496// Support: Safari<41497// Catch class over-caching1498div.firstChild.className = "i";1499// Support: Opera<101500// Catch gEBCN failure to find non-leading classes1501return div.getElementsByClassName("i").length === 2;1502});15031504// Support: IE<101505// Check if getElementById returns elements by name1506// The broken getElementById methods don't pick up programatically-set names,1507// so use a roundabout getElementsByName test1508support.getById = assert(function( div ) {1509docElem.appendChild( div ).id = expando;1510return !doc.getElementsByName || !doc.getElementsByName( expando ).length;1511});15121513// ID find and filter1514if ( support.getById ) {1515Expr.find["ID"] = function( id, context ) {1516if ( typeof context.getElementById !== strundefined && documentIsHTML ) {1517var m = context.getElementById( id );1518// Check parentNode to catch when Blackberry 4.6 returns1519// nodes that are no longer in the document #69631520return m && m.parentNode ? [m] : [];1521}1522};1523Expr.filter["ID"] = function( id ) {1524var attrId = id.replace( runescape, funescape );1525return function( elem ) {1526return elem.getAttribute("id") === attrId;1527};1528};1529} else {1530// Support: IE6/71531// getElementById is not reliable as a find shortcut1532delete Expr.find["ID"];15331534Expr.filter["ID"] = function( id ) {1535var attrId = id.replace( runescape, funescape );1536return function( elem ) {1537var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");1538return node && node.value === attrId;1539};1540};1541}15421543// Tag1544Expr.find["TAG"] = support.getElementsByTagName ?1545function( tag, context ) {1546if ( typeof context.getElementsByTagName !== strundefined ) {1547return context.getElementsByTagName( tag );1548}1549} :1550function( tag, context ) {1551var elem,1552tmp = [],1553i = 0,1554results = context.getElementsByTagName( tag );15551556// Filter out possible comments1557if ( tag === "*" ) {1558while ( (elem = results[i++]) ) {1559if ( elem.nodeType === 1 ) {1560tmp.push( elem );1561}1562}15631564return tmp;1565}1566return results;1567};15681569// Class1570Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {1571if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {1572return context.getElementsByClassName( className );1573}1574};15751576/* QSA/matchesSelector1577---------------------------------------------------------------------- */15781579// QSA and matchesSelector support15801581// matchesSelector(:active) reports false when true (IE9/Opera 11.5)1582rbuggyMatches = [];15831584// qSa(:focus) reports false when true (Chrome 21)1585// We allow this because of a bug in IE8/9 that throws an error1586// whenever `document.activeElement` is accessed on an iframe1587// So, we allow :focus to pass through QSA all the time to avoid the IE error1588// See http://bugs.jquery.com/ticket/133781589rbuggyQSA = [];15901591if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {1592// Build QSA regex1593// Regex strategy adopted from Diego Perini1594assert(function( div ) {1595// Select is set to empty string on purpose1596// This is to test IE's treatment of not explicitly1597// setting a boolean content attribute,1598// since its presence should be enough1599// http://bugs.jquery.com/ticket/123591600div.innerHTML = "<select><option selected=''></option></select>";16011602// Support: IE81603// Boolean attributes and "value" are not treated correctly1604if ( !div.querySelectorAll("[selected]").length ) {1605rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );1606}16071608// Webkit/Opera - :checked should return selected option elements1609// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked1610// IE8 throws error here and will not see later tests1611if ( !div.querySelectorAll(":checked").length ) {1612rbuggyQSA.push(":checked");1613}1614});16151616assert(function( div ) {16171618// Support: Opera 10-12/IE81619// ^= $= *= and empty values1620// Should not select anything1621// Support: Windows 8 Native Apps1622// The type attribute is restricted during .innerHTML assignment1623var input = doc.createElement("input");1624input.setAttribute( "type", "hidden" );1625div.appendChild( input ).setAttribute( "t", "" );16261627if ( div.querySelectorAll("[t^='']").length ) {1628rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );1629}16301631// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)1632// IE8 throws error here and will not see later tests1633if ( !div.querySelectorAll(":enabled").length ) {1634rbuggyQSA.push( ":enabled", ":disabled" );1635}16361637// Opera 10-11 does not throw on post-comma invalid pseudos1638div.querySelectorAll("*,:x");1639rbuggyQSA.push(",.*:");1640});1641}16421643if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||1644docElem.mozMatchesSelector ||1645docElem.oMatchesSelector ||1646docElem.msMatchesSelector) )) ) {16471648assert(function( div ) {1649// Check to see if it's possible to do matchesSelector1650// on a disconnected node (IE 9)1651support.disconnectedMatch = matches.call( div, "div" );16521653// This should fail with an exception1654// Gecko does not error, returns false instead1655matches.call( div, "[s!='']:x" );1656rbuggyMatches.push( "!=", pseudos );1657});1658}16591660rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );1661rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );16621663/* Contains1664---------------------------------------------------------------------- */16651666// Element contains another1667// Purposefully does not implement inclusive descendent1668// As in, an element does not contain itself1669contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?1670function( a, b ) {1671var adown = a.nodeType === 9 ? a.documentElement : a,1672bup = b && b.parentNode;1673return a === bup || !!( bup && bup.nodeType === 1 && (1674adown.contains ?1675adown.contains( bup ) :1676a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 161677));1678} :1679function( a, b ) {1680if ( b ) {1681while ( (b = b.parentNode) ) {1682if ( b === a ) {1683return true;1684}1685}1686}1687return false;1688};16891690/* Sorting1691---------------------------------------------------------------------- */16921693// Document order sorting1694sortOrder = docElem.compareDocumentPosition ?1695function( a, b ) {16961697// Flag for duplicate removal1698if ( a === b ) {1699hasDuplicate = true;1700return 0;1701}17021703var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );17041705if ( compare ) {1706// Disconnected nodes1707if ( compare & 1 ||1708(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {17091710// Choose the first element that is related to our preferred document1711if ( a === doc || contains(preferredDoc, a) ) {1712return -1;1713}1714if ( b === doc || contains(preferredDoc, b) ) {1715return 1;1716}17171718// Maintain original order1719return sortInput ?1720( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :17210;1722}17231724return compare & 4 ? -1 : 1;1725}17261727// Not directly comparable, sort on existence of method1728return a.compareDocumentPosition ? -1 : 1;1729} :1730function( a, b ) {1731var cur,1732i = 0,1733aup = a.parentNode,1734bup = b.parentNode,1735ap = [ a ],1736bp = [ b ];17371738// Exit early if the nodes are identical1739if ( a === b ) {1740hasDuplicate = true;1741return 0;17421743// Parentless nodes are either documents or disconnected1744} else if ( !aup || !bup ) {1745return a === doc ? -1 :1746b === doc ? 1 :1747aup ? -1 :1748bup ? 1 :1749sortInput ?1750( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :17510;17521753// If the nodes are siblings, we can do a quick check1754} else if ( aup === bup ) {1755return siblingCheck( a, b );1756}17571758// Otherwise we need full lists of their ancestors for comparison1759cur = a;1760while ( (cur = cur.parentNode) ) {1761ap.unshift( cur );1762}1763cur = b;1764while ( (cur = cur.parentNode) ) {1765bp.unshift( cur );1766}17671768// Walk down the tree looking for a discrepancy1769while ( ap[i] === bp[i] ) {1770i++;1771}17721773return i ?1774// Do a sibling check if the nodes have a common ancestor1775siblingCheck( ap[i], bp[i] ) :17761777// Otherwise nodes in our document sort first1778ap[i] === preferredDoc ? -1 :1779bp[i] === preferredDoc ? 1 :17800;1781};17821783return doc;1784};17851786Sizzle.matches = function( expr, elements ) {1787return Sizzle( expr, null, null, elements );1788};17891790Sizzle.matchesSelector = function( elem, expr ) {1791// Set document vars if needed1792if ( ( elem.ownerDocument || elem ) !== document ) {1793setDocument( elem );1794}17951796// Make sure that attribute selectors are quoted1797expr = expr.replace( rattributeQuotes, "='$1']" );17981799if ( support.matchesSelector && documentIsHTML &&1800( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&1801( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {18021803try {1804var ret = matches.call( elem, expr );18051806// IE 9's matchesSelector returns false on disconnected nodes1807if ( ret || support.disconnectedMatch ||1808// As well, disconnected nodes are said to be in a document1809// fragment in IE 91810elem.document && elem.document.nodeType !== 11 ) {1811return ret;1812}1813} catch(e) {}1814}18151816return Sizzle( expr, document, null, [elem] ).length > 0;1817};18181819Sizzle.contains = function( context, elem ) {1820// Set document vars if needed1821if ( ( context.ownerDocument || context ) !== document ) {1822setDocument( context );1823}1824return contains( context, elem );1825};18261827Sizzle.attr = function( elem, name ) {1828// Set document vars if needed1829if ( ( elem.ownerDocument || elem ) !== document ) {1830setDocument( elem );1831}18321833var fn = Expr.attrHandle[ name.toLowerCase() ],1834// Don't get fooled by Object.prototype properties (jQuery #13807)1835val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?1836fn( elem, name, !documentIsHTML ) :1837undefined;18381839return val === undefined ?1840support.attributes || !documentIsHTML ?1841elem.getAttribute( name ) :1842(val = elem.getAttributeNode(name)) && val.specified ?1843val.value :1844null :1845val;1846};18471848Sizzle.error = function( msg ) {1849throw new Error( "Syntax error, unrecognized expression: " + msg );1850};18511852/**1853* Document sorting and removing duplicates1854* @param {ArrayLike} results1855*/1856Sizzle.uniqueSort = function( results ) {1857var elem,1858duplicates = [],1859j = 0,1860i = 0;18611862// Unless we *know* we can detect duplicates, assume their presence1863hasDuplicate = !support.detectDuplicates;1864sortInput = !support.sortStable && results.slice( 0 );1865results.sort( sortOrder );18661867if ( hasDuplicate ) {1868while ( (elem = results[i++]) ) {1869if ( elem === results[ i ] ) {1870j = duplicates.push( i );1871}1872}1873while ( j-- ) {1874results.splice( duplicates[ j ], 1 );1875}1876}18771878return results;1879};18801881/**1882* Utility function for retrieving the text value of an array of DOM nodes1883* @param {Array|Element} elem1884*/1885getText = Sizzle.getText = function( elem ) {1886var node,1887ret = "",1888i = 0,1889nodeType = elem.nodeType;18901891if ( !nodeType ) {1892// If no nodeType, this is expected to be an array1893for ( ; (node = elem[i]); i++ ) {1894// Do not traverse comment nodes1895ret += getText( node );1896}1897} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {1898// Use textContent for elements1899// innerText usage removed for consistency of new lines (see #11153)1900if ( typeof elem.textContent === "string" ) {1901return elem.textContent;1902} else {1903// Traverse its children1904for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {1905ret += getText( elem );1906}1907}1908} else if ( nodeType === 3 || nodeType === 4 ) {1909return elem.nodeValue;1910}1911// Do not include comment or processing instruction nodes19121913return ret;1914};19151916Expr = Sizzle.selectors = {19171918// Can be adjusted by the user1919cacheLength: 50,19201921createPseudo: markFunction,19221923match: matchExpr,19241925attrHandle: {},19261927find: {},19281929relative: {1930">": { dir: "parentNode", first: true },1931" ": { dir: "parentNode" },1932"+": { dir: "previousSibling", first: true },1933"~": { dir: "previousSibling" }1934},19351936preFilter: {1937"ATTR": function( match ) {1938match[1] = match[1].replace( runescape, funescape );19391940// Move the given value to match[3] whether quoted or unquoted1941match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );19421943if ( match[2] === "~=" ) {1944match[3] = " " + match[3] + " ";1945}19461947return match.slice( 0, 4 );1948},19491950"CHILD": function( match ) {1951/* matches from matchExpr["CHILD"]19521 type (only|nth|...)19532 what (child|of-type)19543 argument (even|odd|\d*|\d*n([+-]\d+)?|...)19554 xn-component of xn+y argument ([+-]?\d*n|)19565 sign of xn-component19576 x of xn-component19587 sign of y-component19598 y of y-component1960*/1961match[1] = match[1].toLowerCase();19621963if ( match[1].slice( 0, 3 ) === "nth" ) {1964// nth-* requires argument1965if ( !match[3] ) {1966Sizzle.error( match[0] );1967}19681969// numeric x and y parameters for Expr.filter.CHILD1970// remember that false/true cast respectively to 0/11971match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );1972match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );19731974// other types prohibit arguments1975} else if ( match[3] ) {1976Sizzle.error( match[0] );1977}19781979return match;1980},19811982"PSEUDO": function( match ) {1983var excess,1984unquoted = !match[5] && match[2];19851986if ( matchExpr["CHILD"].test( match[0] ) ) {1987return null;1988}19891990// Accept quoted arguments as-is1991if ( match[3] && match[4] !== undefined ) {1992match[2] = match[4];19931994// Strip excess characters from unquoted arguments1995} else if ( unquoted && rpseudo.test( unquoted ) &&1996// Get excess from tokenize (recursively)1997(excess = tokenize( unquoted, true )) &&1998// advance to the next closing parenthesis1999(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {20002001// excess is a negative index2002match[0] = match[0].slice( 0, excess );2003match[2] = unquoted.slice( 0, excess );2004}20052006// Return only captures needed by the pseudo filter method (type and argument)2007return match.slice( 0, 3 );2008}2009},20102011filter: {20122013"TAG": function( nodeNameSelector ) {2014var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();2015return nodeNameSelector === "*" ?2016function() { return true; } :2017function( elem ) {2018return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;2019};2020},20212022"CLASS": function( className ) {2023var pattern = classCache[ className + " " ];20242025return pattern ||2026(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&2027classCache( className, function( elem ) {2028return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );2029});2030},20312032"ATTR": function( name, operator, check ) {2033return function( elem ) {2034var result = Sizzle.attr( elem, name );20352036if ( result == null ) {2037return operator === "!=";2038}2039if ( !operator ) {2040return true;2041}20422043result += "";20442045return operator === "=" ? result === check :2046operator === "!=" ? result !== check :2047operator === "^=" ? check && result.indexOf( check ) === 0 :2048operator === "*=" ? check && result.indexOf( check ) > -1 :2049operator === "$=" ? check && result.slice( -check.length ) === check :2050operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :2051operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :2052false;2053};2054},20552056"CHILD": function( type, what, argument, first, last ) {2057var simple = type.slice( 0, 3 ) !== "nth",2058forward = type.slice( -4 ) !== "last",2059ofType = what === "of-type";20602061return first === 1 && last === 0 ?20622063// Shortcut for :nth-*(n)2064function( elem ) {2065return !!elem.parentNode;2066} :20672068function( elem, context, xml ) {2069var cache, outerCache, node, diff, nodeIndex, start,2070dir = simple !== forward ? "nextSibling" : "previousSibling",2071parent = elem.parentNode,2072name = ofType && elem.nodeName.toLowerCase(),2073useCache = !xml && !ofType;20742075if ( parent ) {20762077// :(first|last|only)-(child|of-type)2078if ( simple ) {2079while ( dir ) {2080node = elem;2081while ( (node = node[ dir ]) ) {2082if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {2083return false;2084}2085}2086// Reverse direction for :only-* (if we haven't yet done so)2087start = dir = type === "only" && !start && "nextSibling";2088}2089return true;2090}20912092start = [ forward ? parent.firstChild : parent.lastChild ];20932094// non-xml :nth-child(...) stores cache data on `parent`2095if ( forward && useCache ) {2096// Seek `elem` from a previously-cached index2097outerCache = parent[ expando ] || (parent[ expando ] = {});2098cache = outerCache[ type ] || [];2099nodeIndex = cache[0] === dirruns && cache[1];2100diff = cache[0] === dirruns && cache[2];2101node = nodeIndex && parent.childNodes[ nodeIndex ];21022103while ( (node = ++nodeIndex && node && node[ dir ] ||21042105// Fallback to seeking `elem` from the start2106(diff = nodeIndex = 0) || start.pop()) ) {21072108// When found, cache indexes on `parent` and break2109if ( node.nodeType === 1 && ++diff && node === elem ) {2110outerCache[ type ] = [ dirruns, nodeIndex, diff ];2111break;2112}2113}21142115// Use previously-cached element index if available2116} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {2117diff = cache[1];21182119// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)2120} else {2121// Use the same loop as above to seek `elem` from the start2122while ( (node = ++nodeIndex && node && node[ dir ] ||2123(diff = nodeIndex = 0) || start.pop()) ) {21242125if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {2126// Cache the index of each encountered element2127if ( useCache ) {2128(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];2129}21302131if ( node === elem ) {2132break;2133}2134}2135}2136}21372138// Incorporate the offset, then check against cycle size2139diff -= last;2140return diff === first || ( diff % first === 0 && diff / first >= 0 );2141}2142};2143},21442145"PSEUDO": function( pseudo, argument ) {2146// pseudo-class names are case-insensitive2147// http://www.w3.org/TR/selectors/#pseudo-classes2148// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters2149// Remember that setFilters inherits from pseudos2150var args,2151fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||2152Sizzle.error( "unsupported pseudo: " + pseudo );21532154// The user may use createPseudo to indicate that2155// arguments are needed to create the filter function2156// just as Sizzle does2157if ( fn[ expando ] ) {2158return fn( argument );2159}21602161// But maintain support for old signatures2162if ( fn.length > 1 ) {2163args = [ pseudo, pseudo, "", argument ];2164return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?2165markFunction(function( seed, matches ) {2166var idx,2167matched = fn( seed, argument ),2168i = matched.length;2169while ( i-- ) {2170idx = indexOf.call( seed, matched[i] );2171seed[ idx ] = !( matches[ idx ] = matched[i] );2172}2173}) :2174function( elem ) {2175return fn( elem, 0, args );2176};2177}21782179return fn;2180}2181},21822183pseudos: {2184// Potentially complex pseudos2185"not": markFunction(function( selector ) {2186// Trim the selector passed to compile2187// to avoid treating leading and trailing2188// spaces as combinators2189var input = [],2190results = [],2191matcher = compile( selector.replace( rtrim, "$1" ) );21922193return matcher[ expando ] ?2194markFunction(function( seed, matches, context, xml ) {2195var elem,2196unmatched = matcher( seed, null, xml, [] ),2197i = seed.length;21982199// Match elements unmatched by `matcher`2200while ( i-- ) {2201if ( (elem = unmatched[i]) ) {2202seed[i] = !(matches[i] = elem);2203}2204}2205}) :2206function( elem, context, xml ) {2207input[0] = elem;2208matcher( input, null, xml, results );2209return !results.pop();2210};2211}),22122213"has": markFunction(function( selector ) {2214return function( elem ) {2215return Sizzle( selector, elem ).length > 0;2216};2217}),22182219"contains": markFunction(function( text ) {2220return function( elem ) {2221return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;2222};2223}),22242225// "Whether an element is represented by a :lang() selector2226// is based solely on the element's language value2227// being equal to the identifier C,2228// or beginning with the identifier C immediately followed by "-".2229// The matching of C against the element's language value is performed case-insensitively.2230// The identifier C does not have to be a valid language name."2231// http://www.w3.org/TR/selectors/#lang-pseudo2232"lang": markFunction( function( lang ) {2233// lang value must be a valid identifier2234if ( !ridentifier.test(lang || "") ) {2235Sizzle.error( "unsupported lang: " + lang );2236}2237lang = lang.replace( runescape, funescape ).toLowerCase();2238return function( elem ) {2239var elemLang;2240do {2241if ( (elemLang = documentIsHTML ?2242elem.lang :2243elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {22442245elemLang = elemLang.toLowerCase();2246return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;2247}2248} while ( (elem = elem.parentNode) && elem.nodeType === 1 );2249return false;2250};2251}),22522253// Miscellaneous2254"target": function( elem ) {2255var hash = window.location && window.location.hash;2256return hash && hash.slice( 1 ) === elem.id;2257},22582259"root": function( elem ) {2260return elem === docElem;2261},22622263"focus": function( elem ) {2264return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);2265},22662267// Boolean properties2268"enabled": function( elem ) {2269return elem.disabled === false;2270},22712272"disabled": function( elem ) {2273return elem.disabled === true;2274},22752276"checked": function( elem ) {2277// In CSS3, :checked should return both checked and selected elements2278// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked2279var nodeName = elem.nodeName.toLowerCase();2280return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);2281},22822283"selected": function( elem ) {2284// Accessing this property makes selected-by-default2285// options in Safari work properly2286if ( elem.parentNode ) {2287elem.parentNode.selectedIndex;2288}22892290return elem.selected === true;2291},22922293// Contents2294"empty": function( elem ) {2295// http://www.w3.org/TR/selectors/#empty-pseudo2296// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),2297// not comment, processing instructions, or others2298// Thanks to Diego Perini for the nodeName shortcut2299// Greater than "@" means alpha characters (specifically not starting with "#" or "?")2300for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {2301if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {2302return false;2303}2304}2305return true;2306},23072308"parent": function( elem ) {2309return !Expr.pseudos["empty"]( elem );2310},23112312// Element/input types2313"header": function( elem ) {2314return rheader.test( elem.nodeName );2315},23162317"input": function( elem ) {2318return rinputs.test( elem.nodeName );2319},23202321"button": function( elem ) {2322var name = elem.nodeName.toLowerCase();2323return name === "input" && elem.type === "button" || name === "button";2324},23252326"text": function( elem ) {2327var attr;2328// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)2329// use getAttribute instead to test this case2330return elem.nodeName.toLowerCase() === "input" &&2331elem.type === "text" &&2332( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );2333},23342335// Position-in-collection2336"first": createPositionalPseudo(function() {2337return [ 0 ];2338}),23392340"last": createPositionalPseudo(function( matchIndexes, length ) {2341return [ length - 1 ];2342}),23432344"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {2345return [ argument < 0 ? argument + length : argument ];2346}),23472348"even": createPositionalPseudo(function( matchIndexes, length ) {2349var i = 0;2350for ( ; i < length; i += 2 ) {2351matchIndexes.push( i );2352}2353return matchIndexes;2354}),23552356"odd": createPositionalPseudo(function( matchIndexes, length ) {2357var i = 1;2358for ( ; i < length; i += 2 ) {2359matchIndexes.push( i );2360}2361return matchIndexes;2362}),23632364"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {2365var i = argument < 0 ? argument + length : argument;2366for ( ; --i >= 0; ) {2367matchIndexes.push( i );2368}2369return matchIndexes;2370}),23712372"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {2373var i = argument < 0 ? argument + length : argument;2374for ( ; ++i < length; ) {2375matchIndexes.push( i );2376}2377return matchIndexes;2378})2379}2380};23812382Expr.pseudos["nth"] = Expr.pseudos["eq"];23832384// Add button/input type pseudos2385for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {2386Expr.pseudos[ i ] = createInputPseudo( i );2387}2388for ( i in { submit: true, reset: true } ) {2389Expr.pseudos[ i ] = createButtonPseudo( i );2390}23912392// Easy API for creating new setFilters2393function setFilters() {}2394setFilters.prototype = Expr.filters = Expr.pseudos;2395Expr.setFilters = new setFilters();23962397function tokenize( selector, parseOnly ) {2398var matched, match, tokens, type,2399soFar, groups, preFilters,2400cached = tokenCache[ selector + " " ];24012402if ( cached ) {2403return parseOnly ? 0 : cached.slice( 0 );2404}24052406soFar = selector;2407groups = [];2408preFilters = Expr.preFilter;24092410while ( soFar ) {24112412// Comma and first run2413if ( !matched || (match = rcomma.exec( soFar )) ) {2414if ( match ) {2415// Don't consume trailing commas as valid2416soFar = soFar.slice( match[0].length ) || soFar;2417}2418groups.push( tokens = [] );2419}24202421matched = false;24222423// Combinators2424if ( (match = rcombinators.exec( soFar )) ) {2425matched = match.shift();2426tokens.push({2427value: matched,2428// Cast descendant combinators to space2429type: match[0].replace( rtrim, " " )2430});2431soFar = soFar.slice( matched.length );2432}24332434// Filters2435for ( type in Expr.filter ) {2436if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||2437(match = preFilters[ type ]( match ))) ) {2438matched = match.shift();2439tokens.push({2440value: matched,2441type: type,2442matches: match2443});2444soFar = soFar.slice( matched.length );2445}2446}24472448if ( !matched ) {2449break;2450}2451}24522453// Return the length of the invalid excess2454// if we're just parsing2455// Otherwise, throw an error or return tokens2456return parseOnly ?2457soFar.length :2458soFar ?2459Sizzle.error( selector ) :2460// Cache the tokens2461tokenCache( selector, groups ).slice( 0 );2462}24632464function toSelector( tokens ) {2465var i = 0,2466len = tokens.length,2467selector = "";2468for ( ; i < len; i++ ) {2469selector += tokens[i].value;2470}2471return selector;2472}24732474function addCombinator( matcher, combinator, base ) {2475var dir = combinator.dir,2476checkNonElements = base && dir === "parentNode",2477doneName = done++;24782479return combinator.first ?2480// Check against closest ancestor/preceding element2481function( elem, context, xml ) {2482while ( (elem = elem[ dir ]) ) {2483if ( elem.nodeType === 1 || checkNonElements ) {2484return matcher( elem, context, xml );2485}2486}2487} :24882489// Check against all ancestor/preceding elements2490function( elem, context, xml ) {2491var data, cache, outerCache,2492dirkey = dirruns + " " + doneName;24932494// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching2495if ( xml ) {2496while ( (elem = elem[ dir ]) ) {2497if ( elem.nodeType === 1 || checkNonElements ) {2498if ( matcher( elem, context, xml ) ) {2499return true;2500}2501}2502}2503} else {2504while ( (elem = elem[ dir ]) ) {2505if ( elem.nodeType === 1 || checkNonElements ) {2506outerCache = elem[ expando ] || (elem[ expando ] = {});2507if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {2508if ( (data = cache[1]) === true || data === cachedruns ) {2509return data === true;2510}2511} else {2512cache = outerCache[ dir ] = [ dirkey ];2513cache[1] = matcher( elem, context, xml ) || cachedruns;2514if ( cache[1] === true ) {2515return true;2516}2517}2518}2519}2520}2521};2522}25232524function elementMatcher( matchers ) {2525return matchers.length > 1 ?2526function( elem, context, xml ) {2527var i = matchers.length;2528while ( i-- ) {2529if ( !matchers[i]( elem, context, xml ) ) {2530return false;2531}2532}2533return true;2534} :2535matchers[0];2536}25372538function condense( unmatched, map, filter, context, xml ) {2539var elem,2540newUnmatched = [],2541i = 0,2542len = unmatched.length,2543mapped = map != null;25442545for ( ; i < len; i++ ) {2546if ( (elem = unmatched[i]) ) {2547if ( !filter || filter( elem, context, xml ) ) {2548newUnmatched.push( elem );2549if ( mapped ) {2550map.push( i );2551}2552}2553}2554}25552556return newUnmatched;2557}25582559function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {2560if ( postFilter && !postFilter[ expando ] ) {2561postFilter = setMatcher( postFilter );2562}2563if ( postFinder && !postFinder[ expando ] ) {2564postFinder = setMatcher( postFinder, postSelector );2565}2566return markFunction(function( seed, results, context, xml ) {2567var temp, i, elem,2568preMap = [],2569postMap = [],2570preexisting = results.length,25712572// Get initial elements from seed or context2573elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),25742575// Prefilter to get matcher input, preserving a map for seed-results synchronization2576matcherIn = preFilter && ( seed || !selector ) ?2577condense( elems, preMap, preFilter, context, xml ) :2578elems,25792580matcherOut = matcher ?2581// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,2582postFinder || ( seed ? preFilter : preexisting || postFilter ) ?25832584// ...intermediate processing is necessary2585[] :25862587// ...otherwise use results directly2588results :2589matcherIn;25902591// Find primary matches2592if ( matcher ) {2593matcher( matcherIn, matcherOut, context, xml );2594}25952596// Apply postFilter2597if ( postFilter ) {2598temp = condense( matcherOut, postMap );2599postFilter( temp, [], context, xml );26002601// Un-match failing elements by moving them back to matcherIn2602i = temp.length;2603while ( i-- ) {2604if ( (elem = temp[i]) ) {2605matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);2606}2607}2608}26092610if ( seed ) {2611if ( postFinder || preFilter ) {2612if ( postFinder ) {2613// Get the final matcherOut by condensing this intermediate into postFinder contexts2614temp = [];2615i = matcherOut.length;2616while ( i-- ) {2617if ( (elem = matcherOut[i]) ) {2618// Restore matcherIn since elem is not yet a final match2619temp.push( (matcherIn[i] = elem) );2620}2621}2622postFinder( null, (matcherOut = []), temp, xml );2623}26242625// Move matched elements from seed to results to keep them synchronized2626i = matcherOut.length;2627while ( i-- ) {2628if ( (elem = matcherOut[i]) &&2629(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {26302631seed[temp] = !(results[temp] = elem);2632}2633}2634}26352636// Add elements to results, through postFinder if defined2637} else {2638matcherOut = condense(2639matcherOut === results ?2640matcherOut.splice( preexisting, matcherOut.length ) :2641matcherOut2642);2643if ( postFinder ) {2644postFinder( null, results, matcherOut, xml );2645} else {2646push.apply( results, matcherOut );2647}2648}2649});2650}26512652function matcherFromTokens( tokens ) {2653var checkContext, matcher, j,2654len = tokens.length,2655leadingRelative = Expr.relative[ tokens[0].type ],2656implicitRelative = leadingRelative || Expr.relative[" "],2657i = leadingRelative ? 1 : 0,26582659// The foundational matcher ensures that elements are reachable from top-level context(s)2660matchContext = addCombinator( function( elem ) {2661return elem === checkContext;2662}, implicitRelative, true ),2663matchAnyContext = addCombinator( function( elem ) {2664return indexOf.call( checkContext, elem ) > -1;2665}, implicitRelative, true ),2666matchers = [ function( elem, context, xml ) {2667return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (2668(checkContext = context).nodeType ?2669matchContext( elem, context, xml ) :2670matchAnyContext( elem, context, xml ) );2671} ];26722673for ( ; i < len; i++ ) {2674if ( (matcher = Expr.relative[ tokens[i].type ]) ) {2675matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];2676} else {2677matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );26782679// Return special upon seeing a positional matcher2680if ( matcher[ expando ] ) {2681// Find the next relative operator (if any) for proper handling2682j = ++i;2683for ( ; j < len; j++ ) {2684if ( Expr.relative[ tokens[j].type ] ) {2685break;2686}2687}2688return setMatcher(2689i > 1 && elementMatcher( matchers ),2690i > 1 && toSelector(2691// If the preceding token was a descendant combinator, insert an implicit any-element `*`2692tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })2693).replace( rtrim, "$1" ),2694matcher,2695i < j && matcherFromTokens( tokens.slice( i, j ) ),2696j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),2697j < len && toSelector( tokens )2698);2699}2700matchers.push( matcher );2701}2702}27032704return elementMatcher( matchers );2705}27062707function matcherFromGroupMatchers( elementMatchers, setMatchers ) {2708// A counter to specify which element is currently being matched2709var matcherCachedRuns = 0,2710bySet = setMatchers.length > 0,2711byElement = elementMatchers.length > 0,2712superMatcher = function( seed, context, xml, results, expandContext ) {2713var elem, j, matcher,2714setMatched = [],2715matchedCount = 0,2716i = "0",2717unmatched = seed && [],2718outermost = expandContext != null,2719contextBackup = outermostContext,2720// We must always have either seed elements or context2721elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),2722// Use integer dirruns iff this is the outermost matcher2723dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);27242725if ( outermost ) {2726outermostContext = context !== document && context;2727cachedruns = matcherCachedRuns;2728}27292730// Add elements passing elementMatchers directly to results2731// Keep `i` a string if there are no elements so `matchedCount` will be "00" below2732for ( ; (elem = elems[i]) != null; i++ ) {2733if ( byElement && elem ) {2734j = 0;2735while ( (matcher = elementMatchers[j++]) ) {2736if ( matcher( elem, context, xml ) ) {2737results.push( elem );2738break;2739}2740}2741if ( outermost ) {2742dirruns = dirrunsUnique;2743cachedruns = ++matcherCachedRuns;2744}2745}27462747// Track unmatched elements for set filters2748if ( bySet ) {2749// They will have gone through all possible matchers2750if ( (elem = !matcher && elem) ) {2751matchedCount--;2752}27532754// Lengthen the array for every element, matched or not2755if ( seed ) {2756unmatched.push( elem );2757}2758}2759}27602761// Apply set filters to unmatched elements2762matchedCount += i;2763if ( bySet && i !== matchedCount ) {2764j = 0;2765while ( (matcher = setMatchers[j++]) ) {2766matcher( unmatched, setMatched, context, xml );2767}27682769if ( seed ) {2770// Reintegrate element matches to eliminate the need for sorting2771if ( matchedCount > 0 ) {2772while ( i-- ) {2773if ( !(unmatched[i] || setMatched[i]) ) {2774setMatched[i] = pop.call( results );2775}2776}2777}27782779// Discard index placeholder values to get only actual matches2780setMatched = condense( setMatched );2781}27822783// Add matches to results2784push.apply( results, setMatched );27852786// Seedless set matches succeeding multiple successful matchers stipulate sorting2787if ( outermost && !seed && setMatched.length > 0 &&2788( matchedCount + setMatchers.length ) > 1 ) {27892790Sizzle.uniqueSort( results );2791}2792}27932794// Override manipulation of globals by nested matchers2795if ( outermost ) {2796dirruns = dirrunsUnique;2797outermostContext = contextBackup;2798}27992800return unmatched;2801};28022803return bySet ?2804markFunction( superMatcher ) :2805superMatcher;2806}28072808compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {2809var i,2810setMatchers = [],2811elementMatchers = [],2812cached = compilerCache[ selector + " " ];28132814if ( !cached ) {2815// Generate a function of recursive functions that can be used to check each element2816if ( !group ) {2817group = tokenize( selector );2818}2819i = group.length;2820while ( i-- ) {2821cached = matcherFromTokens( group[i] );2822if ( cached[ expando ] ) {2823setMatchers.push( cached );2824} else {2825elementMatchers.push( cached );2826}2827}28282829// Cache the compiled function2830cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );2831}2832return cached;2833};28342835function multipleContexts( selector, contexts, results ) {2836var i = 0,2837len = contexts.length;2838for ( ; i < len; i++ ) {2839Sizzle( selector, contexts[i], results );2840}2841return results;2842}28432844function select( selector, context, results, seed ) {2845var i, tokens, token, type, find,2846match = tokenize( selector );28472848if ( !seed ) {2849// Try to minimize operations if there is only one group2850if ( match.length === 1 ) {28512852// Take a shortcut and set the context if the root selector is an ID2853tokens = match[0] = match[0].slice( 0 );2854if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&2855support.getById && context.nodeType === 9 && documentIsHTML &&2856Expr.relative[ tokens[1].type ] ) {28572858context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];2859if ( !context ) {2860return results;2861}2862selector = selector.slice( tokens.shift().value.length );2863}28642865// Fetch a seed set for right-to-left matching2866i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;2867while ( i-- ) {2868token = tokens[i];28692870// Abort if we hit a combinator2871if ( Expr.relative[ (type = token.type) ] ) {2872break;2873}2874if ( (find = Expr.find[ type ]) ) {2875// Search, expanding context for leading sibling combinators2876if ( (seed = find(2877token.matches[0].replace( runescape, funescape ),2878rsibling.test( tokens[0].type ) && context.parentNode || context2879)) ) {28802881// If seed is empty or no tokens remain, we can return early2882tokens.splice( i, 1 );2883selector = seed.length && toSelector( tokens );2884if ( !selector ) {2885push.apply( results, seed );2886return results;2887}28882889break;2890}2891}2892}2893}2894}28952896// Compile and execute a filtering function2897// Provide `match` to avoid retokenization if we modified the selector above2898compile( selector, match )(2899seed,2900context,2901!documentIsHTML,2902results,2903rsibling.test( selector )2904);2905return results;2906}29072908// One-time assignments29092910// Sort stability2911support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;29122913// Support: Chrome<142914// Always assume duplicates if they aren't passed to the comparison function2915support.detectDuplicates = hasDuplicate;29162917// Initialize against the default document2918setDocument();29192920// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)2921// Detached nodes confoundingly follow *each other*2922support.sortDetached = assert(function( div1 ) {2923// Should return 1, but returns 4 (following)2924return div1.compareDocumentPosition( document.createElement("div") ) & 1;2925});29262927// Support: IE<82928// Prevent attribute/property "interpolation"2929// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx2930if ( !assert(function( div ) {2931div.innerHTML = "<a href='#'></a>";2932return div.firstChild.getAttribute("href") === "#" ;2933}) ) {2934addHandle( "type|href|height|width", function( elem, name, isXML ) {2935if ( !isXML ) {2936return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );2937}2938});2939}29402941// Support: IE<92942// Use defaultValue in place of getAttribute("value")2943if ( !support.attributes || !assert(function( div ) {2944div.innerHTML = "<input/>";2945div.firstChild.setAttribute( "value", "" );2946return div.firstChild.getAttribute( "value" ) === "";2947}) ) {2948addHandle( "value", function( elem, name, isXML ) {2949if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {2950return elem.defaultValue;2951}2952});2953}29542955// Support: IE<92956// Use getAttributeNode to fetch booleans when getAttribute lies2957if ( !assert(function( div ) {2958return div.getAttribute("disabled") == null;2959}) ) {2960addHandle( booleans, function( elem, name, isXML ) {2961var val;2962if ( !isXML ) {2963return (val = elem.getAttributeNode( name )) && val.specified ?2964val.value :2965elem[ name ] === true ? name.toLowerCase() : null;2966}2967});2968}29692970jQuery.find = Sizzle;2971jQuery.expr = Sizzle.selectors;2972jQuery.expr[":"] = jQuery.expr.pseudos;2973jQuery.unique = Sizzle.uniqueSort;2974jQuery.text = Sizzle.getText;2975jQuery.isXMLDoc = Sizzle.isXML;2976jQuery.contains = Sizzle.contains;297729782979})( window );2980// String to Object options format cache2981var optionsCache = {};29822983// Convert String-formatted options into Object-formatted ones and store in cache2984function createOptions( options ) {2985var object = optionsCache[ options ] = {};2986jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {2987object[ flag ] = true;2988});2989return object;2990}29912992/*2993* Create a callback list using the following parameters:2994*2995* options: an optional list of space-separated options that will change how2996* the callback list behaves or a more traditional option object2997*2998* By default a callback list will act like an event callback list and can be2999* "fired" multiple times.3000*3001* Possible options:3002*3003* once: will ensure the callback list can only be fired once (like a Deferred)3004*3005* memory: will keep track of previous values and will call any callback added3006* after the list has been fired right away with the latest "memorized"3007* values (like a Deferred)3008*3009* unique: will ensure a callback can only be added once (no duplicate in the list)3010*3011* stopOnFalse: interrupt callings when a callback returns false3012*3013*/3014jQuery.Callbacks = function( options ) {30153016// Convert options from String-formatted to Object-formatted if needed3017// (we check in cache first)3018options = typeof options === "string" ?3019( optionsCache[ options ] || createOptions( options ) ) :3020jQuery.extend( {}, options );30213022var // Flag to know if list is currently firing3023firing,3024// Last fire value (for non-forgettable lists)3025memory,3026// Flag to know if list was already fired3027fired,3028// End of the loop when firing3029firingLength,3030// Index of currently firing callback (modified by remove if needed)3031firingIndex,3032// First callback to fire (used internally by add and fireWith)3033firingStart,3034// Actual callback list3035list = [],3036// Stack of fire calls for repeatable lists3037stack = !options.once && [],3038// Fire callbacks3039fire = function( data ) {3040memory = options.memory && data;3041fired = true;3042firingIndex = firingStart || 0;3043firingStart = 0;3044firingLength = list.length;3045firing = true;3046for ( ; list && firingIndex < firingLength; firingIndex++ ) {3047if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {3048memory = false; // To prevent further calls using add3049break;3050}3051}3052firing = false;3053if ( list ) {3054if ( stack ) {3055if ( stack.length ) {3056fire( stack.shift() );3057}3058} else if ( memory ) {3059list = [];3060} else {3061self.disable();3062}3063}3064},3065// Actual Callbacks object3066self = {3067// Add a callback or a collection of callbacks to the list3068add: function() {3069if ( list ) {3070// First, we save the current length3071var start = list.length;3072(function add( args ) {3073jQuery.each( args, function( _, arg ) {3074var type = jQuery.type( arg );3075if ( type === "function" ) {3076if ( !options.unique || !self.has( arg ) ) {3077list.push( arg );3078}3079} else if ( arg && arg.length && type !== "string" ) {3080// Inspect recursively3081add( arg );3082}3083});3084})( arguments );3085// Do we need to add the callbacks to the3086// current firing batch?3087if ( firing ) {3088firingLength = list.length;3089// With memory, if we're not firing then3090// we should call right away3091} else if ( memory ) {3092firingStart = start;3093fire( memory );3094}3095}3096return this;3097},3098// Remove a callback from the list3099remove: function() {3100if ( list ) {3101jQuery.each( arguments, function( _, arg ) {3102var index;3103while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {3104list.splice( index, 1 );3105// Handle firing indexes3106if ( firing ) {3107if ( index <= firingLength ) {3108firingLength--;3109}3110if ( index <= firingIndex ) {3111firingIndex--;3112}3113}3114}3115});3116}3117return this;3118},3119// Check if a given callback is in the list.3120// If no argument is given, return whether or not list has callbacks attached.3121has: function( fn ) {3122return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );3123},3124// Remove all callbacks from the list3125empty: function() {3126list = [];3127firingLength = 0;3128return this;3129},3130// Have the list do nothing anymore3131disable: function() {3132list = stack = memory = undefined;3133return this;3134},3135// Is it disabled?3136disabled: function() {3137return !list;3138},3139// Lock the list in its current state3140lock: function() {3141stack = undefined;3142if ( !memory ) {3143self.disable();3144}3145return this;3146},3147// Is it locked?3148locked: function() {3149return !stack;3150},3151// Call all callbacks with the given context and arguments3152fireWith: function( context, args ) {3153if ( list && ( !fired || stack ) ) {3154args = args || [];3155args = [ context, args.slice ? args.slice() : args ];3156if ( firing ) {3157stack.push( args );3158} else {3159fire( args );3160}3161}3162return this;3163},3164// Call all the callbacks with the given arguments3165fire: function() {3166self.fireWith( this, arguments );3167return this;3168},3169// To know if the callbacks have already been called at least once3170fired: function() {3171return !!fired;3172}3173};31743175return self;3176};3177jQuery.extend({31783179Deferred: function( func ) {3180var tuples = [3181// action, add listener, listener list, final state3182[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],3183[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],3184[ "notify", "progress", jQuery.Callbacks("memory") ]3185],3186state = "pending",3187promise = {3188state: function() {3189return state;3190},3191always: function() {3192deferred.done( arguments ).fail( arguments );3193return this;3194},3195then: function( /* fnDone, fnFail, fnProgress */ ) {3196var fns = arguments;3197return jQuery.Deferred(function( newDefer ) {3198jQuery.each( tuples, function( i, tuple ) {3199var action = tuple[ 0 ],3200fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];3201// deferred[ done | fail | progress ] for forwarding actions to newDefer3202deferred[ tuple[1] ](function() {3203var returned = fn && fn.apply( this, arguments );3204if ( returned && jQuery.isFunction( returned.promise ) ) {3205returned.promise()3206.done( newDefer.resolve )3207.fail( newDefer.reject )3208.progress( newDefer.notify );3209} else {3210newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );3211}3212});3213});3214fns = null;3215}).promise();3216},3217// Get a promise for this deferred3218// If obj is provided, the promise aspect is added to the object3219promise: function( obj ) {3220return obj != null ? jQuery.extend( obj, promise ) : promise;3221}3222},3223deferred = {};32243225// Keep pipe for back-compat3226promise.pipe = promise.then;32273228// Add list-specific methods3229jQuery.each( tuples, function( i, tuple ) {3230var list = tuple[ 2 ],3231stateString = tuple[ 3 ];32323233// promise[ done | fail | progress ] = list.add3234promise[ tuple[1] ] = list.add;32353236// Handle state3237if ( stateString ) {3238list.add(function() {3239// state = [ resolved | rejected ]3240state = stateString;32413242// [ reject_list | resolve_list ].disable; progress_list.lock3243}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );3244}32453246// deferred[ resolve | reject | notify ]3247deferred[ tuple[0] ] = function() {3248deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );3249return this;3250};3251deferred[ tuple[0] + "With" ] = list.fireWith;3252});32533254// Make the deferred a promise3255promise.promise( deferred );32563257// Call given func if any3258if ( func ) {3259func.call( deferred, deferred );3260}32613262// All done!3263return deferred;3264},32653266// Deferred helper3267when: function( subordinate /* , ..., subordinateN */ ) {3268var i = 0,3269resolveValues = core_slice.call( arguments ),3270length = resolveValues.length,32713272// the count of uncompleted subordinates3273remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,32743275// the master Deferred. If resolveValues consist of only a single Deferred, just use that.3276deferred = remaining === 1 ? subordinate : jQuery.Deferred(),32773278// Update function for both resolve and progress values3279updateFunc = function( i, contexts, values ) {3280return function( value ) {3281contexts[ i ] = this;3282values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;3283if( values === progressValues ) {3284deferred.notifyWith( contexts, values );3285} else if ( !( --remaining ) ) {3286deferred.resolveWith( contexts, values );3287}3288};3289},32903291progressValues, progressContexts, resolveContexts;32923293// add listeners to Deferred subordinates; treat others as resolved3294if ( length > 1 ) {3295progressValues = new Array( length );3296progressContexts = new Array( length );3297resolveContexts = new Array( length );3298for ( ; i < length; i++ ) {3299if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {3300resolveValues[ i ].promise()3301.done( updateFunc( i, resolveContexts, resolveValues ) )3302.fail( deferred.reject )3303.progress( updateFunc( i, progressContexts, progressValues ) );3304} else {3305--remaining;3306}3307}3308}33093310// if we're not waiting on anything, resolve the master3311if ( !remaining ) {3312deferred.resolveWith( resolveContexts, resolveValues );3313}33143315return deferred.promise();3316}3317});3318jQuery.support = (function( support ) {33193320var all, a, input, select, fragment, opt, eventName, isSupported, i,3321div = document.createElement("div");33223323// Setup3324div.setAttribute( "className", "t" );3325div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";33263327// Finish early in limited (non-browser) environments3328all = div.getElementsByTagName("*") || [];3329a = div.getElementsByTagName("a")[ 0 ];3330if ( !a || !a.style || !all.length ) {3331return support;3332}33333334// First batch of tests3335select = document.createElement("select");3336opt = select.appendChild( document.createElement("option") );3337input = div.getElementsByTagName("input")[ 0 ];33383339a.style.cssText = "top:1px;float:left;opacity:.5";33403341// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)3342support.getSetAttribute = div.className !== "t";33433344// IE strips leading whitespace when .innerHTML is used3345support.leadingWhitespace = div.firstChild.nodeType === 3;33463347// Make sure that tbody elements aren't automatically inserted3348// IE will insert them into empty tables3349support.tbody = !div.getElementsByTagName("tbody").length;33503351// Make sure that link elements get serialized correctly by innerHTML3352// This requires a wrapper element in IE3353support.htmlSerialize = !!div.getElementsByTagName("link").length;33543355// Get the style information from getAttribute3356// (IE uses .cssText instead)3357support.style = /top/.test( a.getAttribute("style") );33583359// Make sure that URLs aren't manipulated3360// (IE normalizes it by default)3361support.hrefNormalized = a.getAttribute("href") === "/a";33623363// Make sure that element opacity exists3364// (IE uses filter instead)3365// Use a regex to work around a WebKit issue. See #51453366support.opacity = /^0.5/.test( a.style.opacity );33673368// Verify style float existence3369// (IE uses styleFloat instead of cssFloat)3370support.cssFloat = !!a.style.cssFloat;33713372// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)3373support.checkOn = !!input.value;33743375// Make sure that a selected-by-default option has a working selected property.3376// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)3377support.optSelected = opt.selected;33783379// Tests for enctype support on a form (#6743)3380support.enctype = !!document.createElement("form").enctype;33813382// Makes sure cloning an html5 element does not cause problems3383// Where outerHTML is undefined, this still works3384support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";33853386// Will be defined later3387support.inlineBlockNeedsLayout = false;3388support.shrinkWrapBlocks = false;3389support.pixelPosition = false;3390support.deleteExpando = true;3391support.noCloneEvent = true;3392support.reliableMarginRight = true;3393support.boxSizingReliable = true;33943395// Make sure checked status is properly cloned3396input.checked = true;3397support.noCloneChecked = input.cloneNode( true ).checked;33983399// Make sure that the options inside disabled selects aren't marked as disabled3400// (WebKit marks them as disabled)3401select.disabled = true;3402support.optDisabled = !opt.disabled;34033404// Support: IE<93405try {3406delete div.test;3407} catch( e ) {3408support.deleteExpando = false;3409}34103411// Check if we can trust getAttribute("value")3412input = document.createElement("input");3413input.setAttribute( "value", "" );3414support.input = input.getAttribute( "value" ) === "";34153416// Check if an input maintains its value after becoming a radio3417input.value = "t";3418input.setAttribute( "type", "radio" );3419support.radioValue = input.value === "t";34203421// #11217 - WebKit loses check when the name is after the checked attribute3422input.setAttribute( "checked", "t" );3423input.setAttribute( "name", "t" );34243425fragment = document.createDocumentFragment();3426fragment.appendChild( input );34273428// Check if a disconnected checkbox will retain its checked3429// value of true after appended to the DOM (IE6/7)3430support.appendChecked = input.checked;34313432// WebKit doesn't clone checked state correctly in fragments3433support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;34343435// Support: IE<93436// Opera does not clone events (and typeof div.attachEvent === undefined).3437// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()3438if ( div.attachEvent ) {3439div.attachEvent( "onclick", function() {3440support.noCloneEvent = false;3441});34423443div.cloneNode( true ).click();3444}34453446// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)3447// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)3448for ( i in { submit: true, change: true, focusin: true }) {3449div.setAttribute( eventName = "on" + i, "t" );34503451support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;3452}34533454div.style.backgroundClip = "content-box";3455div.cloneNode( true ).style.backgroundClip = "";3456support.clearCloneStyle = div.style.backgroundClip === "content-box";34573458// Support: IE<93459// Iteration over object's inherited properties before its own.3460for ( i in jQuery( support ) ) {3461break;3462}3463support.ownLast = i !== "0";34643465// Run tests that need a body at doc ready3466jQuery(function() {3467var container, marginDiv, tds,3468divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",3469body = document.getElementsByTagName("body")[0];34703471if ( !body ) {3472// Return for frameset docs that don't have a body3473return;3474}34753476container = document.createElement("div");3477container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";34783479body.appendChild( container ).appendChild( div );34803481// Support: IE83482// Check if table cells still have offsetWidth/Height when they are set3483// to display:none and there are still other visible table cells in a3484// table row; if so, offsetWidth/Height are not reliable for use when3485// determining if an element has been hidden directly using3486// display:none (it is still safe to use offsets if a parent element is3487// hidden; don safety goggles and see bug #4512 for more information).3488div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";3489tds = div.getElementsByTagName("td");3490tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";3491isSupported = ( tds[ 0 ].offsetHeight === 0 );34923493tds[ 0 ].style.display = "";3494tds[ 1 ].style.display = "none";34953496// Support: IE83497// Check if empty table cells still have offsetWidth/Height3498support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );34993500// Check box-sizing and margin behavior.3501div.innerHTML = "";3502div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";35033504// Workaround failing boxSizing test due to offsetWidth returning wrong value3505// with some non-1 values of body zoom, ticket #135433506jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {3507support.boxSizing = div.offsetWidth === 4;3508});35093510// Use window.getComputedStyle because jsdom on node.js will break without it.3511if ( window.getComputedStyle ) {3512support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";3513support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";35143515// Check if div with explicit width and no margin-right incorrectly3516// gets computed margin-right based on width of container. (#3333)3517// Fails in WebKit before Feb 2011 nightlies3518// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right3519marginDiv = div.appendChild( document.createElement("div") );3520marginDiv.style.cssText = div.style.cssText = divReset;3521marginDiv.style.marginRight = marginDiv.style.width = "0";3522div.style.width = "1px";35233524support.reliableMarginRight =3525!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );3526}35273528if ( typeof div.style.zoom !== core_strundefined ) {3529// Support: IE<83530// Check if natively block-level elements act like inline-block3531// elements when setting their display to 'inline' and giving3532// them layout3533div.innerHTML = "";3534div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";3535support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );35363537// Support: IE63538// Check if elements with layout shrink-wrap their children3539div.style.display = "block";3540div.innerHTML = "<div></div>";3541div.firstChild.style.width = "5px";3542support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );35433544if ( support.inlineBlockNeedsLayout ) {3545// Prevent IE 6 from affecting layout for positioned elements #110483546// Prevent IE from shrinking the body in IE 7 mode #128693547// Support: IE<83548body.style.zoom = 1;3549}3550}35513552body.removeChild( container );35533554// Null elements to avoid leaks in IE3555container = div = tds = marginDiv = null;3556});35573558// Null elements to avoid leaks in IE3559all = select = fragment = opt = a = input = null;35603561return support;3562})({});35633564var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,3565rmultiDash = /([A-Z])/g;35663567function internalData( elem, name, data, pvt /* Internal Use Only */ ){3568if ( !jQuery.acceptData( elem ) ) {3569return;3570}35713572var ret, thisCache,3573internalKey = jQuery.expando,35743575// We have to handle DOM nodes and JS objects differently because IE6-73576// can't GC object references properly across the DOM-JS boundary3577isNode = elem.nodeType,35783579// Only DOM nodes need the global jQuery cache; JS object data is3580// attached directly to the object so GC can occur automatically3581cache = isNode ? jQuery.cache : elem,35823583// Only defining an ID for JS objects if its cache already exists allows3584// the code to shortcut on the same path as a DOM node with no cache3585id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;35863587// Avoid doing any more work than we need to when trying to get data on an3588// object that has no data at all3589if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {3590return;3591}35923593if ( !id ) {3594// Only DOM nodes need a new unique ID for each element since their data3595// ends up in the global cache3596if ( isNode ) {3597id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;3598} else {3599id = internalKey;3600}3601}36023603if ( !cache[ id ] ) {3604// Avoid exposing jQuery metadata on plain JS objects when the object3605// is serialized using JSON.stringify3606cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };3607}36083609// An object can be passed to jQuery.data instead of a key/value pair; this gets3610// shallow copied over onto the existing cache3611if ( typeof name === "object" || typeof name === "function" ) {3612if ( pvt ) {3613cache[ id ] = jQuery.extend( cache[ id ], name );3614} else {3615cache[ id ].data = jQuery.extend( cache[ id ].data, name );3616}3617}36183619thisCache = cache[ id ];36203621// jQuery data() is stored in a separate object inside the object's internal data3622// cache in order to avoid key collisions between internal data and user-defined3623// data.3624if ( !pvt ) {3625if ( !thisCache.data ) {3626thisCache.data = {};3627}36283629thisCache = thisCache.data;3630}36313632if ( data !== undefined ) {3633thisCache[ jQuery.camelCase( name ) ] = data;3634}36353636// Check for both converted-to-camel and non-converted data property names3637// If a data property was specified3638if ( typeof name === "string" ) {36393640// First Try to find as-is property data3641ret = thisCache[ name ];36423643// Test for null|undefined property data3644if ( ret == null ) {36453646// Try to find the camelCased property3647ret = thisCache[ jQuery.camelCase( name ) ];3648}3649} else {3650ret = thisCache;3651}36523653return ret;3654}36553656function internalRemoveData( elem, name, pvt ) {3657if ( !jQuery.acceptData( elem ) ) {3658return;3659}36603661var thisCache, i,3662isNode = elem.nodeType,36633664// See jQuery.data for more information3665cache = isNode ? jQuery.cache : elem,3666id = isNode ? elem[ jQuery.expando ] : jQuery.expando;36673668// If there is already no cache entry for this object, there is no3669// purpose in continuing3670if ( !cache[ id ] ) {3671return;3672}36733674if ( name ) {36753676thisCache = pvt ? cache[ id ] : cache[ id ].data;36773678if ( thisCache ) {36793680// Support array or space separated string names for data keys3681if ( !jQuery.isArray( name ) ) {36823683// try the string as a key before any manipulation3684if ( name in thisCache ) {3685name = [ name ];3686} else {36873688// split the camel cased version by spaces unless a key with the spaces exists3689name = jQuery.camelCase( name );3690if ( name in thisCache ) {3691name = [ name ];3692} else {3693name = name.split(" ");3694}3695}3696} else {3697// If "name" is an array of keys...3698// When data is initially created, via ("key", "val") signature,3699// keys will be converted to camelCase.3700// Since there is no way to tell _how_ a key was added, remove3701// both plain key and camelCase key. #127863702// This will only penalize the array argument path.3703name = name.concat( jQuery.map( name, jQuery.camelCase ) );3704}37053706i = name.length;3707while ( i-- ) {3708delete thisCache[ name[i] ];3709}37103711// If there is no data left in the cache, we want to continue3712// and let the cache object itself get destroyed3713if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {3714return;3715}3716}3717}37183719// See jQuery.data for more information3720if ( !pvt ) {3721delete cache[ id ].data;37223723// Don't destroy the parent cache unless the internal data object3724// had been the only thing left in it3725if ( !isEmptyDataObject( cache[ id ] ) ) {3726return;3727}3728}37293730// Destroy the cache3731if ( isNode ) {3732jQuery.cleanData( [ elem ], true );37333734// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)3735/* jshint eqeqeq: false */3736} else if ( jQuery.support.deleteExpando || cache != cache.window ) {3737/* jshint eqeqeq: true */3738delete cache[ id ];37393740// When all else fails, null3741} else {3742cache[ id ] = null;3743}3744}37453746jQuery.extend({3747cache: {},37483749// The following elements throw uncatchable exceptions if you3750// attempt to add expando properties to them.3751noData: {3752"applet": true,3753"embed": true,3754// Ban all objects except for Flash (which handle expandos)3755"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"3756},37573758hasData: function( elem ) {3759elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];3760return !!elem && !isEmptyDataObject( elem );3761},37623763data: function( elem, name, data ) {3764return internalData( elem, name, data );3765},37663767removeData: function( elem, name ) {3768return internalRemoveData( elem, name );3769},37703771// For internal use only.3772_data: function( elem, name, data ) {3773return internalData( elem, name, data, true );3774},37753776_removeData: function( elem, name ) {3777return internalRemoveData( elem, name, true );3778},37793780// A method for determining if a DOM node can handle the data expando3781acceptData: function( elem ) {3782// Do not set data on non-element because it will not be cleared (#8335).3783if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {3784return false;3785}37863787var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];37883789// nodes accept data unless otherwise specified; rejection can be conditional3790return !noData || noData !== true && elem.getAttribute("classid") === noData;3791}3792});37933794jQuery.fn.extend({3795data: function( key, value ) {3796var attrs, name,3797data = null,3798i = 0,3799elem = this[0];38003801// Special expections of .data basically thwart jQuery.access,3802// so implement the relevant behavior ourselves38033804// Gets all values3805if ( key === undefined ) {3806if ( this.length ) {3807data = jQuery.data( elem );38083809if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {3810attrs = elem.attributes;3811for ( ; i < attrs.length; i++ ) {3812name = attrs[i].name;38133814if ( name.indexOf("data-") === 0 ) {3815name = jQuery.camelCase( name.slice(5) );38163817dataAttr( elem, name, data[ name ] );3818}3819}3820jQuery._data( elem, "parsedAttrs", true );3821}3822}38233824return data;3825}38263827// Sets multiple values3828if ( typeof key === "object" ) {3829return this.each(function() {3830jQuery.data( this, key );3831});3832}38333834return arguments.length > 1 ?38353836// Sets one value3837this.each(function() {3838jQuery.data( this, key, value );3839}) :38403841// Gets one value3842// Try to fetch any internally stored data first3843elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;3844},38453846removeData: function( key ) {3847return this.each(function() {3848jQuery.removeData( this, key );3849});3850}3851});38523853function dataAttr( elem, key, data ) {3854// If nothing was found internally, try to fetch any3855// data from the HTML5 data-* attribute3856if ( data === undefined && elem.nodeType === 1 ) {38573858var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();38593860data = elem.getAttribute( name );38613862if ( typeof data === "string" ) {3863try {3864data = data === "true" ? true :3865data === "false" ? false :3866data === "null" ? null :3867// Only convert to a number if it doesn't change the string3868+data + "" === data ? +data :3869rbrace.test( data ) ? jQuery.parseJSON( data ) :3870data;3871} catch( e ) {}38723873// Make sure we set the data so it isn't changed later3874jQuery.data( elem, key, data );38753876} else {3877data = undefined;3878}3879}38803881return data;3882}38833884// checks a cache object for emptiness3885function isEmptyDataObject( obj ) {3886var name;3887for ( name in obj ) {38883889// if the public data object is empty, the private is still empty3890if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {3891continue;3892}3893if ( name !== "toJSON" ) {3894return false;3895}3896}38973898return true;3899}3900jQuery.extend({3901queue: function( elem, type, data ) {3902var queue;39033904if ( elem ) {3905type = ( type || "fx" ) + "queue";3906queue = jQuery._data( elem, type );39073908// Speed up dequeue by getting out quickly if this is just a lookup3909if ( data ) {3910if ( !queue || jQuery.isArray(data) ) {3911queue = jQuery._data( elem, type, jQuery.makeArray(data) );3912} else {3913queue.push( data );3914}3915}3916return queue || [];3917}3918},39193920dequeue: function( elem, type ) {3921type = type || "fx";39223923var queue = jQuery.queue( elem, type ),3924startLength = queue.length,3925fn = queue.shift(),3926hooks = jQuery._queueHooks( elem, type ),3927next = function() {3928jQuery.dequeue( elem, type );3929};39303931// If the fx queue is dequeued, always remove the progress sentinel3932if ( fn === "inprogress" ) {3933fn = queue.shift();3934startLength--;3935}39363937if ( fn ) {39383939// Add a progress sentinel to prevent the fx queue from being3940// automatically dequeued3941if ( type === "fx" ) {3942queue.unshift( "inprogress" );3943}39443945// clear up the last queue stop function3946delete hooks.stop;3947fn.call( elem, next, hooks );3948}39493950if ( !startLength && hooks ) {3951hooks.empty.fire();3952}3953},39543955// not intended for public consumption - generates a queueHooks object, or returns the current one3956_queueHooks: function( elem, type ) {3957var key = type + "queueHooks";3958return jQuery._data( elem, key ) || jQuery._data( elem, key, {3959empty: jQuery.Callbacks("once memory").add(function() {3960jQuery._removeData( elem, type + "queue" );3961jQuery._removeData( elem, key );3962})3963});3964}3965});39663967jQuery.fn.extend({3968queue: function( type, data ) {3969var setter = 2;39703971if ( typeof type !== "string" ) {3972data = type;3973type = "fx";3974setter--;3975}39763977if ( arguments.length < setter ) {3978return jQuery.queue( this[0], type );3979}39803981return data === undefined ?3982this :3983this.each(function() {3984var queue = jQuery.queue( this, type, data );39853986// ensure a hooks for this queue3987jQuery._queueHooks( this, type );39883989if ( type === "fx" && queue[0] !== "inprogress" ) {3990jQuery.dequeue( this, type );3991}3992});3993},3994dequeue: function( type ) {3995return this.each(function() {3996jQuery.dequeue( this, type );3997});3998},3999// Based off of the plugin by Clint Helfers, with permission.4000// http://blindsignals.com/index.php/2009/07/jquery-delay/4001delay: function( time, type ) {4002time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;4003type = type || "fx";40044005return this.queue( type, function( next, hooks ) {4006var timeout = setTimeout( next, time );4007hooks.stop = function() {4008clearTimeout( timeout );4009};4010});4011},4012clearQueue: function( type ) {4013return this.queue( type || "fx", [] );4014},4015// Get a promise resolved when queues of a certain type4016// are emptied (fx is the type by default)4017promise: function( type, obj ) {4018var tmp,4019count = 1,4020defer = jQuery.Deferred(),4021elements = this,4022i = this.length,4023resolve = function() {4024if ( !( --count ) ) {4025defer.resolveWith( elements, [ elements ] );4026}4027};40284029if ( typeof type !== "string" ) {4030obj = type;4031type = undefined;4032}4033type = type || "fx";40344035while( i-- ) {4036tmp = jQuery._data( elements[ i ], type + "queueHooks" );4037if ( tmp && tmp.empty ) {4038count++;4039tmp.empty.add( resolve );4040}4041}4042resolve();4043return defer.promise( obj );4044}4045});4046var nodeHook, boolHook,4047rclass = /[\t\r\n\f]/g,4048rreturn = /\r/g,4049rfocusable = /^(?:input|select|textarea|button|object)$/i,4050rclickable = /^(?:a|area)$/i,4051ruseDefault = /^(?:checked|selected)$/i,4052getSetAttribute = jQuery.support.getSetAttribute,4053getSetInput = jQuery.support.input;40544055jQuery.fn.extend({4056attr: function( name, value ) {4057return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );4058},40594060removeAttr: function( name ) {4061return this.each(function() {4062jQuery.removeAttr( this, name );4063});4064},40654066prop: function( name, value ) {4067return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );4068},40694070removeProp: function( name ) {4071name = jQuery.propFix[ name ] || name;4072return this.each(function() {4073// try/catch handles cases where IE balks (such as removing a property on window)4074try {4075this[ name ] = undefined;4076delete this[ name ];4077} catch( e ) {}4078});4079},40804081addClass: function( value ) {4082var classes, elem, cur, clazz, j,4083i = 0,4084len = this.length,4085proceed = typeof value === "string" && value;40864087if ( jQuery.isFunction( value ) ) {4088return this.each(function( j ) {4089jQuery( this ).addClass( value.call( this, j, this.className ) );4090});4091}40924093if ( proceed ) {4094// The disjunction here is for better compressibility (see removeClass)4095classes = ( value || "" ).match( core_rnotwhite ) || [];40964097for ( ; i < len; i++ ) {4098elem = this[ i ];4099cur = elem.nodeType === 1 && ( elem.className ?4100( " " + elem.className + " " ).replace( rclass, " " ) :4101" "4102);41034104if ( cur ) {4105j = 0;4106while ( (clazz = classes[j++]) ) {4107if ( cur.indexOf( " " + clazz + " " ) < 0 ) {4108cur += clazz + " ";4109}4110}4111elem.className = jQuery.trim( cur );41124113}4114}4115}41164117return this;4118},41194120removeClass: function( value ) {4121var classes, elem, cur, clazz, j,4122i = 0,4123len = this.length,4124proceed = arguments.length === 0 || typeof value === "string" && value;41254126if ( jQuery.isFunction( value ) ) {4127return this.each(function( j ) {4128jQuery( this ).removeClass( value.call( this, j, this.className ) );4129});4130}4131if ( proceed ) {4132classes = ( value || "" ).match( core_rnotwhite ) || [];41334134for ( ; i < len; i++ ) {4135elem = this[ i ];4136// This expression is here for better compressibility (see addClass)4137cur = elem.nodeType === 1 && ( elem.className ?4138( " " + elem.className + " " ).replace( rclass, " " ) :4139""4140);41414142if ( cur ) {4143j = 0;4144while ( (clazz = classes[j++]) ) {4145// Remove *all* instances4146while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {4147cur = cur.replace( " " + clazz + " ", " " );4148}4149}4150elem.className = value ? jQuery.trim( cur ) : "";4151}4152}4153}41544155return this;4156},41574158toggleClass: function( value, stateVal ) {4159var type = typeof value;41604161if ( typeof stateVal === "boolean" && type === "string" ) {4162return stateVal ? this.addClass( value ) : this.removeClass( value );4163}41644165if ( jQuery.isFunction( value ) ) {4166return this.each(function( i ) {4167jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );4168});4169}41704171return this.each(function() {4172if ( type === "string" ) {4173// toggle individual class names4174var className,4175i = 0,4176self = jQuery( this ),4177classNames = value.match( core_rnotwhite ) || [];41784179while ( (className = classNames[ i++ ]) ) {4180// check each className given, space separated list4181if ( self.hasClass( className ) ) {4182self.removeClass( className );4183} else {4184self.addClass( className );4185}4186}41874188// Toggle whole class name4189} else if ( type === core_strundefined || type === "boolean" ) {4190if ( this.className ) {4191// store className if set4192jQuery._data( this, "__className__", this.className );4193}41944195// If the element has a class name or if we're passed "false",4196// then remove the whole classname (if there was one, the above saved it).4197// Otherwise bring back whatever was previously saved (if anything),4198// falling back to the empty string if nothing was stored.4199this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";4200}4201});4202},42034204hasClass: function( selector ) {4205var className = " " + selector + " ",4206i = 0,4207l = this.length;4208for ( ; i < l; i++ ) {4209if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {4210return true;4211}4212}42134214return false;4215},42164217val: function( value ) {4218var ret, hooks, isFunction,4219elem = this[0];42204221if ( !arguments.length ) {4222if ( elem ) {4223hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];42244225if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {4226return ret;4227}42284229ret = elem.value;42304231return typeof ret === "string" ?4232// handle most common string cases4233ret.replace(rreturn, "") :4234// handle cases where value is null/undef or number4235ret == null ? "" : ret;4236}42374238return;4239}42404241isFunction = jQuery.isFunction( value );42424243return this.each(function( i ) {4244var val;42454246if ( this.nodeType !== 1 ) {4247return;4248}42494250if ( isFunction ) {4251val = value.call( this, i, jQuery( this ).val() );4252} else {4253val = value;4254}42554256// Treat null/undefined as ""; convert numbers to string4257if ( val == null ) {4258val = "";4259} else if ( typeof val === "number" ) {4260val += "";4261} else if ( jQuery.isArray( val ) ) {4262val = jQuery.map(val, function ( value ) {4263return value == null ? "" : value + "";4264});4265}42664267hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];42684269// If set returns undefined, fall back to normal setting4270if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {4271this.value = val;4272}4273});4274}4275});42764277jQuery.extend({4278valHooks: {4279option: {4280get: function( elem ) {4281// Use proper attribute retrieval(#6932, #12072)4282var val = jQuery.find.attr( elem, "value" );4283return val != null ?4284val :4285elem.text;4286}4287},4288select: {4289get: function( elem ) {4290var value, option,4291options = elem.options,4292index = elem.selectedIndex,4293one = elem.type === "select-one" || index < 0,4294values = one ? null : [],4295max = one ? index + 1 : options.length,4296i = index < 0 ?4297max :4298one ? index : 0;42994300// Loop through all the selected options4301for ( ; i < max; i++ ) {4302option = options[ i ];43034304// oldIE doesn't update selected after form reset (#2551)4305if ( ( option.selected || i === index ) &&4306// Don't return options that are disabled or in a disabled optgroup4307( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&4308( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {43094310// Get the specific value for the option4311value = jQuery( option ).val();43124313// We don't need an array for one selects4314if ( one ) {4315return value;4316}43174318// Multi-Selects return an array4319values.push( value );4320}4321}43224323return values;4324},43254326set: function( elem, value ) {4327var optionSet, option,4328options = elem.options,4329values = jQuery.makeArray( value ),4330i = options.length;43314332while ( i-- ) {4333option = options[ i ];4334if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {4335optionSet = true;4336}4337}43384339// force browsers to behave consistently when non-matching value is set4340if ( !optionSet ) {4341elem.selectedIndex = -1;4342}4343return values;4344}4345}4346},43474348attr: function( elem, name, value ) {4349var hooks, ret,4350nType = elem.nodeType;43514352// don't get/set attributes on text, comment and attribute nodes4353if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {4354return;4355}43564357// Fallback to prop when attributes are not supported4358if ( typeof elem.getAttribute === core_strundefined ) {4359return jQuery.prop( elem, name, value );4360}43614362// All attributes are lowercase4363// Grab necessary hook if one is defined4364if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {4365name = name.toLowerCase();4366hooks = jQuery.attrHooks[ name ] ||4367( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );4368}43694370if ( value !== undefined ) {43714372if ( value === null ) {4373jQuery.removeAttr( elem, name );43744375} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {4376return ret;43774378} else {4379elem.setAttribute( name, value + "" );4380return value;4381}43824383} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {4384return ret;43854386} else {4387ret = jQuery.find.attr( elem, name );43884389// Non-existent attributes return null, we normalize to undefined4390return ret == null ?4391undefined :4392ret;4393}4394},43954396removeAttr: function( elem, value ) {4397var name, propName,4398i = 0,4399attrNames = value && value.match( core_rnotwhite );44004401if ( attrNames && elem.nodeType === 1 ) {4402while ( (name = attrNames[i++]) ) {4403propName = jQuery.propFix[ name ] || name;44044405// Boolean attributes get special treatment (#10870)4406if ( jQuery.expr.match.bool.test( name ) ) {4407// Set corresponding property to false4408if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {4409elem[ propName ] = false;4410// Support: IE<94411// Also clear defaultChecked/defaultSelected (if appropriate)4412} else {4413elem[ jQuery.camelCase( "default-" + name ) ] =4414elem[ propName ] = false;4415}44164417// See #9699 for explanation of this approach (setting first, then removal)4418} else {4419jQuery.attr( elem, name, "" );4420}44214422elem.removeAttribute( getSetAttribute ? name : propName );4423}4424}4425},44264427attrHooks: {4428type: {4429set: function( elem, value ) {4430if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {4431// Setting the type on a radio button after the value resets the value in IE6-94432// Reset value to default in case type is set after value during creation4433var val = elem.value;4434elem.setAttribute( "type", value );4435if ( val ) {4436elem.value = val;4437}4438return value;4439}4440}4441}4442},44434444propFix: {4445"for": "htmlFor",4446"class": "className"4447},44484449prop: function( elem, name, value ) {4450var ret, hooks, notxml,4451nType = elem.nodeType;44524453// don't get/set properties on text, comment and attribute nodes4454if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {4455return;4456}44574458notxml = nType !== 1 || !jQuery.isXMLDoc( elem );44594460if ( notxml ) {4461// Fix name and attach hooks4462name = jQuery.propFix[ name ] || name;4463hooks = jQuery.propHooks[ name ];4464}44654466if ( value !== undefined ) {4467return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?4468ret :4469( elem[ name ] = value );44704471} else {4472return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?4473ret :4474elem[ name ];4475}4476},44774478propHooks: {4479tabIndex: {4480get: function( elem ) {4481// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set4482// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/4483// Use proper attribute retrieval(#12072)4484var tabindex = jQuery.find.attr( elem, "tabindex" );44854486return tabindex ?4487parseInt( tabindex, 10 ) :4488rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?44890 :4490-1;4491}4492}4493}4494});44954496// Hooks for boolean attributes4497boolHook = {4498set: function( elem, value, name ) {4499if ( value === false ) {4500// Remove boolean attributes when set to false4501jQuery.removeAttr( elem, name );4502} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {4503// IE<8 needs the *property* name4504elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );45054506// Use defaultChecked and defaultSelected for oldIE4507} else {4508elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;4509}45104511return name;4512}4513};4514jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {4515var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;45164517jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?4518function( elem, name, isXML ) {4519var fn = jQuery.expr.attrHandle[ name ],4520ret = isXML ?4521undefined :4522/* jshint eqeqeq: false */4523(jQuery.expr.attrHandle[ name ] = undefined) !=4524getter( elem, name, isXML ) ?45254526name.toLowerCase() :4527null;4528jQuery.expr.attrHandle[ name ] = fn;4529return ret;4530} :4531function( elem, name, isXML ) {4532return isXML ?4533undefined :4534elem[ jQuery.camelCase( "default-" + name ) ] ?4535name.toLowerCase() :4536null;4537};4538});45394540// fix oldIE attroperties4541if ( !getSetInput || !getSetAttribute ) {4542jQuery.attrHooks.value = {4543set: function( elem, value, name ) {4544if ( jQuery.nodeName( elem, "input" ) ) {4545// Does not return so that setAttribute is also used4546elem.defaultValue = value;4547} else {4548// Use nodeHook if defined (#1954); otherwise setAttribute is fine4549return nodeHook && nodeHook.set( elem, value, name );4550}4551}4552};4553}45544555// IE6/7 do not support getting/setting some attributes with get/setAttribute4556if ( !getSetAttribute ) {45574558// Use this for any attribute in IE6/74559// This fixes almost every IE6/7 issue4560nodeHook = {4561set: function( elem, value, name ) {4562// Set the existing or create a new attribute node4563var ret = elem.getAttributeNode( name );4564if ( !ret ) {4565elem.setAttributeNode(4566(ret = elem.ownerDocument.createAttribute( name ))4567);4568}45694570ret.value = value += "";45714572// Break association with cloned elements by also using setAttribute (#9646)4573return name === "value" || value === elem.getAttribute( name ) ?4574value :4575undefined;4576}4577};4578jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =4579// Some attributes are constructed with empty-string values when not defined4580function( elem, name, isXML ) {4581var ret;4582return isXML ?4583undefined :4584(ret = elem.getAttributeNode( name )) && ret.value !== "" ?4585ret.value :4586null;4587};4588jQuery.valHooks.button = {4589get: function( elem, name ) {4590var ret = elem.getAttributeNode( name );4591return ret && ret.specified ?4592ret.value :4593undefined;4594},4595set: nodeHook.set4596};45974598// Set contenteditable to false on removals(#10429)4599// Setting to empty string throws an error as an invalid value4600jQuery.attrHooks.contenteditable = {4601set: function( elem, value, name ) {4602nodeHook.set( elem, value === "" ? false : value, name );4603}4604};46054606// Set width and height to auto instead of 0 on empty string( Bug #8150 )4607// This is for removals4608jQuery.each([ "width", "height" ], function( i, name ) {4609jQuery.attrHooks[ name ] = {4610set: function( elem, value ) {4611if ( value === "" ) {4612elem.setAttribute( name, "auto" );4613return value;4614}4615}4616};4617});4618}461946204621// Some attributes require a special call on IE4622// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx4623if ( !jQuery.support.hrefNormalized ) {4624// href/src property should get the full normalized URL (#10299/#12915)4625jQuery.each([ "href", "src" ], function( i, name ) {4626jQuery.propHooks[ name ] = {4627get: function( elem ) {4628return elem.getAttribute( name, 4 );4629}4630};4631});4632}46334634if ( !jQuery.support.style ) {4635jQuery.attrHooks.style = {4636get: function( elem ) {4637// Return undefined in the case of empty string4638// Note: IE uppercases css property names, but if we were to .toLowerCase()4639// .cssText, that would destroy case senstitivity in URL's, like in "background"4640return elem.style.cssText || undefined;4641},4642set: function( elem, value ) {4643return ( elem.style.cssText = value + "" );4644}4645};4646}46474648// Safari mis-reports the default selected property of an option4649// Accessing the parent's selectedIndex property fixes it4650if ( !jQuery.support.optSelected ) {4651jQuery.propHooks.selected = {4652get: function( elem ) {4653var parent = elem.parentNode;46544655if ( parent ) {4656parent.selectedIndex;46574658// Make sure that it also works with optgroups, see #57014659if ( parent.parentNode ) {4660parent.parentNode.selectedIndex;4661}4662}4663return null;4664}4665};4666}46674668jQuery.each([4669"tabIndex",4670"readOnly",4671"maxLength",4672"cellSpacing",4673"cellPadding",4674"rowSpan",4675"colSpan",4676"useMap",4677"frameBorder",4678"contentEditable"4679], function() {4680jQuery.propFix[ this.toLowerCase() ] = this;4681});46824683// IE6/7 call enctype encoding4684if ( !jQuery.support.enctype ) {4685jQuery.propFix.enctype = "encoding";4686}46874688// Radios and checkboxes getter/setter4689jQuery.each([ "radio", "checkbox" ], function() {4690jQuery.valHooks[ this ] = {4691set: function( elem, value ) {4692if ( jQuery.isArray( value ) ) {4693return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );4694}4695}4696};4697if ( !jQuery.support.checkOn ) {4698jQuery.valHooks[ this ].get = function( elem ) {4699// Support: Webkit4700// "" is returned instead of "on" if a value isn't specified4701return elem.getAttribute("value") === null ? "on" : elem.value;4702};4703}4704});4705var rformElems = /^(?:input|select|textarea)$/i,4706rkeyEvent = /^key/,4707rmouseEvent = /^(?:mouse|contextmenu)|click/,4708rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,4709rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;47104711function returnTrue() {4712return true;4713}47144715function returnFalse() {4716return false;4717}47184719function safeActiveElement() {4720try {4721return document.activeElement;4722} catch ( err ) { }4723}47244725/*4726* Helper functions for managing events -- not part of the public interface.4727* Props to Dean Edwards' addEvent library for many of the ideas.4728*/4729jQuery.event = {47304731global: {},47324733add: function( elem, types, handler, data, selector ) {4734var tmp, events, t, handleObjIn,4735special, eventHandle, handleObj,4736handlers, type, namespaces, origType,4737elemData = jQuery._data( elem );47384739// Don't attach events to noData or text/comment nodes (but allow plain objects)4740if ( !elemData ) {4741return;4742}47434744// Caller can pass in an object of custom data in lieu of the handler4745if ( handler.handler ) {4746handleObjIn = handler;4747handler = handleObjIn.handler;4748selector = handleObjIn.selector;4749}47504751// Make sure that the handler has a unique ID, used to find/remove it later4752if ( !handler.guid ) {4753handler.guid = jQuery.guid++;4754}47554756// Init the element's event structure and main handler, if this is the first4757if ( !(events = elemData.events) ) {4758events = elemData.events = {};4759}4760if ( !(eventHandle = elemData.handle) ) {4761eventHandle = elemData.handle = function( e ) {4762// Discard the second event of a jQuery.event.trigger() and4763// when an event is called after a page has unloaded4764return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?4765jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :4766undefined;4767};4768// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events4769eventHandle.elem = elem;4770}47714772// Handle multiple events separated by a space4773types = ( types || "" ).match( core_rnotwhite ) || [""];4774t = types.length;4775while ( t-- ) {4776tmp = rtypenamespace.exec( types[t] ) || [];4777type = origType = tmp[1];4778namespaces = ( tmp[2] || "" ).split( "." ).sort();47794780// There *must* be a type, no attaching namespace-only handlers4781if ( !type ) {4782continue;4783}47844785// If event changes its type, use the special event handlers for the changed type4786special = jQuery.event.special[ type ] || {};47874788// If selector defined, determine special event api type, otherwise given type4789type = ( selector ? special.delegateType : special.bindType ) || type;47904791// Update special based on newly reset type4792special = jQuery.event.special[ type ] || {};47934794// handleObj is passed to all event handlers4795handleObj = jQuery.extend({4796type: type,4797origType: origType,4798data: data,4799handler: handler,4800guid: handler.guid,4801selector: selector,4802needsContext: selector && jQuery.expr.match.needsContext.test( selector ),4803namespace: namespaces.join(".")4804}, handleObjIn );48054806// Init the event handler queue if we're the first4807if ( !(handlers = events[ type ]) ) {4808handlers = events[ type ] = [];4809handlers.delegateCount = 0;48104811// Only use addEventListener/attachEvent if the special events handler returns false4812if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {4813// Bind the global event handler to the element4814if ( elem.addEventListener ) {4815elem.addEventListener( type, eventHandle, false );48164817} else if ( elem.attachEvent ) {4818elem.attachEvent( "on" + type, eventHandle );4819}4820}4821}48224823if ( special.add ) {4824special.add.call( elem, handleObj );48254826if ( !handleObj.handler.guid ) {4827handleObj.handler.guid = handler.guid;4828}4829}48304831// Add to the element's handler list, delegates in front4832if ( selector ) {4833handlers.splice( handlers.delegateCount++, 0, handleObj );4834} else {4835handlers.push( handleObj );4836}48374838// Keep track of which events have ever been used, for event optimization4839jQuery.event.global[ type ] = true;4840}48414842// Nullify elem to prevent memory leaks in IE4843elem = null;4844},48454846// Detach an event or set of events from an element4847remove: function( elem, types, handler, selector, mappedTypes ) {4848var j, handleObj, tmp,4849origCount, t, events,4850special, handlers, type,4851namespaces, origType,4852elemData = jQuery.hasData( elem ) && jQuery._data( elem );48534854if ( !elemData || !(events = elemData.events) ) {4855return;4856}48574858// Once for each type.namespace in types; type may be omitted4859types = ( types || "" ).match( core_rnotwhite ) || [""];4860t = types.length;4861while ( t-- ) {4862tmp = rtypenamespace.exec( types[t] ) || [];4863type = origType = tmp[1];4864namespaces = ( tmp[2] || "" ).split( "." ).sort();48654866// Unbind all events (on this namespace, if provided) for the element4867if ( !type ) {4868for ( type in events ) {4869jQuery.event.remove( elem, type + types[ t ], handler, selector, true );4870}4871continue;4872}48734874special = jQuery.event.special[ type ] || {};4875type = ( selector ? special.delegateType : special.bindType ) || type;4876handlers = events[ type ] || [];4877tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );48784879// Remove matching events4880origCount = j = handlers.length;4881while ( j-- ) {4882handleObj = handlers[ j ];48834884if ( ( mappedTypes || origType === handleObj.origType ) &&4885( !handler || handler.guid === handleObj.guid ) &&4886( !tmp || tmp.test( handleObj.namespace ) ) &&4887( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {4888handlers.splice( j, 1 );48894890if ( handleObj.selector ) {4891handlers.delegateCount--;4892}4893if ( special.remove ) {4894special.remove.call( elem, handleObj );4895}4896}4897}48984899// Remove generic event handler if we removed something and no more handlers exist4900// (avoids potential for endless recursion during removal of special event handlers)4901if ( origCount && !handlers.length ) {4902if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {4903jQuery.removeEvent( elem, type, elemData.handle );4904}49054906delete events[ type ];4907}4908}49094910// Remove the expando if it's no longer used4911if ( jQuery.isEmptyObject( events ) ) {4912delete elemData.handle;49134914// removeData also checks for emptiness and clears the expando if empty4915// so use it instead of delete4916jQuery._removeData( elem, "events" );4917}4918},49194920trigger: function( event, data, elem, onlyHandlers ) {4921var handle, ontype, cur,4922bubbleType, special, tmp, i,4923eventPath = [ elem || document ],4924type = core_hasOwn.call( event, "type" ) ? event.type : event,4925namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];49264927cur = tmp = elem = elem || document;49284929// Don't do events on text and comment nodes4930if ( elem.nodeType === 3 || elem.nodeType === 8 ) {4931return;4932}49334934// focus/blur morphs to focusin/out; ensure we're not firing them right now4935if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {4936return;4937}49384939if ( type.indexOf(".") >= 0 ) {4940// Namespaced trigger; create a regexp to match event type in handle()4941namespaces = type.split(".");4942type = namespaces.shift();4943namespaces.sort();4944}4945ontype = type.indexOf(":") < 0 && "on" + type;49464947// Caller can pass in a jQuery.Event object, Object, or just an event type string4948event = event[ jQuery.expando ] ?4949event :4950new jQuery.Event( type, typeof event === "object" && event );49514952// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)4953event.isTrigger = onlyHandlers ? 2 : 3;4954event.namespace = namespaces.join(".");4955event.namespace_re = event.namespace ?4956new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :4957null;49584959// Clean up the event in case it is being reused4960event.result = undefined;4961if ( !event.target ) {4962event.target = elem;4963}49644965// Clone any incoming data and prepend the event, creating the handler arg list4966data = data == null ?4967[ event ] :4968jQuery.makeArray( data, [ event ] );49694970// Allow special events to draw outside the lines4971special = jQuery.event.special[ type ] || {};4972if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {4973return;4974}49754976// Determine event propagation path in advance, per W3C events spec (#9951)4977// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)4978if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {49794980bubbleType = special.delegateType || type;4981if ( !rfocusMorph.test( bubbleType + type ) ) {4982cur = cur.parentNode;4983}4984for ( ; cur; cur = cur.parentNode ) {4985eventPath.push( cur );4986tmp = cur;4987}49884989// Only add window if we got to document (e.g., not plain obj or detached DOM)4990if ( tmp === (elem.ownerDocument || document) ) {4991eventPath.push( tmp.defaultView || tmp.parentWindow || window );4992}4993}49944995// Fire handlers on the event path4996i = 0;4997while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {49984999event.type = i > 1 ?5000bubbleType :5001special.bindType || type;50025003// jQuery handler5004handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );5005if ( handle ) {5006handle.apply( cur, data );5007}50085009// Native handler5010handle = ontype && cur[ ontype ];5011if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {5012event.preventDefault();5013}5014}5015event.type = type;50165017// If nobody prevented the default action, do it now5018if ( !onlyHandlers && !event.isDefaultPrevented() ) {50195020if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&5021jQuery.acceptData( elem ) ) {50225023// Call a native DOM method on the target with the same name name as the event.5024// Can't use an .isFunction() check here because IE6/7 fails that test.5025// Don't do default actions on window, that's where global variables be (#6170)5026if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {50275028// Don't re-trigger an onFOO event when we call its FOO() method5029tmp = elem[ ontype ];50305031if ( tmp ) {5032elem[ ontype ] = null;5033}50345035// Prevent re-triggering of the same event, since we already bubbled it above5036jQuery.event.triggered = type;5037try {5038elem[ type ]();5039} catch ( e ) {5040// IE<9 dies on focus/blur to hidden element (#1486,#12518)5041// only reproducible on winXP IE8 native, not IE9 in IE8 mode5042}5043jQuery.event.triggered = undefined;50445045if ( tmp ) {5046elem[ ontype ] = tmp;5047}5048}5049}5050}50515052return event.result;5053},50545055dispatch: function( event ) {50565057// Make a writable jQuery.Event from the native event object5058event = jQuery.event.fix( event );50595060var i, ret, handleObj, matched, j,5061handlerQueue = [],5062args = core_slice.call( arguments ),5063handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],5064special = jQuery.event.special[ event.type ] || {};50655066// Use the fix-ed jQuery.Event rather than the (read-only) native event5067args[0] = event;5068event.delegateTarget = this;50695070// Call the preDispatch hook for the mapped type, and let it bail if desired5071if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {5072return;5073}50745075// Determine handlers5076handlerQueue = jQuery.event.handlers.call( this, event, handlers );50775078// Run delegates first; they may want to stop propagation beneath us5079i = 0;5080while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {5081event.currentTarget = matched.elem;50825083j = 0;5084while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {50855086// Triggered event must either 1) have no namespace, or5087// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).5088if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {50895090event.handleObj = handleObj;5091event.data = handleObj.data;50925093ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )5094.apply( matched.elem, args );50955096if ( ret !== undefined ) {5097if ( (event.result = ret) === false ) {5098event.preventDefault();5099event.stopPropagation();5100}5101}5102}5103}5104}51055106// Call the postDispatch hook for the mapped type5107if ( special.postDispatch ) {5108special.postDispatch.call( this, event );5109}51105111return event.result;5112},51135114handlers: function( event, handlers ) {5115var sel, handleObj, matches, i,5116handlerQueue = [],5117delegateCount = handlers.delegateCount,5118cur = event.target;51195120// Find delegate handlers5121// Black-hole SVG <use> instance trees (#13180)5122// Avoid non-left-click bubbling in Firefox (#3861)5123if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {51245125/* jshint eqeqeq: false */5126for ( ; cur != this; cur = cur.parentNode || this ) {5127/* jshint eqeqeq: true */51285129// Don't check non-elements (#13208)5130// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)5131if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {5132matches = [];5133for ( i = 0; i < delegateCount; i++ ) {5134handleObj = handlers[ i ];51355136// Don't conflict with Object.prototype properties (#13203)5137sel = handleObj.selector + " ";51385139if ( matches[ sel ] === undefined ) {5140matches[ sel ] = handleObj.needsContext ?5141jQuery( sel, this ).index( cur ) >= 0 :5142jQuery.find( sel, this, null, [ cur ] ).length;5143}5144if ( matches[ sel ] ) {5145matches.push( handleObj );5146}5147}5148if ( matches.length ) {5149handlerQueue.push({ elem: cur, handlers: matches });5150}5151}5152}5153}51545155// Add the remaining (directly-bound) handlers5156if ( delegateCount < handlers.length ) {5157handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });5158}51595160return handlerQueue;5161},51625163fix: function( event ) {5164if ( event[ jQuery.expando ] ) {5165return event;5166}51675168// Create a writable copy of the event object and normalize some properties5169var i, prop, copy,5170type = event.type,5171originalEvent = event,5172fixHook = this.fixHooks[ type ];51735174if ( !fixHook ) {5175this.fixHooks[ type ] = fixHook =5176rmouseEvent.test( type ) ? this.mouseHooks :5177rkeyEvent.test( type ) ? this.keyHooks :5178{};5179}5180copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;51815182event = new jQuery.Event( originalEvent );51835184i = copy.length;5185while ( i-- ) {5186prop = copy[ i ];5187event[ prop ] = originalEvent[ prop ];5188}51895190// Support: IE<95191// Fix target property (#1925)5192if ( !event.target ) {5193event.target = originalEvent.srcElement || document;5194}51955196// Support: Chrome 23+, Safari?5197// Target should not be a text node (#504, #13143)5198if ( event.target.nodeType === 3 ) {5199event.target = event.target.parentNode;5200}52015202// Support: IE<95203// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)5204event.metaKey = !!event.metaKey;52055206return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;5207},52085209// Includes some event props shared by KeyEvent and MouseEvent5210props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),52115212fixHooks: {},52135214keyHooks: {5215props: "char charCode key keyCode".split(" "),5216filter: function( event, original ) {52175218// Add which for key events5219if ( event.which == null ) {5220event.which = original.charCode != null ? original.charCode : original.keyCode;5221}52225223return event;5224}5225},52265227mouseHooks: {5228props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),5229filter: function( event, original ) {5230var body, eventDoc, doc,5231button = original.button,5232fromElement = original.fromElement;52335234// Calculate pageX/Y if missing and clientX/Y available5235if ( event.pageX == null && original.clientX != null ) {5236eventDoc = event.target.ownerDocument || document;5237doc = eventDoc.documentElement;5238body = eventDoc.body;52395240event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );5241event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );5242}52435244// Add relatedTarget, if necessary5245if ( !event.relatedTarget && fromElement ) {5246event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;5247}52485249// Add which for click: 1 === left; 2 === middle; 3 === right5250// Note: button is not normalized, so don't use it5251if ( !event.which && button !== undefined ) {5252event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );5253}52545255return event;5256}5257},52585259special: {5260load: {5261// Prevent triggered image.load events from bubbling to window.load5262noBubble: true5263},5264focus: {5265// Fire native event if possible so blur/focus sequence is correct5266trigger: function() {5267if ( this !== safeActiveElement() && this.focus ) {5268try {5269this.focus();5270return false;5271} catch ( e ) {5272// Support: IE<95273// If we error on focus to hidden element (#1486, #12518),5274// let .trigger() run the handlers5275}5276}5277},5278delegateType: "focusin"5279},5280blur: {5281trigger: function() {5282if ( this === safeActiveElement() && this.blur ) {5283this.blur();5284return false;5285}5286},5287delegateType: "focusout"5288},5289click: {5290// For checkbox, fire native event so checked state will be right5291trigger: function() {5292if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {5293this.click();5294return false;5295}5296},52975298// For cross-browser consistency, don't fire native .click() on links5299_default: function( event ) {5300return jQuery.nodeName( event.target, "a" );5301}5302},53035304beforeunload: {5305postDispatch: function( event ) {53065307// Even when returnValue equals to undefined Firefox will still show alert5308if ( event.result !== undefined ) {5309event.originalEvent.returnValue = event.result;5310}5311}5312}5313},53145315simulate: function( type, elem, event, bubble ) {5316// Piggyback on a donor event to simulate a different one.5317// Fake originalEvent to avoid donor's stopPropagation, but if the5318// simulated event prevents default then we do the same on the donor.5319var e = jQuery.extend(5320new jQuery.Event(),5321event,5322{5323type: type,5324isSimulated: true,5325originalEvent: {}5326}5327);5328if ( bubble ) {5329jQuery.event.trigger( e, null, elem );5330} else {5331jQuery.event.dispatch.call( elem, e );5332}5333if ( e.isDefaultPrevented() ) {5334event.preventDefault();5335}5336}5337};53385339jQuery.removeEvent = document.removeEventListener ?5340function( elem, type, handle ) {5341if ( elem.removeEventListener ) {5342elem.removeEventListener( type, handle, false );5343}5344} :5345function( elem, type, handle ) {5346var name = "on" + type;53475348if ( elem.detachEvent ) {53495350// #8545, #7054, preventing memory leaks for custom events in IE6-85351// detachEvent needed property on element, by name of that event, to properly expose it to GC5352if ( typeof elem[ name ] === core_strundefined ) {5353elem[ name ] = null;5354}53555356elem.detachEvent( name, handle );5357}5358};53595360jQuery.Event = function( src, props ) {5361// Allow instantiation without the 'new' keyword5362if ( !(this instanceof jQuery.Event) ) {5363return new jQuery.Event( src, props );5364}53655366// Event object5367if ( src && src.type ) {5368this.originalEvent = src;5369this.type = src.type;53705371// Events bubbling up the document may have been marked as prevented5372// by a handler lower down the tree; reflect the correct value.5373this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||5374src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;53755376// Event type5377} else {5378this.type = src;5379}53805381// Put explicitly provided properties onto the event object5382if ( props ) {5383jQuery.extend( this, props );5384}53855386// Create a timestamp if incoming event doesn't have one5387this.timeStamp = src && src.timeStamp || jQuery.now();53885389// Mark it as fixed5390this[ jQuery.expando ] = true;5391};53925393// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding5394// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html5395jQuery.Event.prototype = {5396isDefaultPrevented: returnFalse,5397isPropagationStopped: returnFalse,5398isImmediatePropagationStopped: returnFalse,53995400preventDefault: function() {5401var e = this.originalEvent;54025403this.isDefaultPrevented = returnTrue;5404if ( !e ) {5405return;5406}54075408// If preventDefault exists, run it on the original event5409if ( e.preventDefault ) {5410e.preventDefault();54115412// Support: IE5413// Otherwise set the returnValue property of the original event to false5414} else {5415e.returnValue = false;5416}5417},5418stopPropagation: function() {5419var e = this.originalEvent;54205421this.isPropagationStopped = returnTrue;5422if ( !e ) {5423return;5424}5425// If stopPropagation exists, run it on the original event5426if ( e.stopPropagation ) {5427e.stopPropagation();5428}54295430// Support: IE5431// Set the cancelBubble property of the original event to true5432e.cancelBubble = true;5433},5434stopImmediatePropagation: function() {5435this.isImmediatePropagationStopped = returnTrue;5436this.stopPropagation();5437}5438};54395440// Create mouseenter/leave events using mouseover/out and event-time checks5441jQuery.each({5442mouseenter: "mouseover",5443mouseleave: "mouseout"5444}, function( orig, fix ) {5445jQuery.event.special[ orig ] = {5446delegateType: fix,5447bindType: fix,54485449handle: function( event ) {5450var ret,5451target = this,5452related = event.relatedTarget,5453handleObj = event.handleObj;54545455// For mousenter/leave call the handler if related is outside the target.5456// NB: No relatedTarget if the mouse left/entered the browser window5457if ( !related || (related !== target && !jQuery.contains( target, related )) ) {5458event.type = handleObj.origType;5459ret = handleObj.handler.apply( this, arguments );5460event.type = fix;5461}5462return ret;5463}5464};5465});54665467// IE submit delegation5468if ( !jQuery.support.submitBubbles ) {54695470jQuery.event.special.submit = {5471setup: function() {5472// Only need this for delegated form submit events5473if ( jQuery.nodeName( this, "form" ) ) {5474return false;5475}54765477// Lazy-add a submit handler when a descendant form may potentially be submitted5478jQuery.event.add( this, "click._submit keypress._submit", function( e ) {5479// Node name check avoids a VML-related crash in IE (#9807)5480var elem = e.target,5481form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;5482if ( form && !jQuery._data( form, "submitBubbles" ) ) {5483jQuery.event.add( form, "submit._submit", function( event ) {5484event._submit_bubble = true;5485});5486jQuery._data( form, "submitBubbles", true );5487}5488});5489// return undefined since we don't need an event listener5490},54915492postDispatch: function( event ) {5493// If form was submitted by the user, bubble the event up the tree5494if ( event._submit_bubble ) {5495delete event._submit_bubble;5496if ( this.parentNode && !event.isTrigger ) {5497jQuery.event.simulate( "submit", this.parentNode, event, true );5498}5499}5500},55015502teardown: function() {5503// Only need this for delegated form submit events5504if ( jQuery.nodeName( this, "form" ) ) {5505return false;5506}55075508// Remove delegated handlers; cleanData eventually reaps submit handlers attached above5509jQuery.event.remove( this, "._submit" );5510}5511};5512}55135514// IE change delegation and checkbox/radio fix5515if ( !jQuery.support.changeBubbles ) {55165517jQuery.event.special.change = {55185519setup: function() {55205521if ( rformElems.test( this.nodeName ) ) {5522// IE doesn't fire change on a check/radio until blur; trigger it on click5523// after a propertychange. Eat the blur-change in special.change.handle.5524// This still fires onchange a second time for check/radio after blur.5525if ( this.type === "checkbox" || this.type === "radio" ) {5526jQuery.event.add( this, "propertychange._change", function( event ) {5527if ( event.originalEvent.propertyName === "checked" ) {5528this._just_changed = true;5529}5530});5531jQuery.event.add( this, "click._change", function( event ) {5532if ( this._just_changed && !event.isTrigger ) {5533this._just_changed = false;5534}5535// Allow triggered, simulated change events (#11500)5536jQuery.event.simulate( "change", this, event, true );5537});5538}5539return false;5540}5541// Delegated event; lazy-add a change handler on descendant inputs5542jQuery.event.add( this, "beforeactivate._change", function( e ) {5543var elem = e.target;55445545if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {5546jQuery.event.add( elem, "change._change", function( event ) {5547if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {5548jQuery.event.simulate( "change", this.parentNode, event, true );5549}5550});5551jQuery._data( elem, "changeBubbles", true );5552}5553});5554},55555556handle: function( event ) {5557var elem = event.target;55585559// Swallow native change events from checkbox/radio, we already triggered them above5560if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {5561return event.handleObj.handler.apply( this, arguments );5562}5563},55645565teardown: function() {5566jQuery.event.remove( this, "._change" );55675568return !rformElems.test( this.nodeName );5569}5570};5571}55725573// Create "bubbling" focus and blur events5574if ( !jQuery.support.focusinBubbles ) {5575jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {55765577// Attach a single capturing handler while someone wants focusin/focusout5578var attaches = 0,5579handler = function( event ) {5580jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );5581};55825583jQuery.event.special[ fix ] = {5584setup: function() {5585if ( attaches++ === 0 ) {5586document.addEventListener( orig, handler, true );5587}5588},5589teardown: function() {5590if ( --attaches === 0 ) {5591document.removeEventListener( orig, handler, true );5592}5593}5594};5595});5596}55975598jQuery.fn.extend({55995600on: function( types, selector, data, fn, /*INTERNAL*/ one ) {5601var type, origFn;56025603// Types can be a map of types/handlers5604if ( typeof types === "object" ) {5605// ( types-Object, selector, data )5606if ( typeof selector !== "string" ) {5607// ( types-Object, data )5608data = data || selector;5609selector = undefined;5610}5611for ( type in types ) {5612this.on( type, selector, data, types[ type ], one );5613}5614return this;5615}56165617if ( data == null && fn == null ) {5618// ( types, fn )5619fn = selector;5620data = selector = undefined;5621} else if ( fn == null ) {5622if ( typeof selector === "string" ) {5623// ( types, selector, fn )5624fn = data;5625data = undefined;5626} else {5627// ( types, data, fn )5628fn = data;5629data = selector;5630selector = undefined;5631}5632}5633if ( fn === false ) {5634fn = returnFalse;5635} else if ( !fn ) {5636return this;5637}56385639if ( one === 1 ) {5640origFn = fn;5641fn = function( event ) {5642// Can use an empty set, since event contains the info5643jQuery().off( event );5644return origFn.apply( this, arguments );5645};5646// Use same guid so caller can remove using origFn5647fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );5648}5649return this.each( function() {5650jQuery.event.add( this, types, fn, data, selector );5651});5652},5653one: function( types, selector, data, fn ) {5654return this.on( types, selector, data, fn, 1 );5655},5656off: function( types, selector, fn ) {5657var handleObj, type;5658if ( types && types.preventDefault && types.handleObj ) {5659// ( event ) dispatched jQuery.Event5660handleObj = types.handleObj;5661jQuery( types.delegateTarget ).off(5662handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,5663handleObj.selector,5664handleObj.handler5665);5666return this;5667}5668if ( typeof types === "object" ) {5669// ( types-object [, selector] )5670for ( type in types ) {5671this.off( type, selector, types[ type ] );5672}5673return this;5674}5675if ( selector === false || typeof selector === "function" ) {5676// ( types [, fn] )5677fn = selector;5678selector = undefined;5679}5680if ( fn === false ) {5681fn = returnFalse;5682}5683return this.each(function() {5684jQuery.event.remove( this, types, fn, selector );5685});5686},56875688trigger: function( type, data ) {5689return this.each(function() {5690jQuery.event.trigger( type, data, this );5691});5692},5693triggerHandler: function( type, data ) {5694var elem = this[0];5695if ( elem ) {5696return jQuery.event.trigger( type, data, elem, true );5697}5698}5699});5700var isSimple = /^.[^:#\[\.,]*$/,5701rparentsprev = /^(?:parents|prev(?:Until|All))/,5702rneedsContext = jQuery.expr.match.needsContext,5703// methods guaranteed to produce a unique set when starting from a unique set5704guaranteedUnique = {5705children: true,5706contents: true,5707next: true,5708prev: true5709};57105711jQuery.fn.extend({5712find: function( selector ) {5713var i,5714ret = [],5715self = this,5716len = self.length;57175718if ( typeof selector !== "string" ) {5719return this.pushStack( jQuery( selector ).filter(function() {5720for ( i = 0; i < len; i++ ) {5721if ( jQuery.contains( self[ i ], this ) ) {5722return true;5723}5724}5725}) );5726}57275728for ( i = 0; i < len; i++ ) {5729jQuery.find( selector, self[ i ], ret );5730}57315732// Needed because $( selector, context ) becomes $( context ).find( selector )5733ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );5734ret.selector = this.selector ? this.selector + " " + selector : selector;5735return ret;5736},57375738has: function( target ) {5739var i,5740targets = jQuery( target, this ),5741len = targets.length;57425743return this.filter(function() {5744for ( i = 0; i < len; i++ ) {5745if ( jQuery.contains( this, targets[i] ) ) {5746return true;5747}5748}5749});5750},57515752not: function( selector ) {5753return this.pushStack( winnow(this, selector || [], true) );5754},57555756filter: function( selector ) {5757return this.pushStack( winnow(this, selector || [], false) );5758},57595760is: function( selector ) {5761return !!winnow(5762this,57635764// If this is a positional/relative selector, check membership in the returned set5765// so $("p:first").is("p:last") won't return true for a doc with two "p".5766typeof selector === "string" && rneedsContext.test( selector ) ?5767jQuery( selector ) :5768selector || [],5769false5770).length;5771},57725773closest: function( selectors, context ) {5774var cur,5775i = 0,5776l = this.length,5777ret = [],5778pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?5779jQuery( selectors, context || this.context ) :57800;57815782for ( ; i < l; i++ ) {5783for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {5784// Always skip document fragments5785if ( cur.nodeType < 11 && (pos ?5786pos.index(cur) > -1 :57875788// Don't pass non-elements to Sizzle5789cur.nodeType === 1 &&5790jQuery.find.matchesSelector(cur, selectors)) ) {57915792cur = ret.push( cur );5793break;5794}5795}5796}57975798return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );5799},58005801// Determine the position of an element within5802// the matched set of elements5803index: function( elem ) {58045805// No argument, return index in parent5806if ( !elem ) {5807return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;5808}58095810// index in selector5811if ( typeof elem === "string" ) {5812return jQuery.inArray( this[0], jQuery( elem ) );5813}58145815// Locate the position of the desired element5816return jQuery.inArray(5817// If it receives a jQuery object, the first element is used5818elem.jquery ? elem[0] : elem, this );5819},58205821add: function( selector, context ) {5822var set = typeof selector === "string" ?5823jQuery( selector, context ) :5824jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),5825all = jQuery.merge( this.get(), set );58265827return this.pushStack( jQuery.unique(all) );5828},58295830addBack: function( selector ) {5831return this.add( selector == null ?5832this.prevObject : this.prevObject.filter(selector)5833);5834}5835});58365837function sibling( cur, dir ) {5838do {5839cur = cur[ dir ];5840} while ( cur && cur.nodeType !== 1 );58415842return cur;5843}58445845jQuery.each({5846parent: function( elem ) {5847var parent = elem.parentNode;5848return parent && parent.nodeType !== 11 ? parent : null;5849},5850parents: function( elem ) {5851return jQuery.dir( elem, "parentNode" );5852},5853parentsUntil: function( elem, i, until ) {5854return jQuery.dir( elem, "parentNode", until );5855},5856next: function( elem ) {5857return sibling( elem, "nextSibling" );5858},5859prev: function( elem ) {5860return sibling( elem, "previousSibling" );5861},5862nextAll: function( elem ) {5863return jQuery.dir( elem, "nextSibling" );5864},5865prevAll: function( elem ) {5866return jQuery.dir( elem, "previousSibling" );5867},5868nextUntil: function( elem, i, until ) {5869return jQuery.dir( elem, "nextSibling", until );5870},5871prevUntil: function( elem, i, until ) {5872return jQuery.dir( elem, "previousSibling", until );5873},5874siblings: function( elem ) {5875return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );5876},5877children: function( elem ) {5878return jQuery.sibling( elem.firstChild );5879},5880contents: function( elem ) {5881return jQuery.nodeName( elem, "iframe" ) ?5882elem.contentDocument || elem.contentWindow.document :5883jQuery.merge( [], elem.childNodes );5884}5885}, function( name, fn ) {5886jQuery.fn[ name ] = function( until, selector ) {5887var ret = jQuery.map( this, fn, until );58885889if ( name.slice( -5 ) !== "Until" ) {5890selector = until;5891}58925893if ( selector && typeof selector === "string" ) {5894ret = jQuery.filter( selector, ret );5895}58965897if ( this.length > 1 ) {5898// Remove duplicates5899if ( !guaranteedUnique[ name ] ) {5900ret = jQuery.unique( ret );5901}59025903// Reverse order for parents* and prev-derivatives5904if ( rparentsprev.test( name ) ) {5905ret = ret.reverse();5906}5907}59085909return this.pushStack( ret );5910};5911});59125913jQuery.extend({5914filter: function( expr, elems, not ) {5915var elem = elems[ 0 ];59165917if ( not ) {5918expr = ":not(" + expr + ")";5919}59205921return elems.length === 1 && elem.nodeType === 1 ?5922jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :5923jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {5924return elem.nodeType === 1;5925}));5926},59275928dir: function( elem, dir, until ) {5929var matched = [],5930cur = elem[ dir ];59315932while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {5933if ( cur.nodeType === 1 ) {5934matched.push( cur );5935}5936cur = cur[dir];5937}5938return matched;5939},59405941sibling: function( n, elem ) {5942var r = [];59435944for ( ; n; n = n.nextSibling ) {5945if ( n.nodeType === 1 && n !== elem ) {5946r.push( n );5947}5948}59495950return r;5951}5952});59535954// Implement the identical functionality for filter and not5955function winnow( elements, qualifier, not ) {5956if ( jQuery.isFunction( qualifier ) ) {5957return jQuery.grep( elements, function( elem, i ) {5958/* jshint -W018 */5959return !!qualifier.call( elem, i, elem ) !== not;5960});59615962}59635964if ( qualifier.nodeType ) {5965return jQuery.grep( elements, function( elem ) {5966return ( elem === qualifier ) !== not;5967});59685969}59705971if ( typeof qualifier === "string" ) {5972if ( isSimple.test( qualifier ) ) {5973return jQuery.filter( qualifier, elements, not );5974}59755976qualifier = jQuery.filter( qualifier, elements );5977}59785979return jQuery.grep( elements, function( elem ) {5980return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;5981});5982}5983function createSafeFragment( document ) {5984var list = nodeNames.split( "|" ),5985safeFrag = document.createDocumentFragment();59865987if ( safeFrag.createElement ) {5988while ( list.length ) {5989safeFrag.createElement(5990list.pop()5991);5992}5993}5994return safeFrag;5995}59965997var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +5998"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",5999rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,6000rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),6001rleadingWhitespace = /^\s+/,6002rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,6003rtagName = /<([\w:]+)/,6004rtbody = /<tbody/i,6005rhtml = /<|&#?\w+;/,6006rnoInnerhtml = /<(?:script|style|link)/i,6007manipulation_rcheckableType = /^(?:checkbox|radio)$/i,6008// checked="checked" or checked6009rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,6010rscriptType = /^$|\/(?:java|ecma)script/i,6011rscriptTypeMasked = /^true\/(.*)/,6012rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,60136014// We have to close these tags to support XHTML (#13200)6015wrapMap = {6016option: [ 1, "<select multiple='multiple'>", "</select>" ],6017legend: [ 1, "<fieldset>", "</fieldset>" ],6018area: [ 1, "<map>", "</map>" ],6019param: [ 1, "<object>", "</object>" ],6020thead: [ 1, "<table>", "</table>" ],6021tr: [ 2, "<table><tbody>", "</tbody></table>" ],6022col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],6023td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],60246025// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,6026// unless wrapped in a div with non-breaking characters in front of it.6027_default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]6028},6029safeFragment = createSafeFragment( document ),6030fragmentDiv = safeFragment.appendChild( document.createElement("div") );60316032wrapMap.optgroup = wrapMap.option;6033wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;6034wrapMap.th = wrapMap.td;60356036jQuery.fn.extend({6037text: function( value ) {6038return jQuery.access( this, function( value ) {6039return value === undefined ?6040jQuery.text( this ) :6041this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );6042}, null, value, arguments.length );6043},60446045append: function() {6046return this.domManip( arguments, function( elem ) {6047if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {6048var target = manipulationTarget( this, elem );6049target.appendChild( elem );6050}6051});6052},60536054prepend: function() {6055return this.domManip( arguments, function( elem ) {6056if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {6057var target = manipulationTarget( this, elem );6058target.insertBefore( elem, target.firstChild );6059}6060});6061},60626063before: function() {6064return this.domManip( arguments, function( elem ) {6065if ( this.parentNode ) {6066this.parentNode.insertBefore( elem, this );6067}6068});6069},60706071after: function() {6072return this.domManip( arguments, function( elem ) {6073if ( this.parentNode ) {6074this.parentNode.insertBefore( elem, this.nextSibling );6075}6076});6077},60786079// keepData is for internal use only--do not document6080remove: function( selector, keepData ) {6081var elem,6082elems = selector ? jQuery.filter( selector, this ) : this,6083i = 0;60846085for ( ; (elem = elems[i]) != null; i++ ) {60866087if ( !keepData && elem.nodeType === 1 ) {6088jQuery.cleanData( getAll( elem ) );6089}60906091if ( elem.parentNode ) {6092if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {6093setGlobalEval( getAll( elem, "script" ) );6094}6095elem.parentNode.removeChild( elem );6096}6097}60986099return this;6100},61016102empty: function() {6103var elem,6104i = 0;61056106for ( ; (elem = this[i]) != null; i++ ) {6107// Remove element nodes and prevent memory leaks6108if ( elem.nodeType === 1 ) {6109jQuery.cleanData( getAll( elem, false ) );6110}61116112// Remove any remaining nodes6113while ( elem.firstChild ) {6114elem.removeChild( elem.firstChild );6115}61166117// If this is a select, ensure that it displays empty (#12336)6118// Support: IE<96119if ( elem.options && jQuery.nodeName( elem, "select" ) ) {6120elem.options.length = 0;6121}6122}61236124return this;6125},61266127clone: function( dataAndEvents, deepDataAndEvents ) {6128dataAndEvents = dataAndEvents == null ? false : dataAndEvents;6129deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;61306131return this.map( function () {6132return jQuery.clone( this, dataAndEvents, deepDataAndEvents );6133});6134},61356136html: function( value ) {6137return jQuery.access( this, function( value ) {6138var elem = this[0] || {},6139i = 0,6140l = this.length;61416142if ( value === undefined ) {6143return elem.nodeType === 1 ?6144elem.innerHTML.replace( rinlinejQuery, "" ) :6145undefined;6146}61476148// See if we can take a shortcut and just use innerHTML6149if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&6150( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&6151( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&6152!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {61536154value = value.replace( rxhtmlTag, "<$1></$2>" );61556156try {6157for (; i < l; i++ ) {6158// Remove element nodes and prevent memory leaks6159elem = this[i] || {};6160if ( elem.nodeType === 1 ) {6161jQuery.cleanData( getAll( elem, false ) );6162elem.innerHTML = value;6163}6164}61656166elem = 0;61676168// If using innerHTML throws an exception, use the fallback method6169} catch(e) {}6170}61716172if ( elem ) {6173this.empty().append( value );6174}6175}, null, value, arguments.length );6176},61776178replaceWith: function() {6179var6180// Snapshot the DOM in case .domManip sweeps something relevant into its fragment6181args = jQuery.map( this, function( elem ) {6182return [ elem.nextSibling, elem.parentNode ];6183}),6184i = 0;61856186// Make the changes, replacing each context element with the new content6187this.domManip( arguments, function( elem ) {6188var next = args[ i++ ],6189parent = args[ i++ ];61906191if ( parent ) {6192// Don't use the snapshot next if it has moved (#13810)6193if ( next && next.parentNode !== parent ) {6194next = this.nextSibling;6195}6196jQuery( this ).remove();6197parent.insertBefore( elem, next );6198}6199// Allow new content to include elements from the context set6200}, true );62016202// Force removal if there was no new content (e.g., from empty arguments)6203return i ? this : this.remove();6204},62056206detach: function( selector ) {6207return this.remove( selector, true );6208},62096210domManip: function( args, callback, allowIntersection ) {62116212// Flatten any nested arrays6213args = core_concat.apply( [], args );62146215var first, node, hasScripts,6216scripts, doc, fragment,6217i = 0,6218l = this.length,6219set = this,6220iNoClone = l - 1,6221value = args[0],6222isFunction = jQuery.isFunction( value );62236224// We can't cloneNode fragments that contain checked, in WebKit6225if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {6226return this.each(function( index ) {6227var self = set.eq( index );6228if ( isFunction ) {6229args[0] = value.call( this, index, self.html() );6230}6231self.domManip( args, callback, allowIntersection );6232});6233}62346235if ( l ) {6236fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );6237first = fragment.firstChild;62386239if ( fragment.childNodes.length === 1 ) {6240fragment = first;6241}62426243if ( first ) {6244scripts = jQuery.map( getAll( fragment, "script" ), disableScript );6245hasScripts = scripts.length;62466247// Use the original fragment for the last item instead of the first because it can end up6248// being emptied incorrectly in certain situations (#8070).6249for ( ; i < l; i++ ) {6250node = fragment;62516252if ( i !== iNoClone ) {6253node = jQuery.clone( node, true, true );62546255// Keep references to cloned scripts for later restoration6256if ( hasScripts ) {6257jQuery.merge( scripts, getAll( node, "script" ) );6258}6259}62606261callback.call( this[i], node, i );6262}62636264if ( hasScripts ) {6265doc = scripts[ scripts.length - 1 ].ownerDocument;62666267// Reenable scripts6268jQuery.map( scripts, restoreScript );62696270// Evaluate executable scripts on first document insertion6271for ( i = 0; i < hasScripts; i++ ) {6272node = scripts[ i ];6273if ( rscriptType.test( node.type || "" ) &&6274!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {62756276if ( node.src ) {6277// Hope ajax is available...6278jQuery._evalUrl( node.src );6279} else {6280jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );6281}6282}6283}6284}62856286// Fix #11809: Avoid leaking memory6287fragment = first = null;6288}6289}62906291return this;6292}6293});62946295// Support: IE<86296// Manipulating tables requires a tbody6297function manipulationTarget( elem, content ) {6298return jQuery.nodeName( elem, "table" ) &&6299jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?63006301elem.getElementsByTagName("tbody")[0] ||6302elem.appendChild( elem.ownerDocument.createElement("tbody") ) :6303elem;6304}63056306// Replace/restore the type attribute of script elements for safe DOM manipulation6307function disableScript( elem ) {6308elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;6309return elem;6310}6311function restoreScript( elem ) {6312var match = rscriptTypeMasked.exec( elem.type );6313if ( match ) {6314elem.type = match[1];6315} else {6316elem.removeAttribute("type");6317}6318return elem;6319}63206321// Mark scripts as having already been evaluated6322function setGlobalEval( elems, refElements ) {6323var elem,6324i = 0;6325for ( ; (elem = elems[i]) != null; i++ ) {6326jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );6327}6328}63296330function cloneCopyEvent( src, dest ) {63316332if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {6333return;6334}63356336var type, i, l,6337oldData = jQuery._data( src ),6338curData = jQuery._data( dest, oldData ),6339events = oldData.events;63406341if ( events ) {6342delete curData.handle;6343curData.events = {};63446345for ( type in events ) {6346for ( i = 0, l = events[ type ].length; i < l; i++ ) {6347jQuery.event.add( dest, type, events[ type ][ i ] );6348}6349}6350}63516352// make the cloned public data object a copy from the original6353if ( curData.data ) {6354curData.data = jQuery.extend( {}, curData.data );6355}6356}63576358function fixCloneNodeIssues( src, dest ) {6359var nodeName, e, data;63606361// We do not need to do anything for non-Elements6362if ( dest.nodeType !== 1 ) {6363return;6364}63656366nodeName = dest.nodeName.toLowerCase();63676368// IE6-8 copies events bound via attachEvent when using cloneNode.6369if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {6370data = jQuery._data( dest );63716372for ( e in data.events ) {6373jQuery.removeEvent( dest, e, data.handle );6374}63756376// Event data gets referenced instead of copied if the expando gets copied too6377dest.removeAttribute( jQuery.expando );6378}63796380// IE blanks contents when cloning scripts, and tries to evaluate newly-set text6381if ( nodeName === "script" && dest.text !== src.text ) {6382disableScript( dest ).text = src.text;6383restoreScript( dest );63846385// IE6-10 improperly clones children of object elements using classid.6386// IE10 throws NoModificationAllowedError if parent is null, #12132.6387} else if ( nodeName === "object" ) {6388if ( dest.parentNode ) {6389dest.outerHTML = src.outerHTML;6390}63916392// This path appears unavoidable for IE9. When cloning an object6393// element in IE9, the outerHTML strategy above is not sufficient.6394// If the src has innerHTML and the destination does not,6395// copy the src.innerHTML into the dest.innerHTML. #103246396if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {6397dest.innerHTML = src.innerHTML;6398}63996400} else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {6401// IE6-8 fails to persist the checked state of a cloned checkbox6402// or radio button. Worse, IE6-7 fail to give the cloned element6403// a checked appearance if the defaultChecked value isn't also set64046405dest.defaultChecked = dest.checked = src.checked;64066407// IE6-7 get confused and end up setting the value of a cloned6408// checkbox/radio button to an empty string instead of "on"6409if ( dest.value !== src.value ) {6410dest.value = src.value;6411}64126413// IE6-8 fails to return the selected option to the default selected6414// state when cloning options6415} else if ( nodeName === "option" ) {6416dest.defaultSelected = dest.selected = src.defaultSelected;64176418// IE6-8 fails to set the defaultValue to the correct value when6419// cloning other types of input fields6420} else if ( nodeName === "input" || nodeName === "textarea" ) {6421dest.defaultValue = src.defaultValue;6422}6423}64246425jQuery.each({6426appendTo: "append",6427prependTo: "prepend",6428insertBefore: "before",6429insertAfter: "after",6430replaceAll: "replaceWith"6431}, function( name, original ) {6432jQuery.fn[ name ] = function( selector ) {6433var elems,6434i = 0,6435ret = [],6436insert = jQuery( selector ),6437last = insert.length - 1;64386439for ( ; i <= last; i++ ) {6440elems = i === last ? this : this.clone(true);6441jQuery( insert[i] )[ original ]( elems );64426443// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()6444core_push.apply( ret, elems.get() );6445}64466447return this.pushStack( ret );6448};6449});64506451function getAll( context, tag ) {6452var elems, elem,6453i = 0,6454found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :6455typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :6456undefined;64576458if ( !found ) {6459for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {6460if ( !tag || jQuery.nodeName( elem, tag ) ) {6461found.push( elem );6462} else {6463jQuery.merge( found, getAll( elem, tag ) );6464}6465}6466}64676468return tag === undefined || tag && jQuery.nodeName( context, tag ) ?6469jQuery.merge( [ context ], found ) :6470found;6471}64726473// Used in buildFragment, fixes the defaultChecked property6474function fixDefaultChecked( elem ) {6475if ( manipulation_rcheckableType.test( elem.type ) ) {6476elem.defaultChecked = elem.checked;6477}6478}64796480jQuery.extend({6481clone: function( elem, dataAndEvents, deepDataAndEvents ) {6482var destElements, node, clone, i, srcElements,6483inPage = jQuery.contains( elem.ownerDocument, elem );64846485if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {6486clone = elem.cloneNode( true );64876488// IE<=8 does not properly clone detached, unknown element nodes6489} else {6490fragmentDiv.innerHTML = elem.outerHTML;6491fragmentDiv.removeChild( clone = fragmentDiv.firstChild );6492}64936494if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&6495(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {64966497// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/26498destElements = getAll( clone );6499srcElements = getAll( elem );65006501// Fix all IE cloning issues6502for ( i = 0; (node = srcElements[i]) != null; ++i ) {6503// Ensure that the destination node is not null; Fixes #95876504if ( destElements[i] ) {6505fixCloneNodeIssues( node, destElements[i] );6506}6507}6508}65096510// Copy the events from the original to the clone6511if ( dataAndEvents ) {6512if ( deepDataAndEvents ) {6513srcElements = srcElements || getAll( elem );6514destElements = destElements || getAll( clone );65156516for ( i = 0; (node = srcElements[i]) != null; i++ ) {6517cloneCopyEvent( node, destElements[i] );6518}6519} else {6520cloneCopyEvent( elem, clone );6521}6522}65236524// Preserve script evaluation history6525destElements = getAll( clone, "script" );6526if ( destElements.length > 0 ) {6527setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );6528}65296530destElements = srcElements = node = null;65316532// Return the cloned set6533return clone;6534},65356536buildFragment: function( elems, context, scripts, selection ) {6537var j, elem, contains,6538tmp, tag, tbody, wrap,6539l = elems.length,65406541// Ensure a safe fragment6542safe = createSafeFragment( context ),65436544nodes = [],6545i = 0;65466547for ( ; i < l; i++ ) {6548elem = elems[ i ];65496550if ( elem || elem === 0 ) {65516552// Add nodes directly6553if ( jQuery.type( elem ) === "object" ) {6554jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );65556556// Convert non-html into a text node6557} else if ( !rhtml.test( elem ) ) {6558nodes.push( context.createTextNode( elem ) );65596560// Convert html into DOM nodes6561} else {6562tmp = tmp || safe.appendChild( context.createElement("div") );65636564// Deserialize a standard representation6565tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();6566wrap = wrapMap[ tag ] || wrapMap._default;65676568tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];65696570// Descend through wrappers to the right content6571j = wrap[0];6572while ( j-- ) {6573tmp = tmp.lastChild;6574}65756576// Manually add leading whitespace removed by IE6577if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {6578nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );6579}65806581// Remove IE's autoinserted <tbody> from table fragments6582if ( !jQuery.support.tbody ) {65836584// String was a <table>, *may* have spurious <tbody>6585elem = tag === "table" && !rtbody.test( elem ) ?6586tmp.firstChild :65876588// String was a bare <thead> or <tfoot>6589wrap[1] === "<table>" && !rtbody.test( elem ) ?6590tmp :65910;65926593j = elem && elem.childNodes.length;6594while ( j-- ) {6595if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {6596elem.removeChild( tbody );6597}6598}6599}66006601jQuery.merge( nodes, tmp.childNodes );66026603// Fix #12392 for WebKit and IE > 96604tmp.textContent = "";66056606// Fix #12392 for oldIE6607while ( tmp.firstChild ) {6608tmp.removeChild( tmp.firstChild );6609}66106611// Remember the top-level container for proper cleanup6612tmp = safe.lastChild;6613}6614}6615}66166617// Fix #11356: Clear elements from fragment6618if ( tmp ) {6619safe.removeChild( tmp );6620}66216622// Reset defaultChecked for any radios and checkboxes6623// about to be appended to the DOM in IE 6/7 (#8060)6624if ( !jQuery.support.appendChecked ) {6625jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );6626}66276628i = 0;6629while ( (elem = nodes[ i++ ]) ) {66306631// #4087 - If origin and destination elements are the same, and this is6632// that element, do not do anything6633if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {6634continue;6635}66366637contains = jQuery.contains( elem.ownerDocument, elem );66386639// Append to fragment6640tmp = getAll( safe.appendChild( elem ), "script" );66416642// Preserve script evaluation history6643if ( contains ) {6644setGlobalEval( tmp );6645}66466647// Capture executables6648if ( scripts ) {6649j = 0;6650while ( (elem = tmp[ j++ ]) ) {6651if ( rscriptType.test( elem.type || "" ) ) {6652scripts.push( elem );6653}6654}6655}6656}66576658tmp = null;66596660return safe;6661},66626663cleanData: function( elems, /* internal */ acceptData ) {6664var elem, type, id, data,6665i = 0,6666internalKey = jQuery.expando,6667cache = jQuery.cache,6668deleteExpando = jQuery.support.deleteExpando,6669special = jQuery.event.special;66706671for ( ; (elem = elems[i]) != null; i++ ) {66726673if ( acceptData || jQuery.acceptData( elem ) ) {66746675id = elem[ internalKey ];6676data = id && cache[ id ];66776678if ( data ) {6679if ( data.events ) {6680for ( type in data.events ) {6681if ( special[ type ] ) {6682jQuery.event.remove( elem, type );66836684// This is a shortcut to avoid jQuery.event.remove's overhead6685} else {6686jQuery.removeEvent( elem, type, data.handle );6687}6688}6689}66906691// Remove cache only if it was not already removed by jQuery.event.remove6692if ( cache[ id ] ) {66936694delete cache[ id ];66956696// IE does not allow us to delete expando properties from nodes,6697// nor does it have a removeAttribute function on Document nodes;6698// we must handle all of these cases6699if ( deleteExpando ) {6700delete elem[ internalKey ];67016702} else if ( typeof elem.removeAttribute !== core_strundefined ) {6703elem.removeAttribute( internalKey );67046705} else {6706elem[ internalKey ] = null;6707}67086709core_deletedIds.push( id );6710}6711}6712}6713}6714},67156716_evalUrl: function( url ) {6717return jQuery.ajax({6718url: url,6719type: "GET",6720dataType: "script",6721async: false,6722global: false,6723"throws": true6724});6725}6726});6727jQuery.fn.extend({6728wrapAll: function( html ) {6729if ( jQuery.isFunction( html ) ) {6730return this.each(function(i) {6731jQuery(this).wrapAll( html.call(this, i) );6732});6733}67346735if ( this[0] ) {6736// The elements to wrap the target around6737var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);67386739if ( this[0].parentNode ) {6740wrap.insertBefore( this[0] );6741}67426743wrap.map(function() {6744var elem = this;67456746while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {6747elem = elem.firstChild;6748}67496750return elem;6751}).append( this );6752}67536754return this;6755},67566757wrapInner: function( html ) {6758if ( jQuery.isFunction( html ) ) {6759return this.each(function(i) {6760jQuery(this).wrapInner( html.call(this, i) );6761});6762}67636764return this.each(function() {6765var self = jQuery( this ),6766contents = self.contents();67676768if ( contents.length ) {6769contents.wrapAll( html );67706771} else {6772self.append( html );6773}6774});6775},67766777wrap: function( html ) {6778var isFunction = jQuery.isFunction( html );67796780return this.each(function(i) {6781jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );6782});6783},67846785unwrap: function() {6786return this.parent().each(function() {6787if ( !jQuery.nodeName( this, "body" ) ) {6788jQuery( this ).replaceWith( this.childNodes );6789}6790}).end();6791}6792});6793var iframe, getStyles, curCSS,6794ralpha = /alpha\([^)]*\)/i,6795ropacity = /opacity\s*=\s*([^)]*)/,6796rposition = /^(top|right|bottom|left)$/,6797// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"6798// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display6799rdisplayswap = /^(none|table(?!-c[ea]).+)/,6800rmargin = /^margin/,6801rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),6802rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),6803rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),6804elemdisplay = { BODY: "block" },68056806cssShow = { position: "absolute", visibility: "hidden", display: "block" },6807cssNormalTransform = {6808letterSpacing: 0,6809fontWeight: 4006810},68116812cssExpand = [ "Top", "Right", "Bottom", "Left" ],6813cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];68146815// return a css property mapped to a potentially vendor prefixed property6816function vendorPropName( style, name ) {68176818// shortcut for names that are not vendor prefixed6819if ( name in style ) {6820return name;6821}68226823// check for vendor prefixed names6824var capName = name.charAt(0).toUpperCase() + name.slice(1),6825origName = name,6826i = cssPrefixes.length;68276828while ( i-- ) {6829name = cssPrefixes[ i ] + capName;6830if ( name in style ) {6831return name;6832}6833}68346835return origName;6836}68376838function isHidden( elem, el ) {6839// isHidden might be called from jQuery#filter function;6840// in that case, element will be second argument6841elem = el || elem;6842return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );6843}68446845function showHide( elements, show ) {6846var display, elem, hidden,6847values = [],6848index = 0,6849length = elements.length;68506851for ( ; index < length; index++ ) {6852elem = elements[ index ];6853if ( !elem.style ) {6854continue;6855}68566857values[ index ] = jQuery._data( elem, "olddisplay" );6858display = elem.style.display;6859if ( show ) {6860// Reset the inline display of this element to learn if it is6861// being hidden by cascaded rules or not6862if ( !values[ index ] && display === "none" ) {6863elem.style.display = "";6864}68656866// Set elements which have been overridden with display: none6867// in a stylesheet to whatever the default browser style is6868// for such an element6869if ( elem.style.display === "" && isHidden( elem ) ) {6870values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );6871}6872} else {68736874if ( !values[ index ] ) {6875hidden = isHidden( elem );68766877if ( display && display !== "none" || !hidden ) {6878jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );6879}6880}6881}6882}68836884// Set the display of most of the elements in a second loop6885// to avoid the constant reflow6886for ( index = 0; index < length; index++ ) {6887elem = elements[ index ];6888if ( !elem.style ) {6889continue;6890}6891if ( !show || elem.style.display === "none" || elem.style.display === "" ) {6892elem.style.display = show ? values[ index ] || "" : "none";6893}6894}68956896return elements;6897}68986899jQuery.fn.extend({6900css: function( name, value ) {6901return jQuery.access( this, function( elem, name, value ) {6902var len, styles,6903map = {},6904i = 0;69056906if ( jQuery.isArray( name ) ) {6907styles = getStyles( elem );6908len = name.length;69096910for ( ; i < len; i++ ) {6911map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );6912}69136914return map;6915}69166917return value !== undefined ?6918jQuery.style( elem, name, value ) :6919jQuery.css( elem, name );6920}, name, value, arguments.length > 1 );6921},6922show: function() {6923return showHide( this, true );6924},6925hide: function() {6926return showHide( this );6927},6928toggle: function( state ) {6929if ( typeof state === "boolean" ) {6930return state ? this.show() : this.hide();6931}69326933return this.each(function() {6934if ( isHidden( this ) ) {6935jQuery( this ).show();6936} else {6937jQuery( this ).hide();6938}6939});6940}6941});69426943jQuery.extend({6944// Add in style property hooks for overriding the default6945// behavior of getting and setting a style property6946cssHooks: {6947opacity: {6948get: function( elem, computed ) {6949if ( computed ) {6950// We should always get a number back from opacity6951var ret = curCSS( elem, "opacity" );6952return ret === "" ? "1" : ret;6953}6954}6955}6956},69576958// Don't automatically add "px" to these possibly-unitless properties6959cssNumber: {6960"columnCount": true,6961"fillOpacity": true,6962"fontWeight": true,6963"lineHeight": true,6964"opacity": true,6965"order": true,6966"orphans": true,6967"widows": true,6968"zIndex": true,6969"zoom": true6970},69716972// Add in properties whose names you wish to fix before6973// setting or getting the value6974cssProps: {6975// normalize float css property6976"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"6977},69786979// Get and set the style property on a DOM Node6980style: function( elem, name, value, extra ) {6981// Don't set styles on text and comment nodes6982if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {6983return;6984}69856986// Make sure that we're working with the right name6987var ret, type, hooks,6988origName = jQuery.camelCase( name ),6989style = elem.style;69906991name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );69926993// gets hook for the prefixed version6994// followed by the unprefixed version6995hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];69966997// Check if we're setting a value6998if ( value !== undefined ) {6999type = typeof value;70007001// convert relative number strings (+= or -=) to relative numbers. #73457002if ( type === "string" && (ret = rrelNum.exec( value )) ) {7003value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );7004// Fixes bug #92377005type = "number";7006}70077008// Make sure that NaN and null values aren't set. See: #71167009if ( value == null || type === "number" && isNaN( value ) ) {7010return;7011}70127013// If a number was passed in, add 'px' to the (except for certain CSS properties)7014if ( type === "number" && !jQuery.cssNumber[ origName ] ) {7015value += "px";7016}70177018// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,7019// but it would mean to define eight (for every problematic property) identical functions7020if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {7021style[ name ] = "inherit";7022}70237024// If a hook was provided, use that value, otherwise just set the specified value7025if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {70267027// Wrapped to prevent IE from throwing errors when 'invalid' values are provided7028// Fixes bug #55097029try {7030style[ name ] = value;7031} catch(e) {}7032}70337034} else {7035// If a hook was provided get the non-computed value from there7036if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {7037return ret;7038}70397040// Otherwise just get the value from the style object7041return style[ name ];7042}7043},70447045css: function( elem, name, extra, styles ) {7046var num, val, hooks,7047origName = jQuery.camelCase( name );70487049// Make sure that we're working with the right name7050name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );70517052// gets hook for the prefixed version7053// followed by the unprefixed version7054hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];70557056// If a hook was provided get the computed value from there7057if ( hooks && "get" in hooks ) {7058val = hooks.get( elem, true, extra );7059}70607061// Otherwise, if a way to get the computed value exists, use that7062if ( val === undefined ) {7063val = curCSS( elem, name, styles );7064}70657066//convert "normal" to computed value7067if ( val === "normal" && name in cssNormalTransform ) {7068val = cssNormalTransform[ name ];7069}70707071// Return, converting to number if forced or a qualifier was provided and val looks numeric7072if ( extra === "" || extra ) {7073num = parseFloat( val );7074return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;7075}7076return val;7077}7078});70797080// NOTE: we've included the "window" in window.getComputedStyle7081// because jsdom on node.js will break without it.7082if ( window.getComputedStyle ) {7083getStyles = function( elem ) {7084return window.getComputedStyle( elem, null );7085};70867087curCSS = function( elem, name, _computed ) {7088var width, minWidth, maxWidth,7089computed = _computed || getStyles( elem ),70907091// getPropertyValue is only needed for .css('filter') in IE9, see #125377092ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,7093style = elem.style;70947095if ( computed ) {70967097if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {7098ret = jQuery.style( elem, name );7099}71007101// A tribute to the "awesome hack by Dean Edwards"7102// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right7103// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels7104// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values7105if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {71067107// Remember the original values7108width = style.width;7109minWidth = style.minWidth;7110maxWidth = style.maxWidth;71117112// Put in the new values to get a computed value out7113style.minWidth = style.maxWidth = style.width = ret;7114ret = computed.width;71157116// Revert the changed values7117style.width = width;7118style.minWidth = minWidth;7119style.maxWidth = maxWidth;7120}7121}71227123return ret;7124};7125} else if ( document.documentElement.currentStyle ) {7126getStyles = function( elem ) {7127return elem.currentStyle;7128};71297130curCSS = function( elem, name, _computed ) {7131var left, rs, rsLeft,7132computed = _computed || getStyles( elem ),7133ret = computed ? computed[ name ] : undefined,7134style = elem.style;71357136// Avoid setting ret to empty string here7137// so we don't default to auto7138if ( ret == null && style && style[ name ] ) {7139ret = style[ name ];7140}71417142// From the awesome hack by Dean Edwards7143// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-10229171447145// If we're not dealing with a regular pixel number7146// but a number that has a weird ending, we need to convert it to pixels7147// but not position css attributes, as those are proportional to the parent element instead7148// and we can't measure the parent instead because it might trigger a "stacking dolls" problem7149if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {71507151// Remember the original values7152left = style.left;7153rs = elem.runtimeStyle;7154rsLeft = rs && rs.left;71557156// Put in the new values to get a computed value out7157if ( rsLeft ) {7158rs.left = elem.currentStyle.left;7159}7160style.left = name === "fontSize" ? "1em" : ret;7161ret = style.pixelLeft + "px";71627163// Revert the changed values7164style.left = left;7165if ( rsLeft ) {7166rs.left = rsLeft;7167}7168}71697170return ret === "" ? "auto" : ret;7171};7172}71737174function setPositiveNumber( elem, value, subtract ) {7175var matches = rnumsplit.exec( value );7176return matches ?7177// Guard against undefined "subtract", e.g., when used as in cssHooks7178Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :7179value;7180}71817182function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {7183var i = extra === ( isBorderBox ? "border" : "content" ) ?7184// If we already have the right measurement, avoid augmentation71854 :7186// Otherwise initialize for horizontal or vertical properties7187name === "width" ? 1 : 0,71887189val = 0;71907191for ( ; i < 4; i += 2 ) {7192// both box models exclude margin, so add it if we want it7193if ( extra === "margin" ) {7194val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );7195}71967197if ( isBorderBox ) {7198// border-box includes padding, so remove it if we want content7199if ( extra === "content" ) {7200val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );7201}72027203// at this point, extra isn't border nor margin, so remove border7204if ( extra !== "margin" ) {7205val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );7206}7207} else {7208// at this point, extra isn't content, so add padding7209val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );72107211// at this point, extra isn't content nor padding, so add border7212if ( extra !== "padding" ) {7213val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );7214}7215}7216}72177218return val;7219}72207221function getWidthOrHeight( elem, name, extra ) {72227223// Start with offset property, which is equivalent to the border-box value7224var valueIsBorderBox = true,7225val = name === "width" ? elem.offsetWidth : elem.offsetHeight,7226styles = getStyles( elem ),7227isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";72287229// some non-html elements return undefined for offsetWidth, so check for null/undefined7230// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=6492857231// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=4916687232if ( val <= 0 || val == null ) {7233// Fall back to computed then uncomputed css if necessary7234val = curCSS( elem, name, styles );7235if ( val < 0 || val == null ) {7236val = elem.style[ name ];7237}72387239// Computed unit is not pixels. Stop here and return.7240if ( rnumnonpx.test(val) ) {7241return val;7242}72437244// we need the check for style in case a browser which returns unreliable values7245// for getComputedStyle silently falls back to the reliable elem.style7246valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );72477248// Normalize "", auto, and prepare for extra7249val = parseFloat( val ) || 0;7250}72517252// use the active box-sizing model to add/subtract irrelevant styles7253return ( val +7254augmentWidthOrHeight(7255elem,7256name,7257extra || ( isBorderBox ? "border" : "content" ),7258valueIsBorderBox,7259styles7260)7261) + "px";7262}72637264// Try to determine the default display value of an element7265function css_defaultDisplay( nodeName ) {7266var doc = document,7267display = elemdisplay[ nodeName ];72687269if ( !display ) {7270display = actualDisplay( nodeName, doc );72717272// If the simple way fails, read from inside an iframe7273if ( display === "none" || !display ) {7274// Use the already-created iframe if possible7275iframe = ( iframe ||7276jQuery("<iframe frameborder='0' width='0' height='0'/>")7277.css( "cssText", "display:block !important" )7278).appendTo( doc.documentElement );72797280// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse7281doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;7282doc.write("<!doctype html><html><body>");7283doc.close();72847285display = actualDisplay( nodeName, doc );7286iframe.detach();7287}72887289// Store the correct default display7290elemdisplay[ nodeName ] = display;7291}72927293return display;7294}72957296// Called ONLY from within css_defaultDisplay7297function actualDisplay( name, doc ) {7298var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),7299display = jQuery.css( elem[0], "display" );7300elem.remove();7301return display;7302}73037304jQuery.each([ "height", "width" ], function( i, name ) {7305jQuery.cssHooks[ name ] = {7306get: function( elem, computed, extra ) {7307if ( computed ) {7308// certain elements can have dimension info if we invisibly show them7309// however, it must have a current display style that would benefit from this7310return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?7311jQuery.swap( elem, cssShow, function() {7312return getWidthOrHeight( elem, name, extra );7313}) :7314getWidthOrHeight( elem, name, extra );7315}7316},73177318set: function( elem, value, extra ) {7319var styles = extra && getStyles( elem );7320return setPositiveNumber( elem, value, extra ?7321augmentWidthOrHeight(7322elem,7323name,7324extra,7325jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",7326styles7327) : 07328);7329}7330};7331});73327333if ( !jQuery.support.opacity ) {7334jQuery.cssHooks.opacity = {7335get: function( elem, computed ) {7336// IE uses filters for opacity7337return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?7338( 0.01 * parseFloat( RegExp.$1 ) ) + "" :7339computed ? "1" : "";7340},73417342set: function( elem, value ) {7343var style = elem.style,7344currentStyle = elem.currentStyle,7345opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",7346filter = currentStyle && currentStyle.filter || style.filter || "";73477348// IE has trouble with opacity if it does not have layout7349// Force it by setting the zoom level7350style.zoom = 1;73517352// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #66527353// if value === "", then remove inline opacity #126857354if ( ( value >= 1 || value === "" ) &&7355jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&7356style.removeAttribute ) {73577358// Setting style.filter to null, "" & " " still leave "filter:" in the cssText7359// if "filter:" is present at all, clearType is disabled, we want to avoid this7360// style.removeAttribute is IE Only, but so apparently is this code path...7361style.removeAttribute( "filter" );73627363// if there is no filter style applied in a css rule or unset inline opacity, we are done7364if ( value === "" || currentStyle && !currentStyle.filter ) {7365return;7366}7367}73687369// otherwise, set new filter values7370style.filter = ralpha.test( filter ) ?7371filter.replace( ralpha, opacity ) :7372filter + " " + opacity;7373}7374};7375}73767377// These hooks cannot be added until DOM ready because the support test7378// for it is not run until after DOM ready7379jQuery(function() {7380if ( !jQuery.support.reliableMarginRight ) {7381jQuery.cssHooks.marginRight = {7382get: function( elem, computed ) {7383if ( computed ) {7384// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right7385// Work around by temporarily setting element display to inline-block7386return jQuery.swap( elem, { "display": "inline-block" },7387curCSS, [ elem, "marginRight" ] );7388}7389}7390};7391}73927393// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=290847394// getComputedStyle returns percent when specified for top/left/bottom/right7395// rather than make the css module depend on the offset module, we just check for it here7396if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {7397jQuery.each( [ "top", "left" ], function( i, prop ) {7398jQuery.cssHooks[ prop ] = {7399get: function( elem, computed ) {7400if ( computed ) {7401computed = curCSS( elem, prop );7402// if curCSS returns percentage, fallback to offset7403return rnumnonpx.test( computed ) ?7404jQuery( elem ).position()[ prop ] + "px" :7405computed;7406}7407}7408};7409});7410}74117412});74137414if ( jQuery.expr && jQuery.expr.filters ) {7415jQuery.expr.filters.hidden = function( elem ) {7416// Support: Opera <= 12.127417// Opera reports offsetWidths and offsetHeights less than zero on some elements7418return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||7419(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");7420};74217422jQuery.expr.filters.visible = function( elem ) {7423return !jQuery.expr.filters.hidden( elem );7424};7425}74267427// These hooks are used by animate to expand properties7428jQuery.each({7429margin: "",7430padding: "",7431border: "Width"7432}, function( prefix, suffix ) {7433jQuery.cssHooks[ prefix + suffix ] = {7434expand: function( value ) {7435var i = 0,7436expanded = {},74377438// assumes a single number if not a string7439parts = typeof value === "string" ? value.split(" ") : [ value ];74407441for ( ; i < 4; i++ ) {7442expanded[ prefix + cssExpand[ i ] + suffix ] =7443parts[ i ] || parts[ i - 2 ] || parts[ 0 ];7444}74457446return expanded;7447}7448};74497450if ( !rmargin.test( prefix ) ) {7451jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;7452}7453});7454var r20 = /%20/g,7455rbracket = /\[\]$/,7456rCRLF = /\r?\n/g,7457rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,7458rsubmittable = /^(?:input|select|textarea|keygen)/i;74597460jQuery.fn.extend({7461serialize: function() {7462return jQuery.param( this.serializeArray() );7463},7464serializeArray: function() {7465return this.map(function(){7466// Can add propHook for "elements" to filter or add form elements7467var elements = jQuery.prop( this, "elements" );7468return elements ? jQuery.makeArray( elements ) : this;7469})7470.filter(function(){7471var type = this.type;7472// Use .is(":disabled") so that fieldset[disabled] works7473return this.name && !jQuery( this ).is( ":disabled" ) &&7474rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&7475( this.checked || !manipulation_rcheckableType.test( type ) );7476})7477.map(function( i, elem ){7478var val = jQuery( this ).val();74797480return val == null ?7481null :7482jQuery.isArray( val ) ?7483jQuery.map( val, function( val ){7484return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };7485}) :7486{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };7487}).get();7488}7489});74907491//Serialize an array of form elements or a set of7492//key/values into a query string7493jQuery.param = function( a, traditional ) {7494var prefix,7495s = [],7496add = function( key, value ) {7497// If value is a function, invoke it and return its value7498value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );7499s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );7500};75017502// Set traditional to true for jQuery <= 1.3.2 behavior.7503if ( traditional === undefined ) {7504traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;7505}75067507// If an array was passed in, assume that it is an array of form elements.7508if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {7509// Serialize the form elements7510jQuery.each( a, function() {7511add( this.name, this.value );7512});75137514} else {7515// If traditional, encode the "old" way (the way 1.3.2 or older7516// did it), otherwise encode params recursively.7517for ( prefix in a ) {7518buildParams( prefix, a[ prefix ], traditional, add );7519}7520}75217522// Return the resulting serialization7523return s.join( "&" ).replace( r20, "+" );7524};75257526function buildParams( prefix, obj, traditional, add ) {7527var name;75287529if ( jQuery.isArray( obj ) ) {7530// Serialize array item.7531jQuery.each( obj, function( i, v ) {7532if ( traditional || rbracket.test( prefix ) ) {7533// Treat each array item as a scalar.7534add( prefix, v );75357536} else {7537// Item is non-scalar (array or object), encode its numeric index.7538buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );7539}7540});75417542} else if ( !traditional && jQuery.type( obj ) === "object" ) {7543// Serialize object item.7544for ( name in obj ) {7545buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );7546}75477548} else {7549// Serialize scalar item.7550add( prefix, obj );7551}7552}7553jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +7554"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +7555"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {75567557// Handle event binding7558jQuery.fn[ name ] = function( data, fn ) {7559return arguments.length > 0 ?7560this.on( name, null, data, fn ) :7561this.trigger( name );7562};7563});75647565jQuery.fn.extend({7566hover: function( fnOver, fnOut ) {7567return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );7568},75697570bind: function( types, data, fn ) {7571return this.on( types, null, data, fn );7572},7573unbind: function( types, fn ) {7574return this.off( types, null, fn );7575},75767577delegate: function( selector, types, data, fn ) {7578return this.on( types, selector, data, fn );7579},7580undelegate: function( selector, types, fn ) {7581// ( namespace ) or ( selector, types [, fn] )7582return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );7583}7584});7585var7586// Document location7587ajaxLocParts,7588ajaxLocation,7589ajax_nonce = jQuery.now(),75907591ajax_rquery = /\?/,7592rhash = /#.*$/,7593rts = /([?&])_=[^&]*/,7594rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL7595// #7653, #8125, #8152: local protocol detection7596rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,7597rnoContent = /^(?:GET|HEAD)$/,7598rprotocol = /^\/\//,7599rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,76007601// Keep a copy of the old load method7602_load = jQuery.fn.load,76037604/* Prefilters7605* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)7606* 2) These are called:7607* - BEFORE asking for a transport7608* - AFTER param serialization (s.data is a string if s.processData is true)7609* 3) key is the dataType7610* 4) the catchall symbol "*" can be used7611* 5) execution will start with transport dataType and THEN continue down to "*" if needed7612*/7613prefilters = {},76147615/* Transports bindings7616* 1) key is the dataType7617* 2) the catchall symbol "*" can be used7618* 3) selection will start with transport dataType and THEN go to "*" if needed7619*/7620transports = {},76217622// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression7623allTypes = "*/".concat("*");76247625// #8138, IE may throw an exception when accessing7626// a field from window.location if document.domain has been set7627try {7628ajaxLocation = location.href;7629} catch( e ) {7630// Use the href attribute of an A element7631// since IE will modify it given document.location7632ajaxLocation = document.createElement( "a" );7633ajaxLocation.href = "";7634ajaxLocation = ajaxLocation.href;7635}76367637// Segment location into parts7638ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];76397640// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport7641function addToPrefiltersOrTransports( structure ) {76427643// dataTypeExpression is optional and defaults to "*"7644return function( dataTypeExpression, func ) {76457646if ( typeof dataTypeExpression !== "string" ) {7647func = dataTypeExpression;7648dataTypeExpression = "*";7649}76507651var dataType,7652i = 0,7653dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];76547655if ( jQuery.isFunction( func ) ) {7656// For each dataType in the dataTypeExpression7657while ( (dataType = dataTypes[i++]) ) {7658// Prepend if requested7659if ( dataType[0] === "+" ) {7660dataType = dataType.slice( 1 ) || "*";7661(structure[ dataType ] = structure[ dataType ] || []).unshift( func );76627663// Otherwise append7664} else {7665(structure[ dataType ] = structure[ dataType ] || []).push( func );7666}7667}7668}7669};7670}76717672// Base inspection function for prefilters and transports7673function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {76747675var inspected = {},7676seekingTransport = ( structure === transports );76777678function inspect( dataType ) {7679var selected;7680inspected[ dataType ] = true;7681jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {7682var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );7683if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {7684options.dataTypes.unshift( dataTypeOrTransport );7685inspect( dataTypeOrTransport );7686return false;7687} else if ( seekingTransport ) {7688return !( selected = dataTypeOrTransport );7689}7690});7691return selected;7692}76937694return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );7695}76967697// A special extend for ajax options7698// that takes "flat" options (not to be deep extended)7699// Fixes #98877700function ajaxExtend( target, src ) {7701var deep, key,7702flatOptions = jQuery.ajaxSettings.flatOptions || {};77037704for ( key in src ) {7705if ( src[ key ] !== undefined ) {7706( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];7707}7708}7709if ( deep ) {7710jQuery.extend( true, target, deep );7711}77127713return target;7714}77157716jQuery.fn.load = function( url, params, callback ) {7717if ( typeof url !== "string" && _load ) {7718return _load.apply( this, arguments );7719}77207721var selector, response, type,7722self = this,7723off = url.indexOf(" ");77247725if ( off >= 0 ) {7726selector = url.slice( off, url.length );7727url = url.slice( 0, off );7728}77297730// If it's a function7731if ( jQuery.isFunction( params ) ) {77327733// We assume that it's the callback7734callback = params;7735params = undefined;77367737// Otherwise, build a param string7738} else if ( params && typeof params === "object" ) {7739type = "POST";7740}77417742// If we have elements to modify, make the request7743if ( self.length > 0 ) {7744jQuery.ajax({7745url: url,77467747// if "type" variable is undefined, then "GET" method will be used7748type: type,7749dataType: "html",7750data: params7751}).done(function( responseText ) {77527753// Save response for use in complete callback7754response = arguments;77557756self.html( selector ?77577758// If a selector was specified, locate the right elements in a dummy div7759// Exclude scripts to avoid IE 'Permission Denied' errors7760jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :77617762// Otherwise use the full result7763responseText );77647765}).complete( callback && function( jqXHR, status ) {7766self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );7767});7768}77697770return this;7771};77727773// Attach a bunch of functions for handling common AJAX events7774jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){7775jQuery.fn[ type ] = function( fn ){7776return this.on( type, fn );7777};7778});77797780jQuery.extend({77817782// Counter for holding the number of active queries7783active: 0,77847785// Last-Modified header cache for next request7786lastModified: {},7787etag: {},77887789ajaxSettings: {7790url: ajaxLocation,7791type: "GET",7792isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),7793global: true,7794processData: true,7795async: true,7796contentType: "application/x-www-form-urlencoded; charset=UTF-8",7797/*7798timeout: 0,7799data: null,7800dataType: null,7801username: null,7802password: null,7803cache: null,7804throws: false,7805traditional: false,7806headers: {},7807*/78087809accepts: {7810"*": allTypes,7811text: "text/plain",7812html: "text/html",7813xml: "application/xml, text/xml",7814json: "application/json, text/javascript"7815},78167817contents: {7818xml: /xml/,7819html: /html/,7820json: /json/7821},78227823responseFields: {7824xml: "responseXML",7825text: "responseText",7826json: "responseJSON"7827},78287829// Data converters7830// Keys separate source (or catchall "*") and destination types with a single space7831converters: {78327833// Convert anything to text7834"* text": String,78357836// Text to html (true = no transformation)7837"text html": true,78387839// Evaluate text as a json expression7840"text json": jQuery.parseJSON,78417842// Parse text as xml7843"text xml": jQuery.parseXML7844},78457846// For options that shouldn't be deep extended:7847// you can add your own custom options here if7848// and when you create one that shouldn't be7849// deep extended (see ajaxExtend)7850flatOptions: {7851url: true,7852context: true7853}7854},78557856// Creates a full fledged settings object into target7857// with both ajaxSettings and settings fields.7858// If target is omitted, writes into ajaxSettings.7859ajaxSetup: function( target, settings ) {7860return settings ?78617862// Building a settings object7863ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :78647865// Extending ajaxSettings7866ajaxExtend( jQuery.ajaxSettings, target );7867},78687869ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),7870ajaxTransport: addToPrefiltersOrTransports( transports ),78717872// Main method7873ajax: function( url, options ) {78747875// If url is an object, simulate pre-1.5 signature7876if ( typeof url === "object" ) {7877options = url;7878url = undefined;7879}78807881// Force options to be an object7882options = options || {};78837884var // Cross-domain detection vars7885parts,7886// Loop variable7887i,7888// URL without anti-cache param7889cacheURL,7890// Response headers as string7891responseHeadersString,7892// timeout handle7893timeoutTimer,78947895// To know if global events are to be dispatched7896fireGlobals,78977898transport,7899// Response headers7900responseHeaders,7901// Create the final options object7902s = jQuery.ajaxSetup( {}, options ),7903// Callbacks context7904callbackContext = s.context || s,7905// Context for global events is callbackContext if it is a DOM node or jQuery collection7906globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?7907jQuery( callbackContext ) :7908jQuery.event,7909// Deferreds7910deferred = jQuery.Deferred(),7911completeDeferred = jQuery.Callbacks("once memory"),7912// Status-dependent callbacks7913statusCode = s.statusCode || {},7914// Headers (they are sent all at once)7915requestHeaders = {},7916requestHeadersNames = {},7917// The jqXHR state7918state = 0,7919// Default abort message7920strAbort = "canceled",7921// Fake xhr7922jqXHR = {7923readyState: 0,79247925// Builds headers hashtable if needed7926getResponseHeader: function( key ) {7927var match;7928if ( state === 2 ) {7929if ( !responseHeaders ) {7930responseHeaders = {};7931while ( (match = rheaders.exec( responseHeadersString )) ) {7932responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];7933}7934}7935match = responseHeaders[ key.toLowerCase() ];7936}7937return match == null ? null : match;7938},79397940// Raw string7941getAllResponseHeaders: function() {7942return state === 2 ? responseHeadersString : null;7943},79447945// Caches the header7946setRequestHeader: function( name, value ) {7947var lname = name.toLowerCase();7948if ( !state ) {7949name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;7950requestHeaders[ name ] = value;7951}7952return this;7953},79547955// Overrides response content-type header7956overrideMimeType: function( type ) {7957if ( !state ) {7958s.mimeType = type;7959}7960return this;7961},79627963// Status-dependent callbacks7964statusCode: function( map ) {7965var code;7966if ( map ) {7967if ( state < 2 ) {7968for ( code in map ) {7969// Lazy-add the new callback in a way that preserves old ones7970statusCode[ code ] = [ statusCode[ code ], map[ code ] ];7971}7972} else {7973// Execute the appropriate callbacks7974jqXHR.always( map[ jqXHR.status ] );7975}7976}7977return this;7978},79797980// Cancel the request7981abort: function( statusText ) {7982var finalText = statusText || strAbort;7983if ( transport ) {7984transport.abort( finalText );7985}7986done( 0, finalText );7987return this;7988}7989};79907991// Attach deferreds7992deferred.promise( jqXHR ).complete = completeDeferred.add;7993jqXHR.success = jqXHR.done;7994jqXHR.error = jqXHR.fail;79957996// Remove hash character (#7531: and string promotion)7997// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)7998// Handle falsy url in the settings object (#10093: consistency with old signature)7999// We also use the url parameter if available8000s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );80018002// Alias method option to type as per ticket #120048003s.type = options.method || options.type || s.method || s.type;80048005// Extract dataTypes list8006s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];80078008// A cross-domain request is in order when we have a protocol:host:port mismatch8009if ( s.crossDomain == null ) {8010parts = rurl.exec( s.url.toLowerCase() );8011s.crossDomain = !!( parts &&8012( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||8013( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==8014( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )8015);8016}80178018// Convert data if not already a string8019if ( s.data && s.processData && typeof s.data !== "string" ) {8020s.data = jQuery.param( s.data, s.traditional );8021}80228023// Apply prefilters8024inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );80258026// If request was aborted inside a prefilter, stop there8027if ( state === 2 ) {8028return jqXHR;8029}80308031// We can fire global events as of now if asked to8032fireGlobals = s.global;80338034// Watch for a new set of requests8035if ( fireGlobals && jQuery.active++ === 0 ) {8036jQuery.event.trigger("ajaxStart");8037}80388039// Uppercase the type8040s.type = s.type.toUpperCase();80418042// Determine if request has content8043s.hasContent = !rnoContent.test( s.type );80448045// Save the URL in case we're toying with the If-Modified-Since8046// and/or If-None-Match header later on8047cacheURL = s.url;80488049// More options handling for requests with no content8050if ( !s.hasContent ) {80518052// If data is available, append data to url8053if ( s.data ) {8054cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );8055// #9682: remove data so that it's not used in an eventual retry8056delete s.data;8057}80588059// Add anti-cache in url if needed8060if ( s.cache === false ) {8061s.url = rts.test( cacheURL ) ?80628063// If there is already a '_' parameter, set its value8064cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :80658066// Otherwise add one to the end8067cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;8068}8069}80708071// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.8072if ( s.ifModified ) {8073if ( jQuery.lastModified[ cacheURL ] ) {8074jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );8075}8076if ( jQuery.etag[ cacheURL ] ) {8077jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );8078}8079}80808081// Set the correct header, if data is being sent8082if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {8083jqXHR.setRequestHeader( "Content-Type", s.contentType );8084}80858086// Set the Accepts header for the server, depending on the dataType8087jqXHR.setRequestHeader(8088"Accept",8089s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?8090s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :8091s.accepts[ "*" ]8092);80938094// Check for headers option8095for ( i in s.headers ) {8096jqXHR.setRequestHeader( i, s.headers[ i ] );8097}80988099// Allow custom headers/mimetypes and early abort8100if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {8101// Abort if not done already and return8102return jqXHR.abort();8103}81048105// aborting is no longer a cancellation8106strAbort = "abort";81078108// Install callbacks on deferreds8109for ( i in { success: 1, error: 1, complete: 1 } ) {8110jqXHR[ i ]( s[ i ] );8111}81128113// Get transport8114transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );81158116// If no transport, we auto-abort8117if ( !transport ) {8118done( -1, "No Transport" );8119} else {8120jqXHR.readyState = 1;81218122// Send global event8123if ( fireGlobals ) {8124globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );8125}8126// Timeout8127if ( s.async && s.timeout > 0 ) {8128timeoutTimer = setTimeout(function() {8129jqXHR.abort("timeout");8130}, s.timeout );8131}81328133try {8134state = 1;8135transport.send( requestHeaders, done );8136} catch ( e ) {8137// Propagate exception as error if not done8138if ( state < 2 ) {8139done( -1, e );8140// Simply rethrow otherwise8141} else {8142throw e;8143}8144}8145}81468147// Callback for when everything is done8148function done( status, nativeStatusText, responses, headers ) {8149var isSuccess, success, error, response, modified,8150statusText = nativeStatusText;81518152// Called once8153if ( state === 2 ) {8154return;8155}81568157// State is "done" now8158state = 2;81598160// Clear timeout if it exists8161if ( timeoutTimer ) {8162clearTimeout( timeoutTimer );8163}81648165// Dereference transport for early garbage collection8166// (no matter how long the jqXHR object will be used)8167transport = undefined;81688169// Cache response headers8170responseHeadersString = headers || "";81718172// Set readyState8173jqXHR.readyState = status > 0 ? 4 : 0;81748175// Determine if successful8176isSuccess = status >= 200 && status < 300 || status === 304;81778178// Get response data8179if ( responses ) {8180response = ajaxHandleResponses( s, jqXHR, responses );8181}81828183// Convert no matter what (that way responseXXX fields are always set)8184response = ajaxConvert( s, response, jqXHR, isSuccess );81858186// If successful, handle type chaining8187if ( isSuccess ) {81888189// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.8190if ( s.ifModified ) {8191modified = jqXHR.getResponseHeader("Last-Modified");8192if ( modified ) {8193jQuery.lastModified[ cacheURL ] = modified;8194}8195modified = jqXHR.getResponseHeader("etag");8196if ( modified ) {8197jQuery.etag[ cacheURL ] = modified;8198}8199}82008201// if no content8202if ( status === 204 || s.type === "HEAD" ) {8203statusText = "nocontent";82048205// if not modified8206} else if ( status === 304 ) {8207statusText = "notmodified";82088209// If we have data, let's convert it8210} else {8211statusText = response.state;8212success = response.data;8213error = response.error;8214isSuccess = !error;8215}8216} else {8217// We extract error from statusText8218// then normalize statusText and status for non-aborts8219error = statusText;8220if ( status || !statusText ) {8221statusText = "error";8222if ( status < 0 ) {8223status = 0;8224}8225}8226}82278228// Set data for the fake xhr object8229jqXHR.status = status;8230jqXHR.statusText = ( nativeStatusText || statusText ) + "";82318232// Success/Error8233if ( isSuccess ) {8234deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );8235} else {8236deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );8237}82388239// Status-dependent callbacks8240jqXHR.statusCode( statusCode );8241statusCode = undefined;82428243if ( fireGlobals ) {8244globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",8245[ jqXHR, s, isSuccess ? success : error ] );8246}82478248// Complete8249completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );82508251if ( fireGlobals ) {8252globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );8253// Handle the global AJAX counter8254if ( !( --jQuery.active ) ) {8255jQuery.event.trigger("ajaxStop");8256}8257}8258}82598260return jqXHR;8261},82628263getJSON: function( url, data, callback ) {8264return jQuery.get( url, data, callback, "json" );8265},82668267getScript: function( url, callback ) {8268return jQuery.get( url, undefined, callback, "script" );8269}8270});82718272jQuery.each( [ "get", "post" ], function( i, method ) {8273jQuery[ method ] = function( url, data, callback, type ) {8274// shift arguments if data argument was omitted8275if ( jQuery.isFunction( data ) ) {8276type = type || callback;8277callback = data;8278data = undefined;8279}82808281return jQuery.ajax({8282url: url,8283type: method,8284dataType: type,8285data: data,8286success: callback8287});8288};8289});82908291/* Handles responses to an ajax request:8292* - finds the right dataType (mediates between content-type and expected dataType)8293* - returns the corresponding response8294*/8295function ajaxHandleResponses( s, jqXHR, responses ) {8296var firstDataType, ct, finalDataType, type,8297contents = s.contents,8298dataTypes = s.dataTypes;82998300// Remove auto dataType and get content-type in the process8301while( dataTypes[ 0 ] === "*" ) {8302dataTypes.shift();8303if ( ct === undefined ) {8304ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");8305}8306}83078308// Check if we're dealing with a known content-type8309if ( ct ) {8310for ( type in contents ) {8311if ( contents[ type ] && contents[ type ].test( ct ) ) {8312dataTypes.unshift( type );8313break;8314}8315}8316}83178318// Check to see if we have a response for the expected dataType8319if ( dataTypes[ 0 ] in responses ) {8320finalDataType = dataTypes[ 0 ];8321} else {8322// Try convertible dataTypes8323for ( type in responses ) {8324if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {8325finalDataType = type;8326break;8327}8328if ( !firstDataType ) {8329firstDataType = type;8330}8331}8332// Or just use first one8333finalDataType = finalDataType || firstDataType;8334}83358336// If we found a dataType8337// We add the dataType to the list if needed8338// and return the corresponding response8339if ( finalDataType ) {8340if ( finalDataType !== dataTypes[ 0 ] ) {8341dataTypes.unshift( finalDataType );8342}8343return responses[ finalDataType ];8344}8345}83468347/* Chain conversions given the request and the original response8348* Also sets the responseXXX fields on the jqXHR instance8349*/8350function ajaxConvert( s, response, jqXHR, isSuccess ) {8351var conv2, current, conv, tmp, prev,8352converters = {},8353// Work with a copy of dataTypes in case we need to modify it for conversion8354dataTypes = s.dataTypes.slice();83558356// Create converters map with lowercased keys8357if ( dataTypes[ 1 ] ) {8358for ( conv in s.converters ) {8359converters[ conv.toLowerCase() ] = s.converters[ conv ];8360}8361}83628363current = dataTypes.shift();83648365// Convert to each sequential dataType8366while ( current ) {83678368if ( s.responseFields[ current ] ) {8369jqXHR[ s.responseFields[ current ] ] = response;8370}83718372// Apply the dataFilter if provided8373if ( !prev && isSuccess && s.dataFilter ) {8374response = s.dataFilter( response, s.dataType );8375}83768377prev = current;8378current = dataTypes.shift();83798380if ( current ) {83818382// There's only work to do if current dataType is non-auto8383if ( current === "*" ) {83848385current = prev;83868387// Convert response if prev dataType is non-auto and differs from current8388} else if ( prev !== "*" && prev !== current ) {83898390// Seek a direct converter8391conv = converters[ prev + " " + current ] || converters[ "* " + current ];83928393// If none found, seek a pair8394if ( !conv ) {8395for ( conv2 in converters ) {83968397// If conv2 outputs current8398tmp = conv2.split( " " );8399if ( tmp[ 1 ] === current ) {84008401// If prev can be converted to accepted input8402conv = converters[ prev + " " + tmp[ 0 ] ] ||8403converters[ "* " + tmp[ 0 ] ];8404if ( conv ) {8405// Condense equivalence converters8406if ( conv === true ) {8407conv = converters[ conv2 ];84088409// Otherwise, insert the intermediate dataType8410} else if ( converters[ conv2 ] !== true ) {8411current = tmp[ 0 ];8412dataTypes.unshift( tmp[ 1 ] );8413}8414break;8415}8416}8417}8418}84198420// Apply converter (if not an equivalence)8421if ( conv !== true ) {84228423// Unless errors are allowed to bubble, catch and return them8424if ( conv && s[ "throws" ] ) {8425response = conv( response );8426} else {8427try {8428response = conv( response );8429} catch ( e ) {8430return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };8431}8432}8433}8434}8435}8436}84378438return { state: "success", data: response };8439}8440// Install script dataType8441jQuery.ajaxSetup({8442accepts: {8443script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"8444},8445contents: {8446script: /(?:java|ecma)script/8447},8448converters: {8449"text script": function( text ) {8450jQuery.globalEval( text );8451return text;8452}8453}8454});84558456// Handle cache's special case and global8457jQuery.ajaxPrefilter( "script", function( s ) {8458if ( s.cache === undefined ) {8459s.cache = false;8460}8461if ( s.crossDomain ) {8462s.type = "GET";8463s.global = false;8464}8465});84668467// Bind script tag hack transport8468jQuery.ajaxTransport( "script", function(s) {84698470// This transport only deals with cross domain requests8471if ( s.crossDomain ) {84728473var script,8474head = document.head || jQuery("head")[0] || document.documentElement;84758476return {84778478send: function( _, callback ) {84798480script = document.createElement("script");84818482script.async = true;84838484if ( s.scriptCharset ) {8485script.charset = s.scriptCharset;8486}84878488script.src = s.url;84898490// Attach handlers for all browsers8491script.onload = script.onreadystatechange = function( _, isAbort ) {84928493if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {84948495// Handle memory leak in IE8496script.onload = script.onreadystatechange = null;84978498// Remove the script8499if ( script.parentNode ) {8500script.parentNode.removeChild( script );8501}85028503// Dereference the script8504script = null;85058506// Callback if not abort8507if ( !isAbort ) {8508callback( 200, "success" );8509}8510}8511};85128513// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending8514// Use native DOM manipulation to avoid our domManip AJAX trickery8515head.insertBefore( script, head.firstChild );8516},85178518abort: function() {8519if ( script ) {8520script.onload( undefined, true );8521}8522}8523};8524}8525});8526var oldCallbacks = [],8527rjsonp = /(=)\?(?=&|$)|\?\?/;85288529// Default jsonp settings8530jQuery.ajaxSetup({8531jsonp: "callback",8532jsonpCallback: function() {8533var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );8534this[ callback ] = true;8535return callback;8536}8537});85388539// Detect, normalize options and install callbacks for jsonp requests8540jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {85418542var callbackName, overwritten, responseContainer,8543jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?8544"url" :8545typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"8546);85478548// Handle iff the expected data type is "jsonp" or we have a parameter to set8549if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {85508551// Get callback name, remembering preexisting value associated with it8552callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?8553s.jsonpCallback() :8554s.jsonpCallback;85558556// Insert callback into url or form data8557if ( jsonProp ) {8558s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );8559} else if ( s.jsonp !== false ) {8560s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;8561}85628563// Use data converter to retrieve json after script execution8564s.converters["script json"] = function() {8565if ( !responseContainer ) {8566jQuery.error( callbackName + " was not called" );8567}8568return responseContainer[ 0 ];8569};85708571// force json dataType8572s.dataTypes[ 0 ] = "json";85738574// Install callback8575overwritten = window[ callbackName ];8576window[ callbackName ] = function() {8577responseContainer = arguments;8578};85798580// Clean-up function (fires after converters)8581jqXHR.always(function() {8582// Restore preexisting value8583window[ callbackName ] = overwritten;85848585// Save back as free8586if ( s[ callbackName ] ) {8587// make sure that re-using the options doesn't screw things around8588s.jsonpCallback = originalSettings.jsonpCallback;85898590// save the callback name for future use8591oldCallbacks.push( callbackName );8592}85938594// Call if it was a function and we have a response8595if ( responseContainer && jQuery.isFunction( overwritten ) ) {8596overwritten( responseContainer[ 0 ] );8597}85988599responseContainer = overwritten = undefined;8600});86018602// Delegate to script8603return "script";8604}8605});8606var xhrCallbacks, xhrSupported,8607xhrId = 0,8608// #5280: Internet Explorer will keep connections alive if we don't abort on unload8609xhrOnUnloadAbort = window.ActiveXObject && function() {8610// Abort all pending requests8611var key;8612for ( key in xhrCallbacks ) {8613xhrCallbacks[ key ]( undefined, true );8614}8615};86168617// Functions to create xhrs8618function createStandardXHR() {8619try {8620return new window.XMLHttpRequest();8621} catch( e ) {}8622}86238624function createActiveXHR() {8625try {8626return new window.ActiveXObject("Microsoft.XMLHTTP");8627} catch( e ) {}8628}86298630// Create the request object8631// (This is still attached to ajaxSettings for backward compatibility)8632jQuery.ajaxSettings.xhr = window.ActiveXObject ?8633/* Microsoft failed to properly8634* implement the XMLHttpRequest in IE7 (can't request local files),8635* so we use the ActiveXObject when it is available8636* Additionally XMLHttpRequest can be disabled in IE7/IE8 so8637* we need a fallback.8638*/8639function() {8640return !this.isLocal && createStandardXHR() || createActiveXHR();8641} :8642// For all other browsers, use the standard XMLHttpRequest object8643createStandardXHR;86448645// Determine support properties8646xhrSupported = jQuery.ajaxSettings.xhr();8647jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );8648xhrSupported = jQuery.support.ajax = !!xhrSupported;86498650// Create transport if the browser can provide an xhr8651if ( xhrSupported ) {86528653jQuery.ajaxTransport(function( s ) {8654// Cross domain only allowed if supported through XMLHttpRequest8655if ( !s.crossDomain || jQuery.support.cors ) {86568657var callback;86588659return {8660send: function( headers, complete ) {86618662// Get a new xhr8663var handle, i,8664xhr = s.xhr();86658666// Open the socket8667// Passing null username, generates a login popup on Opera (#2865)8668if ( s.username ) {8669xhr.open( s.type, s.url, s.async, s.username, s.password );8670} else {8671xhr.open( s.type, s.url, s.async );8672}86738674// Apply custom fields if provided8675if ( s.xhrFields ) {8676for ( i in s.xhrFields ) {8677xhr[ i ] = s.xhrFields[ i ];8678}8679}86808681// Override mime type if needed8682if ( s.mimeType && xhr.overrideMimeType ) {8683xhr.overrideMimeType( s.mimeType );8684}86858686// X-Requested-With header8687// For cross-domain requests, seeing as conditions for a preflight are8688// akin to a jigsaw puzzle, we simply never set it to be sure.8689// (it can always be set on a per-request basis or even using ajaxSetup)8690// For same-domain requests, won't change header if already provided.8691if ( !s.crossDomain && !headers["X-Requested-With"] ) {8692headers["X-Requested-With"] = "XMLHttpRequest";8693}86948695// Need an extra try/catch for cross domain requests in Firefox 38696try {8697for ( i in headers ) {8698xhr.setRequestHeader( i, headers[ i ] );8699}8700} catch( err ) {}87018702// Do send the request8703// This may raise an exception which is actually8704// handled in jQuery.ajax (so no try/catch here)8705xhr.send( ( s.hasContent && s.data ) || null );87068707// Listener8708callback = function( _, isAbort ) {8709var status, responseHeaders, statusText, responses;87108711// Firefox throws exceptions when accessing properties8712// of an xhr when a network error occurred8713// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)8714try {87158716// Was never called and is aborted or complete8717if ( callback && ( isAbort || xhr.readyState === 4 ) ) {87188719// Only called once8720callback = undefined;87218722// Do not keep as active anymore8723if ( handle ) {8724xhr.onreadystatechange = jQuery.noop;8725if ( xhrOnUnloadAbort ) {8726delete xhrCallbacks[ handle ];8727}8728}87298730// If it's an abort8731if ( isAbort ) {8732// Abort it manually if needed8733if ( xhr.readyState !== 4 ) {8734xhr.abort();8735}8736} else {8737responses = {};8738status = xhr.status;8739responseHeaders = xhr.getAllResponseHeaders();87408741// When requesting binary data, IE6-9 will throw an exception8742// on any attempt to access responseText (#11426)8743if ( typeof xhr.responseText === "string" ) {8744responses.text = xhr.responseText;8745}87468747// Firefox throws an exception when accessing8748// statusText for faulty cross-domain requests8749try {8750statusText = xhr.statusText;8751} catch( e ) {8752// We normalize with Webkit giving an empty statusText8753statusText = "";8754}87558756// Filter status for non standard behaviors87578758// If the request is local and we have data: assume a success8759// (success with no data won't get notified, that's the best we8760// can do given current implementations)8761if ( !status && s.isLocal && !s.crossDomain ) {8762status = responses.text ? 200 : 404;8763// IE - #1450: sometimes returns 1223 when it should be 2048764} else if ( status === 1223 ) {8765status = 204;8766}8767}8768}8769} catch( firefoxAccessException ) {8770if ( !isAbort ) {8771complete( -1, firefoxAccessException );8772}8773}87748775// Call complete if needed8776if ( responses ) {8777complete( status, statusText, responses, responseHeaders );8778}8779};87808781if ( !s.async ) {8782// if we're in sync mode we fire the callback8783callback();8784} else if ( xhr.readyState === 4 ) {8785// (IE6 & IE7) if it's in cache and has been8786// retrieved directly we need to fire the callback8787setTimeout( callback );8788} else {8789handle = ++xhrId;8790if ( xhrOnUnloadAbort ) {8791// Create the active xhrs callbacks list if needed8792// and attach the unload handler8793if ( !xhrCallbacks ) {8794xhrCallbacks = {};8795jQuery( window ).unload( xhrOnUnloadAbort );8796}8797// Add to list of active xhrs callbacks8798xhrCallbacks[ handle ] = callback;8799}8800xhr.onreadystatechange = callback;8801}8802},88038804abort: function() {8805if ( callback ) {8806callback( undefined, true );8807}8808}8809};8810}8811});8812}8813var fxNow, timerId,8814rfxtypes = /^(?:toggle|show|hide)$/,8815rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),8816rrun = /queueHooks$/,8817animationPrefilters = [ defaultPrefilter ],8818tweeners = {8819"*": [function( prop, value ) {8820var tween = this.createTween( prop, value ),8821target = tween.cur(),8822parts = rfxnum.exec( value ),8823unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),88248825// Starting value computation is required for potential unit mismatches8826start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&8827rfxnum.exec( jQuery.css( tween.elem, prop ) ),8828scale = 1,8829maxIterations = 20;88308831if ( start && start[ 3 ] !== unit ) {8832// Trust units reported by jQuery.css8833unit = unit || start[ 3 ];88348835// Make sure we update the tween properties later on8836parts = parts || [];88378838// Iteratively approximate from a nonzero starting point8839start = +target || 1;88408841do {8842// If previous iteration zeroed out, double until we get *something*8843// Use a string for doubling factor so we don't accidentally see scale as unchanged below8844scale = scale || ".5";88458846// Adjust and apply8847start = start / scale;8848jQuery.style( tween.elem, prop, start + unit );88498850// Update scale, tolerating zero or NaN from tween.cur()8851// And breaking the loop if scale is unchanged or perfect, or if we've just had enough8852} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );8853}88548855// Update tween properties8856if ( parts ) {8857start = tween.start = +start || +target || 0;8858tween.unit = unit;8859// If a +=/-= token was provided, we're doing a relative animation8860tween.end = parts[ 1 ] ?8861start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :8862+parts[ 2 ];8863}88648865return tween;8866}]8867};88688869// Animations created synchronously will run synchronously8870function createFxNow() {8871setTimeout(function() {8872fxNow = undefined;8873});8874return ( fxNow = jQuery.now() );8875}88768877function createTween( value, prop, animation ) {8878var tween,8879collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),8880index = 0,8881length = collection.length;8882for ( ; index < length; index++ ) {8883if ( (tween = collection[ index ].call( animation, prop, value )) ) {88848885// we're done with this property8886return tween;8887}8888}8889}88908891function Animation( elem, properties, options ) {8892var result,8893stopped,8894index = 0,8895length = animationPrefilters.length,8896deferred = jQuery.Deferred().always( function() {8897// don't match elem in the :animated selector8898delete tick.elem;8899}),8900tick = function() {8901if ( stopped ) {8902return false;8903}8904var currentTime = fxNow || createFxNow(),8905remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),8906// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)8907temp = remaining / animation.duration || 0,8908percent = 1 - temp,8909index = 0,8910length = animation.tweens.length;89118912for ( ; index < length ; index++ ) {8913animation.tweens[ index ].run( percent );8914}89158916deferred.notifyWith( elem, [ animation, percent, remaining ]);89178918if ( percent < 1 && length ) {8919return remaining;8920} else {8921deferred.resolveWith( elem, [ animation ] );8922return false;8923}8924},8925animation = deferred.promise({8926elem: elem,8927props: jQuery.extend( {}, properties ),8928opts: jQuery.extend( true, { specialEasing: {} }, options ),8929originalProperties: properties,8930originalOptions: options,8931startTime: fxNow || createFxNow(),8932duration: options.duration,8933tweens: [],8934createTween: function( prop, end ) {8935var tween = jQuery.Tween( elem, animation.opts, prop, end,8936animation.opts.specialEasing[ prop ] || animation.opts.easing );8937animation.tweens.push( tween );8938return tween;8939},8940stop: function( gotoEnd ) {8941var index = 0,8942// if we are going to the end, we want to run all the tweens8943// otherwise we skip this part8944length = gotoEnd ? animation.tweens.length : 0;8945if ( stopped ) {8946return this;8947}8948stopped = true;8949for ( ; index < length ; index++ ) {8950animation.tweens[ index ].run( 1 );8951}89528953// resolve when we played the last frame8954// otherwise, reject8955if ( gotoEnd ) {8956deferred.resolveWith( elem, [ animation, gotoEnd ] );8957} else {8958deferred.rejectWith( elem, [ animation, gotoEnd ] );8959}8960return this;8961}8962}),8963props = animation.props;89648965propFilter( props, animation.opts.specialEasing );89668967for ( ; index < length ; index++ ) {8968result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );8969if ( result ) {8970return result;8971}8972}89738974jQuery.map( props, createTween, animation );89758976if ( jQuery.isFunction( animation.opts.start ) ) {8977animation.opts.start.call( elem, animation );8978}89798980jQuery.fx.timer(8981jQuery.extend( tick, {8982elem: elem,8983anim: animation,8984queue: animation.opts.queue8985})8986);89878988// attach callbacks from options8989return animation.progress( animation.opts.progress )8990.done( animation.opts.done, animation.opts.complete )8991.fail( animation.opts.fail )8992.always( animation.opts.always );8993}89948995function propFilter( props, specialEasing ) {8996var index, name, easing, value, hooks;89978998// camelCase, specialEasing and expand cssHook pass8999for ( index in props ) {9000name = jQuery.camelCase( index );9001easing = specialEasing[ name ];9002value = props[ index ];9003if ( jQuery.isArray( value ) ) {9004easing = value[ 1 ];9005value = props[ index ] = value[ 0 ];9006}90079008if ( index !== name ) {9009props[ name ] = value;9010delete props[ index ];9011}90129013hooks = jQuery.cssHooks[ name ];9014if ( hooks && "expand" in hooks ) {9015value = hooks.expand( value );9016delete props[ name ];90179018// not quite $.extend, this wont overwrite keys already present.9019// also - reusing 'index' from above because we have the correct "name"9020for ( index in value ) {9021if ( !( index in props ) ) {9022props[ index ] = value[ index ];9023specialEasing[ index ] = easing;9024}9025}9026} else {9027specialEasing[ name ] = easing;9028}9029}9030}90319032jQuery.Animation = jQuery.extend( Animation, {90339034tweener: function( props, callback ) {9035if ( jQuery.isFunction( props ) ) {9036callback = props;9037props = [ "*" ];9038} else {9039props = props.split(" ");9040}90419042var prop,9043index = 0,9044length = props.length;90459046for ( ; index < length ; index++ ) {9047prop = props[ index ];9048tweeners[ prop ] = tweeners[ prop ] || [];9049tweeners[ prop ].unshift( callback );9050}9051},90529053prefilter: function( callback, prepend ) {9054if ( prepend ) {9055animationPrefilters.unshift( callback );9056} else {9057animationPrefilters.push( callback );9058}9059}9060});90619062function defaultPrefilter( elem, props, opts ) {9063/* jshint validthis: true */9064var prop, value, toggle, tween, hooks, oldfire,9065anim = this,9066orig = {},9067style = elem.style,9068hidden = elem.nodeType && isHidden( elem ),9069dataShow = jQuery._data( elem, "fxshow" );90709071// handle queue: false promises9072if ( !opts.queue ) {9073hooks = jQuery._queueHooks( elem, "fx" );9074if ( hooks.unqueued == null ) {9075hooks.unqueued = 0;9076oldfire = hooks.empty.fire;9077hooks.empty.fire = function() {9078if ( !hooks.unqueued ) {9079oldfire();9080}9081};9082}9083hooks.unqueued++;90849085anim.always(function() {9086// doing this makes sure that the complete handler will be called9087// before this completes9088anim.always(function() {9089hooks.unqueued--;9090if ( !jQuery.queue( elem, "fx" ).length ) {9091hooks.empty.fire();9092}9093});9094});9095}90969097// height/width overflow pass9098if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {9099// Make sure that nothing sneaks out9100// Record all 3 overflow attributes because IE does not9101// change the overflow attribute when overflowX and9102// overflowY are set to the same value9103opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];91049105// Set display property to inline-block for height/width9106// animations on inline elements that are having width/height animated9107if ( jQuery.css( elem, "display" ) === "inline" &&9108jQuery.css( elem, "float" ) === "none" ) {91099110// inline-level elements accept inline-block;9111// block-level elements need to be inline with layout9112if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {9113style.display = "inline-block";91149115} else {9116style.zoom = 1;9117}9118}9119}91209121if ( opts.overflow ) {9122style.overflow = "hidden";9123if ( !jQuery.support.shrinkWrapBlocks ) {9124anim.always(function() {9125style.overflow = opts.overflow[ 0 ];9126style.overflowX = opts.overflow[ 1 ];9127style.overflowY = opts.overflow[ 2 ];9128});9129}9130}913191329133// show/hide pass9134for ( prop in props ) {9135value = props[ prop ];9136if ( rfxtypes.exec( value ) ) {9137delete props[ prop ];9138toggle = toggle || value === "toggle";9139if ( value === ( hidden ? "hide" : "show" ) ) {9140continue;9141}9142orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );9143}9144}91459146if ( !jQuery.isEmptyObject( orig ) ) {9147if ( dataShow ) {9148if ( "hidden" in dataShow ) {9149hidden = dataShow.hidden;9150}9151} else {9152dataShow = jQuery._data( elem, "fxshow", {} );9153}91549155// store state if its toggle - enables .stop().toggle() to "reverse"9156if ( toggle ) {9157dataShow.hidden = !hidden;9158}9159if ( hidden ) {9160jQuery( elem ).show();9161} else {9162anim.done(function() {9163jQuery( elem ).hide();9164});9165}9166anim.done(function() {9167var prop;9168jQuery._removeData( elem, "fxshow" );9169for ( prop in orig ) {9170jQuery.style( elem, prop, orig[ prop ] );9171}9172});9173for ( prop in orig ) {9174tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );91759176if ( !( prop in dataShow ) ) {9177dataShow[ prop ] = tween.start;9178if ( hidden ) {9179tween.end = tween.start;9180tween.start = prop === "width" || prop === "height" ? 1 : 0;9181}9182}9183}9184}9185}91869187function Tween( elem, options, prop, end, easing ) {9188return new Tween.prototype.init( elem, options, prop, end, easing );9189}9190jQuery.Tween = Tween;91919192Tween.prototype = {9193constructor: Tween,9194init: function( elem, options, prop, end, easing, unit ) {9195this.elem = elem;9196this.prop = prop;9197this.easing = easing || "swing";9198this.options = options;9199this.start = this.now = this.cur();9200this.end = end;9201this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );9202},9203cur: function() {9204var hooks = Tween.propHooks[ this.prop ];92059206return hooks && hooks.get ?9207hooks.get( this ) :9208Tween.propHooks._default.get( this );9209},9210run: function( percent ) {9211var eased,9212hooks = Tween.propHooks[ this.prop ];92139214if ( this.options.duration ) {9215this.pos = eased = jQuery.easing[ this.easing ](9216percent, this.options.duration * percent, 0, 1, this.options.duration9217);9218} else {9219this.pos = eased = percent;9220}9221this.now = ( this.end - this.start ) * eased + this.start;92229223if ( this.options.step ) {9224this.options.step.call( this.elem, this.now, this );9225}92269227if ( hooks && hooks.set ) {9228hooks.set( this );9229} else {9230Tween.propHooks._default.set( this );9231}9232return this;9233}9234};92359236Tween.prototype.init.prototype = Tween.prototype;92379238Tween.propHooks = {9239_default: {9240get: function( tween ) {9241var result;92429243if ( tween.elem[ tween.prop ] != null &&9244(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {9245return tween.elem[ tween.prop ];9246}92479248// passing an empty string as a 3rd parameter to .css will automatically9249// attempt a parseFloat and fallback to a string if the parse fails9250// so, simple values such as "10px" are parsed to Float.9251// complex values such as "rotate(1rad)" are returned as is.9252result = jQuery.css( tween.elem, tween.prop, "" );9253// Empty strings, null, undefined and "auto" are converted to 0.9254return !result || result === "auto" ? 0 : result;9255},9256set: function( tween ) {9257// use step hook for back compat - use cssHook if its there - use .style if its9258// available and use plain properties where available9259if ( jQuery.fx.step[ tween.prop ] ) {9260jQuery.fx.step[ tween.prop ]( tween );9261} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {9262jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );9263} else {9264tween.elem[ tween.prop ] = tween.now;9265}9266}9267}9268};92699270// Support: IE <=99271// Panic based approach to setting things on disconnected nodes92729273Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {9274set: function( tween ) {9275if ( tween.elem.nodeType && tween.elem.parentNode ) {9276tween.elem[ tween.prop ] = tween.now;9277}9278}9279};92809281jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {9282var cssFn = jQuery.fn[ name ];9283jQuery.fn[ name ] = function( speed, easing, callback ) {9284return speed == null || typeof speed === "boolean" ?9285cssFn.apply( this, arguments ) :9286this.animate( genFx( name, true ), speed, easing, callback );9287};9288});92899290jQuery.fn.extend({9291fadeTo: function( speed, to, easing, callback ) {92929293// show any hidden elements after setting opacity to 09294return this.filter( isHidden ).css( "opacity", 0 ).show()92959296// animate to the value specified9297.end().animate({ opacity: to }, speed, easing, callback );9298},9299animate: function( prop, speed, easing, callback ) {9300var empty = jQuery.isEmptyObject( prop ),9301optall = jQuery.speed( speed, easing, callback ),9302doAnimation = function() {9303// Operate on a copy of prop so per-property easing won't be lost9304var anim = Animation( this, jQuery.extend( {}, prop ), optall );93059306// Empty animations, or finishing resolves immediately9307if ( empty || jQuery._data( this, "finish" ) ) {9308anim.stop( true );9309}9310};9311doAnimation.finish = doAnimation;93129313return empty || optall.queue === false ?9314this.each( doAnimation ) :9315this.queue( optall.queue, doAnimation );9316},9317stop: function( type, clearQueue, gotoEnd ) {9318var stopQueue = function( hooks ) {9319var stop = hooks.stop;9320delete hooks.stop;9321stop( gotoEnd );9322};93239324if ( typeof type !== "string" ) {9325gotoEnd = clearQueue;9326clearQueue = type;9327type = undefined;9328}9329if ( clearQueue && type !== false ) {9330this.queue( type || "fx", [] );9331}93329333return this.each(function() {9334var dequeue = true,9335index = type != null && type + "queueHooks",9336timers = jQuery.timers,9337data = jQuery._data( this );93389339if ( index ) {9340if ( data[ index ] && data[ index ].stop ) {9341stopQueue( data[ index ] );9342}9343} else {9344for ( index in data ) {9345if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {9346stopQueue( data[ index ] );9347}9348}9349}93509351for ( index = timers.length; index--; ) {9352if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {9353timers[ index ].anim.stop( gotoEnd );9354dequeue = false;9355timers.splice( index, 1 );9356}9357}93589359// start the next in the queue if the last step wasn't forced9360// timers currently will call their complete callbacks, which will dequeue9361// but only if they were gotoEnd9362if ( dequeue || !gotoEnd ) {9363jQuery.dequeue( this, type );9364}9365});9366},9367finish: function( type ) {9368if ( type !== false ) {9369type = type || "fx";9370}9371return this.each(function() {9372var index,9373data = jQuery._data( this ),9374queue = data[ type + "queue" ],9375hooks = data[ type + "queueHooks" ],9376timers = jQuery.timers,9377length = queue ? queue.length : 0;93789379// enable finishing flag on private data9380data.finish = true;93819382// empty the queue first9383jQuery.queue( this, type, [] );93849385if ( hooks && hooks.stop ) {9386hooks.stop.call( this, true );9387}93889389// look for any active animations, and finish them9390for ( index = timers.length; index--; ) {9391if ( timers[ index ].elem === this && timers[ index ].queue === type ) {9392timers[ index ].anim.stop( true );9393timers.splice( index, 1 );9394}9395}93969397// look for any animations in the old queue and finish them9398for ( index = 0; index < length; index++ ) {9399if ( queue[ index ] && queue[ index ].finish ) {9400queue[ index ].finish.call( this );9401}9402}94039404// turn off finishing flag9405delete data.finish;9406});9407}9408});94099410// Generate parameters to create a standard animation9411function genFx( type, includeWidth ) {9412var which,9413attrs = { height: type },9414i = 0;94159416// if we include width, step value is 1 to do all cssExpand values,9417// if we don't include width, step value is 2 to skip over Left and Right9418includeWidth = includeWidth? 1 : 0;9419for( ; i < 4 ; i += 2 - includeWidth ) {9420which = cssExpand[ i ];9421attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;9422}94239424if ( includeWidth ) {9425attrs.opacity = attrs.width = type;9426}94279428return attrs;9429}94309431// Generate shortcuts for custom animations9432jQuery.each({9433slideDown: genFx("show"),9434slideUp: genFx("hide"),9435slideToggle: genFx("toggle"),9436fadeIn: { opacity: "show" },9437fadeOut: { opacity: "hide" },9438fadeToggle: { opacity: "toggle" }9439}, function( name, props ) {9440jQuery.fn[ name ] = function( speed, easing, callback ) {9441return this.animate( props, speed, easing, callback );9442};9443});94449445jQuery.speed = function( speed, easing, fn ) {9446var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {9447complete: fn || !fn && easing ||9448jQuery.isFunction( speed ) && speed,9449duration: speed,9450easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing9451};94529453opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :9454opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;94559456// normalize opt.queue - true/undefined/null -> "fx"9457if ( opt.queue == null || opt.queue === true ) {9458opt.queue = "fx";9459}94609461// Queueing9462opt.old = opt.complete;94639464opt.complete = function() {9465if ( jQuery.isFunction( opt.old ) ) {9466opt.old.call( this );9467}94689469if ( opt.queue ) {9470jQuery.dequeue( this, opt.queue );9471}9472};94739474return opt;9475};94769477jQuery.easing = {9478linear: function( p ) {9479return p;9480},9481swing: function( p ) {9482return 0.5 - Math.cos( p*Math.PI ) / 2;9483}9484};94859486jQuery.timers = [];9487jQuery.fx = Tween.prototype.init;9488jQuery.fx.tick = function() {9489var timer,9490timers = jQuery.timers,9491i = 0;94929493fxNow = jQuery.now();94949495for ( ; i < timers.length; i++ ) {9496timer = timers[ i ];9497// Checks the timer has not already been removed9498if ( !timer() && timers[ i ] === timer ) {9499timers.splice( i--, 1 );9500}9501}95029503if ( !timers.length ) {9504jQuery.fx.stop();9505}9506fxNow = undefined;9507};95089509jQuery.fx.timer = function( timer ) {9510if ( timer() && jQuery.timers.push( timer ) ) {9511jQuery.fx.start();9512}9513};95149515jQuery.fx.interval = 13;95169517jQuery.fx.start = function() {9518if ( !timerId ) {9519timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );9520}9521};95229523jQuery.fx.stop = function() {9524clearInterval( timerId );9525timerId = null;9526};95279528jQuery.fx.speeds = {9529slow: 600,9530fast: 200,9531// Default speed9532_default: 4009533};95349535// Back Compat <1.8 extension point9536jQuery.fx.step = {};95379538if ( jQuery.expr && jQuery.expr.filters ) {9539jQuery.expr.filters.animated = function( elem ) {9540return jQuery.grep(jQuery.timers, function( fn ) {9541return elem === fn.elem;9542}).length;9543};9544}9545jQuery.fn.offset = function( options ) {9546if ( arguments.length ) {9547return options === undefined ?9548this :9549this.each(function( i ) {9550jQuery.offset.setOffset( this, options, i );9551});9552}95539554var docElem, win,9555box = { top: 0, left: 0 },9556elem = this[ 0 ],9557doc = elem && elem.ownerDocument;95589559if ( !doc ) {9560return;9561}95629563docElem = doc.documentElement;95649565// Make sure it's not a disconnected DOM node9566if ( !jQuery.contains( docElem, elem ) ) {9567return box;9568}95699570// If we don't have gBCR, just use 0,0 rather than error9571// BlackBerry 5, iOS 3 (original iPhone)9572if ( typeof elem.getBoundingClientRect !== core_strundefined ) {9573box = elem.getBoundingClientRect();9574}9575win = getWindow( doc );9576return {9577top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),9578left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )9579};9580};95819582jQuery.offset = {95839584setOffset: function( elem, options, i ) {9585var position = jQuery.css( elem, "position" );95869587// set position first, in-case top/left are set even on static elem9588if ( position === "static" ) {9589elem.style.position = "relative";9590}95919592var curElem = jQuery( elem ),9593curOffset = curElem.offset(),9594curCSSTop = jQuery.css( elem, "top" ),9595curCSSLeft = jQuery.css( elem, "left" ),9596calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,9597props = {}, curPosition = {}, curTop, curLeft;95989599// need to be able to calculate position if either top or left is auto and position is either absolute or fixed9600if ( calculatePosition ) {9601curPosition = curElem.position();9602curTop = curPosition.top;9603curLeft = curPosition.left;9604} else {9605curTop = parseFloat( curCSSTop ) || 0;9606curLeft = parseFloat( curCSSLeft ) || 0;9607}96089609if ( jQuery.isFunction( options ) ) {9610options = options.call( elem, i, curOffset );9611}96129613if ( options.top != null ) {9614props.top = ( options.top - curOffset.top ) + curTop;9615}9616if ( options.left != null ) {9617props.left = ( options.left - curOffset.left ) + curLeft;9618}96199620if ( "using" in options ) {9621options.using.call( elem, props );9622} else {9623curElem.css( props );9624}9625}9626};962796289629jQuery.fn.extend({96309631position: function() {9632if ( !this[ 0 ] ) {9633return;9634}96359636var offsetParent, offset,9637parentOffset = { top: 0, left: 0 },9638elem = this[ 0 ];96399640// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent9641if ( jQuery.css( elem, "position" ) === "fixed" ) {9642// we assume that getBoundingClientRect is available when computed position is fixed9643offset = elem.getBoundingClientRect();9644} else {9645// Get *real* offsetParent9646offsetParent = this.offsetParent();96479648// Get correct offsets9649offset = this.offset();9650if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {9651parentOffset = offsetParent.offset();9652}96539654// Add offsetParent borders9655parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );9656parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );9657}96589659// Subtract parent offsets and element margins9660// note: when an element has margin: auto the offsetLeft and marginLeft9661// are the same in Safari causing offset.left to incorrectly be 09662return {9663top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),9664left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)9665};9666},96679668offsetParent: function() {9669return this.map(function() {9670var offsetParent = this.offsetParent || docElem;9671while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {9672offsetParent = offsetParent.offsetParent;9673}9674return offsetParent || docElem;9675});9676}9677});967896799680// Create scrollLeft and scrollTop methods9681jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {9682var top = /Y/.test( prop );96839684jQuery.fn[ method ] = function( val ) {9685return jQuery.access( this, function( elem, method, val ) {9686var win = getWindow( elem );96879688if ( val === undefined ) {9689return win ? (prop in win) ? win[ prop ] :9690win.document.documentElement[ method ] :9691elem[ method ];9692}96939694if ( win ) {9695win.scrollTo(9696!top ? val : jQuery( win ).scrollLeft(),9697top ? val : jQuery( win ).scrollTop()9698);96999700} else {9701elem[ method ] = val;9702}9703}, method, val, arguments.length, null );9704};9705});97069707function getWindow( elem ) {9708return jQuery.isWindow( elem ) ?9709elem :9710elem.nodeType === 9 ?9711elem.defaultView || elem.parentWindow :9712false;9713}9714// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods9715jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {9716jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {9717// margin is only for outerHeight, outerWidth9718jQuery.fn[ funcName ] = function( margin, value ) {9719var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),9720extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );97219722return jQuery.access( this, function( elem, type, value ) {9723var doc;97249725if ( jQuery.isWindow( elem ) ) {9726// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there9727// isn't a whole lot we can do. See pull request at this URL for discussion:9728// https://github.com/jquery/jquery/pull/7649729return elem.document.documentElement[ "client" + name ];9730}97319732// Get document width or height9733if ( elem.nodeType === 9 ) {9734doc = elem.documentElement;97359736// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest9737// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.9738return Math.max(9739elem.body[ "scroll" + name ], doc[ "scroll" + name ],9740elem.body[ "offset" + name ], doc[ "offset" + name ],9741doc[ "client" + name ]9742);9743}97449745return value === undefined ?9746// Get width or height on the element, requesting but not forcing parseFloat9747jQuery.css( elem, type, extra ) :97489749// Set width or height on the element9750jQuery.style( elem, type, value, extra );9751}, type, chainable ? margin : undefined, chainable, null );9752};9753});9754});9755// Limit scope pollution from any deprecated API9756// (function() {97579758// The number of elements contained in the matched element set9759jQuery.fn.size = function() {9760return this.length;9761};97629763jQuery.fn.andSelf = jQuery.fn.addBack;97649765// })();9766if ( typeof module === "object" && module && typeof module.exports === "object" ) {9767// Expose jQuery as module.exports in loaders that implement the Node9768// module pattern (including browserify). Do not create the global, since9769// the user will be storing it themselves locally, and globals are frowned9770// upon in the Node module world.9771module.exports = jQuery;9772} else {9773// Otherwise expose jQuery to the global object as usual9774window.jQuery = window.$ = jQuery;97759776// Register as a named AMD module, since jQuery can be concatenated with other9777// files that may use define, but not via a proper concatenation script that9778// understands anonymous AMD modules. A named AMD is safest and most robust9779// way to register. Lowercase jquery is used because AMD module names are9780// derived from file names, and jQuery is normally delivered in a lowercase9781// file name. Do this after creating the global so that if an AMD module wants9782// to call noConflict to hide this version of jQuery, it will work.9783if ( typeof define === "function" && define.amd ) {9784define( "jquery", [], function () { return jQuery; } );9785}9786}97879788})( window );978997909791