Changeset 22176
- Timestamp:
- Apr 12, 2013, 9:59:09 PM (12 years ago)
- Location:
- trunk/themes/default/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/jquery.js
r19682 r22176 1 1 /*! 2 * jQuery JavaScript Library v1. 8.32 * jQuery JavaScript Library v1.9.1 3 3 * http://jquery.com/ 4 4 * … … 6 6 * http://sizzlejs.com/ 7 7 * 8 * Copyright 20 12 jQuery Foundationand other contributors8 * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors 9 9 * Released under the MIT license 10 10 * http://jquery.org/license 11 11 * 12 * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)12 * Date: 2013-2-4 13 13 */ 14 14 (function( window, undefined ) { 15 16 // Can't do this because several apps including ASP.NET trace 17 // the stack via arguments.caller.callee and Firefox dies if 18 // you try to trace through "use strict" call chains. (#13335) 19 // Support: Firefox 18+ 20 //"use strict"; 15 21 var 22 // The deferred used on DOM ready 23 readyList, 24 16 25 // A central reference to the root jQuery(document) 17 26 rootjQuery, 18 27 19 // The deferred used on DOM ready 20 readyList, 28 // Support: IE<9 29 // For `typeof node.method` instead of `node.method !== undefined` 30 core_strundefined = typeof undefined, 21 31 22 32 // Use the correct document accordingly with window argument (sandbox) 23 33 document = window.document, 24 34 location = window.location, 25 navigator = window.navigator,26 35 27 36 // Map over jQuery in case of overwrite … … 31 40 _$ = window.$, 32 41 42 // [[Class]] -> type pairs 43 class2type = {}, 44 45 // List of deleted data cache ids, so we can reuse them 46 core_deletedIds = [], 47 48 core_version = "1.9.1", 49 33 50 // Save a reference to some core methods 34 core_push = Array.prototype.push, 35 core_slice = Array.prototype.slice, 36 core_indexOf = Array.prototype.indexOf, 37 core_toString = Object.prototype.toString, 38 core_hasOwn = Object.prototype.hasOwnProperty, 39 core_trim = String.prototype.trim, 51 core_concat = core_deletedIds.concat, 52 core_push = core_deletedIds.push, 53 core_slice = core_deletedIds.slice, 54 core_indexOf = core_deletedIds.indexOf, 55 core_toString = class2type.toString, 56 core_hasOwn = class2type.hasOwnProperty, 57 core_trim = core_version.trim, 40 58 41 59 // Define a local copy of jQuery … … 46 64 47 65 // Used for matching numbers 48 core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, 49 50 // Used for detecting and trimming whitespace 51 core_rnotwhite = /\S/, 52 core_rspace = /\s+/, 66 core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, 67 68 // Used for splitting on whitespace 69 core_rnotwhite = /\S+/g, 53 70 54 71 // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) … … 57 74 // A simple way to check for HTML strings 58 75 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 59 rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, 76 // Strict HTML recognition (#11290: must start with <) 77 rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, 60 78 61 79 // Match a standalone tag … … 66 84 rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, 67 85 rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, 68 rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d \d*\.|)\d+(?:[eE][\-+]?\d+|)/g,86 rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, 69 87 70 88 // Matches dashed string for camelizing … … 74 92 // Used by jQuery.camelCase as callback to replace() 75 93 fcamelCase = function( all, letter ) { 76 return ( letter + "" ).toUpperCase(); 77 }, 78 79 // The ready event handler and self cleanup method 80 DOMContentLoaded = function() { 94 return letter.toUpperCase(); 95 }, 96 97 // The ready event handler 98 completed = function( event ) { 99 100 // readyState === "complete" is good enough for us to call the dom ready in oldIE 101 if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { 102 detach(); 103 jQuery.ready(); 104 } 105 }, 106 // Clean-up method for dom ready events 107 detach = function() { 81 108 if ( document.addEventListener ) { 82 document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); 83 jQuery.ready(); 84 } else if ( document.readyState === "complete" ) { 85 // we're here because readyState === "complete" in oldIE 86 // which is good enough for us to call the dom ready! 87 document.detachEvent( "onreadystatechange", DOMContentLoaded ); 88 jQuery.ready(); 89 } 90 }, 91 92 // [[Class]] -> type pairs 93 class2type = {}; 109 document.removeEventListener( "DOMContentLoaded", completed, false ); 110 window.removeEventListener( "load", completed, false ); 111 112 } else { 113 document.detachEvent( "onreadystatechange", completed ); 114 window.detachEvent( "onload", completed ); 115 } 116 }; 94 117 95 118 jQuery.fn = jQuery.prototype = { 119 // The current version of jQuery being used 120 jquery: core_version, 121 96 122 constructor: jQuery, 97 123 init: function( selector, context, rootjQuery ) { 98 var match, elem , ret, doc;99 100 // H andle$(""), $(null), $(undefined), $(false)124 var match, elem; 125 126 // HANDLE: $(""), $(null), $(undefined), $(false) 101 127 if ( !selector ) { 102 return this;103 }104 105 // Handle $(DOMElement)106 if ( selector.nodeType ) {107 this.context = this[0] = selector;108 this.length = 1;109 128 return this; 110 129 } … … 126 145 if ( match[1] ) { 127 146 context = context instanceof jQuery ? context[0] : context; 128 doc = ( context && context.nodeType ? context.ownerDocument || context : document );129 147 130 148 // scripts is true for back-compat 131 selector = jQuery.parseHTML( match[1], doc, true ); 149 jQuery.merge( this, jQuery.parseHTML( 150 match[1], 151 context && context.nodeType ? context.ownerDocument || context : document, 152 true 153 ) ); 154 155 // HANDLE: $(html, props) 132 156 if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { 133 this.attr.call( selector, context, true ); 157 for ( match in context ) { 158 // Properties of context are called as methods if possible 159 if ( jQuery.isFunction( this[ match ] ) ) { 160 this[ match ]( context[ match ] ); 161 162 // ...and otherwise set as attributes 163 } else { 164 this.attr( match, context[ match ] ); 165 } 166 } 134 167 } 135 168 136 return jQuery.merge( this, selector );169 return this; 137 170 138 171 // HANDLE: $(#id) … … 169 202 } 170 203 204 // HANDLE: $(DOMElement) 205 } else if ( selector.nodeType ) { 206 this.context = this[0] = selector; 207 this.length = 1; 208 return this; 209 171 210 // HANDLE: $(function) 172 211 // Shortcut for document ready … … 186 225 selector: "", 187 226 188 // The current version of jQuery being used189 jquery: "1.8.3",190 191 227 // The default length of a jQuery object is 0 192 228 length: 0, … … 215 251 // Take an array of elements and push it onto the stack 216 252 // (returning the new matched element set) 217 pushStack: function( elems , name, selector) {253 pushStack: function( elems ) { 218 254 219 255 // Build a new jQuery matched element set … … 222 258 // Add the old object onto the stack (as a reference) 223 259 ret.prevObject = this; 224 225 260 ret.context = this.context; 226 227 if ( name === "find" ) {228 ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;229 } else if ( name ) {230 ret.selector = this.selector + "." + name + "(" + selector + ")";231 }232 261 233 262 // Return the newly-formed element set … … 249 278 }, 250 279 251 eq: function( i ) { 252 i = +i; 253 return i === -1 ? 254 this.slice( i ) : 255 this.slice( i, i + 1 ); 280 slice: function() { 281 return this.pushStack( core_slice.apply( this, arguments ) ); 256 282 }, 257 283 … … 264 290 }, 265 291 266 slice: function() { 267 return this.pushStack( core_slice.apply( this, arguments ), 268 "slice", core_slice.call(arguments).join(",") ); 292 eq: function( i ) { 293 var len = this.length, 294 j = +i + ( i < 0 ? len : 0 ); 295 return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); 269 296 }, 270 297 … … 290 317 291 318 jQuery.extend = jQuery.fn.extend = function() { 292 var options, name, src, copy, copyIsArray, clone,319 var src, copyIsArray, copy, name, options, clone, 293 320 target = arguments[0] || {}, 294 321 i = 1, … … 392 419 // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). 393 420 if ( !document.body ) { 394 return setTimeout( jQuery.ready , 1);421 return setTimeout( jQuery.ready ); 395 422 } 396 423 … … 432 459 433 460 type: function( obj ) { 434 return obj == null ? 435 String( obj ) : 436 class2type[ core_toString.call(obj) ] || "object"; 461 if ( obj == null ) { 462 return String( obj ); 463 } 464 return typeof obj === "object" || typeof obj === "function" ? 465 class2type[ core_toString.call(obj) ] || "object" : 466 typeof obj; 437 467 }, 438 468 … … 480 510 // data: string of html 481 511 // context (optional): If specified, the fragment will be created in this context, defaults to document 482 // scripts (optional): If true, will include scripts passed in the html string 483 parseHTML: function( data, context, scripts ) { 484 var parsed; 512 // keepScripts (optional): If true, will include scripts passed in the html string 513 parseHTML: function( data, context, keepScripts ) { 485 514 if ( !data || typeof data !== "string" ) { 486 515 return null; 487 516 } 488 517 if ( typeof context === "boolean" ) { 489 scripts = context;490 context = 0;518 keepScripts = context; 519 context = false; 491 520 } 492 521 context = context || document; 493 522 523 var parsed = rsingleTag.exec( data ), 524 scripts = !keepScripts && []; 525 494 526 // Single tag 495 if ( (parsed = rsingleTag.exec( data ))) {527 if ( parsed ) { 496 528 return [ context.createElement( parsed[1] ) ]; 497 529 } 498 530 499 parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); 500 return jQuery.merge( [], 501 (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); 531 parsed = jQuery.buildFragment( [ data ], context, scripts ); 532 if ( scripts ) { 533 jQuery( scripts ).remove(); 534 } 535 return jQuery.merge( [], parsed.childNodes ); 502 536 }, 503 537 504 538 parseJSON: function( data ) { 505 if ( !data || typeof data !== "string") {506 return null;507 }508 509 // Make sure leading/trailing whitespace is removed (IE can't handle it)510 data = jQuery.trim( data );511 512 539 // Attempt to parse using the native JSON parser first 513 540 if ( window.JSON && window.JSON.parse ) { … … 515 542 } 516 543 517 // Make sure the incoming data is actual JSON 518 // Logic borrowed from http://json.org/json2.js 519 if ( rvalidchars.test( data.replace( rvalidescape, "@" ) 520 .replace( rvalidtokens, "]" ) 521 .replace( rvalidbraces, "")) ) { 522 523 return ( new Function( "return " + data ) )(); 524 525 } 544 if ( data === null ) { 545 return data; 546 } 547 548 if ( typeof data === "string" ) { 549 550 // Make sure leading/trailing whitespace is removed (IE can't handle it) 551 data = jQuery.trim( data ); 552 553 if ( data ) { 554 // Make sure the incoming data is actual JSON 555 // Logic borrowed from http://json.org/json2.js 556 if ( rvalidchars.test( data.replace( rvalidescape, "@" ) 557 .replace( rvalidtokens, "]" ) 558 .replace( rvalidbraces, "")) ) { 559 560 return ( new Function( "return " + data ) )(); 561 } 562 } 563 } 564 526 565 jQuery.error( "Invalid JSON: " + data ); 527 566 }, … … 557 596 // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context 558 597 globalEval: function( data ) { 559 if ( data && core_rnotwhite.test( data ) ) {598 if ( data && jQuery.trim( data ) ) { 560 599 // We use execScript on Internet Explorer 561 600 // We use an anonymous function so that context is window … … 579 618 // args is for internal usage only 580 619 each: function( obj, callback, args ) { 581 var name,620 var value, 582 621 i = 0, 583 622 length = obj.length, 584 is Obj = length === undefined || jQuery.isFunction( obj );623 isArray = isArraylike( obj ); 585 624 586 625 if ( args ) { 587 if ( isObj ) { 588 for ( name in obj ) { 589 if ( callback.apply( obj[ name ], args ) === false ) { 626 if ( isArray ) { 627 for ( ; i < length; i++ ) { 628 value = callback.apply( obj[ i ], args ); 629 630 if ( value === false ) { 590 631 break; 591 632 } 592 633 } 593 634 } else { 594 for ( ; i < length; ) { 595 if ( callback.apply( obj[ i++ ], args ) === false ) { 635 for ( i in obj ) { 636 value = callback.apply( obj[ i ], args ); 637 638 if ( value === false ) { 596 639 break; 597 640 } … … 601 644 // A special, fast, case for the most common use of each 602 645 } else { 603 if ( isObj ) { 604 for ( name in obj ) { 605 if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { 646 if ( isArray ) { 647 for ( ; i < length; i++ ) { 648 value = callback.call( obj[ i ], i, obj[ i ] ); 649 650 if ( value === false ) { 606 651 break; 607 652 } 608 653 } 609 654 } else { 610 for ( ; i < length; ) { 611 if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { 655 for ( i in obj ) { 656 value = callback.call( obj[ i ], i, obj[ i ] ); 657 658 if ( value === false ) { 612 659 break; 613 660 } … … 636 683 // results is for internal usage only 637 684 makeArray: function( arr, results ) { 638 var type, 639 ret = results || []; 685 var ret = results || []; 640 686 641 687 if ( arr != null ) { 642 // The window, strings (and functions) also have 'length' 643 // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 644 type = jQuery.type( arr ); 645 646 if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { 688 if ( isArraylike( Object(arr) ) ) { 689 jQuery.merge( ret, 690 typeof arr === "string" ? 691 [ arr ] : arr 692 ); 693 } else { 647 694 core_push.call( ret, arr ); 648 } else {649 jQuery.merge( ret, arr );650 695 } 651 696 } … … 685 730 first[ i++ ] = second[ j ]; 686 731 } 687 688 732 } else { 689 733 while ( second[j] !== undefined ) { … … 718 762 // arg is for internal usage only 719 763 map: function( elems, callback, arg ) { 720 var value, key, 721 ret = [], 764 var value, 722 765 i = 0, 723 766 length = elems.length, 724 // jquery objects are treated as arrays725 isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) );767 isArray = isArraylike( elems ), 768 ret = []; 726 769 727 770 // Go through the array, translating each of the items to their … … 737 780 // Go through every key on the object, 738 781 } else { 739 for ( keyin elems ) {740 value = callback( elems[ key ], key, arg );782 for ( i in elems ) { 783 value = callback( elems[ i ], i, arg ); 741 784 742 785 if ( value != null ) { … … 747 790 748 791 // Flatten any nested arrays 749 return ret.concat.apply( [], ret );792 return core_concat.apply( [], ret ); 750 793 }, 751 794 … … 756 799 // arguments. 757 800 proxy: function( fn, context ) { 758 var tmp, args, proxy;801 var args, proxy, tmp; 759 802 760 803 if ( typeof context === "string" ) { … … 773 816 args = core_slice.call( arguments, 2 ); 774 817 proxy = function() { 775 return fn.apply( context , args.concat( core_slice.call( arguments ) ) );818 return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); 776 819 }; 777 820 … … 784 827 // Multifunctional method to get and set values of a collection 785 828 // The value/s can optionally be executed if it's a function 786 access: function( elems, fn, key, value, chainable, emptyGet, pass ) { 787 var exec, 788 bulk = key == null, 789 i = 0, 790 length = elems.length; 829 access: function( elems, fn, key, value, chainable, emptyGet, raw ) { 830 var i = 0, 831 length = elems.length, 832 bulk = key == null; 791 833 792 834 // Sets many values 793 if ( key && typeof key === "object" ) { 835 if ( jQuery.type( key ) === "object" ) { 836 chainable = true; 794 837 for ( i in key ) { 795 jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); 796 } 797 chainable = 1; 838 jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); 839 } 798 840 799 841 // Sets one value 800 842 } else if ( value !== undefined ) { 801 // Optionally, function values get executed if exec is true 802 exec = pass === undefined && jQuery.isFunction( value ); 843 chainable = true; 844 845 if ( !jQuery.isFunction( value ) ) { 846 raw = true; 847 } 803 848 804 849 if ( bulk ) { 805 // Bulk operations only iterate when executing function values 806 if ( exec ) { 807 exec = fn; 808 fn = function( elem, key, value ) { 809 return exec.call( jQuery( elem ), value ); 810 }; 811 812 // Otherwise they run against the entire set 813 } else { 850 // Bulk operations run against the entire set 851 if ( raw ) { 814 852 fn.call( elems, value ); 815 853 fn = null; 854 855 // ...except when executing function values 856 } else { 857 bulk = fn; 858 fn = function( elem, key, value ) { 859 return bulk.call( jQuery( elem ), value ); 860 }; 816 861 } 817 862 } 818 863 819 864 if ( fn ) { 820 for (; i < length; i++ ) { 821 fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); 822 } 823 } 824 825 chainable = 1; 865 for ( ; i < length; i++ ) { 866 fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); 867 } 868 } 826 869 } 827 870 … … 850 893 if ( document.readyState === "complete" ) { 851 894 // Handle it asynchronously to allow scripts the opportunity to delay ready 852 setTimeout( jQuery.ready , 1);895 setTimeout( jQuery.ready ); 853 896 854 897 // Standards-based browsers support DOMContentLoaded 855 898 } else if ( document.addEventListener ) { 856 899 // Use the handy event callback 857 document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );900 document.addEventListener( "DOMContentLoaded", completed, false ); 858 901 859 902 // A fallback to window.onload, that will always work 860 window.addEventListener( "load", jQuery.ready, false );903 window.addEventListener( "load", completed, false ); 861 904 862 905 // If IE event model is used 863 906 } else { 864 907 // Ensure firing before onload, maybe late but safe also for iframes 865 document.attachEvent( "onreadystatechange", DOMContentLoaded );908 document.attachEvent( "onreadystatechange", completed ); 866 909 867 910 // A fallback to window.onload, that will always work 868 window.attachEvent( "onload", jQuery.ready);911 window.attachEvent( "onload", completed ); 869 912 870 913 // If IE and not a frame … … 888 931 } 889 932 933 // detach all dom ready events 934 detach(); 935 890 936 // and execute any waiting functions 891 937 jQuery.ready(); … … 899 945 900 946 // Populate the class2type map 901 jQuery.each("Boolean Number String Function Array Date RegExp Object ".split(" "), function(i, name) {947 jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { 902 948 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 903 949 }); 950 951 function isArraylike( obj ) { 952 var length = obj.length, 953 type = jQuery.type( obj ); 954 955 if ( jQuery.isWindow( obj ) ) { 956 return false; 957 } 958 959 if ( obj.nodeType === 1 && length ) { 960 return true; 961 } 962 963 return type === "array" || type !== "function" && 964 ( length === 0 || 965 typeof length === "number" && length > 0 && ( length - 1 ) in obj ); 966 } 904 967 905 968 // All jQuery objects should point back to these … … 911 974 function createOptions( options ) { 912 975 var object = optionsCache[ options ] = {}; 913 jQuery.each( options. split( core_rspace ), function( _, flag ) {976 jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { 914 977 object[ flag ] = true; 915 978 }); … … 947 1010 jQuery.extend( {}, options ); 948 1011 949 var // Last fire value (for non-forgettable lists) 1012 var // Flag to know if list is currently firing 1013 firing, 1014 // Last fire value (for non-forgettable lists) 950 1015 memory, 951 1016 // Flag to know if list was already fired 952 1017 fired, 953 // Flag to know if list is currently firing954 firing,955 // First callback to fire (used internally by add and fireWith)956 firingStart,957 1018 // End of the loop when firing 958 1019 firingLength, 959 1020 // Index of currently firing callback (modified by remove if needed) 960 1021 firingIndex, 1022 // First callback to fire (used internally by add and fireWith) 1023 firingStart, 961 1024 // Actual callback list 962 1025 list = [], … … 1044 1107 return this; 1045 1108 }, 1046 // Control if a given callback is in the list 1109 // Check if a given callback is in the list. 1110 // If no argument is given, return whether or not list has callbacks attached. 1047 1111 has: function( fn ) { 1048 return jQuery.inArray( fn, list ) > -1;1112 return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); 1049 1113 }, 1050 1114 // Remove all callbacks from the list … … 1123 1187 jQuery.each( tuples, function( i, tuple ) { 1124 1188 var action = tuple[ 0 ], 1125 fn = fns[ i ];1189 fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; 1126 1190 // deferred[ done | fail | progress ] for forwarding actions to newDefer 1127 deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? 1128 function() { 1129 var returned = fn.apply( this, arguments ); 1130 if ( returned && jQuery.isFunction( returned.promise ) ) { 1131 returned.promise() 1132 .done( newDefer.resolve ) 1133 .fail( newDefer.reject ) 1134 .progress( newDefer.notify ); 1135 } else { 1136 newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); 1137 } 1138 } : 1139 newDefer[ action ] 1140 ); 1191 deferred[ tuple[1] ](function() { 1192 var returned = fn && fn.apply( this, arguments ); 1193 if ( returned && jQuery.isFunction( returned.promise ) ) { 1194 returned.promise() 1195 .done( newDefer.resolve ) 1196 .fail( newDefer.reject ) 1197 .progress( newDefer.notify ); 1198 } else { 1199 newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); 1200 } 1201 }); 1141 1202 }); 1142 1203 fns = null; … … 1172 1233 } 1173 1234 1174 // deferred[ resolve | reject | notify ] = list.fire 1175 deferred[ tuple[0] ] = list.fire; 1235 // deferred[ resolve | reject | notify ] 1236 deferred[ tuple[0] ] = function() { 1237 deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); 1238 return this; 1239 }; 1176 1240 deferred[ tuple[0] + "With" ] = list.fireWith; 1177 1241 }); … … 1243 1307 jQuery.support = (function() { 1244 1308 1245 var support, 1246 all, 1247 a, 1248 select, 1249 opt, 1250 input, 1251 fragment, 1252 eventName, 1253 i, 1254 isSupported, 1255 clickFn, 1309 var support, all, a, 1310 input, select, fragment, 1311 opt, eventName, isSupported, i, 1256 1312 div = document.createElement("div"); 1257 1313 … … 1274 1330 a.style.cssText = "top:1px;float:left;opacity:.5"; 1275 1331 support = { 1332 // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) 1333 getSetAttribute: div.className !== "t", 1334 1276 1335 // IE strips leading whitespace when .innerHTML is used 1277 leadingWhitespace: ( div.firstChild.nodeType === 3 ),1336 leadingWhitespace: div.firstChild.nodeType === 3, 1278 1337 1279 1338 // Make sure that tbody elements aren't automatically inserted … … 1291 1350 // Make sure that URLs aren't manipulated 1292 1351 // (IE normalizes it by default) 1293 hrefNormalized: ( a.getAttribute("href") === "/a" ),1352 hrefNormalized: a.getAttribute("href") === "/a", 1294 1353 1295 1354 // Make sure that element opacity exists … … 1302 1361 cssFloat: !!a.style.cssFloat, 1303 1362 1304 // Make sure that if no value is specified for a checkbox 1305 // that it defaults to "on". 1306 // (WebKit defaults to "" instead) 1307 checkOn: ( input.value === "on" ), 1363 // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) 1364 checkOn: !!input.value, 1308 1365 1309 1366 // Make sure that a selected-by-default option has a working selected property. … … 1311 1368 optSelected: opt.selected, 1312 1369 1313 // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)1314 getSetAttribute: div.className !== "t",1315 1316 1370 // Tests for enctype support on a form (#6743) 1317 1371 enctype: !!document.createElement("form").enctype, … … 1322 1376 1323 1377 // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode 1324 boxModel: ( document.compatMode === "CSS1Compat" ),1378 boxModel: document.compatMode === "CSS1Compat", 1325 1379 1326 1380 // Will be defined later 1327 submitBubbles: true,1328 changeBubbles: true,1329 focusinBubbles: false,1330 1381 deleteExpando: true, 1331 1382 noCloneEvent: true, … … 1346 1397 support.optDisabled = !opt.disabled; 1347 1398 1348 // Test to see if it's possible to delete an expando from an element 1349 // Fails in Internet Explorer 1399 // Support: IE<9 1350 1400 try { 1351 1401 delete div.test; … … 1354 1404 } 1355 1405 1356 if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { 1357 div.attachEvent( "onclick", clickFn = function() { 1358 // Cloning a node shouldn't copy over any 1359 // bound event handlers (IE does this) 1360 support.noCloneEvent = false; 1361 }); 1362 div.cloneNode( true ).fireEvent("onclick"); 1363 div.detachEvent( "onclick", clickFn ); 1364 } 1365 1366 // Check if a radio maintains its value 1367 // after being appended to the DOM 1406 // Check if we can trust getAttribute("value") 1368 1407 input = document.createElement("input"); 1408 input.setAttribute( "value", "" ); 1409 support.input = input.getAttribute( "value" ) === ""; 1410 1411 // Check if an input maintains its value after becoming a radio 1369 1412 input.value = "t"; 1370 1413 input.setAttribute( "type", "radio" ); 1371 1414 support.radioValue = input.value === "t"; 1372 1415 1373 input.setAttribute( "checked", "checked" );1374 1375 1416 // #11217 - WebKit loses check when the name is after the checked attribute 1417 input.setAttribute( "checked", "t" ); 1376 1418 input.setAttribute( "name", "t" ); 1377 1419 1378 div.appendChild( input );1379 1420 fragment = document.createDocumentFragment(); 1380 fragment.appendChild( div.lastChild ); 1381 1382 // WebKit doesn't clone checked state correctly in fragments 1383 support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; 1421 fragment.appendChild( input ); 1384 1422 1385 1423 // Check if a disconnected checkbox will retain its checked … … 1387 1425 support.appendChecked = input.checked; 1388 1426 1389 fragment.removeChild( input ); 1390 fragment.appendChild( div ); 1391 1392 // Technique from Juriy Zaytsev 1393 // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ 1394 // We only care about the case where non-standard event systems 1395 // are used, namely in IE. Short-circuiting here helps us to 1396 // avoid an eval call (in setAttribute) which can cause CSP 1397 // to go haywire. See: https://developer.mozilla.org/en/Security/CSP 1427 // WebKit doesn't clone checked state correctly in fragments 1428 support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; 1429 1430 // Support: IE<9 1431 // Opera does not clone events (and typeof div.attachEvent === undefined). 1432 // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() 1398 1433 if ( div.attachEvent ) { 1399 for ( i in { 1400 submit: true, 1401 change: true, 1402 focusin: true 1403 }) { 1404 eventName = "on" + i; 1405 isSupported = ( eventName in div ); 1406 if ( !isSupported ) { 1407 div.setAttribute( eventName, "return;" ); 1408 isSupported = ( typeof div[ eventName ] === "function" ); 1409 } 1410 support[ i + "Bubbles" ] = isSupported; 1411 } 1412 } 1434 div.attachEvent( "onclick", function() { 1435 support.noCloneEvent = false; 1436 }); 1437 1438 div.cloneNode( true ).click(); 1439 } 1440 1441 // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) 1442 // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php 1443 for ( i in { submit: true, change: true, focusin: true }) { 1444 div.setAttribute( eventName = "on" + i, "t" ); 1445 1446 support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; 1447 } 1448 1449 div.style.backgroundClip = "content-box"; 1450 div.cloneNode( true ).style.backgroundClip = ""; 1451 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 1413 1452 1414 1453 // Run tests that need a body at doc ready 1415 1454 jQuery(function() { 1416 var container, div, tds, marginDiv,1417 divReset = "padding:0;margin:0;border:0;display:block; overflow:hidden;",1455 var container, marginDiv, tds, 1456 divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", 1418 1457 body = document.getElementsByTagName("body")[0]; 1419 1458 … … 1424 1463 1425 1464 container = document.createElement("div"); 1426 container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; 1427 body.insertBefore( container, body.firstChild ); 1428 1429 // Construct the test element 1430 div = document.createElement("div"); 1431 container.appendChild( div ); 1432 1465 container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; 1466 1467 body.appendChild( container ).appendChild( div ); 1468 1469 // Support: IE8 1433 1470 // Check if table cells still have offsetWidth/Height when they are set 1434 1471 // to display:none and there are still other visible table cells in a … … 1437 1474 // display:none (it is still safe to use offsets if a parent element is 1438 1475 // hidden; don safety goggles and see bug #4512 for more information). 1439 // (only IE 8 fails this test)1440 1476 div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; 1441 1477 tds = div.getElementsByTagName("td"); … … 1446 1482 tds[ 1 ].style.display = "none"; 1447 1483 1484 // Support: IE8 1448 1485 // Check if empty table cells still have offsetWidth/Height 1449 // (IE <= 8 fail this test)1450 1486 support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); 1451 1487 … … 1456 1492 support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); 1457 1493 1458 // NOTE: To any future maintainer, we've window.getComputedStyle 1459 // because jsdom on node.js will break without it. 1494 // Use window.getComputedStyle because jsdom on node.js will break without it. 1460 1495 if ( window.getComputedStyle ) { 1461 1496 support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; … … 1463 1498 1464 1499 // Check if div with explicit width and no margin-right incorrectly 1465 // gets computed margin-right based on width of container. For more 1466 // info see bug #3333 1500 // gets computed margin-right based on width of container. (#3333) 1467 1501 // Fails in WebKit before Feb 2011 nightlies 1468 1502 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 1469 marginDiv = d ocument.createElement("div");1503 marginDiv = div.appendChild( document.createElement("div") ); 1470 1504 marginDiv.style.cssText = div.style.cssText = divReset; 1471 1505 marginDiv.style.marginRight = marginDiv.style.width = "0"; 1472 1506 div.style.width = "1px"; 1473 div.appendChild( marginDiv ); 1507 1474 1508 support.reliableMarginRight = 1475 1509 !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); 1476 1510 } 1477 1511 1478 if ( typeof div.style.zoom !== "undefined" ) { 1512 if ( typeof div.style.zoom !== core_strundefined ) { 1513 // Support: IE<8 1479 1514 // Check if natively block-level elements act like inline-block 1480 1515 // elements when setting their display to 'inline' and giving 1481 1516 // them layout 1482 // (IE < 8 does this)1483 1517 div.innerHTML = ""; 1484 1518 div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; 1485 1519 support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); 1486 1520 1521 // Support: IE6 1487 1522 // Check if elements with layout shrink-wrap their children 1488 // (IE 6 does this)1489 1523 div.style.display = "block"; 1490 div.style.overflow = "visible";1491 1524 div.innerHTML = "<div></div>"; 1492 1525 div.firstChild.style.width = "5px"; 1493 1526 support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); 1494 1527 1495 container.style.zoom = 1; 1496 } 1528 if ( support.inlineBlockNeedsLayout ) { 1529 // Prevent IE 6 from affecting layout for positioned elements #11048 1530 // Prevent IE from shrinking the body in IE 7 mode #12869 1531 // Support: IE<8 1532 body.style.zoom = 1; 1533 } 1534 } 1535 1536 body.removeChild( container ); 1497 1537 1498 1538 // Null elements to avoid leaks in IE 1499 body.removeChild( container );1500 1539 container = div = tds = marginDiv = null; 1501 1540 }); 1502 1541 1503 1542 // Null elements to avoid leaks in IE 1504 fragment.removeChild( div ); 1505 all = a = select = opt = input = fragment = div = null; 1543 all = select = fragment = opt = a = input = null; 1506 1544 1507 1545 return support; 1508 1546 })(); 1547 1509 1548 var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, 1510 1549 rmultiDash = /([A-Z])/g; 1511 1550 1551 function internalData( elem, name, data, pvt /* Internal Use Only */ ){ 1552 if ( !jQuery.acceptData( elem ) ) { 1553 return; 1554 } 1555 1556 var thisCache, ret, 1557 internalKey = jQuery.expando, 1558 getByName = typeof name === "string", 1559 1560 // We have to handle DOM nodes and JS objects differently because IE6-7 1561 // can't GC object references properly across the DOM-JS boundary 1562 isNode = elem.nodeType, 1563 1564 // Only DOM nodes need the global jQuery cache; JS object data is 1565 // attached directly to the object so GC can occur automatically 1566 cache = isNode ? jQuery.cache : elem, 1567 1568 // Only defining an ID for JS objects if its cache already exists allows 1569 // the code to shortcut on the same path as a DOM node with no cache 1570 id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; 1571 1572 // Avoid doing any more work than we need to when trying to get data on an 1573 // object that has no data at all 1574 if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { 1575 return; 1576 } 1577 1578 if ( !id ) { 1579 // Only DOM nodes need a new unique ID for each element since their data 1580 // ends up in the global cache 1581 if ( isNode ) { 1582 elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; 1583 } else { 1584 id = internalKey; 1585 } 1586 } 1587 1588 if ( !cache[ id ] ) { 1589 cache[ id ] = {}; 1590 1591 // Avoids exposing jQuery metadata on plain JS objects when the object 1592 // is serialized using JSON.stringify 1593 if ( !isNode ) { 1594 cache[ id ].toJSON = jQuery.noop; 1595 } 1596 } 1597 1598 // An object can be passed to jQuery.data instead of a key/value pair; this gets 1599 // shallow copied over onto the existing cache 1600 if ( typeof name === "object" || typeof name === "function" ) { 1601 if ( pvt ) { 1602 cache[ id ] = jQuery.extend( cache[ id ], name ); 1603 } else { 1604 cache[ id ].data = jQuery.extend( cache[ id ].data, name ); 1605 } 1606 } 1607 1608 thisCache = cache[ id ]; 1609 1610 // jQuery data() is stored in a separate object inside the object's internal data 1611 // cache in order to avoid key collisions between internal data and user-defined 1612 // data. 1613 if ( !pvt ) { 1614 if ( !thisCache.data ) { 1615 thisCache.data = {}; 1616 } 1617 1618 thisCache = thisCache.data; 1619 } 1620 1621 if ( data !== undefined ) { 1622 thisCache[ jQuery.camelCase( name ) ] = data; 1623 } 1624 1625 // Check for both converted-to-camel and non-converted data property names 1626 // If a data property was specified 1627 if ( getByName ) { 1628 1629 // First Try to find as-is property data 1630 ret = thisCache[ name ]; 1631 1632 // Test for null|undefined property data 1633 if ( ret == null ) { 1634 1635 // Try to find the camelCased property 1636 ret = thisCache[ jQuery.camelCase( name ) ]; 1637 } 1638 } else { 1639 ret = thisCache; 1640 } 1641 1642 return ret; 1643 } 1644 1645 function internalRemoveData( elem, name, pvt ) { 1646 if ( !jQuery.acceptData( elem ) ) { 1647 return; 1648 } 1649 1650 var i, l, thisCache, 1651 isNode = elem.nodeType, 1652 1653 // See jQuery.data for more information 1654 cache = isNode ? jQuery.cache : elem, 1655 id = isNode ? elem[ jQuery.expando ] : jQuery.expando; 1656 1657 // If there is already no cache entry for this object, there is no 1658 // purpose in continuing 1659 if ( !cache[ id ] ) { 1660 return; 1661 } 1662 1663 if ( name ) { 1664 1665 thisCache = pvt ? cache[ id ] : cache[ id ].data; 1666 1667 if ( thisCache ) { 1668 1669 // Support array or space separated string names for data keys 1670 if ( !jQuery.isArray( name ) ) { 1671 1672 // try the string as a key before any manipulation 1673 if ( name in thisCache ) { 1674 name = [ name ]; 1675 } else { 1676 1677 // split the camel cased version by spaces unless a key with the spaces exists 1678 name = jQuery.camelCase( name ); 1679 if ( name in thisCache ) { 1680 name = [ name ]; 1681 } else { 1682 name = name.split(" "); 1683 } 1684 } 1685 } else { 1686 // If "name" is an array of keys... 1687 // When data is initially created, via ("key", "val") signature, 1688 // keys will be converted to camelCase. 1689 // Since there is no way to tell _how_ a key was added, remove 1690 // both plain key and camelCase key. #12786 1691 // This will only penalize the array argument path. 1692 name = name.concat( jQuery.map( name, jQuery.camelCase ) ); 1693 } 1694 1695 for ( i = 0, l = name.length; i < l; i++ ) { 1696 delete thisCache[ name[i] ]; 1697 } 1698 1699 // If there is no data left in the cache, we want to continue 1700 // and let the cache object itself get destroyed 1701 if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { 1702 return; 1703 } 1704 } 1705 } 1706 1707 // See jQuery.data for more information 1708 if ( !pvt ) { 1709 delete cache[ id ].data; 1710 1711 // Don't destroy the parent cache unless the internal data object 1712 // had been the only thing left in it 1713 if ( !isEmptyDataObject( cache[ id ] ) ) { 1714 return; 1715 } 1716 } 1717 1718 // Destroy the cache 1719 if ( isNode ) { 1720 jQuery.cleanData( [ elem ], true ); 1721 1722 // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) 1723 } else if ( jQuery.support.deleteExpando || cache != cache.window ) { 1724 delete cache[ id ]; 1725 1726 // When all else fails, null 1727 } else { 1728 cache[ id ] = null; 1729 } 1730 } 1731 1512 1732 jQuery.extend({ 1513 1733 cache: {}, 1514 1734 1515 deletedIds: [],1516 1517 // Remove at next major release (1.9/2.0)1518 uuid: 0,1519 1520 1735 // Unique for each copy of jQuery on the page 1521 1736 // Non-digits removed to match rinlinejQuery 1522 expando: "jQuery" + ( jQuery.fn.jquery+ Math.random() ).replace( /\D/g, "" ),1737 expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), 1523 1738 1524 1739 // The following elements throw uncatchable exceptions if you … … 1536 1751 }, 1537 1752 1538 data: function( elem, name, data, pvt /* Internal Use Only */ ) { 1539 if ( !jQuery.acceptData( elem ) ) { 1540 return; 1541 } 1542 1543 var thisCache, ret, 1544 internalKey = jQuery.expando, 1545 getByName = typeof name === "string", 1546 1547 // We have to handle DOM nodes and JS objects differently because IE6-7 1548 // can't GC object references properly across the DOM-JS boundary 1549 isNode = elem.nodeType, 1550 1551 // Only DOM nodes need the global jQuery cache; JS object data is 1552 // attached directly to the object so GC can occur automatically 1553 cache = isNode ? jQuery.cache : elem, 1554 1555 // Only defining an ID for JS objects if its cache already exists allows 1556 // the code to shortcut on the same path as a DOM node with no cache 1557 id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; 1558 1559 // Avoid doing any more work than we need to when trying to get data on an 1560 // object that has no data at all 1561 if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { 1562 return; 1563 } 1564 1565 if ( !id ) { 1566 // Only DOM nodes need a new unique ID for each element since their data 1567 // ends up in the global cache 1568 if ( isNode ) { 1569 elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++; 1570 } else { 1571 id = internalKey; 1572 } 1573 } 1574 1575 if ( !cache[ id ] ) { 1576 cache[ id ] = {}; 1577 1578 // Avoids exposing jQuery metadata on plain JS objects when the object 1579 // is serialized using JSON.stringify 1580 if ( !isNode ) { 1581 cache[ id ].toJSON = jQuery.noop; 1582 } 1583 } 1584 1585 // An object can be passed to jQuery.data instead of a key/value pair; this gets 1586 // shallow copied over onto the existing cache 1587 if ( typeof name === "object" || typeof name === "function" ) { 1588 if ( pvt ) { 1589 cache[ id ] = jQuery.extend( cache[ id ], name ); 1590 } else { 1591 cache[ id ].data = jQuery.extend( cache[ id ].data, name ); 1592 } 1593 } 1594 1595 thisCache = cache[ id ]; 1596 1597 // jQuery data() is stored in a separate object inside the object's internal data 1598 // cache in order to avoid key collisions between internal data and user-defined 1599 // data. 1600 if ( !pvt ) { 1601 if ( !thisCache.data ) { 1602 thisCache.data = {}; 1603 } 1604 1605 thisCache = thisCache.data; 1606 } 1607 1608 if ( data !== undefined ) { 1609 thisCache[ jQuery.camelCase( name ) ] = data; 1610 } 1611 1612 // Check for both converted-to-camel and non-converted data property names 1613 // If a data property was specified 1614 if ( getByName ) { 1615 1616 // First Try to find as-is property data 1617 ret = thisCache[ name ]; 1618 1619 // Test for null|undefined property data 1620 if ( ret == null ) { 1621 1622 // Try to find the camelCased property 1623 ret = thisCache[ jQuery.camelCase( name ) ]; 1624 } 1625 } else { 1626 ret = thisCache; 1627 } 1628 1629 return ret; 1630 }, 1631 1632 removeData: function( elem, name, pvt /* Internal Use Only */ ) { 1633 if ( !jQuery.acceptData( elem ) ) { 1634 return; 1635 } 1636 1637 var thisCache, i, l, 1638 1639 isNode = elem.nodeType, 1640 1641 // See jQuery.data for more information 1642 cache = isNode ? jQuery.cache : elem, 1643 id = isNode ? elem[ jQuery.expando ] : jQuery.expando; 1644 1645 // If there is already no cache entry for this object, there is no 1646 // purpose in continuing 1647 if ( !cache[ id ] ) { 1648 return; 1649 } 1650 1651 if ( name ) { 1652 1653 thisCache = pvt ? cache[ id ] : cache[ id ].data; 1654 1655 if ( thisCache ) { 1656 1657 // Support array or space separated string names for data keys 1658 if ( !jQuery.isArray( name ) ) { 1659 1660 // try the string as a key before any manipulation 1661 if ( name in thisCache ) { 1662 name = [ name ]; 1663 } else { 1664 1665 // split the camel cased version by spaces unless a key with the spaces exists 1666 name = jQuery.camelCase( name ); 1667 if ( name in thisCache ) { 1668 name = [ name ]; 1669 } else { 1670 name = name.split(" "); 1671 } 1672 } 1673 } 1674 1675 for ( i = 0, l = name.length; i < l; i++ ) { 1676 delete thisCache[ name[i] ]; 1677 } 1678 1679 // If there is no data left in the cache, we want to continue 1680 // and let the cache object itself get destroyed 1681 if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { 1682 return; 1683 } 1684 } 1685 } 1686 1687 // See jQuery.data for more information 1688 if ( !pvt ) { 1689 delete cache[ id ].data; 1690 1691 // Don't destroy the parent cache unless the internal data object 1692 // had been the only thing left in it 1693 if ( !isEmptyDataObject( cache[ id ] ) ) { 1694 return; 1695 } 1696 } 1697 1698 // Destroy the cache 1699 if ( isNode ) { 1700 jQuery.cleanData( [ elem ], true ); 1701 1702 // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) 1703 } else if ( jQuery.support.deleteExpando || cache != cache.window ) { 1704 delete cache[ id ]; 1705 1706 // When all else fails, null 1707 } else { 1708 cache[ id ] = null; 1709 } 1753 data: function( elem, name, data ) { 1754 return internalData( elem, name, data ); 1755 }, 1756 1757 removeData: function( elem, name ) { 1758 return internalRemoveData( elem, name ); 1710 1759 }, 1711 1760 1712 1761 // For internal use only. 1713 1762 _data: function( elem, name, data ) { 1714 return jQuery.data( elem, name, data, true ); 1763 return internalData( elem, name, data, true ); 1764 }, 1765 1766 _removeData: function( elem, name ) { 1767 return internalRemoveData( elem, name, true ); 1715 1768 }, 1716 1769 1717 1770 // A method for determining if a DOM node can handle the data expando 1718 1771 acceptData: function( elem ) { 1772 // Do not set data on non-element because it will not be cleared (#8335). 1773 if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { 1774 return false; 1775 } 1776 1719 1777 var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; 1720 1778 … … 1726 1784 jQuery.fn.extend({ 1727 1785 data: function( key, value ) { 1728 var parts, part, attr, name, l,1786 var attrs, name, 1729 1787 elem = this[0], 1730 1788 i = 0, … … 1737 1795 1738 1796 if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { 1739 attr = elem.attributes;1740 for ( l = attr.length; i < l; i++ ) {1741 name = attr [i].name;1797 attrs = elem.attributes; 1798 for ( ; i < attrs.length; i++ ) { 1799 name = attrs[i].name; 1742 1800 1743 1801 if ( !name.indexOf( "data-" ) ) { 1744 name = jQuery.camelCase( name.s ubstring(5) );1802 name = jQuery.camelCase( name.slice(5) ); 1745 1803 1746 1804 dataAttr( elem, name, data[ name ] ); … … 1761 1819 } 1762 1820 1763 parts = key.split( ".", 2 );1764 parts[1] = parts[1] ? "." + parts[1] : "";1765 part = parts[1] + "!";1766 1767 1821 return jQuery.access( this, function( value ) { 1768 1822 1769 1823 if ( value === undefined ) { 1770 data = this.triggerHandler( "getData" + part, [ parts[0] ] );1771 1772 1824 // Try to fetch any internally stored data first 1773 if ( data === undefined && elem ) { 1774 data = jQuery.data( elem, key ); 1775 data = dataAttr( elem, key, data ); 1776 } 1777 1778 return data === undefined && parts[1] ? 1779 this.data( parts[0] ) : 1780 data; 1781 } 1782 1783 parts[1] = value; 1825 return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; 1826 } 1827 1784 1828 this.each(function() { 1785 var self = jQuery( this );1786 1787 self.triggerHandler( "setData" + part, parts );1788 1829 jQuery.data( this, key, value ); 1789 self.triggerHandler( "changeData" + part, parts );1790 1830 }); 1791 }, null, value, arguments.length > 1, null, false );1831 }, null, value, arguments.length > 1, null, true ); 1792 1832 }, 1793 1833 … … 1811 1851 try { 1812 1852 data = data === "true" ? true : 1813 data === "false" ? false :1814 data === "null" ? null :1815 // Only convert to a number if it doesn't change the string1816 +data + "" === data ? +data :1817 rbrace.test( data ) ? jQuery.parseJSON( data ) :1818 data;1853 data === "false" ? false : 1854 data === "null" ? null : 1855 // Only convert to a number if it doesn't change the string 1856 +data + "" === data ? +data : 1857 rbrace.test( data ) ? jQuery.parseJSON( data ) : 1858 data; 1819 1859 } catch( e ) {} 1820 1860 … … 1883 1923 } 1884 1924 1925 hooks.cur = fn; 1885 1926 if ( fn ) { 1886 1927 … … 1906 1947 return jQuery._data( elem, key ) || jQuery._data( elem, key, { 1907 1948 empty: jQuery.Callbacks("once memory").add(function() { 1908 jQuery. removeData( elem, type + "queue", true);1909 jQuery. removeData( elem, key, true);1949 jQuery._removeData( elem, type + "queue" ); 1950 jQuery._removeData( elem, key ); 1910 1951 }) 1911 1952 }); … … 1992 2033 } 1993 2034 }); 1994 var nodeHook, boolHook, fixSpecified,2035 var nodeHook, boolHook, 1995 2036 rclass = /[\t\r\n]/g, 1996 2037 rreturn = /\r/g, 1997 rtype = /^(?:button|input)$/i, 1998 rfocusable = /^(?:button|input|object|select|textarea)$/i, 1999 rclickable = /^a(?:rea|)$/i, 2000 rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, 2001 getSetAttribute = jQuery.support.getSetAttribute; 2038 rfocusable = /^(?:input|select|textarea|button|object)$/i, 2039 rclickable = /^(?:a|area)$/i, 2040 rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, 2041 ruseDefault = /^(?:checked|selected)$/i, 2042 getSetAttribute = jQuery.support.getSetAttribute, 2043 getSetInput = jQuery.support.input; 2002 2044 2003 2045 jQuery.fn.extend({ … … 2028 2070 2029 2071 addClass: function( value ) { 2030 var classNames, i, l, elem, 2031 setClass, c, cl; 2072 var classes, elem, cur, clazz, j, 2073 i = 0, 2074 len = this.length, 2075 proceed = typeof value === "string" && value; 2032 2076 2033 2077 if ( jQuery.isFunction( value ) ) { 2034 2078 return this.each(function( j ) { 2035 jQuery( this ).addClass( value.call( this, j, this.className) );2079 jQuery( this ).addClass( value.call( this, j, this.className ) ); 2036 2080 }); 2037 2081 } 2038 2082 2039 if ( value && typeof value === "string" ) { 2040 classNames = value.split( core_rspace ); 2041 2042 for ( i = 0, l = this.length; i < l; i++ ) { 2083 if ( proceed ) { 2084 // The disjunction here is for better compressibility (see removeClass) 2085 classes = ( value || "" ).match( core_rnotwhite ) || []; 2086 2087 for ( ; i < len; i++ ) { 2043 2088 elem = this[ i ]; 2044 2045 if ( elem.nodeType === 1 ) { 2046 if ( !elem.className && classNames.length === 1 ) { 2047 elem.className = value; 2048 2049 } else { 2050 setClass = " " + elem.className + " "; 2051 2052 for ( c = 0, cl = classNames.length; c < cl; c++ ) { 2053 if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) { 2054 setClass += classNames[ c ] + " "; 2055 } 2089 cur = elem.nodeType === 1 && ( elem.className ? 2090 ( " " + elem.className + " " ).replace( rclass, " " ) : 2091 " " 2092 ); 2093 2094 if ( cur ) { 2095 j = 0; 2096 while ( (clazz = classes[j++]) ) { 2097 if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 2098 cur += clazz + " "; 2056 2099 } 2057 elem.className = jQuery.trim( setClass );2058 2100 } 2101 elem.className = jQuery.trim( cur ); 2102 2059 2103 } 2060 2104 } … … 2065 2109 2066 2110 removeClass: function( value ) { 2067 var removes, className, elem, c, cl, i, l; 2111 var classes, elem, cur, clazz, j, 2112 i = 0, 2113 len = this.length, 2114 proceed = arguments.length === 0 || typeof value === "string" && value; 2068 2115 2069 2116 if ( jQuery.isFunction( value ) ) { 2070 2117 return this.each(function( j ) { 2071 jQuery( this ).removeClass( value.call( this, j, this.className) );2118 jQuery( this ).removeClass( value.call( this, j, this.className ) ); 2072 2119 }); 2073 2120 } 2074 if ( (value && typeof value === "string") || value === undefined ) {2075 removes = ( value || "" ).split( core_rspace );2076 2077 for ( i = 0, l = this.length; i < l; i++ ) {2121 if ( proceed ) { 2122 classes = ( value || "" ).match( core_rnotwhite ) || []; 2123 2124 for ( ; i < len; i++ ) { 2078 2125 elem = this[ i ]; 2079 if ( elem.nodeType === 1 && elem.className ) { 2080 2081 className = (" " + elem.className + " ").replace( rclass, " " ); 2082 2083 // loop over each item in the removal list 2084 for ( c = 0, cl = removes.length; c < cl; c++ ) { 2085 // Remove until there is nothing to remove, 2086 while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) { 2087 className = className.replace( " " + removes[ c ] + " " , " " ); 2126 // This expression is here for better compressibility (see addClass) 2127 cur = elem.nodeType === 1 && ( elem.className ? 2128 ( " " + elem.className + " " ).replace( rclass, " " ) : 2129 "" 2130 ); 2131 2132 if ( cur ) { 2133 j = 0; 2134 while ( (clazz = classes[j++]) ) { 2135 // Remove *all* instances 2136 while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { 2137 cur = cur.replace( " " + clazz + " ", " " ); 2088 2138 } 2089 2139 } 2090 elem.className = value ? jQuery.trim( c lassName) : "";2140 elem.className = value ? jQuery.trim( cur ) : ""; 2091 2141 } 2092 2142 } … … 2113 2163 self = jQuery( this ), 2114 2164 state = stateVal, 2115 classNames = value. split( core_rspace );2165 classNames = value.match( core_rnotwhite ) || []; 2116 2166 2117 2167 while ( (className = classNames[ i++ ]) ) { … … 2121 2171 } 2122 2172 2123 } else if ( type === "undefined" || type === "boolean" ) { 2173 // Toggle whole class name 2174 } else if ( type === core_strundefined || type === "boolean" ) { 2124 2175 if ( this.className ) { 2125 2176 // store className if set … … 2127 2178 } 2128 2179 2129 // toggle whole className 2180 // If the element has a class name or if we're passed "false", 2181 // then remove the whole classname (if there was one, the above saved it). 2182 // Otherwise bring back whatever was previously saved (if anything), 2183 // falling back to the empty string if nothing was stored. 2130 2184 this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; 2131 2185 } … … 2147 2201 2148 2202 val: function( value ) { 2149 var hooks, ret, isFunction,2203 var ret, hooks, isFunction, 2150 2204 elem = this[0]; 2151 2205 … … 2270 2324 }, 2271 2325 2272 // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 2273 attrFn: {}, 2274 2275 attr: function( elem, name, value, pass ) { 2276 var ret, hooks, notxml, 2326 attr: function( elem, name, value ) { 2327 var hooks, notxml, ret, 2277 2328 nType = elem.nodeType; 2278 2329 … … 2282 2333 } 2283 2334 2284 if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {2285 return jQuery( elem )[ name ]( value );2286 }2287 2288 2335 // Fallback to prop when attributes are not supported 2289 if ( typeof elem.getAttribute === "undefined") {2336 if ( typeof elem.getAttribute === core_strundefined ) { 2290 2337 return jQuery.prop( elem, name, value ); 2291 2338 } … … 2304 2351 if ( value === null ) { 2305 2352 jQuery.removeAttr( elem, name ); 2306 return; 2307 2308 } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { 2353 2354 } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { 2309 2355 return ret; 2310 2356 … … 2314 2360 } 2315 2361 2316 } else if ( hooks && "get" in hooks && notxml&& (ret = hooks.get( elem, name )) !== null ) {2362 } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { 2317 2363 return ret; 2318 2364 2319 2365 } else { 2320 2366 2321 ret = elem.getAttribute( name ); 2367 // In IE9+, Flash objects don't have .getAttribute (#12945) 2368 // Support: IE9+ 2369 if ( typeof elem.getAttribute !== core_strundefined ) { 2370 ret = elem.getAttribute( name ); 2371 } 2322 2372 2323 2373 // Non-existent attributes return null, we normalize to undefined 2324 return ret == =null ?2374 return ret == null ? 2325 2375 undefined : 2326 2376 ret; … … 2329 2379 2330 2380 removeAttr: function( elem, value ) { 2331 var propName, attrNames, name, isBool, 2332 i = 0; 2333 2334 if ( value && elem.nodeType === 1 ) { 2335 2336 attrNames = value.split( core_rspace ); 2337 2338 for ( ; i < attrNames.length; i++ ) { 2339 name = attrNames[ i ]; 2340 2341 if ( name ) { 2342 propName = jQuery.propFix[ name ] || name; 2343 isBool = rboolean.test( name ); 2344 2345 // See #9699 for explanation of this approach (setting first, then removal) 2346 // Do not do this for boolean attributes (see #10870) 2347 if ( !isBool ) { 2348 jQuery.attr( elem, name, "" ); 2349 } 2350 elem.removeAttribute( getSetAttribute ? name : propName ); 2351 2381 var name, propName, 2382 i = 0, 2383 attrNames = value && value.match( core_rnotwhite ); 2384 2385 if ( attrNames && elem.nodeType === 1 ) { 2386 while ( (name = attrNames[i++]) ) { 2387 propName = jQuery.propFix[ name ] || name; 2388 2389 // Boolean attributes get special treatment (#10870) 2390 if ( rboolean.test( name ) ) { 2352 2391 // Set corresponding property to false for boolean attributes 2353 if ( isBool && propName in elem ) { 2392 // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 2393 if ( !getSetAttribute && ruseDefault.test( name ) ) { 2394 elem[ jQuery.camelCase( "default-" + name ) ] = 2395 elem[ propName ] = false; 2396 } else { 2354 2397 elem[ propName ] = false; 2355 2398 } 2356 } 2399 2400 // See #9699 for explanation of this approach (setting first, then removal) 2401 } else { 2402 jQuery.attr( elem, name, "" ); 2403 } 2404 2405 elem.removeAttribute( getSetAttribute ? name : propName ); 2357 2406 } 2358 2407 } … … 2362 2411 type: { 2363 2412 set: function( elem, value ) { 2364 // We can't allow the type property to be changed (since it causes problems in IE) 2365 if ( rtype.test( elem.nodeName ) && elem.parentNode ) { 2366 jQuery.error( "type property can't be changed" ); 2367 } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { 2413 if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { 2368 2414 // Setting the type on a radio button after the value resets the value in IE6-9 2369 // Reset value to it's default in case type is set after value 2370 // This is for element creation 2415 // Reset value to default in case type is set after value during creation 2371 2416 var val = elem.value; 2372 2417 elem.setAttribute( "type", value ); … … 2376 2421 return value; 2377 2422 } 2378 }2379 },2380 // Use the value property for back compat2381 // Use the nodeHook for button elements in IE6/7 (#1954)2382 value: {2383 get: function( elem, name ) {2384 if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {2385 return nodeHook.get( elem, name );2386 }2387 return name in elem ?2388 elem.value :2389 null;2390 },2391 set: function( elem, value, name ) {2392 if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {2393 return nodeHook.set( elem, value, name );2394 }2395 // Does not return so that setAttribute is also used2396 elem.value = value;2397 2423 } 2398 2424 } … … 2469 2495 boolHook = { 2470 2496 get: function( elem, name ) { 2471 // Align boolean attributes with corresponding properties 2472 // Fall back to attribute presence where some booleans are not supported 2473 var attrNode, 2474 property = jQuery.prop( elem, name ); 2475 return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? 2497 var 2498 // Use .prop to determine if this attribute is understood as boolean 2499 prop = jQuery.prop( elem, name ), 2500 2501 // Fetch it accordingly 2502 attr = typeof prop === "boolean" && elem.getAttribute( name ), 2503 detail = typeof prop === "boolean" ? 2504 2505 getSetInput && getSetAttribute ? 2506 attr != null : 2507 // oldIE fabricates an empty string for missing boolean attributes 2508 // and conflates checked/selected into attroperties 2509 ruseDefault.test( name ) ? 2510 elem[ jQuery.camelCase( "default-" + name ) ] : 2511 !!attr : 2512 2513 // fetch an attribute node for properties not recognized as boolean 2514 elem.getAttributeNode( name ); 2515 2516 return detail && detail.value !== false ? 2476 2517 name.toLowerCase() : 2477 2518 undefined; 2478 2519 }, 2479 2520 set: function( elem, value, name ) { 2480 var propName;2481 2521 if ( value === false ) { 2482 2522 // Remove boolean attributes when set to false 2483 2523 jQuery.removeAttr( elem, name ); 2524 } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { 2525 // IE<8 needs the *property* name 2526 elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); 2527 2528 // Use defaultChecked and defaultSelected for oldIE 2484 2529 } else { 2485 // value is true since we know at this point it's type boolean and not false 2486 // Set boolean attributes to the same name and set the DOM property 2487 propName = jQuery.propFix[ name ] || name; 2488 if ( propName in elem ) { 2489 // Only set the IDL specifically if it already exists on the element 2490 elem[ propName ] = true; 2491 } 2492 2493 elem.setAttribute( name, name.toLowerCase() ); 2494 } 2530 elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; 2531 } 2532 2495 2533 return name; 2496 2534 } 2497 2535 }; 2536 2537 // fix oldIE value attroperty 2538 if ( !getSetInput || !getSetAttribute ) { 2539 jQuery.attrHooks.value = { 2540 get: function( elem, name ) { 2541 var ret = elem.getAttributeNode( name ); 2542 return jQuery.nodeName( elem, "input" ) ? 2543 2544 // Ignore the value *property* by using defaultValue 2545 elem.defaultValue : 2546 2547 ret && ret.specified ? ret.value : undefined; 2548 }, 2549 set: function( elem, value, name ) { 2550 if ( jQuery.nodeName( elem, "input" ) ) { 2551 // Does not return so that setAttribute is also used 2552 elem.defaultValue = value; 2553 } else { 2554 // Use nodeHook if defined (#1954); otherwise setAttribute is fine 2555 return nodeHook && nodeHook.set( elem, value, name ); 2556 } 2557 } 2558 }; 2559 } 2498 2560 2499 2561 // IE6/7 do not support getting/setting some attributes with get/setAttribute 2500 2562 if ( !getSetAttribute ) { 2501 2502 fixSpecified = {2503 name: true,2504 id: true,2505 coords: true2506 };2507 2563 2508 2564 // Use this for any attribute in IE6/7 … … 2510 2566 nodeHook = jQuery.valHooks.button = { 2511 2567 get: function( elem, name ) { 2512 var ret; 2513 ret = elem.getAttributeNode( name ); 2514 return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? 2568 var ret = elem.getAttributeNode( name ); 2569 return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? 2515 2570 ret.value : 2516 2571 undefined; … … 2520 2575 var ret = elem.getAttributeNode( name ); 2521 2576 if ( !ret ) { 2522 ret = document.createAttribute( name ); 2523 elem.setAttributeNode( ret ); 2524 } 2525 return ( ret.value = value + "" ); 2577 elem.setAttributeNode( 2578 (ret = elem.ownerDocument.createAttribute( name )) 2579 ); 2580 } 2581 2582 ret.value = value += ""; 2583 2584 // Break association with cloned elements by also using setAttribute (#9646) 2585 return name === "value" || value === elem.getAttribute( name ) ? 2586 value : 2587 undefined; 2588 } 2589 }; 2590 2591 // Set contenteditable to false on removals(#10429) 2592 // Setting to empty string throws an error as an invalid value 2593 jQuery.attrHooks.contenteditable = { 2594 get: nodeHook.get, 2595 set: function( elem, value, name ) { 2596 nodeHook.set( elem, value === "" ? false : value, name ); 2526 2597 } 2527 2598 }; … … 2539 2610 }); 2540 2611 }); 2541 2542 // Set contenteditable to false on removals(#10429)2543 // Setting to empty string throws an error as an invalid value2544 jQuery.attrHooks.contenteditable = {2545 get: nodeHook.get,2546 set: function( elem, value, name ) {2547 if ( value === "" ) {2548 value = "false";2549 }2550 nodeHook.set( elem, value, name );2551 }2552 };2553 2612 } 2554 2613 2555 2614 2556 2615 // Some attributes require a special call on IE 2616 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 2557 2617 if ( !jQuery.support.hrefNormalized ) { 2558 2618 jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { … … 2560 2620 get: function( elem ) { 2561 2621 var ret = elem.getAttribute( name, 2 ); 2562 return ret == =null ? undefined : ret;2622 return ret == null ? undefined : ret; 2563 2623 } 2564 2624 }); 2625 }); 2626 2627 // href/src property should get the full normalized URL (#10299/#12915) 2628 jQuery.each([ "href", "src" ], function( i, name ) { 2629 jQuery.propHooks[ name ] = { 2630 get: function( elem ) { 2631 return elem.getAttribute( name, 4 ); 2632 } 2633 }; 2565 2634 }); 2566 2635 } … … 2570 2639 get: function( elem ) { 2571 2640 // Return undefined in the case of empty string 2572 // Normalize to lowercase since IE uppercases css property names 2573 return elem.style.cssText.toLowerCase() || undefined; 2641 // Note: IE uppercases css property names, but if we were to .toLowerCase() 2642 // .cssText, that would destroy case senstitivity in URL's, like in "background" 2643 return elem.style.cssText || undefined; 2574 2644 }, 2575 2645 set: function( elem, value ) { … … 2624 2694 }); 2625 2695 }); 2626 var rformElems = /^(?:textarea|input|select)$/i, 2627 rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, 2628 rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, 2696 var rformElems = /^(?:input|select|textarea)$/i, 2629 2697 rkeyEvent = /^key/, 2630 2698 rmouseEvent = /^(?:mouse|contextmenu)|click/, 2631 2699 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 2632 hoverHack = function( events ) { 2633 return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); 2634 }; 2700 rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; 2701 2702 function returnTrue() { 2703 return true; 2704 } 2705 2706 function returnFalse() { 2707 return false; 2708 } 2635 2709 2636 2710 /* … … 2640 2714 jQuery.event = { 2641 2715 2716 global: {}, 2717 2642 2718 add: function( elem, types, handler, data, selector ) { 2643 2644 var elemData, eventHandle, events,2645 t, tns, type, namespaces, handleObj,2646 handleObjIn, handlers, special;2647 2648 // Don't attach events to noData or text/comment nodes ( allow plain objects tho)2649 if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem ))) {2719 var tmp, events, t, handleObjIn, 2720 special, eventHandle, handleObj, 2721 handlers, type, namespaces, origType, 2722 elemData = jQuery._data( elem ); 2723 2724 // Don't attach events to noData or text/comment nodes (but allow plain objects) 2725 if ( !elemData ) { 2650 2726 return; 2651 2727 } … … 2664 2740 2665 2741 // Init the element's event structure and main handler, if this is the first 2666 events = elemData.events; 2667 if ( !events ) { 2668 elemData.events = events = {}; 2669 } 2670 eventHandle = elemData.handle; 2671 if ( !eventHandle ) { 2672 elemData.handle = eventHandle = function( e ) { 2742 if ( !(events = elemData.events) ) { 2743 events = elemData.events = {}; 2744 } 2745 if ( !(eventHandle = elemData.handle) ) { 2746 eventHandle = elemData.handle = function( e ) { 2673 2747 // Discard the second event of a jQuery.event.trigger() and 2674 2748 // when an event is called after a page has unloaded 2675 return typeof jQuery !== "undefined"&& (!e || jQuery.event.triggered !== e.type) ?2749 return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? 2676 2750 jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : 2677 2751 undefined; … … 2683 2757 // Handle multiple events separated by a space 2684 2758 // jQuery(...).bind("mouseover mouseout", fn); 2685 types = jQuery.trim( hoverHack(types) ).split( " " );2686 for ( t = 0; t < types.length; t++ ) {2687 2688 t ns= rtypenamespace.exec( types[t] ) || [];2689 type = tns[1];2690 namespaces = ( t ns[2] || "" ).split( "." ).sort();2759 types = ( types || "" ).match( core_rnotwhite ) || [""]; 2760 t = types.length; 2761 while ( t-- ) { 2762 tmp = rtypenamespace.exec( types[t] ) || []; 2763 type = origType = tmp[1]; 2764 namespaces = ( tmp[2] || "" ).split( "." ).sort(); 2691 2765 2692 2766 // If event changes its type, use the special event handlers for the changed type … … 2702 2776 handleObj = jQuery.extend({ 2703 2777 type: type, 2704 origType: tns[1],2778 origType: origType, 2705 2779 data: data, 2706 2780 handler: handler, … … 2712 2786 2713 2787 // Init the event handler queue if we're the first 2714 handlers = events[ type ]; 2715 if ( !handlers ) { 2788 if ( !(handlers = events[ type ]) ) { 2716 2789 handlers = events[ type ] = []; 2717 2790 handlers.delegateCount = 0; … … 2752 2825 }, 2753 2826 2754 global: {},2755 2756 2827 // Detach an event or set of events from an element 2757 2828 remove: function( elem, types, handler, selector, mappedTypes ) { 2758 2759 var t, tns, type, origType, namespaces, origCount, 2760 j, events, special, eventType, handleObj, 2829 var j, handleObj, tmp, 2830 origCount, t, events, 2831 special, handlers, type, 2832 namespaces, origType, 2761 2833 elemData = jQuery.hasData( elem ) && jQuery._data( elem ); 2762 2834 … … 2766 2838 2767 2839 // Once for each type.namespace in types; type may be omitted 2768 types = jQuery.trim( hoverHack( types || "" ) ).split(" "); 2769 for ( t = 0; t < types.length; t++ ) { 2770 tns = rtypenamespace.exec( types[t] ) || []; 2771 type = origType = tns[1]; 2772 namespaces = tns[2]; 2840 types = ( types || "" ).match( core_rnotwhite ) || [""]; 2841 t = types.length; 2842 while ( t-- ) { 2843 tmp = rtypenamespace.exec( types[t] ) || []; 2844 type = origType = tmp[1]; 2845 namespaces = ( tmp[2] || "" ).split( "." ).sort(); 2773 2846 2774 2847 // Unbind all events (on this namespace, if provided) for the element … … 2781 2854 2782 2855 special = jQuery.event.special[ type ] || {}; 2783 type = ( selector? special.delegateType : special.bindType ) || type; 2784 eventType = events[ type ] || []; 2785 origCount = eventType.length; 2786 namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 2856 type = ( selector ? special.delegateType : special.bindType ) || type; 2857 handlers = events[ type ] || []; 2858 tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); 2787 2859 2788 2860 // Remove matching events 2789 for ( j = 0; j < eventType.length; j++ ) { 2790 handleObj = eventType[ j ]; 2861 origCount = j = handlers.length; 2862 while ( j-- ) { 2863 handleObj = handlers[ j ]; 2791 2864 2792 2865 if ( ( mappedTypes || origType === handleObj.origType ) && 2793 2794 ( !namespaces || namespaces.test( handleObj.namespace ) ) &&2795 2796 eventType.splice( j--, 1 );2866 ( !handler || handler.guid === handleObj.guid ) && 2867 ( !tmp || tmp.test( handleObj.namespace ) ) && 2868 ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { 2869 handlers.splice( j, 1 ); 2797 2870 2798 2871 if ( handleObj.selector ) { 2799 eventType.delegateCount--;2872 handlers.delegateCount--; 2800 2873 } 2801 2874 if ( special.remove ) { … … 2807 2880 // Remove generic event handler if we removed something and no more handlers exist 2808 2881 // (avoids potential for endless recursion during removal of special event handlers) 2809 if ( eventType.length === 0 && origCount !== eventType.length ) {2882 if ( origCount && !handlers.length ) { 2810 2883 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 2811 2884 jQuery.removeEvent( elem, type, elemData.handle ); … … 2822 2895 // removeData also checks for emptiness and clears the expando if empty 2823 2896 // so use it instead of delete 2824 jQuery.removeData( elem, "events", true ); 2825 } 2826 }, 2827 2828 // Events that are safe to short-circuit if no handlers are attached. 2829 // Native DOM events should not be added, they may have inline handlers. 2830 customEvent: { 2831 "getData": true, 2832 "setData": true, 2833 "changeData": true 2897 jQuery._removeData( elem, "events" ); 2898 } 2834 2899 }, 2835 2900 2836 2901 trigger: function( event, data, elem, onlyHandlers ) { 2902 var handle, ontype, cur, 2903 bubbleType, special, tmp, i, 2904 eventPath = [ elem || document ], 2905 type = core_hasOwn.call( event, "type" ) ? event.type : event, 2906 namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; 2907 2908 cur = tmp = elem = elem || document; 2909 2837 2910 // Don't do events on text and comment nodes 2838 if ( elem && (elem.nodeType === 3 || elem.nodeType === 8)) {2911 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 2839 2912 return; 2840 2913 } 2841 2842 // Event object or event type2843 var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,2844 type = event.type || event,2845 namespaces = [];2846 2914 2847 2915 // focus/blur morphs to focusin/out; ensure we're not firing them right now … … 2850 2918 } 2851 2919 2852 if ( type.indexOf( "!" ) >= 0 ) { 2853 // Exclusive events trigger only for the exact event (no namespaces) 2854 type = type.slice(0, -1); 2855 exclusive = true; 2856 } 2857 2858 if ( type.indexOf( "." ) >= 0 ) { 2920 if ( type.indexOf(".") >= 0 ) { 2859 2921 // Namespaced trigger; create a regexp to match event type in handle() 2860 2922 namespaces = type.split("."); … … 2862 2924 namespaces.sort(); 2863 2925 } 2864 2865 if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { 2866 // No jQuery handlers for this event type, and it can't have inline handlers 2867 return; 2868 } 2869 2870 // Caller can pass in an Event, Object, or just an event type string 2871 event = typeof event === "object" ? 2872 // jQuery.Event object 2873 event[ jQuery.expando ] ? event : 2874 // Object literal 2875 new jQuery.Event( type, event ) : 2876 // Just the event type (string) 2877 new jQuery.Event( type ); 2878 2879 event.type = type; 2926 ontype = type.indexOf(":") < 0 && "on" + type; 2927 2928 // Caller can pass in a jQuery.Event object, Object, or just an event type string 2929 event = event[ jQuery.expando ] ? 2930 event : 2931 new jQuery.Event( type, typeof event === "object" && event ); 2932 2880 2933 event.isTrigger = true; 2881 event.exclusive = exclusive; 2882 event.namespace = namespaces.join( "." ); 2883 event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 2884 ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; 2885 2886 // Handle a global trigger 2887 if ( !elem ) { 2888 2889 // TODO: Stop taunting the data cache; remove global events and always attach to document 2890 cache = jQuery.cache; 2891 for ( i in cache ) { 2892 if ( cache[ i ].events && cache[ i ].events[ type ] ) { 2893 jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); 2894 } 2895 } 2896 return; 2897 } 2934 event.namespace = namespaces.join("."); 2935 event.namespace_re = event.namespace ? 2936 new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : 2937 null; 2898 2938 2899 2939 // Clean up the event in case it is being reused … … 2904 2944 2905 2945 // Clone any incoming data and prepend the event, creating the handler arg list 2906 data = data != null ? jQuery.makeArray( data ) : []; 2907 data.unshift( event ); 2946 data = data == null ? 2947 [ event ] : 2948 jQuery.makeArray( data, [ event ] ); 2908 2949 2909 2950 // Allow special events to draw outside the lines 2910 2951 special = jQuery.event.special[ type ] || {}; 2911 if ( special.trigger && special.trigger.apply( elem, data ) === false ) {2952 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 2912 2953 return; 2913 2954 } … … 2915 2956 // Determine event propagation path in advance, per W3C events spec (#9951) 2916 2957 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 2917 eventPath = [[ elem, special.bindType || type ]];2918 2958 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { 2919 2959 2920 2960 bubbleType = special.delegateType || type; 2921 cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; 2922 for ( old = elem; cur; cur = cur.parentNode ) { 2923 eventPath.push([ cur, bubbleType ]); 2924 old = cur; 2961 if ( !rfocusMorph.test( bubbleType + type ) ) { 2962 cur = cur.parentNode; 2963 } 2964 for ( ; cur; cur = cur.parentNode ) { 2965 eventPath.push( cur ); 2966 tmp = cur; 2925 2967 } 2926 2968 2927 2969 // Only add window if we got to document (e.g., not plain obj or detached DOM) 2928 if ( old=== (elem.ownerDocument || document) ) {2929 eventPath.push( [ old.defaultView || old.parentWindow || window, bubbleType ]);2970 if ( tmp === (elem.ownerDocument || document) ) { 2971 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 2930 2972 } 2931 2973 } 2932 2974 2933 2975 // Fire handlers on the event path 2934 for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { 2935 2936 cur = eventPath[i][0]; 2937 event.type = eventPath[i][1]; 2938 2976 i = 0; 2977 while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { 2978 2979 event.type = i > 1 ? 2980 bubbleType : 2981 special.bindType || type; 2982 2983 // jQuery handler 2939 2984 handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); 2940 2985 if ( handle ) { 2941 2986 handle.apply( cur, data ); 2942 2987 } 2943 // Note that this is a bare JS function and not a jQuery handler 2988 2989 // Native handler 2944 2990 handle = ontype && cur[ ontype ]; 2945 2991 if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { … … 2958 3004 // Can't use an .isFunction() check here because IE6/7 fails that test. 2959 3005 // Don't do default actions on window, that's where global variables be (#6170) 2960 // IE<9 dies on focus/blur to hidden element (#1486) 2961 if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { 3006 if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { 2962 3007 2963 3008 // Don't re-trigger an onFOO event when we call its FOO() method 2964 old= elem[ ontype ];2965 2966 if ( old) {3009 tmp = elem[ ontype ]; 3010 3011 if ( tmp ) { 2967 3012 elem[ ontype ] = null; 2968 3013 } … … 2970 3015 // Prevent re-triggering of the same event, since we already bubbled it above 2971 3016 jQuery.event.triggered = type; 2972 elem[ type ](); 3017 try { 3018 elem[ type ](); 3019 } catch ( e ) { 3020 // IE<9 dies on focus/blur to hidden element (#1486,#12518) 3021 // only reproducible on winXP IE8 native, not IE9 in IE8 mode 3022 } 2973 3023 jQuery.event.triggered = undefined; 2974 3024 2975 if ( old) {2976 elem[ ontype ] = old;3025 if ( tmp ) { 3026 elem[ ontype ] = tmp; 2977 3027 } 2978 3028 } … … 2986 3036 2987 3037 // Make a writable jQuery.Event from the native event object 2988 event = jQuery.event.fix( event || window.event ); 2989 2990 var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related, 2991 handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), 2992 delegateCount = handlers.delegateCount, 3038 event = jQuery.event.fix( event ); 3039 3040 var i, ret, handleObj, matched, j, 3041 handlerQueue = [], 2993 3042 args = core_slice.call( arguments ), 2994 run_all = !event.exclusive && !event.namespace, 2995 special = jQuery.event.special[ event.type ] || {}, 2996 handlerQueue = []; 3043 handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], 3044 special = jQuery.event.special[ event.type ] || {}; 2997 3045 2998 3046 // Use the fix-ed jQuery.Event rather than the (read-only) native event … … 3005 3053 } 3006 3054 3007 // Determine handlers that should run if there are delegated events 3055 // Determine handlers 3056 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 3057 3058 // Run delegates first; they may want to stop propagation beneath us 3059 i = 0; 3060 while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { 3061 event.currentTarget = matched.elem; 3062 3063 j = 0; 3064 while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { 3065 3066 // Triggered event must either 1) have no namespace, or 3067 // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). 3068 if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { 3069 3070 event.handleObj = handleObj; 3071 event.data = handleObj.data; 3072 3073 ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) 3074 .apply( matched.elem, args ); 3075 3076 if ( ret !== undefined ) { 3077 if ( (event.result = ret) === false ) { 3078 event.preventDefault(); 3079 event.stopPropagation(); 3080 } 3081 } 3082 } 3083 } 3084 } 3085 3086 // Call the postDispatch hook for the mapped type 3087 if ( special.postDispatch ) { 3088 special.postDispatch.call( this, event ); 3089 } 3090 3091 return event.result; 3092 }, 3093 3094 handlers: function( event, handlers ) { 3095 var sel, handleObj, matches, i, 3096 handlerQueue = [], 3097 delegateCount = handlers.delegateCount, 3098 cur = event.target; 3099 3100 // Find delegate handlers 3101 // Black-hole SVG <use> instance trees (#13180) 3008 3102 // Avoid non-left-click bubbling in Firefox (#3861) 3009 if ( delegateCount && !(event.button && event.type === "click") ) {3010 3011 for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {3012 3013 // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)3014 if ( cur.disabled !== true || event.type !== "click" ) {3015 selMatch = {};3103 if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { 3104 3105 for ( ; cur != this; cur = cur.parentNode || this ) { 3106 3107 // Don't check non-elements (#13208) 3108 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 3109 if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { 3016 3110 matches = []; 3017 3111 for ( i = 0; i < delegateCount; i++ ) { 3018 3112 handleObj = handlers[ i ]; 3019 sel = handleObj.selector; 3020 3021 if ( selMatch[ sel ] === undefined ) { 3022 selMatch[ sel ] = handleObj.needsContext ? 3113 3114 // Don't conflict with Object.prototype properties (#13203) 3115 sel = handleObj.selector + " "; 3116 3117 if ( matches[ sel ] === undefined ) { 3118 matches[ sel ] = handleObj.needsContext ? 3023 3119 jQuery( sel, this ).index( cur ) >= 0 : 3024 3120 jQuery.find( sel, this, null, [ cur ] ).length; 3025 3121 } 3026 if ( selMatch[ sel ] ) {3122 if ( matches[ sel ] ) { 3027 3123 matches.push( handleObj ); 3028 3124 } 3029 3125 } 3030 3126 if ( matches.length ) { 3031 handlerQueue.push({ elem: cur, matches: matches });3127 handlerQueue.push({ elem: cur, handlers: matches }); 3032 3128 } 3033 3129 } … … 3036 3132 3037 3133 // Add the remaining (directly-bound) handlers 3038 if ( handlers.length > delegateCount ) { 3039 handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); 3040 } 3041 3042 // Run delegates first; they may want to stop propagation beneath us 3043 for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { 3044 matched = handlerQueue[ i ]; 3045 event.currentTarget = matched.elem; 3046 3047 for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { 3048 handleObj = matched.matches[ j ]; 3049 3050 // Triggered event must either 1) be non-exclusive and have no namespace, or 3051 // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). 3052 if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { 3053 3054 event.data = handleObj.data; 3055 event.handleObj = handleObj; 3056 3057 ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) 3058 .apply( matched.elem, args ); 3059 3060 if ( ret !== undefined ) { 3061 event.result = ret; 3062 if ( ret === false ) { 3063 event.preventDefault(); 3064 event.stopPropagation(); 3065 } 3066 } 3067 } 3068 } 3069 } 3070 3071 // Call the postDispatch hook for the mapped type 3072 if ( special.postDispatch ) { 3073 special.postDispatch.call( this, event ); 3074 } 3075 3076 return event.result; 3134 if ( delegateCount < handlers.length ) { 3135 handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); 3136 } 3137 3138 return handlerQueue; 3139 }, 3140 3141 fix: function( event ) { 3142 if ( event[ jQuery.expando ] ) { 3143 return event; 3144 } 3145 3146 // Create a writable copy of the event object and normalize some properties 3147 var i, prop, copy, 3148 type = event.type, 3149 originalEvent = event, 3150 fixHook = this.fixHooks[ type ]; 3151 3152 if ( !fixHook ) { 3153 this.fixHooks[ type ] = fixHook = 3154 rmouseEvent.test( type ) ? this.mouseHooks : 3155 rkeyEvent.test( type ) ? this.keyHooks : 3156 {}; 3157 } 3158 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; 3159 3160 event = new jQuery.Event( originalEvent ); 3161 3162 i = copy.length; 3163 while ( i-- ) { 3164 prop = copy[ i ]; 3165 event[ prop ] = originalEvent[ prop ]; 3166 } 3167 3168 // Support: IE<9 3169 // Fix target property (#1925) 3170 if ( !event.target ) { 3171 event.target = originalEvent.srcElement || document; 3172 } 3173 3174 // Support: Chrome 23+, Safari? 3175 // Target should not be a text node (#504, #13143) 3176 if ( event.target.nodeType === 3 ) { 3177 event.target = event.target.parentNode; 3178 } 3179 3180 // Support: IE<9 3181 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) 3182 event.metaKey = !!event.metaKey; 3183 3184 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; 3077 3185 }, 3078 3186 3079 3187 // Includes some event props shared by KeyEvent and MouseEvent 3080 // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** 3081 props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), 3188 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), 3082 3189 3083 3190 fixHooks: {}, … … 3099 3206 props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), 3100 3207 filter: function( event, original ) { 3101 var eventDoc, doc, body,3208 var body, eventDoc, doc, 3102 3209 button = original.button, 3103 3210 fromElement = original.fromElement; … … 3128 3235 }, 3129 3236 3130 fix: function( event ) {3131 if ( event[ jQuery.expando ] ) {3132 return event;3133 }3134 3135 // Create a writable copy of the event object and normalize some properties3136 var i, prop,3137 originalEvent = event,3138 fixHook = jQuery.event.fixHooks[ event.type ] || {},3139 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;3140 3141 event = jQuery.Event( originalEvent );3142 3143 for ( i = copy.length; i; ) {3144 prop = copy[ --i ];3145 event[ prop ] = originalEvent[ prop ];3146 }3147 3148 // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)3149 if ( !event.target ) {3150 event.target = originalEvent.srcElement || document;3151 }3152 3153 // Target should not be a text node (#504, Safari)3154 if ( event.target.nodeType === 3 ) {3155 event.target = event.target.parentNode;3156 }3157 3158 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)3159 event.metaKey = !!event.metaKey;3160 3161 return fixHook.filter? fixHook.filter( event, originalEvent ) : event;3162 },3163 3164 3237 special: { 3165 3238 load: { … … 3167 3240 noBubble: true 3168 3241 }, 3169 3242 click: { 3243 // For checkbox, fire native event so checked state will be right 3244 trigger: function() { 3245 if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { 3246 this.click(); 3247 return false; 3248 } 3249 } 3250 }, 3170 3251 focus: { 3252 // Fire native event if possible so blur/focus sequence is correct 3253 trigger: function() { 3254 if ( this !== document.activeElement && this.focus ) { 3255 try { 3256 this.focus(); 3257 return false; 3258 } catch ( e ) { 3259 // Support: IE<9 3260 // If we error on focus to hidden element (#1486, #12518), 3261 // let .trigger() run the handlers 3262 } 3263 } 3264 }, 3171 3265 delegateType: "focusin" 3172 3266 }, 3173 3267 blur: { 3268 trigger: function() { 3269 if ( this === document.activeElement && this.blur ) { 3270 this.blur(); 3271 return false; 3272 } 3273 }, 3174 3274 delegateType: "focusout" 3175 3275 }, 3176 3276 3177 3277 beforeunload: { 3178 setup: function( data, namespaces, eventHandle ) { 3179 // We only want to do this special case on windows 3180 if ( jQuery.isWindow( this ) ) { 3181 this.onbeforeunload = eventHandle; 3182 } 3183 }, 3184 3185 teardown: function( namespaces, eventHandle ) { 3186 if ( this.onbeforeunload === eventHandle ) { 3187 this.onbeforeunload = null; 3278 postDispatch: function( event ) { 3279 3280 // Even when returnValue equals to undefined Firefox will still show alert 3281 if ( event.result !== undefined ) { 3282 event.originalEvent.returnValue = event.result; 3188 3283 } 3189 3284 } … … 3214 3309 }; 3215 3310 3216 // Some plugins are using, but it's undocumented/deprecated and will be removed.3217 // The 1.7 special event interface should provide all the hooks needed now.3218 jQuery.event.handle = jQuery.event.dispatch;3219 3220 3311 jQuery.removeEvent = document.removeEventListener ? 3221 3312 function( elem, type, handle ) { … … 3231 3322 // #8545, #7054, preventing memory leaks for custom events in IE6-8 3232 3323 // detachEvent needed property on element, by name of that event, to properly expose it to GC 3233 if ( typeof elem[ name ] === "undefined") {3324 if ( typeof elem[ name ] === core_strundefined ) { 3234 3325 elem[ name ] = null; 3235 3326 } … … 3272 3363 }; 3273 3364 3274 function returnFalse() {3275 return false;3276 }3277 function returnTrue() {3278 return true;3279 }3280 3281 3365 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 3282 3366 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 3283 3367 jQuery.Event.prototype = { 3368 isDefaultPrevented: returnFalse, 3369 isPropagationStopped: returnFalse, 3370 isImmediatePropagationStopped: returnFalse, 3371 3284 3372 preventDefault: function() { 3373 var e = this.originalEvent; 3374 3285 3375 this.isDefaultPrevented = returnTrue; 3286 3287 var e = this.originalEvent;3288 3376 if ( !e ) { 3289 3377 return; 3290 3378 } 3291 3379 3292 // if preventDefault existsrun it on the original event3380 // If preventDefault exists, run it on the original event 3293 3381 if ( e.preventDefault ) { 3294 3382 e.preventDefault(); 3295 3383 3296 // otherwise set the returnValue property of the original event to false (IE) 3384 // Support: IE 3385 // Otherwise set the returnValue property of the original event to false 3297 3386 } else { 3298 3387 e.returnValue = false; … … 3300 3389 }, 3301 3390 stopPropagation: function() { 3391 var e = this.originalEvent; 3392 3302 3393 this.isPropagationStopped = returnTrue; 3303 3304 var e = this.originalEvent;3305 3394 if ( !e ) { 3306 3395 return; 3307 3396 } 3308 // if stopPropagation existsrun it on the original event3397 // If stopPropagation exists, run it on the original event 3309 3398 if ( e.stopPropagation ) { 3310 3399 e.stopPropagation(); 3311 3400 } 3312 // otherwise set the cancelBubble property of the original event to true (IE) 3401 3402 // Support: IE 3403 // Set the cancelBubble property of the original event to true 3313 3404 e.cancelBubble = true; 3314 3405 }, … … 3316 3407 this.isImmediatePropagationStopped = returnTrue; 3317 3408 this.stopPropagation(); 3318 }, 3319 isDefaultPrevented: returnFalse, 3320 isPropagationStopped: returnFalse, 3321 isImmediatePropagationStopped: returnFalse 3409 } 3322 3410 }; 3323 3411 … … 3335 3423 target = this, 3336 3424 related = event.relatedTarget, 3337 handleObj = event.handleObj, 3338 selector = handleObj.selector; 3425 handleObj = event.handleObj; 3339 3426 3340 3427 // For mousenter/leave call the handler if related is outside the target. … … 3365 3452 var elem = e.target, 3366 3453 form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; 3367 if ( form && !jQuery._data( form, " _submit_attached" ) ) {3454 if ( form && !jQuery._data( form, "submitBubbles" ) ) { 3368 3455 jQuery.event.add( form, "submit._submit", function( event ) { 3369 3456 event._submit_bubble = true; 3370 3457 }); 3371 jQuery._data( form, " _submit_attached", true );3458 jQuery._data( form, "submitBubbles", true ); 3372 3459 } 3373 3460 }); … … 3428 3515 var elem = e.target; 3429 3516 3430 if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, " _change_attached" ) ) {3517 if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { 3431 3518 jQuery.event.add( elem, "change._change", function( event ) { 3432 3519 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { … … 3434 3521 } 3435 3522 }); 3436 jQuery._data( elem, " _change_attached", true );3523 jQuery._data( elem, "changeBubbles", true ); 3437 3524 } 3438 3525 }); … … 3484 3571 3485 3572 on: function( types, selector, data, fn, /*INTERNAL*/ one ) { 3486 var origFn, type;3573 var type, origFn; 3487 3574 3488 3575 // Types can be a map of types/handlers 3489 3576 if ( typeof types === "object" ) { 3490 3577 // ( types-Object, selector, data ) 3491 if ( typeof selector !== "string" ) { // && selector != null3578 if ( typeof selector !== "string" ) { 3492 3579 // ( types-Object, data ) 3493 3580 data = data || selector; … … 3578 3665 }, 3579 3666 3580 live: function( types, data, fn ) {3581 jQuery( this.context ).on( types, this.selector, data, fn );3582 return this;3583 },3584 die: function( types, fn ) {3585 jQuery( this.context ).off( types, this.selector || "**", fn );3586 return this;3587 },3588 3589 3667 delegate: function( selector, types, data, fn ) { 3590 3668 return this.on( types, selector, data, fn ); … … 3601 3679 }, 3602 3680 triggerHandler: function( type, data ) { 3603 if ( this[0] ) { 3604 return jQuery.event.trigger( type, data, this[0], true ); 3605 } 3606 }, 3607 3608 toggle: function( fn ) { 3609 // Save reference to arguments for access in closure 3610 var args = arguments, 3611 guid = fn.guid || jQuery.guid++, 3612 i = 0, 3613 toggler = function( event ) { 3614 // Figure out which function to execute 3615 var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; 3616 jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); 3617 3618 // Make sure that clicks stop 3619 event.preventDefault(); 3620 3621 // and execute the function 3622 return args[ lastToggle ].apply( this, arguments ) || false; 3623 }; 3624 3625 // link all the functions, so any of them can unbind this click handler 3626 toggler.guid = guid; 3627 while ( i < args.length ) { 3628 args[ i++ ].guid = guid; 3629 } 3630 3631 return this.click( toggler ); 3632 }, 3633 3634 hover: function( fnOver, fnOut ) { 3635 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 3636 } 3637 }); 3638 3639 jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + 3640 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 3641 "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { 3642 3643 // Handle event binding 3644 jQuery.fn[ name ] = function( data, fn ) { 3645 if ( fn == null ) { 3646 fn = data; 3647 data = null; 3648 } 3649 3650 return arguments.length > 0 ? 3651 this.on( name, null, data, fn ) : 3652 this.trigger( name ); 3653 }; 3654 3655 if ( rkeyEvent.test( name ) ) { 3656 jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; 3657 } 3658 3659 if ( rmouseEvent.test( name ) ) { 3660 jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; 3681 var elem = this[0]; 3682 if ( elem ) { 3683 return jQuery.event.trigger( type, data, elem, true ); 3684 } 3661 3685 } 3662 3686 }); … … 3669 3693 (function( window, undefined ) { 3670 3694 3671 var cachedruns,3672 assertGetIdNotName,3695 var i, 3696 cachedruns, 3673 3697 Expr, 3674 3698 getText, 3675 3699 isXML, 3676 contains,3677 3700 compile, 3678 sortOrder,3679 3701 hasDuplicate, 3680 3702 outermostContext, 3681 3703 3682 baseHasDuplicate = true, 3683 strundefined = "undefined", 3684 3685 expando = ( "sizcache" + Math.random() ).replace( ".", "" ), 3686 3687 Token = String, 3688 document = window.document, 3689 docElem = document.documentElement, 3704 // Local document vars 3705 setDocument, 3706 document, 3707 docElem, 3708 documentIsXML, 3709 rbuggyQSA, 3710 rbuggyMatches, 3711 matches, 3712 contains, 3713 sortOrder, 3714 3715 // Instance-specific data 3716 expando = "sizzle" + -(new Date()), 3717 preferredDoc = window.document, 3718 support = {}, 3690 3719 dirruns = 0, 3691 3720 done = 0, 3692 pop = [].pop, 3693 push = [].push, 3694 slice = [].slice, 3695 // Use a stripped-down indexOf if a native one is unavailable 3696 indexOf = [].indexOf || function( elem ) { 3721 classCache = createCache(), 3722 tokenCache = createCache(), 3723 compilerCache = createCache(), 3724 3725 // General-purpose constants 3726 strundefined = typeof undefined, 3727 MAX_NEGATIVE = 1 << 31, 3728 3729 // Array methods 3730 arr = [], 3731 pop = arr.pop, 3732 push = arr.push, 3733 slice = arr.slice, 3734 // Use a stripped-down indexOf if we can't use a native one 3735 indexOf = arr.indexOf || function( elem ) { 3697 3736 var i = 0, 3698 3737 len = this.length; … … 3705 3744 }, 3706 3745 3707 // Augment a function for special use by Sizzle 3708 markFunction = function( fn, value ) { 3709 fn[ expando ] = value == null || value; 3710 return fn; 3711 }, 3712 3713 createCache = function() { 3714 var cache = {}, 3715 keys = []; 3716 3717 return markFunction(function( key, value ) { 3718 // Only keep the most recent entries 3719 if ( keys.push( key ) > Expr.cacheLength ) { 3720 delete cache[ keys.shift() ]; 3721 } 3722 3723 // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157) 3724 return (cache[ key + " " ] = value); 3725 }, cache ); 3726 }, 3727 3728 classCache = createCache(), 3729 tokenCache = createCache(), 3730 compilerCache = createCache(), 3731 3732 // Regex 3746 3747 // Regular expressions 3733 3748 3734 3749 // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace 3735 3750 whitespace = "[\\x20\\t\\r\\n\\f]", 3736 3751 // http://www.w3.org/TR/css3-syntax/#characters 3737 characterEncoding = "(?:\\\\.|[ -\\w]|[^\\x00-\\xa0])+",3752 characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", 3738 3753 3739 3754 // Loosely modeled on CSS identifier characters 3740 // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)3755 // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors 3741 3756 // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 3742 3757 identifier = characterEncoding.replace( "w", "w#" ), … … 3747 3762 "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", 3748 3763 3749 // Prefer arguments not in parens/brackets, 3750 // then attribute selectors and non-pseudos (denoted by :), 3764 // Prefer arguments quoted, 3765 // then not containing pseudos/brackets, 3766 // then attribute selectors/non-parenthetical expressions, 3751 3767 // then anything else 3752 3768 // These preferences are here to reduce the number of selectors 3753 3769 // needing tokenize in the PSEUDO preFilter 3754 pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)", 3755 3756 // For matchExpr.POS and matchExpr.needsContext 3757 pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + 3758 "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", 3770 pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", 3759 3771 3760 3772 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter … … 3764 3776 rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), 3765 3777 rpseudo = new RegExp( pseudos ), 3766 3767 // Easily-parseable/retrievable ID or TAG or CLASS selectors 3768 rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, 3769 3770 rnot = /^:not/, 3771 rsibling = /[\x20\t\r\n\f]*[+~]/, 3772 rendsWithNot = /:not\($/, 3773 3774 rheader = /h\d/i, 3775 rinputs = /input|select|textarea|button/i, 3776 3777 rbackslash = /\\(?!\\)/g, 3778 ridentifier = new RegExp( "^" + identifier + "$" ), 3778 3779 3779 3780 matchExpr = { … … 3784 3785 "ATTR": new RegExp( "^" + attributes ), 3785 3786 "PSEUDO": new RegExp( "^" + pseudos ), 3786 "POS": new RegExp( pos, "i" ), 3787 "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace + 3787 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + 3788 3788 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + 3789 3789 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 3790 3790 // For use in libraries implementing .is() 3791 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) 3792 }, 3793 3794 // Support 3795 3796 // Used for testing something on an element 3797 assert = function( fn ) { 3798 var div = document.createElement("div"); 3799 3800 try { 3801 return fn( div ); 3802 } catch (e) { 3803 return false; 3804 } finally { 3805 // release memory in IE 3806 div = null; 3807 } 3808 }, 3809 3810 // Check if getElementsByTagName("*") returns only elements 3811 assertTagNameNoComments = assert(function( div ) { 3812 div.appendChild( document.createComment("") ); 3813 return !div.getElementsByTagName("*").length; 3814 }), 3815 3816 // Check if getAttribute returns normalized href attributes 3817 assertHrefNotNormalized = assert(function( div ) { 3818 div.innerHTML = "<a href='#'></a>"; 3819 return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && 3820 div.firstChild.getAttribute("href") === "#"; 3821 }), 3822 3823 // Check if attributes should be retrieved by attribute nodes 3824 assertAttributes = assert(function( div ) { 3825 div.innerHTML = "<select></select>"; 3826 var type = typeof div.lastChild.getAttribute("multiple"); 3827 // IE8 returns a string for some attributes even when not present 3828 return type !== "boolean" && type !== "string"; 3829 }), 3830 3831 // Check if getElementsByClassName can be trusted 3832 assertUsableClassName = assert(function( div ) { 3833 // Opera can't find a second classname (in 9.6) 3834 div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; 3835 if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { 3836 return false; 3837 } 3838 3839 // Safari 3.2 caches class attributes and doesn't catch changes 3840 div.lastChild.className = "e"; 3841 return div.getElementsByClassName("e").length === 2; 3842 }), 3843 3844 // Check if getElementById returns elements by name 3845 // Check if getElementsByName privileges form controls or returns elements by ID 3846 assertUsableName = assert(function( div ) { 3847 // Inject content 3848 div.id = expando + 0; 3849 div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; 3850 docElem.insertBefore( div, docElem.firstChild ); 3851 3852 // Test 3853 var pass = document.getElementsByName && 3854 // buggy browsers will return fewer than the correct 2 3855 document.getElementsByName( expando ).length === 2 + 3856 // buggy browsers will return more than the correct 0 3857 document.getElementsByName( expando + 0 ).length; 3858 assertGetIdNotName = !document.getElementById( expando ); 3859 3860 // Cleanup 3861 docElem.removeChild( div ); 3862 3863 return pass; 3864 }); 3865 3866 // If slice is not available, provide a backup 3791 // We use this for POS matching in `select` 3792 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + 3793 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 3794 }, 3795 3796 rsibling = /[\x20\t\r\n\f]*[+~]/, 3797 3798 rnative = /^[^{]+\{\s*\[native code/, 3799 3800 // Easily-parseable/retrievable ID or TAG or CLASS selectors 3801 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 3802 3803 rinputs = /^(?:input|select|textarea|button)$/i, 3804 rheader = /^h\d$/i, 3805 3806 rescape = /'|\\/g, 3807 rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, 3808 3809 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 3810 runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, 3811 funescape = function( _, escaped ) { 3812 var high = "0x" + escaped - 0x10000; 3813 // NaN means non-codepoint 3814 return high !== high ? 3815 escaped : 3816 // BMP codepoint 3817 high < 0 ? 3818 String.fromCharCode( high + 0x10000 ) : 3819 // Supplemental Plane codepoint (surrogate pair) 3820 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 3821 }; 3822 3823 // Use a stripped-down slice if we can't use a native one 3867 3824 try { 3868 slice.call( docElem.childNodes, 0 )[0].nodeType;3825 slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; 3869 3826 } catch ( e ) { 3870 3827 slice = function( i ) { 3871 3828 var elem, 3872 3829 results = []; 3873 for ( ; (elem = this[i]); i++) {3830 while ( (elem = this[i++]) ) { 3874 3831 results.push( elem ); 3875 3832 } … … 3878 3835 } 3879 3836 3837 /** 3838 * For feature detection 3839 * @param {Function} fn The function to test for native support 3840 */ 3841 function isNative( fn ) { 3842 return rnative.test( fn + "" ); 3843 } 3844 3845 /** 3846 * Create key-value caches of limited size 3847 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with 3848 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 3849 * deleting the oldest entry 3850 */ 3851 function createCache() { 3852 var cache, 3853 keys = []; 3854 3855 return (cache = function( key, value ) { 3856 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 3857 if ( keys.push( key += " " ) > Expr.cacheLength ) { 3858 // Only keep the most recent entries 3859 delete cache[ keys.shift() ]; 3860 } 3861 return (cache[ key ] = value); 3862 }); 3863 } 3864 3865 /** 3866 * Mark a function for special use by Sizzle 3867 * @param {Function} fn The function to mark 3868 */ 3869 function markFunction( fn ) { 3870 fn[ expando ] = true; 3871 return fn; 3872 } 3873 3874 /** 3875 * Support testing using an element 3876 * @param {Function} fn Passed the created div and expects a boolean result 3877 */ 3878 function assert( fn ) { 3879 var div = document.createElement("div"); 3880 3881 try { 3882 return fn( div ); 3883 } catch (e) { 3884 return false; 3885 } finally { 3886 // release memory in IE 3887 div = null; 3888 } 3889 } 3890 3880 3891 function Sizzle( selector, context, results, seed ) { 3892 var match, elem, m, nodeType, 3893 // QSA vars 3894 i, groups, old, nid, newContext, newSelector; 3895 3896 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { 3897 setDocument( context ); 3898 } 3899 3900 context = context || document; 3881 3901 results = results || []; 3882 context = context || document;3883 var match, elem, xml, m,3884 nodeType = context.nodeType;3885 3902 3886 3903 if ( !selector || typeof selector !== "string" ) { … … 3888 3905 } 3889 3906 3890 if ( nodeType!== 1 && nodeType !== 9 ) {3907 if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { 3891 3908 return []; 3892 3909 } 3893 3910 3894 xml = isXML( context );3895 3896 if ( !xml && !seed ) {3911 if ( !documentIsXML && !seed ) { 3912 3913 // Shortcuts 3897 3914 if ( (match = rquickExpr.exec( selector )) ) { 3898 3915 // Speed-up: Sizzle("#ID") … … 3927 3944 3928 3945 // Speed-up: Sizzle(".CLASS") 3929 } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {3946 } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { 3930 3947 push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); 3931 3948 return results; 3932 3949 } 3933 3950 } 3951 3952 // QSA path 3953 if ( support.qsa && !rbuggyQSA.test(selector) ) { 3954 old = true; 3955 nid = expando; 3956 newContext = context; 3957 newSelector = nodeType === 9 && selector; 3958 3959 // qSA works strangely on Element-rooted queries 3960 // We can work around this by specifying an extra ID on the root 3961 // and working up from there (Thanks to Andrew Dupont for the technique) 3962 // IE 8 doesn't work on object elements 3963 if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { 3964 groups = tokenize( selector ); 3965 3966 if ( (old = context.getAttribute("id")) ) { 3967 nid = old.replace( rescape, "\\$&" ); 3968 } else { 3969 context.setAttribute( "id", nid ); 3970 } 3971 nid = "[id='" + nid + "'] "; 3972 3973 i = groups.length; 3974 while ( i-- ) { 3975 groups[i] = nid + toSelector( groups[i] ); 3976 } 3977 newContext = rsibling.test( selector ) && context.parentNode || context; 3978 newSelector = groups.join(","); 3979 } 3980 3981 if ( newSelector ) { 3982 try { 3983 push.apply( results, slice.call( newContext.querySelectorAll( 3984 newSelector 3985 ), 0 ) ); 3986 return results; 3987 } catch(qsaError) { 3988 } finally { 3989 if ( !old ) { 3990 context.removeAttribute("id"); 3991 } 3992 } 3993 } 3994 } 3934 3995 } 3935 3996 3936 3997 // All others 3937 return select( selector.replace( rtrim, "$1" ), context, results, seed , xml);3998 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 3938 3999 } 4000 4001 /** 4002 * Detect xml 4003 * @param {Element|Object} elem An element or a document 4004 */ 4005 isXML = Sizzle.isXML = function( elem ) { 4006 // documentElement is verified for cases where it doesn't yet exist 4007 // (such as loading iframes in IE - #4833) 4008 var documentElement = elem && (elem.ownerDocument || elem).documentElement; 4009 return documentElement ? documentElement.nodeName !== "HTML" : false; 4010 }; 4011 4012 /** 4013 * Sets document-related variables once based on the current document 4014 * @param {Element|Object} [doc] An element or document object to use to set the document 4015 * @returns {Object} Returns the current document 4016 */ 4017 setDocument = Sizzle.setDocument = function( node ) { 4018 var doc = node ? node.ownerDocument || node : preferredDoc; 4019 4020 // If no document and documentElement is available, return 4021 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { 4022 return document; 4023 } 4024 4025 // Set our document 4026 document = doc; 4027 docElem = doc.documentElement; 4028 4029 // Support tests 4030 documentIsXML = isXML( doc ); 4031 4032 // Check if getElementsByTagName("*") returns only elements 4033 support.tagNameNoComments = assert(function( div ) { 4034 div.appendChild( doc.createComment("") ); 4035 return !div.getElementsByTagName("*").length; 4036 }); 4037 4038 // Check if attributes should be retrieved by attribute nodes 4039 support.attributes = assert(function( div ) { 4040 div.innerHTML = "<select></select>"; 4041 var type = typeof div.lastChild.getAttribute("multiple"); 4042 // IE8 returns a string for some attributes even when not present 4043 return type !== "boolean" && type !== "string"; 4044 }); 4045 4046 // Check if getElementsByClassName can be trusted 4047 support.getByClassName = assert(function( div ) { 4048 // Opera can't find a second classname (in 9.6) 4049 div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; 4050 if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { 4051 return false; 4052 } 4053 4054 // Safari 3.2 caches class attributes and doesn't catch changes 4055 div.lastChild.className = "e"; 4056 return div.getElementsByClassName("e").length === 2; 4057 }); 4058 4059 // Check if getElementById returns elements by name 4060 // Check if getElementsByName privileges form controls or returns elements by ID 4061 support.getByName = assert(function( div ) { 4062 // Inject content 4063 div.id = expando + 0; 4064 div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; 4065 docElem.insertBefore( div, docElem.firstChild ); 4066 4067 // Test 4068 var pass = doc.getElementsByName && 4069 // buggy browsers will return fewer than the correct 2 4070 doc.getElementsByName( expando ).length === 2 + 4071 // buggy browsers will return more than the correct 0 4072 doc.getElementsByName( expando + 0 ).length; 4073 support.getIdNotName = !doc.getElementById( expando ); 4074 4075 // Cleanup 4076 docElem.removeChild( div ); 4077 4078 return pass; 4079 }); 4080 4081 // IE6/7 return modified attributes 4082 Expr.attrHandle = assert(function( div ) { 4083 div.innerHTML = "<a href='#'></a>"; 4084 return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && 4085 div.firstChild.getAttribute("href") === "#"; 4086 }) ? 4087 {} : 4088 { 4089 "href": function( elem ) { 4090 return elem.getAttribute( "href", 2 ); 4091 }, 4092 "type": function( elem ) { 4093 return elem.getAttribute("type"); 4094 } 4095 }; 4096 4097 // ID find and filter 4098 if ( support.getIdNotName ) { 4099 Expr.find["ID"] = function( id, context ) { 4100 if ( typeof context.getElementById !== strundefined && !documentIsXML ) { 4101 var m = context.getElementById( id ); 4102 // Check parentNode to catch when Blackberry 4.6 returns 4103 // nodes that are no longer in the document #6963 4104 return m && m.parentNode ? [m] : []; 4105 } 4106 }; 4107 Expr.filter["ID"] = function( id ) { 4108 var attrId = id.replace( runescape, funescape ); 4109 return function( elem ) { 4110 return elem.getAttribute("id") === attrId; 4111 }; 4112 }; 4113 } else { 4114 Expr.find["ID"] = function( id, context ) { 4115 if ( typeof context.getElementById !== strundefined && !documentIsXML ) { 4116 var m = context.getElementById( id ); 4117 4118 return m ? 4119 m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? 4120 [m] : 4121 undefined : 4122 []; 4123 } 4124 }; 4125 Expr.filter["ID"] = function( id ) { 4126 var attrId = id.replace( runescape, funescape ); 4127 return function( elem ) { 4128 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); 4129 return node && node.value === attrId; 4130 }; 4131 }; 4132 } 4133 4134 // Tag 4135 Expr.find["TAG"] = support.tagNameNoComments ? 4136 function( tag, context ) { 4137 if ( typeof context.getElementsByTagName !== strundefined ) { 4138 return context.getElementsByTagName( tag ); 4139 } 4140 } : 4141 function( tag, context ) { 4142 var elem, 4143 tmp = [], 4144 i = 0, 4145 results = context.getElementsByTagName( tag ); 4146 4147 // Filter out possible comments 4148 if ( tag === "*" ) { 4149 while ( (elem = results[i++]) ) { 4150 if ( elem.nodeType === 1 ) { 4151 tmp.push( elem ); 4152 } 4153 } 4154 4155 return tmp; 4156 } 4157 return results; 4158 }; 4159 4160 // Name 4161 Expr.find["NAME"] = support.getByName && function( tag, context ) { 4162 if ( typeof context.getElementsByName !== strundefined ) { 4163 return context.getElementsByName( name ); 4164 } 4165 }; 4166 4167 // Class 4168 Expr.find["CLASS"] = support.getByClassName && function( className, context ) { 4169 if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { 4170 return context.getElementsByClassName( className ); 4171 } 4172 }; 4173 4174 // QSA and matchesSelector support 4175 4176 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 4177 rbuggyMatches = []; 4178 4179 // qSa(:focus) reports false when true (Chrome 21), 4180 // no need to also add to buggyMatches since matches checks buggyQSA 4181 // A support test would require too much code (would include document ready) 4182 rbuggyQSA = [ ":focus" ]; 4183 4184 if ( (support.qsa = isNative(doc.querySelectorAll)) ) { 4185 // Build QSA regex 4186 // Regex strategy adopted from Diego Perini 4187 assert(function( div ) { 4188 // Select is set to empty string on purpose 4189 // This is to test IE's treatment of not explictly 4190 // setting a boolean content attribute, 4191 // since its presence should be enough 4192 // http://bugs.jquery.com/ticket/12359 4193 div.innerHTML = "<select><option selected=''></option></select>"; 4194 4195 // IE8 - Some boolean attributes are not treated correctly 4196 if ( !div.querySelectorAll("[selected]").length ) { 4197 rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); 4198 } 4199 4200 // Webkit/Opera - :checked should return selected option elements 4201 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 4202 // IE8 throws error here and will not see later tests 4203 if ( !div.querySelectorAll(":checked").length ) { 4204 rbuggyQSA.push(":checked"); 4205 } 4206 }); 4207 4208 assert(function( div ) { 4209 4210 // Opera 10-12/IE8 - ^= $= *= and empty values 4211 // Should not select anything 4212 div.innerHTML = "<input type='hidden' i=''/>"; 4213 if ( div.querySelectorAll("[i^='']").length ) { 4214 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); 4215 } 4216 4217 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 4218 // IE8 throws error here and will not see later tests 4219 if ( !div.querySelectorAll(":enabled").length ) { 4220 rbuggyQSA.push( ":enabled", ":disabled" ); 4221 } 4222 4223 // Opera 10-11 does not throw on post-comma invalid pseudos 4224 div.querySelectorAll("*,:x"); 4225 rbuggyQSA.push(",.*:"); 4226 }); 4227 } 4228 4229 if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || 4230 docElem.mozMatchesSelector || 4231 docElem.webkitMatchesSelector || 4232 docElem.oMatchesSelector || 4233 docElem.msMatchesSelector) )) ) { 4234 4235 assert(function( div ) { 4236 // Check to see if it's possible to do matchesSelector 4237 // on a disconnected node (IE 9) 4238 support.disconnectedMatch = matches.call( div, "div" ); 4239 4240 // This should fail with an exception 4241 // Gecko does not error, returns false instead 4242 matches.call( div, "[s!='']:x" ); 4243 rbuggyMatches.push( "!=", pseudos ); 4244 }); 4245 } 4246 4247 rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); 4248 rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); 4249 4250 // Element contains another 4251 // Purposefully does not implement inclusive descendent 4252 // As in, an element does not contain itself 4253 contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? 4254 function( a, b ) { 4255 var adown = a.nodeType === 9 ? a.documentElement : a, 4256 bup = b && b.parentNode; 4257 return a === bup || !!( bup && bup.nodeType === 1 && ( 4258 adown.contains ? 4259 adown.contains( bup ) : 4260 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 4261 )); 4262 } : 4263 function( a, b ) { 4264 if ( b ) { 4265 while ( (b = b.parentNode) ) { 4266 if ( b === a ) { 4267 return true; 4268 } 4269 } 4270 } 4271 return false; 4272 }; 4273 4274 // Document order sorting 4275 sortOrder = docElem.compareDocumentPosition ? 4276 function( a, b ) { 4277 var compare; 4278 4279 if ( a === b ) { 4280 hasDuplicate = true; 4281 return 0; 4282 } 4283 4284 if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { 4285 if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { 4286 if ( a === doc || contains( preferredDoc, a ) ) { 4287 return -1; 4288 } 4289 if ( b === doc || contains( preferredDoc, b ) ) { 4290 return 1; 4291 } 4292 return 0; 4293 } 4294 return compare & 4 ? -1 : 1; 4295 } 4296 4297 return a.compareDocumentPosition ? -1 : 1; 4298 } : 4299 function( a, b ) { 4300 var cur, 4301 i = 0, 4302 aup = a.parentNode, 4303 bup = b.parentNode, 4304 ap = [ a ], 4305 bp = [ b ]; 4306 4307 // Exit early if the nodes are identical 4308 if ( a === b ) { 4309 hasDuplicate = true; 4310 return 0; 4311 4312 // Parentless nodes are either documents or disconnected 4313 } else if ( !aup || !bup ) { 4314 return a === doc ? -1 : 4315 b === doc ? 1 : 4316 aup ? -1 : 4317 bup ? 1 : 4318 0; 4319 4320 // If the nodes are siblings, we can do a quick check 4321 } else if ( aup === bup ) { 4322 return siblingCheck( a, b ); 4323 } 4324 4325 // Otherwise we need full lists of their ancestors for comparison 4326 cur = a; 4327 while ( (cur = cur.parentNode) ) { 4328 ap.unshift( cur ); 4329 } 4330 cur = b; 4331 while ( (cur = cur.parentNode) ) { 4332 bp.unshift( cur ); 4333 } 4334 4335 // Walk down the tree looking for a discrepancy 4336 while ( ap[i] === bp[i] ) { 4337 i++; 4338 } 4339 4340 return i ? 4341 // Do a sibling check if the nodes have a common ancestor 4342 siblingCheck( ap[i], bp[i] ) : 4343 4344 // Otherwise nodes in our document sort first 4345 ap[i] === preferredDoc ? -1 : 4346 bp[i] === preferredDoc ? 1 : 4347 0; 4348 }; 4349 4350 // Always assume the presence of duplicates if sort doesn't 4351 // pass them to our comparison function (as in Google Chrome). 4352 hasDuplicate = false; 4353 [0, 0].sort( sortOrder ); 4354 support.detectDuplicates = hasDuplicate; 4355 4356 return document; 4357 }; 3939 4358 3940 4359 Sizzle.matches = function( expr, elements ) { … … 3943 4362 3944 4363 Sizzle.matchesSelector = function( elem, expr ) { 3945 return Sizzle( expr, null, null, [ elem ] ).length > 0; 4364 // Set document vars if needed 4365 if ( ( elem.ownerDocument || elem ) !== document ) { 4366 setDocument( elem ); 4367 } 4368 4369 // Make sure that attribute selectors are quoted 4370 expr = expr.replace( rattributeQuotes, "='$1']" ); 4371 4372 // rbuggyQSA always contains :focus, so no need for an existence check 4373 if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { 4374 try { 4375 var ret = matches.call( elem, expr ); 4376 4377 // IE 9's matchesSelector returns false on disconnected nodes 4378 if ( ret || support.disconnectedMatch || 4379 // As well, disconnected nodes are said to be in a document 4380 // fragment in IE 9 4381 elem.document && elem.document.nodeType !== 11 ) { 4382 return ret; 4383 } 4384 } catch(e) {} 4385 } 4386 4387 return Sizzle( expr, document, null, [elem] ).length > 0; 3946 4388 }; 4389 4390 Sizzle.contains = function( context, elem ) { 4391 // Set document vars if needed 4392 if ( ( context.ownerDocument || context ) !== document ) { 4393 setDocument( context ); 4394 } 4395 return contains( context, elem ); 4396 }; 4397 4398 Sizzle.attr = function( elem, name ) { 4399 var val; 4400 4401 // Set document vars if needed 4402 if ( ( elem.ownerDocument || elem ) !== document ) { 4403 setDocument( elem ); 4404 } 4405 4406 if ( !documentIsXML ) { 4407 name = name.toLowerCase(); 4408 } 4409 if ( (val = Expr.attrHandle[ name ]) ) { 4410 return val( elem ); 4411 } 4412 if ( documentIsXML || support.attributes ) { 4413 return elem.getAttribute( name ); 4414 } 4415 return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? 4416 name : 4417 val && val.specified ? val.value : null; 4418 }; 4419 4420 Sizzle.error = function( msg ) { 4421 throw new Error( "Syntax error, unrecognized expression: " + msg ); 4422 }; 4423 4424 // Document sorting and removing duplicates 4425 Sizzle.uniqueSort = function( results ) { 4426 var elem, 4427 duplicates = [], 4428 i = 1, 4429 j = 0; 4430 4431 // Unless we *know* we can detect duplicates, assume their presence 4432 hasDuplicate = !support.detectDuplicates; 4433 results.sort( sortOrder ); 4434 4435 if ( hasDuplicate ) { 4436 for ( ; (elem = results[i]); i++ ) { 4437 if ( elem === results[ i - 1 ] ) { 4438 j = duplicates.push( i ); 4439 } 4440 } 4441 while ( j-- ) { 4442 results.splice( duplicates[ j ], 1 ); 4443 } 4444 } 4445 4446 return results; 4447 }; 4448 4449 function siblingCheck( a, b ) { 4450 var cur = b && a, 4451 diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); 4452 4453 // Use IE sourceIndex if available on both nodes 4454 if ( diff ) { 4455 return diff; 4456 } 4457 4458 // Check if b follows a 4459 if ( cur ) { 4460 while ( (cur = cur.nextSibling) ) { 4461 if ( cur === b ) { 4462 return -1; 4463 } 4464 } 4465 } 4466 4467 return a ? 1 : -1; 4468 } 3947 4469 3948 4470 // Returns a function to use in pseudos for input types … … 3991 4513 nodeType = elem.nodeType; 3992 4514 3993 if ( nodeType ) { 3994 if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 3995 // Use textContent for elements 3996 // innerText usage removed for consistency of new lines (see #11153) 3997 if ( typeof elem.textContent === "string" ) { 3998 return elem.textContent; 3999 } else { 4000 // Traverse its children 4001 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 4002 ret += getText( elem ); 4003 } 4004 } 4005 } else if ( nodeType === 3 || nodeType === 4 ) { 4006 return elem.nodeValue; 4007 } 4008 // Do not include comment or processing instruction nodes 4009 } else { 4010 4515 if ( !nodeType ) { 4011 4516 // If no nodeType, this is expected to be an array 4012 4517 for ( ; (node = elem[i]); i++ ) { … … 4014 4519 ret += getText( node ); 4015 4520 } 4016 } 4521 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 4522 // Use textContent for elements 4523 // innerText usage removed for consistency of new lines (see #11153) 4524 if ( typeof elem.textContent === "string" ) { 4525 return elem.textContent; 4526 } else { 4527 // Traverse its children 4528 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 4529 ret += getText( elem ); 4530 } 4531 } 4532 } else if ( nodeType === 3 || nodeType === 4 ) { 4533 return elem.nodeValue; 4534 } 4535 // Do not include comment or processing instruction nodes 4536 4017 4537 return ret; 4018 4538 }; 4019 4539 4020 isXML = Sizzle.isXML = function( elem ) {4021 // documentElement is verified for cases where it doesn't yet exist4022 // (such as loading iframes in IE - #4833)4023 var documentElement = elem && (elem.ownerDocument || elem).documentElement;4024 return documentElement ? documentElement.nodeName !== "HTML" : false;4025 };4026 4027 // Element contains another4028 contains = Sizzle.contains = docElem.contains ?4029 function( a, b ) {4030 var adown = a.nodeType === 9 ? a.documentElement : a,4031 bup = b && b.parentNode;4032 return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );4033 } :4034 docElem.compareDocumentPosition ?4035 function( a, b ) {4036 return b && !!( a.compareDocumentPosition( b ) & 16 );4037 } :4038 function( a, b ) {4039 while ( (b = b.parentNode) ) {4040 if ( b === a ) {4041 return true;4042 }4043 }4044 return false;4045 };4046 4047 Sizzle.attr = function( elem, name ) {4048 var val,4049 xml = isXML( elem );4050 4051 if ( !xml ) {4052 name = name.toLowerCase();4053 }4054 if ( (val = Expr.attrHandle[ name ]) ) {4055 return val( elem );4056 }4057 if ( xml || assertAttributes ) {4058 return elem.getAttribute( name );4059 }4060 val = elem.getAttributeNode( name );4061 return val ?4062 typeof elem[ name ] === "boolean" ?4063 elem[ name ] ? name : null :4064 val.specified ? val.value : null :4065 null;4066 };4067 4068 4540 Expr = Sizzle.selectors = { 4069 4541 … … 4075 4547 match: matchExpr, 4076 4548 4077 // IE6/7 return a modified href 4078 attrHandle: assertHrefNotNormalized ? 4079 {} : 4080 { 4081 "href": function( elem ) { 4082 return elem.getAttribute( "href", 2 ); 4083 }, 4084 "type": function( elem ) { 4085 return elem.getAttribute("type"); 4086 } 4087 }, 4088 4089 find: { 4090 "ID": assertGetIdNotName ? 4091 function( id, context, xml ) { 4092 if ( typeof context.getElementById !== strundefined && !xml ) { 4093 var m = context.getElementById( id ); 4094 // Check parentNode to catch when Blackberry 4.6 returns 4095 // nodes that are no longer in the document #6963 4096 return m && m.parentNode ? [m] : []; 4097 } 4098 } : 4099 function( id, context, xml ) { 4100 if ( typeof context.getElementById !== strundefined && !xml ) { 4101 var m = context.getElementById( id ); 4102 4103 return m ? 4104 m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? 4105 [m] : 4106 undefined : 4107 []; 4108 } 4109 }, 4110 4111 "TAG": assertTagNameNoComments ? 4112 function( tag, context ) { 4113 if ( typeof context.getElementsByTagName !== strundefined ) { 4114 return context.getElementsByTagName( tag ); 4115 } 4116 } : 4117 function( tag, context ) { 4118 var results = context.getElementsByTagName( tag ); 4119 4120 // Filter out possible comments 4121 if ( tag === "*" ) { 4122 var elem, 4123 tmp = [], 4124 i = 0; 4125 4126 for ( ; (elem = results[i]); i++ ) { 4127 if ( elem.nodeType === 1 ) { 4128 tmp.push( elem ); 4129 } 4130 } 4131 4132 return tmp; 4133 } 4134 return results; 4135 }, 4136 4137 "NAME": assertUsableName && function( tag, context ) { 4138 if ( typeof context.getElementsByName !== strundefined ) { 4139 return context.getElementsByName( name ); 4140 } 4141 }, 4142 4143 "CLASS": assertUsableClassName && function( className, context, xml ) { 4144 if ( typeof context.getElementsByClassName !== strundefined && !xml ) { 4145 return context.getElementsByClassName( className ); 4146 } 4147 } 4148 }, 4549 find: {}, 4149 4550 4150 4551 relative: { … … 4157 4558 preFilter: { 4158 4559 "ATTR": function( match ) { 4159 match[1] = match[1].replace( r backslash, "");4560 match[1] = match[1].replace( runescape, funescape ); 4160 4561 4161 4562 // Move the given value to match[3] whether quoted or unquoted 4162 match[3] = ( match[4] || match[5] || "" ).replace( r backslash, "");4563 match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); 4163 4564 4164 4565 if ( match[2] === "~=" ) { … … 4172 4573 /* matches from matchExpr["CHILD"] 4173 4574 1 type (only|nth|...) 4174 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4175 3 xn-component of xn+y argument ([+-]?\d*n|) 4176 4 sign of xn-component 4177 5 x of xn-component 4178 6 sign of y-component 4179 7 y of y-component 4575 2 what (child|of-type) 4576 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4577 4 xn-component of xn+y argument ([+-]?\d*n|) 4578 5 sign of xn-component 4579 6 x of xn-component 4580 7 sign of y-component 4581 8 y of y-component 4180 4582 */ 4181 4583 match[1] = match[1].toLowerCase(); 4182 4584 4183 if ( match[1] === "nth" ) {4184 // nth- childrequires argument4185 if ( !match[ 2] ) {4585 if ( match[1].slice( 0, 3 ) === "nth" ) { 4586 // nth-* requires argument 4587 if ( !match[3] ) { 4186 4588 Sizzle.error( match[0] ); 4187 4589 } … … 4189 4591 // numeric x and y parameters for Expr.filter.CHILD 4190 4592 // remember that false/true cast respectively to 0/1 4191 match[ 3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );4192 match[ 4] = +( ( match[6] + match[7] ) || match[2] === "odd" );4593 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); 4594 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); 4193 4595 4194 4596 // other types prohibit arguments 4195 } else if ( match[ 2] ) {4597 } else if ( match[3] ) { 4196 4598 Sizzle.error( match[0] ); 4197 4599 } … … 4201 4603 4202 4604 "PSEUDO": function( match ) { 4203 var unquoted, excess; 4605 var excess, 4606 unquoted = !match[5] && match[2]; 4607 4204 4608 if ( matchExpr["CHILD"].test( match[0] ) ) { 4205 4609 return null; 4206 4610 } 4207 4611 4208 if ( match[3] ) { 4209 match[2] = match[3]; 4210 } else if ( (unquoted = match[4]) ) { 4211 // Only check arguments that contain a pseudo 4212 if ( rpseudo.test(unquoted) && 4213 // Get excess from tokenize (recursively) 4214 (excess = tokenize( unquoted, true )) && 4215 // advance to the next closing parenthesis 4216 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { 4217 4218 // excess is a negative index 4219 unquoted = unquoted.slice( 0, excess ); 4220 match[0] = match[0].slice( 0, excess ); 4221 } 4222 match[2] = unquoted; 4612 // Accept quoted arguments as-is 4613 if ( match[4] ) { 4614 match[2] = match[4]; 4615 4616 // Strip excess characters from unquoted arguments 4617 } else if ( unquoted && rpseudo.test( unquoted ) && 4618 // Get excess from tokenize (recursively) 4619 (excess = tokenize( unquoted, true )) && 4620 // advance to the next closing parenthesis 4621 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { 4622 4623 // excess is a negative index 4624 match[0] = match[0].slice( 0, excess ); 4625 match[2] = unquoted.slice( 0, excess ); 4223 4626 } 4224 4627 … … 4229 4632 4230 4633 filter: { 4231 "ID": assertGetIdNotName ?4232 function( id ) {4233 id = id.replace( rbackslash, "" );4234 return function( elem ) {4235 return elem.getAttribute("id") === id;4236 };4237 } :4238 function( id ) {4239 id = id.replace( rbackslash, "" );4240 return function( elem ) {4241 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");4242 return node && node.value === id;4243 };4244 },4245 4634 4246 4635 "TAG": function( nodeName ) { … … 4248 4637 return function() { return true; }; 4249 4638 } 4250 nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); 4251 4639 4640 nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); 4252 4641 return function( elem ) { 4253 4642 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; … … 4256 4645 4257 4646 "CLASS": function( className ) { 4258 var pattern = classCache[ expando ][className + " " ];4647 var pattern = classCache[ className + " " ]; 4259 4648 4260 4649 return pattern || … … 4266 4655 4267 4656 "ATTR": function( name, operator, check ) { 4268 return function( elem , context) {4657 return function( elem ) { 4269 4658 var result = Sizzle.attr( elem, name ); 4270 4659 … … 4282 4671 operator === "^=" ? check && result.indexOf( check ) === 0 : 4283 4672 operator === "*=" ? check && result.indexOf( check ) > -1 : 4284 operator === "$=" ? check && result.s ubstr( result.length -check.length ) === check :4673 operator === "$=" ? check && result.slice( -check.length ) === check : 4285 4674 operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : 4286 operator === "|=" ? result === check || result.s ubstr( 0, check.length + 1 ) === check + "-" :4675 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 4287 4676 false; 4288 4677 }; 4289 4678 }, 4290 4679 4291 "CHILD": function( type, argument, first, last ) { 4292 4293 if ( type === "nth" ) { 4294 return function( elem ) { 4295 var node, diff, 4296 parent = elem.parentNode; 4297 4298 if ( first === 1 && last === 0 ) { 4299 return true; 4300 } 4680 "CHILD": function( type, what, argument, first, last ) { 4681 var simple = type.slice( 0, 3 ) !== "nth", 4682 forward = type.slice( -4 ) !== "last", 4683 ofType = what === "of-type"; 4684 4685 return first === 1 && last === 0 ? 4686 4687 // Shortcut for :nth-*(n) 4688 function( elem ) { 4689 return !!elem.parentNode; 4690 } : 4691 4692 function( elem, context, xml ) { 4693 var cache, outerCache, node, diff, nodeIndex, start, 4694 dir = simple !== forward ? "nextSibling" : "previousSibling", 4695 parent = elem.parentNode, 4696 name = ofType && elem.nodeName.toLowerCase(), 4697 useCache = !xml && !ofType; 4301 4698 4302 4699 if ( parent ) { 4303 diff = 0; 4304 for ( node = parent.firstChild; node; node = node.nextSibling ) { 4305 if ( node.nodeType === 1 ) { 4306 diff++; 4307 if ( elem === node ) { 4700 4701 // :(first|last|only)-(child|of-type) 4702 if ( simple ) { 4703 while ( dir ) { 4704 node = elem; 4705 while ( (node = node[ dir ]) ) { 4706 if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { 4707 return false; 4708 } 4709 } 4710 // Reverse direction for :only-* (if we haven't yet done so) 4711 start = dir = type === "only" && !start && "nextSibling"; 4712 } 4713 return true; 4714 } 4715 4716 start = [ forward ? parent.firstChild : parent.lastChild ]; 4717 4718 // non-xml :nth-child(...) stores cache data on `parent` 4719 if ( forward && useCache ) { 4720 // Seek `elem` from a previously-cached index 4721 outerCache = parent[ expando ] || (parent[ expando ] = {}); 4722 cache = outerCache[ type ] || []; 4723 nodeIndex = cache[0] === dirruns && cache[1]; 4724 diff = cache[0] === dirruns && cache[2]; 4725 node = nodeIndex && parent.childNodes[ nodeIndex ]; 4726 4727 while ( (node = ++nodeIndex && node && node[ dir ] || 4728 4729 // Fallback to seeking `elem` from the start 4730 (diff = nodeIndex = 0) || start.pop()) ) { 4731 4732 // When found, cache indexes on `parent` and break 4733 if ( node.nodeType === 1 && ++diff && node === elem ) { 4734 outerCache[ type ] = [ dirruns, nodeIndex, diff ]; 4308 4735 break; 4309 4736 } 4310 4737 } 4311 } 4312 } 4313 4314 // Incorporate the offset (or cast to NaN), then check against cycle size 4315 diff -= last; 4316 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 4317 }; 4318 } 4319 4320 return function( elem ) { 4321 var node = elem; 4322 4323 switch ( type ) { 4324 case "only": 4325 case "first": 4326 while ( (node = node.previousSibling) ) { 4327 if ( node.nodeType === 1 ) { 4328 return false; 4738 4739 // Use previously-cached element index if available 4740 } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { 4741 diff = cache[1]; 4742 4743 // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) 4744 } else { 4745 // Use the same loop as above to seek `elem` from the start 4746 while ( (node = ++nodeIndex && node && node[ dir ] || 4747 (diff = nodeIndex = 0) || start.pop()) ) { 4748 4749 if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { 4750 // Cache the index of each encountered element 4751 if ( useCache ) { 4752 (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; 4753 } 4754 4755 if ( node === elem ) { 4756 break; 4757 } 4758 } 4329 4759 } 4330 4760 } 4331 4761 4332 if ( type === "first" ) { 4333 return true; 4334 } 4335 4336 node = elem; 4337 4338 /* falls through */ 4339 case "last": 4340 while ( (node = node.nextSibling) ) { 4341 if ( node.nodeType === 1 ) { 4342 return false; 4343 } 4344 } 4345 4346 return true; 4347 } 4348 }; 4762 // Incorporate the offset, then check against cycle size 4763 diff -= last; 4764 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 4765 } 4766 }; 4349 4767 }, 4350 4768 … … 4388 4806 4389 4807 pseudos: { 4808 // Potentially complex pseudos 4390 4809 "not": markFunction(function( selector ) { 4391 4810 // Trim the selector passed to compile … … 4428 4847 }), 4429 4848 4849 // "Whether an element is represented by a :lang() selector 4850 // is based solely on the element's language value 4851 // being equal to the identifier C, 4852 // or beginning with the identifier C immediately followed by "-". 4853 // The matching of C against the element's language value is performed case-insensitively. 4854 // The identifier C does not have to be a valid language name." 4855 // http://www.w3.org/TR/selectors/#lang-pseudo 4856 "lang": markFunction( function( lang ) { 4857 // lang value must be a valid identifider 4858 if ( !ridentifier.test(lang || "") ) { 4859 Sizzle.error( "unsupported lang: " + lang ); 4860 } 4861 lang = lang.replace( runescape, funescape ).toLowerCase(); 4862 return function( elem ) { 4863 var elemLang; 4864 do { 4865 if ( (elemLang = documentIsXML ? 4866 elem.getAttribute("xml:lang") || elem.getAttribute("lang") : 4867 elem.lang) ) { 4868 4869 elemLang = elemLang.toLowerCase(); 4870 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 4871 } 4872 } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); 4873 return false; 4874 }; 4875 }), 4876 4877 // Miscellaneous 4878 "target": function( elem ) { 4879 var hash = window.location && window.location.hash; 4880 return hash && hash.slice( 1 ) === elem.id; 4881 }, 4882 4883 "root": function( elem ) { 4884 return elem === docElem; 4885 }, 4886 4887 "focus": function( elem ) { 4888 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 4889 }, 4890 4891 // Boolean properties 4430 4892 "enabled": function( elem ) { 4431 4893 return elem.disabled === false; … … 4453 4915 }, 4454 4916 4455 "parent": function( elem ) { 4456 return !Expr.pseudos["empty"]( elem ); 4457 }, 4458 4917 // Contents 4459 4918 "empty": function( elem ) { 4460 4919 // http://www.w3.org/TR/selectors/#empty-pseudo … … 4463 4922 // Thanks to Diego Perini for the nodeName shortcut 4464 4923 // Greater than "@" means alpha characters (specifically not starting with "#" or "?") 4465 var nodeType; 4466 elem = elem.firstChild; 4467 while ( elem ) { 4468 if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { 4924 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 4925 if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { 4469 4926 return false; 4470 4927 } 4471 elem = elem.nextSibling;4472 4928 } 4473 4929 return true; 4474 4930 }, 4475 4931 4932 "parent": function( elem ) { 4933 return !Expr.pseudos["empty"]( elem ); 4934 }, 4935 4936 // Element/input types 4476 4937 "header": function( elem ) { 4477 4938 return rheader.test( elem.nodeName ); 4478 4939 }, 4479 4940 4480 "text": function( elem ) { 4481 var type, attr; 4482 // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 4483 // use getAttribute instead to test this case 4484 return elem.nodeName.toLowerCase() === "input" && 4485 (type = elem.type) === "text" && 4486 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); 4941 "input": function( elem ) { 4942 return rinputs.test( elem.nodeName ); 4487 4943 }, 4488 4489 // Input types4490 "radio": createInputPseudo("radio"),4491 "checkbox": createInputPseudo("checkbox"),4492 "file": createInputPseudo("file"),4493 "password": createInputPseudo("password"),4494 "image": createInputPseudo("image"),4495 4496 "submit": createButtonPseudo("submit"),4497 "reset": createButtonPseudo("reset"),4498 4944 4499 4945 "button": function( elem ) { … … 4502 4948 }, 4503 4949 4504 "input": function( elem ) { 4505 return rinputs.test( elem.nodeName ); 4950 "text": function( elem ) { 4951 var attr; 4952 // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 4953 // use getAttribute instead to test this case 4954 return elem.nodeName.toLowerCase() === "input" && 4955 elem.type === "text" && 4956 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); 4506 4957 }, 4507 4958 4508 "focus": function( elem ) { 4509 var doc = elem.ownerDocument; 4510 return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 4511 }, 4512 4513 "active": function( elem ) { 4514 return elem === elem.ownerDocument.activeElement; 4515 }, 4516 4517 // Positional types 4959 // Position-in-collection 4518 4960 "first": createPositionalPseudo(function() { 4519 4961 return [ 0 ]; … … 4529 4971 4530 4972 "even": createPositionalPseudo(function( matchIndexes, length ) { 4531 for ( var i = 0; i < length; i += 2 ) { 4973 var i = 0; 4974 for ( ; i < length; i += 2 ) { 4532 4975 matchIndexes.push( i ); 4533 4976 } … … 4536 4979 4537 4980 "odd": createPositionalPseudo(function( matchIndexes, length ) { 4538 for ( var i = 1; i < length; i += 2 ) { 4981 var i = 1; 4982 for ( ; i < length; i += 2 ) { 4539 4983 matchIndexes.push( i ); 4540 4984 } … … 4543 4987 4544 4988 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { 4545 for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) { 4989 var i = argument < 0 ? argument + length : argument; 4990 for ( ; --i >= 0; ) { 4546 4991 matchIndexes.push( i ); 4547 4992 } … … 4550 4995 4551 4996 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { 4552 for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) { 4997 var i = argument < 0 ? argument + length : argument; 4998 for ( ; ++i < length; ) { 4553 4999 matchIndexes.push( i ); 4554 5000 } … … 4558 5004 }; 4559 5005 4560 function siblingCheck( a, b, ret ) { 4561 if ( a === b ) { 4562 return ret; 4563 } 4564 4565 var cur = a.nextSibling; 4566 4567 while ( cur ) { 4568 if ( cur === b ) { 4569 return -1; 4570 } 4571 4572 cur = cur.nextSibling; 4573 } 4574 4575 return 1; 5006 // Add button/input type pseudos 5007 for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 5008 Expr.pseudos[ i ] = createInputPseudo( i ); 4576 5009 } 4577 4578 sortOrder = docElem.compareDocumentPosition ? 4579 function( a, b ) { 4580 if ( a === b ) { 4581 hasDuplicate = true; 4582 return 0; 4583 } 4584 4585 return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? 4586 a.compareDocumentPosition : 4587 a.compareDocumentPosition(b) & 4 4588 ) ? -1 : 1; 4589 } : 4590 function( a, b ) { 4591 // The nodes are identical, we can exit early 4592 if ( a === b ) { 4593 hasDuplicate = true; 4594 return 0; 4595 4596 // Fallback to using sourceIndex (in IE) if it's available on both nodes 4597 } else if ( a.sourceIndex && b.sourceIndex ) { 4598 return a.sourceIndex - b.sourceIndex; 4599 } 4600 4601 var al, bl, 4602 ap = [], 4603 bp = [], 4604 aup = a.parentNode, 4605 bup = b.parentNode, 4606 cur = aup; 4607 4608 // If the nodes are siblings (or identical) we can do a quick check 4609 if ( aup === bup ) { 4610 return siblingCheck( a, b ); 4611 4612 // If no parents were found then the nodes are disconnected 4613 } else if ( !aup ) { 4614 return -1; 4615 4616 } else if ( !bup ) { 4617 return 1; 4618 } 4619 4620 // Otherwise they're somewhere else in the tree so we need 4621 // to build up a full list of the parentNodes for comparison 4622 while ( cur ) { 4623 ap.unshift( cur ); 4624 cur = cur.parentNode; 4625 } 4626 4627 cur = bup; 4628 4629 while ( cur ) { 4630 bp.unshift( cur ); 4631 cur = cur.parentNode; 4632 } 4633 4634 al = ap.length; 4635 bl = bp.length; 4636 4637 // Start walking down the tree looking for a discrepancy 4638 for ( var i = 0; i < al && i < bl; i++ ) { 4639 if ( ap[i] !== bp[i] ) { 4640 return siblingCheck( ap[i], bp[i] ); 4641 } 4642 } 4643 4644 // We ended someplace up the tree so do a sibling check 4645 return i === al ? 4646 siblingCheck( a, bp[i], -1 ) : 4647 siblingCheck( ap[i], b, 1 ); 4648 }; 4649 4650 // Always assume the presence of duplicates if sort doesn't 4651 // pass them to our comparison function (as in Google Chrome). 4652 [0, 0].sort( sortOrder ); 4653 baseHasDuplicate = !hasDuplicate; 4654 4655 // Document sorting and removing duplicates 4656 Sizzle.uniqueSort = function( results ) { 4657 var elem, 4658 duplicates = [], 4659 i = 1, 4660 j = 0; 4661 4662 hasDuplicate = baseHasDuplicate; 4663 results.sort( sortOrder ); 4664 4665 if ( hasDuplicate ) { 4666 for ( ; (elem = results[i]); i++ ) { 4667 if ( elem === results[ i - 1 ] ) { 4668 j = duplicates.push( i ); 4669 } 4670 } 4671 while ( j-- ) { 4672 results.splice( duplicates[ j ], 1 ); 4673 } 4674 } 4675 4676 return results; 4677 }; 4678 4679 Sizzle.error = function( msg ) { 4680 throw new Error( "Syntax error, unrecognized expression: " + msg ); 4681 }; 5010 for ( i in { submit: true, reset: true } ) { 5011 Expr.pseudos[ i ] = createButtonPseudo( i ); 5012 } 4682 5013 4683 5014 function tokenize( selector, parseOnly ) { 4684 5015 var matched, match, tokens, type, 4685 5016 soFar, groups, preFilters, 4686 cached = tokenCache[ expando ][selector + " " ];5017 cached = tokenCache[ selector + " " ]; 4687 5018 4688 5019 if ( cached ) { … … 4709 5040 // Combinators 4710 5041 if ( (match = rcombinators.exec( soFar )) ) { 4711 tokens.push( matched = new Token( match.shift() ) ); 5042 matched = match.shift(); 5043 tokens.push( { 5044 value: matched, 5045 // Cast descendant combinators to space 5046 type: match[0].replace( rtrim, " " ) 5047 } ); 4712 5048 soFar = soFar.slice( matched.length ); 4713 4714 // Cast descendant combinators to space4715 matched.type = match[0].replace( rtrim, " " );4716 5049 } 4717 5050 … … 4720 5053 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || 4721 5054 (match = preFilters[ type ]( match ))) ) { 4722 4723 tokens.push( matched = new Token( match.shift() ) ); 5055 matched = match.shift(); 5056 tokens.push( { 5057 value: matched, 5058 type: type, 5059 matches: match 5060 } ); 4724 5061 soFar = soFar.slice( matched.length ); 4725 matched.type = type;4726 matched.matches = match;4727 5062 } 4728 5063 } … … 4744 5079 } 4745 5080 5081 function toSelector( tokens ) { 5082 var i = 0, 5083 len = tokens.length, 5084 selector = ""; 5085 for ( ; i < len; i++ ) { 5086 selector += tokens[i].value; 5087 } 5088 return selector; 5089 } 5090 4746 5091 function addCombinator( matcher, combinator, base ) { 4747 5092 var dir = combinator.dir, 4748 checkNonElements = base && combinator.dir === "parentNode",5093 checkNonElements = base && dir === "parentNode", 4749 5094 doneName = done++; 4750 5095 … … 4753 5098 function( elem, context, xml ) { 4754 5099 while ( (elem = elem[ dir ]) ) { 4755 if ( checkNonElements || elem.nodeType === 1) {5100 if ( elem.nodeType === 1 || checkNonElements ) { 4756 5101 return matcher( elem, context, xml ); 4757 5102 } … … 4761 5106 // Check against all ancestor/preceding elements 4762 5107 function( elem, context, xml ) { 5108 var data, cache, outerCache, 5109 dirkey = dirruns + " " + doneName; 5110 4763 5111 // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching 4764 if ( !xml ) { 4765 var cache, 4766 dirkey = dirruns + " " + doneName + " ", 4767 cachedkey = dirkey + cachedruns; 5112 if ( xml ) { 4768 5113 while ( (elem = elem[ dir ]) ) { 4769 if ( checkNonElements || elem.nodeType === 1 ) { 4770 if ( (cache = elem[ expando ]) === cachedkey ) { 4771 return elem.sizset; 4772 } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { 4773 if ( elem.sizset ) { 4774 return elem; 5114 if ( elem.nodeType === 1 || checkNonElements ) { 5115 if ( matcher( elem, context, xml ) ) { 5116 return true; 5117 } 5118 } 5119 } 5120 } else { 5121 while ( (elem = elem[ dir ]) ) { 5122 if ( elem.nodeType === 1 || checkNonElements ) { 5123 outerCache = elem[ expando ] || (elem[ expando ] = {}); 5124 if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { 5125 if ( (data = cache[1]) === true || data === cachedruns ) { 5126 return data === true; 4775 5127 } 4776 5128 } else { 4777 elem[ expando ] = cachedkey;4778 if ( matcher( elem, context, xml ) ) {4779 elem.sizset = true;4780 return elem;5129 cache = outerCache[ dir ] = [ dirkey ]; 5130 cache[1] = matcher( elem, context, xml ) || cachedruns; 5131 if ( cache[1] === true ) { 5132 return true; 4781 5133 } 4782 elem.sizset = false;4783 }4784 }4785 }4786 } else {4787 while ( (elem = elem[ dir ]) ) {4788 if ( checkNonElements || elem.nodeType === 1 ) {4789 if ( matcher( elem, context, xml ) ) {4790 return elem;4791 5134 } 4792 5135 } … … 4947 5290 for ( ; i < len; i++ ) { 4948 5291 if ( (matcher = Expr.relative[ tokens[i].type ]) ) { 4949 matchers = [ addCombinator( elementMatcher( matchers ), matcher) ];5292 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; 4950 5293 } else { 4951 5294 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); … … 4962 5305 return setMatcher( 4963 5306 i > 1 && elementMatcher( matchers ), 4964 i > 1 && to kens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),5307 i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), 4965 5308 matcher, 4966 5309 i < j && matcherFromTokens( tokens.slice( i, j ) ), 4967 5310 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), 4968 j < len && to kens.join("")5311 j < len && toSelector( tokens ) 4969 5312 ); 4970 5313 } … … 4977 5320 4978 5321 function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 4979 var bySet = setMatchers.length > 0, 5322 // A counter to specify which element is currently being matched 5323 var matcherCachedRuns = 0, 5324 bySet = setMatchers.length > 0, 4980 5325 byElement = elementMatchers.length > 0, 4981 5326 superMatcher = function( seed, context, xml, results, expandContext ) { … … 4989 5334 // We must always have either seed elements or context 4990 5335 elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), 4991 // Nested matchers should use non-integer dirruns4992 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math. E);5336 // Use integer dirruns iff this is the outermost matcher 5337 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); 4993 5338 4994 5339 if ( outermost ) { 4995 5340 outermostContext = context !== document && context; 4996 cachedruns = superMatcher.el;5341 cachedruns = matcherCachedRuns; 4997 5342 } 4998 5343 4999 5344 // Add elements passing elementMatchers directly to results 5345 // Keep `i` a string if there are no elements so `matchedCount` will be "00" below 5000 5346 for ( ; (elem = elems[i]) != null; i++ ) { 5001 5347 if ( byElement && elem ) { 5002 for ( j = 0; (matcher = elementMatchers[j]); j++ ) { 5348 j = 0; 5349 while ( (matcher = elementMatchers[j++]) ) { 5003 5350 if ( matcher( elem, context, xml ) ) { 5004 5351 results.push( elem ); … … 5008 5355 if ( outermost ) { 5009 5356 dirruns = dirrunsUnique; 5010 cachedruns = ++ superMatcher.el;5357 cachedruns = ++matcherCachedRuns; 5011 5358 } 5012 5359 } … … 5029 5376 matchedCount += i; 5030 5377 if ( bySet && i !== matchedCount ) { 5031 for ( j = 0; (matcher = setMatchers[j]); j++ ) { 5378 j = 0; 5379 while ( (matcher = setMatchers[j++]) ) { 5032 5380 matcher( unmatched, setMatched, context, xml ); 5033 5381 } … … 5067 5415 }; 5068 5416 5069 superMatcher.el = 0;5070 5417 return bySet ? 5071 5418 markFunction( superMatcher ) : … … 5077 5424 setMatchers = [], 5078 5425 elementMatchers = [], 5079 cached = compilerCache[ expando ][selector + " " ];5426 cached = compilerCache[ selector + " " ]; 5080 5427 5081 5428 if ( !cached ) { … … 5109 5456 } 5110 5457 5111 function select( selector, context, results, seed , xml) {5458 function select( selector, context, results, seed ) { 5112 5459 var i, tokens, token, type, find, 5113 match = tokenize( selector ), 5114 j = match.length; 5460 match = tokenize( selector ); 5115 5461 5116 5462 if ( !seed ) { … … 5121 5467 tokens = match[0] = match[0].slice( 0 ); 5122 5468 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && 5123 context.nodeType === 9 && ! xml&&5469 context.nodeType === 9 && !documentIsXML && 5124 5470 Expr.relative[ tokens[1].type ] ) { 5125 5471 5126 context = Expr.find["ID"]( token.matches[0].replace( r backslash, "" ), context, xml)[0];5472 context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; 5127 5473 if ( !context ) { 5128 5474 return results; 5129 5475 } 5130 5476 5131 selector = selector.slice( tokens.shift(). length );5477 selector = selector.slice( tokens.shift().value.length ); 5132 5478 } 5133 5479 5134 5480 // Fetch a seed set for right-to-left matching 5135 for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { 5481 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; 5482 while ( i-- ) { 5136 5483 token = tokens[i]; 5137 5484 … … 5143 5490 // Search, expanding context for leading sibling combinators 5144 5491 if ( (seed = find( 5145 token.matches[0].replace( rbackslash, "" ), 5146 rsibling.test( tokens[0].type ) && context.parentNode || context, 5147 xml 5492 token.matches[0].replace( runescape, funescape ), 5493 rsibling.test( tokens[0].type ) && context.parentNode || context 5148 5494 )) ) { 5149 5495 5150 5496 // If seed is empty or no tokens remain, we can return early 5151 5497 tokens.splice( i, 1 ); 5152 selector = seed.length && to kens.join("");5498 selector = seed.length && toSelector( tokens ); 5153 5499 if ( !selector ) { 5154 5500 push.apply( results, slice.call( seed, 0 ) ); … … 5168 5514 seed, 5169 5515 context, 5170 xml,5516 documentIsXML, 5171 5517 results, 5172 5518 rsibling.test( selector ) … … 5175 5521 } 5176 5522 5177 if ( document.querySelectorAll ) {5178 (function() {5179 var disconnectedMatch,5180 oldSelect = select,5181 rescape = /'|\\/g,5182 rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,5183 5184 // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA5185 // A support test would require too much code (would include document ready)5186 rbuggyQSA = [ ":focus" ],5187 5188 // matchesSelector(:active) reports false when true (IE9/Opera 11.5)5189 // A support test would require too much code (would include document ready)5190 // just skip matchesSelector for :active5191 rbuggyMatches = [ ":active" ],5192 matches = docElem.matchesSelector ||5193 docElem.mozMatchesSelector ||5194 docElem.webkitMatchesSelector ||5195 docElem.oMatchesSelector ||5196 docElem.msMatchesSelector;5197 5198 // Build QSA regex5199 // Regex strategy adopted from Diego Perini5200 assert(function( div ) {5201 // Select is set to empty string on purpose5202 // This is to test IE's treatment of not explictly5203 // setting a boolean content attribute,5204 // since its presence should be enough5205 // http://bugs.jquery.com/ticket/123595206 div.innerHTML = "<select><option selected=''></option></select>";5207 5208 // IE8 - Some boolean attributes are not treated correctly5209 if ( !div.querySelectorAll("[selected]").length ) {5210 rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );5211 }5212 5213 // Webkit/Opera - :checked should return selected option elements5214 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked5215 // IE8 throws error here (do not put tests after this one)5216 if ( !div.querySelectorAll(":checked").length ) {5217 rbuggyQSA.push(":checked");5218 }5219 });5220 5221 assert(function( div ) {5222 5223 // Opera 10-12/IE9 - ^= $= *= and empty values5224 // Should not select anything5225 div.innerHTML = "<p test=''></p>";5226 if ( div.querySelectorAll("[test^='']").length ) {5227 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );5228 }5229 5230 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)5231 // IE8 throws error here (do not put tests after this one)5232 div.innerHTML = "<input type='hidden'/>";5233 if ( !div.querySelectorAll(":enabled").length ) {5234 rbuggyQSA.push(":enabled", ":disabled");5235 }5236 });5237 5238 // rbuggyQSA always contains :focus, so no need for a length check5239 rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );5240 5241 select = function( selector, context, results, seed, xml ) {5242 // Only use querySelectorAll when not filtering,5243 // when this is not xml,5244 // and when no QSA bugs apply5245 if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {5246 var groups, i,5247 old = true,5248 nid = expando,5249 newContext = context,5250 newSelector = context.nodeType === 9 && selector;5251 5252 // qSA works strangely on Element-rooted queries5253 // We can work around this by specifying an extra ID on the root5254 // and working up from there (Thanks to Andrew Dupont for the technique)5255 // IE 8 doesn't work on object elements5256 if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {5257 groups = tokenize( selector );5258 5259 if ( (old = context.getAttribute("id")) ) {5260 nid = old.replace( rescape, "\\$&" );5261 } else {5262 context.setAttribute( "id", nid );5263 }5264 nid = "[id='" + nid + "'] ";5265 5266 i = groups.length;5267 while ( i-- ) {5268 groups[i] = nid + groups[i].join("");5269 }5270 newContext = rsibling.test( selector ) && context.parentNode || context;5271 newSelector = groups.join(",");5272 }5273 5274 if ( newSelector ) {5275 try {5276 push.apply( results, slice.call( newContext.querySelectorAll(5277 newSelector5278 ), 0 ) );5279 return results;5280 } catch(qsaError) {5281 } finally {5282 if ( !old ) {5283 context.removeAttribute("id");5284 }5285 }5286 }5287 }5288 5289 return oldSelect( selector, context, results, seed, xml );5290 };5291 5292 if ( matches ) {5293 assert(function( div ) {5294 // Check to see if it's possible to do matchesSelector5295 // on a disconnected node (IE 9)5296 disconnectedMatch = matches.call( div, "div" );5297 5298 // This should fail with an exception5299 // Gecko does not error, returns false instead5300 try {5301 matches.call( div, "[test!='']:sizzle" );5302 rbuggyMatches.push( "!=", pseudos );5303 } catch ( e ) {}5304 });5305 5306 // rbuggyMatches always contains :active and :focus, so no need for a length check5307 rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );5308 5309 Sizzle.matchesSelector = function( elem, expr ) {5310 // Make sure that attribute selectors are quoted5311 expr = expr.replace( rattributeQuotes, "='$1']" );5312 5313 // rbuggyMatches always contains :active, so no need for an existence check5314 if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {5315 try {5316 var ret = matches.call( elem, expr );5317 5318 // IE 9's matchesSelector returns false on disconnected nodes5319 if ( ret || disconnectedMatch ||5320 // As well, disconnected nodes are said to be in a document5321 // fragment in IE 95322 elem.document && elem.document.nodeType !== 11 ) {5323 return ret;5324 }5325 } catch(e) {}5326 }5327 5328 return Sizzle( expr, null, null, [ elem ] ).length > 0;5329 };5330 }5331 })();5332 }5333 5334 5523 // Deprecated 5335 5524 Expr.pseudos["nth"] = Expr.pseudos["eq"]; 5336 5525 5337 // Back-compat5526 // Easy API for creating new setFilters 5338 5527 function setFilters() {} 5339 5528 Expr.filters = setFilters.prototype = Expr.pseudos; 5340 5529 Expr.setFilters = new setFilters(); 5530 5531 // Initialize with the default document 5532 setDocument(); 5341 5533 5342 5534 // Override sizzle attribute retrieval … … 5366 5558 jQuery.fn.extend({ 5367 5559 find: function( selector ) { 5368 var i, l, length, n, r, ret, 5560 var i, ret, self, 5561 len = this.length; 5562 5563 if ( typeof selector !== "string" ) { 5369 5564 self = this; 5370 5371 if ( typeof selector !== "string" ) { 5372 return jQuery( selector ).filter(function() { 5373 for ( i = 0, l = self.length; i < l; i++ ) { 5565 return this.pushStack( jQuery( selector ).filter(function() { 5566 for ( i = 0; i < len; i++ ) { 5374 5567 if ( jQuery.contains( self[ i ], this ) ) { 5375 5568 return true; 5376 5569 } 5377 5570 } 5378 }); 5379 } 5380 5381 ret = this.pushStack( "", "find", selector ); 5382 5383 for ( i = 0, l = this.length; i < l; i++ ) { 5384 length = ret.length; 5385 jQuery.find( selector, this[i], ret ); 5386 5387 if ( i > 0 ) { 5388 // Make sure that the results are unique 5389 for ( n = length; n < ret.length; n++ ) { 5390 for ( r = 0; r < length; r++ ) { 5391 if ( ret[r] === ret[n] ) { 5392 ret.splice(n--, 1); 5393 break; 5394 } 5395 } 5396 } 5397 } 5398 } 5399 5571 }) ); 5572 } 5573 5574 ret = []; 5575 for ( i = 0; i < len; i++ ) { 5576 jQuery.find( selector, this[ i ], ret ); 5577 } 5578 5579 // Needed because $( selector, context ) becomes $( context ).find( selector ) 5580 ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); 5581 ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; 5400 5582 return ret; 5401 5583 }, … … 5416 5598 5417 5599 not: function( selector ) { 5418 return this.pushStack( winnow(this, selector, false) , "not", selector);5600 return this.pushStack( winnow(this, selector, false) ); 5419 5601 }, 5420 5602 5421 5603 filter: function( selector ) { 5422 return this.pushStack( winnow(this, selector, true) , "filter", selector);5604 return this.pushStack( winnow(this, selector, true) ); 5423 5605 }, 5424 5606 … … 5455 5637 } 5456 5638 5457 ret = ret.length > 1 ? jQuery.unique( ret ) : ret; 5458 5459 return this.pushStack( ret, "closest", selectors ); 5639 return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); 5460 5640 }, 5461 5641 … … 5466 5646 // No argument, return index in parent 5467 5647 if ( !elem ) { 5468 return ( this[0] && this[0].parentNode ) ? this. prevAll().length : -1;5648 return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; 5469 5649 } 5470 5650 … … 5486 5666 all = jQuery.merge( this.get(), set ); 5487 5667 5488 return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? 5489 all : 5490 jQuery.unique( all ) ); 5668 return this.pushStack( jQuery.unique(all) ); 5491 5669 }, 5492 5670 … … 5500 5678 jQuery.fn.andSelf = jQuery.fn.addBack; 5501 5679 5502 // A painfully simple check to see if an element is disconnected5503 // from a document (should be improved, where feasible).5504 function isDisconnected( node ) {5505 return !node || !node.parentNode || node.parentNode.nodeType === 11;5506 }5507 5508 5680 function sibling( cur, dir ) { 5509 5681 do { … … 5572 5744 } 5573 5745 5574 return this.pushStack( ret , name, core_slice.call( arguments ).join(","));5746 return this.pushStack( ret ); 5575 5747 }; 5576 5748 }); … … 5627 5799 5628 5800 } else if ( qualifier.nodeType ) { 5629 return jQuery.grep(elements, function( elem , i) {5801 return jQuery.grep(elements, function( elem ) { 5630 5802 return ( elem === qualifier ) === keep; 5631 5803 }); … … 5643 5815 } 5644 5816 5645 return jQuery.grep(elements, function( elem , i) {5817 return jQuery.grep(elements, function( elem ) { 5646 5818 return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; 5647 5819 }); … … 5649 5821 function createSafeFragment( document ) { 5650 5822 var list = nodeNames.split( "|" ), 5651 safeFrag = document.createDocumentFragment();5823 safeFrag = document.createDocumentFragment(); 5652 5824 5653 5825 if ( safeFrag.createElement ) { … … 5664 5836 "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", 5665 5837 rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, 5838 rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), 5666 5839 rleadingWhitespace = /^\s+/, 5667 5840 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, … … 5670 5843 rhtml = /<|&#?\w+;/, 5671 5844 rnoInnerhtml = /<(?:script|style|link)/i, 5672 rnocache = /<(?:script|object|embed|option|style)/i, 5673 rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), 5674 rcheckableType = /^(?:checkbox|radio)$/, 5845 manipulation_rcheckableType = /^(?:checkbox|radio)$/i, 5675 5846 // checked="checked" or checked 5676 5847 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 5677 rscriptType = /\/(java|ecma)script/i, 5678 rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g, 5848 rscriptType = /^$|\/(?:java|ecma)script/i, 5849 rscriptTypeMasked = /^true\/(.*)/, 5850 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, 5851 5852 // We have to close these tags to support XHTML (#13200) 5679 5853 wrapMap = { 5680 5854 option: [ 1, "<select multiple='multiple'>", "</select>" ], 5681 5855 legend: [ 1, "<fieldset>", "</fieldset>" ], 5856 area: [ 1, "<map>", "</map>" ], 5857 param: [ 1, "<object>", "</object>" ], 5682 5858 thead: [ 1, "<table>", "</table>" ], 5683 5859 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 5860 col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], 5684 5861 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 5685 col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], 5686 area: [ 1, "<map>", "</map>" ], 5687 _default: [ 0, "", "" ] 5862 5863 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, 5864 // unless wrapped in a div with non-breaking characters in front of it. 5865 _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] 5688 5866 }, 5689 5867 safeFragment = createSafeFragment( document ), … … 5693 5871 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 5694 5872 wrapMap.th = wrapMap.td; 5695 5696 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,5697 // unless wrapped in a div with non-breaking characters in front of it.5698 if ( !jQuery.support.htmlSerialize ) {5699 wrapMap._default = [ 1, "X<div>", "</div>" ];5700 }5701 5873 5702 5874 jQuery.fn.extend({ … … 5776 5948 append: function() { 5777 5949 return this.domManip(arguments, true, function( elem ) { 5778 if ( this.nodeType === 1 || this.nodeType === 11 ) {5950 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 5779 5951 this.appendChild( elem ); 5780 5952 } … … 5784 5956 prepend: function() { 5785 5957 return this.domManip(arguments, true, function( elem ) { 5786 if ( this.nodeType === 1 || this.nodeType === 11 ) {5958 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 5787 5959 this.insertBefore( elem, this.firstChild ); 5788 5960 } … … 5791 5963 5792 5964 before: function() { 5793 if ( !isDisconnected( this[0] )) {5794 return this.domManip(arguments, false, function( elem) {5965 return this.domManip( arguments, false, function( elem ) { 5966 if ( this.parentNode ) { 5795 5967 this.parentNode.insertBefore( elem, this ); 5796 }); 5797 } 5798 5799 if ( arguments.length ) { 5800 var set = jQuery.clean( arguments ); 5801 return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); 5802 } 5968 } 5969 }); 5803 5970 }, 5804 5971 5805 5972 after: function() { 5806 if ( !isDisconnected( this[0] )) {5807 return this.domManip(arguments, false, function( elem) {5973 return this.domManip( arguments, false, function( elem ) { 5974 if ( this.parentNode ) { 5808 5975 this.parentNode.insertBefore( elem, this.nextSibling ); 5809 }); 5810 } 5811 5812 if ( arguments.length ) { 5813 var set = jQuery.clean( arguments ); 5814 return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); 5815 } 5976 } 5977 }); 5816 5978 }, 5817 5979 … … 5822 5984 5823 5985 for ( ; (elem = this[i]) != null; i++ ) { 5824 if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {5986 if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { 5825 5987 if ( !keepData && elem.nodeType === 1 ) { 5826 jQuery.cleanData( elem.getElementsByTagName("*") ); 5827 jQuery.cleanData( [ elem ] ); 5988 jQuery.cleanData( getAll( elem ) ); 5828 5989 } 5829 5990 5830 5991 if ( elem.parentNode ) { 5992 if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { 5993 setGlobalEval( getAll( elem, "script" ) ); 5994 } 5831 5995 elem.parentNode.removeChild( elem ); 5832 5996 } … … 5844 6008 // Remove element nodes and prevent memory leaks 5845 6009 if ( elem.nodeType === 1 ) { 5846 jQuery.cleanData( elem.getElementsByTagName("*") );6010 jQuery.cleanData( getAll( elem, false ) ); 5847 6011 } 5848 6012 … … 5850 6014 while ( elem.firstChild ) { 5851 6015 elem.removeChild( elem.firstChild ); 6016 } 6017 6018 // If this is a select, ensure that it displays empty (#12336) 6019 // Support: IE<9 6020 if ( elem.options && jQuery.nodeName( elem, "select" ) ) { 6021 elem.options.length = 0; 5852 6022 } 5853 6023 } … … 5890 6060 elem = this[i] || {}; 5891 6061 if ( elem.nodeType === 1 ) { 5892 jQuery.cleanData( elem.getElementsByTagName( "*") );6062 jQuery.cleanData( getAll( elem, false ) ); 5893 6063 elem.innerHTML = value; 5894 6064 } … … 5908 6078 5909 6079 replaceWith: function( value ) { 5910 if ( !isDisconnected( this[0] ) ) { 5911 // Make sure that the elements are removed from the DOM before they are inserted 5912 // this can help fix replacing a parent with child elements 5913 if ( jQuery.isFunction( value ) ) { 5914 return this.each(function(i) { 5915 var self = jQuery(this), old = self.html(); 5916 self.replaceWith( value.call( this, i, old ) ); 5917 }); 5918 } 5919 5920 if ( typeof value !== "string" ) { 5921 value = jQuery( value ).detach(); 5922 } 5923 5924 return this.each(function() { 5925 var next = this.nextSibling, 5926 parent = this.parentNode; 5927 6080 var isFunc = jQuery.isFunction( value ); 6081 6082 // Make sure that the elements are removed from the DOM before they are inserted 6083 // this can help fix replacing a parent with child elements 6084 if ( !isFunc && typeof value !== "string" ) { 6085 value = jQuery( value ).not( this ).detach(); 6086 } 6087 6088 return this.domManip( [ value ], true, function( elem ) { 6089 var next = this.nextSibling, 6090 parent = this.parentNode; 6091 6092 if ( parent ) { 5928 6093 jQuery( this ).remove(); 5929 5930 if ( next ) { 5931 jQuery(next).before( value ); 5932 } else { 5933 jQuery(parent).append( value ); 5934 } 5935 }); 5936 } 5937 5938 return this.length ? 5939 this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : 5940 this; 6094 parent.insertBefore( elem, next ); 6095 } 6096 }); 5941 6097 }, 5942 6098 … … 5948 6104 5949 6105 // Flatten any nested arrays 5950 args = [].concat.apply( [], args ); 5951 5952 var results, first, fragment, iNoClone, 6106 args = core_concat.apply( [], args ); 6107 6108 var first, node, hasScripts, 6109 scripts, doc, fragment, 5953 6110 i = 0, 6111 l = this.length, 6112 set = this, 6113 iNoClone = l - 1, 5954 6114 value = args[0], 5955 scripts = [], 5956 l = this.length; 6115 isFunction = jQuery.isFunction( value ); 5957 6116 5958 6117 // We can't cloneNode fragments that contain checked, in WebKit 5959 if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { 5960 return this.each(function() { 5961 jQuery(this).domManip( args, table, callback ); 5962 }); 5963 } 5964 5965 if ( jQuery.isFunction(value) ) { 5966 return this.each(function(i) { 5967 var self = jQuery(this); 5968 args[0] = value.call( this, i, table ? self.html() : undefined ); 6118 if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { 6119 return this.each(function( index ) { 6120 var self = set.eq( index ); 6121 if ( isFunction ) { 6122 args[0] = value.call( this, index, table ? self.html() : undefined ); 6123 } 5969 6124 self.domManip( args, table, callback ); 5970 6125 }); 5971 6126 } 5972 6127 5973 if ( this[0] ) { 5974 results = jQuery.buildFragment( args, this, scripts ); 5975 fragment = results.fragment; 6128 if ( l ) { 6129 fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); 5976 6130 first = fragment.firstChild; 5977 6131 … … 5982 6136 if ( first ) { 5983 6137 table = table && jQuery.nodeName( first, "tr" ); 6138 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 6139 hasScripts = scripts.length; 5984 6140 5985 6141 // Use the original fragment for the last item instead of the first because it can end up 5986 6142 // being emptied incorrectly in certain situations (#8070). 5987 // Fragments from the fragment cache must always be cloned and never used in place. 5988 for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { 6143 for ( ; i < l; i++ ) { 6144 node = fragment; 6145 6146 if ( i !== iNoClone ) { 6147 node = jQuery.clone( node, true, true ); 6148 6149 // Keep references to cloned scripts for later restoration 6150 if ( hasScripts ) { 6151 jQuery.merge( scripts, getAll( node, "script" ) ); 6152 } 6153 } 6154 5989 6155 callback.call( 5990 6156 table && jQuery.nodeName( this[i], "table" ) ? 5991 6157 findOrAppend( this[i], "tbody" ) : 5992 6158 this[i], 5993 i === iNoClone ? 5994 fragment : 5995 jQuery.clone( fragment, true, true ) 6159 node, 6160 i 5996 6161 ); 5997 6162 } 5998 } 5999 6000 // Fix #11809: Avoid leaking memory 6001 fragment = first = null; 6002 6003 if ( scripts.length ) { 6004 jQuery.each( scripts, function( i, elem ) { 6005 if ( elem.src ) { 6006 if ( jQuery.ajax ) { 6007 jQuery.ajax({ 6008 url: elem.src, 6009 type: "GET", 6010 dataType: "script", 6011 async: false, 6012 global: false, 6013 "throws": true 6014 }); 6015 } else { 6016 jQuery.error("no ajax"); 6163 6164 if ( hasScripts ) { 6165 doc = scripts[ scripts.length - 1 ].ownerDocument; 6166 6167 // Reenable scripts 6168 jQuery.map( scripts, restoreScript ); 6169 6170 // Evaluate executable scripts on first document insertion 6171 for ( i = 0; i < hasScripts; i++ ) { 6172 node = scripts[ i ]; 6173 if ( rscriptType.test( node.type || "" ) && 6174 !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { 6175 6176 if ( node.src ) { 6177 // Hope ajax is available... 6178 jQuery.ajax({ 6179 url: node.src, 6180 type: "GET", 6181 dataType: "script", 6182 async: false, 6183 global: false, 6184 "throws": true 6185 }); 6186 } else { 6187 jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); 6188 } 6017 6189 } 6018 } else {6019 jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );6020 6190 } 6021 6022 if ( elem.parentNode ) { 6023 elem.parentNode.removeChild( elem ); 6024 } 6025 }); 6191 } 6192 6193 // Fix #11809: Avoid leaking memory 6194 fragment = first = null; 6026 6195 } 6027 6196 } … … 6033 6202 function findOrAppend( elem, tag ) { 6034 6203 return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); 6204 } 6205 6206 // Replace/restore the type attribute of script elements for safe DOM manipulation 6207 function disableScript( elem ) { 6208 var attr = elem.getAttributeNode("type"); 6209 elem.type = ( attr && attr.specified ) + "/" + elem.type; 6210 return elem; 6211 } 6212 function restoreScript( elem ) { 6213 var match = rscriptTypeMasked.exec( elem.type ); 6214 if ( match ) { 6215 elem.type = match[1]; 6216 } else { 6217 elem.removeAttribute("type"); 6218 } 6219 return elem; 6220 } 6221 6222 // Mark scripts as having already been evaluated 6223 function setGlobalEval( elems, refElements ) { 6224 var elem, 6225 i = 0; 6226 for ( ; (elem = elems[i]) != null; i++ ) { 6227 jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); 6228 } 6035 6229 } 6036 6230 … … 6063 6257 } 6064 6258 6065 function cloneFixAttributes( src, dest ) {6066 var nodeName ;6259 function fixCloneNodeIssues( src, dest ) { 6260 var nodeName, e, data; 6067 6261 6068 6262 // We do not need to do anything for non-Elements … … 6071 6265 } 6072 6266 6073 // clearAttributes removes the attributes, which we don't want,6074 // but also removes the attachEvent events, which we *do* want6075 if ( dest.clearAttributes ) {6076 dest.clearAttributes();6077 }6078 6079 // mergeAttributes, in contrast, only merges back on the6080 // original attributes, not the events6081 if ( dest.mergeAttributes ) {6082 dest.mergeAttributes( src );6083 }6084 6085 6267 nodeName = dest.nodeName.toLowerCase(); 6086 6268 6087 if ( nodeName === "object" ) { 6088 // IE6-10 improperly clones children of object elements using classid. 6089 // IE10 throws NoModificationAllowedError if parent is null, #12132. 6269 // IE6-8 copies events bound via attachEvent when using cloneNode. 6270 if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { 6271 data = jQuery._data( dest ); 6272 6273 for ( e in data.events ) { 6274 jQuery.removeEvent( dest, e, data.handle ); 6275 } 6276 6277 // Event data gets referenced instead of copied if the expando gets copied too 6278 dest.removeAttribute( jQuery.expando ); 6279 } 6280 6281 // IE blanks contents when cloning scripts, and tries to evaluate newly-set text 6282 if ( nodeName === "script" && dest.text !== src.text ) { 6283 disableScript( dest ).text = src.text; 6284 restoreScript( dest ); 6285 6286 // IE6-10 improperly clones children of object elements using classid. 6287 // IE10 throws NoModificationAllowedError if parent is null, #12132. 6288 } else if ( nodeName === "object" ) { 6090 6289 if ( dest.parentNode ) { 6091 6290 dest.outerHTML = src.outerHTML; … … 6096 6295 // If the src has innerHTML and the destination does not, 6097 6296 // copy the src.innerHTML into the dest.innerHTML. #10324 6098 if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {6297 if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { 6099 6298 dest.innerHTML = src.innerHTML; 6100 6299 } 6101 6300 6102 } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {6301 } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { 6103 6302 // IE6-8 fails to persist the checked state of a cloned checkbox 6104 6303 // or radio button. Worse, IE6-7 fail to give the cloned element … … 6116 6315 // state when cloning options 6117 6316 } else if ( nodeName === "option" ) { 6118 dest. selected = src.defaultSelected;6317 dest.defaultSelected = dest.selected = src.defaultSelected; 6119 6318 6120 6319 // IE6-8 fails to set the defaultValue to the correct value when … … 6122 6321 } else if ( nodeName === "input" || nodeName === "textarea" ) { 6123 6322 dest.defaultValue = src.defaultValue; 6124 6125 // IE blanks contents when cloning scripts 6126 } else if ( nodeName === "script" && dest.text !== src.text ) { 6127 dest.text = src.text; 6128 } 6129 6130 // Event data gets referenced instead of copied if the expando 6131 // gets copied too 6132 dest.removeAttribute( jQuery.expando ); 6323 } 6133 6324 } 6134 6135 jQuery.buildFragment = function( args, context, scripts ) {6136 var fragment, cacheable, cachehit,6137 first = args[ 0 ];6138 6139 // Set context from what may come in as undefined or a jQuery collection or a node6140 // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &6141 // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception6142 context = context || document;6143 context = !context.nodeType && context[0] || context;6144 context = context.ownerDocument || context;6145 6146 // Only cache "small" (1/2 KB) HTML strings that are associated with the main document6147 // Cloning options loses the selected state, so don't cache them6148 // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment6149 // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache6150 // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #105016151 if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&6152 first.charAt(0) === "<" && !rnocache.test( first ) &&6153 (jQuery.support.checkClone || !rchecked.test( first )) &&6154 (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {6155 6156 // Mark cacheable and look for a hit6157 cacheable = true;6158 fragment = jQuery.fragments[ first ];6159 cachehit = fragment !== undefined;6160 }6161 6162 if ( !fragment ) {6163 fragment = context.createDocumentFragment();6164 jQuery.clean( args, context, fragment, scripts );6165 6166 // Update the cache, but only store false6167 // unless this is a second parsing of the same content6168 if ( cacheable ) {6169 jQuery.fragments[ first ] = cachehit && fragment;6170 }6171 }6172 6173 return { fragment: fragment, cacheable: cacheable };6174 };6175 6176 jQuery.fragments = {};6177 6325 6178 6326 jQuery.each({ … … 6188 6336 ret = [], 6189 6337 insert = jQuery( selector ), 6190 l = insert.length, 6191 parent = this.length === 1 && this[0].parentNode; 6192 6193 if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { 6194 insert[ original ]( this[0] ); 6195 return this; 6196 } else { 6197 for ( ; i < l; i++ ) { 6198 elems = ( i > 0 ? this.clone(true) : this ).get(); 6199 jQuery( insert[i] )[ original ]( elems ); 6200 ret = ret.concat( elems ); 6201 } 6202 6203 return this.pushStack( ret, name, insert.selector ); 6204 } 6338 last = insert.length - 1; 6339 6340 for ( ; i <= last; i++ ) { 6341 elems = i === last ? this : this.clone(true); 6342 jQuery( insert[i] )[ original ]( elems ); 6343 6344 // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() 6345 core_push.apply( ret, elems.get() ); 6346 } 6347 6348 return this.pushStack( ret ); 6205 6349 }; 6206 6350 }); 6207 6351 6208 function getAll( elem ) { 6209 if ( typeof elem.getElementsByTagName !== "undefined" ) { 6210 return elem.getElementsByTagName( "*" ); 6211 6212 } else if ( typeof elem.querySelectorAll !== "undefined" ) { 6213 return elem.querySelectorAll( "*" ); 6214 6215 } else { 6216 return []; 6217 } 6352 function getAll( context, tag ) { 6353 var elems, elem, 6354 i = 0, 6355 found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : 6356 typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : 6357 undefined; 6358 6359 if ( !found ) { 6360 for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { 6361 if ( !tag || jQuery.nodeName( elem, tag ) ) { 6362 found.push( elem ); 6363 } else { 6364 jQuery.merge( found, getAll( elem, tag ) ); 6365 } 6366 } 6367 } 6368 6369 return tag === undefined || tag && jQuery.nodeName( context, tag ) ? 6370 jQuery.merge( [ context ], found ) : 6371 found; 6218 6372 } 6219 6373 6220 // Used in clean, fixes the defaultChecked property6374 // Used in buildFragment, fixes the defaultChecked property 6221 6375 function fixDefaultChecked( elem ) { 6222 if ( rcheckableType.test( elem.type ) ) {6376 if ( manipulation_rcheckableType.test( elem.type ) ) { 6223 6377 elem.defaultChecked = elem.checked; 6224 6378 } … … 6227 6381 jQuery.extend({ 6228 6382 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 6229 var srcElements, 6230 destElements, 6231 i, 6232 clone; 6383 var destElements, node, clone, i, srcElements, 6384 inPage = jQuery.contains( elem.ownerDocument, elem ); 6233 6385 6234 6386 if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { … … 6243 6395 if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && 6244 6396 (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { 6245 // IE copies events bound via attachEvent when using cloneNode. 6246 // Calling detachEvent on the clone will also remove the events 6247 // from the original. In order to get around this, we use some 6248 // proprietary methods to clear the events. Thanks to MooTools 6249 // guys for this hotness. 6250 6251 cloneFixAttributes( elem, clone ); 6252 6253 // Using Sizzle here is crazy slow, so we use getElementsByTagName instead 6397 6398 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 6399 destElements = getAll( clone ); 6254 6400 srcElements = getAll( elem ); 6255 destElements = getAll( clone ); 6256 6257 // Weird iteration because IE will replace the length property 6258 // with an element if you are cloning the body and one of the 6259 // elements on the page has a name or id of "length" 6260 for ( i = 0; srcElements[i]; ++i ) { 6401 6402 // Fix all IE cloning issues 6403 for ( i = 0; (node = srcElements[i]) != null; ++i ) { 6261 6404 // Ensure that the destination node is not null; Fixes #9587 6262 6405 if ( destElements[i] ) { 6263 cloneFixAttributes( srcElements[i], destElements[i] );6406 fixCloneNodeIssues( node, destElements[i] ); 6264 6407 } 6265 6408 } … … 6268 6411 // Copy the events from the original to the clone 6269 6412 if ( dataAndEvents ) { 6270 cloneCopyEvent( elem, clone );6271 6272 6413 if ( deepDataAndEvents ) { 6273 srcElements = getAll( elem ); 6274 destElements = getAll( clone ); 6275 6276 for ( i = 0; srcElements[i]; ++i ) { 6277 cloneCopyEvent( srcElements[i], destElements[i] ); 6278 } 6279 } 6280 } 6281 6282 srcElements = destElements = null; 6414 srcElements = srcElements || getAll( elem ); 6415 destElements = destElements || getAll( clone ); 6416 6417 for ( i = 0; (node = srcElements[i]) != null; i++ ) { 6418 cloneCopyEvent( node, destElements[i] ); 6419 } 6420 } else { 6421 cloneCopyEvent( elem, clone ); 6422 } 6423 } 6424 6425 // Preserve script evaluation history 6426 destElements = getAll( clone, "script" ); 6427 if ( destElements.length > 0 ) { 6428 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 6429 } 6430 6431 destElements = srcElements = node = null; 6283 6432 6284 6433 // Return the cloned set … … 6286 6435 }, 6287 6436 6288 clean: function( elems, context, fragment, scripts ) { 6289 var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, 6290 safe = context === document && safeFragment, 6291 ret = []; 6292 6293 // Ensure that context is a document 6294 if ( !context || typeof context.createDocumentFragment === "undefined" ) { 6295 context = document; 6296 } 6297 6298 // Use the already-created safe fragment if context permits 6299 for ( i = 0; (elem = elems[i]) != null; i++ ) { 6300 if ( typeof elem === "number" ) { 6301 elem += ""; 6302 } 6303 6304 if ( !elem ) { 6305 continue; 6306 } 6307 6308 // Convert html string into DOM nodes 6309 if ( typeof elem === "string" ) { 6310 if ( !rhtml.test( elem ) ) { 6311 elem = context.createTextNode( elem ); 6437 buildFragment: function( elems, context, scripts, selection ) { 6438 var j, elem, contains, 6439 tmp, tag, tbody, wrap, 6440 l = elems.length, 6441 6442 // Ensure a safe fragment 6443 safe = createSafeFragment( context ), 6444 6445 nodes = [], 6446 i = 0; 6447 6448 for ( ; i < l; i++ ) { 6449 elem = elems[ i ]; 6450 6451 if ( elem || elem === 0 ) { 6452 6453 // Add nodes directly 6454 if ( jQuery.type( elem ) === "object" ) { 6455 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 6456 6457 // Convert non-html into a text node 6458 } else if ( !rhtml.test( elem ) ) { 6459 nodes.push( context.createTextNode( elem ) ); 6460 6461 // Convert html into DOM nodes 6312 6462 } else { 6313 // Ensure a safe container in which to render the html 6314 safe = safe || createSafeFragment( context ); 6315 div = context.createElement("div"); 6316 safe.appendChild( div ); 6317 6318 // Fix "XHTML"-style tags in all browsers 6319 elem = elem.replace(rxhtmlTag, "<$1></$2>"); 6320 6321 // Go to html and back, then peel off extra wrappers 6463 tmp = tmp || safe.appendChild( context.createElement("div") ); 6464 6465 // Deserialize a standard representation 6322 6466 tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); 6323 6467 wrap = wrapMap[ tag ] || wrapMap._default; 6324 depth = wrap[0]; 6325 div.innerHTML = wrap[1] + elem + wrap[2]; 6326 6327 // Move to the right depth 6328 while ( depth-- ) { 6329 div = div.lastChild; 6468 6469 tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; 6470 6471 // Descend through wrappers to the right content 6472 j = wrap[0]; 6473 while ( j-- ) { 6474 tmp = tmp.lastChild; 6475 } 6476 6477 // Manually add leading whitespace removed by IE 6478 if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { 6479 nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); 6330 6480 } 6331 6481 … … 6334 6484 6335 6485 // String was a <table>, *may* have spurious <tbody> 6336 hasBody = rtbody.test(elem);6337 t body = tag === "table" && !hasBody ?6338 div.firstChild && div.firstChild.childNodes : 6339 6340 // String was a bare <thead> or <tfoot>6341 wrap[1] === "<table>" && !hasBody ?6342 div.childNodes :6343 []; 6344 6345 for ( j = tbody.length - 1; j >= 0 ; --j) {6346 if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {6347 tbody[ j ].parentNode.removeChild( tbody[ j ]);6486 elem = tag === "table" && !rtbody.test( elem ) ? 6487 tmp.firstChild : 6488 6489 // String was a bare <thead> or <tfoot> 6490 wrap[1] === "<table>" && !rtbody.test( elem ) ? 6491 tmp : 6492 0; 6493 6494 j = elem && elem.childNodes.length; 6495 while ( j-- ) { 6496 if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { 6497 elem.removeChild( tbody ); 6348 6498 } 6349 6499 } 6350 6500 } 6351 6501 6352 // IE completely kills leading whitespace when innerHTML is used 6353 if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { 6354 div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); 6502 jQuery.merge( nodes, tmp.childNodes ); 6503 6504 // Fix #12392 for WebKit and IE > 9 6505 tmp.textContent = ""; 6506 6507 // Fix #12392 for oldIE 6508 while ( tmp.firstChild ) { 6509 tmp.removeChild( tmp.firstChild ); 6355 6510 } 6356 6511 6357 elem = div.childNodes; 6358 6359 // Take out of fragment container (we need a fresh div each time) 6360 div.parentNode.removeChild( div ); 6361 } 6362 } 6363 6364 if ( elem.nodeType ) { 6365 ret.push( elem ); 6366 } else { 6367 jQuery.merge( ret, elem ); 6368 } 6369 } 6370 6371 // Fix #11356: Clear elements from safeFragment 6372 if ( div ) { 6373 elem = div = safe = null; 6512 // Remember the top-level container for proper cleanup 6513 tmp = safe.lastChild; 6514 } 6515 } 6516 } 6517 6518 // Fix #11356: Clear elements from fragment 6519 if ( tmp ) { 6520 safe.removeChild( tmp ); 6374 6521 } 6375 6522 … … 6377 6524 // about to be appended to the DOM in IE 6/7 (#8060) 6378 6525 if ( !jQuery.support.appendChecked ) { 6379 for ( i = 0; (elem = ret[i]) != null; i++ ) { 6380 if ( jQuery.nodeName( elem, "input" ) ) { 6381 fixDefaultChecked( elem ); 6382 } else if ( typeof elem.getElementsByTagName !== "undefined" ) { 6383 jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); 6384 } 6385 } 6386 } 6387 6388 // Append elements to a provided document fragment 6389 if ( fragment ) { 6390 // Special handling of each script element 6391 handleScript = function( elem ) { 6392 // Check if we consider it executable 6393 if ( !elem.type || rscriptType.test( elem.type ) ) { 6394 // Detach the script and store it in the scripts array (if provided) or the fragment 6395 // Return truthy to indicate that it has been handled 6396 return scripts ? 6397 scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : 6398 fragment.appendChild( elem ); 6399 } 6400 }; 6401 6402 for ( i = 0; (elem = ret[i]) != null; i++ ) { 6403 // Check if we're done after handling an executable script 6404 if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { 6405 // Append to fragment and handle embedded scripts 6406 fragment.appendChild( elem ); 6407 if ( typeof elem.getElementsByTagName !== "undefined" ) { 6408 // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration 6409 jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); 6410 6411 // Splice the scripts into ret after their former ancestor and advance our index beyond them 6412 ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); 6413 i += jsTags.length; 6526 jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); 6527 } 6528 6529 i = 0; 6530 while ( (elem = nodes[ i++ ]) ) { 6531 6532 // #4087 - If origin and destination elements are the same, and this is 6533 // that element, do not do anything 6534 if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { 6535 continue; 6536 } 6537 6538 contains = jQuery.contains( elem.ownerDocument, elem ); 6539 6540 // Append to fragment 6541 tmp = getAll( safe.appendChild( elem ), "script" ); 6542 6543 // Preserve script evaluation history 6544 if ( contains ) { 6545 setGlobalEval( tmp ); 6546 } 6547 6548 // Capture executables 6549 if ( scripts ) { 6550 j = 0; 6551 while ( (elem = tmp[ j++ ]) ) { 6552 if ( rscriptType.test( elem.type || "" ) ) { 6553 scripts.push( elem ); 6414 6554 } 6415 6555 } … … 6417 6557 } 6418 6558 6419 return ret; 6559 tmp = null; 6560 6561 return safe; 6420 6562 }, 6421 6563 6422 6564 cleanData: function( elems, /* internal */ acceptData ) { 6423 var data, id, elem, type,6565 var elem, type, id, data, 6424 6566 i = 0, 6425 6567 internalKey = jQuery.expando, … … 6459 6601 delete elem[ internalKey ]; 6460 6602 6461 } else if ( elem.removeAttribute) {6603 } else if ( typeof elem.removeAttribute !== core_strundefined ) { 6462 6604 elem.removeAttribute( internalKey ); 6463 6605 … … 6466 6608 } 6467 6609 6468 jQuery.deletedIds.push( id );6610 core_deletedIds.push( id ); 6469 6611 } 6470 6612 } … … 6473 6615 } 6474 6616 }); 6475 // Limit scope pollution from any deprecated API 6476 (function() { 6477 6478 var matched, browser; 6479 6480 // Use of jQuery.browser is frowned upon. 6481 // More details: http://api.jquery.com/jQuery.browser 6482 // jQuery.uaMatch maintained for back-compat 6483 jQuery.uaMatch = function( ua ) { 6484 ua = ua.toLowerCase(); 6485 6486 var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || 6487 /(webkit)[ \/]([\w.]+)/.exec( ua ) || 6488 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || 6489 /(msie) ([\w.]+)/.exec( ua ) || 6490 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || 6491 []; 6492 6493 return { 6494 browser: match[ 1 ] || "", 6495 version: match[ 2 ] || "0" 6496 }; 6497 }; 6498 6499 matched = jQuery.uaMatch( navigator.userAgent ); 6500 browser = {}; 6501 6502 if ( matched.browser ) { 6503 browser[ matched.browser ] = true; 6504 browser.version = matched.version; 6505 } 6506 6507 // Chrome is Webkit, but Webkit is also Safari. 6508 if ( browser.chrome ) { 6509 browser.webkit = true; 6510 } else if ( browser.webkit ) { 6511 browser.safari = true; 6512 } 6513 6514 jQuery.browser = browser; 6515 6516 jQuery.sub = function() { 6517 function jQuerySub( selector, context ) { 6518 return new jQuerySub.fn.init( selector, context ); 6519 } 6520 jQuery.extend( true, jQuerySub, this ); 6521 jQuerySub.superclass = this; 6522 jQuerySub.fn = jQuerySub.prototype = this(); 6523 jQuerySub.fn.constructor = jQuerySub; 6524 jQuerySub.sub = this.sub; 6525 jQuerySub.fn.init = function init( selector, context ) { 6526 if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { 6527 context = jQuerySub( context ); 6528 } 6529 6530 return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); 6531 }; 6532 jQuerySub.fn.init.prototype = jQuerySub.fn; 6533 var rootjQuerySub = jQuerySub(document); 6534 return jQuerySub; 6535 }; 6536 6537 })(); 6538 var curCSS, iframe, iframeDoc, 6617 var iframe, getStyles, curCSS, 6539 6618 ralpha = /alpha\([^)]*\)/i, 6540 ropacity = /opacity =([^)]*)/,6619 ropacity = /opacity\s*=\s*([^)]*)/, 6541 6620 rposition = /^(top|right|bottom|left)$/, 6542 6621 // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" … … 6546 6625 rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), 6547 6626 rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), 6548 rrelNum = new RegExp( "^([ -+])=(" + core_pnum + ")", "i" ),6627 rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), 6549 6628 elemdisplay = { BODY: "block" }, 6550 6629 … … 6556 6635 6557 6636 cssExpand = [ "Top", "Right", "Bottom", "Left" ], 6558 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], 6559 6560 eventsToggle = jQuery.fn.toggle; 6637 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; 6561 6638 6562 6639 // return a css property mapped to a potentially vendor prefixed property … … 6584 6661 6585 6662 function isHidden( elem, el ) { 6663 // isHidden might be called from jQuery#filter function; 6664 // in that case, element will be second argument 6586 6665 elem = el || elem; 6587 6666 return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); … … 6589 6668 6590 6669 function showHide( elements, show ) { 6591 var elem, display,6670 var display, elem, hidden, 6592 6671 values = [], 6593 6672 index = 0, … … 6599 6678 continue; 6600 6679 } 6680 6601 6681 values[ index ] = jQuery._data( elem, "olddisplay" ); 6682 display = elem.style.display; 6602 6683 if ( show ) { 6603 6684 // Reset the inline display of this element to learn if it is 6604 6685 // being hidden by cascaded rules or not 6605 if ( !values[ index ] && elem.style.display === "none" ) {6686 if ( !values[ index ] && display === "none" ) { 6606 6687 elem.style.display = ""; 6607 6688 } … … 6614 6695 } 6615 6696 } else { 6616 display = curCSS( elem, "display" ); 6617 6618 if ( !values[ index ] && display !== "none" ) { 6619 jQuery._data( elem, "olddisplay", display ); 6697 6698 if ( !values[ index ] ) { 6699 hidden = isHidden( elem ); 6700 6701 if ( display && display !== "none" || !hidden ) { 6702 jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); 6703 } 6620 6704 } 6621 6705 } … … 6640 6724 css: function( name, value ) { 6641 6725 return jQuery.access( this, function( elem, name, value ) { 6726 var len, styles, 6727 map = {}, 6728 i = 0; 6729 6730 if ( jQuery.isArray( name ) ) { 6731 styles = getStyles( elem ); 6732 len = name.length; 6733 6734 for ( ; i < len; i++ ) { 6735 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 6736 } 6737 6738 return map; 6739 } 6740 6642 6741 return value !== undefined ? 6643 6742 jQuery.style( elem, name, value ) : … … 6651 6750 return showHide( this ); 6652 6751 }, 6653 toggle: function( state , fn2) {6752 toggle: function( state ) { 6654 6753 var bool = typeof state === "boolean"; 6655 6656 if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {6657 return eventsToggle.apply( this, arguments );6658 }6659 6754 6660 6755 return this.each(function() { … … 6678 6773 var ret = curCSS( elem, "opacity" ); 6679 6774 return ret === "" ? "1" : ret; 6680 6681 6775 } 6682 6776 } … … 6686 6780 // Exclude the following css properties to add px 6687 6781 cssNumber: { 6782 "columnCount": true, 6688 6783 "fillOpacity": true, 6689 6784 "fontWeight": true, … … 6742 6837 } 6743 6838 6839 // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, 6840 // but it would mean to define eight (for every problematic property) identical functions 6841 if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { 6842 style[ name ] = "inherit"; 6843 } 6844 6744 6845 // If a hook was provided, use that value, otherwise just set the specified value 6745 6846 if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { 6847 6746 6848 // Wrapped to prevent IE from throwing errors when 'invalid' values are provided 6747 6849 // Fixes bug #5509 … … 6762 6864 }, 6763 6865 6764 css: function( elem, name, numeric, extra) {6765 var val, num, hooks,6866 css: function( elem, name, extra, styles ) { 6867 var num, val, hooks, 6766 6868 origName = jQuery.camelCase( name ); 6767 6869 … … 6780 6882 // Otherwise, if a way to get the computed value exists, use that 6781 6883 if ( val === undefined ) { 6782 val = curCSS( elem, name );6884 val = curCSS( elem, name, styles ); 6783 6885 } 6784 6886 … … 6789 6891 6790 6892 // Return, converting to number if forced or a qualifier was provided and val looks numeric 6791 if ( numeric || extra !== undefined) {6893 if ( extra === "" || extra ) { 6792 6894 num = parseFloat( val ); 6793 return numeric|| jQuery.isNumeric( num ) ? num || 0 : val;6895 return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; 6794 6896 } 6795 6897 return val; … … 6797 6899 6798 6900 // A method for quickly swapping in/out CSS properties to get correct calculations 6799 swap: function( elem, options, callback ) {6901 swap: function( elem, options, callback, args ) { 6800 6902 var ret, name, 6801 6903 old = {}; … … 6807 6909 } 6808 6910 6809 ret = callback. call( elem);6911 ret = callback.apply( elem, args || [] ); 6810 6912 6811 6913 // Revert the old values … … 6818 6920 }); 6819 6921 6820 // NOTE: To any future maintainer, we'vewindow.getComputedStyle6922 // NOTE: we've included the "window" in window.getComputedStyle 6821 6923 // because jsdom on node.js will break without it. 6822 6924 if ( window.getComputedStyle ) { 6823 curCSS = function( elem, name ) { 6824 var ret, width, minWidth, maxWidth, 6825 computed = window.getComputedStyle( elem, null ), 6925 getStyles = function( elem ) { 6926 return window.getComputedStyle( elem, null ); 6927 }; 6928 6929 curCSS = function( elem, name, _computed ) { 6930 var width, minWidth, maxWidth, 6931 computed = _computed || getStyles( elem ), 6932 6933 // getPropertyValue is only needed for .css('filter') in IE9, see #12537 6934 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, 6826 6935 style = elem.style; 6827 6936 6828 6937 if ( computed ) { 6829 6830 // getPropertyValue is only needed for .css('filter') in IE9, see #125376831 ret = computed.getPropertyValue( name ) || computed[ name ];6832 6938 6833 6939 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { … … 6840 6946 // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values 6841 6947 if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { 6948 6949 // Remember the original values 6842 6950 width = style.width; 6843 6951 minWidth = style.minWidth; 6844 6952 maxWidth = style.maxWidth; 6845 6953 6954 // Put in the new values to get a computed value out 6846 6955 style.minWidth = style.maxWidth = style.width = ret; 6847 6956 ret = computed.width; 6848 6957 6958 // Revert the changed values 6849 6959 style.width = width; 6850 6960 style.minWidth = minWidth; … … 6856 6966 }; 6857 6967 } else if ( document.documentElement.currentStyle ) { 6858 curCSS = function( elem, name ) { 6859 var left, rsLeft, 6860 ret = elem.currentStyle && elem.currentStyle[ name ], 6968 getStyles = function( elem ) { 6969 return elem.currentStyle; 6970 }; 6971 6972 curCSS = function( elem, name, _computed ) { 6973 var left, rs, rsLeft, 6974 computed = _computed || getStyles( elem ), 6975 ret = computed ? computed[ name ] : undefined, 6861 6976 style = elem.style; 6862 6977 … … 6878 6993 // Remember the original values 6879 6994 left = style.left; 6880 rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; 6995 rs = elem.runtimeStyle; 6996 rsLeft = rs && rs.left; 6881 6997 6882 6998 // Put in the new values to get a computed value out 6883 6999 if ( rsLeft ) { 6884 elem.runtimeStyle.left = elem.currentStyle.left;7000 rs.left = elem.currentStyle.left; 6885 7001 } 6886 7002 style.left = name === "fontSize" ? "1em" : ret; … … 6890 7006 style.left = left; 6891 7007 if ( rsLeft ) { 6892 elem.runtimeStyle.left = rsLeft;7008 rs.left = rsLeft; 6893 7009 } 6894 7010 } … … 6901 7017 var matches = rnumsplit.exec( value ); 6902 7018 return matches ? 6903 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : 6904 value; 7019 // Guard against undefined "subtract", e.g., when used as in cssHooks 7020 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : 7021 value; 6905 7022 } 6906 7023 6907 function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {7024 function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { 6908 7025 var i = extra === ( isBorderBox ? "border" : "content" ) ? 6909 7026 // If we already have the right measurement, avoid augmentation … … 6917 7034 // both box models exclude margin, so add it if we want it 6918 7035 if ( extra === "margin" ) { 6919 // we use jQuery.css instead of curCSS here 6920 // because of the reliableMarginRight CSS hook! 6921 val += jQuery.css( elem, extra + cssExpand[ i ], true ); 6922 } 6923 6924 // From this point on we use curCSS for maximum performance (relevant in animations) 7036 val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); 7037 } 7038 6925 7039 if ( isBorderBox ) { 6926 7040 // border-box includes padding, so remove it if we want content 6927 7041 if ( extra === "content" ) { 6928 val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;7042 val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6929 7043 } 6930 7044 6931 7045 // at this point, extra isn't border nor margin, so remove border 6932 7046 if ( extra !== "margin" ) { 6933 val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;7047 val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6934 7048 } 6935 7049 } else { 6936 7050 // at this point, extra isn't content, so add padding 6937 val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;7051 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6938 7052 6939 7053 // at this point, extra isn't content nor padding, so add border 6940 7054 if ( extra !== "padding" ) { 6941 val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;7055 val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6942 7056 } 6943 7057 } … … 6950 7064 6951 7065 // Start with offset property, which is equivalent to the border-box value 6952 var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 6953 valueIsBorderBox = true, 6954 isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; 7066 var valueIsBorderBox = true, 7067 val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 7068 styles = getStyles( elem ), 7069 isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 6955 7070 6956 7071 // some non-html elements return undefined for offsetWidth, so check for null/undefined … … 6959 7074 if ( val <= 0 || val == null ) { 6960 7075 // Fall back to computed then uncomputed css if necessary 6961 val = curCSS( elem, name );7076 val = curCSS( elem, name, styles ); 6962 7077 if ( val < 0 || val == null ) { 6963 7078 val = elem.style[ name ]; … … 6983 7098 name, 6984 7099 extra || ( isBorderBox ? "border" : "content" ), 6985 valueIsBorderBox 7100 valueIsBorderBox, 7101 styles 6986 7102 ) 6987 7103 ) + "px"; 6988 7104 } 6989 7105 6990 6991 7106 // Try to determine the default display value of an element 6992 7107 function css_defaultDisplay( nodeName ) { 6993 if ( elemdisplay[ nodeName ] ) { 6994 return elemdisplay[ nodeName ]; 6995 } 6996 6997 var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), 6998 display = elem.css("display"); 7108 var doc = document, 7109 display = elemdisplay[ nodeName ]; 7110 7111 if ( !display ) { 7112 display = actualDisplay( nodeName, doc ); 7113 7114 // If the simple way fails, read from inside an iframe 7115 if ( display === "none" || !display ) { 7116 // Use the already-created iframe if possible 7117 iframe = ( iframe || 7118 jQuery("<iframe frameborder='0' width='0' height='0'/>") 7119 .css( "cssText", "display:block !important" ) 7120 ).appendTo( doc.documentElement ); 7121 7122 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse 7123 doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; 7124 doc.write("<!doctype html><html><body>"); 7125 doc.close(); 7126 7127 display = actualDisplay( nodeName, doc ); 7128 iframe.detach(); 7129 } 7130 7131 // Store the correct default display 7132 elemdisplay[ nodeName ] = display; 7133 } 7134 7135 return display; 7136 } 7137 7138 // Called ONLY from within css_defaultDisplay 7139 function actualDisplay( name, doc ) { 7140 var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), 7141 display = jQuery.css( elem[0], "display" ); 6999 7142 elem.remove(); 7000 7001 // If the simple way fails,7002 // get element's real default display by attaching it to a temp iframe7003 if ( display === "none" || display === "" ) {7004 // Use the already-created iframe if possible7005 iframe = document.body.appendChild(7006 iframe || jQuery.extend( document.createElement("iframe"), {7007 frameBorder: 0,7008 width: 0,7009 height: 07010 })7011 );7012 7013 // Create a cacheable copy of the iframe document on first call.7014 // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML7015 // document to it; WebKit & Firefox won't allow reusing the iframe document.7016 if ( !iframeDoc || !iframe.createElement ) {7017 iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;7018 iframeDoc.write("<!doctype html><html><body>");7019 iframeDoc.close();7020 }7021 7022 elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );7023 7024 display = curCSS( elem, "display" );7025 document.body.removeChild( iframe );7026 }7027 7028 // Store the correct default display7029 elemdisplay[ nodeName ] = display;7030 7031 7143 return display; 7032 7144 } … … 7038 7150 // certain elements can have dimension info if we invisibly show them 7039 7151 // however, it must have a current display style that would benefit from this 7040 if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {7041 returnjQuery.swap( elem, cssShow, function() {7152 return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? 7153 jQuery.swap( elem, cssShow, function() { 7042 7154 return getWidthOrHeight( elem, name, extra ); 7043 }); 7044 } else { 7045 return getWidthOrHeight( elem, name, extra ); 7046 } 7155 }) : 7156 getWidthOrHeight( elem, name, extra ); 7047 7157 } 7048 7158 }, 7049 7159 7050 7160 set: function( elem, value, extra ) { 7161 var styles = extra && getStyles( elem ); 7051 7162 return setPositiveNumber( elem, value, extra ? 7052 7163 augmentWidthOrHeight( … … 7054 7165 name, 7055 7166 extra, 7056 jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" 7167 jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 7168 styles 7057 7169 ) : 0 7058 7170 ); … … 7081 7193 7082 7194 // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 7083 if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && 7084 style.removeAttribute ) { 7195 // if value === "", then remove inline opacity #12685 7196 if ( ( value >= 1 || value === "" ) && 7197 jQuery.trim( filter.replace( ralpha, "" ) ) === "" && 7198 style.removeAttribute ) { 7085 7199 7086 7200 // Setting style.filter to null, "" & " " still leave "filter:" in the cssText … … 7089 7203 style.removeAttribute( "filter" ); 7090 7204 7091 // if there there is no filter style applied in a css rule, we are done7092 if ( currentStyle && !currentStyle.filter ) {7205 // if there is no filter style applied in a css rule or unset inline opacity, we are done 7206 if ( value === "" || currentStyle && !currentStyle.filter ) { 7093 7207 return; 7094 7208 } … … 7109 7223 jQuery.cssHooks.marginRight = { 7110 7224 get: function( elem, computed ) { 7111 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 7112 // Work around by temporarily setting element display to inline-block 7113 return jQuery.swap( elem, { "display": "inline-block" }, function() { 7114 if ( computed ) { 7115 return curCSS( elem, "marginRight" ); 7116 } 7117 }); 7225 if ( computed ) { 7226 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 7227 // Work around by temporarily setting element display to inline-block 7228 return jQuery.swap( elem, { "display": "inline-block" }, 7229 curCSS, [ elem, "marginRight" ] ); 7230 } 7118 7231 } 7119 7232 }; … … 7128 7241 get: function( elem, computed ) { 7129 7242 if ( computed ) { 7130 var ret= curCSS( elem, prop );7243 computed = curCSS( elem, prop ); 7131 7244 // if curCSS returns percentage, fallback to offset 7132 return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; 7245 return rnumnonpx.test( computed ) ? 7246 jQuery( elem ).position()[ prop ] + "px" : 7247 computed; 7133 7248 } 7134 7249 } … … 7141 7256 if ( jQuery.expr && jQuery.expr.filters ) { 7142 7257 jQuery.expr.filters.hidden = function( elem ) { 7143 return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); 7258 // Support: Opera <= 12.12 7259 // Opera reports offsetWidths and offsetHeights less than zero on some elements 7260 return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || 7261 (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); 7144 7262 }; 7145 7263 … … 7157 7275 jQuery.cssHooks[ prefix + suffix ] = { 7158 7276 expand: function( value ) { 7159 var i, 7277 var i = 0, 7278 expanded = {}, 7160 7279 7161 7280 // assumes a single number if not a string 7162 parts = typeof value === "string" ? value.split(" ") : [ value ], 7163 expanded = {}; 7164 7165 for ( i = 0; i < 4; i++ ) { 7281 parts = typeof value === "string" ? value.split(" ") : [ value ]; 7282 7283 for ( ; i < 4; i++ ) { 7166 7284 expanded[ prefix + cssExpand[ i ] + suffix ] = 7167 7285 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; … … 7179 7297 rbracket = /\[\]$/, 7180 7298 rCRLF = /\r?\n/g, 7181 r input = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,7182 rs electTextarea = /^(?:select|textarea)/i;7299 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 7300 rsubmittable = /^(?:input|select|textarea|keygen)/i; 7183 7301 7184 7302 jQuery.fn.extend({ … … 7188 7306 serializeArray: function() { 7189 7307 return this.map(function(){ 7190 return this.elements ? jQuery.makeArray( this.elements ) : this; 7308 // Can add propHook for "elements" to filter or add form elements 7309 var elements = jQuery.prop( this, "elements" ); 7310 return elements ? jQuery.makeArray( elements ) : this; 7191 7311 }) 7192 7312 .filter(function(){ 7193 return this.name && !this.disabled && 7194 ( this.checked || rselectTextarea.test( this.nodeName ) || 7195 rinput.test( this.type ) ); 7313 var type = this.type; 7314 // Use .is(":disabled") so that fieldset[disabled] works 7315 return this.name && !jQuery( this ).is( ":disabled" ) && 7316 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 7317 ( this.checked || !manipulation_rcheckableType.test( type ) ); 7196 7318 }) 7197 7319 .map(function( i, elem ){ … … 7201 7323 null : 7202 7324 jQuery.isArray( val ) ? 7203 jQuery.map( val, function( val , i){7325 jQuery.map( val, function( val ){ 7204 7326 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 7205 7327 }) : … … 7255 7377 7256 7378 } else { 7257 // If array item is non-scalar (array or object), encode its 7258 // numeric index to resolve deserialization ambiguity issues. 7259 // Note that rack (as of 1.0.0) can't currently deserialize 7260 // nested arrays properly, and attempting to do so may cause 7261 // a server error. Possible fixes are to modify rack's 7262 // deserialization algorithm or to provide an option or flag 7263 // to force array serialization to be shallow. 7379 // Item is non-scalar (array or object), encode its numeric index. 7264 7380 buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); 7265 7381 } … … 7277 7393 } 7278 7394 } 7395 jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + 7396 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 7397 "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { 7398 7399 // Handle event binding 7400 jQuery.fn[ name ] = function( data, fn ) { 7401 return arguments.length > 0 ? 7402 this.on( name, null, data, fn ) : 7403 this.trigger( name ); 7404 }; 7405 }); 7406 7407 jQuery.fn.hover = function( fnOver, fnOut ) { 7408 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 7409 }; 7279 7410 var 7280 7411 // Document location 7281 7412 ajaxLocParts, 7282 7413 ajaxLocation, 7283 7414 ajax_nonce = jQuery.now(), 7415 7416 ajax_rquery = /\?/, 7284 7417 rhash = /#.*$/, 7418 rts = /([?&])_=[^&]*/, 7285 7419 rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL 7286 7420 // #7653, #8125, #8152: local protocol detection 7287 rlocalProtocol = /^(?:about|app|app \-storage|.+\-extension|file|res|widget):$/,7421 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 7288 7422 rnoContent = /^(?:GET|HEAD)$/, 7289 7423 rprotocol = /^\/\//, 7290 rquery = /\?/, 7291 rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, 7292 rts = /([?&])_=[^&]*/, 7293 rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, 7424 rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, 7294 7425 7295 7426 // Keep a copy of the old load method … … 7315 7446 7316 7447 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 7317 allTypes = ["*/"] + ["*"];7448 allTypes = "*/".concat("*"); 7318 7449 7319 7450 // #8138, IE may throw an exception when accessing … … 7343 7474 } 7344 7475 7345 var dataType, list, placeBefore, 7346 dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), 7476 var dataType, 7347 7477 i = 0, 7348 length = dataTypes.length;7478 dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; 7349 7479 7350 7480 if ( jQuery.isFunction( func ) ) { 7351 7481 // For each dataType in the dataTypeExpression 7352 for ( ; i < length; i++ ) { 7353 dataType = dataTypes[ i ]; 7354 // We control if we're asked to add before 7355 // any existing element 7356 placeBefore = /^\+/.test( dataType ); 7357 if ( placeBefore ) { 7358 dataType = dataType.substr( 1 ) || "*"; 7359 } 7360 list = structure[ dataType ] = structure[ dataType ] || []; 7361 // then we add to the structure accordingly 7362 list[ placeBefore ? "unshift" : "push" ]( func ); 7482 while ( (dataType = dataTypes[i++]) ) { 7483 // Prepend if requested 7484 if ( dataType[0] === "+" ) { 7485 dataType = dataType.slice( 1 ) || "*"; 7486 (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); 7487 7488 // Otherwise append 7489 } else { 7490 (structure[ dataType ] = structure[ dataType ] || []).push( func ); 7491 } 7363 7492 } 7364 7493 } … … 7367 7496 7368 7497 // Base inspection function for prefilters and transports 7369 function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, 7370 dataType /* internal */, inspected /* internal */ ) { 7371 7372 dataType = dataType || options.dataTypes[ 0 ]; 7373 inspected = inspected || {}; 7374 7375 inspected[ dataType ] = true; 7376 7377 var selection, 7378 list = structure[ dataType ], 7379 i = 0, 7380 length = list ? list.length : 0, 7381 executeOnly = ( structure === prefilters ); 7382 7383 for ( ; i < length && ( executeOnly || !selection ); i++ ) { 7384 selection = list[ i ]( options, originalOptions, jqXHR ); 7385 // If we got redirected to another dataType 7386 // we try there if executing only and not done already 7387 if ( typeof selection === "string" ) { 7388 if ( !executeOnly || inspected[ selection ] ) { 7389 selection = undefined; 7390 } else { 7391 options.dataTypes.unshift( selection ); 7392 selection = inspectPrefiltersOrTransports( 7393 structure, options, originalOptions, jqXHR, selection, inspected ); 7394 } 7395 } 7396 } 7397 // If we're only executing or nothing was selected 7398 // we try the catchall dataType if not done already 7399 if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { 7400 selection = inspectPrefiltersOrTransports( 7401 structure, options, originalOptions, jqXHR, "*", inspected ); 7402 } 7403 // unnecessary when only executing (prefilters) 7404 // but it'll be ignored by the caller in that case 7405 return selection; 7498 function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 7499 7500 var inspected = {}, 7501 seekingTransport = ( structure === transports ); 7502 7503 function inspect( dataType ) { 7504 var selected; 7505 inspected[ dataType ] = true; 7506 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 7507 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 7508 if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 7509 options.dataTypes.unshift( dataTypeOrTransport ); 7510 inspect( dataTypeOrTransport ); 7511 return false; 7512 } else if ( seekingTransport ) { 7513 return !( selected = dataTypeOrTransport ); 7514 } 7515 }); 7516 return selected; 7517 } 7518 7519 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 7406 7520 } 7407 7521 … … 7410 7524 // Fixes #9887 7411 7525 function ajaxExtend( target, src ) { 7412 var key, deep,7526 var deep, key, 7413 7527 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 7528 7414 7529 for ( key in src ) { 7415 7530 if ( src[ key ] !== undefined ) { 7416 ( flatOptions[ key ] ? target : ( deep || ( deep = {}) ) )[ key ] = src[ key ];7531 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; 7417 7532 } 7418 7533 } … … 7420 7535 jQuery.extend( true, target, deep ); 7421 7536 } 7537 7538 return target; 7422 7539 } 7423 7540 … … 7427 7544 } 7428 7545 7429 // Don't do a request if no elements are being requested 7430 if ( !this.length ) { 7431 return this; 7432 } 7433 7434 var selector, type, response, 7546 var selector, response, type, 7435 7547 self = this, 7436 7548 off = url.indexOf(" "); … … 7453 7565 } 7454 7566 7455 // Request the remote document 7456 jQuery.ajax({ 7457 url: url, 7458 7459 // if "type" variable is undefined, then "GET" method will be used 7460 type: type, 7461 dataType: "html", 7462 data: params, 7463 complete: function( jqXHR, status ) { 7464 if ( callback ) { 7465 self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); 7466 } 7467 } 7468 }).done(function( responseText ) { 7469 7470 // Save response for use in complete callback 7471 response = arguments; 7472 7473 // See if a selector was specified 7474 self.html( selector ? 7475 7476 // Create a dummy div to hold the results 7477 jQuery("<div>") 7478 7479 // inject the contents of the document in, removing the scripts 7480 // to avoid any 'Permission Denied' errors in IE 7481 .append( responseText.replace( rscript, "" ) ) 7482 7483 // Locate the specified elements 7484 .find( selector ) : 7485 7486 // If not, just inject the full result 7487 responseText ); 7488 7489 }); 7567 // If we have elements to modify, make the request 7568 if ( self.length > 0 ) { 7569 jQuery.ajax({ 7570 url: url, 7571 7572 // if "type" variable is undefined, then "GET" method will be used 7573 type: type, 7574 dataType: "html", 7575 data: params 7576 }).done(function( responseText ) { 7577 7578 // Save response for use in complete callback 7579 response = arguments; 7580 7581 self.html( selector ? 7582 7583 // If a selector was specified, locate the right elements in a dummy div 7584 // Exclude scripts to avoid IE 'Permission Denied' errors 7585 jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : 7586 7587 // Otherwise use the full result 7588 responseText ); 7589 7590 }).complete( callback && function( jqXHR, status ) { 7591 self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); 7592 }); 7593 } 7490 7594 7491 7595 return this; … … 7493 7597 7494 7598 // Attach a bunch of functions for handling common AJAX events 7495 jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o){7496 jQuery.fn[ o ] = function( f){7497 return this.on( o, f);7599 jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ 7600 jQuery.fn[ type ] = function( fn ){ 7601 return this.on( type, fn ); 7498 7602 }; 7499 7603 }); … … 7509 7613 7510 7614 return jQuery.ajax({ 7615 url: url, 7511 7616 type: method, 7512 url: url,7617 dataType: type, 7513 7618 data: data, 7514 success: callback, 7515 dataType: type 7619 success: callback 7516 7620 }); 7517 7621 }; … … 7520 7624 jQuery.extend({ 7521 7625 7522 getScript: function( url, callback ) { 7523 return jQuery.get( url, undefined, callback, "script" ); 7524 }, 7525 7526 getJSON: function( url, data, callback ) { 7527 return jQuery.get( url, data, callback, "json" ); 7528 }, 7529 7530 // Creates a full fledged settings object into target 7531 // with both ajaxSettings and settings fields. 7532 // If target is omitted, writes into ajaxSettings. 7533 ajaxSetup: function( target, settings ) { 7534 if ( settings ) { 7535 // Building a settings object 7536 ajaxExtend( target, jQuery.ajaxSettings ); 7537 } else { 7538 // Extending ajaxSettings 7539 settings = target; 7540 target = jQuery.ajaxSettings; 7541 } 7542 ajaxExtend( target, settings ); 7543 return target; 7544 }, 7626 // Counter for holding the number of active queries 7627 active: 0, 7628 7629 // Last-Modified header cache for next request 7630 lastModified: {}, 7631 etag: {}, 7545 7632 7546 7633 ajaxSettings: { 7547 7634 url: ajaxLocation, 7635 type: "GET", 7548 7636 isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), 7549 7637 global: true, 7550 type: "GET",7551 contentType: "application/x-www-form-urlencoded; charset=UTF-8",7552 7638 processData: true, 7553 7639 async: true, 7640 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 7554 7641 /* 7555 7642 timeout: 0, … … 7565 7652 7566 7653 accepts: { 7654 "*": allTypes, 7655 text: "text/plain", 7656 html: "text/html", 7567 7657 xml: "application/xml, text/xml", 7568 html: "text/html", 7569 text: "text/plain", 7570 json: "application/json, text/javascript", 7571 "*": allTypes 7658 json: "application/json, text/javascript" 7572 7659 }, 7573 7660 … … 7583 7670 }, 7584 7671 7585 // List of data converters 7586 // 1) key format is "source_type destination_type" (a single space in-between) 7587 // 2) the catchall symbol "*" can be used for source_type 7672 // Data converters 7673 // Keys separate source (or catchall "*") and destination types with a single space 7588 7674 converters: { 7589 7675 … … 7606 7692 // deep extended (see ajaxExtend) 7607 7693 flatOptions: { 7608 context: true, 7609 url: true 7610 } 7694 url: true, 7695 context: true 7696 } 7697 }, 7698 7699 // Creates a full fledged settings object into target 7700 // with both ajaxSettings and settings fields. 7701 // If target is omitted, writes into ajaxSettings. 7702 ajaxSetup: function( target, settings ) { 7703 return settings ? 7704 7705 // Building a settings object 7706 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 7707 7708 // Extending ajaxSettings 7709 ajaxExtend( jQuery.ajaxSettings, target ); 7611 7710 }, 7612 7711 … … 7626 7725 options = options || {}; 7627 7726 7628 var // ifModified key 7629 ifModifiedKey, 7630 // Response headers 7727 var // Cross-domain detection vars 7728 parts, 7729 // Loop variable 7730 i, 7731 // URL without anti-cache param 7732 cacheURL, 7733 // Response headers as string 7631 7734 responseHeadersString, 7632 responseHeaders,7633 // transport7634 transport,7635 7735 // timeout handle 7636 7736 timeoutTimer, 7637 // Cross-domain detection vars 7638 parts, 7737 7639 7738 // To know if global events are to be dispatched 7640 7739 fireGlobals, 7641 // Loop variable 7642 i, 7740 7741 transport, 7742 // Response headers 7743 responseHeaders, 7643 7744 // Create the final options object 7644 7745 s = jQuery.ajaxSetup( {}, options ), 7645 7746 // Callbacks context 7646 7747 callbackContext = s.context || s, 7647 // Context for global events 7648 // It's the callbackContext if one was provided in the options 7649 // and if it's a DOM node or a jQuery collection 7650 globalEventContext = callbackContext !== s && 7651 ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? 7652 jQuery( callbackContext ) : jQuery.event, 7748 // Context for global events is callbackContext if it is a DOM node or jQuery collection 7749 globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? 7750 jQuery( callbackContext ) : 7751 jQuery.event, 7653 7752 // Deferreds 7654 7753 deferred = jQuery.Deferred(), 7655 completeDeferred = jQuery.Callbacks( "once memory"),7754 completeDeferred = jQuery.Callbacks("once memory"), 7656 7755 // Status-dependent callbacks 7657 7756 statusCode = s.statusCode || {}, … … 7665 7764 // Fake xhr 7666 7765 jqXHR = { 7667 7668 7766 readyState: 0, 7669 7670 // Caches the header7671 setRequestHeader: function( name, value ) {7672 if ( !state ) {7673 var lname = name.toLowerCase();7674 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;7675 requestHeaders[ name ] = value;7676 }7677 return this;7678 },7679 7680 // Raw string7681 getAllResponseHeaders: function() {7682 return state === 2 ? responseHeadersString : null;7683 },7684 7767 7685 7768 // Builds headers hashtable if needed … … 7689 7772 if ( !responseHeaders ) { 7690 7773 responseHeaders = {}; 7691 while ( ( match = rheaders.exec( responseHeadersString )) ) {7774 while ( (match = rheaders.exec( responseHeadersString )) ) { 7692 7775 responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; 7693 7776 } … … 7695 7778 match = responseHeaders[ key.toLowerCase() ]; 7696 7779 } 7697 return match === undefined ? null : match; 7780 return match == null ? null : match; 7781 }, 7782 7783 // Raw string 7784 getAllResponseHeaders: function() { 7785 return state === 2 ? responseHeadersString : null; 7786 }, 7787 7788 // Caches the header 7789 setRequestHeader: function( name, value ) { 7790 var lname = name.toLowerCase(); 7791 if ( !state ) { 7792 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; 7793 requestHeaders[ name ] = value; 7794 } 7795 return this; 7698 7796 }, 7699 7797 … … 7706 7804 }, 7707 7805 7806 // Status-dependent callbacks 7807 statusCode: function( map ) { 7808 var code; 7809 if ( map ) { 7810 if ( state < 2 ) { 7811 for ( code in map ) { 7812 // Lazy-add the new callback in a way that preserves old ones 7813 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 7814 } 7815 } else { 7816 // Execute the appropriate callbacks 7817 jqXHR.always( map[ jqXHR.status ] ); 7818 } 7819 } 7820 return this; 7821 }, 7822 7708 7823 // Cancel the request 7709 7824 abort: function( statusText ) { 7710 statusText = statusText || strAbort;7825 var finalText = statusText || strAbort; 7711 7826 if ( transport ) { 7712 transport.abort( statusText );7827 transport.abort( finalText ); 7713 7828 } 7714 done( 0, statusText );7829 done( 0, finalText ); 7715 7830 return this; 7716 7831 } 7717 7832 }; 7718 7833 7719 // Callback for when everything is done7720 // It is defined here because jslint complains if it is declared7721 // at the end of the function (which would be more logical and readable)7722 function done( status, nativeStatusText, responses, headers ) {7723 var isSuccess, success, error, response, modified,7724 statusText = nativeStatusText;7725 7726 // Called once7727 if ( state === 2 ) {7728 return;7729 }7730 7731 // State is "done" now7732 state = 2;7733 7734 // Clear timeout if it exists7735 if ( timeoutTimer ) {7736 clearTimeout( timeoutTimer );7737 }7738 7739 // Dereference transport for early garbage collection7740 // (no matter how long the jqXHR object will be used)7741 transport = undefined;7742 7743 // Cache response headers7744 responseHeadersString = headers || "";7745 7746 // Set readyState7747 jqXHR.readyState = status > 0 ? 4 : 0;7748 7749 // Get response data7750 if ( responses ) {7751 response = ajaxHandleResponses( s, jqXHR, responses );7752 }7753 7754 // If successful, handle type chaining7755 if ( status >= 200 && status < 300 || status === 304 ) {7756 7757 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.7758 if ( s.ifModified ) {7759 7760 modified = jqXHR.getResponseHeader("Last-Modified");7761 if ( modified ) {7762 jQuery.lastModified[ ifModifiedKey ] = modified;7763 }7764 modified = jqXHR.getResponseHeader("Etag");7765 if ( modified ) {7766 jQuery.etag[ ifModifiedKey ] = modified;7767 }7768 }7769 7770 // If not modified7771 if ( status === 304 ) {7772 7773 statusText = "notmodified";7774 isSuccess = true;7775 7776 // If we have data7777 } else {7778 7779 isSuccess = ajaxConvert( s, response );7780 statusText = isSuccess.state;7781 success = isSuccess.data;7782 error = isSuccess.error;7783 isSuccess = !error;7784 }7785 } else {7786 // We extract error from statusText7787 // then normalize statusText and status for non-aborts7788 error = statusText;7789 if ( !statusText || status ) {7790 statusText = "error";7791 if ( status < 0 ) {7792 status = 0;7793 }7794 }7795 }7796 7797 // Set data for the fake xhr object7798 jqXHR.status = status;7799 jqXHR.statusText = ( nativeStatusText || statusText ) + "";7800 7801 // Success/Error7802 if ( isSuccess ) {7803 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );7804 } else {7805 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );7806 }7807 7808 // Status-dependent callbacks7809 jqXHR.statusCode( statusCode );7810 statusCode = undefined;7811 7812 if ( fireGlobals ) {7813 globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),7814 [ jqXHR, s, isSuccess ? success : error ] );7815 }7816 7817 // Complete7818 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );7819 7820 if ( fireGlobals ) {7821 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );7822 // Handle the global AJAX counter7823 if ( !( --jQuery.active ) ) {7824 jQuery.event.trigger( "ajaxStop" );7825 }7826 }7827 }7828 7829 7834 // Attach deferreds 7830 deferred.promise( jqXHR ) ;7835 deferred.promise( jqXHR ).complete = completeDeferred.add; 7831 7836 jqXHR.success = jqXHR.done; 7832 7837 jqXHR.error = jqXHR.fail; 7833 jqXHR.complete = completeDeferred.add;7834 7835 // Status-dependent callbacks7836 jqXHR.statusCode = function( map ) {7837 if ( map ) {7838 var tmp;7839 if ( state < 2 ) {7840 for ( tmp in map ) {7841 statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];7842 }7843 } else {7844 tmp = map[ jqXHR.status ];7845 jqXHR.always( tmp );7846 }7847 }7848 return this;7849 };7850 7838 7851 7839 // Remove hash character (#7531: and string promotion) 7852 7840 // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) 7841 // Handle falsy url in the settings object (#10093: consistency with old signature) 7853 7842 // We also use the url parameter if available 7854 s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); 7843 s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); 7844 7845 // Alias method option to type as per ticket #12004 7846 s.type = options.method || options.type || s.method || s.type; 7855 7847 7856 7848 // Extract dataTypes list 7857 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase(). split( core_rspace );7849 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; 7858 7850 7859 7851 // A cross-domain request is in order when we have a protocol:host:port mismatch … … 7883 7875 fireGlobals = s.global; 7884 7876 7877 // Watch for a new set of requests 7878 if ( fireGlobals && jQuery.active++ === 0 ) { 7879 jQuery.event.trigger("ajaxStart"); 7880 } 7881 7885 7882 // Uppercase the type 7886 7883 s.type = s.type.toUpperCase(); … … 7889 7886 s.hasContent = !rnoContent.test( s.type ); 7890 7887 7891 // Watch for a new set of requests 7892 if ( fireGlobals && jQuery.active++ === 0 ) { 7893 jQuery.event.trigger( "ajaxStart" ); 7894 } 7888 // Save the URL in case we're toying with the If-Modified-Since 7889 // and/or If-None-Match header later on 7890 cacheURL = s.url; 7895 7891 7896 7892 // More options handling for requests with no content … … 7899 7895 // If data is available, append data to url 7900 7896 if ( s.data ) { 7901 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;7897 cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); 7902 7898 // #9682: remove data so that it's not used in an eventual retry 7903 7899 delete s.data; 7904 7900 } 7905 7901 7906 // Get ifModifiedKey before adding the anti-cache parameter7907 ifModifiedKey = s.url;7908 7909 7902 // Add anti-cache in url if needed 7910 7903 if ( s.cache === false ) { 7911 7912 var ts = jQuery.now(), 7913 // try replacing _= if it is there 7914 ret = s.url.replace( rts, "$1_=" + ts ); 7915 7916 // if nothing was replaced, add timestamp to the end 7917 s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); 7904 s.url = rts.test( cacheURL ) ? 7905 7906 // If there is already a '_' parameter, set its value 7907 cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : 7908 7909 // Otherwise add one to the end 7910 cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; 7911 } 7912 } 7913 7914 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 7915 if ( s.ifModified ) { 7916 if ( jQuery.lastModified[ cacheURL ] ) { 7917 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 7918 } 7919 if ( jQuery.etag[ cacheURL ] ) { 7920 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 7918 7921 } 7919 7922 } … … 7922 7925 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 7923 7926 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 7924 }7925 7926 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.7927 if ( s.ifModified ) {7928 ifModifiedKey = ifModifiedKey || s.url;7929 if ( jQuery.lastModified[ ifModifiedKey ] ) {7930 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );7931 }7932 if ( jQuery.etag[ ifModifiedKey ] ) {7933 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );7934 }7935 7927 } 7936 7928 … … 7950 7942 // Allow custom headers/mimetypes and early abort 7951 7943 if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { 7952 // Abort if not done already and return 7953 return jqXHR.abort(); 7954 7944 // Abort if not done already and return 7945 return jqXHR.abort(); 7955 7946 } 7956 7947 … … 7971 7962 } else { 7972 7963 jqXHR.readyState = 1; 7964 7973 7965 // Send global event 7974 7966 if ( fireGlobals ) { … … 7977 7969 // Timeout 7978 7970 if ( s.async && s.timeout > 0 ) { 7979 timeoutTimer = setTimeout( function(){7980 jqXHR.abort( "timeout");7971 timeoutTimer = setTimeout(function() { 7972 jqXHR.abort("timeout"); 7981 7973 }, s.timeout ); 7982 7974 } … … 7985 7977 state = 1; 7986 7978 transport.send( requestHeaders, done ); 7987 } catch ( e) {7979 } catch ( e ) { 7988 7980 // Propagate exception as error if not done 7989 7981 if ( state < 2 ) { … … 7996 7988 } 7997 7989 7990 // Callback for when everything is done 7991 function done( status, nativeStatusText, responses, headers ) { 7992 var isSuccess, success, error, response, modified, 7993 statusText = nativeStatusText; 7994 7995 // Called once 7996 if ( state === 2 ) { 7997 return; 7998 } 7999 8000 // State is "done" now 8001 state = 2; 8002 8003 // Clear timeout if it exists 8004 if ( timeoutTimer ) { 8005 clearTimeout( timeoutTimer ); 8006 } 8007 8008 // Dereference transport for early garbage collection 8009 // (no matter how long the jqXHR object will be used) 8010 transport = undefined; 8011 8012 // Cache response headers 8013 responseHeadersString = headers || ""; 8014 8015 // Set readyState 8016 jqXHR.readyState = status > 0 ? 4 : 0; 8017 8018 // Get response data 8019 if ( responses ) { 8020 response = ajaxHandleResponses( s, jqXHR, responses ); 8021 } 8022 8023 // If successful, handle type chaining 8024 if ( status >= 200 && status < 300 || status === 304 ) { 8025 8026 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 8027 if ( s.ifModified ) { 8028 modified = jqXHR.getResponseHeader("Last-Modified"); 8029 if ( modified ) { 8030 jQuery.lastModified[ cacheURL ] = modified; 8031 } 8032 modified = jqXHR.getResponseHeader("etag"); 8033 if ( modified ) { 8034 jQuery.etag[ cacheURL ] = modified; 8035 } 8036 } 8037 8038 // if no content 8039 if ( status === 204 ) { 8040 isSuccess = true; 8041 statusText = "nocontent"; 8042 8043 // if not modified 8044 } else if ( status === 304 ) { 8045 isSuccess = true; 8046 statusText = "notmodified"; 8047 8048 // If we have data, let's convert it 8049 } else { 8050 isSuccess = ajaxConvert( s, response ); 8051 statusText = isSuccess.state; 8052 success = isSuccess.data; 8053 error = isSuccess.error; 8054 isSuccess = !error; 8055 } 8056 } else { 8057 // We extract error from statusText 8058 // then normalize statusText and status for non-aborts 8059 error = statusText; 8060 if ( status || !statusText ) { 8061 statusText = "error"; 8062 if ( status < 0 ) { 8063 status = 0; 8064 } 8065 } 8066 } 8067 8068 // Set data for the fake xhr object 8069 jqXHR.status = status; 8070 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 8071 8072 // Success/Error 8073 if ( isSuccess ) { 8074 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 8075 } else { 8076 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 8077 } 8078 8079 // Status-dependent callbacks 8080 jqXHR.statusCode( statusCode ); 8081 statusCode = undefined; 8082 8083 if ( fireGlobals ) { 8084 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 8085 [ jqXHR, s, isSuccess ? success : error ] ); 8086 } 8087 8088 // Complete 8089 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 8090 8091 if ( fireGlobals ) { 8092 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 8093 // Handle the global AJAX counter 8094 if ( !( --jQuery.active ) ) { 8095 jQuery.event.trigger("ajaxStop"); 8096 } 8097 } 8098 } 8099 7998 8100 return jqXHR; 7999 8101 }, 8000 8102 8001 // Counter for holding the number of active queries8002 active: 0,8003 8004 // Last-Modified header cache for next request 8005 lastModified: {},8006 etag: {}8007 8103 getScript: function( url, callback ) { 8104 return jQuery.get( url, undefined, callback, "script" ); 8105 }, 8106 8107 getJSON: function( url, data, callback ) { 8108 return jQuery.get( url, data, callback, "json" ); 8109 } 8008 8110 }); 8009 8111 … … 8014 8116 */ 8015 8117 function ajaxHandleResponses( s, jqXHR, responses ) { 8016 8017 var ct, type, finalDataType, firstDataType, 8118 var firstDataType, ct, finalDataType, type, 8018 8119 contents = s.contents, 8019 8120 dataTypes = s.dataTypes, … … 8031 8132 dataTypes.shift(); 8032 8133 if ( ct === undefined ) { 8033 ct = s.mimeType || jqXHR.getResponseHeader( "content-type");8134 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 8034 8135 } 8035 8136 } … … 8076 8177 // Chain conversions given the request and the original response 8077 8178 function ajaxConvert( s, response ) { 8078 8079 var conv, conv2, current, tmp, 8179 var conv2, current, conv, tmp, 8180 converters = {}, 8181 i = 0, 8080 8182 // Work with a copy of dataTypes in case we need to modify it for conversion 8081 8183 dataTypes = s.dataTypes.slice(), 8082 prev = dataTypes[ 0 ], 8083 converters = {}, 8084 i = 0; 8184 prev = dataTypes[ 0 ]; 8085 8185 8086 8186 // Apply the dataFilter if provided … … 8159 8259 return { state: "success", data: response }; 8160 8260 } 8161 var oldCallbacks = [],8162 rquestion = /\?/,8163 rjsonp = /(=)\?(?=&|$)|\?\?/,8164 nonce = jQuery.now();8165 8166 // Default jsonp settings8167 jQuery.ajaxSetup({8168 jsonp: "callback",8169 jsonpCallback: function() {8170 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );8171 this[ callback ] = true;8172 return callback;8173 }8174 });8175 8176 // Detect, normalize options and install callbacks for jsonp requests8177 jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {8178 8179 var callbackName, overwritten, responseContainer,8180 data = s.data,8181 url = s.url,8182 hasCallback = s.jsonp !== false,8183 replaceInUrl = hasCallback && rjsonp.test( url ),8184 replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&8185 !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&8186 rjsonp.test( data );8187 8188 // Handle iff the expected data type is "jsonp" or we have a parameter to set8189 if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) {8190 8191 // Get callback name, remembering preexisting value associated with it8192 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?8193 s.jsonpCallback() :8194 s.jsonpCallback;8195 overwritten = window[ callbackName ];8196 8197 // Insert callback into url or form data8198 if ( replaceInUrl ) {8199 s.url = url.replace( rjsonp, "$1" + callbackName );8200 } else if ( replaceInData ) {8201 s.data = data.replace( rjsonp, "$1" + callbackName );8202 } else if ( hasCallback ) {8203 s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;8204 }8205 8206 // Use data converter to retrieve json after script execution8207 s.converters["script json"] = function() {8208 if ( !responseContainer ) {8209 jQuery.error( callbackName + " was not called" );8210 }8211 return responseContainer[ 0 ];8212 };8213 8214 // force json dataType8215 s.dataTypes[ 0 ] = "json";8216 8217 // Install callback8218 window[ callbackName ] = function() {8219 responseContainer = arguments;8220 };8221 8222 // Clean-up function (fires after converters)8223 jqXHR.always(function() {8224 // Restore preexisting value8225 window[ callbackName ] = overwritten;8226 8227 // Save back as free8228 if ( s[ callbackName ] ) {8229 // make sure that re-using the options doesn't screw things around8230 s.jsonpCallback = originalSettings.jsonpCallback;8231 8232 // save the callback name for future use8233 oldCallbacks.push( callbackName );8234 }8235 8236 // Call if it was a function and we have a response8237 if ( responseContainer && jQuery.isFunction( overwritten ) ) {8238 overwritten( responseContainer[ 0 ] );8239 }8240 8241 responseContainer = overwritten = undefined;8242 });8243 8244 // Delegate to script8245 return "script";8246 }8247 });8248 8261 // Install script dataType 8249 8262 jQuery.ajaxSetup({ … … 8252 8265 }, 8253 8266 contents: { 8254 script: / javascript|ecmascript/8267 script: /(?:java|ecma)script/ 8255 8268 }, 8256 8269 converters: { … … 8280 8293 8281 8294 var script, 8282 head = document.head || document.getElementsByTagName( "head")[0] || document.documentElement;8295 head = document.head || jQuery("head")[0] || document.documentElement; 8283 8296 8284 8297 return { … … 8286 8299 send: function( _, callback ) { 8287 8300 8288 script = document.createElement( "script");8289 8290 script.async = "async";8301 script = document.createElement("script"); 8302 8303 script.async = true; 8291 8304 8292 8305 if ( s.scriptCharset ) { … … 8305 8318 8306 8319 // Remove the script 8307 if ( head &&script.parentNode ) {8308 head.removeChild( script );8320 if ( script.parentNode ) { 8321 script.parentNode.removeChild( script ); 8309 8322 } 8310 8323 8311 8324 // Dereference the script 8312 script = undefined;8325 script = null; 8313 8326 8314 8327 // Callback if not abort … … 8318 8331 } 8319 8332 }; 8320 // Use insertBefore instead of appendChild to circumvent an IE6 bug. 8321 // This arises when a base node is used (#2709 and #4378). 8333 8334 // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending 8335 // Use native DOM manipulation to avoid our domManip AJAX trickery 8322 8336 head.insertBefore( script, head.firstChild ); 8323 8337 }, … … 8325 8339 abort: function() { 8326 8340 if ( script ) { 8327 script.onload( 0, 1);8341 script.onload( undefined, true ); 8328 8342 } 8329 8343 } … … 8331 8345 } 8332 8346 }); 8333 var xhrCallbacks, 8347 var oldCallbacks = [], 8348 rjsonp = /(=)\?(?=&|$)|\?\?/; 8349 8350 // Default jsonp settings 8351 jQuery.ajaxSetup({ 8352 jsonp: "callback", 8353 jsonpCallback: function() { 8354 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); 8355 this[ callback ] = true; 8356 return callback; 8357 } 8358 }); 8359 8360 // Detect, normalize options and install callbacks for jsonp requests 8361 jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 8362 8363 var callbackName, overwritten, responseContainer, 8364 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 8365 "url" : 8366 typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" 8367 ); 8368 8369 // Handle iff the expected data type is "jsonp" or we have a parameter to set 8370 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 8371 8372 // Get callback name, remembering preexisting value associated with it 8373 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 8374 s.jsonpCallback() : 8375 s.jsonpCallback; 8376 8377 // Insert callback into url or form data 8378 if ( jsonProp ) { 8379 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 8380 } else if ( s.jsonp !== false ) { 8381 s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 8382 } 8383 8384 // Use data converter to retrieve json after script execution 8385 s.converters["script json"] = function() { 8386 if ( !responseContainer ) { 8387 jQuery.error( callbackName + " was not called" ); 8388 } 8389 return responseContainer[ 0 ]; 8390 }; 8391 8392 // force json dataType 8393 s.dataTypes[ 0 ] = "json"; 8394 8395 // Install callback 8396 overwritten = window[ callbackName ]; 8397 window[ callbackName ] = function() { 8398 responseContainer = arguments; 8399 }; 8400 8401 // Clean-up function (fires after converters) 8402 jqXHR.always(function() { 8403 // Restore preexisting value 8404 window[ callbackName ] = overwritten; 8405 8406 // Save back as free 8407 if ( s[ callbackName ] ) { 8408 // make sure that re-using the options doesn't screw things around 8409 s.jsonpCallback = originalSettings.jsonpCallback; 8410 8411 // save the callback name for future use 8412 oldCallbacks.push( callbackName ); 8413 } 8414 8415 // Call if it was a function and we have a response 8416 if ( responseContainer && jQuery.isFunction( overwritten ) ) { 8417 overwritten( responseContainer[ 0 ] ); 8418 } 8419 8420 responseContainer = overwritten = undefined; 8421 }); 8422 8423 // Delegate to script 8424 return "script"; 8425 } 8426 }); 8427 var xhrCallbacks, xhrSupported, 8428 xhrId = 0, 8334 8429 // #5280: Internet Explorer will keep connections alive if we don't abort on unload 8335 xhrOnUnloadAbort = window.ActiveXObject ?function() {8430 xhrOnUnloadAbort = window.ActiveXObject && function() { 8336 8431 // Abort all pending requests 8337 for ( var key in xhrCallbacks ) {8338 xhrCallbacks[ key ]( 0, 1 );8339 }8340 } : false,8341 xhrId = 0;8432 var key; 8433 for ( key in xhrCallbacks ) { 8434 xhrCallbacks[ key ]( undefined, true ); 8435 } 8436 }; 8342 8437 8343 8438 // Functions to create xhrs … … 8350 8445 function createActiveXHR() { 8351 8446 try { 8352 return new window.ActiveXObject( "Microsoft.XMLHTTP");8447 return new window.ActiveXObject("Microsoft.XMLHTTP"); 8353 8448 } catch( e ) {} 8354 8449 } … … 8370 8465 8371 8466 // Determine support properties 8372 (function( xhr ) { 8373 jQuery.extend( jQuery.support, { 8374 ajax: !!xhr, 8375 cors: !!xhr && ( "withCredentials" in xhr ) 8376 }); 8377 })( jQuery.ajaxSettings.xhr() ); 8467 xhrSupported = jQuery.ajaxSettings.xhr(); 8468 jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 8469 xhrSupported = jQuery.support.ajax = !!xhrSupported; 8378 8470 8379 8471 // Create transport if the browser can provide an xhr 8380 if ( jQuery.support.ajax) {8472 if ( xhrSupported ) { 8381 8473 8382 8474 jQuery.ajaxTransport(function( s ) { … … 8419 8511 // For same-domain requests, won't change header if already provided. 8420 8512 if ( !s.crossDomain && !headers["X-Requested-With"] ) { 8421 headers[ "X-Requested-With"] = "XMLHttpRequest";8513 headers["X-Requested-With"] = "XMLHttpRequest"; 8422 8514 } 8423 8515 … … 8427 8519 xhr.setRequestHeader( i, headers[ i ] ); 8428 8520 } 8429 } catch( _) {}8521 } catch( err ) {} 8430 8522 8431 8523 // Do send the request … … 8436 8528 // Listener 8437 8529 callback = function( _, isAbort ) { 8438 8439 var status, 8440 statusText, 8441 responseHeaders, 8442 responses, 8443 xml; 8530 var status, responseHeaders, statusText, responses; 8444 8531 8445 8532 // Firefox throws exceptions when accessing properties … … 8469 8556 } 8470 8557 } else { 8558 responses = {}; 8471 8559 status = xhr.status; 8472 8560 responseHeaders = xhr.getAllResponseHeaders(); 8473 responses = {};8474 xml = xhr.responseXML;8475 8476 // Construct response list8477 if ( xml && xml.documentElement /* #4958 */ ) {8478 responses.xml = xml;8479 }8480 8561 8481 8562 // When requesting binary data, IE6-9 will throw an exception 8482 8563 // on any attempt to access responseText (#11426) 8483 try{8564 if ( typeof xhr.responseText === "string" ) { 8484 8565 responses.text = xhr.responseText; 8485 } catch( e ) {8486 8566 } 8487 8567 … … 8526 8606 // (IE6 & IE7) if it's in cache and has been 8527 8607 // retrieved directly we need to fire the callback 8528 setTimeout( callback , 0);8608 setTimeout( callback ); 8529 8609 } else { 8530 8610 handle = ++xhrId; … … 8545 8625 abort: function() { 8546 8626 if ( callback ) { 8547 callback( 0,1);8627 callback( undefined, true ); 8548 8628 } 8549 8629 } … … 8554 8634 var fxNow, timerId, 8555 8635 rfxtypes = /^(?:toggle|show|hide)$/, 8556 rfxnum = new RegExp( "^(?:([ -+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),8636 rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), 8557 8637 rrun = /queueHooks$/, 8558 8638 animationPrefilters = [ defaultPrefilter ], … … 8605 8685 setTimeout(function() { 8606 8686 fxNow = undefined; 8607 } , 0);8687 }); 8608 8688 return ( fxNow = jQuery.now() ); 8609 8689 } … … 8626 8706 function Animation( elem, properties, options ) { 8627 8707 var result, 8708 stopped, 8628 8709 index = 0, 8629 tweenerIndex = 0,8630 8710 length = animationPrefilters.length, 8631 8711 deferred = jQuery.Deferred().always( function() { … … 8634 8714 }), 8635 8715 tick = function() { 8716 if ( stopped ) { 8717 return false; 8718 } 8636 8719 var currentTime = fxNow || createFxNow(), 8637 8720 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), … … 8664 8747 duration: options.duration, 8665 8748 tweens: [], 8666 createTween: function( prop, end , easing) {8749 createTween: function( prop, end ) { 8667 8750 var tween = jQuery.Tween( elem, animation.opts, prop, end, 8668 8751 animation.opts.specialEasing[ prop ] || animation.opts.easing ); … … 8675 8758 // otherwise we skip this part 8676 8759 length = gotoEnd ? animation.tweens.length : 0; 8677 8760 if ( stopped ) { 8761 return this; 8762 } 8763 stopped = true; 8678 8764 for ( ; index < length ; index++ ) { 8679 8765 animation.tweens[ index ].run( 1 ); … … 8709 8795 jQuery.fx.timer( 8710 8796 jQuery.extend( tick, { 8797 elem: elem, 8711 8798 anim: animation, 8712 queue: animation.opts.queue, 8713 elem: elem 8799 queue: animation.opts.queue 8714 8800 }) 8715 8801 ); … … 8723 8809 8724 8810 function propFilter( props, specialEasing ) { 8725 var index, name, easing, value, hooks;8811 var value, name, index, easing, hooks; 8726 8812 8727 8813 // camelCase, specialEasing and expand cssHook pass … … 8790 8876 8791 8877 function defaultPrefilter( elem, props, opts ) { 8792 var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, 8878 /*jshint validthis:true */ 8879 var prop, index, length, 8880 value, dataShow, toggle, 8881 tween, hooks, oldfire, 8793 8882 anim = this, 8794 8883 style = elem.style, … … 8850 8939 style.overflow = "hidden"; 8851 8940 if ( !jQuery.support.shrinkWrapBlocks ) { 8852 anim. done(function() {8941 anim.always(function() { 8853 8942 style.overflow = opts.overflow[ 0 ]; 8854 8943 style.overflowX = opts.overflow[ 1 ]; … … 8892 8981 anim.done(function() { 8893 8982 var prop; 8894 jQuery. removeData( elem, "fxshow", true);8983 jQuery._removeData( elem, "fxshow" ); 8895 8984 for ( prop in orig ) { 8896 8985 jQuery.style( elem, prop, orig[ prop ] ); … … 8974 9063 } 8975 9064 8976 // passing an y value as a 4thparameter to .css will automatically9065 // passing an empty string as a 3rd parameter to .css will automatically 8977 9066 // attempt a parseFloat and fallback to a string if the parse fails 8978 9067 // so, simple values such as "10px" are parsed to Float. 8979 9068 // complex values such as "rotate(1rad)" are returned as is. 8980 result = jQuery.css( tween.elem, tween.prop, false,"" );9069 result = jQuery.css( tween.elem, tween.prop, "" ); 8981 9070 // Empty strings, null, undefined and "auto" are converted to 0. 8982 9071 return !result || result === "auto" ? 0 : result; … … 9010 9099 var cssFn = jQuery.fn[ name ]; 9011 9100 jQuery.fn[ name ] = function( speed, easing, callback ) { 9012 return speed == null || typeof speed === "boolean" || 9013 // special check for .toggle( handler, handler, ... ) 9014 ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? 9101 return speed == null || typeof speed === "boolean" ? 9015 9102 cssFn.apply( this, arguments ) : 9016 9103 this.animate( genFx( name, true ), speed, easing, callback ); … … 9033 9120 // Operate on a copy of prop so per-property easing won't be lost 9034 9121 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 9035 9036 // Empty animations resolve immediately 9037 if ( empty ) { 9122 doAnimation.finish = function() { 9038 9123 anim.stop( true ); 9124 }; 9125 // Empty animations, or finishing resolves immediately 9126 if ( empty || jQuery._data( this, "finish" ) ) { 9127 anim.stop( true ); 9039 9128 } 9040 9129 }; 9130 doAnimation.finish = doAnimation; 9041 9131 9042 9132 return empty || optall.queue === false ? … … 9092 9182 jQuery.dequeue( this, type ); 9093 9183 } 9184 }); 9185 }, 9186 finish: function( type ) { 9187 if ( type !== false ) { 9188 type = type || "fx"; 9189 } 9190 return this.each(function() { 9191 var index, 9192 data = jQuery._data( this ), 9193 queue = data[ type + "queue" ], 9194 hooks = data[ type + "queueHooks" ], 9195 timers = jQuery.timers, 9196 length = queue ? queue.length : 0; 9197 9198 // enable finishing flag on private data 9199 data.finish = true; 9200 9201 // empty the queue first 9202 jQuery.queue( this, type, [] ); 9203 9204 if ( hooks && hooks.cur && hooks.cur.finish ) { 9205 hooks.cur.finish.call( this ); 9206 } 9207 9208 // look for any active animations, and finish them 9209 for ( index = timers.length; index--; ) { 9210 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 9211 timers[ index ].anim.stop( true ); 9212 timers.splice( index, 1 ); 9213 } 9214 } 9215 9216 // look for any animations in the old queue and finish them 9217 for ( index = 0; index < length; index++ ) { 9218 if ( queue[ index ] && queue[ index ].finish ) { 9219 queue[ index ].finish.call( this ); 9220 } 9221 } 9222 9223 // turn off finishing flag 9224 delete data.finish; 9094 9225 }); 9095 9226 } … … 9196 9327 9197 9328 jQuery.fx.timer = function( timer ) { 9198 if ( timer() && jQuery.timers.push( timer ) && !timerId ) { 9329 if ( timer() && jQuery.timers.push( timer ) ) { 9330 jQuery.fx.start(); 9331 } 9332 }; 9333 9334 jQuery.fx.interval = 13; 9335 9336 jQuery.fx.start = function() { 9337 if ( !timerId ) { 9199 9338 timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); 9200 9339 } 9201 9340 }; 9202 9203 jQuery.fx.interval = 13;9204 9341 9205 9342 jQuery.fx.stop = function() { … … 9225 9362 }; 9226 9363 } 9227 var rroot = /^(?:body|html)$/i;9228 9229 9364 jQuery.fn.offset = function( options ) { 9230 9365 if ( arguments.length ) { … … 9236 9371 } 9237 9372 9238 var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft,9373 var docElem, win, 9239 9374 box = { top: 0, left: 0 }, 9240 9375 elem = this[ 0 ], … … 9245 9380 } 9246 9381 9247 if ( (body = doc.body) === elem ) {9248 return jQuery.offset.bodyOffset( elem );9249 }9250 9251 9382 docElem = doc.documentElement; 9252 9383 … … 9258 9389 // If we don't have gBCR, just use 0,0 rather than error 9259 9390 // BlackBerry 5, iOS 3 (original iPhone) 9260 if ( typeof elem.getBoundingClientRect !== "undefined") {9391 if ( typeof elem.getBoundingClientRect !== core_strundefined ) { 9261 9392 box = elem.getBoundingClientRect(); 9262 9393 } 9263 9394 win = getWindow( doc ); 9264 clientTop = docElem.clientTop || body.clientTop || 0;9265 clientLeft = docElem.clientLeft || body.clientLeft || 0;9266 scrollTop = win.pageYOffset || docElem.scrollTop;9267 scrollLeft = win.pageXOffset || docElem.scrollLeft;9268 9395 return { 9269 top: box.top + scrollTop - clientTop,9270 left: box.left + scrollLeft - clientLeft9396 top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), 9397 left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) 9271 9398 }; 9272 9399 }; 9273 9400 9274 9401 jQuery.offset = { 9275 9276 bodyOffset: function( body ) {9277 var top = body.offsetTop,9278 left = body.offsetLeft;9279 9280 if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {9281 top += parseFloat( jQuery.css(body, "marginTop") ) || 0;9282 left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;9283 }9284 9285 return { top: top, left: left };9286 },9287 9402 9288 9403 setOffset: function( elem, options, i ) { … … 9334 9449 9335 9450 position: function() { 9336 if ( !this[ 0] ) {9451 if ( !this[ 0 ] ) { 9337 9452 return; 9338 9453 } 9339 9454 9340 var elem = this[0], 9341 9342 // Get *real* offsetParent 9343 offsetParent = this.offsetParent(), 9344 9345 // Get correct offsets 9346 offset = this.offset(), 9347 parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); 9348 9349 // Subtract element margins 9455 var offsetParent, offset, 9456 parentOffset = { top: 0, left: 0 }, 9457 elem = this[ 0 ]; 9458 9459 // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent 9460 if ( jQuery.css( elem, "position" ) === "fixed" ) { 9461 // we assume that getBoundingClientRect is available when computed position is fixed 9462 offset = elem.getBoundingClientRect(); 9463 } else { 9464 // Get *real* offsetParent 9465 offsetParent = this.offsetParent(); 9466 9467 // Get correct offsets 9468 offset = this.offset(); 9469 if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { 9470 parentOffset = offsetParent.offset(); 9471 } 9472 9473 // Add offsetParent borders 9474 parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); 9475 parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); 9476 } 9477 9478 // Subtract parent offsets and element margins 9350 9479 // note: when an element has margin: auto the offsetLeft and marginLeft 9351 9480 // are the same in Safari causing offset.left to incorrectly be 0 9352 offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;9353 offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;9354 9355 // Add offsetParent borders9356 parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;9357 parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;9358 9359 // Subtract the two offsets9360 9481 return { 9361 top: offset.top - parentOffset.top ,9362 left: offset.left - parentOffset.left 9482 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 9483 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) 9363 9484 }; 9364 9485 }, … … 9366 9487 offsetParent: function() { 9367 9488 return this.map(function() { 9368 var offsetParent = this.offsetParent || document. body;9369 while ( offsetParent && ( !rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {9489 var offsetParent = this.offsetParent || document.documentElement; 9490 while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { 9370 9491 offsetParent = offsetParent.offsetParent; 9371 9492 } 9372 return offsetParent || document. body;9493 return offsetParent || document.documentElement; 9373 9494 }); 9374 9495 } … … 9393 9514 win.scrollTo( 9394 9515 !top ? val : jQuery( win ).scrollLeft(), 9395 9516 top ? val : jQuery( win ).scrollTop() 9396 9517 ); 9397 9518 … … 9443 9564 return value === undefined ? 9444 9565 // Get width or height on the element, requesting but not forcing parseFloat 9445 jQuery.css( elem, type, value,extra ) :9566 jQuery.css( elem, type, extra ) : 9446 9567 9447 9568 // Set width or height on the element … … 9451 9572 }); 9452 9573 }); 9574 // Limit scope pollution from any deprecated API 9575 // (function() { 9576 9577 // })(); 9453 9578 // Expose jQuery to the global object 9454 9579 window.jQuery = window.$ = jQuery; -
trunk/themes/default/js/jquery.min.js
r19682 r22176 1 /*! jQuery v1.8.3 jquery.com | jquery.org/license */ 2 (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.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%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); 1 /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license 2 //@ sourceMappingURL=jquery.min.map 3 */(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.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%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; 4 return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) 5 }b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
Note: See TracChangeset
for help on using the changeset viewer.