tizen 2.3.1 release
[kernel/api/system-resource.git] / src / powertop-wrapper / header.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <title>PowerTOP report</title>
5 <meta http-equiv="content-type" content="text/html;charset=utf-8">
6 <script type="text/javascript">
7 /*!
8  * jQuery JavaScript Library v1.8.0
9  * http://jquery.com/
10  *
11  * Includes Sizzle.js
12  * http://sizzlejs.com/
13  *
14  * Copyright 2012 jQuery Foundation and other contributors
15  * Released under the MIT license
16  * http://jquery.org/license
17  *
18  * Date: Thu Aug 09 2012 16:24:48 GMT-0400 (Eastern Daylight Time)
19  */
20 (function( window, undefined ) {
21 var
22         // A central reference to the root jQuery(document)
23         rootjQuery,
24
25         // The deferred used on DOM ready
26         readyList,
27
28         // Use the correct document accordingly with window argument (sandbox)
29         document = window.document,
30         location = window.location,
31         navigator = window.navigator,
32
33         // Map over jQuery in case of overwrite
34         _jQuery = window.jQuery,
35
36         // Map over the $ in case of overwrite
37         _$ = window.$,
38
39         // Save a reference to some core methods
40         core_push = Array.prototype.push,
41         core_slice = Array.prototype.slice,
42         core_indexOf = Array.prototype.indexOf,
43         core_toString = Object.prototype.toString,
44         core_hasOwn = Object.prototype.hasOwnProperty,
45         core_trim = String.prototype.trim,
46
47         // Define a local copy of jQuery
48         jQuery = function( selector, context ) {
49                 // The jQuery object is actually just the init constructor 'enhanced'
50                 return new jQuery.fn.init( selector, context, rootjQuery );
51         },
52
53         // Used for matching numbers
54         core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
55
56         // Used for detecting and trimming whitespace
57         core_rnotwhite = /\S/,
58         core_rspace = /\s+/,
59
60         // IE doesn't match non-breaking spaces with \s
61         rtrim = core_rnotwhite.test("\xA0") ? (/^[\s\xA0]+|[\s\xA0]+$/g) : /^\s+|\s+$/g,
62
63         // A simple way to check for HTML strings
64         // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
65         rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
66
67         // Match a standalone tag
68         rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
69
70         // JSON RegExp
71         rvalidchars = /^[\],:{}\s]*$/,
72         rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
73         rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
74         rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
75
76         // Matches dashed string for camelizing
77         rmsPrefix = /^-ms-/,
78         rdashAlpha = /-([\da-z])/gi,
79
80         // Used by jQuery.camelCase as callback to replace()
81         fcamelCase = function( all, letter ) {
82                 return ( letter + "" ).toUpperCase();
83         },
84
85         // The ready event handler and self cleanup method
86         DOMContentLoaded = function() {
87                 if ( document.addEventListener ) {
88                         document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
89                         jQuery.ready();
90                 } else if ( document.readyState === "complete" ) {
91                         // we're here because readyState === "complete" in oldIE
92                         // which is good enough for us to call the dom ready!
93                         document.detachEvent( "onreadystatechange", DOMContentLoaded );
94                         jQuery.ready();
95                 }
96         },
97
98         // [[Class]] -> type pairs
99         class2type = {};
100
101 jQuery.fn = jQuery.prototype = {
102         constructor: jQuery,
103         init: function( selector, context, rootjQuery ) {
104                 var match, elem, ret, doc;
105
106                 // Handle $(""), $(null), $(undefined), $(false)
107                 if ( !selector ) {
108                         return this;
109                 }
110
111                 // Handle $(DOMElement)
112                 if ( selector.nodeType ) {
113                         this.context = this[0] = selector;
114                         this.length = 1;
115                         return this;
116                 }
117
118                 // Handle HTML strings
119                 if ( typeof selector === "string" ) {
120                         if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
121                                 // Assume that strings that start and end with <> are HTML and skip the regex check
122                                 match = [ null, selector, null ];
123
124                         } else {
125                                 match = rquickExpr.exec( selector );
126                         }
127
128                         // Match html or make sure no context is specified for #id
129                         if ( match && (match[1] || !context) ) {
130
131                                 // HANDLE: $(html) -> $(array)
132                                 if ( match[1] ) {
133                                         context = context instanceof jQuery ? context[0] : context;
134                                         doc = ( context && context.nodeType ? context.ownerDocument || context : document );
135
136                                         // scripts is true for back-compat
137                                         selector = jQuery.parseHTML( match[1], doc, true );
138                                         if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
139                                                 this.attr.call( selector, context, true );
140                                         }
141
142                                         return jQuery.merge( this, selector );
143
144                                 // HANDLE: $(#id)
145                                 } else {
146                                         elem = document.getElementById( match[2] );
147
148                                         // Check parentNode to catch when Blackberry 4.6 returns
149                                         // nodes that are no longer in the document #6963
150                                         if ( elem && elem.parentNode ) {
151                                                 // Handle the case where IE and Opera return items
152                                                 // by name instead of ID
153                                                 if ( elem.id !== match[2] ) {
154                                                         return rootjQuery.find( selector );
155                                                 }
156
157                                                 // Otherwise, we inject the element directly into the jQuery object
158                                                 this.length = 1;
159                                                 this[0] = elem;
160                                         }
161
162                                         this.context = document;
163                                         this.selector = selector;
164                                         return this;
165                                 }
166
167                         // HANDLE: $(expr, $(...))
168                         } else if ( !context || context.jquery ) {
169                                 return ( context || rootjQuery ).find( selector );
170
171                         // HANDLE: $(expr, context)
172                         // (which is just equivalent to: $(context).find(expr)
173                         } else {
174                                 return this.constructor( context ).find( selector );
175                         }
176
177                 // HANDLE: $(function)
178                 // Shortcut for document ready
179                 } else if ( jQuery.isFunction( selector ) ) {
180                         return rootjQuery.ready( selector );
181                 }
182
183                 if ( selector.selector !== undefined ) {
184                         this.selector = selector.selector;
185                         this.context = selector.context;
186                 }
187
188                 return jQuery.makeArray( selector, this );
189         },
190
191         // Start with an empty selector
192         selector: "",
193
194         // The current version of jQuery being used
195         jquery: "1.8.0",
196
197         // The default length of a jQuery object is 0
198         length: 0,
199
200         // The number of elements contained in the matched element set
201         size: function() {
202                 return this.length;
203         },
204
205         toArray: function() {
206                 return core_slice.call( this );
207         },
208
209         // Get the Nth element in the matched element set OR
210         // Get the whole matched element set as a clean array
211         get: function( num ) {
212                 return num == null ?
213
214                         // Return a 'clean' array
215                         this.toArray() :
216
217                         // Return just the object
218                         ( num < 0 ? this[ this.length + num ] : this[ num ] );
219         },
220
221         // Take an array of elements and push it onto the stack
222         // (returning the new matched element set)
223         pushStack: function( elems, name, selector ) {
224
225                 // Build a new jQuery matched element set
226                 var ret = jQuery.merge( this.constructor(), elems );
227
228                 // Add the old object onto the stack (as a reference)
229                 ret.prevObject = this;
230
231                 ret.context = this.context;
232
233                 if ( name === "find" ) {
234                         ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
235                 } else if ( name ) {
236                         ret.selector = this.selector + "." + name + "(" + selector + ")";
237                 }
238
239                 // Return the newly-formed element set
240                 return ret;
241         },
242
243         // Execute a callback for every element in the matched set.
244         // (You can seed the arguments with an array of args, but this is
245         // only used internally.)
246         each: function( callback, args ) {
247                 return jQuery.each( this, callback, args );
248         },
249
250         ready: function( fn ) {
251                 // Add the callback
252                 jQuery.ready.promise().done( fn );
253
254                 return this;
255         },
256
257         eq: function( i ) {
258                 i = +i;
259                 return i === -1 ?
260                         this.slice( i ) :
261                         this.slice( i, i + 1 );
262         },
263
264         first: function() {
265                 return this.eq( 0 );
266         },
267
268         last: function() {
269                 return this.eq( -1 );
270         },
271
272         slice: function() {
273                 return this.pushStack( core_slice.apply( this, arguments ),
274                         "slice", core_slice.call(arguments).join(",") );
275         },
276
277         map: function( callback ) {
278                 return this.pushStack( jQuery.map(this, function( elem, i ) {
279                         return callback.call( elem, i, elem );
280                 }));
281         },
282
283         end: function() {
284                 return this.prevObject || this.constructor(null);
285         },
286
287         // For internal use only.
288         // Behaves like an Array's method, not like a jQuery method.
289         push: core_push,
290         sort: [].sort,
291         splice: [].splice
292 };
293
294 // Give the init function the jQuery prototype for later instantiation
295 jQuery.fn.init.prototype = jQuery.fn;
296
297 jQuery.extend = jQuery.fn.extend = function() {
298         var options, name, src, copy, copyIsArray, clone,
299                 target = arguments[0] || {},
300                 i = 1,
301                 length = arguments.length,
302                 deep = false;
303
304         // Handle a deep copy situation
305         if ( typeof target === "boolean" ) {
306                 deep = target;
307                 target = arguments[1] || {};
308                 // skip the boolean and the target
309                 i = 2;
310         }
311
312         // Handle case when target is a string or something (possible in deep copy)
313         if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
314                 target = {};
315         }
316
317         // extend jQuery itself if only one argument is passed
318         if ( length === i ) {
319                 target = this;
320                 --i;
321         }
322
323         for ( ; i < length; i++ ) {
324                 // Only deal with non-null/undefined values
325                 if ( (options = arguments[ i ]) != null ) {
326                         // Extend the base object
327                         for ( name in options ) {
328                                 src = target[ name ];
329                                 copy = options[ name ];
330
331                                 // Prevent never-ending loop
332                                 if ( target === copy ) {
333                                         continue;
334                                 }
335
336                                 // Recurse if we're merging plain objects or arrays
337                                 if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
338                                         if ( copyIsArray ) {
339                                                 copyIsArray = false;
340                                                 clone = src && jQuery.isArray(src) ? src : [];
341
342                                         } else {
343                                                 clone = src && jQuery.isPlainObject(src) ? src : {};
344                                         }
345
346                                         // Never move original objects, clone them
347                                         target[ name ] = jQuery.extend( deep, clone, copy );
348
349                                 // Don't bring in undefined values
350                                 } else if ( copy !== undefined ) {
351                                         target[ name ] = copy;
352                                 }
353                         }
354                 }
355         }
356
357         // Return the modified object
358         return target;
359 };
360
361 jQuery.extend({
362         noConflict: function( deep ) {
363                 if ( window.$ === jQuery ) {
364                         window.$ = _$;
365                 }
366
367                 if ( deep && window.jQuery === jQuery ) {
368                         window.jQuery = _jQuery;
369                 }
370
371                 return jQuery;
372         },
373
374         // Is the DOM ready to be used? Set to true once it occurs.
375         isReady: false,
376
377         // A counter to track how many items to wait for before
378         // the ready event fires. See #6781
379         readyWait: 1,
380
381         // Hold (or release) the ready event
382         holdReady: function( hold ) {
383                 if ( hold ) {
384                         jQuery.readyWait++;
385                 } else {
386                         jQuery.ready( true );
387                 }
388         },
389
390         // Handle when the DOM is ready
391         ready: function( wait ) {
392
393                 // Abort if there are pending holds or we're already ready
394                 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
395                         return;
396                 }
397
398                 // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
399                 if ( !document.body ) {
400                         return setTimeout( jQuery.ready, 1 );
401                 }
402
403                 // Remember that the DOM is ready
404                 jQuery.isReady = true;
405
406                 // If a normal DOM Ready event fired, decrement, and wait if need be
407                 if ( wait !== true && --jQuery.readyWait > 0 ) {
408                         return;
409                 }
410
411                 // If there are functions bound, to execute
412                 readyList.resolveWith( document, [ jQuery ] );
413
414                 // Trigger any bound ready events
415                 if ( jQuery.fn.trigger ) {
416                         jQuery( document ).trigger("ready").off("ready");
417                 }
418         },
419
420         // See test/unit/core.js for details concerning isFunction.
421         // Since version 1.3, DOM methods and functions like alert
422         // aren't supported. They return false on IE (#2968).
423         isFunction: function( obj ) {
424                 return jQuery.type(obj) === "function";
425         },
426
427         isArray: Array.isArray || function( obj ) {
428                 return jQuery.type(obj) === "array";
429         },
430
431         isWindow: function( obj ) {
432                 return obj != null && obj == obj.window;
433         },
434
435         isNumeric: function( obj ) {
436                 return !isNaN( parseFloat(obj) ) && isFinite( obj );
437         },
438
439         type: function( obj ) {
440                 return obj == null ?
441                         String( obj ) :
442                         class2type[ core_toString.call(obj) ] || "object";
443         },
444
445         isPlainObject: function( obj ) {
446                 // Must be an Object.
447                 // Because of IE, we also have to check the presence of the constructor property.
448                 // Make sure that DOM nodes and window objects don't pass through, as well
449                 if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
450                         return false;
451                 }
452
453                 try {
454                         // Not own constructor property must be Object
455                         if ( obj.constructor &&
456                                 !core_hasOwn.call(obj, "constructor") &&
457                                 !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
458                                 return false;
459                         }
460                 } catch ( e ) {
461                         // IE8,9 Will throw exceptions on certain host objects #9897
462                         return false;
463                 }
464
465                 // Own properties are enumerated firstly, so to speed up,
466                 // if last one is own, then all properties are own.
467
468                 var key;
469                 for ( key in obj ) {}
470
471                 return key === undefined || core_hasOwn.call( obj, key );
472         },
473
474         isEmptyObject: function( obj ) {
475                 var name;
476                 for ( name in obj ) {
477                         return false;
478                 }
479                 return true;
480         },
481
482         error: function( msg ) {
483                 throw new Error( msg );
484         },
485
486         // data: string of html
487         // context (optional): If specified, the fragment will be created in this context, defaults to document
488         // scripts (optional): If true, will include scripts passed in the html string
489         parseHTML: function( data, context, scripts ) {
490                 var parsed;
491                 if ( !data || typeof data !== "string" ) {
492                         return null;
493                 }
494                 if ( typeof context === "boolean" ) {
495                         scripts = context;
496                         context = 0;
497                 }
498                 context = context || document;
499
500                 // Single tag
501                 if ( (parsed = rsingleTag.exec( data )) ) {
502                         return [ context.createElement( parsed[1] ) ];
503                 }
504
505                 parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
506                 return jQuery.merge( [],
507                         (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
508         },
509
510         parseJSON: function( data ) {
511                 if ( !data || typeof data !== "string") {
512                         return null;
513                 }
514
515                 // Make sure leading/trailing whitespace is removed (IE can't handle it)
516                 data = jQuery.trim( data );
517
518                 // Attempt to parse using the native JSON parser first
519                 if ( window.JSON && window.JSON.parse ) {
520                         return window.JSON.parse( data );
521                 }
522
523                 // Make sure the incoming data is actual JSON
524                 // Logic borrowed from http://json.org/json2.js
525                 if ( rvalidchars.test( data.replace( rvalidescape, "@" )
526                         .replace( rvalidtokens, "]" )
527                         .replace( rvalidbraces, "")) ) {
528
529                         return ( new Function( "return " + data ) )();
530
531                 }
532                 jQuery.error( "Invalid JSON: " + data );
533         },
534
535         // Cross-browser xml parsing
536         parseXML: function( data ) {
537                 var xml, tmp;
538                 if ( !data || typeof data !== "string" ) {
539                         return null;
540                 }
541                 try {
542                         if ( window.DOMParser ) { // Standard
543                                 tmp = new DOMParser();
544                                 xml = tmp.parseFromString( data , "text/xml" );
545                         } else { // IE
546                                 xml = new ActiveXObject( "Microsoft.XMLDOM" );
547                                 xml.async = "false";
548                                 xml.loadXML( data );
549                         }
550                 } catch( e ) {
551                         xml = undefined;
552                 }
553                 if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
554                         jQuery.error( "Invalid XML: " + data );
555                 }
556                 return xml;
557         },
558
559         noop: function() {},
560
561         // Evaluates a script in a global context
562         // Workarounds based on findings by Jim Driscoll
563         // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
564         globalEval: function( data ) {
565                 if ( data && core_rnotwhite.test( data ) ) {
566                         // We use execScript on Internet Explorer
567                         // We use an anonymous function so that context is window
568                         // rather than jQuery in Firefox
569                         ( window.execScript || function( data ) {
570                                 window[ "eval" ].call( window, data );
571                         } )( data );
572                 }
573         },
574
575         // Convert dashed to camelCase; used by the css and data modules
576         // Microsoft forgot to hump their vendor prefix (#9572)
577         camelCase: function( string ) {
578                 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
579         },
580
581         nodeName: function( elem, name ) {
582                 return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
583         },
584
585         // args is for internal usage only
586         each: function( obj, callback, args ) {
587                 var name,
588                         i = 0,
589                         length = obj.length,
590                         isObj = length === undefined || jQuery.isFunction( obj );
591
592                 if ( args ) {
593                         if ( isObj ) {
594                                 for ( name in obj ) {
595                                         if ( callback.apply( obj[ name ], args ) === false ) {
596                                                 break;
597                                         }
598                                 }
599                         } else {
600                                 for ( ; i < length; ) {
601                                         if ( callback.apply( obj[ i++ ], args ) === false ) {
602                                                 break;
603                                         }
604                                 }
605                         }
606
607                 // A special, fast, case for the most common use of each
608                 } else {
609                         if ( isObj ) {
610                                 for ( name in obj ) {
611                                         if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
612                                                 break;
613                                         }
614                                 }
615                         } else {
616                                 for ( ; i < length; ) {
617                                         if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
618                                                 break;
619                                         }
620                                 }
621                         }
622                 }
623
624                 return obj;
625         },
626
627         // Use native String.trim function wherever possible
628         trim: core_trim ?
629                 function( text ) {
630                         return text == null ?
631                                 "" :
632                                 core_trim.call( text );
633                 } :
634
635                 // Otherwise use our own trimming functionality
636                 function( text ) {
637                         return text == null ?
638                                 "" :
639                                 text.toString().replace( rtrim, "" );
640                 },
641
642         // results is for internal usage only
643         makeArray: function( arr, results ) {
644                 var type,
645                         ret = results || [];
646
647                 if ( arr != null ) {
648                         // The window, strings (and functions) also have 'length'
649                         // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
650                         type = jQuery.type( arr );
651
652                         if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
653                                 core_push.call( ret, arr );
654                         } else {
655                                 jQuery.merge( ret, arr );
656                         }
657                 }
658
659                 return ret;
660         },
661
662         inArray: function( elem, arr, i ) {
663                 var len;
664
665                 if ( arr ) {
666                         if ( core_indexOf ) {
667                                 return core_indexOf.call( arr, elem, i );
668                         }
669
670                         len = arr.length;
671                         i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
672
673                         for ( ; i < len; i++ ) {
674                                 // Skip accessing in sparse arrays
675                                 if ( i in arr && arr[ i ] === elem ) {
676                                         return i;
677                                 }
678                         }
679                 }
680
681                 return -1;
682         },
683
684         merge: function( first, second ) {
685                 var l = second.length,
686                         i = first.length,
687                         j = 0;
688
689                 if ( typeof l === "number" ) {
690                         for ( ; j < l; j++ ) {
691                                 first[ i++ ] = second[ j ];
692                         }
693
694                 } else {
695                         while ( second[j] !== undefined ) {
696                                 first[ i++ ] = second[ j++ ];
697                         }
698                 }
699
700                 first.length = i;
701
702                 return first;
703         },
704
705         grep: function( elems, callback, inv ) {
706                 var retVal,
707                         ret = [],
708                         i = 0,
709                         length = elems.length;
710                 inv = !!inv;
711
712                 // Go through the array, only saving the items
713                 // that pass the validator function
714                 for ( ; i < length; i++ ) {
715                         retVal = !!callback( elems[ i ], i );
716                         if ( inv !== retVal ) {
717                                 ret.push( elems[ i ] );
718                         }
719                 }
720
721                 return ret;
722         },
723
724         // arg is for internal usage only
725         map: function( elems, callback, arg ) {
726                 var value, key,
727                         ret = [],
728                         i = 0,
729                         length = elems.length,
730                         // jquery objects are treated as arrays
731                         isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
732
733                 // Go through the array, translating each of the items to their
734                 if ( isArray ) {
735                         for ( ; i < length; i++ ) {
736                                 value = callback( elems[ i ], i, arg );
737
738                                 if ( value != null ) {
739                                         ret[ ret.length ] = value;
740                                 }
741                         }
742
743                 // Go through every key on the object,
744                 } else {
745                         for ( key in elems ) {
746                                 value = callback( elems[ key ], key, arg );
747
748                                 if ( value != null ) {
749                                         ret[ ret.length ] = value;
750                                 }
751                         }
752                 }
753
754                 // Flatten any nested arrays
755                 return ret.concat.apply( [], ret );
756         },
757
758         // A global GUID counter for objects
759         guid: 1,
760
761         // Bind a function to a context, optionally partially applying any
762         // arguments.
763         proxy: function( fn, context ) {
764                 var tmp, args, proxy;
765
766                 if ( typeof context === "string" ) {
767                         tmp = fn[ context ];
768                         context = fn;
769                         fn = tmp;
770                 }
771
772                 // Quick check to determine if target is callable, in the spec
773                 // this throws a TypeError, but we will just return undefined.
774                 if ( !jQuery.isFunction( fn ) ) {
775                         return undefined;
776                 }
777
778                 // Simulated bind
779                 args = core_slice.call( arguments, 2 );
780                 proxy = function() {
781                         return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
782                 };
783
784                 // Set the guid of unique handler to the same of original handler, so it can be removed
785                 proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
786
787                 return proxy;
788         },
789
790         // Multifunctional method to get and set values of a collection
791         // The value/s can optionally be executed if it's a function
792         access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
793                 var exec,
794                         bulk = key == null,
795                         i = 0,
796                         length = elems.length;
797
798                 // Sets many values
799                 if ( key && typeof key === "object" ) {
800                         for ( i in key ) {
801                                 jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
802                         }
803                         chainable = 1;
804
805                 // Sets one value
806                 } else if ( value !== undefined ) {
807                         // Optionally, function values get executed if exec is true
808                         exec = pass === undefined && jQuery.isFunction( value );
809
810                         if ( bulk ) {
811                                 // Bulk operations only iterate when executing function values
812                                 if ( exec ) {
813                                         exec = fn;
814                                         fn = function( elem, key, value ) {
815                                                 return exec.call( jQuery( elem ), value );
816                                         };
817
818                                 // Otherwise they run against the entire set
819                                 } else {
820                                         fn.call( elems, value );
821                                         fn = null;
822                                 }
823                         }
824
825                         if ( fn ) {
826                                 for (; i < length; i++ ) {
827                                         fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
828                                 }
829                         }
830
831                         chainable = 1;
832                 }
833
834                 return chainable ?
835                         elems :
836
837                         // Gets
838                         bulk ?
839                                 fn.call( elems ) :
840                                 length ? fn( elems[0], key ) : emptyGet;
841         },
842
843         now: function() {
844                 return ( new Date() ).getTime();
845         }
846 });
847
848 jQuery.ready.promise = function( obj ) {
849         if ( !readyList ) {
850
851                 readyList = jQuery.Deferred();
852
853                 // Catch cases where $(document).ready() is called after the
854                 // browser event has already occurred.
855                 if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) {
856                         // Handle it asynchronously to allow scripts the opportunity to delay ready
857                         setTimeout( jQuery.ready, 1 );
858
859                 // Standards-based browsers support DOMContentLoaded
860                 } else if ( document.addEventListener ) {
861                         // Use the handy event callback
862                         document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
863
864                         // A fallback to window.onload, that will always work
865                         window.addEventListener( "load", jQuery.ready, false );
866
867                 // If IE event model is used
868                 } else {
869                         // Ensure firing before onload, maybe late but safe also for iframes
870                         document.attachEvent( "onreadystatechange", DOMContentLoaded );
871
872                         // A fallback to window.onload, that will always work
873                         window.attachEvent( "onload", jQuery.ready );
874
875                         // If IE and not a frame
876                         // continually check to see if the document is ready
877                         var top = false;
878
879                         try {
880                                 top = window.frameElement == null && document.documentElement;
881                         } catch(e) {}
882
883                         if ( top && top.doScroll ) {
884                                 (function doScrollCheck() {
885                                         if ( !jQuery.isReady ) {
886
887                                                 try {
888                                                         // Use the trick by Diego Perini
889                                                         // http://javascript.nwbox.com/IEContentLoaded/
890                                                         top.doScroll("left");
891                                                 } catch(e) {
892                                                         return setTimeout( doScrollCheck, 50 );
893                                                 }
894
895                                                 // and execute any waiting functions
896                                                 jQuery.ready();
897                                         }
898                                 })();
899                         }
900                 }
901         }
902         return readyList.promise( obj );
903 };
904
905 // Populate the class2type map
906 jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
907         class2type[ "[object " + name + "]" ] = name.toLowerCase();
908 });
909
910 // All jQuery objects should point back to these
911 rootjQuery = jQuery(document);
912 // String to Object options format cache
913 var optionsCache = {};
914
915 // Convert String-formatted options into Object-formatted ones and store in cache
916 function createOptions( options ) {
917         var object = optionsCache[ options ] = {};
918         jQuery.each( options.split( core_rspace ), function( _, flag ) {
919                 object[ flag ] = true;
920         });
921         return object;
922 }
923
924 /*
925  * Create a callback list using the following parameters:
926  *
927  *      options: an optional list of space-separated options that will change how
928  *                      the callback list behaves or a more traditional option object
929  *
930  * By default a callback list will act like an event callback list and can be
931  * "fired" multiple times.
932  *
933  * Possible options:
934  *
935  *      once:                   will ensure the callback list can only be fired once (like a Deferred)
936  *
937  *      memory:                 will keep track of previous values and will call any callback added
938  *                                      after the list has been fired right away with the latest "memorized"
939  *                                      values (like a Deferred)
940  *
941  *      unique:                 will ensure a callback can only be added once (no duplicate in the list)
942  *
943  *      stopOnFalse:    interrupt callings when a callback returns false
944  *
945  */
946 jQuery.Callbacks = function( options ) {
947
948         // Convert options from String-formatted to Object-formatted if needed
949         // (we check in cache first)
950         options = typeof options === "string" ?
951                 ( optionsCache[ options ] || createOptions( options ) ) :
952                 jQuery.extend( {}, options );
953
954         var // Last fire value (for non-forgettable lists)
955                 memory,
956                 // Flag to know if list was already fired
957                 fired,
958                 // Flag to know if list is currently firing
959                 firing,
960                 // First callback to fire (used internally by add and fireWith)
961                 firingStart,
962                 // End of the loop when firing
963                 firingLength,
964                 // Index of currently firing callback (modified by remove if needed)
965                 firingIndex,
966                 // Actual callback list
967                 list = [],
968                 // Stack of fire calls for repeatable lists
969                 stack = !options.once && [],
970                 // Fire callbacks
971                 fire = function( data ) {
972                         memory = options.memory && data;
973                         fired = true;
974                         firingIndex = firingStart || 0;
975                         firingStart = 0;
976                         firingLength = list.length;
977                         firing = true;
978                         for ( ; list && firingIndex < firingLength; firingIndex++ ) {
979                                 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
980                                         memory = false; // To prevent further calls using add
981                                         break;
982                                 }
983                         }
984                         firing = false;
985                         if ( list ) {
986                                 if ( stack ) {
987                                         if ( stack.length ) {
988                                                 fire( stack.shift() );
989                                         }
990                                 } else if ( memory ) {
991                                         list = [];
992                                 } else {
993                                         self.disable();
994                                 }
995                         }
996                 },
997                 // Actual Callbacks object
998                 self = {
999                         // Add a callback or a collection of callbacks to the list
1000                         add: function() {
1001                                 if ( list ) {
1002                                         // First, we save the current length
1003                                         var start = list.length;
1004                                         (function add( args ) {
1005                                                 jQuery.each( args, function( _, arg ) {
1006                                                         if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) {
1007                                                                 list.push( arg );
1008                                                         } else if ( arg && arg.length ) {
1009                                                                 // Inspect recursively
1010                                                                 add( arg );
1011                                                         }
1012                                                 });
1013                                         })( arguments );
1014                                         // Do we need to add the callbacks to the
1015                                         // current firing batch?
1016                                         if ( firing ) {
1017                                                 firingLength = list.length;
1018                                         // With memory, if we're not firing then
1019                                         // we should call right away
1020                                         } else if ( memory ) {
1021                                                 firingStart = start;
1022                                                 fire( memory );
1023                                         }
1024                                 }
1025                                 return this;
1026                         },
1027                         // Remove a callback from the list
1028                         remove: function() {
1029                                 if ( list ) {
1030                                         jQuery.each( arguments, function( _, arg ) {
1031                                                 var index;
1032                                                 while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
1033                                                         list.splice( index, 1 );
1034                                                         // Handle firing indexes
1035                                                         if ( firing ) {
1036                                                                 if ( index <= firingLength ) {
1037                                                                         firingLength--;
1038                                                                 }
1039                                                                 if ( index <= firingIndex ) {
1040                                                                         firingIndex--;
1041                                                                 }
1042                                                         }
1043                                                 }
1044                                         });
1045                                 }
1046                                 return this;
1047                         },
1048                         // Control if a given callback is in the list
1049                         has: function( fn ) {
1050                                 return jQuery.inArray( fn, list ) > -1;
1051                         },
1052                         // Remove all callbacks from the list
1053                         empty: function() {
1054                                 list = [];
1055                                 return this;
1056                         },
1057                         // Have the list do nothing anymore
1058                         disable: function() {
1059                                 list = stack = memory = undefined;
1060                                 return this;
1061                         },
1062                         // Is it disabled?
1063                         disabled: function() {
1064                                 return !list;
1065                         },
1066                         // Lock the list in its current state
1067                         lock: function() {
1068                                 stack = undefined;
1069                                 if ( !memory ) {
1070                                         self.disable();
1071                                 }
1072                                 return this;
1073                         },
1074                         // Is it locked?
1075                         locked: function() {
1076                                 return !stack;
1077                         },
1078                         // Call all callbacks with the given context and arguments
1079                         fireWith: function( context, args ) {
1080                                 args = args || [];
1081                                 args = [ context, args.slice ? args.slice() : args ];
1082                                 if ( list && ( !fired || stack ) ) {
1083                                         if ( firing ) {
1084                                                 stack.push( args );
1085                                         } else {
1086                                                 fire( args );
1087                                         }
1088                                 }
1089                                 return this;
1090                         },
1091                         // Call all the callbacks with the given arguments
1092                         fire: function() {
1093                                 self.fireWith( this, arguments );
1094                                 return this;
1095                         },
1096                         // To know if the callbacks have already been called at least once
1097                         fired: function() {
1098                                 return !!fired;
1099                         }
1100                 };
1101
1102         return self;
1103 };
1104 jQuery.extend({
1105
1106         Deferred: function( func ) {
1107                 var tuples = [
1108                                 // action, add listener, listener list, final state
1109                                 [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
1110                                 [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
1111                                 [ "notify", "progress", jQuery.Callbacks("memory") ]
1112                         ],
1113                         state = "pending",
1114                         promise = {
1115                                 state: function() {
1116                                         return state;
1117                                 },
1118                                 always: function() {
1119                                         deferred.done( arguments ).fail( arguments );
1120                                         return this;
1121                                 },
1122                                 then: function( /* fnDone, fnFail, fnProgress */ ) {
1123                                         var fns = arguments;
1124                                         return jQuery.Deferred(function( newDefer ) {
1125                                                 jQuery.each( tuples, function( i, tuple ) {
1126                                                         var action = tuple[ 0 ],
1127                                                                 fn = fns[ i ];
1128                                                         // deferred[ done | fail | progress ] for forwarding actions to newDefer
1129                                                         deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
1130                                                                 function() {
1131                                                                         var returned = fn.apply( this, arguments );
1132                                                                         if ( returned && jQuery.isFunction( returned.promise ) ) {
1133                                                                                 returned.promise()
1134                                                                                         .done( newDefer.resolve )
1135                                                                                         .fail( newDefer.reject )
1136                                                                                         .progress( newDefer.notify );
1137                                                                         } else {
1138                                                                                 newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
1139                                                                         }
1140                                                                 } :
1141                                                                 newDefer[ action ]
1142                                                         );
1143                                                 });
1144                                                 fns = null;
1145                                         }).promise();
1146                                 },
1147                                 // Get a promise for this deferred
1148                                 // If obj is provided, the promise aspect is added to the object
1149                                 promise: function( obj ) {
1150                                         return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise;
1151                                 }
1152                         },
1153                         deferred = {};
1154
1155                 // Keep pipe for back-compat
1156                 promise.pipe = promise.then;
1157
1158                 // Add list-specific methods
1159                 jQuery.each( tuples, function( i, tuple ) {
1160                         var list = tuple[ 2 ],
1161                                 stateString = tuple[ 3 ];
1162
1163                         // promise[ done | fail | progress ] = list.add
1164                         promise[ tuple[1] ] = list.add;
1165
1166                         // Handle state
1167                         if ( stateString ) {
1168                                 list.add(function() {
1169                                         // state = [ resolved | rejected ]
1170                                         state = stateString;
1171
1172                                 // [ reject_list | resolve_list ].disable; progress_list.lock
1173                                 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
1174                         }
1175
1176                         // deferred[ resolve | reject | notify ] = list.fire
1177                         deferred[ tuple[0] ] = list.fire;
1178                         deferred[ tuple[0] + "With" ] = list.fireWith;
1179                 });
1180
1181                 // Make the deferred a promise
1182                 promise.promise( deferred );
1183
1184                 // Call given func if any
1185                 if ( func ) {
1186                         func.call( deferred, deferred );
1187                 }
1188
1189                 // All done!
1190                 return deferred;
1191         },
1192
1193         // Deferred helper
1194         when: function( subordinate /* , ..., subordinateN */ ) {
1195                 var i = 0,
1196                         resolveValues = core_slice.call( arguments ),
1197                         length = resolveValues.length,
1198
1199                         // the count of uncompleted subordinates
1200                         remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
1201
1202                         // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
1203                         deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
1204
1205                         // Update function for both resolve and progress values
1206                         updateFunc = function( i, contexts, values ) {
1207                                 return function( value ) {
1208                                         contexts[ i ] = this;
1209                                         values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
1210                                         if( values === progressValues ) {
1211                                                 deferred.notifyWith( contexts, values );
1212                                         } else if ( !( --remaining ) ) {
1213                                                 deferred.resolveWith( contexts, values );
1214                                         }
1215                                 };
1216                         },
1217
1218                         progressValues, progressContexts, resolveContexts;
1219
1220                 // add listeners to Deferred subordinates; treat others as resolved
1221                 if ( length > 1 ) {
1222                         progressValues = new Array( length );
1223                         progressContexts = new Array( length );
1224                         resolveContexts = new Array( length );
1225                         for ( ; i < length; i++ ) {
1226                                 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
1227                                         resolveValues[ i ].promise()
1228                                                 .done( updateFunc( i, resolveContexts, resolveValues ) )
1229                                                 .fail( deferred.reject )
1230                                                 .progress( updateFunc( i, progressContexts, progressValues ) );
1231                                 } else {
1232                                         --remaining;
1233                                 }
1234                         }
1235                 }
1236
1237                 // if we're not waiting on anything, resolve the master
1238                 if ( !remaining ) {
1239                         deferred.resolveWith( resolveContexts, resolveValues );
1240                 }
1241
1242                 return deferred.promise();
1243         }
1244 });
1245 jQuery.support = (function() {
1246
1247         var support,
1248                 all,
1249                 a,
1250                 select,
1251                 opt,
1252                 input,
1253                 fragment,
1254                 eventName,
1255                 i,
1256                 isSupported,
1257                 clickFn,
1258                 div = document.createElement("div");
1259
1260         // Preliminary tests
1261         div.setAttribute( "className", "t" );
1262         div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
1263
1264         all = div.getElementsByTagName("*");
1265         a = div.getElementsByTagName("a")[ 0 ];
1266         a.style.cssText = "top:1px;float:left;opacity:.5";
1267
1268         // Can't get basic test support
1269         if ( !all || !all.length || !a ) {
1270                 return {};
1271         }
1272
1273         // First batch of supports tests
1274         select = document.createElement("select");
1275         opt = select.appendChild( document.createElement("option") );
1276         input = div.getElementsByTagName("input")[ 0 ];
1277
1278         support = {
1279                 // IE strips leading whitespace when .innerHTML is used
1280                 leadingWhitespace: ( div.firstChild.nodeType === 3 ),
1281
1282                 // Make sure that tbody elements aren't automatically inserted
1283                 // IE will insert them into empty tables
1284                 tbody: !div.getElementsByTagName("tbody").length,
1285
1286                 // Make sure that link elements get serialized correctly by innerHTML
1287                 // This requires a wrapper element in IE
1288                 htmlSerialize: !!div.getElementsByTagName("link").length,
1289
1290                 // Get the style information from getAttribute
1291                 // (IE uses .cssText instead)
1292                 style: /top/.test( a.getAttribute("style") ),
1293
1294                 // Make sure that URLs aren't manipulated
1295                 // (IE normalizes it by default)
1296                 hrefNormalized: ( a.getAttribute("href") === "/a" ),
1297
1298                 // Make sure that element opacity exists
1299                 // (IE uses filter instead)
1300                 // Use a regex to work around a WebKit issue. See #5145
1301                 opacity: /^0.5/.test( a.style.opacity ),
1302
1303                 // Verify style float existence
1304                 // (IE uses styleFloat instead of cssFloat)
1305                 cssFloat: !!a.style.cssFloat,
1306
1307                 // Make sure that if no value is specified for a checkbox
1308                 // that it defaults to "on".
1309                 // (WebKit defaults to "" instead)
1310                 checkOn: ( input.value === "on" ),
1311
1312                 // Make sure that a selected-by-default option has a working selected property.
1313                 // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
1314                 optSelected: opt.selected,
1315
1316                 // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1317                 getSetAttribute: div.className !== "t",
1318
1319                 // Tests for enctype support on a form(#6743)
1320                 enctype: !!document.createElement("form").enctype,
1321
1322                 // Makes sure cloning an html5 element does not cause problems
1323                 // Where outerHTML is undefined, this still works
1324                 html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
1325
1326                 // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
1327                 boxModel: ( document.compatMode === "CSS1Compat" ),
1328
1329                 // Will be defined later
1330                 submitBubbles: true,
1331                 changeBubbles: true,
1332                 focusinBubbles: false,
1333                 deleteExpando: true,
1334                 noCloneEvent: true,
1335                 inlineBlockNeedsLayout: false,
1336                 shrinkWrapBlocks: false,
1337                 reliableMarginRight: true,
1338                 boxSizingReliable: true,
1339                 pixelPosition: false
1340         };
1341
1342         // Make sure checked status is properly cloned
1343         input.checked = true;
1344         support.noCloneChecked = input.cloneNode( true ).checked;
1345
1346         // Make sure that the options inside disabled selects aren't marked as disabled
1347         // (WebKit marks them as disabled)
1348         select.disabled = true;
1349         support.optDisabled = !opt.disabled;
1350
1351         // Test to see if it's possible to delete an expando from an element
1352         // Fails in Internet Explorer
1353         try {
1354                 delete div.test;
1355         } catch( e ) {
1356                 support.deleteExpando = false;
1357         }
1358
1359         if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
1360                 div.attachEvent( "onclick", clickFn = function() {
1361                         // Cloning a node shouldn't copy over any
1362                         // bound event handlers (IE does this)
1363                         support.noCloneEvent = false;
1364                 });
1365                 div.cloneNode( true ).fireEvent("onclick");
1366                 div.detachEvent( "onclick", clickFn );
1367         }
1368
1369         // Check if a radio maintains its value
1370         // after being appended to the DOM
1371         input = document.createElement("input");
1372         input.value = "t";
1373         input.setAttribute( "type", "radio" );
1374         support.radioValue = input.value === "t";
1375
1376         input.setAttribute( "checked", "checked" );
1377
1378         // #11217 - WebKit loses check when the name is after the checked attribute
1379         input.setAttribute( "name", "t" );
1380
1381         div.appendChild( input );
1382         fragment = document.createDocumentFragment();
1383         fragment.appendChild( div.lastChild );
1384
1385         // WebKit doesn't clone checked state correctly in fragments
1386         support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1387
1388         // Check if a disconnected checkbox will retain its checked
1389         // value of true after appended to the DOM (IE6/7)
1390         support.appendChecked = input.checked;
1391
1392         fragment.removeChild( input );
1393         fragment.appendChild( div );
1394
1395         // Technique from Juriy Zaytsev
1396         // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
1397         // We only care about the case where non-standard event systems
1398         // are used, namely in IE. Short-circuiting here helps us to
1399         // avoid an eval call (in setAttribute) which can cause CSP
1400         // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1401         if ( div.attachEvent ) {
1402                 for ( i in {
1403                         submit: true,
1404                         change: true,
1405                         focusin: true
1406                 }) {
1407                         eventName = "on" + i;
1408                         isSupported = ( eventName in div );
1409                         if ( !isSupported ) {
1410                                 div.setAttribute( eventName, "return;" );
1411                                 isSupported = ( typeof div[ eventName ] === "function" );
1412                         }
1413                         support[ i + "Bubbles" ] = isSupported;
1414                 }
1415         }
1416
1417         // Run tests that need a body at doc ready
1418         jQuery(function() {
1419                 var container, div, tds, marginDiv,
1420                         divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
1421                         body = document.getElementsByTagName("body")[0];
1422
1423                 if ( !body ) {
1424                         // Return for frameset docs that don't have a body
1425                         return;
1426                 }
1427
1428                 container = document.createElement("div");
1429                 container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
1430                 body.insertBefore( container, body.firstChild );
1431
1432                 // Construct the test element
1433                 div = document.createElement("div");
1434                 container.appendChild( div );
1435
1436                 // Check if table cells still have offsetWidth/Height when they are set
1437                 // to display:none and there are still other visible table cells in a
1438                 // table row; if so, offsetWidth/Height are not reliable for use when
1439                 // determining if an element has been hidden directly using
1440                 // display:none (it is still safe to use offsets if a parent element is
1441                 // hidden; don safety goggles and see bug #4512 for more information).
1442                 // (only IE 8 fails this test)
1443                 div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
1444                 tds = div.getElementsByTagName("td");
1445                 tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
1446                 isSupported = ( tds[ 0 ].offsetHeight === 0 );
1447
1448                 tds[ 0 ].style.display = "";
1449                 tds[ 1 ].style.display = "none";
1450
1451                 // Check if empty table cells still have offsetWidth/Height
1452                 // (IE <= 8 fail this test)
1453                 support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1454
1455                 // Check box-sizing and margin behavior
1456                 div.innerHTML = "";
1457                 div.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%;";
1458                 support.boxSizing = ( div.offsetWidth === 4 );
1459                 support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
1460
1461                 // NOTE: To any future maintainer, window.getComputedStyle was used here
1462                 // instead of getComputedStyle because it gave a better gzip size.
1463                 // The difference between window.getComputedStyle and getComputedStyle is
1464                 // 7 bytes
1465                 if ( window.getComputedStyle ) {
1466                         support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
1467                         support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
1468
1469                         // Check if div with explicit width and no margin-right incorrectly
1470                         // gets computed margin-right based on width of container. For more
1471                         // info see bug #3333
1472                         // Fails in WebKit before Feb 2011 nightlies
1473                         // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1474                         marginDiv = document.createElement("div");
1475                         marginDiv.style.cssText = div.style.cssText = divReset;
1476                         marginDiv.style.marginRight = marginDiv.style.width = "0";
1477                         div.style.width = "1px";
1478                         div.appendChild( marginDiv );
1479                         support.reliableMarginRight =
1480                                 !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
1481                 }
1482
1483                 if ( typeof div.style.zoom !== "undefined" ) {
1484                         // Check if natively block-level elements act like inline-block
1485                         // elements when setting their display to 'inline' and giving
1486                         // them layout
1487                         // (IE < 8 does this)
1488                         div.innerHTML = "";
1489                         div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
1490                         support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
1491
1492                         // Check if elements with layout shrink-wrap their children
1493                         // (IE 6 does this)
1494                         div.style.display = "block";
1495                         div.style.overflow = "visible";
1496                         div.innerHTML = "<div></div>";
1497                         div.firstChild.style.width = "5px";
1498                         support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
1499
1500                         container.style.zoom = 1;
1501                 }
1502
1503                 // Null elements to avoid leaks in IE
1504                 body.removeChild( container );
1505                 container = div = tds = marginDiv = null;
1506         });
1507
1508         // Null elements to avoid leaks in IE
1509         fragment.removeChild( div );
1510         all = a = select = opt = input = fragment = div = null;
1511
1512         return support;
1513 })();
1514 var rbrace = /^(?:\{.*\}|\[.*\])$/,
1515         rmultiDash = /([A-Z])/g;
1516
1517 jQuery.extend({
1518         cache: {},
1519
1520         deletedIds: [],
1521
1522         // Please use with caution
1523         uuid: 0,
1524
1525         // Unique for each copy of jQuery on the page
1526         // Non-digits removed to match rinlinejQuery
1527         expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
1528
1529         // The following elements throw uncatchable exceptions if you
1530         // attempt to add expando properties to them.
1531         noData: {
1532                 "embed": true,
1533                 // Ban all objects except for Flash (which handle expandos)
1534                 "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1535                 "applet": true
1536         },
1537
1538         hasData: function( elem ) {
1539                 elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1540                 return !!elem && !isEmptyDataObject( elem );
1541         },
1542
1543         data: function( elem, name, data, pvt /* Internal Use Only */ ) {
1544                 if ( !jQuery.acceptData( elem ) ) {
1545                         return;
1546                 }
1547
1548                 var thisCache, ret,
1549                         internalKey = jQuery.expando,
1550                         getByName = typeof name === "string",
1551
1552                         // We have to handle DOM nodes and JS objects differently because IE6-7
1553                         // can't GC object references properly across the DOM-JS boundary
1554                         isNode = elem.nodeType,
1555
1556                         // Only DOM nodes need the global jQuery cache; JS object data is
1557                         // attached directly to the object so GC can occur automatically
1558                         cache = isNode ? jQuery.cache : elem,
1559
1560                         // Only defining an ID for JS objects if its cache already exists allows
1561                         // the code to shortcut on the same path as a DOM node with no cache
1562                         id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
1563
1564                 // Avoid doing any more work than we need to when trying to get data on an
1565                 // object that has no data at all
1566                 if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
1567                         return;
1568                 }
1569
1570                 if ( !id ) {
1571                         // Only DOM nodes need a new unique ID for each element since their data
1572                         // ends up in the global cache
1573                         if ( isNode ) {
1574                                 elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid;
1575                         } else {
1576                                 id = internalKey;
1577                         }
1578                 }
1579
1580                 if ( !cache[ id ] ) {
1581                         cache[ id ] = {};
1582
1583                         // Avoids exposing jQuery metadata on plain JS objects when the object
1584                         // is serialized using JSON.stringify
1585                         if ( !isNode ) {
1586                                 cache[ id ].toJSON = jQuery.noop;
1587                         }
1588                 }
1589
1590                 // An object can be passed to jQuery.data instead of a key/value pair; this gets
1591                 // shallow copied over onto the existing cache
1592                 if ( typeof name === "object" || typeof name === "function" ) {
1593                         if ( pvt ) {
1594                                 cache[ id ] = jQuery.extend( cache[ id ], name );
1595                         } else {
1596                                 cache[ id ].data = jQuery.extend( cache[ id ].data, name );
1597                         }
1598                 }
1599
1600                 thisCache = cache[ id ];
1601
1602                 // jQuery data() is stored in a separate object inside the object's internal data
1603                 // cache in order to avoid key collisions between internal data and user-defined
1604                 // data.
1605                 if ( !pvt ) {
1606                         if ( !thisCache.data ) {
1607                                 thisCache.data = {};
1608                         }
1609
1610                         thisCache = thisCache.data;
1611                 }
1612
1613                 if ( data !== undefined ) {
1614                         thisCache[ jQuery.camelCase( name ) ] = data;
1615                 }
1616
1617                 // Check for both converted-to-camel and non-converted data property names
1618                 // If a data property was specified
1619                 if ( getByName ) {
1620
1621                         // First Try to find as-is property data
1622                         ret = thisCache[ name ];
1623
1624                         // Test for null|undefined property data
1625                         if ( ret == null ) {
1626
1627                                 // Try to find the camelCased property
1628                                 ret = thisCache[ jQuery.camelCase( name ) ];
1629                         }
1630                 } else {
1631                         ret = thisCache;
1632                 }
1633
1634                 return ret;
1635         },
1636
1637         removeData: function( elem, name, pvt /* Internal Use Only */ ) {
1638                 if ( !jQuery.acceptData( elem ) ) {
1639                         return;
1640                 }
1641
1642                 var thisCache, i, l,
1643
1644                         isNode = elem.nodeType,
1645
1646                         // See jQuery.data for more information
1647                         cache = isNode ? jQuery.cache : elem,
1648                         id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
1649
1650                 // If there is already no cache entry for this object, there is no
1651                 // purpose in continuing
1652                 if ( !cache[ id ] ) {
1653                         return;
1654                 }
1655
1656                 if ( name ) {
1657
1658                         thisCache = pvt ? cache[ id ] : cache[ id ].data;
1659
1660                         if ( thisCache ) {
1661
1662                                 // Support array or space separated string names for data keys
1663                                 if ( !jQuery.isArray( name ) ) {
1664
1665                                         // try the string as a key before any manipulation
1666                                         if ( name in thisCache ) {
1667                                                 name = [ name ];
1668                                         } else {
1669
1670                                                 // split the camel cased version by spaces unless a key with the spaces exists
1671                                                 name = jQuery.camelCase( name );
1672                                                 if ( name in thisCache ) {
1673                                                         name = [ name ];
1674                                                 } else {
1675                                                         name = name.split(" ");
1676                                                 }
1677                                         }
1678                                 }
1679
1680                                 for ( i = 0, l = name.length; i < l; i++ ) {
1681                                         delete thisCache[ name[i] ];
1682                                 }
1683
1684                                 // If there is no data left in the cache, we want to continue
1685                                 // and let the cache object itself get destroyed
1686                                 if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
1687                                         return;
1688                                 }
1689                         }
1690                 }
1691
1692                 // See jQuery.data for more information
1693                 if ( !pvt ) {
1694                         delete cache[ id ].data;
1695
1696                         // Don't destroy the parent cache unless the internal data object
1697                         // had been the only thing left in it
1698                         if ( !isEmptyDataObject( cache[ id ] ) ) {
1699                                 return;
1700                         }
1701                 }
1702
1703                 // Destroy the cache
1704                 if ( isNode ) {
1705                         jQuery.cleanData( [ elem ], true );
1706
1707                 // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
1708                 } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
1709                         delete cache[ id ];
1710
1711                 // When all else fails, null
1712                 } else {
1713                         cache[ id ] = null;
1714                 }
1715         },
1716
1717         // For internal use only.
1718         _data: function( elem, name, data ) {
1719                 return jQuery.data( elem, name, data, true );
1720         },
1721
1722         // A method for determining if a DOM node can handle the data expando
1723         acceptData: function( elem ) {
1724                 var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
1725
1726                 // nodes accept data unless otherwise specified; rejection can be conditional
1727                 return !noData || noData !== true && elem.getAttribute("classid") === noData;
1728         }
1729 });
1730
1731 jQuery.fn.extend({
1732         data: function( key, value ) {
1733                 var parts, part, attr, name, l,
1734                         elem = this[0],
1735                         i = 0,
1736                         data = null;
1737
1738                 // Gets all values
1739                 if ( key === undefined ) {
1740                         if ( this.length ) {
1741                                 data = jQuery.data( elem );
1742
1743                                 if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
1744                                         attr = elem.attributes;
1745                                         for ( l = attr.length; i < l; i++ ) {
1746                                                 name = attr[i].name;
1747
1748                                                 if ( name.indexOf( "data-" ) === 0 ) {
1749                                                         name = jQuery.camelCase( name.substring(5) );
1750
1751                                                         dataAttr( elem, name, data[ name ] );
1752                                                 }
1753                                         }
1754                                         jQuery._data( elem, "parsedAttrs", true );
1755                                 }
1756                         }
1757
1758                         return data;
1759                 }
1760
1761                 // Sets multiple values
1762                 if ( typeof key === "object" ) {
1763                         return this.each(function() {
1764                                 jQuery.data( this, key );
1765                         });
1766                 }
1767
1768                 parts = key.split( ".", 2 );
1769                 parts[1] = parts[1] ? "." + parts[1] : "";
1770                 part = parts[1] + "!";
1771
1772                 return jQuery.access( this, function( value ) {
1773
1774                         if ( value === undefined ) {
1775                                 data = this.triggerHandler( "getData" + part, [ parts[0] ] );
1776
1777                                 // Try to fetch any internally stored data first
1778                                 if ( data === undefined && elem ) {
1779                                         data = jQuery.data( elem, key );
1780                                         data = dataAttr( elem, key, data );
1781                                 }
1782
1783                                 return data === undefined && parts[1] ?
1784                                         this.data( parts[0] ) :
1785                                         data;
1786                         }
1787
1788                         parts[1] = value;
1789                         this.each(function() {
1790                                 var self = jQuery( this );
1791
1792                                 self.triggerHandler( "setData" + part, parts );
1793                                 jQuery.data( this, key, value );
1794                                 self.triggerHandler( "changeData" + part, parts );
1795                         });
1796                 }, null, value, arguments.length > 1, null, false );
1797         },
1798
1799         removeData: function( key ) {
1800                 return this.each(function() {
1801                         jQuery.removeData( this, key );
1802                 });
1803         }
1804 });
1805
1806 function dataAttr( elem, key, data ) {
1807         // If nothing was found internally, try to fetch any
1808         // data from the HTML5 data-* attribute
1809         if ( data === undefined && elem.nodeType === 1 ) {
1810
1811                 var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
1812
1813                 data = elem.getAttribute( name );
1814
1815                 if ( typeof data === "string" ) {
1816                         try {
1817                                 data = data === "true" ? true :
1818                                 data === "false" ? false :
1819                                 data === "null" ? null :
1820                                 // Only convert to a number if it doesn't change the string
1821                                 +data + "" === data ? +data :
1822                                 rbrace.test( data ) ? jQuery.parseJSON( data ) :
1823                                         data;
1824                         } catch( e ) {}
1825
1826                         // Make sure we set the data so it isn't changed later
1827                         jQuery.data( elem, key, data );
1828
1829                 } else {
1830                         data = undefined;
1831                 }
1832         }
1833
1834         return data;
1835 }
1836
1837 // checks a cache object for emptiness
1838 function isEmptyDataObject( obj ) {
1839         var name;
1840         for ( name in obj ) {
1841
1842                 // if the public data object is empty, the private is still empty
1843                 if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
1844                         continue;
1845                 }
1846                 if ( name !== "toJSON" ) {
1847                         return false;
1848                 }
1849         }
1850
1851         return true;
1852 }
1853 jQuery.extend({
1854         queue: function( elem, type, data ) {
1855                 var queue;
1856
1857                 if ( elem ) {
1858                         type = ( type || "fx" ) + "queue";
1859                         queue = jQuery._data( elem, type );
1860
1861                         // Speed up dequeue by getting out quickly if this is just a lookup
1862                         if ( data ) {
1863                                 if ( !queue || jQuery.isArray(data) ) {
1864                                         queue = jQuery._data( elem, type, jQuery.makeArray(data) );
1865                                 } else {
1866                                         queue.push( data );
1867                                 }
1868                         }
1869                         return queue || [];
1870                 }
1871         },
1872
1873         dequeue: function( elem, type ) {
1874                 type = type || "fx";
1875
1876                 var queue = jQuery.queue( elem, type ),
1877                         fn = queue.shift(),
1878                         hooks = jQuery._queueHooks( elem, type ),
1879                         next = function() {
1880                                 jQuery.dequeue( elem, type );
1881                         };
1882
1883                 // If the fx queue is dequeued, always remove the progress sentinel
1884                 if ( fn === "inprogress" ) {
1885                         fn = queue.shift();
1886                 }
1887
1888                 if ( fn ) {
1889
1890                         // Add a progress sentinel to prevent the fx queue from being
1891                         // automatically dequeued
1892                         if ( type === "fx" ) {
1893                                 queue.unshift( "inprogress" );
1894                         }
1895
1896                         // clear up the last queue stop function
1897                         delete hooks.stop;
1898                         fn.call( elem, next, hooks );
1899                 }
1900                 if ( !queue.length && hooks ) {
1901                         hooks.empty.fire();
1902                 }
1903         },
1904
1905         // not intended for public consumption - generates a queueHooks object, or returns the current one
1906         _queueHooks: function( elem, type ) {
1907                 var key = type + "queueHooks";
1908                 return jQuery._data( elem, key ) || jQuery._data( elem, key, {
1909                         empty: jQuery.Callbacks("once memory").add(function() {
1910                                 jQuery.removeData( elem, type + "queue", true );
1911                                 jQuery.removeData( elem, key, true );
1912                         })
1913                 });
1914         }
1915 });
1916
1917 jQuery.fn.extend({
1918         queue: function( type, data ) {
1919                 var setter = 2;
1920
1921                 if ( typeof type !== "string" ) {
1922                         data = type;
1923                         type = "fx";
1924                         setter--;
1925                 }
1926
1927                 if ( arguments.length < setter ) {
1928                         return jQuery.queue( this[0], type );
1929                 }
1930
1931                 return data === undefined ?
1932                         this :
1933                         this.each(function() {
1934                                 var queue = jQuery.queue( this, type, data );
1935
1936                                 // ensure a hooks for this queue
1937                                 jQuery._queueHooks( this, type );
1938
1939                                 if ( type === "fx" && queue[0] !== "inprogress" ) {
1940                                         jQuery.dequeue( this, type );
1941                                 }
1942                         });
1943         },
1944         dequeue: function( type ) {
1945                 return this.each(function() {
1946                         jQuery.dequeue( this, type );
1947                 });
1948         },
1949         // Based off of the plugin by Clint Helfers, with permission.
1950         // http://blindsignals.com/index.php/2009/07/jquery-delay/
1951         delay: function( time, type ) {
1952                 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
1953                 type = type || "fx";
1954
1955                 return this.queue( type, function( next, hooks ) {
1956                         var timeout = setTimeout( next, time );
1957                         hooks.stop = function() {
1958                                 clearTimeout( timeout );
1959                         };
1960                 });
1961         },
1962         clearQueue: function( type ) {
1963                 return this.queue( type || "fx", [] );
1964         },
1965         // Get a promise resolved when queues of a certain type
1966         // are emptied (fx is the type by default)
1967         promise: function( type, obj ) {
1968                 var tmp,
1969                         count = 1,
1970                         defer = jQuery.Deferred(),
1971                         elements = this,
1972                         i = this.length,
1973                         resolve = function() {
1974                                 if ( !( --count ) ) {
1975                                         defer.resolveWith( elements, [ elements ] );
1976                                 }
1977                         };
1978
1979                 if ( typeof type !== "string" ) {
1980                         obj = type;
1981                         type = undefined;
1982                 }
1983                 type = type || "fx";
1984
1985                 while( i-- ) {
1986                         if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) {
1987                                 count++;
1988                                 tmp.empty.add( resolve );
1989                         }
1990                 }
1991                 resolve();
1992                 return defer.promise( obj );
1993         }
1994 });
1995 var nodeHook, boolHook, fixSpecified,
1996         rclass = /[\t\r\n]/g,
1997         rreturn = /\r/g,
1998         rtype = /^(?:button|input)$/i,
1999         rfocusable = /^(?:button|input|object|select|textarea)$/i,
2000         rclickable = /^a(?:rea|)$/i,
2001         rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
2002         getSetAttribute = jQuery.support.getSetAttribute;
2003
2004 jQuery.fn.extend({
2005         attr: function( name, value ) {
2006                 return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
2007         },
2008
2009         removeAttr: function( name ) {
2010                 return this.each(function() {
2011                         jQuery.removeAttr( this, name );
2012                 });
2013         },
2014
2015         prop: function( name, value ) {
2016                 return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
2017         },
2018
2019         removeProp: function( name ) {
2020                 name = jQuery.propFix[ name ] || name;
2021                 return this.each(function() {
2022                         // try/catch handles cases where IE balks (such as removing a property on window)
2023                         try {
2024                                 this[ name ] = undefined;
2025                                 delete this[ name ];
2026                         } catch( e ) {}
2027                 });
2028         },
2029
2030         addClass: function( value ) {
2031                 var classNames, i, l, elem,
2032                         setClass, c, cl;
2033
2034                 if ( jQuery.isFunction( value ) ) {
2035                         return this.each(function( j ) {
2036                                 jQuery( this ).addClass( value.call(this, j, this.className) );
2037                         });
2038                 }
2039
2040                 if ( value && typeof value === "string" ) {
2041                         classNames = value.split( core_rspace );
2042
2043                         for ( i = 0, l = this.length; i < l; i++ ) {
2044                                 elem = this[ i ];
2045
2046                                 if ( elem.nodeType === 1 ) {
2047                                         if ( !elem.className && classNames.length === 1 ) {
2048                                                 elem.className = value;
2049
2050                                         } else {
2051                                                 setClass = " " + elem.className + " ";
2052
2053                                                 for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2054                                                         if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
2055                                                                 setClass += classNames[ c ] + " ";
2056                                                         }
2057                                                 }
2058                                                 elem.className = jQuery.trim( setClass );
2059                                         }
2060                                 }
2061                         }
2062                 }
2063
2064                 return this;
2065         },
2066
2067         removeClass: function( value ) {
2068                 var removes, className, elem, c, cl, i, l;
2069
2070                 if ( jQuery.isFunction( value ) ) {
2071                         return this.each(function( j ) {
2072                                 jQuery( this ).removeClass( value.call(this, j, this.className) );
2073                         });
2074                 }
2075                 if ( (value && typeof value === "string") || value === undefined ) {
2076                         removes = ( value || "" ).split( core_rspace );
2077
2078                         for ( i = 0, l = this.length; i < l; i++ ) {
2079                                 elem = this[ i ];
2080                                 if ( elem.nodeType === 1 && elem.className ) {
2081
2082                                         className = (" " + elem.className + " ").replace( rclass, " " );
2083
2084                                         // loop over each item in the removal list
2085                                         for ( c = 0, cl = removes.length; c < cl; c++ ) {
2086                                                 // Remove until there is nothing to remove,
2087                                                 while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) {
2088                                                         className = className.replace( " " + removes[ c ] + " " , " " );
2089                                                 }
2090                                         }
2091                                         elem.className = value ? jQuery.trim( className ) : "";
2092                                 }
2093                         }
2094                 }
2095
2096                 return this;
2097         },
2098
2099         toggleClass: function( value, stateVal ) {
2100                 var type = typeof value,
2101                         isBool = typeof stateVal === "boolean";
2102
2103                 if ( jQuery.isFunction( value ) ) {
2104                         return this.each(function( i ) {
2105                                 jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
2106                         });
2107                 }
2108
2109                 return this.each(function() {
2110                         if ( type === "string" ) {
2111                                 // toggle individual class names
2112                                 var className,
2113                                         i = 0,
2114                                         self = jQuery( this ),
2115                                         state = stateVal,
2116                                         classNames = value.split( core_rspace );
2117
2118                                 while ( (className = classNames[ i++ ]) ) {
2119                                         // check each className given, space separated list
2120                                         state = isBool ? state : !self.hasClass( className );
2121                                         self[ state ? "addClass" : "removeClass" ]( className );
2122                                 }
2123
2124                         } else if ( type === "undefined" || type === "boolean" ) {
2125                                 if ( this.className ) {
2126                                         // store className if set
2127                                         jQuery._data( this, "__className__", this.className );
2128                                 }
2129
2130                                 // toggle whole className
2131                                 this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
2132                         }
2133                 });
2134         },
2135
2136         hasClass: function( selector ) {
2137                 var className = " " + selector + " ",
2138                         i = 0,
2139                         l = this.length;
2140                 for ( ; i < l; i++ ) {
2141                         if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
2142                                 return true;
2143                         }
2144                 }
2145
2146                 return false;
2147         },
2148
2149         val: function( value ) {
2150                 var hooks, ret, isFunction,
2151                         elem = this[0];
2152
2153                 if ( !arguments.length ) {
2154                         if ( elem ) {
2155                                 hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
2156
2157                                 if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
2158                                         return ret;
2159                                 }
2160
2161                                 ret = elem.value;
2162
2163                                 return typeof ret === "string" ?
2164                                         // handle most common string cases
2165                                         ret.replace(rreturn, "") :
2166                                         // handle cases where value is null/undef or number
2167                                         ret == null ? "" : ret;
2168                         }
2169
2170                         return;
2171                 }
2172
2173                 isFunction = jQuery.isFunction( value );
2174
2175                 return this.each(function( i ) {
2176                         var val,
2177                                 self = jQuery(this);
2178
2179                         if ( this.nodeType !== 1 ) {
2180                                 return;
2181                         }
2182
2183                         if ( isFunction ) {
2184                                 val = value.call( this, i, self.val() );
2185                         } else {
2186                                 val = value;
2187                         }
2188
2189                         // Treat null/undefined as ""; convert numbers to string
2190                         if ( val == null ) {
2191                                 val = "";
2192                         } else if ( typeof val === "number" ) {
2193                                 val += "";
2194                         } else if ( jQuery.isArray( val ) ) {
2195                                 val = jQuery.map(val, function ( value ) {
2196                                         return value == null ? "" : value + "";
2197                                 });
2198                         }
2199
2200                         hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
2201
2202                         // If set returns undefined, fall back to normal setting
2203                         if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
2204                                 this.value = val;
2205                         }
2206                 });
2207         }
2208 });
2209
2210 jQuery.extend({
2211         valHooks: {
2212                 option: {
2213                         get: function( elem ) {
2214                                 // attributes.value is undefined in Blackberry 4.7 but
2215                                 // uses .value. See #6932
2216                                 var val = elem.attributes.value;
2217                                 return !val || val.specified ? elem.value : elem.text;
2218                         }
2219                 },
2220                 select: {
2221                         get: function( elem ) {
2222                                 var value, i, max, option,
2223                                         index = elem.selectedIndex,
2224                                         values = [],
2225                                         options = elem.options,
2226                                         one = elem.type === "select-one";
2227
2228                                 // Nothing was selected
2229                                 if ( index < 0 ) {
2230                                         return null;
2231                                 }
2232
2233                                 // Loop through all the selected options
2234                                 i = one ? index : 0;
2235                                 max = one ? index + 1 : options.length;
2236                                 for ( ; i < max; i++ ) {
2237                                         option = options[ i ];
2238
2239                                         // Don't return options that are disabled or in a disabled optgroup
2240                                         if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
2241                                                         (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
2242
2243                                                 // Get the specific value for the option
2244                                                 value = jQuery( option ).val();
2245
2246                                                 // We don't need an array for one selects
2247                                                 if ( one ) {
2248                                                         return value;
2249                                                 }
2250
2251                                                 // Multi-Selects return an array
2252                                                 values.push( value );
2253                                         }
2254                                 }
2255
2256                                 // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
2257                                 if ( one && !values.length && options.length ) {
2258                                         return jQuery( options[ index ] ).val();
2259                                 }
2260
2261                                 return values;
2262                         },
2263
2264                         set: function( elem, value ) {
2265                                 var values = jQuery.makeArray( value );
2266
2267                                 jQuery(elem).find("option").each(function() {
2268                                         this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
2269                                 });
2270
2271                                 if ( !values.length ) {
2272                                         elem.selectedIndex = -1;
2273                                 }
2274                                 return values;
2275                         }
2276                 }
2277         },
2278
2279         // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
2280         attrFn: {},
2281
2282         attr: function( elem, name, value, pass ) {
2283                 var ret, hooks, notxml,
2284                         nType = elem.nodeType;
2285
2286                 // don't get/set attributes on text, comment and attribute nodes
2287                 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2288                         return;
2289                 }
2290
2291                 if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
2292                         return jQuery( elem )[ name ]( value );
2293                 }
2294
2295                 // Fallback to prop when attributes are not supported
2296                 if ( typeof elem.getAttribute === "undefined" ) {
2297                         return jQuery.prop( elem, name, value );
2298                 }
2299
2300                 notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2301
2302                 // All attributes are lowercase
2303                 // Grab necessary hook if one is defined
2304                 if ( notxml ) {
2305                         name = name.toLowerCase();
2306                         hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
2307                 }
2308
2309                 if ( value !== undefined ) {
2310
2311                         if ( value === null ) {
2312                                 jQuery.removeAttr( elem, name );
2313                                 return;
2314
2315                         } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
2316                                 return ret;
2317
2318                         } else {
2319                                 elem.setAttribute( name, "" + value );
2320                                 return value;
2321                         }
2322
2323                 } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
2324                         return ret;
2325
2326                 } else {
2327
2328                         ret = elem.getAttribute( name );
2329
2330                         // Non-existent attributes return null, we normalize to undefined
2331                         return ret === null ?
2332                                 undefined :
2333                                 ret;
2334                 }
2335         },
2336
2337         removeAttr: function( elem, value ) {
2338                 var propName, attrNames, name, isBool,
2339                         i = 0;
2340
2341                 if ( value && elem.nodeType === 1 ) {
2342
2343                         attrNames = value.split( core_rspace );
2344
2345                         for ( ; i < attrNames.length; i++ ) {
2346                                 name = attrNames[ i ];
2347
2348                                 if ( name ) {
2349                                         propName = jQuery.propFix[ name ] || name;
2350                                         isBool = rboolean.test( name );
2351
2352                                         // See #9699 for explanation of this approach (setting first, then removal)
2353                                         // Do not do this for boolean attributes (see #10870)
2354                                         if ( !isBool ) {
2355                                                 jQuery.attr( elem, name, "" );
2356                                         }
2357                                         elem.removeAttribute( getSetAttribute ? name : propName );
2358
2359                                         // Set corresponding property to false for boolean attributes
2360                                         if ( isBool && propName in elem ) {
2361                                                 elem[ propName ] = false;
2362                                         }
2363                                 }
2364                         }
2365                 }
2366         },
2367
2368         attrHooks: {
2369                 type: {
2370                         set: function( elem, value ) {
2371                                 // We can't allow the type property to be changed (since it causes problems in IE)
2372                                 if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
2373                                         jQuery.error( "type property can't be changed" );
2374                                 } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
2375                                         // Setting the type on a radio button after the value resets the value in IE6-9
2376                                         // Reset value to it's default in case type is set after value
2377                                         // This is for element creation
2378                                         var val = elem.value;
2379                                         elem.setAttribute( "type", value );
2380                                         if ( val ) {
2381                                                 elem.value = val;
2382                                         }
2383                                         return value;
2384                                 }
2385                         }
2386                 },
2387                 // Use the value property for back compat
2388                 // Use the nodeHook for button elements in IE6/7 (#1954)
2389                 value: {
2390                         get: function( elem, name ) {
2391                                 if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2392                                         return nodeHook.get( elem, name );
2393                                 }
2394                                 return name in elem ?
2395                                         elem.value :
2396                                         null;
2397                         },
2398                         set: function( elem, value, name ) {
2399                                 if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2400                                         return nodeHook.set( elem, value, name );
2401                                 }
2402                                 // Does not return so that setAttribute is also used
2403                                 elem.value = value;
2404                         }
2405                 }
2406         },
2407
2408         propFix: {
2409                 tabindex: "tabIndex",
2410                 readonly: "readOnly",
2411                 "for": "htmlFor",
2412                 "class": "className",
2413                 maxlength: "maxLength",
2414                 cellspacing: "cellSpacing",
2415                 cellpadding: "cellPadding",
2416                 rowspan: "rowSpan",
2417                 colspan: "colSpan",
2418                 usemap: "useMap",
2419                 frameborder: "frameBorder",
2420                 contenteditable: "contentEditable"
2421         },
2422
2423         prop: function( elem, name, value ) {
2424                 var ret, hooks, notxml,
2425                         nType = elem.nodeType;
2426
2427                 // don't get/set properties on text, comment and attribute nodes
2428                 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2429                         return;
2430                 }
2431
2432                 notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2433
2434                 if ( notxml ) {
2435                         // Fix name and attach hooks
2436                         name = jQuery.propFix[ name ] || name;
2437                         hooks = jQuery.propHooks[ name ];
2438                 }
2439
2440                 if ( value !== undefined ) {
2441                         if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
2442                                 return ret;
2443
2444                         } else {
2445                                 return ( elem[ name ] = value );
2446                         }
2447
2448                 } else {
2449                         if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
2450                                 return ret;
2451
2452                         } else {
2453                                 return elem[ name ];
2454                         }
2455                 }
2456         },
2457
2458         propHooks: {
2459                 tabIndex: {
2460                         get: function( elem ) {
2461                                 // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
2462                                 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
2463                                 var attributeNode = elem.getAttributeNode("tabindex");
2464
2465                                 return attributeNode && attributeNode.specified ?
2466                                         parseInt( attributeNode.value, 10 ) :
2467                                         rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
2468                                                 0 :
2469                                                 undefined;
2470                         }
2471                 }
2472         }
2473 });
2474
2475 // Hook for boolean attributes
2476 boolHook = {
2477         get: function( elem, name ) {
2478                 // Align boolean attributes with corresponding properties
2479                 // Fall back to attribute presence where some booleans are not supported
2480                 var attrNode,
2481                         property = jQuery.prop( elem, name );
2482                 return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
2483                         name.toLowerCase() :
2484                         undefined;
2485         },
2486         set: function( elem, value, name ) {
2487                 var propName;
2488                 if ( value === false ) {
2489                         // Remove boolean attributes when set to false
2490                         jQuery.removeAttr( elem, name );
2491                 } else {
2492                         // value is true since we know at this point it's type boolean and not false
2493                         // Set boolean attributes to the same name and set the DOM property
2494                         propName = jQuery.propFix[ name ] || name;
2495                         if ( propName in elem ) {
2496                                 // Only set the IDL specifically if it already exists on the element
2497                                 elem[ propName ] = true;
2498                         }
2499
2500                         elem.setAttribute( name, name.toLowerCase() );
2501                 }
2502                 return name;
2503         }
2504 };
2505
2506 // IE6/7 do not support getting/setting some attributes with get/setAttribute
2507 if ( !getSetAttribute ) {
2508
2509         fixSpecified = {
2510                 name: true,
2511                 id: true,
2512                 coords: true
2513         };
2514
2515         // Use this for any attribute in IE6/7
2516         // This fixes almost every IE6/7 issue
2517         nodeHook = jQuery.valHooks.button = {
2518                 get: function( elem, name ) {
2519                         var ret;
2520                         ret = elem.getAttributeNode( name );
2521                         return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
2522                                 ret.value :
2523                                 undefined;
2524                 },
2525                 set: function( elem, value, name ) {
2526                         // Set the existing or create a new attribute node
2527                         var ret = elem.getAttributeNode( name );
2528                         if ( !ret ) {
2529                                 ret = document.createAttribute( name );
2530                                 elem.setAttributeNode( ret );
2531                         }
2532                         return ( ret.value = value + "" );
2533                 }
2534         };
2535
2536         // Set width and height to auto instead of 0 on empty string( Bug #8150 )
2537         // This is for removals
2538         jQuery.each([ "width", "height" ], function( i, name ) {
2539                 jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2540                         set: function( elem, value ) {
2541                                 if ( value === "" ) {
2542                                         elem.setAttribute( name, "auto" );
2543                                         return value;
2544                                 }
2545                         }
2546                 });
2547         });
2548
2549         // Set contenteditable to false on removals(#10429)
2550         // Setting to empty string throws an error as an invalid value
2551         jQuery.attrHooks.contenteditable = {
2552                 get: nodeHook.get,
2553                 set: function( elem, value, name ) {
2554                         if ( value === "" ) {
2555                                 value = "false";
2556                         }
2557                         nodeHook.set( elem, value, name );
2558                 }
2559         };
2560 }
2561
2562
2563 // Some attributes require a special call on IE
2564 if ( !jQuery.support.hrefNormalized ) {
2565         jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
2566                 jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2567                         get: function( elem ) {
2568                                 var ret = elem.getAttribute( name, 2 );
2569                                 return ret === null ? undefined : ret;
2570                         }
2571                 });
2572         });
2573 }
2574
2575 if ( !jQuery.support.style ) {
2576         jQuery.attrHooks.style = {
2577                 get: function( elem ) {
2578                         // Return undefined in the case of empty string
2579                         // Normalize to lowercase since IE uppercases css property names
2580                         return elem.style.cssText.toLowerCase() || undefined;
2581                 },
2582                 set: function( elem, value ) {
2583                         return ( elem.style.cssText = "" + value );
2584                 }
2585         };
2586 }
2587
2588 // Safari mis-reports the default selected property of an option
2589 // Accessing the parent's selectedIndex property fixes it
2590 if ( !jQuery.support.optSelected ) {
2591         jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
2592                 get: function( elem ) {
2593                         var parent = elem.parentNode;
2594
2595                         if ( parent ) {
2596                                 parent.selectedIndex;
2597
2598                                 // Make sure that it also works with optgroups, see #5701
2599                                 if ( parent.parentNode ) {
2600                                         parent.parentNode.selectedIndex;
2601                                 }
2602                         }
2603                         return null;
2604                 }
2605         });
2606 }
2607
2608 // IE6/7 call enctype encoding
2609 if ( !jQuery.support.enctype ) {
2610         jQuery.propFix.enctype = "encoding";
2611 }
2612
2613 // Radios and checkboxes getter/setter
2614 if ( !jQuery.support.checkOn ) {
2615         jQuery.each([ "radio", "checkbox" ], function() {
2616                 jQuery.valHooks[ this ] = {
2617                         get: function( elem ) {
2618                                 // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
2619                                 return elem.getAttribute("value") === null ? "on" : elem.value;
2620                         }
2621                 };
2622         });
2623 }
2624 jQuery.each([ "radio", "checkbox" ], function() {
2625         jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
2626                 set: function( elem, value ) {
2627                         if ( jQuery.isArray( value ) ) {
2628                                 return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
2629                         }
2630                 }
2631         });
2632 });
2633 var rformElems = /^(?:textarea|input|select)$/i,
2634         rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
2635         rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
2636         rkeyEvent = /^key/,
2637         rmouseEvent = /^(?:mouse|contextmenu)|click/,
2638         rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
2639         hoverHack = function( events ) {
2640                 return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
2641         };
2642
2643 /*
2644  * Helper functions for managing events -- not part of the public interface.
2645  * Props to Dean Edwards' addEvent library for many of the ideas.
2646  */
2647 jQuery.event = {
2648
2649         add: function( elem, types, handler, data, selector ) {
2650
2651                 var elemData, eventHandle, events,
2652                         t, tns, type, namespaces, handleObj,
2653                         handleObjIn, handlers, special;
2654
2655                 // Don't attach events to noData or text/comment nodes (allow plain objects tho)
2656                 if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
2657                         return;
2658                 }
2659
2660                 // Caller can pass in an object of custom data in lieu of the handler
2661                 if ( handler.handler ) {
2662                         handleObjIn = handler;
2663                         handler = handleObjIn.handler;
2664                         selector = handleObjIn.selector;
2665                 }
2666
2667                 // Make sure that the handler has a unique ID, used to find/remove it later
2668                 if ( !handler.guid ) {
2669                         handler.guid = jQuery.guid++;
2670                 }
2671
2672                 // Init the element's event structure and main handler, if this is the first
2673                 events = elemData.events;
2674                 if ( !events ) {
2675                         elemData.events = events = {};
2676                 }
2677                 eventHandle = elemData.handle;
2678                 if ( !eventHandle ) {
2679                         elemData.handle = eventHandle = function( e ) {
2680                                 // Discard the second event of a jQuery.event.trigger() and
2681                                 // when an event is called after a page has unloaded
2682                                 return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
2683                                         jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
2684                                         undefined;
2685                         };
2686                         // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
2687                         eventHandle.elem = elem;
2688                 }
2689
2690                 // Handle multiple events separated by a space
2691                 // jQuery(...).bind("mouseover mouseout", fn);
2692                 types = jQuery.trim( hoverHack(types) ).split( " " );
2693                 for ( t = 0; t < types.length; t++ ) {
2694
2695                         tns = rtypenamespace.exec( types[t] ) || [];
2696                         type = tns[1];
2697                         namespaces = ( tns[2] || "" ).split( "." ).sort();
2698
2699                         // If event changes its type, use the special event handlers for the changed type
2700                         special = jQuery.event.special[ type ] || {};
2701
2702                         // If selector defined, determine special event api type, otherwise given type
2703                         type = ( selector ? special.delegateType : special.bindType ) || type;
2704
2705                         // Update special based on newly reset type
2706                         special = jQuery.event.special[ type ] || {};
2707
2708                         // handleObj is passed to all event handlers
2709                         handleObj = jQuery.extend({
2710                                 type: type,
2711                                 origType: tns[1],
2712                                 data: data,
2713                                 handler: handler,
2714                                 guid: handler.guid,
2715                                 selector: selector,
2716                                 namespace: namespaces.join(".")
2717                         }, handleObjIn );
2718
2719                         // Init the event handler queue if we're the first
2720                         handlers = events[ type ];
2721                         if ( !handlers ) {
2722                                 handlers = events[ type ] = [];
2723                                 handlers.delegateCount = 0;
2724
2725                                 // Only use addEventListener/attachEvent if the special events handler returns false
2726                                 if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
2727                                         // Bind the global event handler to the element
2728                                         if ( elem.addEventListener ) {
2729                                                 elem.addEventListener( type, eventHandle, false );
2730
2731                                         } else if ( elem.attachEvent ) {
2732                                                 elem.attachEvent( "on" + type, eventHandle );
2733                                         }
2734                                 }
2735                         }
2736
2737                         if ( special.add ) {
2738                                 special.add.call( elem, handleObj );
2739
2740                                 if ( !handleObj.handler.guid ) {
2741                                         handleObj.handler.guid = handler.guid;
2742                                 }
2743                         }
2744
2745                         // Add to the element's handler list, delegates in front
2746                         if ( selector ) {
2747                                 handlers.splice( handlers.delegateCount++, 0, handleObj );
2748                         } else {
2749                                 handlers.push( handleObj );
2750                         }
2751
2752                         // Keep track of which events have ever been used, for event optimization
2753                         jQuery.event.global[ type ] = true;
2754                 }
2755
2756                 // Nullify elem to prevent memory leaks in IE
2757                 elem = null;
2758         },
2759
2760         global: {},
2761
2762         // Detach an event or set of events from an element
2763         remove: function( elem, types, handler, selector, mappedTypes ) {
2764
2765                 var t, tns, type, origType, namespaces, origCount,
2766                         j, events, special, eventType, handleObj,
2767                         elemData = jQuery.hasData( elem ) && jQuery._data( elem );
2768
2769                 if ( !elemData || !(events = elemData.events) ) {
2770                         return;
2771                 }
2772
2773                 // Once for each type.namespace in types; type may be omitted
2774                 types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
2775                 for ( t = 0; t < types.length; t++ ) {
2776                         tns = rtypenamespace.exec( types[t] ) || [];
2777                         type = origType = tns[1];
2778                         namespaces = tns[2];
2779
2780                         // Unbind all events (on this namespace, if provided) for the element
2781                         if ( !type ) {
2782                                 for ( type in events ) {
2783                                         jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
2784                                 }
2785                                 continue;
2786                         }
2787
2788                         special = jQuery.event.special[ type ] || {};
2789                         type = ( selector? special.delegateType : special.bindType ) || type;
2790                         eventType = events[ type ] || [];
2791                         origCount = eventType.length;
2792                         namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
2793
2794                         // Remove matching events
2795                         for ( j = 0; j < eventType.length; j++ ) {
2796                                 handleObj = eventType[ j ];
2797
2798                                 if ( ( mappedTypes || origType === handleObj.origType ) &&
2799                                          ( !handler || handler.guid === handleObj.guid ) &&
2800                                          ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
2801                                          ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
2802                                         eventType.splice( j--, 1 );
2803
2804                                         if ( handleObj.selector ) {
2805                                                 eventType.delegateCount--;
2806                                         }
2807                                         if ( special.remove ) {
2808                                                 special.remove.call( elem, handleObj );
2809                                         }
2810                                 }
2811                         }
2812
2813                         // Remove generic event handler if we removed something and no more handlers exist
2814                         // (avoids potential for endless recursion during removal of special event handlers)
2815                         if ( eventType.length === 0 && origCount !== eventType.length ) {
2816                                 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
2817                                         jQuery.removeEvent( elem, type, elemData.handle );
2818                                 }
2819
2820                                 delete events[ type ];
2821                         }
2822                 }
2823
2824                 // Remove the expando if it's no longer used
2825                 if ( jQuery.isEmptyObject( events ) ) {
2826                         delete elemData.handle;
2827
2828                         // removeData also checks for emptiness and clears the expando if empty
2829                         // so use it instead of delete
2830                         jQuery.removeData( elem, "events", true );
2831                 }
2832         },
2833
2834         // Events that are safe to short-circuit if no handlers are attached.
2835         // Native DOM events should not be added, they may have inline handlers.
2836         customEvent: {
2837                 "getData": true,
2838                 "setData": true,
2839                 "changeData": true
2840         },
2841
2842         trigger: function( event, data, elem, onlyHandlers ) {
2843                 // Don't do events on text and comment nodes
2844                 if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
2845                         return;
2846                 }
2847
2848                 // Event object or event type
2849                 var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
2850                         type = event.type || event,
2851                         namespaces = [];
2852
2853                 // focus/blur morphs to focusin/out; ensure we're not firing them right now
2854                 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
2855                         return;
2856                 }
2857
2858                 if ( type.indexOf( "!" ) >= 0 ) {
2859                         // Exclusive events trigger only for the exact event (no namespaces)
2860                         type = type.slice(0, -1);
2861                         exclusive = true;
2862                 }
2863
2864                 if ( type.indexOf( "." ) >= 0 ) {
2865                         // Namespaced trigger; create a regexp to match event type in handle()
2866                         namespaces = type.split(".");
2867                         type = namespaces.shift();
2868                         namespaces.sort();
2869                 }
2870
2871                 if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
2872                         // No jQuery handlers for this event type, and it can't have inline handlers
2873                         return;
2874                 }
2875
2876                 // Caller can pass in an Event, Object, or just an event type string
2877                 event = typeof event === "object" ?
2878                         // jQuery.Event object
2879                         event[ jQuery.expando ] ? event :
2880                         // Object literal
2881                         new jQuery.Event( type, event ) :
2882                         // Just the event type (string)
2883                         new jQuery.Event( type );
2884
2885                 event.type = type;
2886                 event.isTrigger = true;
2887                 event.exclusive = exclusive;
2888                 event.namespace = namespaces.join( "." );
2889                 event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
2890                 ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
2891
2892                 // Handle a global trigger
2893                 if ( !elem ) {
2894
2895                         // TODO: Stop taunting the data cache; remove global events and always attach to document
2896                         cache = jQuery.cache;
2897                         for ( i in cache ) {
2898                                 if ( cache[ i ].events && cache[ i ].events[ type ] ) {
2899                                         jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
2900                                 }
2901                         }
2902                         return;
2903                 }
2904
2905                 // Clean up the event in case it is being reused
2906                 event.result = undefined;
2907                 if ( !event.target ) {
2908                         event.target = elem;
2909                 }
2910
2911                 // Clone any incoming data and prepend the event, creating the handler arg list
2912                 data = data != null ? jQuery.makeArray( data ) : [];
2913                 data.unshift( event );
2914
2915                 // Allow special events to draw outside the lines
2916                 special = jQuery.event.special[ type ] || {};
2917                 if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
2918                         return;
2919                 }
2920
2921                 // Determine event propagation path in advance, per W3C events spec (#9951)
2922                 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
2923                 eventPath = [[ elem, special.bindType || type ]];
2924                 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
2925
2926                         bubbleType = special.delegateType || type;
2927                         cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
2928                         for ( old = elem; cur; cur = cur.parentNode ) {
2929                                 eventPath.push([ cur, bubbleType ]);
2930                                 old = cur;
2931                         }
2932
2933                         // Only add window if we got to document (e.g., not plain obj or detached DOM)
2934                         if ( old === (elem.ownerDocument || document) ) {
2935                                 eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
2936                         }
2937                 }
2938
2939                 // Fire handlers on the event path
2940                 for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
2941
2942                         cur = eventPath[i][0];
2943                         event.type = eventPath[i][1];
2944
2945                         handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
2946                         if ( handle ) {
2947                                 handle.apply( cur, data );
2948                         }
2949                         // Note that this is a bare JS function and not a jQuery handler
2950                         handle = ontype && cur[ ontype ];
2951                         if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
2952                                 event.preventDefault();
2953                         }
2954                 }
2955                 event.type = type;
2956
2957                 // If nobody prevented the default action, do it now
2958                 if ( !onlyHandlers && !event.isDefaultPrevented() ) {
2959
2960                         if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
2961                                 !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
2962
2963                                 // Call a native DOM method on the target with the same name name as the event.
2964                                 // Can't use an .isFunction() check here because IE6/7 fails that test.
2965                                 // Don't do default actions on window, that's where global variables be (#6170)
2966                                 // IE<9 dies on focus/blur to hidden element (#1486)
2967                                 if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
2968
2969                                         // Don't re-trigger an onFOO event when we call its FOO() method
2970                                         old = elem[ ontype ];
2971
2972                                         if ( old ) {
2973                                                 elem[ ontype ] = null;
2974                                         }
2975
2976                                         // Prevent re-triggering of the same event, since we already bubbled it above
2977                                         jQuery.event.triggered = type;
2978                                         elem[ type ]();
2979                                         jQuery.event.triggered = undefined;
2980
2981                                         if ( old ) {
2982                                                 elem[ ontype ] = old;
2983                                         }
2984                                 }
2985                         }
2986                 }
2987
2988                 return event.result;
2989         },
2990
2991         dispatch: function( event ) {
2992
2993                 // Make a writable jQuery.Event from the native event object
2994                 event = jQuery.event.fix( event || window.event );
2995
2996                 var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related,
2997                         handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
2998                         delegateCount = handlers.delegateCount,
2999                         args = [].slice.call( arguments ),
3000                         run_all = !event.exclusive && !event.namespace,
3001                         special = jQuery.event.special[ event.type ] || {},
3002                         handlerQueue = [];
3003
3004                 // Use the fix-ed jQuery.Event rather than the (read-only) native event
3005                 args[0] = event;
3006                 event.delegateTarget = this;
3007
3008                 // Call the preDispatch hook for the mapped type, and let it bail if desired
3009                 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
3010                         return;
3011                 }
3012
3013                 // Determine handlers that should run if there are delegated events
3014                 // Avoid non-left-click bubbling in Firefox (#3861)
3015                 if ( delegateCount && !(event.button && event.type === "click") ) {
3016
3017                         // Pregenerate a single jQuery object for reuse with .is()
3018                         jqcur = jQuery(this);
3019                         jqcur.context = this;
3020
3021                         for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
3022
3023                                 // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx)
3024                                 if ( cur.disabled !== true || event.type !== "click" ) {
3025                                         selMatch = {};
3026                                         matches = [];
3027                                         jqcur[0] = cur;
3028                                         for ( i = 0; i < delegateCount; i++ ) {
3029                                                 handleObj = handlers[ i ];
3030                                                 sel = handleObj.selector;
3031
3032                                                 if ( selMatch[ sel ] === undefined ) {
3033                                                         selMatch[ sel ] = jqcur.is( sel );
3034                                                 }
3035                                                 if ( selMatch[ sel ] ) {
3036                                                         matches.push( handleObj );
3037                                                 }
3038                                         }
3039                                         if ( matches.length ) {
3040                                                 handlerQueue.push({ elem: cur, matches: matches });
3041                                         }
3042                                 }
3043                         }
3044                 }
3045
3046                 // Add the remaining (directly-bound) handlers
3047                 if ( handlers.length > delegateCount ) {
3048                         handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
3049                 }
3050
3051                 // Run delegates first; they may want to stop propagation beneath us
3052                 for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
3053                         matched = handlerQueue[ i ];
3054                         event.currentTarget = matched.elem;
3055
3056                         for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
3057                                 handleObj = matched.matches[ j ];
3058
3059                                 // Triggered event must either 1) be non-exclusive and have no namespace, or
3060                                 // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
3061                                 if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
3062
3063                                         event.data = handleObj.data;
3064                                         event.handleObj = handleObj;
3065
3066                                         ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
3067                                                         .apply( matched.elem, args );
3068
3069                                         if ( ret !== undefined ) {
3070                                                 event.result = ret;
3071                                                 if ( ret === false ) {
3072                                                         event.preventDefault();
3073                                                         event.stopPropagation();
3074                                                 }
3075                                         }
3076                                 }
3077                         }
3078                 }
3079
3080                 // Call the postDispatch hook for the mapped type
3081                 if ( special.postDispatch ) {
3082                         special.postDispatch.call( this, event );
3083                 }
3084
3085                 return event.result;
3086         },
3087
3088         // Includes some event props shared by KeyEvent and MouseEvent
3089         // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
3090         props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
3091
3092         fixHooks: {},
3093
3094         keyHooks: {
3095                 props: "char charCode key keyCode".split(" "),
3096                 filter: function( event, original ) {
3097
3098                         // Add which for key events
3099                         if ( event.which == null ) {
3100                                 event.which = original.charCode != null ? original.charCode : original.keyCode;
3101                         }
3102
3103                         return event;
3104                 }
3105         },
3106
3107         mouseHooks: {
3108                 props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
3109                 filter: function( event, original ) {
3110                         var eventDoc, doc, body,
3111                                 button = original.button,
3112                                 fromElement = original.fromElement;
3113
3114                         // Calculate pageX/Y if missing and clientX/Y available
3115                         if ( event.pageX == null && original.clientX != null ) {
3116                                 eventDoc = event.target.ownerDocument || document;
3117                                 doc = eventDoc.documentElement;
3118                                 body = eventDoc.body;
3119
3120                                 event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
3121                                 event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
3122                         }
3123
3124                         // Add relatedTarget, if necessary
3125                         if ( !event.relatedTarget && fromElement ) {
3126                                 event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
3127                         }
3128
3129                         // Add which for click: 1 === left; 2 === middle; 3 === right
3130                         // Note: button is not normalized, so don't use it
3131                         if ( !event.which && button !== undefined ) {
3132                                 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
3133                         }
3134
3135                         return event;
3136                 }
3137         },
3138
3139         fix: function( event ) {
3140                 if ( event[ jQuery.expando ] ) {
3141                         return event;
3142                 }
3143
3144                 // Create a writable copy of the event object and normalize some properties
3145                 var i, prop,
3146                         originalEvent = event,
3147                         fixHook = jQuery.event.fixHooks[ event.type ] || {},
3148                         copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
3149
3150                 event = jQuery.Event( originalEvent );
3151
3152                 for ( i = copy.length; i; ) {
3153                         prop = copy[ --i ];
3154                         event[ prop ] = originalEvent[ prop ];
3155                 }
3156
3157                 // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
3158                 if ( !event.target ) {
3159                         event.target = originalEvent.srcElement || document;
3160                 }
3161
3162                 // Target should not be a text node (#504, Safari)
3163                 if ( event.target.nodeType === 3 ) {
3164                         event.target = event.target.parentNode;
3165                 }
3166
3167                 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
3168                 event.metaKey = !!event.metaKey;
3169
3170                 return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
3171         },
3172
3173         special: {
3174                 ready: {
3175                         // Make sure the ready event is setup
3176                         setup: jQuery.bindReady
3177                 },
3178
3179                 load: {
3180                         // Prevent triggered image.load events from bubbling to window.load
3181                         noBubble: true
3182                 },
3183
3184                 focus: {
3185                         delegateType: "focusin"
3186                 },
3187                 blur: {
3188                         delegateType: "focusout"
3189                 },
3190
3191                 beforeunload: {
3192                         setup: function( data, namespaces, eventHandle ) {
3193                                 // We only want to do this special case on windows
3194                                 if ( jQuery.isWindow( this ) ) {
3195                                         this.onbeforeunload = eventHandle;
3196                                 }
3197                         },
3198
3199                         teardown: function( namespaces, eventHandle ) {
3200                                 if ( this.onbeforeunload === eventHandle ) {
3201                                         this.onbeforeunload = null;
3202                                 }
3203                         }
3204                 }
3205         },
3206
3207         simulate: function( type, elem, event, bubble ) {
3208                 // Piggyback on a donor event to simulate a different one.
3209                 // Fake originalEvent to avoid donor's stopPropagation, but if the
3210                 // simulated event prevents default then we do the same on the donor.
3211                 var e = jQuery.extend(
3212                         new jQuery.Event(),
3213                         event,
3214                         { type: type,
3215                                 isSimulated: true,
3216                                 originalEvent: {}
3217                         }
3218                 );
3219                 if ( bubble ) {
3220                         jQuery.event.trigger( e, null, elem );
3221                 } else {
3222                         jQuery.event.dispatch.call( elem, e );
3223                 }
3224                 if ( e.isDefaultPrevented() ) {
3225                         event.preventDefault();
3226                 }
3227         }
3228 };
3229
3230 // Some plugins are using, but it's undocumented/deprecated and will be removed.
3231 // The 1.7 special event interface should provide all the hooks needed now.
3232 jQuery.event.handle = jQuery.event.dispatch;
3233
3234 jQuery.removeEvent = document.removeEventListener ?
3235         function( elem, type, handle ) {
3236                 if ( elem.removeEventListener ) {
3237                         elem.removeEventListener( type, handle, false );
3238                 }
3239         } :
3240         function( elem, type, handle ) {
3241                 var name = "on" + type;
3242
3243                 if ( elem.detachEvent ) {
3244
3245                         // #8545, #7054, preventing memory leaks for custom events in IE6-8 â€“
3246                         // detachEvent needed property on element, by name of that event, to properly expose it to GC
3247                         if ( typeof elem[ name ] === "undefined" ) {
3248                                 elem[ name ] = null;
3249                         }
3250
3251                         elem.detachEvent( name, handle );
3252                 }
3253         };
3254
3255 jQuery.Event = function( src, props ) {
3256         // Allow instantiation without the 'new' keyword
3257         if ( !(this instanceof jQuery.Event) ) {
3258                 return new jQuery.Event( src, props );
3259         }
3260
3261         // Event object
3262         if ( src && src.type ) {
3263                 this.originalEvent = src;
3264                 this.type = src.type;
3265
3266                 // Events bubbling up the document may have been marked as prevented
3267                 // by a handler lower down the tree; reflect the correct value.
3268                 this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
3269                         src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
3270
3271         // Event type
3272         } else {
3273                 this.type = src;
3274         }
3275
3276         // Put explicitly provided properties onto the event object
3277         if ( props ) {
3278                 jQuery.extend( this, props );
3279         }
3280
3281         // Create a timestamp if incoming event doesn't have one
3282         this.timeStamp = src && src.timeStamp || jQuery.now();
3283
3284         // Mark it as fixed
3285         this[ jQuery.expando ] = true;
3286 };
3287
3288 function returnFalse() {
3289         return false;
3290 }
3291 function returnTrue() {
3292         return true;
3293 }
3294
3295 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
3296 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
3297 jQuery.Event.prototype = {
3298         preventDefault: function() {
3299                 this.isDefaultPrevented = returnTrue;
3300
3301                 var e = this.originalEvent;
3302                 if ( !e ) {
3303                         return;
3304                 }
3305
3306                 // if preventDefault exists run it on the original event
3307                 if ( e.preventDefault ) {
3308                         e.preventDefault();
3309
3310                 // otherwise set the returnValue property of the original event to false (IE)
3311                 } else {
3312                         e.returnValue = false;
3313                 }
3314         },
3315         stopPropagation: function() {
3316                 this.isPropagationStopped = returnTrue;
3317
3318                 var e = this.originalEvent;
3319                 if ( !e ) {
3320                         return;
3321                 }
3322                 // if stopPropagation exists run it on the original event
3323                 if ( e.stopPropagation ) {
3324                         e.stopPropagation();
3325                 }
3326                 // otherwise set the cancelBubble property of the original event to true (IE)
3327                 e.cancelBubble = true;
3328         },
3329         stopImmediatePropagation: function() {
3330                 this.isImmediatePropagationStopped = returnTrue;
3331                 this.stopPropagation();
3332         },
3333         isDefaultPrevented: returnFalse,
3334         isPropagationStopped: returnFalse,
3335         isImmediatePropagationStopped: returnFalse
3336 };
3337
3338 // Create mouseenter/leave events using mouseover/out and event-time checks
3339 jQuery.each({
3340         mouseenter: "mouseover",
3341         mouseleave: "mouseout"
3342 }, function( orig, fix ) {
3343         jQuery.event.special[ orig ] = {
3344                 delegateType: fix,
3345                 bindType: fix,
3346
3347                 handle: function( event ) {
3348                         var ret,
3349                                 target = this,
3350                                 related = event.relatedTarget,
3351                                 handleObj = event.handleObj,
3352                                 selector = handleObj.selector;
3353
3354                         // For mousenter/leave call the handler if related is outside the target.
3355                         // NB: No relatedTarget if the mouse left/entered the browser window
3356                         if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
3357                                 event.type = handleObj.origType;
3358                                 ret = handleObj.handler.apply( this, arguments );
3359                                 event.type = fix;
3360                         }
3361                         return ret;
3362                 }
3363         };
3364 });
3365
3366 // IE submit delegation
3367 if ( !jQuery.support.submitBubbles ) {
3368
3369         jQuery.event.special.submit = {
3370                 setup: function() {
3371                         // Only need this for delegated form submit events
3372                         if ( jQuery.nodeName( this, "form" ) ) {
3373                                 return false;
3374                         }
3375
3376                         // Lazy-add a submit handler when a descendant form may potentially be submitted
3377                         jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
3378                                 // Node name check avoids a VML-related crash in IE (#9807)
3379                                 var elem = e.target,
3380                                         form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
3381                                 if ( form && !jQuery._data( form, "_submit_attached" ) ) {
3382                                         jQuery.event.add( form, "submit._submit", function( event ) {
3383                                                 event._submit_bubble = true;
3384                                         });
3385                                         jQuery._data( form, "_submit_attached", true );
3386                                 }
3387                         });
3388                         // return undefined since we don't need an event listener
3389                 },
3390
3391                 postDispatch: function( event ) {
3392                         // If form was submitted by the user, bubble the event up the tree
3393                         if ( event._submit_bubble ) {
3394                                 delete event._submit_bubble;
3395                                 if ( this.parentNode && !event.isTrigger ) {
3396                                         jQuery.event.simulate( "submit", this.parentNode, event, true );
3397                                 }
3398                         }
3399                 },
3400
3401                 teardown: function() {
3402                         // Only need this for delegated form submit events
3403                         if ( jQuery.nodeName( this, "form" ) ) {
3404                                 return false;
3405                         }
3406
3407                         // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
3408                         jQuery.event.remove( this, "._submit" );
3409                 }
3410         };
3411 }
3412
3413 // IE change delegation and checkbox/radio fix
3414 if ( !jQuery.support.changeBubbles ) {
3415
3416         jQuery.event.special.change = {
3417
3418                 setup: function() {
3419
3420                         if ( rformElems.test( this.nodeName ) ) {
3421                                 // IE doesn't fire change on a check/radio until blur; trigger it on click
3422                                 // after a propertychange. Eat the blur-change in special.change.handle.
3423                                 // This still fires onchange a second time for check/radio after blur.
3424                                 if ( this.type === "checkbox" || this.type === "radio" ) {
3425                                         jQuery.event.add( this, "propertychange._change", function( event ) {
3426                                                 if ( event.originalEvent.propertyName === "checked" ) {
3427                                                         this._just_changed = true;
3428                                                 }
3429                                         });
3430                                         jQuery.event.add( this, "click._change", function( event ) {
3431                                                 if ( this._just_changed && !event.isTrigger ) {
3432                                                         this._just_changed = false;
3433                                                 }
3434                                                 // Allow triggered, simulated change events (#11500)
3435                                                 jQuery.event.simulate( "change", this, event, true );
3436                                         });
3437                                 }
3438                                 return false;
3439                         }
3440                         // Delegated event; lazy-add a change handler on descendant inputs
3441                         jQuery.event.add( this, "beforeactivate._change", function( e ) {
3442                                 var elem = e.target;
3443
3444                                 if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
3445                                         jQuery.event.add( elem, "change._change", function( event ) {
3446                                                 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
3447                                                         jQuery.event.simulate( "change", this.parentNode, event, true );
3448                                                 }
3449                                         });
3450                                         jQuery._data( elem, "_change_attached", true );
3451                                 }
3452                         });
3453                 },
3454
3455                 handle: function( event ) {
3456                         var elem = event.target;
3457
3458                         // Swallow native change events from checkbox/radio, we already triggered them above
3459                         if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
3460                                 return event.handleObj.handler.apply( this, arguments );
3461                         }
3462                 },
3463
3464                 teardown: function() {
3465                         jQuery.event.remove( this, "._change" );
3466
3467                         return rformElems.test( this.nodeName );
3468                 }
3469         };
3470 }
3471
3472 // Create "bubbling" focus and blur events
3473 if ( !jQuery.support.focusinBubbles ) {
3474         jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
3475
3476                 // Attach a single capturing handler while someone wants focusin/focusout
3477                 var attaches = 0,
3478                         handler = function( event ) {
3479                                 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
3480                         };
3481
3482                 jQuery.event.special[ fix ] = {
3483                         setup: function() {
3484                                 if ( attaches++ === 0 ) {
3485                                         document.addEventListener( orig, handler, true );
3486                                 }
3487                         },
3488                         teardown: function() {
3489                                 if ( --attaches === 0 ) {
3490                                         document.removeEventListener( orig, handler, true );
3491                                 }
3492                         }
3493                 };
3494         });
3495 }
3496
3497 jQuery.fn.extend({
3498
3499         on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
3500                 var origFn, type;
3501
3502                 // Types can be a map of types/handlers
3503                 if ( typeof types === "object" ) {
3504                         // ( types-Object, selector, data )
3505                         if ( typeof selector !== "string" ) { // && selector != null
3506                                 // ( types-Object, data )
3507                                 data = data || selector;
3508                                 selector = undefined;
3509                         }
3510                         for ( type in types ) {
3511                                 this.on( type, selector, data, types[ type ], one );
3512                         }
3513                         return this;
3514                 }
3515
3516                 if ( data == null && fn == null ) {
3517                         // ( types, fn )
3518                         fn = selector;
3519                         data = selector = undefined;
3520                 } else if ( fn == null ) {
3521                         if ( typeof selector === "string" ) {
3522                                 // ( types, selector, fn )
3523                                 fn = data;
3524                                 data = undefined;
3525                         } else {
3526                                 // ( types, data, fn )
3527                                 fn = data;
3528                                 data = selector;
3529                                 selector = undefined;
3530                         }
3531                 }
3532                 if ( fn === false ) {
3533                         fn = returnFalse;
3534                 } else if ( !fn ) {
3535                         return this;
3536                 }
3537
3538                 if ( one === 1 ) {
3539                         origFn = fn;
3540                         fn = function( event ) {
3541                                 // Can use an empty set, since event contains the info
3542                                 jQuery().off( event );
3543                                 return origFn.apply( this, arguments );
3544                         };
3545                         // Use same guid so caller can remove using origFn
3546                         fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
3547                 }
3548                 return this.each( function() {
3549                         jQuery.event.add( this, types, fn, data, selector );
3550                 });
3551         },
3552         one: function( types, selector, data, fn ) {
3553                 return this.on( types, selector, data, fn, 1 );
3554         },
3555         off: function( types, selector, fn ) {
3556                 var handleObj, type;
3557                 if ( types && types.preventDefault && types.handleObj ) {
3558                         // ( event )  dispatched jQuery.Event
3559                         handleObj = types.handleObj;
3560                         jQuery( types.delegateTarget ).off(
3561                                 handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
3562                                 handleObj.selector,
3563                                 handleObj.handler
3564                         );
3565                         return this;
3566                 }
3567                 if ( typeof types === "object" ) {
3568                         // ( types-object [, selector] )
3569                         for ( type in types ) {
3570                                 this.off( type, selector, types[ type ] );
3571                         }
3572                         return this;
3573                 }
3574                 if ( selector === false || typeof selector === "function" ) {
3575                         // ( types [, fn] )
3576                         fn = selector;
3577                         selector = undefined;
3578                 }
3579                 if ( fn === false ) {
3580                         fn = returnFalse;
3581                 }
3582                 return this.each(function() {
3583                         jQuery.event.remove( this, types, fn, selector );
3584                 });
3585         },
3586
3587         bind: function( types, data, fn ) {
3588                 return this.on( types, null, data, fn );
3589         },
3590         unbind: function( types, fn ) {
3591                 return this.off( types, null, fn );
3592         },
3593
3594         live: function( types, data, fn ) {
3595                 jQuery( this.context ).on( types, this.selector, data, fn );
3596                 return this;
3597         },
3598         die: function( types, fn ) {
3599                 jQuery( this.context ).off( types, this.selector || "**", fn );
3600                 return this;
3601         },
3602
3603         delegate: function( selector, types, data, fn ) {
3604                 return this.on( types, selector, data, fn );
3605         },
3606         undelegate: function( selector, types, fn ) {
3607                 // ( namespace ) or ( selector, types [, fn] )
3608                 return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
3609         },
3610
3611         trigger: function( type, data ) {
3612                 return this.each(function() {
3613                         jQuery.event.trigger( type, data, this );
3614                 });
3615         },
3616         triggerHandler: function( type, data ) {
3617                 if ( this[0] ) {
3618                         return jQuery.event.trigger( type, data, this[0], true );
3619                 }
3620         },
3621
3622         toggle: function( fn ) {
3623                 // Save reference to arguments for access in closure
3624                 var args = arguments,
3625                         guid = fn.guid || jQuery.guid++,
3626                         i = 0,
3627                         toggler = function( event ) {
3628                                 // Figure out which function to execute
3629                                 var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
3630                                 jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
3631
3632                                 // Make sure that clicks stop
3633                                 event.preventDefault();
3634
3635                                 // and execute the function
3636                                 return args[ lastToggle ].apply( this, arguments ) || false;
3637                         };
3638
3639                 // link all the functions, so any of them can unbind this click handler
3640                 toggler.guid = guid;
3641                 while ( i < args.length ) {
3642                         args[ i++ ].guid = guid;
3643                 }
3644
3645                 return this.click( toggler );
3646         },
3647
3648         hover: function( fnOver, fnOut ) {
3649                 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
3650         }
3651 });
3652
3653 jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
3654         "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
3655         "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
3656
3657         // Handle event binding
3658         jQuery.fn[ name ] = function( data, fn ) {
3659                 if ( fn == null ) {
3660                         fn = data;
3661                         data = null;
3662                 }
3663
3664                 return arguments.length > 0 ?
3665                         this.on( name, null, data, fn ) :
3666                         this.trigger( name );
3667         };
3668
3669         if ( rkeyEvent.test( name ) ) {
3670                 jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
3671         }
3672
3673         if ( rmouseEvent.test( name ) ) {
3674                 jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
3675         }
3676 });
3677 /*!\r
3678  * Sizzle CSS Selector Engine\r
3679  *  Copyright 2012 jQuery Foundation and other contributors\r
3680  *  Released under the MIT license\r
3681  *  http://sizzlejs.com/\r
3682  */\r
3683 (function( window, undefined ) {\r
3684 \r
3685 var cachedruns,\r
3686         dirruns,\r
3687         sortOrder,\r
3688         siblingCheck,\r
3689         assertGetIdNotName,\r
3690 \r
3691         document = window.document,\r
3692         docElem = document.documentElement,\r
3693 \r
3694         strundefined = "undefined",\r
3695         hasDuplicate = false,\r
3696         baseHasDuplicate = true,\r
3697         done = 0,\r
3698         slice = [].slice,\r
3699         push = [].push,\r
3700 \r
3701         expando = ( "sizcache" + Math.random() ).replace( ".", "" ),\r
3702 \r
3703         // Regex\r
3704 \r
3705         // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\r
3706         whitespace = "[\\x20\\t\\r\\n\\f]",\r
3707         // http://www.w3.org/TR/css3-syntax/#characters\r
3708         characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",\r
3709 \r
3710         // Loosely modeled on CSS identifier characters\r
3711         // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)\r
3712         // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r
3713         identifier = characterEncoding.replace( "w", "w#" ),\r
3714 \r
3715         // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\r
3716         operators = "([*^$|!~]?=)",\r
3717         attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +\r
3718                 "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",\r
3719         pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",\r
3720         pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",\r
3721         combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*",\r
3722         groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+",\r
3723 \r
3724         // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r
3725         rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),\r
3726 \r
3727         rcombinators = new RegExp( "^" + combinators ),\r
3728 \r
3729         // All simple (non-comma) selectors, excluding insignifant trailing whitespace\r
3730         rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ),\r
3731 \r
3732         // A selector, or everything after leading whitespace\r
3733         // Optionally followed in either case by a ")" for terminating sub-selectors\r
3734         rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ),\r
3735 \r
3736         // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive\r
3737         rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ),\r
3738 \r
3739         // Easily-parseable/retrievable ID or TAG or CLASS selectors\r
3740         rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,\r
3741 \r
3742         rsibling = /[\x20\t\r\n\f]*[+~]/,\r
3743         rendsWithNot = /:not\($/,\r
3744 \r
3745         rheader = /h\d/i,\r
3746         rinputs = /input|select|textarea|button/i,\r
3747 \r
3748         rbackslash = /\\(?!\\)/g,\r
3749 \r
3750         matchExpr = {\r
3751                 "ID": new RegExp( "^#(" + characterEncoding + ")" ),\r
3752                 "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),\r
3753                 "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),\r
3754                 "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ),\r
3755                 "ATTR": new RegExp( "^" + attributes ),\r
3756                 "PSEUDO": new RegExp( "^" + pseudos ),\r
3757                 "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace +\r
3758                         "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +\r
3759                         "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),\r
3760                 "POS": new RegExp( pos, "ig" ),\r
3761                 // For use in libraries implementing .is()\r
3762                 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )\r
3763         },\r
3764 \r
3765         classCache = {},\r
3766         cachedClasses = [],\r
3767         compilerCache = {},\r
3768         cachedSelectors = [],\r
3769 \r
3770         // Mark a function for use in filtering\r
3771         markFunction = function( fn ) {\r
3772                 fn.sizzleFilter = true;\r
3773                 return fn;\r
3774         },\r
3775 \r
3776         // Returns a function to use in pseudos for input types\r
3777         createInputFunction = function( type ) {\r
3778                 return function( elem ) {\r
3779                         // Check the input's nodeName and type\r
3780                         return elem.nodeName.toLowerCase() === "input" && elem.type === type;\r
3781                 };\r
3782         },\r
3783 \r
3784         // Returns a function to use in pseudos for buttons\r
3785         createButtonFunction = function( type ) {\r
3786                 return function( elem ) {\r
3787                         var name = elem.nodeName.toLowerCase();\r
3788                         return (name === "input" || name === "button") && elem.type === type;\r
3789                 };\r
3790         },\r
3791 \r
3792         // Used for testing something on an element\r
3793         assert = function( fn ) {\r
3794                 var pass = false,\r
3795                         div = document.createElement("div");\r
3796                 try {\r
3797                         pass = fn( div );\r
3798                 } catch (e) {}\r
3799                 // release memory in IE\r
3800                 div = null;\r
3801                 return pass;\r
3802         },\r
3803 \r
3804         // Check if attributes should be retrieved by attribute nodes\r
3805         assertAttributes = assert(function( div ) {\r
3806                 div.innerHTML = "<select></select>";\r
3807                 var type = typeof div.lastChild.getAttribute("multiple");\r
3808                 // IE8 returns a string for some attributes even when not present\r
3809                 return type !== "boolean" && type !== "string";\r
3810         }),\r
3811 \r
3812         // Check if getElementById returns elements by name\r
3813         // Check if getElementsByName privileges form controls or returns elements by ID\r
3814         assertUsableName = assert(function( div ) {\r
3815                 // Inject content\r
3816                 div.id = expando + 0;\r
3817                 div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";\r
3818                 docElem.insertBefore( div, docElem.firstChild );\r
3819 \r
3820                 // Test\r
3821                 var pass = document.getElementsByName &&\r
3822                         // buggy browsers will return fewer than the correct 2\r
3823                         document.getElementsByName( expando ).length ===\r
3824                         // buggy browsers will return more than the correct 0\r
3825                         2 + document.getElementsByName( expando + 0 ).length;\r
3826                 assertGetIdNotName = !document.getElementById( expando );\r
3827 \r
3828                 // Cleanup\r
3829                 docElem.removeChild( div );\r
3830 \r
3831                 return pass;\r
3832         }),\r
3833 \r
3834         // Check if the browser returns only elements\r
3835         // when doing getElementsByTagName("*")\r
3836         assertTagNameNoComments = assert(function( div ) {\r
3837                 div.appendChild( document.createComment("") );\r
3838                 return div.getElementsByTagName("*").length === 0;\r
3839         }),\r
3840 \r
3841         // Check if getAttribute returns normalized href attributes\r
3842         assertHrefNotNormalized = assert(function( div ) {\r
3843                 div.innerHTML = "<a href='#'></a>";\r
3844                 return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&\r
3845                         div.firstChild.getAttribute("href") === "#";\r
3846         }),\r
3847 \r
3848         // Check if getElementsByClassName can be trusted\r
3849         assertUsableClassName = assert(function( div ) {\r
3850                 // Opera can't find a second classname (in 9.6)\r
3851                 div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";\r
3852                 if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {\r
3853                         return false;\r
3854                 }\r
3855 \r
3856                 // Safari caches class attributes, doesn't catch changes (in 3.2)\r
3857                 div.lastChild.className = "e";\r
3858                 return div.getElementsByClassName("e").length !== 1;\r
3859         });\r
3860 \r
3861 var Sizzle = function( selector, context, results, seed ) {\r
3862         results = results || [];\r
3863         context = context || document;\r
3864         var match, elem, xml, m,\r
3865                 nodeType = context.nodeType;\r
3866 \r
3867         if ( nodeType !== 1 && nodeType !== 9 ) {\r
3868                 return [];\r
3869         }\r
3870 \r
3871         if ( !selector || typeof selector !== "string" ) {\r
3872                 return results;\r
3873         }\r
3874 \r
3875         xml = isXML( context );\r
3876 \r
3877         if ( !xml && !seed ) {\r
3878                 if ( (match = rquickExpr.exec( selector )) ) {\r
3879                         // Speed-up: Sizzle("#ID")\r
3880                         if ( (m = match[1]) ) {\r
3881                                 if ( nodeType === 9 ) {\r
3882                                         elem = context.getElementById( m );\r
3883                                         // Check parentNode to catch when Blackberry 4.6 returns\r
3884                                         // nodes that are no longer in the document #6963\r
3885                                         if ( elem && elem.parentNode ) {\r
3886                                                 // Handle the case where IE, Opera, and Webkit return items\r
3887                                                 // by name instead of ID\r
3888                                                 if ( elem.id === m ) {\r
3889                                                         results.push( elem );\r
3890                                                         return results;\r
3891                                                 }\r
3892                                         } else {\r
3893                                                 return results;\r
3894                                         }\r
3895                                 } else {\r
3896                                         // Context is not a document\r
3897                                         if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\r
3898                                                 contains( context, elem ) && elem.id === m ) {\r
3899                                                 results.push( elem );\r
3900                                                 return results;\r
3901                                         }\r
3902                                 }\r
3903 \r
3904                         // Speed-up: Sizzle("TAG")\r
3905                         } else if ( match[2] ) {\r
3906                                 push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );\r
3907                                 return results;\r
3908 \r
3909                         // Speed-up: Sizzle(".CLASS")\r
3910                         } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {\r
3911                                 push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );\r
3912                                 return results;\r
3913                         }\r
3914                 }\r
3915         }\r
3916 \r
3917         // All others\r
3918         return select( selector, context, results, seed, xml );\r
3919 };\r
3920 \r
3921 var Expr = Sizzle.selectors = {\r
3922 \r
3923         // Can be adjusted by the user\r
3924         cacheLength: 50,\r
3925 \r
3926         match: matchExpr,\r
3927 \r
3928         order: [ "ID", "TAG" ],\r
3929 \r
3930         attrHandle: {},\r
3931 \r
3932         createPseudo: markFunction,\r
3933 \r
3934         find: {\r
3935                 "ID": assertGetIdNotName ?\r
3936                         function( id, context, xml ) {\r
3937                                 if ( typeof context.getElementById !== strundefined && !xml ) {\r
3938                                         var m = context.getElementById( id );\r
3939                                         // Check parentNode to catch when Blackberry 4.6 returns\r
3940                                         // nodes that are no longer in the document #6963\r
3941                                         return m && m.parentNode ? [m] : [];\r
3942                                 }\r
3943                         } :\r
3944                         function( id, context, xml ) {\r
3945                                 if ( typeof context.getElementById !== strundefined && !xml ) {\r
3946                                         var m = context.getElementById( id );\r
3947 \r
3948                                         return m ?\r
3949                                                 m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?\r
3950                                                         [m] :\r
3951                                                         undefined :\r
3952                                                 [];\r
3953                                 }\r
3954                         },\r
3955 \r
3956                 "TAG": assertTagNameNoComments ?\r
3957                         function( tag, context ) {\r
3958                                 if ( typeof context.getElementsByTagName !== strundefined ) {\r
3959                                         return context.getElementsByTagName( tag );\r
3960                                 }\r
3961                         } :\r
3962                         function( tag, context ) {\r
3963                                 var results = context.getElementsByTagName( tag );\r
3964 \r
3965                                 // Filter out possible comments\r
3966                                 if ( tag === "*" ) {\r
3967                                         var elem,\r
3968                                                 tmp = [],\r
3969                                                 i = 0;\r
3970 \r
3971                                         for ( ; (elem = results[i]); i++ ) {\r
3972                                                 if ( elem.nodeType === 1 ) {\r
3973                                                         tmp.push( elem );\r
3974                                                 }\r
3975                                         }\r
3976 \r
3977                                         return tmp;\r
3978                                 }\r
3979                                 return results;\r
3980                         }\r
3981         },\r
3982 \r
3983         relative: {\r
3984                 ">": { dir: "parentNode", first: true },\r
3985                 " ": { dir: "parentNode" },\r
3986                 "+": { dir: "previousSibling", first: true },\r
3987                 "~": { dir: "previousSibling" }\r
3988         },\r
3989 \r
3990         preFilter: {\r
3991                 "ATTR": function( match ) {\r
3992                         match[1] = match[1].replace( rbackslash, "" );\r
3993 \r
3994                         // Move the given value to match[3] whether quoted or unquoted\r
3995                         match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );\r
3996 \r
3997                         if ( match[2] === "~=" ) {\r
3998                                 match[3] = " " + match[3] + " ";\r
3999                         }\r
4000 \r
4001                         return match.slice( 0, 4 );\r
4002                 },\r
4003 \r
4004                 "CHILD": function( match ) {\r
4005                         /* matches from matchExpr.CHILD\r
4006                                 1 type (only|nth|...)\r
4007                                 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)\r
4008                                 3 xn-component of xn+y argument ([+-]?\d*n|)\r
4009                                 4 sign of xn-component\r
4010                                 5 x of xn-component\r
4011                                 6 sign of y-component\r
4012                                 7 y of y-component\r
4013                         */\r
4014                         match[1] = match[1].toLowerCase();\r
4015 \r
4016                         if ( match[1] === "nth" ) {\r
4017                                 // nth-child requires argument\r
4018                                 if ( !match[2] ) {\r
4019                                         Sizzle.error( match[0] );\r
4020                                 }\r
4021 \r
4022                                 // numeric x and y parameters for Expr.filter.CHILD\r
4023                                 // remember that false/true cast respectively to 0/1\r
4024                                 match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );\r
4025                                 match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );\r
4026 \r
4027                         // other types prohibit arguments\r
4028                         } else if ( match[2] ) {\r
4029                                 Sizzle.error( match[0] );\r
4030                         }\r
4031 \r
4032                         return match;\r
4033                 },\r
4034 \r
4035                 "PSEUDO": function( match ) {\r
4036                         var argument,\r
4037                                 unquoted = match[4];\r
4038 \r
4039                         if ( matchExpr["CHILD"].test( match[0] ) ) {\r
4040                                 return null;\r
4041                         }\r
4042 \r
4043                         // Relinquish our claim on characters in `unquoted` from a closing parenthesis on\r
4044                         if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) {\r
4045 \r
4046                                 match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 );\r
4047                                 unquoted = argument[0].slice( 0, -1 );\r
4048                         }\r
4049 \r
4050                         // Quoted or unquoted, we have the full argument\r
4051                         // Return only captures needed by the pseudo filter method (type and argument)\r
4052                         match.splice( 2, 3, unquoted || match[3] );\r
4053                         return match;\r
4054                 }\r
4055         },\r
4056 \r
4057         filter: {\r
4058                 "ID": assertGetIdNotName ?\r
4059                         function( id ) {\r
4060                                 id = id.replace( rbackslash, "" );\r
4061                                 return function( elem ) {\r
4062                                         return elem.getAttribute("id") === id;\r
4063                                 };\r
4064                         } :\r
4065                         function( id ) {\r
4066                                 id = id.replace( rbackslash, "" );\r
4067                                 return function( elem ) {\r
4068                                         var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");\r
4069                                         return node && node.value === id;\r
4070                                 };\r
4071                         },\r
4072 \r
4073                 "TAG": function( nodeName ) {\r
4074                         if ( nodeName === "*" ) {\r
4075                                 return function() { return true; };\r
4076                         }\r
4077                         nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();\r
4078 \r
4079                         return function( elem ) {\r
4080                                 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\r
4081                         };\r
4082                 },\r
4083 \r
4084                 "CLASS": function( className ) {\r
4085                         var pattern = classCache[ className ];\r
4086                         if ( !pattern ) {\r
4087                                 pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" );\r
4088                                 cachedClasses.push( className );\r
4089                                 // Avoid too large of a cache\r
4090                                 if ( cachedClasses.length > Expr.cacheLength ) {\r
4091                                         delete classCache[ cachedClasses.shift() ];\r
4092                                 }\r
4093                         }\r
4094                         return function( elem ) {\r
4095                                 return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );\r
4096                         };\r
4097                 },\r
4098 \r
4099                 "ATTR": function( name, operator, check ) {\r
4100                         if ( !operator ) {\r
4101                                 return function( elem ) {\r
4102                                         return Sizzle.attr( elem, name ) != null;\r
4103                                 };\r
4104                         }\r
4105 \r
4106                         return function( elem ) {\r
4107                                 var result = Sizzle.attr( elem, name ),\r
4108                                         value = result + "";\r
4109 \r
4110                                 if ( result == null ) {\r
4111                                         return operator === "!=";\r
4112                                 }\r
4113 \r
4114                                 switch ( operator ) {\r
4115                                         case "=":\r
4116                                                 return value === check;\r
4117                                         case "!=":\r
4118                                                 return value !== check;\r
4119                                         case "^=":\r
4120                                                 return check && value.indexOf( check ) === 0;\r
4121                                         case "*=":\r
4122                                                 return check && value.indexOf( check ) > -1;\r
4123                                         case "$=":\r
4124                                                 return check && value.substr( value.length - check.length ) === check;\r
4125                                         case "~=":\r
4126                                                 return ( " " + value + " " ).indexOf( check ) > -1;\r
4127                                         case "|=":\r
4128                                                 return value === check || value.substr( 0, check.length + 1 ) === check + "-";\r
4129                                 }\r
4130                         };\r
4131                 },\r
4132 \r
4133                 "CHILD": function( type, argument, first, last ) {\r
4134 \r
4135                         if ( type === "nth" ) {\r
4136                                 var doneName = done++;\r
4137 \r
4138                                 return function( elem ) {\r
4139                                         var parent, diff,\r
4140                                                 count = 0,\r
4141                                                 node = elem;\r
4142 \r
4143                                         if ( first === 1 && last === 0 ) {\r
4144                                                 return true;\r
4145                                         }\r
4146 \r
4147                                         parent = elem.parentNode;\r
4148 \r
4149                                         if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) {\r
4150                                                 for ( node = parent.firstChild; node; node = node.nextSibling ) {\r
4151                                                         if ( node.nodeType === 1 ) {\r
4152                                                                 node.sizset = ++count;\r
4153                                                                 if ( node === elem ) {\r
4154                                                                         break;\r
4155                                                                 }\r
4156                                                         }\r
4157                                                 }\r
4158 \r
4159                                                 parent[ expando ] = doneName;\r
4160                                         }\r
4161 \r
4162                                         diff = elem.sizset - last;\r
4163 \r
4164                                         if ( first === 0 ) {\r
4165                                                 return diff === 0;\r
4166 \r
4167                                         } else {\r
4168                                                 return ( diff % first === 0 && diff / first >= 0 );\r
4169                                         }\r
4170                                 };\r
4171                         }\r
4172 \r
4173                         return function( elem ) {\r
4174                                 var node = elem;\r
4175 \r
4176                                 switch ( type ) {\r
4177                                         case "only":\r
4178                                         case "first":\r
4179                                                 while ( (node = node.previousSibling) ) {\r
4180                                                         if ( node.nodeType === 1 ) {\r
4181                                                                 return false;\r
4182                                                         }\r
4183                                                 }\r
4184 \r
4185                                                 if ( type === "first" ) {\r
4186                                                         return true;\r
4187                                                 }\r
4188 \r
4189                                                 node = elem;\r
4190 \r
4191                                                 /* falls through */\r
4192                                         case "last":\r
4193                                                 while ( (node = node.nextSibling) ) {\r
4194                                                         if ( node.nodeType === 1 ) {\r
4195                                                                 return false;\r
4196                                                         }\r
4197                                                 }\r
4198 \r
4199                                                 return true;\r
4200                                 }\r
4201                         };\r
4202                 },\r
4203 \r
4204                 "PSEUDO": function( pseudo, argument, context, xml ) {\r
4205                         // pseudo-class names are case-insensitive\r
4206                         // http://www.w3.org/TR/selectors/#pseudo-classes\r
4207                         // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r
4208                         var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ];\r
4209 \r
4210                         if ( !fn ) {\r
4211                                 Sizzle.error( "unsupported pseudo: " + pseudo );\r
4212                         }\r
4213 \r
4214                         // The user may set fn.sizzleFilter to indicate\r
4215                         // that arguments are needed to create the filter function\r
4216                         // just as Sizzle does\r
4217                         if ( !fn.sizzleFilter ) {\r
4218                                 return fn;\r
4219                         }\r
4220 \r
4221                         return fn( argument, context, xml );\r
4222                 }\r
4223         },\r
4224 \r
4225         pseudos: {\r
4226                 "not": markFunction(function( selector, context, xml ) {\r
4227                         // Trim the selector passed to compile\r
4228                         // to avoid treating leading and trailing\r
4229                         // spaces as combinators\r
4230                         var matcher = compile( selector.replace( rtrim, "$1" ), context, xml );\r
4231                         return function( elem ) {\r
4232                                 return !matcher( elem );\r
4233                         };\r
4234                 }),\r
4235 \r
4236                 "enabled": function( elem ) {\r
4237                         return elem.disabled === false;\r
4238                 },\r
4239 \r
4240                 "disabled": function( elem ) {\r
4241                         return elem.disabled === true;\r
4242                 },\r
4243 \r
4244                 "checked": function( elem ) {\r
4245                         // In CSS3, :checked should return both checked and selected elements\r
4246                         // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r
4247                         var nodeName = elem.nodeName.toLowerCase();\r
4248                         return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);\r
4249                 },\r
4250 \r
4251                 "selected": function( elem ) {\r
4252                         // Accessing this property makes selected-by-default\r
4253                         // options in Safari work properly\r
4254                         if ( elem.parentNode ) {\r
4255                                 elem.parentNode.selectedIndex;\r
4256                         }\r
4257 \r
4258                         return elem.selected === true;\r
4259                 },\r
4260 \r
4261                 "parent": function( elem ) {\r
4262                         return !Expr.pseudos["empty"]( elem );\r
4263                 },\r
4264 \r
4265                 "empty": function( elem ) {\r
4266                         // http://www.w3.org/TR/selectors/#empty-pseudo\r
4267                         // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\r
4268                         //   not comment, processing instructions, or others\r
4269                         // Thanks to Diego Perini for the nodeName shortcut\r
4270                         //   Greater than "@" means alpha characters (specifically not starting with "#" or "?")\r
4271                         var nodeType;\r
4272                         elem = elem.firstChild;\r
4273                         while ( elem ) {\r
4274                                 if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {\r
4275                                         return false;\r
4276                                 }\r
4277                                 elem = elem.nextSibling;\r
4278                         }\r
4279                         return true;\r
4280                 },\r
4281 \r
4282                 "contains": markFunction(function( text ) {\r
4283                         return function( elem ) {\r
4284                                 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\r
4285                         };\r
4286                 }),\r
4287 \r
4288                 "has": markFunction(function( selector ) {\r
4289                         return function( elem ) {\r
4290                                 return Sizzle( selector, elem ).length > 0;\r
4291                         };\r
4292                 }),\r
4293 \r
4294                 "header": function( elem ) {\r
4295                         return rheader.test( elem.nodeName );\r
4296                 },\r
4297 \r
4298                 "text": function( elem ) {\r
4299                         var type, attr;\r
4300                         // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\r
4301                         // use getAttribute instead to test this case\r
4302                         return elem.nodeName.toLowerCase() === "input" &&\r
4303                                 (type = elem.type) === "text" &&\r
4304                                 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );\r
4305                 },\r
4306 \r
4307                 // Input types\r
4308                 "radio": createInputFunction("radio"),\r
4309                 "checkbox": createInputFunction("checkbox"),\r
4310                 "file": createInputFunction("file"),\r
4311                 "password": createInputFunction("password"),\r
4312                 "image": createInputFunction("image"),\r
4313 \r
4314                 "submit": createButtonFunction("submit"),\r
4315                 "reset": createButtonFunction("reset"),\r
4316 \r
4317                 "button": function( elem ) {\r
4318                         var name = elem.nodeName.toLowerCase();\r
4319                         return name === "input" && elem.type === "button" || name === "button";\r
4320                 },\r
4321 \r
4322                 "input": function( elem ) {\r
4323                         return rinputs.test( elem.nodeName );\r
4324                 },\r
4325 \r
4326                 "focus": function( elem ) {\r
4327                         var doc = elem.ownerDocument;\r
4328                         return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href);\r
4329                 },\r
4330 \r
4331                 "active": function( elem ) {\r
4332                         return elem === elem.ownerDocument.activeElement;\r
4333                 }\r
4334         },\r
4335 \r
4336         setFilters: {\r
4337                 "first": function( elements, argument, not ) {\r
4338                         return not ? elements.slice( 1 ) : [ elements[0] ];\r
4339                 },\r
4340 \r
4341                 "last": function( elements, argument, not ) {\r
4342                         var elem = elements.pop();\r
4343                         return not ? elements : [ elem ];\r
4344                 },\r
4345 \r
4346                 "even": function( elements, argument, not ) {\r
4347                         var results = [],\r
4348                                 i = not ? 1 : 0,\r
4349                                 len = elements.length;\r
4350                         for ( ; i < len; i = i + 2 ) {\r
4351                                 results.push( elements[i] );\r
4352                         }\r
4353                         return results;\r
4354                 },\r
4355 \r
4356                 "odd": function( elements, argument, not ) {\r
4357                         var results = [],\r
4358                                 i = not ? 0 : 1,\r
4359                                 len = elements.length;\r
4360                         for ( ; i < len; i = i + 2 ) {\r
4361                                 results.push( elements[i] );\r
4362                         }\r
4363                         return results;\r
4364                 },\r
4365 \r
4366                 "lt": function( elements, argument, not ) {\r
4367                         return not ? elements.slice( +argument ) : elements.slice( 0, +argument );\r
4368                 },\r
4369 \r
4370                 "gt": function( elements, argument, not ) {\r
4371                         return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 );\r
4372                 },\r
4373 \r
4374                 "eq": function( elements, argument, not ) {\r
4375                         var elem = elements.splice( +argument, 1 );\r
4376                         return not ? elements : elem;\r
4377                 }\r
4378         }\r
4379 };\r
4380 \r
4381 // Deprecated\r
4382 Expr.setFilters["nth"] = Expr.setFilters["eq"];\r
4383 \r
4384 // Back-compat\r
4385 Expr.filters = Expr.pseudos;\r
4386 \r
4387 // IE6/7 return a modified href\r
4388 if ( !assertHrefNotNormalized ) {\r
4389         Expr.attrHandle = {\r
4390                 "href": function( elem ) {\r
4391                         return elem.getAttribute( "href", 2 );\r
4392                 },\r
4393                 "type": function( elem ) {\r
4394                         return elem.getAttribute("type");\r
4395                 }\r
4396         };\r
4397 }\r
4398 \r
4399 // Add getElementsByName if usable\r
4400 if ( assertUsableName ) {\r
4401         Expr.order.push("NAME");\r
4402         Expr.find["NAME"] = function( name, context ) {\r
4403                 if ( typeof context.getElementsByName !== strundefined ) {\r
4404                         return context.getElementsByName( name );\r
4405                 }\r
4406         };\r
4407 }\r
4408 \r
4409 // Add getElementsByClassName if usable\r
4410 if ( assertUsableClassName ) {\r
4411         Expr.order.splice( 1, 0, "CLASS" );\r
4412         Expr.find["CLASS"] = function( className, context, xml ) {\r
4413                 if ( typeof context.getElementsByClassName !== strundefined && !xml ) {\r
4414                         return context.getElementsByClassName( className );\r
4415                 }\r
4416         };\r
4417 }\r
4418 \r
4419 // If slice is not available, provide a backup\r
4420 try {\r
4421         slice.call( docElem.childNodes, 0 )[0].nodeType;\r
4422 } catch ( e ) {\r
4423         slice = function( i ) {\r
4424                 var elem, results = [];\r
4425                 for ( ; (elem = this[i]); i++ ) {\r
4426                         results.push( elem );\r
4427                 }\r
4428                 return results;\r
4429         };\r
4430 }\r
4431 \r
4432 var isXML = Sizzle.isXML = function( elem ) {\r
4433         // documentElement is verified for cases where it doesn't yet exist\r
4434         // (such as loading iframes in IE - #4833)\r
4435         var documentElement = elem && (elem.ownerDocument || elem).documentElement;\r
4436         return documentElement ? documentElement.nodeName !== "HTML" : false;\r
4437 };\r
4438 \r
4439 // Element contains another\r
4440 var contains = Sizzle.contains = docElem.compareDocumentPosition ?\r
4441         function( a, b ) {\r
4442                 return !!( a.compareDocumentPosition( b ) & 16 );\r
4443         } :\r
4444         docElem.contains ?\r
4445         function( a, b ) {\r
4446                 var adown = a.nodeType === 9 ? a.documentElement : a,\r
4447                         bup = b.parentNode;\r
4448                 return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );\r
4449         } :\r
4450         function( a, b ) {\r
4451                 while ( (b = b.parentNode) ) {\r
4452                         if ( b === a ) {\r
4453                                 return true;\r
4454                         }\r
4455                 }\r
4456                 return false;\r
4457         };\r
4458 \r
4459 /**\r
4460  * Utility function for retrieving the text value of an array of DOM nodes\r
4461  * @param {Array|Element} elem\r
4462  */\r
4463 var getText = Sizzle.getText = function( elem ) {\r
4464         var node,\r
4465                 ret = "",\r
4466                 i = 0,\r
4467                 nodeType = elem.nodeType;\r
4468 \r
4469         if ( nodeType ) {\r
4470                 if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\r
4471                         // Use textContent for elements\r
4472                         // innerText usage removed for consistency of new lines (see #11153)\r
4473                         if ( typeof elem.textContent === "string" ) {\r
4474                                 return elem.textContent;\r
4475                         } else {\r
4476                                 // Traverse its children\r
4477                                 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r
4478                                         ret += getText( elem );\r
4479                                 }\r
4480                         }\r
4481                 } else if ( nodeType === 3 || nodeType === 4 ) {\r
4482                         return elem.nodeValue;\r
4483                 }\r
4484                 // Do not include comment or processing instruction nodes\r
4485         } else {\r
4486 \r
4487                 // If no nodeType, this is expected to be an array\r
4488                 for ( ; (node = elem[i]); i++ ) {\r
4489                         // Do not traverse comment nodes\r
4490                         ret += getText( node );\r
4491                 }\r
4492         }\r
4493         return ret;\r
4494 };\r
4495 \r
4496 Sizzle.attr = function( elem, name ) {\r
4497         var attr,\r
4498                 xml = isXML( elem );\r
4499 \r
4500         if ( !xml ) {\r
4501                 name = name.toLowerCase();\r
4502         }\r
4503         if ( Expr.attrHandle[ name ] ) {\r
4504                 return Expr.attrHandle[ name ]( elem );\r
4505         }\r
4506         if ( assertAttributes || xml ) {\r
4507                 return elem.getAttribute( name );\r
4508         }\r
4509         attr = elem.getAttributeNode( name );\r
4510         return attr ?\r
4511                 typeof elem[ name ] === "boolean" ?\r
4512                         elem[ name ] ? name : null :\r
4513                         attr.specified ? attr.value : null :\r
4514                 null;\r
4515 };\r
4516 \r
4517 Sizzle.error = function( msg ) {\r
4518         throw new Error( "Syntax error, unrecognized expression: " + msg );\r
4519 };\r
4520 \r
4521 // Check if the JavaScript engine is using some sort of\r
4522 // optimization where it does not always call our comparision\r
4523 // function. If that is the case, discard the hasDuplicate value.\r
4524 //   Thus far that includes Google Chrome.\r
4525 [0, 0].sort(function() {\r
4526         return (baseHasDuplicate = 0);\r
4527 });\r
4528 \r
4529 \r
4530 if ( docElem.compareDocumentPosition ) {\r
4531         sortOrder = function( a, b ) {\r
4532                 if ( a === b ) {\r
4533                         hasDuplicate = true;\r
4534                         return 0;\r
4535                 }\r
4536 \r
4537                 return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?\r
4538                         a.compareDocumentPosition :\r
4539                         a.compareDocumentPosition(b) & 4\r
4540                 ) ? -1 : 1;\r
4541         };\r
4542 \r
4543 } else {\r
4544         sortOrder = function( a, b ) {\r
4545                 // The nodes are identical, we can exit early\r
4546                 if ( a === b ) {\r
4547                         hasDuplicate = true;\r
4548                         return 0;\r
4549 \r
4550                 // Fallback to using sourceIndex (in IE) if it's available on both nodes\r
4551                 } else if ( a.sourceIndex && b.sourceIndex ) {\r
4552                         return a.sourceIndex - b.sourceIndex;\r
4553                 }\r
4554 \r
4555                 var al, bl,\r
4556                         ap = [],\r
4557                         bp = [],\r
4558                         aup = a.parentNode,\r
4559                         bup = b.parentNode,\r
4560                         cur = aup;\r
4561 \r
4562                 // If the nodes are siblings (or identical) we can do a quick check\r
4563                 if ( aup === bup ) {\r
4564                         return siblingCheck( a, b );\r
4565 \r
4566                 // If no parents were found then the nodes are disconnected\r
4567                 } else if ( !aup ) {\r
4568                         return -1;\r
4569 \r
4570                 } else if ( !bup ) {\r
4571                         return 1;\r
4572                 }\r
4573 \r
4574                 // Otherwise they're somewhere else in the tree so we need\r
4575                 // to build up a full list of the parentNodes for comparison\r
4576                 while ( cur ) {\r
4577                         ap.unshift( cur );\r
4578                         cur = cur.parentNode;\r
4579                 }\r
4580 \r
4581                 cur = bup;\r
4582 \r
4583                 while ( cur ) {\r
4584                         bp.unshift( cur );\r
4585                         cur = cur.parentNode;\r
4586                 }\r
4587 \r
4588                 al = ap.length;\r
4589                 bl = bp.length;\r
4590 \r
4591                 // Start walking down the tree looking for a discrepancy\r
4592                 for ( var i = 0; i < al && i < bl; i++ ) {\r
4593                         if ( ap[i] !== bp[i] ) {\r
4594                                 return siblingCheck( ap[i], bp[i] );\r
4595                         }\r
4596                 }\r
4597 \r
4598                 // We ended someplace up the tree so do a sibling check\r
4599                 return i === al ?\r
4600                         siblingCheck( a, bp[i], -1 ) :\r
4601                         siblingCheck( ap[i], b, 1 );\r
4602         };\r
4603 \r
4604         siblingCheck = function( a, b, ret ) {\r
4605                 if ( a === b ) {\r
4606                         return ret;\r
4607                 }\r
4608 \r
4609                 var cur = a.nextSibling;\r
4610 \r
4611                 while ( cur ) {\r
4612                         if ( cur === b ) {\r
4613                                 return -1;\r
4614                         }\r
4615 \r
4616                         cur = cur.nextSibling;\r
4617                 }\r
4618 \r
4619                 return 1;\r
4620         };\r
4621 }\r
4622 \r
4623 // Document sorting and removing duplicates\r
4624 Sizzle.uniqueSort = function( results ) {\r
4625         var elem,\r
4626                 i = 1;\r
4627 \r
4628         if ( sortOrder ) {\r
4629                 hasDuplicate = baseHasDuplicate;\r
4630                 results.sort( sortOrder );\r
4631 \r
4632                 if ( hasDuplicate ) {\r
4633                         for ( ; (elem = results[i]); i++ ) {\r
4634                                 if ( elem === results[ i - 1 ] ) {\r
4635                                         results.splice( i--, 1 );\r
4636                                 }\r
4637                         }\r
4638                 }\r
4639         }\r
4640 \r
4641         return results;\r
4642 };\r
4643 \r
4644 function multipleContexts( selector, contexts, results, seed ) {\r
4645         var i = 0,\r
4646                 len = contexts.length;\r
4647         for ( ; i < len; i++ ) {\r
4648                 Sizzle( selector, contexts[i], results, seed );\r
4649         }\r
4650 }\r
4651 \r
4652 function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) {\r
4653         var results,\r
4654                 fn = Expr.setFilters[ posfilter.toLowerCase() ];\r
4655 \r
4656         if ( !fn ) {\r
4657                 Sizzle.error( posfilter );\r
4658         }\r
4659 \r
4660         if ( selector || !(results = seed) ) {\r
4661                 multipleContexts( selector || "*", contexts, (results = []), seed );\r
4662         }\r
4663 \r
4664         return results.length > 0 ? fn( results, argument, not ) : [];\r
4665 }\r
4666 \r
4667 function handlePOS( selector, context, results, seed, groups ) {\r
4668         var match, not, anchor, ret, elements, currentContexts, part, lastIndex,\r
4669                 i = 0,\r
4670                 len = groups.length,\r
4671                 rpos = matchExpr["POS"],\r
4672                 // This is generated here in case matchExpr["POS"] is extended\r
4673                 rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ),\r
4674                 // This is for making sure non-participating\r
4675                 // matching groups are represented cross-browser (IE6-8)\r
4676                 setUndefined = function() {\r
4677                         var i = 1,\r
4678                                 len = arguments.length - 2;\r
4679                         for ( ; i < len; i++ ) {\r
4680                                 if ( arguments[i] === undefined ) {\r
4681                                         match[i] = undefined;\r
4682                                 }\r
4683                         }\r
4684                 };\r
4685 \r
4686         for ( ; i < len; i++ ) {\r
4687                 // Reset regex index to 0\r
4688                 rpos.exec("");\r
4689                 selector = groups[i];\r
4690                 ret = [];\r
4691                 anchor = 0;\r
4692                 elements = seed;\r
4693                 while ( (match = rpos.exec( selector )) ) {\r
4694                         lastIndex = rpos.lastIndex = match.index + match[0].length;\r
4695                         if ( lastIndex > anchor ) {\r
4696                                 part = selector.slice( anchor, match.index );\r
4697                                 anchor = lastIndex;\r
4698                                 currentContexts = [ context ];\r
4699 \r
4700                                 if ( rcombinators.test(part) ) {\r
4701                                         if ( elements ) {\r
4702                                                 currentContexts = elements;\r
4703                                         }\r
4704                                         elements = seed;\r
4705                                 }\r
4706 \r
4707                                 if ( (not = rendsWithNot.test( part )) ) {\r
4708                                         part = part.slice( 0, -5 ).replace( rcombinators, "$&*" );\r
4709                                 }\r
4710 \r
4711                                 if ( match.length > 1 ) {\r
4712                                         match[0].replace( rposgroups, setUndefined );\r
4713                                 }\r
4714                                 elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not );\r
4715                         }\r
4716                 }\r
4717 \r
4718                 if ( elements ) {\r
4719                         ret = ret.concat( elements );\r
4720 \r
4721                         if ( (part = selector.slice( anchor )) && part !== ")" ) {\r
4722                                 if ( rcombinators.test(part) ) {\r
4723                                         multipleContexts( part, ret, results, seed );\r
4724                                 } else {\r
4725                                         Sizzle( part, context, results, seed ? seed.concat(elements) : elements );\r
4726                                 }\r
4727                         } else {\r
4728                                 push.apply( results, ret );\r
4729                         }\r
4730                 } else {\r
4731                         Sizzle( selector, context, results, seed );\r
4732                 }\r
4733         }\r
4734 \r
4735         // Do not sort if this is a single filter\r
4736         return len === 1 ? results : Sizzle.uniqueSort( results );\r
4737 }\r
4738 \r
4739 function tokenize( selector, context, xml ) {\r
4740         var tokens, soFar, type,\r
4741                 groups = [],\r
4742                 i = 0,\r
4743 \r
4744                 // Catch obvious selector issues: terminal ")"; nonempty fallback match\r
4745                 // rselector never fails to match *something*\r
4746                 match = rselector.exec( selector ),\r
4747                 matched = !match.pop() && !match.pop(),\r
4748                 selectorGroups = matched && selector.match( rgroups ) || [""],\r
4749 \r
4750                 preFilters = Expr.preFilter,\r
4751                 filters = Expr.filter,\r
4752                 checkContext = !xml && context !== document;\r
4753 \r
4754         for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) {\r
4755                 groups.push( tokens = [] );\r
4756 \r
4757                 // Need to make sure we're within a narrower context if necessary\r
4758                 // Adding a descendant combinator will generate what is needed\r
4759                 if ( checkContext ) {\r
4760                         soFar = " " + soFar;\r
4761                 }\r
4762 \r
4763                 while ( soFar ) {\r
4764                         matched = false;\r
4765 \r
4766                         // Combinators\r
4767                         if ( (match = rcombinators.exec( soFar )) ) {\r
4768                                 soFar = soFar.slice( match[0].length );\r
4769 \r
4770                                 // Cast descendant combinators to space\r
4771                                 matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match });\r
4772                         }\r
4773 \r
4774                         // Filters\r
4775                         for ( type in filters ) {\r
4776                                 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r
4777                                         (match = preFilters[ type ]( match, context, xml )) ) ) {\r
4778 \r
4779                                         soFar = soFar.slice( match.shift().length );\r
4780                                         matched = tokens.push({ part: type, captures: match });\r
4781                                 }\r
4782                         }\r
4783 \r
4784                         if ( !matched ) {\r
4785                                 break;\r
4786                         }\r
4787                 }\r
4788         }\r
4789 \r
4790         if ( !matched ) {\r
4791                 Sizzle.error( selector );\r
4792         }\r
4793 \r
4794         return groups;\r
4795 }\r
4796 \r
4797 function addCombinator( matcher, combinator, context ) {\r
4798         var dir = combinator.dir,\r
4799                 doneName = done++;\r
4800 \r
4801         if ( !matcher ) {\r
4802                 // If there is no matcher to check, check against the context\r
4803                 matcher = function( elem ) {\r
4804                         return elem === context;\r
4805                 };\r
4806         }\r
4807         return combinator.first ?\r
4808                 function( elem, context ) {\r
4809                         while ( (elem = elem[ dir ]) ) {\r
4810                                 if ( elem.nodeType === 1 ) {\r
4811                                         return matcher( elem, context ) && elem;\r
4812                                 }\r
4813                         }\r
4814                 } :\r
4815                 function( elem, context ) {\r
4816                         var cache,\r
4817                                 dirkey = doneName + "." + dirruns,\r
4818                                 cachedkey = dirkey + "." + cachedruns;\r
4819                         while ( (elem = elem[ dir ]) ) {\r
4820                                 if ( elem.nodeType === 1 ) {\r
4821                                         if ( (cache = elem[ expando ]) === cachedkey ) {\r
4822                                                 return elem.sizset;\r
4823                                         } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {\r
4824                                                 if ( elem.sizset ) {\r
4825                                                         return elem;\r
4826                                                 }\r
4827                                         } else {\r
4828                                                 elem[ expando ] = cachedkey;\r
4829                                                 if ( matcher( elem, context ) ) {\r
4830                                                         elem.sizset = true;\r
4831                                                         return elem;\r
4832                                                 }\r
4833                                                 elem.sizset = false;\r
4834                                         }\r
4835                                 }\r
4836                         }\r
4837                 };\r
4838 }\r
4839 \r
4840 function addMatcher( higher, deeper ) {\r
4841         return higher ?\r
4842                 function( elem, context ) {\r
4843                         var result = deeper( elem, context );\r
4844                         return result && higher( result === true ? elem : result, context );\r
4845                 } :\r
4846                 deeper;\r
4847 }\r
4848 \r
4849 // ["TAG", ">", "ID", " ", "CLASS"]\r
4850 function matcherFromTokens( tokens, context, xml ) {\r
4851         var token, matcher,\r
4852                 i = 0;\r
4853 \r
4854         for ( ; (token = tokens[i]); i++ ) {\r
4855                 if ( Expr.relative[ token.part ] ) {\r
4856                         matcher = addCombinator( matcher, Expr.relative[ token.part ], context );\r
4857                 } else {\r
4858                         token.captures.push( context, xml );\r
4859                         matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) );\r
4860                 }\r
4861         }\r
4862 \r
4863         return matcher;\r
4864 }\r
4865 \r
4866 function matcherFromGroupMatchers( matchers ) {\r
4867         return function( elem, context ) {\r
4868                 var matcher,\r
4869                         j = 0;\r
4870                 for ( ; (matcher = matchers[j]); j++ ) {\r
4871                         if ( matcher(elem, context) ) {\r
4872                                 return true;\r
4873                         }\r
4874                 }\r
4875                 return false;\r
4876         };\r
4877 }\r
4878 \r
4879 var compile = Sizzle.compile = function( selector, context, xml ) {\r
4880         var tokens, group, i,\r
4881                 cached = compilerCache[ selector ];\r
4882 \r
4883         // Return a cached group function if already generated (context dependent)\r
4884         if ( cached && cached.context === context ) {\r
4885                 return cached;\r
4886         }\r
4887 \r
4888         // Generate a function of recursive functions that can be used to check each element\r
4889         group = tokenize( selector, context, xml );\r
4890         for ( i = 0; (tokens = group[i]); i++ ) {\r
4891                 group[i] = matcherFromTokens( tokens, context, xml );\r
4892         }\r
4893 \r
4894         // Cache the compiled function\r
4895         cached = compilerCache[ selector ] = matcherFromGroupMatchers( group );\r
4896         cached.context = context;\r
4897         cached.runs = cached.dirruns = 0;\r
4898         cachedSelectors.push( selector );\r
4899         // Ensure only the most recent are cached\r
4900         if ( cachedSelectors.length > Expr.cacheLength ) {\r
4901                 delete compilerCache[ cachedSelectors.shift() ];\r
4902         }\r
4903         return cached;\r
4904 };\r
4905 \r
4906 Sizzle.matches = function( expr, elements ) {\r
4907         return Sizzle( expr, null, null, elements );\r
4908 };\r
4909 \r
4910 Sizzle.matchesSelector = function( elem, expr ) {\r
4911         return Sizzle( expr, null, null, [ elem ] ).length > 0;\r
4912 };\r
4913 \r
4914 var select = function( selector, context, results, seed, xml ) {\r
4915         // Remove excessive whitespace\r
4916         selector = selector.replace( rtrim, "$1" );\r
4917         var elements, matcher, i, len, elem, token,\r
4918                 type, findContext, notTokens,\r
4919                 match = selector.match( rgroups ),\r
4920                 tokens = selector.match( rtokens ),\r
4921                 contextNodeType = context.nodeType;\r
4922 \r
4923         // POS handling\r
4924         if ( matchExpr["POS"].test(selector) ) {\r
4925                 return handlePOS( selector, context, results, seed, match );\r
4926         }\r
4927 \r
4928         if ( seed ) {\r
4929                 elements = slice.call( seed, 0 );\r
4930 \r
4931         // To maintain document order, only narrow the\r
4932         // set if there is one group\r
4933         } else if ( match && match.length === 1 ) {\r
4934 \r
4935                 // Take a shortcut and set the context if the root selector is an ID\r
4936                 if ( tokens.length > 1 && contextNodeType === 9 && !xml &&\r
4937                                 (match = matchExpr["ID"].exec( tokens[0] )) ) {\r
4938 \r
4939                         context = Expr.find["ID"]( match[1], context, xml )[0];\r
4940                         if ( !context ) {\r
4941                                 return results;\r
4942                         }\r
4943 \r
4944                         selector = selector.slice( tokens.shift().length );\r
4945                 }\r
4946 \r
4947                 findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context;\r
4948 \r
4949                 // Get the last token, excluding :not\r
4950                 notTokens = tokens.pop();\r
4951                 token = notTokens.split(":not")[0];\r
4952 \r
4953                 for ( i = 0, len = Expr.order.length; i < len; i++ ) {\r
4954                         type = Expr.order[i];\r
4955 \r
4956                         if ( (match = matchExpr[ type ].exec( token )) ) {\r
4957                                 elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml );\r
4958 \r
4959                                 if ( elements == null ) {\r
4960                                         continue;\r
4961                                 }\r
4962 \r
4963                                 if ( token === notTokens ) {\r
4964                                         selector = selector.slice( 0, selector.length - notTokens.length ) +\r
4965                                                 token.replace( matchExpr[ type ], "" );\r
4966 \r
4967                                         if ( !selector ) {\r
4968                                                 push.apply( results, slice.call(elements, 0) );\r
4969                                         }\r
4970                                 }\r
4971                                 break;\r
4972                         }\r
4973                 }\r
4974         }\r
4975 \r
4976         // Only loop over the given elements once\r
4977         // If selector is empty, we're already done\r
4978         if ( selector ) {\r
4979                 matcher = compile( selector, context, xml );\r
4980                 dirruns = matcher.dirruns++;\r
4981 \r
4982                 if ( elements == null ) {\r
4983                         elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context );\r
4984                 }\r
4985                 for ( i = 0; (elem = elements[i]); i++ ) {\r
4986                         cachedruns = matcher.runs++;\r
4987                         if ( matcher(elem, context) ) {\r
4988                                 results.push( elem );\r
4989                         }\r
4990                 }\r
4991         }\r
4992 \r
4993         return results;\r
4994 };\r
4995 \r
4996 if ( document.querySelectorAll ) {\r
4997         (function() {\r
4998                 var disconnectedMatch,\r
4999                         oldSelect = select,\r
5000                         rescape = /'|\\/g,\r
5001                         rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,\r
5002                         rbuggyQSA = [],\r
5003                         // matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r
5004                         // A support test would require too much code (would include document ready)\r
5005                         // just skip matchesSelector for :active\r
5006                         rbuggyMatches = [":active"],\r
5007                         matches = docElem.matchesSelector ||\r
5008                                 docElem.mozMatchesSelector ||\r
5009                                 docElem.webkitMatchesSelector ||\r
5010                                 docElem.oMatchesSelector ||\r
5011                                 docElem.msMatchesSelector;\r
5012 \r
5013                 // Build QSA regex\r
5014                 // Regex strategy adopted from Diego Perini\r
5015                 assert(function( div ) {\r
5016                         div.innerHTML = "<select><option selected></option></select>";\r
5017 \r
5018                         // IE8 - Some boolean attributes are not treated correctly\r
5019                         if ( !div.querySelectorAll("[selected]").length ) {\r
5020                                 rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );\r
5021                         }\r
5022 \r
5023                         // Webkit/Opera - :checked should return selected option elements\r
5024                         // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r
5025                         // IE8 throws error here (do not put tests after this one)\r
5026                         if ( !div.querySelectorAll(":checked").length ) {\r
5027                                 rbuggyQSA.push(":checked");\r
5028                         }\r
5029                 });\r
5030 \r
5031                 assert(function( div ) {\r
5032 \r
5033                         // Opera 10-12/IE9 - ^= $= *= and empty values\r
5034                         // Should not select anything\r
5035                         div.innerHTML = "<p test=''></p>";\r
5036                         if ( div.querySelectorAll("[test^='']").length ) {\r
5037                                 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );\r
5038                         }\r
5039 \r
5040                         // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\r
5041                         // IE8 throws error here (do not put tests after this one)\r
5042                         div.innerHTML = "<input type='hidden'>";\r
5043                         if ( !div.querySelectorAll(":enabled").length ) {\r
5044                                 rbuggyQSA.push(":enabled", ":disabled");\r
5045                         }\r
5046                 });\r
5047 \r
5048                 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );\r
5049 \r
5050                 select = function( selector, context, results, seed, xml ) {\r
5051                         // Only use querySelectorAll when not filtering,\r
5052                         // when this is not xml,\r
5053                         // and when no QSA bugs apply\r
5054                         if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\r
5055                                 if ( context.nodeType === 9 ) {\r
5056                                         try {\r
5057                                                 push.apply( results, slice.call(context.querySelectorAll( selector ), 0) );\r
5058                                                 return results;\r
5059                                         } catch(qsaError) {}\r
5060                                 // qSA works strangely on Element-rooted queries\r
5061                                 // We can work around this by specifying an extra ID on the root\r
5062                                 // and working up from there (Thanks to Andrew Dupont for the technique)\r
5063                                 // IE 8 doesn't work on object elements\r
5064                                 } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {\r
5065                                         var old = context.getAttribute("id"),\r
5066                                                 nid = old || expando,\r
5067                                                 newContext = rsibling.test( selector ) && context.parentNode || context;\r
5068 \r
5069                                         if ( old ) {\r
5070                                                 nid = nid.replace( rescape, "\\$&" );\r
5071                                         } else {\r
5072                                                 context.setAttribute( "id", nid );\r
5073                                         }\r
5074 \r
5075                                         try {\r
5076                                                 push.apply( results, slice.call( newContext.querySelectorAll(\r
5077                                                         selector.replace( rgroups, "[id='" + nid + "'] $&" )\r
5078                                                 ), 0 ) );\r
5079                                                 return results;\r
5080                                         } catch(qsaError) {\r
5081                                         } finally {\r
5082                                                 if ( !old ) {\r
5083                                                         context.removeAttribute("id");\r
5084                                                 }\r
5085                                         }\r
5086                                 }\r
5087                         }\r
5088 \r
5089                         return oldSelect( selector, context, results, seed, xml );\r
5090                 };\r
5091 \r
5092                 if ( matches ) {\r
5093                         assert(function( div ) {\r
5094                                 // Check to see if it's possible to do matchesSelector\r
5095                                 // on a disconnected node (IE 9)\r
5096                                 disconnectedMatch = matches.call( div, "div" );\r
5097 \r
5098                                 // This should fail with an exception\r
5099                                 // Gecko does not error, returns false instead\r
5100                                 try {\r
5101                                         matches.call( div, "[test!='']:sizzle" );\r
5102                                         rbuggyMatches.push( Expr.match.PSEUDO );\r
5103                                 } catch ( e ) {}\r
5104                         });\r
5105 \r
5106                         // rbuggyMatches always contains :active, so no need for a length check\r
5107                         rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );\r
5108 \r
5109                         Sizzle.matchesSelector = function( elem, expr ) {\r
5110                                 // Make sure that attribute selectors are quoted\r
5111                                 expr = expr.replace( rattributeQuotes, "='$1']" );\r
5112 \r
5113                                 // rbuggyMatches always contains :active, so no need for an existence check\r
5114                                 if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) {\r
5115                                         try {\r
5116                                                 var ret = matches.call( elem, expr );\r
5117 \r
5118                                                 // IE 9's matchesSelector returns false on disconnected nodes\r
5119                                                 if ( ret || disconnectedMatch ||\r
5120                                                                 // As well, disconnected nodes are said to be in a document\r
5121                                                                 // fragment in IE 9\r
5122                                                                 elem.document && elem.document.nodeType !== 11 ) {\r
5123                                                         return ret;\r
5124                                                 }\r
5125                                         } catch(e) {}\r
5126                                 }\r
5127 \r
5128                                 return Sizzle( expr, null, null, [ elem ] ).length > 0;\r
5129                         };\r
5130                 }\r
5131         })();\r
5132 }\r
5133 \r
5134 // Override sizzle attribute retrieval
5135 Sizzle.attr = jQuery.attr;
5136 jQuery.find = Sizzle;
5137 jQuery.expr = Sizzle.selectors;
5138 jQuery.expr[":"] = jQuery.expr.pseudos;
5139 jQuery.unique = Sizzle.uniqueSort;
5140 jQuery.text = Sizzle.getText;
5141 jQuery.isXMLDoc = Sizzle.isXML;
5142 jQuery.contains = Sizzle.contains;
5143 \r
5144 \r
5145 })( window );\r
5146 var runtil = /Until$/,
5147         rparentsprev = /^(?:parents|prev(?:Until|All))/,
5148         isSimple = /^.[^:#\[\.,]*$/,
5149         rneedsContext = jQuery.expr.match.needsContext,
5150         // methods guaranteed to produce a unique set when starting from a unique set
5151         guaranteedUnique = {
5152                 children: true,
5153                 contents: true,
5154                 next: true,
5155                 prev: true
5156         };
5157
5158 jQuery.fn.extend({
5159         find: function( selector ) {
5160                 var i, l, length, n, r, ret,
5161                         self = this;
5162
5163                 if ( typeof selector !== "string" ) {
5164                         return jQuery( selector ).filter(function() {
5165                                 for ( i = 0, l = self.length; i < l; i++ ) {
5166                                         if ( jQuery.contains( self[ i ], this ) ) {
5167                                                 return true;
5168                                         }
5169                                 }
5170                         });
5171                 }
5172
5173                 ret = this.pushStack( "", "find", selector );
5174
5175                 for ( i = 0, l = this.length; i < l; i++ ) {
5176                         length = ret.length;
5177                         jQuery.find( selector, this[i], ret );
5178
5179                         if ( i > 0 ) {
5180                                 // Make sure that the results are unique
5181                                 for ( n = length; n < ret.length; n++ ) {
5182                                         for ( r = 0; r < length; r++ ) {
5183                                                 if ( ret[r] === ret[n] ) {
5184                                                         ret.splice(n--, 1);
5185                                                         break;
5186                                                 }
5187                                         }
5188                                 }
5189                         }
5190                 }
5191
5192                 return ret;
5193         },
5194
5195         has: function( target ) {
5196                 var i,
5197                         targets = jQuery( target, this ),
5198                         len = targets.length;
5199
5200                 return this.filter(function() {
5201                         for ( i = 0; i < len; i++ ) {
5202                                 if ( jQuery.contains( this, targets[i] ) ) {
5203                                         return true;
5204                                 }
5205                         }
5206                 });
5207         },
5208
5209         not: function( selector ) {
5210                 return this.pushStack( winnow(this, selector, false), "not", selector);
5211         },
5212
5213         filter: function( selector ) {
5214                 return this.pushStack( winnow(this, selector, true), "filter", selector );
5215         },
5216
5217         is: function( selector ) {
5218                 return !!selector && (
5219                         typeof selector === "string" ?
5220                                 // If this is a positional/relative selector, check membership in the returned set
5221                                 // so $("p:first").is("p:last") won't return true for a doc with two "p".
5222                                 rneedsContext.test( selector ) ?
5223                                         jQuery( selector, this.context ).index( this[0] ) >= 0 :
5224                                         jQuery.filter( selector, this ).length > 0 :
5225                                 this.filter( selector ).length > 0 );
5226         },
5227
5228         closest: function( selectors, context ) {
5229                 var cur,
5230                         i = 0,
5231                         l = this.length,
5232                         ret = [],
5233                         pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
5234                                 jQuery( selectors, context || this.context ) :
5235                                 0;
5236
5237                 for ( ; i < l; i++ ) {
5238                         cur = this[i];
5239
5240                         while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
5241                                 if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
5242                                         ret.push( cur );
5243                                         break;
5244                                 }
5245                                 cur = cur.parentNode;
5246                         }
5247                 }
5248
5249                 ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
5250
5251                 return this.pushStack( ret, "closest", selectors );
5252         },
5253
5254         // Determine the position of an element within
5255         // the matched set of elements
5256         index: function( elem ) {
5257
5258                 // No argument, return index in parent
5259                 if ( !elem ) {
5260                         return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
5261                 }
5262
5263                 // index in selector
5264                 if ( typeof elem === "string" ) {
5265                         return jQuery.inArray( this[0], jQuery( elem ) );
5266                 }
5267
5268                 // Locate the position of the desired element
5269                 return jQuery.inArray(
5270                         // If it receives a jQuery object, the first element is used
5271                         elem.jquery ? elem[0] : elem, this );
5272         },
5273
5274         add: function( selector, context ) {
5275                 var set = typeof selector === "string" ?
5276                                 jQuery( selector, context ) :
5277                                 jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5278                         all = jQuery.merge( this.get(), set );
5279
5280                 return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
5281                         all :
5282                         jQuery.unique( all ) );
5283         },
5284
5285         addBack: function( selector ) {
5286                 return this.add( selector == null ?
5287                         this.prevObject : this.prevObject.filter(selector)
5288                 );
5289         }
5290 });
5291
5292 jQuery.fn.andSelf = jQuery.fn.addBack;
5293
5294 // A painfully simple check to see if an element is disconnected
5295 // from a document (should be improved, where feasible).
5296 function isDisconnected( node ) {
5297         return !node || !node.parentNode || node.parentNode.nodeType === 11;
5298 }
5299
5300 function sibling( cur, dir ) {
5301         do {
5302                 cur = cur[ dir ];
5303         } while ( cur && cur.nodeType !== 1 );
5304
5305         return cur;
5306 }
5307
5308 jQuery.each({
5309         parent: function( elem ) {
5310                 var parent = elem.parentNode;
5311                 return parent && parent.nodeType !== 11 ? parent : null;
5312         },
5313         parents: function( elem ) {
5314                 return jQuery.dir( elem, "parentNode" );
5315         },
5316         parentsUntil: function( elem, i, until ) {
5317                 return jQuery.dir( elem, "parentNode", until );
5318         },
5319         next: function( elem ) {
5320                 return sibling( elem, "nextSibling" );
5321         },
5322         prev: function( elem ) {
5323                 return sibling( elem, "previousSibling" );
5324         },
5325         nextAll: function( elem ) {
5326                 return jQuery.dir( elem, "nextSibling" );
5327         },
5328         prevAll: function( elem ) {
5329                 return jQuery.dir( elem, "previousSibling" );
5330         },
5331         nextUntil: function( elem, i, until ) {
5332                 return jQuery.dir( elem, "nextSibling", until );
5333         },
5334         prevUntil: function( elem, i, until ) {
5335                 return jQuery.dir( elem, "previousSibling", until );
5336         },
5337         siblings: function( elem ) {
5338                 return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
5339         },
5340         children: function( elem ) {
5341                 return jQuery.sibling( elem.firstChild );
5342         },
5343         contents: function( elem ) {
5344                 return jQuery.nodeName( elem, "iframe" ) ?
5345                         elem.contentDocument || elem.contentWindow.document :
5346                         jQuery.merge( [], elem.childNodes );
5347         }
5348 }, function( name, fn ) {
5349         jQuery.fn[ name ] = function( until, selector ) {
5350                 var ret = jQuery.map( this, fn, until );
5351
5352                 if ( !runtil.test( name ) ) {
5353                         selector = until;
5354                 }
5355
5356                 if ( selector && typeof selector === "string" ) {
5357                         ret = jQuery.filter( selector, ret );
5358                 }
5359
5360                 ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
5361
5362                 if ( this.length > 1 && rparentsprev.test( name ) ) {
5363                         ret = ret.reverse();
5364                 }
5365
5366                 return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
5367         };
5368 });
5369
5370 jQuery.extend({
5371         filter: function( expr, elems, not ) {
5372                 if ( not ) {
5373                         expr = ":not(" + expr + ")";
5374                 }
5375
5376                 return elems.length === 1 ?
5377                         jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
5378                         jQuery.find.matches(expr, elems);
5379         },
5380
5381         dir: function( elem, dir, until ) {
5382                 var matched = [],
5383                         cur = elem[ dir ];
5384
5385                 while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
5386                         if ( cur.nodeType === 1 ) {
5387                                 matched.push( cur );
5388                         }
5389                         cur = cur[dir];
5390                 }
5391                 return matched;
5392         },
5393
5394         sibling: function( n, elem ) {
5395                 var r = [];
5396
5397                 for ( ; n; n = n.nextSibling ) {
5398                         if ( n.nodeType === 1 && n !== elem ) {
5399                                 r.push( n );
5400                         }
5401                 }
5402
5403                 return r;
5404         }
5405 });
5406
5407 // Implement the identical functionality for filter and not
5408 function winnow( elements, qualifier, keep ) {
5409
5410         // Can't pass null or undefined to indexOf in Firefox 4
5411         // Set to 0 to skip string check
5412         qualifier = qualifier || 0;
5413
5414         if ( jQuery.isFunction( qualifier ) ) {
5415                 return jQuery.grep(elements, function( elem, i ) {
5416                         var retVal = !!qualifier.call( elem, i, elem );
5417                         return retVal === keep;
5418                 });
5419
5420         } else if ( qualifier.nodeType ) {
5421                 return jQuery.grep(elements, function( elem, i ) {
5422                         return ( elem === qualifier ) === keep;
5423                 });
5424
5425         } else if ( typeof qualifier === "string" ) {
5426                 var filtered = jQuery.grep(elements, function( elem ) {
5427                         return elem.nodeType === 1;
5428                 });
5429
5430                 if ( isSimple.test( qualifier ) ) {
5431                         return jQuery.filter(qualifier, filtered, !keep);
5432                 } else {
5433                         qualifier = jQuery.filter( qualifier, filtered );
5434                 }
5435         }
5436
5437         return jQuery.grep(elements, function( elem, i ) {
5438                 return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
5439         });
5440 }
5441 function createSafeFragment( document ) {
5442         var list = nodeNames.split( "|" ),
5443         safeFrag = document.createDocumentFragment();
5444
5445         if ( safeFrag.createElement ) {
5446                 while ( list.length ) {
5447                         safeFrag.createElement(
5448                                 list.pop()
5449                         );
5450                 }
5451         }
5452         return safeFrag;
5453 }
5454
5455 var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
5456                 "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
5457         rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
5458         rleadingWhitespace = /^\s+/,
5459         rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
5460         rtagName = /<([\w:]+)/,
5461         rtbody = /<tbody/i,
5462         rhtml = /<|&#?\w+;/,
5463         rnoInnerhtml = /<(?:script|style|link)/i,
5464         rnocache = /<(?:script|object|embed|option|style)/i,
5465         rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
5466         rcheckableType = /^(?:checkbox|radio)$/,
5467         // checked="checked" or checked
5468         rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5469         rscriptType = /\/(java|ecma)script/i,
5470         rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
5471         wrapMap = {
5472                 option: [ 1, "<select multiple='multiple'>", "</select>" ],
5473                 legend: [ 1, "<fieldset>", "</fieldset>" ],
5474                 thead: [ 1, "<table>", "</table>" ],
5475                 tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5476                 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5477                 col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
5478                 area: [ 1, "<map>", "</map>" ],
5479                 _default: [ 0, "", "" ]
5480         },
5481         safeFragment = createSafeFragment( document ),
5482         fragmentDiv = safeFragment.appendChild( document.createElement("div") );
5483
5484 wrapMap.optgroup = wrapMap.option;
5485 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5486 wrapMap.th = wrapMap.td;
5487
5488 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
5489 // unless wrapped in a div with non-breaking characters in front of it.
5490 if ( !jQuery.support.htmlSerialize ) {
5491         wrapMap._default = [ 1, "X<div>", "</div>" ];
5492 }
5493
5494 jQuery.fn.extend({
5495         text: function( value ) {
5496                 return jQuery.access( this, function( value ) {
5497                         return value === undefined ?
5498                                 jQuery.text( this ) :
5499                                 this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
5500                 }, null, value, arguments.length );
5501         },
5502
5503         wrapAll: function( html ) {
5504                 if ( jQuery.isFunction( html ) ) {
5505                         return this.each(function(i) {
5506                                 jQuery(this).wrapAll( html.call(this, i) );
5507                         });
5508                 }
5509
5510                 if ( this[0] ) {
5511                         // The elements to wrap the target around
5512                         var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
5513
5514                         if ( this[0].parentNode ) {
5515                                 wrap.insertBefore( this[0] );
5516                         }
5517
5518                         wrap.map(function() {
5519                                 var elem = this;
5520
5521                                 while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
5522                                         elem = elem.firstChild;
5523                                 }
5524
5525                                 return elem;
5526                         }).append( this );
5527                 }
5528
5529                 return this;
5530         },
5531
5532         wrapInner: function( html ) {
5533                 if ( jQuery.isFunction( html ) ) {
5534                         return this.each(function(i) {
5535                                 jQuery(this).wrapInner( html.call(this, i) );
5536                         });
5537                 }
5538
5539                 return this.each(function() {
5540                         var self = jQuery( this ),
5541                                 contents = self.contents();
5542
5543                         if ( contents.length ) {
5544                                 contents.wrapAll( html );
5545
5546                         } else {
5547                                 self.append( html );
5548                         }
5549                 });
5550         },
5551
5552         wrap: function( html ) {
5553                 var isFunction = jQuery.isFunction( html );
5554
5555                 return this.each(function(i) {
5556                         jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
5557                 });
5558         },
5559
5560         unwrap: function() {
5561                 return this.parent().each(function() {
5562                         if ( !jQuery.nodeName( this, "body" ) ) {
5563                                 jQuery( this ).replaceWith( this.childNodes );
5564                         }
5565                 }).end();
5566         },
5567
5568         append: function() {
5569                 return this.domManip(arguments, true, function( elem ) {
5570                         if ( this.nodeType === 1 || this.nodeType === 11 ) {
5571                                 this.appendChild( elem );
5572                         }
5573                 });
5574         },
5575
5576         prepend: function() {
5577                 return this.domManip(arguments, true, function( elem ) {
5578                         if ( this.nodeType === 1 || this.nodeType === 11 ) {
5579                                 this.insertBefore( elem, this.firstChild );
5580                         }
5581                 });
5582         },
5583
5584         before: function() {
5585                 if ( !isDisconnected( this[0] ) ) {
5586                         return this.domManip(arguments, false, function( elem ) {
5587                                 this.parentNode.insertBefore( elem, this );
5588                         });
5589                 }
5590
5591                 if ( arguments.length ) {
5592                         var set = jQuery.clean( arguments );
5593                         return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
5594                 }
5595         },
5596
5597         after: function() {
5598                 if ( !isDisconnected( this[0] ) ) {
5599                         return this.domManip(arguments, false, function( elem ) {
5600                                 this.parentNode.insertBefore( elem, this.nextSibling );
5601                         });
5602                 }
5603
5604                 if ( arguments.length ) {
5605                         var set = jQuery.clean( arguments );
5606                         return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
5607                 }
5608         },
5609
5610         // keepData is for internal use only--do not document
5611         remove: function( selector, keepData ) {
5612                 var elem,
5613                         i = 0;
5614
5615                 for ( ; (elem = this[i]) != null; i++ ) {
5616                         if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
5617                                 if ( !keepData && elem.nodeType === 1 ) {
5618                                         jQuery.cleanData( elem.getElementsByTagName("*") );
5619                                         jQuery.cleanData( [ elem ] );
5620                                 }
5621
5622                                 if ( elem.parentNode ) {
5623                                         elem.parentNode.removeChild( elem );
5624                                 }
5625                         }
5626                 }
5627
5628                 return this;
5629         },
5630
5631         empty: function() {
5632                 var elem,
5633                         i = 0;
5634
5635                 for ( ; (elem = this[i]) != null; i++ ) {
5636                         // Remove element nodes and prevent memory leaks
5637                         if ( elem.nodeType === 1 ) {
5638                                 jQuery.cleanData( elem.getElementsByTagName("*") );
5639                         }
5640
5641                         // Remove any remaining nodes
5642                         while ( elem.firstChild ) {
5643                                 elem.removeChild( elem.firstChild );
5644                         }
5645                 }
5646
5647                 return this;
5648         },
5649
5650         clone: function( dataAndEvents, deepDataAndEvents ) {
5651                 dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5652                 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5653
5654                 return this.map( function () {
5655                         return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
5656                 });
5657         },
5658
5659         html: function( value ) {
5660                 return jQuery.access( this, function( value ) {
5661                         var elem = this[0] || {},
5662                                 i = 0,
5663                                 l = this.length;
5664
5665                         if ( value === undefined ) {
5666                                 return elem.nodeType === 1 ?
5667                                         elem.innerHTML.replace( rinlinejQuery, "" ) :
5668                                         undefined;
5669                         }
5670
5671                         // See if we can take a shortcut and just use innerHTML
5672                         if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
5673                                 ( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
5674                                 ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
5675                                 !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
5676
5677                                 value = value.replace( rxhtmlTag, "<$1></$2>" );
5678
5679                                 try {
5680                                         for (; i < l; i++ ) {
5681                                                 // Remove element nodes and prevent memory leaks
5682                                                 elem = this[i] || {};
5683                                                 if ( elem.nodeType === 1 ) {
5684                                                         jQuery.cleanData( elem.getElementsByTagName( "*" ) );
5685                                                         elem.innerHTML = value;
5686                                                 }
5687                                         }
5688
5689                                         elem = 0;
5690
5691                                 // If using innerHTML throws an exception, use the fallback method
5692                                 } catch(e) {}
5693                         }
5694
5695                         if ( elem ) {
5696                                 this.empty().append( value );
5697                         }
5698                 }, null, value, arguments.length );
5699         },
5700
5701         replaceWith: function( value ) {
5702                 if ( !isDisconnected( this[0] ) ) {
5703                         // Make sure that the elements are removed from the DOM before they are inserted
5704                         // this can help fix replacing a parent with child elements
5705                         if ( jQuery.isFunction( value ) ) {
5706                                 return this.each(function(i) {
5707                                         var self = jQuery(this), old = self.html();
5708                                         self.replaceWith( value.call( this, i, old ) );
5709                                 });
5710                         }
5711
5712                         if ( typeof value !== "string" ) {
5713                                 value = jQuery( value ).detach();
5714                         }
5715
5716                         return this.each(function() {
5717                                 var next = this.nextSibling,
5718                                         parent = this.parentNode;
5719
5720                                 jQuery( this ).remove();
5721
5722                                 if ( next ) {
5723                                         jQuery(next).before( value );
5724                                 } else {
5725                                         jQuery(parent).append( value );
5726                                 }
5727                         });
5728                 }
5729
5730                 return this.length ?
5731                         this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
5732                         this;
5733         },
5734
5735         detach: function( selector ) {
5736                 return this.remove( selector, true );
5737         },
5738
5739         domManip: function( args, table, callback ) {
5740
5741                 // Flatten any nested arrays
5742                 args = [].concat.apply( [], args );
5743
5744                 var results, first, fragment, iNoClone,
5745                         i = 0,
5746                         value = args[0],
5747                         scripts = [],
5748                         l = this.length;
5749
5750                 // We can't cloneNode fragments that contain checked, in WebKit
5751                 if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) {
5752                         return this.each(function() {
5753                                 jQuery(this).domManip( args, table, callback );
5754                         });
5755                 }
5756
5757                 if ( jQuery.isFunction(value) ) {
5758                         return this.each(function(i) {
5759                                 var self = jQuery(this);
5760                                 args[0] = value.call( this, i, table ? self.html() : undefined );
5761                                 self.domManip( args, table, callback );
5762                         });
5763                 }
5764
5765                 if ( this[0] ) {
5766                         results = jQuery.buildFragment( args, this, scripts );
5767                         fragment = results.fragment;
5768                         first = fragment.firstChild;
5769
5770                         if ( fragment.childNodes.length === 1 ) {
5771                                 fragment = first;
5772                         }
5773
5774                         if ( first ) {
5775                                 table = table && jQuery.nodeName( first, "tr" );
5776
5777                                 // Use the original fragment for the last item instead of the first because it can end up
5778                                 // being emptied incorrectly in certain situations (#8070).
5779                                 // Fragments from the fragment cache must always be cloned and never used in place.
5780                                 for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) {
5781                                         callback.call(
5782                                                 table && jQuery.nodeName( this[i], "table" ) ?
5783                                                         findOrAppend( this[i], "tbody" ) :
5784                                                         this[i],
5785                                                 i === iNoClone ?
5786                                                         fragment :
5787                                                         jQuery.clone( fragment, true, true )
5788                                         );
5789                                 }
5790                         }
5791
5792                         // Fix #11809: Avoid leaking memory
5793                         fragment = first = null;
5794
5795                         if ( scripts.length ) {
5796                                 jQuery.each( scripts, function( i, elem ) {
5797                                         if ( elem.src ) {
5798                                                 if ( jQuery.ajax ) {
5799                                                         jQuery.ajax({
5800                                                                 url: elem.src,
5801                                                                 type: "GET",
5802                                                                 dataType: "script",
5803                                                                 async: false,
5804                                                                 global: false,
5805                                                                 "throws": true
5806                                                         });
5807                                                 } else {
5808                                                         jQuery.error("no ajax");
5809                                                 }
5810                                         } else {
5811                                                 jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );
5812                                         }
5813
5814                                         if ( elem.parentNode ) {
5815                                                 elem.parentNode.removeChild( elem );
5816                                         }
5817                                 });
5818                         }
5819                 }
5820
5821                 return this;
5822         }
5823 });
5824
5825 function findOrAppend( elem, tag ) {
5826         return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
5827 }
5828
5829 function cloneCopyEvent( src, dest ) {
5830
5831         if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
5832                 return;
5833         }
5834
5835         var type, i, l,
5836                 oldData = jQuery._data( src ),
5837                 curData = jQuery._data( dest, oldData ),
5838                 events = oldData.events;
5839
5840         if ( events ) {
5841                 delete curData.handle;
5842                 curData.events = {};
5843
5844                 for ( type in events ) {
5845                         for ( i = 0, l = events[ type ].length; i < l; i++ ) {
5846                                 jQuery.event.add( dest, type, events[ type ][ i ] );
5847                         }
5848                 }
5849         }
5850
5851         // make the cloned public data object a copy from the original
5852         if ( curData.data ) {
5853                 curData.data = jQuery.extend( {}, curData.data );
5854         }
5855 }
5856
5857 function cloneFixAttributes( src, dest ) {
5858         var nodeName;
5859
5860         // We do not need to do anything for non-Elements
5861         if ( dest.nodeType !== 1 ) {
5862                 return;
5863         }
5864
5865         // clearAttributes removes the attributes, which we don't want,
5866         // but also removes the attachEvent events, which we *do* want
5867         if ( dest.clearAttributes ) {
5868                 dest.clearAttributes();
5869         }
5870
5871         // mergeAttributes, in contrast, only merges back on the
5872         // original attributes, not the events
5873         if ( dest.mergeAttributes ) {
5874                 dest.mergeAttributes( src );
5875         }
5876
5877         nodeName = dest.nodeName.toLowerCase();
5878
5879         if ( nodeName === "object" ) {
5880                 // IE6-10 improperly clones children of object elements using classid.
5881                 // IE10 throws NoModificationAllowedError if parent is null, #12132.
5882                 if ( dest.parentNode ) {
5883                         dest.outerHTML = src.outerHTML;
5884                 }
5885
5886                 // This path appears unavoidable for IE9. When cloning an object
5887                 // element in IE9, the outerHTML strategy above is not sufficient.
5888                 // If the src has innerHTML and the destination does not,
5889                 // copy the src.innerHTML into the dest.innerHTML. #10324
5890                 if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
5891                         dest.innerHTML = src.innerHTML;
5892                 }
5893
5894         } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
5895                 // IE6-8 fails to persist the checked state of a cloned checkbox
5896                 // or radio button. Worse, IE6-7 fail to give the cloned element
5897                 // a checked appearance if the defaultChecked value isn't also set
5898
5899                 dest.defaultChecked = dest.checked = src.checked;
5900
5901                 // IE6-7 get confused and end up setting the value of a cloned
5902                 // checkbox/radio button to an empty string instead of "on"
5903                 if ( dest.value !== src.value ) {
5904                         dest.value = src.value;
5905                 }
5906
5907         // IE6-8 fails to return the selected option to the default selected
5908         // state when cloning options
5909         } else if ( nodeName === "option" ) {
5910                 dest.selected = src.defaultSelected;
5911
5912         // IE6-8 fails to set the defaultValue to the correct value when
5913         // cloning other types of input fields
5914         } else if ( nodeName === "input" || nodeName === "textarea" ) {
5915                 dest.defaultValue = src.defaultValue;
5916
5917         // IE blanks contents when cloning scripts
5918         } else if ( nodeName === "script" && dest.text !== src.text ) {
5919                 dest.text = src.text;
5920         }
5921
5922         // Event data gets referenced instead of copied if the expando
5923         // gets copied too
5924         dest.removeAttribute( jQuery.expando );
5925 }
5926
5927 jQuery.buildFragment = function( args, context, scripts ) {
5928         var fragment, cacheable, cachehit,
5929                 first = args[ 0 ];
5930
5931         // Set context from what may come in as undefined or a jQuery collection or a node
5932         context = context || document;
5933         context = (context[0] || context).ownerDocument || context[0] || context;
5934
5935         // Ensure that an attr object doesn't incorrectly stand in as a document object
5936         // Chrome and Firefox seem to allow this to occur and will throw exception
5937         // Fixes #8950
5938         if ( typeof context.createDocumentFragment === "undefined" ) {
5939                 context = document;
5940         }
5941
5942         // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
5943         // Cloning options loses the selected state, so don't cache them
5944         // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
5945         // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
5946         // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
5947         if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
5948                 first.charAt(0) === "<" && !rnocache.test( first ) &&
5949                 (jQuery.support.checkClone || !rchecked.test( first )) &&
5950                 (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
5951
5952                 // Mark cacheable and look for a hit
5953                 cacheable = true;
5954                 fragment = jQuery.fragments[ first ];
5955                 cachehit = fragment !== undefined;
5956         }
5957
5958         if ( !fragment ) {
5959                 fragment = context.createDocumentFragment();
5960                 jQuery.clean( args, context, fragment, scripts );
5961
5962                 // Update the cache, but only store false
5963                 // unless this is a second parsing of the same content
5964                 if ( cacheable ) {
5965                         jQuery.fragments[ first ] = cachehit && fragment;
5966                 }
5967         }
5968
5969         return { fragment: fragment, cacheable: cacheable };
5970 };
5971
5972 jQuery.fragments = {};
5973
5974 jQuery.each({
5975         appendTo: "append",
5976         prependTo: "prepend",
5977         insertBefore: "before",
5978         insertAfter: "after",
5979         replaceAll: "replaceWith"
5980 }, function( name, original ) {
5981         jQuery.fn[ name ] = function( selector ) {
5982                 var elems,
5983                         i = 0,
5984                         ret = [],
5985                         insert = jQuery( selector ),
5986                         l = insert.length,
5987                         parent = this.length === 1 && this[0].parentNode;
5988
5989                 if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
5990                         insert[ original ]( this[0] );
5991                         return this;
5992                 } else {
5993                         for ( ; i < l; i++ ) {
5994                                 elems = ( i > 0 ? this.clone(true) : this ).get();
5995                                 jQuery( insert[i] )[ original ]( elems );
5996                                 ret = ret.concat( elems );
5997                         }
5998
5999                         return this.pushStack( ret, name, insert.selector );
6000                 }
6001         };
6002 });
6003
6004 function getAll( elem ) {
6005         if ( typeof elem.getElementsByTagName !== "undefined" ) {
6006                 return elem.getElementsByTagName( "*" );
6007
6008         } else if ( typeof elem.querySelectorAll !== "undefined" ) {
6009                 return elem.querySelectorAll( "*" );
6010
6011         } else {
6012                 return [];
6013         }
6014 }
6015
6016 // Used in clean, fixes the defaultChecked property
6017 function fixDefaultChecked( elem ) {
6018         if ( rcheckableType.test( elem.type ) ) {
6019                 elem.defaultChecked = elem.checked;
6020         }
6021 }
6022
6023 jQuery.extend({
6024         clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6025                 var srcElements,
6026                         destElements,
6027                         i,
6028                         clone;
6029
6030                 if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
6031                         clone = elem.cloneNode( true );
6032
6033                 // IE<=8 does not properly clone detached, unknown element nodes
6034                 } else {
6035                         fragmentDiv.innerHTML = elem.outerHTML;
6036                         fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
6037                 }
6038
6039                 if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6040                                 (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
6041                         // IE copies events bound via attachEvent when using cloneNode.
6042                         // Calling detachEvent on the clone will also remove the events
6043                         // from the original. In order to get around this, we use some
6044                         // proprietary methods to clear the events. Thanks to MooTools
6045                         // guys for this hotness.
6046
6047                         cloneFixAttributes( elem, clone );
6048
6049                         // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
6050                         srcElements = getAll( elem );
6051                         destElements = getAll( clone );
6052
6053                         // Weird iteration because IE will replace the length property
6054                         // with an element if you are cloning the body and one of the
6055                         // elements on the page has a name or id of "length"
6056                         for ( i = 0; srcElements[i]; ++i ) {
6057                                 // Ensure that the destination node is not null; Fixes #9587
6058                                 if ( destElements[i] ) {
6059                                         cloneFixAttributes( srcElements[i], destElements[i] );
6060                                 }
6061                         }
6062                 }
6063
6064                 // Copy the events from the original to the clone
6065                 if ( dataAndEvents ) {
6066                         cloneCopyEvent( elem, clone );
6067
6068                         if ( deepDataAndEvents ) {
6069                                 srcElements = getAll( elem );
6070                                 destElements = getAll( clone );
6071
6072                                 for ( i = 0; srcElements[i]; ++i ) {
6073                                         cloneCopyEvent( srcElements[i], destElements[i] );
6074                                 }
6075                         }
6076                 }
6077
6078                 srcElements = destElements = null;
6079
6080                 // Return the cloned set
6081                 return clone;
6082         },
6083
6084         clean: function( elems, context, fragment, scripts ) {
6085                 var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
6086                         i = 0,
6087                         ret = [];
6088
6089                 // Ensure that context is a document
6090                 if ( !context || typeof context.createDocumentFragment === "undefined" ) {
6091                         context = document;
6092                 }
6093
6094                 // Use the already-created safe fragment if context permits
6095                 for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) {
6096                         if ( typeof elem === "number" ) {
6097                                 elem += "";
6098                         }
6099
6100                         if ( !elem ) {
6101                                 continue;
6102                         }
6103
6104                         // Convert html string into DOM nodes
6105                         if ( typeof elem === "string" ) {
6106                                 if ( !rhtml.test( elem ) ) {
6107                                         elem = context.createTextNode( elem );
6108                                 } else {
6109                                         // Ensure a safe container in which to render the html
6110                                         safe = safe || createSafeFragment( context );
6111                                         div = div || safe.appendChild( context.createElement("div") );
6112
6113                                         // Fix "XHTML"-style tags in all browsers
6114                                         elem = elem.replace(rxhtmlTag, "<$1></$2>");
6115
6116                                         // Go to html and back, then peel off extra wrappers
6117                                         tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
6118                                         wrap = wrapMap[ tag ] || wrapMap._default;
6119                                         depth = wrap[0];
6120                                         div.innerHTML = wrap[1] + elem + wrap[2];
6121
6122                                         // Move to the right depth
6123                                         while ( depth-- ) {
6124                                                 div = div.lastChild;
6125                                         }
6126
6127                                         // Remove IE's autoinserted <tbody> from table fragments
6128                                         if ( !jQuery.support.tbody ) {
6129
6130                                                 // String was a <table>, *may* have spurious <tbody>
6131                                                 hasBody = rtbody.test(elem);
6132                                                         tbody = tag === "table" && !hasBody ?
6133                                                                 div.firstChild && div.firstChild.childNodes :
6134
6135                                                                 // String was a bare <thead> or <tfoot>
6136                                                                 wrap[1] === "<table>" && !hasBody ?
6137                                                                         div.childNodes :
6138                                                                         [];
6139
6140                                                 for ( j = tbody.length - 1; j >= 0 ; --j ) {
6141                                                         if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
6142                                                                 tbody[ j ].parentNode.removeChild( tbody[ j ] );
6143                                                         }
6144                                                 }
6145                                         }
6146
6147                                         // IE completely kills leading whitespace when innerHTML is used
6148                                         if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6149                                                 div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
6150                                         }
6151
6152                                         elem = div.childNodes;
6153
6154                                         // Remember the top-level container for proper cleanup
6155                                         div = safe.lastChild;
6156                                 }
6157                         }
6158
6159                         if ( elem.nodeType ) {
6160                                 ret.push( elem );
6161                         } else {
6162                                 ret = jQuery.merge( ret, elem );
6163                         }
6164                 }
6165
6166                 // Fix #11356: Clear elements from safeFragment
6167                 if ( div ) {
6168                         safe.removeChild( div );
6169                         elem = div = safe = null;
6170                 }
6171
6172                 // Reset defaultChecked for any radios and checkboxes
6173                 // about to be appended to the DOM in IE 6/7 (#8060)
6174                 if ( !jQuery.support.appendChecked ) {
6175                         for ( i = 0; (elem = ret[i]) != null; i++ ) {
6176                                 if ( jQuery.nodeName( elem, "input" ) ) {
6177                                         fixDefaultChecked( elem );
6178                                 } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
6179                                         jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
6180                                 }
6181                         }
6182                 }
6183
6184                 // Append elements to a provided document fragment
6185                 if ( fragment ) {
6186                         // Special handling of each script element
6187                         handleScript = function( elem ) {
6188                                 // Check if we consider it executable
6189                                 if ( !elem.type || rscriptType.test( elem.type ) ) {
6190                                         // Detach the script and store it in the scripts array (if provided) or the fragment
6191                                         // Return truthy to indicate that it has been handled
6192                                         return scripts ?
6193                                                 scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
6194                                                 fragment.appendChild( elem );
6195                                 }
6196                         };
6197
6198                         for ( i = 0; (elem = ret[i]) != null; i++ ) {
6199                                 // Check if we're done after handling an executable script
6200                                 if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
6201                                         // Append to fragment and handle embedded scripts
6202                                         fragment.appendChild( elem );
6203                                         if ( typeof elem.getElementsByTagName !== "undefined" ) {
6204                                                 // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
6205                                                 jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
6206
6207                                                 // Splice the scripts into ret after their former ancestor and advance our index beyond them
6208                                                 ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
6209                                                 i += jsTags.length;
6210                                         }
6211                                 }
6212                         }
6213                 }
6214
6215                 return ret;
6216         },
6217
6218         cleanData: function( elems, /* internal */ acceptData ) {
6219                 var data, id, elem, type,
6220                         i = 0,
6221                         internalKey = jQuery.expando,
6222                         cache = jQuery.cache,
6223                         deleteExpando = jQuery.support.deleteExpando,
6224                         special = jQuery.event.special;
6225
6226                 for ( ; (elem = elems[i]) != null; i++ ) {
6227
6228                         if ( acceptData || jQuery.acceptData( elem ) ) {
6229
6230                                 id = elem[ internalKey ];
6231                                 data = id && cache[ id ];
6232
6233                                 if ( data ) {
6234                                         if ( data.events ) {
6235                                                 for ( type in data.events ) {
6236                                                         if ( special[ type ] ) {
6237                                                                 jQuery.event.remove( elem, type );
6238
6239                                                         // This is a shortcut to avoid jQuery.event.remove's overhead
6240                                                         } else {
6241                                                                 jQuery.removeEvent( elem, type, data.handle );
6242                                                         }
6243                                                 }
6244                                         }
6245
6246                                         // Remove cache only if it was not already removed by jQuery.event.remove
6247                                         if ( cache[ id ] ) {
6248
6249                                                 delete cache[ id ];
6250
6251                                                 // IE does not allow us to delete expando properties from nodes,
6252                                                 // nor does it have a removeAttribute function on Document nodes;
6253                                                 // we must handle all of these cases
6254                                                 if ( deleteExpando ) {
6255                                                         delete elem[ internalKey ];
6256
6257                                                 } else if ( elem.removeAttribute ) {
6258                                                         elem.removeAttribute( internalKey );
6259
6260                                                 } else {
6261                                                         elem[ internalKey ] = null;
6262                                                 }
6263
6264                                                 jQuery.deletedIds.push( id );
6265                                         }
6266                                 }
6267                         }
6268                 }
6269         }
6270 });
6271 // Limit scope pollution from any deprecated API
6272 (function() {
6273
6274 var matched, browser;
6275
6276 // Use of jQuery.browser is frowned upon.
6277 // More details: http://api.jquery.com/jQuery.browser
6278 // jQuery.uaMatch maintained for back-compat
6279 jQuery.uaMatch = function( ua ) {
6280         ua = ua.toLowerCase();
6281
6282         var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
6283                 /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
6284                 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
6285                 /(msie) ([\w.]+)/.exec( ua ) ||
6286                 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
6287                 [];
6288
6289         return {
6290                 browser: match[ 1 ] || "",
6291                 version: match[ 2 ] || "0"
6292         };
6293 };
6294
6295 matched = jQuery.uaMatch( navigator.userAgent );
6296 browser = {};
6297
6298 if ( matched.browser ) {
6299         browser[ matched.browser ] = true;
6300         browser.version = matched.version;
6301 }
6302
6303 // Deprecated, use jQuery.browser.webkit instead
6304 // Maintained for back-compat only
6305 if ( browser.webkit ) {
6306         browser.safari = true;
6307 }
6308
6309 jQuery.browser = browser;
6310
6311 jQuery.sub = function() {
6312         function jQuerySub( selector, context ) {
6313                 return new jQuerySub.fn.init( selector, context );
6314         }
6315         jQuery.extend( true, jQuerySub, this );
6316         jQuerySub.superclass = this;
6317         jQuerySub.fn = jQuerySub.prototype = this();
6318         jQuerySub.fn.constructor = jQuerySub;
6319         jQuerySub.sub = this.sub;
6320         jQuerySub.fn.init = function init( selector, context ) {
6321                 if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
6322                         context = jQuerySub( context );
6323                 }
6324
6325                 return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
6326         };
6327         jQuerySub.fn.init.prototype = jQuerySub.fn;
6328         var rootjQuerySub = jQuerySub(document);
6329         return jQuerySub;
6330 };
6331         
6332 })();
6333 var curCSS, iframe, iframeDoc,
6334         ralpha = /alpha\([^)]*\)/i,
6335         ropacity = /opacity=([^)]*)/,
6336         rposition = /^(top|right|bottom|left)$/,
6337         rmargin = /^margin/,
6338         rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
6339         rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
6340         rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
6341         elemdisplay = {},
6342
6343         cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6344         cssNormalTransform = {
6345                 letterSpacing: 0,
6346                 fontWeight: 400,
6347                 lineHeight: 1
6348         },
6349
6350         cssExpand = [ "Top", "Right", "Bottom", "Left" ],
6351         cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
6352
6353         eventsToggle = jQuery.fn.toggle;
6354
6355 // return a css property mapped to a potentially vendor prefixed property
6356 function vendorPropName( style, name ) {
6357
6358         // shortcut for names that are not vendor prefixed
6359         if ( name in style ) {
6360                 return name;
6361         }
6362
6363         // check for vendor prefixed names
6364         var capName = name.charAt(0).toUpperCase() + name.slice(1),
6365                 origName = name,
6366                 i = cssPrefixes.length;
6367
6368         while ( i-- ) {
6369                 name = cssPrefixes[ i ] + capName;
6370                 if ( name in style ) {
6371                         return name;
6372                 }
6373         }
6374
6375         return origName;
6376 }
6377
6378 function isHidden( elem, el ) {
6379         elem = el || elem;
6380         return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
6381 }
6382
6383 function showHide( elements, show ) {
6384         var elem, display,
6385                 values = [],
6386                 index = 0,
6387                 length = elements.length;
6388
6389         for ( ; index < length; index++ ) {
6390                 elem = elements[ index ];
6391                 if ( !elem.style ) {
6392                         continue;
6393                 }
6394                 values[ index ] = jQuery._data( elem, "olddisplay" );
6395                 if ( show ) {
6396                         // Reset the inline display of this element to learn if it is
6397                         // being hidden by cascaded rules or not
6398                         if ( !values[ index ] && elem.style.display === "none" ) {
6399                                 elem.style.display = "";
6400                         }
6401
6402                         // Set elements which have been overridden with display: none
6403                         // in a stylesheet to whatever the default browser style is
6404                         // for such an element
6405                         if ( elem.style.display === "" && isHidden( elem ) ) {
6406                                 values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
6407                         }
6408                 } else {
6409                         display = curCSS( elem, "display" );
6410
6411                         if ( !values[ index ] && display !== "none" ) {
6412                                 jQuery._data( elem, "olddisplay", display );
6413                         }
6414                 }
6415         }
6416
6417         // Set the display of most of the elements in a second loop
6418         // to avoid the constant reflow
6419         for ( index = 0; index < length; index++ ) {
6420                 elem = elements[ index ];
6421                 if ( !elem.style ) {
6422                         continue;
6423                 }
6424                 if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
6425                         elem.style.display = show ? values[ index ] || "" : "none";
6426                 }
6427         }
6428
6429         return elements;
6430 }
6431
6432 jQuery.fn.extend({
6433         css: function( name, value ) {
6434                 return jQuery.access( this, function( elem, name, value ) {
6435                         return value !== undefined ?
6436                                 jQuery.style( elem, name, value ) :
6437                                 jQuery.css( elem, name );
6438                 }, name, value, arguments.length > 1 );
6439         },
6440         show: function() {
6441                 return showHide( this, true );
6442         },
6443         hide: function() {
6444                 return showHide( this );
6445         },
6446         toggle: function( state, fn2 ) {
6447                 var bool = typeof state === "boolean";
6448
6449                 if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
6450                         return eventsToggle.apply( this, arguments );
6451                 }
6452
6453                 return this.each(function() {
6454                         if ( bool ? state : isHidden( this ) ) {
6455                                 jQuery( this ).show();
6456                         } else {
6457                                 jQuery( this ).hide();
6458                         }
6459                 });
6460         }
6461 });
6462
6463 jQuery.extend({
6464         // Add in style property hooks for overriding the default
6465         // behavior of getting and setting a style property
6466         cssHooks: {
6467                 opacity: {
6468                         get: function( elem, computed ) {
6469                                 if ( computed ) {
6470                                         // We should always get a number back from opacity
6471                                         var ret = curCSS( elem, "opacity" );
6472                                         return ret === "" ? "1" : ret;
6473
6474                                 }
6475                         }
6476                 }
6477         },
6478
6479         // Exclude the following css properties to add px
6480         cssNumber: {
6481                 "fillOpacity": true,
6482                 "fontWeight": true,
6483                 "lineHeight": true,
6484                 "opacity": true,
6485                 "orphans": true,
6486                 "widows": true,
6487                 "zIndex": true,
6488                 "zoom": true
6489         },
6490
6491         // Add in properties whose names you wish to fix before
6492         // setting or getting the value
6493         cssProps: {
6494                 // normalize float css property
6495                 "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6496         },
6497
6498         // Get and set the style property on a DOM Node
6499         style: function( elem, name, value, extra ) {
6500                 // Don't set styles on text and comment nodes
6501                 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6502                         return;
6503                 }
6504
6505                 // Make sure that we're working with the right name
6506                 var ret, type, hooks,
6507                         origName = jQuery.camelCase( name ),
6508                         style = elem.style;
6509
6510                 name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
6511
6512                 // gets hook for the prefixed version
6513                 // followed by the unprefixed version
6514                 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6515
6516                 // Check if we're setting a value
6517                 if ( value !== undefined ) {
6518                         type = typeof value;
6519
6520                         // convert relative number strings (+= or -=) to relative numbers. #7345
6521                         if ( type === "string" && (ret = rrelNum.exec( value )) ) {
6522                                 value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
6523                                 // Fixes bug #9237
6524                                 type = "number";
6525                         }
6526
6527                         // Make sure that NaN and null values aren't set. See: #7116
6528                         if ( value == null || type === "number" && isNaN( value ) ) {
6529                                 return;
6530                         }
6531
6532                         // If a number was passed in, add 'px' to the (except for certain CSS properties)
6533                         if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
6534                                 value += "px";
6535                         }
6536
6537                         // If a hook was provided, use that value, otherwise just set the specified value
6538                         if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
6539                                 // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
6540                                 // Fixes bug #5509
6541                                 try {
6542                                         style[ name ] = value;
6543                                 } catch(e) {}
6544                         }
6545
6546                 } else {
6547                         // If a hook was provided get the non-computed value from there
6548                         if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
6549                                 return ret;
6550                         }
6551
6552                         // Otherwise just get the value from the style object
6553                         return style[ name ];
6554                 }
6555         },
6556
6557         css: function( elem, name, numeric, extra ) {
6558                 var val, num, hooks,
6559                         origName = jQuery.camelCase( name );
6560
6561                 // Make sure that we're working with the right name
6562                 name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
6563
6564                 // gets hook for the prefixed version
6565                 // followed by the unprefixed version
6566                 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6567
6568                 // If a hook was provided get the computed value from there
6569                 if ( hooks && "get" in hooks ) {
6570                         val = hooks.get( elem, true, extra );
6571                 }
6572
6573                 // Otherwise, if a way to get the computed value exists, use that
6574                 if ( val === undefined ) {
6575                         val = curCSS( elem, name );
6576                 }
6577
6578                 //convert "normal" to computed value
6579                 if ( val === "normal" && name in cssNormalTransform ) {
6580                         val = cssNormalTransform[ name ];
6581                 }
6582
6583                 // Return, converting to number if forced or a qualifier was provided and val looks numeric
6584                 if ( numeric || extra !== undefined ) {
6585                         num = parseFloat( val );
6586                         return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
6587                 }
6588                 return val;
6589         },
6590
6591         // A method for quickly swapping in/out CSS properties to get correct calculations
6592         swap: function( elem, options, callback ) {
6593                 var ret, name,
6594                         old = {};
6595
6596                 // Remember the old values, and insert the new ones
6597                 for ( name in options ) {
6598                         old[ name ] = elem.style[ name ];
6599                         elem.style[ name ] = options[ name ];
6600                 }
6601
6602                 ret = callback.call( elem );
6603
6604                 // Revert the old values
6605                 for ( name in options ) {
6606                         elem.style[ name ] = old[ name ];
6607                 }
6608
6609                 return ret;
6610         }
6611 });
6612
6613 // NOTE: To any future maintainer, we've used both window.getComputedStyle
6614 // and getComputedStyle here to produce a better gzip size
6615 if ( window.getComputedStyle ) {
6616         curCSS = function( elem, name ) {
6617                 var ret, width, minWidth, maxWidth,
6618                         computed = getComputedStyle( elem, null ),
6619                         style = elem.style;
6620
6621                 if ( computed ) {
6622
6623                         ret = computed[ name ];
6624                         if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
6625                                 ret = jQuery.style( elem, name );
6626                         }
6627
6628                         // A tribute to the "awesome hack by Dean Edwards"
6629                         // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
6630                         // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
6631                         // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
6632                         if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
6633                                 width = style.width;
6634                                 minWidth = style.minWidth;
6635                                 maxWidth = style.maxWidth;
6636
6637                                 style.minWidth = style.maxWidth = style.width = ret;
6638                                 ret = computed.width;
6639
6640                                 style.width = width;
6641                                 style.minWidth = minWidth;
6642                                 style.maxWidth = maxWidth;
6643                         }
6644                 }
6645
6646                 return ret;
6647         };
6648 } else if ( document.documentElement.currentStyle ) {
6649         curCSS = function( elem, name ) {
6650                 var left, rsLeft,
6651                         ret = elem.currentStyle && elem.currentStyle[ name ],
6652                         style = elem.style;
6653
6654                 // Avoid setting ret to empty string here
6655                 // so we don't default to auto
6656                 if ( ret == null && style && style[ name ] ) {
6657                         ret = style[ name ];
6658                 }
6659
6660                 // From the awesome hack by Dean Edwards
6661                 // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6662
6663                 // If we're not dealing with a regular pixel number
6664                 // but a number that has a weird ending, we need to convert it to pixels
6665                 // but not position css attributes, as those are proportional to the parent element instead
6666                 // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
6667                 if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
6668
6669                         // Remember the original values
6670                         left = style.left;
6671                         rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
6672
6673                         // Put in the new values to get a computed value out
6674                         if ( rsLeft ) {
6675                                 elem.runtimeStyle.left = elem.currentStyle.left;
6676                         }
6677                         style.left = name === "fontSize" ? "1em" : ret;
6678                         ret = style.pixelLeft + "px";
6679
6680                         // Revert the changed values
6681                         style.left = left;
6682                         if ( rsLeft ) {
6683                                 elem.runtimeStyle.left = rsLeft;
6684                         }
6685                 }
6686
6687                 return ret === "" ? "auto" : ret;
6688         };
6689 }
6690
6691 function setPositiveNumber( elem, value, subtract ) {
6692         var matches = rnumsplit.exec( value );
6693         return matches ?
6694                         Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
6695                         value;
6696 }
6697
6698 function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
6699         var i = extra === ( isBorderBox ? "border" : "content" ) ?
6700                 // If we already have the right measurement, avoid augmentation
6701                 4 :
6702                 // Otherwise initialize for horizontal or vertical properties
6703                 name === "width" ? 1 : 0,
6704
6705                 val = 0;
6706
6707         for ( ; i < 4; i += 2 ) {
6708                 // both box models exclude margin, so add it if we want it
6709                 if ( extra === "margin" ) {
6710                         // we use jQuery.css instead of curCSS here
6711                         // because of the reliableMarginRight CSS hook!
6712                         val += jQuery.css( elem, extra + cssExpand[ i ], true );
6713                 }
6714
6715                 // From this point on we use curCSS for maximum performance (relevant in animations)
6716                 if ( isBorderBox ) {
6717                         // border-box includes padding, so remove it if we want content
6718                         if ( extra === "content" ) {
6719                                 val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
6720                         }
6721
6722                         // at this point, extra isn't border nor margin, so remove border
6723                         if ( extra !== "margin" ) {
6724                                 val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
6725                         }
6726                 } else {
6727                         // at this point, extra isn't content, so add padding
6728                         val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
6729
6730                         // at this point, extra isn't content nor padding, so add border
6731                         if ( extra !== "padding" ) {
6732                                 val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
6733                         }
6734                 }
6735         }
6736
6737         return val;
6738 }
6739
6740 function getWidthOrHeight( elem, name, extra ) {
6741
6742         // Start with offset property, which is equivalent to the border-box value
6743         var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6744                 valueIsBorderBox = true,
6745                 isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";
6746
6747         if ( val <= 0 ) {
6748                 // Fall back to computed then uncomputed css if necessary
6749                 val = curCSS( elem, name );
6750                 if ( val < 0 || val == null ) {
6751                         val = elem.style[ name ];
6752                 }
6753
6754                 // Computed unit is not pixels. Stop here and return.
6755                 if ( rnumnonpx.test(val) ) {
6756                         return val;
6757                 }
6758
6759                 // we need the check for style in case a browser which returns unreliable values
6760                 // for getComputedStyle silently falls back to the reliable elem.style
6761                 valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
6762
6763                 // Normalize "", auto, and prepare for extra
6764                 val = parseFloat( val ) || 0;
6765         }
6766
6767         // use the active box-sizing model to add/subtract irrelevant styles
6768         return ( val +
6769                 augmentWidthOrHeight(
6770                         elem,
6771                         name,
6772                         extra || ( isBorderBox ? "border" : "content" ),
6773                         valueIsBorderBox
6774                 )
6775         ) + "px";
6776 }
6777
6778
6779 // Try to determine the default display value of an element
6780 function css_defaultDisplay( nodeName ) {
6781         if ( elemdisplay[ nodeName ] ) {
6782                 return elemdisplay[ nodeName ];
6783         }
6784
6785         var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
6786                 display = elem.css("display");
6787         elem.remove();
6788
6789         // If the simple way fails,
6790         // get element's real default display by attaching it to a temp iframe
6791         if ( display === "none" || display === "" ) {
6792                 // Use the already-created iframe if possible
6793                 iframe = document.body.appendChild(
6794                         iframe || jQuery.extend( document.createElement("iframe"), {
6795                                 frameBorder: 0,
6796                                 width: 0,
6797                                 height: 0
6798                         })
6799                 );
6800
6801                 // Create a cacheable copy of the iframe document on first call.
6802                 // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
6803                 // document to it; WebKit & Firefox won't allow reusing the iframe document.
6804                 if ( !iframeDoc || !iframe.createElement ) {
6805                         iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
6806                         iframeDoc.write("<!doctype html><html><body>");
6807                         iframeDoc.close();
6808                 }
6809
6810                 elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
6811
6812                 display = curCSS( elem, "display" );
6813                 document.body.removeChild( iframe );
6814         }
6815
6816         // Store the correct default display
6817         elemdisplay[ nodeName ] = display;
6818
6819         return display;
6820 }
6821
6822 jQuery.each([ "height", "width" ], function( i, name ) {
6823         jQuery.cssHooks[ name ] = {
6824                 get: function( elem, computed, extra ) {
6825                         if ( computed ) {
6826                                 if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) {
6827                                         return getWidthOrHeight( elem, name, extra );
6828                                 } else {
6829                                         return jQuery.swap( elem, cssShow, function() {
6830                                                 return getWidthOrHeight( elem, name, extra );
6831                                         });
6832                                 }
6833                         }
6834                 },
6835
6836                 set: function( elem, value, extra ) {
6837                         return setPositiveNumber( elem, value, extra ?
6838                                 augmentWidthOrHeight(
6839                                         elem,
6840                                         name,
6841                                         extra,
6842                                         jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
6843                                 ) : 0
6844                         );
6845                 }
6846         };
6847 });
6848
6849 if ( !jQuery.support.opacity ) {
6850         jQuery.cssHooks.opacity = {
6851                 get: function( elem, computed ) {
6852                         // IE uses filters for opacity
6853                         return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6854                                 ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
6855                                 computed ? "1" : "";
6856                 },
6857
6858                 set: function( elem, value ) {
6859                         var style = elem.style,
6860                                 currentStyle = elem.currentStyle,
6861                                 opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
6862                                 filter = currentStyle && currentStyle.filter || style.filter || "";
6863
6864                         // IE has trouble with opacity if it does not have layout
6865                         // Force it by setting the zoom level
6866                         style.zoom = 1;
6867
6868                         // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
6869                         if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
6870                                 style.removeAttribute ) {
6871
6872                                 // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
6873                                 // if "filter:" is present at all, clearType is disabled, we want to avoid this
6874                                 // style.removeAttribute is IE Only, but so apparently is this code path...
6875                                 style.removeAttribute( "filter" );
6876
6877                                 // if there there is no filter style applied in a css rule, we are done
6878                                 if ( currentStyle && !currentStyle.filter ) {
6879                                         return;
6880                                 }
6881                         }
6882
6883                         // otherwise, set new filter values
6884                         style.filter = ralpha.test( filter ) ?
6885                                 filter.replace( ralpha, opacity ) :
6886                                 filter + " " + opacity;
6887                 }
6888         };
6889 }
6890
6891 // These hooks cannot be added until DOM ready because the support test
6892 // for it is not run until after DOM ready
6893 jQuery(function() {
6894         if ( !jQuery.support.reliableMarginRight ) {
6895                 jQuery.cssHooks.marginRight = {
6896                         get: function( elem, computed ) {
6897                                 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6898                                 // Work around by temporarily setting element display to inline-block
6899                                 return jQuery.swap( elem, { "display": "inline-block" }, function() {
6900                                         if ( computed ) {
6901                                                 return curCSS( elem, "marginRight" );
6902                                         }
6903                                 });
6904                         }
6905                 };
6906         }
6907
6908         // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
6909         // getComputedStyle returns percent when specified for top/left/bottom/right
6910         // rather than make the css module depend on the offset module, we just check for it here
6911         if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
6912                 jQuery.each( [ "top", "left" ], function( i, prop ) {
6913                         jQuery.cssHooks[ prop ] = {
6914                                 get: function( elem, computed ) {
6915                                         if ( computed ) {
6916                                                 var ret = curCSS( elem, prop );
6917                                                 // if curCSS returns percentage, fallback to offset
6918                                                 return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
6919                                         }
6920                                 }
6921                         };
6922                 });
6923         }
6924
6925 });
6926
6927 if ( jQuery.expr && jQuery.expr.filters ) {
6928         jQuery.expr.filters.hidden = function( elem ) {
6929                 return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
6930         };
6931
6932         jQuery.expr.filters.visible = function( elem ) {
6933                 return !jQuery.expr.filters.hidden( elem );
6934         };
6935 }
6936
6937 // These hooks are used by animate to expand properties
6938 jQuery.each({
6939         margin: "",
6940         padding: "",
6941         border: "Width"
6942 }, function( prefix, suffix ) {
6943         jQuery.cssHooks[ prefix + suffix ] = {
6944                 expand: function( value ) {
6945                         var i,
6946
6947                                 // assumes a single number if not a string
6948                                 parts = typeof value === "string" ? value.split(" ") : [ value ],
6949                                 expanded = {};
6950
6951                         for ( i = 0; i < 4; i++ ) {
6952                                 expanded[ prefix + cssExpand[ i ] + suffix ] =
6953                                         parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
6954                         }
6955
6956                         return expanded;
6957                 }
6958         };
6959
6960         if ( !rmargin.test( prefix ) ) {
6961                 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
6962         }
6963 });
6964 var r20 = /%20/g,
6965         rbracket = /\[\]$/,
6966         rCRLF = /\r?\n/g,
6967         rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
6968         rselectTextarea = /^(?:select|textarea)/i;
6969
6970 jQuery.fn.extend({
6971         serialize: function() {
6972                 return jQuery.param( this.serializeArray() );
6973         },
6974         serializeArray: function() {
6975                 return this.map(function(){
6976                         return this.elements ? jQuery.makeArray( this.elements ) : this;
6977                 })
6978                 .filter(function(){
6979                         return this.name && !this.disabled &&
6980                                 ( this.checked || rselectTextarea.test( this.nodeName ) ||
6981                                         rinput.test( this.type ) );
6982                 })
6983                 .map(function( i, elem ){
6984                         var val = jQuery( this ).val();
6985
6986                         return val == null ?
6987                                 null :
6988                                 jQuery.isArray( val ) ?
6989                                         jQuery.map( val, function( val, i ){
6990                                                 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6991                                         }) :
6992                                         { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6993                 }).get();
6994         }
6995 });
6996
6997 //Serialize an array of form elements or a set of
6998 //key/values into a query string
6999 jQuery.param = function( a, traditional ) {
7000         var prefix,
7001                 s = [],
7002                 add = function( key, value ) {
7003                         // If value is a function, invoke it and return its value
7004                         value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
7005                         s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
7006                 };
7007
7008         // Set traditional to true for jQuery <= 1.3.2 behavior.
7009         if ( traditional === undefined ) {
7010                 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
7011         }
7012
7013         // If an array was passed in, assume that it is an array of form elements.
7014         if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
7015                 // Serialize the form elements
7016                 jQuery.each( a, function() {
7017                         add( this.name, this.value );
7018                 });
7019
7020         } else {
7021                 // If traditional, encode the "old" way (the way 1.3.2 or older
7022                 // did it), otherwise encode params recursively.
7023                 for ( prefix in a ) {
7024                         buildParams( prefix, a[ prefix ], traditional, add );
7025                 }
7026         }
7027
7028         // Return the resulting serialization
7029         return s.join( "&" ).replace( r20, "+" );
7030 };
7031
7032 function buildParams( prefix, obj, traditional, add ) {
7033         var name;
7034
7035         if ( jQuery.isArray( obj ) ) {
7036                 // Serialize array item.
7037                 jQuery.each( obj, function( i, v ) {
7038                         if ( traditional || rbracket.test( prefix ) ) {
7039                                 // Treat each array item as a scalar.
7040                                 add( prefix, v );
7041
7042                         } else {
7043                                 // If array item is non-scalar (array or object), encode its
7044                                 // numeric index to resolve deserialization ambiguity issues.
7045                                 // Note that rack (as of 1.0.0) can't currently deserialize
7046                                 // nested arrays properly, and attempting to do so may cause
7047                                 // a server error. Possible fixes are to modify rack's
7048                                 // deserialization algorithm or to provide an option or flag
7049                                 // to force array serialization to be shallow.
7050                                 buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
7051                         }
7052                 });
7053
7054         } else if ( !traditional && jQuery.type( obj ) === "object" ) {
7055                 // Serialize object item.
7056                 for ( name in obj ) {
7057                         buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7058                 }
7059
7060         } else {
7061                 // Serialize scalar item.
7062                 add( prefix, obj );
7063         }
7064 }
7065 var // Document location
7066         ajaxLocation,
7067         // Document location segments
7068         ajaxLocParts,
7069
7070         rhash = /#.*$/,
7071         rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
7072         // #7653, #8125, #8152: local protocol detection
7073         rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
7074         rnoContent = /^(?:GET|HEAD)$/,
7075         rprotocol = /^\/\//,
7076         rquery = /\?/,
7077         rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
7078         rts = /([?&])_=[^&]*/,
7079         rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
7080
7081         // Keep a copy of the old load method
7082         _load = jQuery.fn.load,
7083
7084         /* Prefilters
7085          * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
7086          * 2) These are called:
7087          *    - BEFORE asking for a transport
7088          *    - AFTER param serialization (s.data is a string if s.processData is true)
7089          * 3) key is the dataType
7090          * 4) the catchall symbol "*" can be used
7091          * 5) execution will start with transport dataType and THEN continue down to "*" if needed
7092          */
7093         prefilters = {},
7094
7095         /* Transports bindings
7096          * 1) key is the dataType
7097          * 2) the catchall symbol "*" can be used
7098          * 3) selection will start with transport dataType and THEN go to "*" if needed
7099          */
7100         transports = {},
7101
7102         // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
7103         allTypes = ["*/"] + ["*"];
7104
7105 // #8138, IE may throw an exception when accessing
7106 // a field from window.location if document.domain has been set
7107 try {
7108         ajaxLocation = location.href;
7109 } catch( e ) {
7110         // Use the href attribute of an A element
7111         // since IE will modify it given document.location
7112         ajaxLocation = document.createElement( "a" );
7113         ajaxLocation.href = "";
7114         ajaxLocation = ajaxLocation.href;
7115 }
7116
7117 // Segment location into parts
7118 ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
7119
7120 // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
7121 function addToPrefiltersOrTransports( structure ) {
7122
7123         // dataTypeExpression is optional and defaults to "*"
7124         return function( dataTypeExpression, func ) {
7125
7126                 if ( typeof dataTypeExpression !== "string" ) {
7127                         func = dataTypeExpression;
7128                         dataTypeExpression = "*";
7129                 }
7130
7131                 var dataType, list, placeBefore,
7132                         dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ),
7133                         i = 0,
7134                         length = dataTypes.length;
7135
7136                 if ( jQuery.isFunction( func ) ) {
7137                         // For each dataType in the dataTypeExpression
7138                         for ( ; i < length; i++ ) {
7139                                 dataType = dataTypes[ i ];
7140                                 // We control if we're asked to add before
7141                                 // any existing element
7142                                 placeBefore = /^\+/.test( dataType );
7143                                 if ( placeBefore ) {
7144                                         dataType = dataType.substr( 1 ) || "*";
7145                                 }
7146                                 list = structure[ dataType ] = structure[ dataType ] || [];
7147                                 // then we add to the structure accordingly
7148                                 list[ placeBefore ? "unshift" : "push" ]( func );
7149                         }
7150                 }
7151         };
7152 }
7153
7154 // Base inspection function for prefilters and transports
7155 function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
7156                 dataType /* internal */, inspected /* internal */ ) {
7157
7158         dataType = dataType || options.dataTypes[ 0 ];
7159         inspected = inspected || {};
7160
7161         inspected[ dataType ] = true;
7162
7163         var selection,
7164                 list = structure[ dataType ],
7165                 i = 0,
7166                 length = list ? list.length : 0,
7167                 executeOnly = ( structure === prefilters );
7168
7169         for ( ; i < length && ( executeOnly || !selection ); i++ ) {
7170                 selection = list[ i ]( options, originalOptions, jqXHR );
7171                 // If we got redirected to another dataType
7172                 // we try there if executing only and not done already
7173                 if ( typeof selection === "string" ) {
7174                         if ( !executeOnly || inspected[ selection ] ) {
7175                                 selection = undefined;
7176                         } else {
7177                                 options.dataTypes.unshift( selection );
7178                                 selection = inspectPrefiltersOrTransports(
7179                                                 structure, options, originalOptions, jqXHR, selection, inspected );
7180                         }
7181                 }
7182         }
7183         // If we're only executing or nothing was selected
7184         // we try the catchall dataType if not done already
7185         if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
7186                 selection = inspectPrefiltersOrTransports(
7187                                 structure, options, originalOptions, jqXHR, "*", inspected );
7188         }
7189         // unnecessary when only executing (prefilters)
7190         // but it'll be ignored by the caller in that case
7191         return selection;
7192 }
7193
7194 // A special extend for ajax options
7195 // that takes "flat" options (not to be deep extended)
7196 // Fixes #9887
7197 function ajaxExtend( target, src ) {
7198         var key, deep,
7199                 flatOptions = jQuery.ajaxSettings.flatOptions || {};
7200         for ( key in src ) {
7201                 if ( src[ key ] !== undefined ) {
7202                         ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
7203                 }
7204         }
7205         if ( deep ) {
7206                 jQuery.extend( true, target, deep );
7207         }
7208 }
7209
7210 jQuery.fn.load = function( url, params, callback ) {
7211         if ( typeof url !== "string" && _load ) {
7212                 return _load.apply( this, arguments );
7213         }
7214
7215         // Don't do a request if no elements are being requested
7216         if ( !this.length ) {
7217                 return this;
7218         }
7219
7220         var selector, type, response,
7221                 self = this,
7222                 off = url.indexOf(" ");
7223
7224         if ( off >= 0 ) {
7225                 selector = url.slice( off, url.length );
7226                 url = url.slice( 0, off );
7227         }
7228
7229         // If it's a function
7230         if ( jQuery.isFunction( params ) ) {
7231
7232                 // We assume that it's the callback
7233                 callback = params;
7234                 params = undefined;
7235
7236         // Otherwise, build a param string
7237         } else if ( typeof params === "object" ) {
7238                 type = "POST";
7239         }
7240
7241         // Request the remote document
7242         jQuery.ajax({
7243                 url: url,
7244
7245                 // if "type" variable is undefined, then "GET" method will be used
7246                 type: type,
7247                 dataType: "html",
7248                 data: params,
7249                 complete: function( jqXHR, status ) {
7250                         if ( callback ) {
7251                                 self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
7252                         }
7253                 }
7254         }).done(function( responseText ) {
7255
7256                 // Save response for use in complete callback
7257                 response = arguments;
7258
7259                 // See if a selector was specified
7260                 self.html( selector ?
7261
7262                         // Create a dummy div to hold the results
7263                         jQuery("<div>")
7264
7265                                 // inject the contents of the document in, removing the scripts
7266                                 // to avoid any 'Permission Denied' errors in IE
7267                                 .append( responseText.replace( rscript, "" ) )
7268
7269                                 // Locate the specified elements
7270                                 .find( selector ) :
7271
7272                         // If not, just inject the full result
7273                         responseText );
7274
7275         });
7276
7277         return this;
7278 };
7279
7280 // Attach a bunch of functions for handling common AJAX events
7281 jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
7282         jQuery.fn[ o ] = function( f ){
7283                 return this.on( o, f );
7284         };
7285 });
7286
7287 jQuery.each( [ "get", "post" ], function( i, method ) {
7288         jQuery[ method ] = function( url, data, callback, type ) {
7289                 // shift arguments if data argument was omitted
7290                 if ( jQuery.isFunction( data ) ) {
7291                         type = type || callback;
7292                         callback = data;
7293                         data = undefined;
7294                 }
7295
7296                 return jQuery.ajax({
7297                         type: method,
7298                         url: url,
7299                         data: data,
7300                         success: callback,
7301                         dataType: type
7302                 });
7303         };
7304 });
7305
7306 jQuery.extend({
7307
7308         getScript: function( url, callback ) {
7309                 return jQuery.get( url, undefined, callback, "script" );
7310         },
7311
7312         getJSON: function( url, data, callback ) {
7313                 return jQuery.get( url, data, callback, "json" );
7314         },
7315
7316         // Creates a full fledged settings object into target
7317         // with both ajaxSettings and settings fields.
7318         // If target is omitted, writes into ajaxSettings.
7319         ajaxSetup: function( target, settings ) {
7320                 if ( settings ) {
7321                         // Building a settings object
7322                         ajaxExtend( target, jQuery.ajaxSettings );
7323                 } else {
7324                         // Extending ajaxSettings
7325                         settings = target;
7326                         target = jQuery.ajaxSettings;
7327                 }
7328                 ajaxExtend( target, settings );
7329                 return target;
7330         },
7331
7332         ajaxSettings: {
7333                 url: ajaxLocation,
7334                 isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
7335                 global: true,
7336                 type: "GET",
7337                 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
7338                 processData: true,
7339                 async: true,
7340                 /*
7341                 timeout: 0,
7342                 data: null,
7343                 dataType: null,
7344                 username: null,
7345                 password: null,
7346                 cache: null,
7347                 throws: false,
7348                 traditional: false,
7349                 headers: {},
7350                 */
7351
7352                 accepts: {
7353                         xml: "application/xml, text/xml",
7354                         html: "text/html",
7355                         text: "text/plain",
7356                         json: "application/json, text/javascript",
7357                         "*": allTypes
7358                 },
7359
7360                 contents: {
7361                         xml: /xml/,
7362                         html: /html/,
7363                         json: /json/
7364                 },
7365
7366                 responseFields: {
7367                         xml: "responseXML",
7368                         text: "responseText"
7369                 },
7370
7371                 // List of data converters
7372                 // 1) key format is "source_type destination_type" (a single space in-between)
7373                 // 2) the catchall symbol "*" can be used for source_type
7374                 converters: {
7375
7376                         // Convert anything to text
7377                         "* text": window.String,
7378
7379                         // Text to html (true = no transformation)
7380                         "text html": true,
7381
7382                         // Evaluate text as a json expression
7383                         "text json": jQuery.parseJSON,
7384
7385                         // Parse text as xml
7386                         "text xml": jQuery.parseXML
7387                 },
7388
7389                 // For options that shouldn't be deep extended:
7390                 // you can add your own custom options here if
7391                 // and when you create one that shouldn't be
7392                 // deep extended (see ajaxExtend)
7393                 flatOptions: {
7394                         context: true,
7395                         url: true
7396                 }
7397         },
7398
7399         ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
7400         ajaxTransport: addToPrefiltersOrTransports( transports ),
7401
7402         // Main method
7403         ajax: function( url, options ) {
7404
7405                 // If url is an object, simulate pre-1.5 signature
7406                 if ( typeof url === "object" ) {
7407                         options = url;
7408                         url = undefined;
7409                 }
7410
7411                 // Force options to be an object
7412                 options = options || {};
7413
7414                 var // ifModified key
7415                         ifModifiedKey,
7416                         // Response headers
7417                         responseHeadersString,
7418                         responseHeaders,
7419                         // transport
7420                         transport,
7421                         // timeout handle
7422                         timeoutTimer,
7423                         // Cross-domain detection vars
7424                         parts,
7425                         // To know if global events are to be dispatched
7426                         fireGlobals,
7427                         // Loop variable
7428                         i,
7429                         // Create the final options object
7430                         s = jQuery.ajaxSetup( {}, options ),
7431                         // Callbacks context
7432                         callbackContext = s.context || s,
7433                         // Context for global events
7434                         // It's the callbackContext if one was provided in the options
7435                         // and if it's a DOM node or a jQuery collection
7436                         globalEventContext = callbackContext !== s &&
7437                                 ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
7438                                                 jQuery( callbackContext ) : jQuery.event,
7439                         // Deferreds
7440                         deferred = jQuery.Deferred(),
7441                         completeDeferred = jQuery.Callbacks( "once memory" ),
7442                         // Status-dependent callbacks
7443                         statusCode = s.statusCode || {},
7444                         // Headers (they are sent all at once)
7445                         requestHeaders = {},
7446                         requestHeadersNames = {},
7447                         // The jqXHR state
7448                         state = 0,
7449                         // Default abort message
7450                         strAbort = "canceled",
7451                         // Fake xhr
7452                         jqXHR = {
7453
7454                                 readyState: 0,
7455
7456                                 // Caches the header
7457                                 setRequestHeader: function( name, value ) {
7458                                         if ( !state ) {
7459                                                 var lname = name.toLowerCase();
7460                                                 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
7461                                                 requestHeaders[ name ] = value;
7462                                         }
7463                                         return this;
7464                                 },
7465
7466                                 // Raw string
7467                                 getAllResponseHeaders: function() {
7468                                         return state === 2 ? responseHeadersString : null;
7469                                 },
7470
7471                                 // Builds headers hashtable if needed
7472                                 getResponseHeader: function( key ) {
7473                                         var match;
7474                                         if ( state === 2 ) {
7475                                                 if ( !responseHeaders ) {
7476                                                         responseHeaders = {};
7477                                                         while( ( match = rheaders.exec( responseHeadersString ) ) ) {
7478                                                                 responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7479                                                         }
7480                                                 }
7481                                                 match = responseHeaders[ key.toLowerCase() ];
7482                                         }
7483                                         return match === undefined ? null : match;
7484                                 },
7485
7486                                 // Overrides response content-type header
7487                                 overrideMimeType: function( type ) {
7488                                         if ( !state ) {
7489                                                 s.mimeType = type;
7490                                         }
7491                                         return this;
7492                                 },
7493
7494                                 // Cancel the request
7495                                 abort: function( statusText ) {
7496                                         statusText = statusText || strAbort;
7497                                         if ( transport ) {
7498                                                 transport.abort( statusText );
7499                                         }
7500                                         done( 0, statusText );
7501                                         return this;
7502                                 }
7503                         };
7504
7505                 // Callback for when everything is done
7506                 // It is defined here because jslint complains if it is declared
7507                 // at the end of the function (which would be more logical and readable)
7508                 function done( status, nativeStatusText, responses, headers ) {
7509                         var isSuccess, success, error, response, modified,
7510                                 statusText = nativeStatusText;
7511
7512                         // Called once
7513                         if ( state === 2 ) {
7514                                 return;
7515                         }
7516
7517                         // State is "done" now
7518                         state = 2;
7519
7520                         // Clear timeout if it exists
7521                         if ( timeoutTimer ) {
7522                                 clearTimeout( timeoutTimer );
7523                         }
7524
7525                         // Dereference transport for early garbage collection
7526                         // (no matter how long the jqXHR object will be used)
7527                         transport = undefined;
7528
7529                         // Cache response headers
7530                         responseHeadersString = headers || "";
7531
7532                         // Set readyState
7533                         jqXHR.readyState = status > 0 ? 4 : 0;
7534
7535                         // Get response data
7536                         if ( responses ) {
7537                                 response = ajaxHandleResponses( s, jqXHR, responses );
7538                         }
7539
7540                         // If successful, handle type chaining
7541                         if ( status >= 200 && status < 300 || status === 304 ) {
7542
7543                                 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7544                                 if ( s.ifModified ) {
7545
7546                                         modified = jqXHR.getResponseHeader("Last-Modified");
7547                                         if ( modified ) {
7548                                                 jQuery.lastModified[ ifModifiedKey ] = modified;
7549                                         }
7550                                         modified = jqXHR.getResponseHeader("Etag");
7551                                         if ( modified ) {
7552                                                 jQuery.etag[ ifModifiedKey ] = modified;
7553                                         }
7554                                 }
7555
7556                                 // If not modified
7557                                 if ( status === 304 ) {
7558
7559                                         statusText = "notmodified";
7560                                         isSuccess = true;
7561
7562                                 // If we have data
7563                                 } else {
7564
7565                                         isSuccess = ajaxConvert( s, response );
7566                                         statusText = isSuccess.state;
7567                                         success = isSuccess.data;
7568                                         error = isSuccess.error;
7569                                         isSuccess = !error;
7570                                 }
7571                         } else {
7572                                 // We extract error from statusText
7573                                 // then normalize statusText and status for non-aborts
7574                                 error = statusText;
7575                                 if ( !statusText || status ) {
7576                                         statusText = "error";
7577                                         if ( status < 0 ) {
7578                                                 status = 0;
7579                                         }
7580                                 }
7581                         }
7582
7583                         // Set data for the fake xhr object
7584                         jqXHR.status = status;
7585                         jqXHR.statusText = "" + ( nativeStatusText || statusText );
7586
7587                         // Success/Error
7588                         if ( isSuccess ) {
7589                                 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
7590                         } else {
7591                                 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
7592                         }
7593
7594                         // Status-dependent callbacks
7595                         jqXHR.statusCode( statusCode );
7596                         statusCode = undefined;
7597
7598                         if ( fireGlobals ) {
7599                                 globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
7600                                                 [ jqXHR, s, isSuccess ? success : error ] );
7601                         }
7602
7603                         // Complete
7604                         completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
7605
7606                         if ( fireGlobals ) {
7607                                 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
7608                                 // Handle the global AJAX counter
7609                                 if ( !( --jQuery.active ) ) {
7610                                         jQuery.event.trigger( "ajaxStop" );
7611                                 }
7612                         }
7613                 }
7614
7615                 // Attach deferreds
7616                 deferred.promise( jqXHR );
7617                 jqXHR.success = jqXHR.done;
7618                 jqXHR.error = jqXHR.fail;
7619                 jqXHR.complete = completeDeferred.add;
7620
7621                 // Status-dependent callbacks
7622                 jqXHR.statusCode = function( map ) {
7623                         if ( map ) {
7624                                 var tmp;
7625                                 if ( state < 2 ) {
7626                                         for ( tmp in map ) {
7627                                                 statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
7628                                         }
7629                                 } else {
7630                                         tmp = map[ jqXHR.status ];
7631                                         jqXHR.always( tmp );
7632                                 }
7633                         }
7634                         return this;
7635                 };
7636
7637                 // Remove hash character (#7531: and string promotion)
7638                 // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
7639                 // We also use the url parameter if available
7640                 s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
7641
7642                 // Extract dataTypes list
7643                 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace );
7644
7645                 // Determine if a cross-domain request is in order
7646                 if ( s.crossDomain == null ) {
7647                         parts = rurl.exec( s.url.toLowerCase() );
7648                         s.crossDomain = !!( parts &&
7649                                 ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
7650                                         ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
7651                                                 ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
7652                         );
7653                 }
7654
7655                 // Convert data if not already a string
7656                 if ( s.data && s.processData && typeof s.data !== "string" ) {
7657                         s.data = jQuery.param( s.data, s.traditional );
7658                 }
7659
7660                 // Apply prefilters
7661                 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
7662
7663                 // If request was aborted inside a prefilter, stop there
7664                 if ( state === 2 ) {
7665                         return jqXHR;
7666                 }
7667
7668                 // We can fire global events as of now if asked to
7669                 fireGlobals = s.global;
7670
7671                 // Uppercase the type
7672                 s.type = s.type.toUpperCase();
7673
7674                 // Determine if request has content
7675                 s.hasContent = !rnoContent.test( s.type );
7676
7677                 // Watch for a new set of requests
7678                 if ( fireGlobals && jQuery.active++ === 0 ) {
7679                         jQuery.event.trigger( "ajaxStart" );
7680                 }
7681
7682                 // More options handling for requests with no content
7683                 if ( !s.hasContent ) {
7684
7685                         // If data is available, append data to url
7686                         if ( s.data ) {
7687                                 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
7688                                 // #9682: remove data so that it's not used in an eventual retry
7689                                 delete s.data;
7690                         }
7691
7692                         // Get ifModifiedKey before adding the anti-cache parameter
7693                         ifModifiedKey = s.url;
7694
7695                         // Add anti-cache in url if needed
7696                         if ( s.cache === false ) {
7697
7698                                 var ts = jQuery.now(),
7699                                         // try replacing _= if it is there
7700                                         ret = s.url.replace( rts, "$1_=" + ts );
7701
7702                                 // if nothing was replaced, add timestamp to the end
7703                                 s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
7704                         }
7705                 }
7706
7707                 // Set the correct header, if data is being sent
7708                 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
7709                         jqXHR.setRequestHeader( "Content-Type", s.contentType );
7710                 }
7711
7712                 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7713                 if ( s.ifModified ) {
7714                         ifModifiedKey = ifModifiedKey || s.url;
7715                         if ( jQuery.lastModified[ ifModifiedKey ] ) {
7716                                 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
7717                         }
7718                         if ( jQuery.etag[ ifModifiedKey ] ) {
7719                                 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
7720                         }
7721                 }
7722
7723                 // Set the Accepts header for the server, depending on the dataType
7724                 jqXHR.setRequestHeader(
7725                         "Accept",
7726                         s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
7727                                 s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
7728                                 s.accepts[ "*" ]
7729                 );
7730
7731                 // Check for headers option
7732                 for ( i in s.headers ) {
7733                         jqXHR.setRequestHeader( i, s.headers[ i ] );
7734                 }
7735
7736                 // Allow custom headers/mimetypes and early abort
7737                 if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
7738                                 // Abort if not done already and return
7739                                 return jqXHR.abort();
7740
7741                 }
7742
7743                 // aborting is no longer a cancellation
7744                 strAbort = "abort";
7745
7746                 // Install callbacks on deferreds
7747                 for ( i in { success: 1, error: 1, complete: 1 } ) {
7748                         jqXHR[ i ]( s[ i ] );
7749                 }
7750
7751                 // Get transport
7752                 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
7753
7754                 // If no transport, we auto-abort
7755                 if ( !transport ) {
7756                         done( -1, "No Transport" );
7757                 } else {
7758                         jqXHR.readyState = 1;
7759                         // Send global event
7760                         if ( fireGlobals ) {
7761                                 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
7762                         }
7763                         // Timeout
7764                         if ( s.async && s.timeout > 0 ) {
7765                                 timeoutTimer = setTimeout( function(){
7766                                         jqXHR.abort( "timeout" );
7767                                 }, s.timeout );
7768                         }
7769
7770                         try {
7771                                 state = 1;
7772                                 transport.send( requestHeaders, done );
7773                         } catch (e) {
7774                                 // Propagate exception as error if not done
7775                                 if ( state < 2 ) {
7776                                         done( -1, e );
7777                                 // Simply rethrow otherwise
7778                                 } else {
7779                                         throw e;
7780                                 }
7781                         }
7782                 }
7783
7784                 return jqXHR;
7785         },
7786
7787         // Counter for holding the number of active queries
7788         active: 0,
7789
7790         // Last-Modified header cache for next request
7791         lastModified: {},
7792         etag: {}
7793
7794 });
7795
7796 /* Handles responses to an ajax request:
7797  * - sets all responseXXX fields accordingly
7798  * - finds the right dataType (mediates between content-type and expected dataType)
7799  * - returns the corresponding response
7800  */
7801 function ajaxHandleResponses( s, jqXHR, responses ) {
7802
7803         var ct, type, finalDataType, firstDataType,
7804                 contents = s.contents,
7805                 dataTypes = s.dataTypes,
7806                 responseFields = s.responseFields;
7807
7808         // Fill responseXXX fields
7809         for ( type in responseFields ) {
7810                 if ( type in responses ) {
7811                         jqXHR[ responseFields[type] ] = responses[ type ];
7812                 }
7813         }
7814
7815         // Remove auto dataType and get content-type in the process
7816         while( dataTypes[ 0 ] === "*" ) {
7817                 dataTypes.shift();
7818                 if ( ct === undefined ) {
7819                         ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
7820                 }
7821         }
7822
7823         // Check if we're dealing with a known content-type
7824         if ( ct ) {
7825                 for ( type in contents ) {
7826                         if ( contents[ type ] && contents[ type ].test( ct ) ) {
7827                                 dataTypes.unshift( type );
7828                                 break;
7829                         }
7830                 }
7831         }
7832
7833         // Check to see if we have a response for the expected dataType
7834         if ( dataTypes[ 0 ] in responses ) {
7835                 finalDataType = dataTypes[ 0 ];
7836         } else {
7837                 // Try convertible dataTypes
7838                 for ( type in responses ) {
7839                         if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
7840                                 finalDataType = type;
7841                                 break;
7842                         }
7843                         if ( !firstDataType ) {
7844                                 firstDataType = type;
7845                         }
7846                 }
7847                 // Or just use first one
7848                 finalDataType = finalDataType || firstDataType;
7849         }
7850
7851         // If we found a dataType
7852         // We add the dataType to the list if needed
7853         // and return the corresponding response
7854         if ( finalDataType ) {
7855                 if ( finalDataType !== dataTypes[ 0 ] ) {
7856                         dataTypes.unshift( finalDataType );
7857                 }
7858                 return responses[ finalDataType ];
7859         }
7860 }
7861
7862 // Chain conversions given the request and the original response
7863 function ajaxConvert( s, response ) {
7864
7865         var conv, conv2, current, tmp,
7866                 // Work with a copy of dataTypes in case we need to modify it for conversion
7867                 dataTypes = s.dataTypes.slice(),
7868                 prev = dataTypes[ 0 ],
7869                 converters = {},
7870                 i = 0;
7871
7872         // Apply the dataFilter if provided
7873         if ( s.dataFilter ) {
7874                 response = s.dataFilter( response, s.dataType );
7875         }
7876
7877         // Create converters map with lowercased keys
7878         if ( dataTypes[ 1 ] ) {
7879                 for ( conv in s.converters ) {
7880                         converters[ conv.toLowerCase() ] = s.converters[ conv ];
7881                 }
7882         }
7883
7884         // Convert to each sequential dataType, tolerating list modification
7885         for ( ; (current = dataTypes[++i]); ) {
7886
7887                 // There's only work to do if current dataType is non-auto
7888                 if ( current !== "*" ) {
7889
7890                         // Convert response if prev dataType is non-auto and differs from current
7891                         if ( prev !== "*" && prev !== current ) {
7892
7893                                 // Seek a direct converter
7894                                 conv = converters[ prev + " " + current ] || converters[ "* " + current ];
7895
7896                                 // If none found, seek a pair
7897                                 if ( !conv ) {
7898                                         for ( conv2 in converters ) {
7899
7900                                                 // If conv2 outputs current
7901                                                 tmp = conv2.split(" ");
7902                                                 if ( tmp[ 1 ] === current ) {
7903
7904                                                         // If prev can be converted to accepted input
7905                                                         conv = converters[ prev + " " + tmp[ 0 ] ] ||
7906                                                                 converters[ "* " + tmp[ 0 ] ];
7907                                                         if ( conv ) {
7908                                                                 // Condense equivalence converters
7909                                                                 if ( conv === true ) {
7910                                                                         conv = converters[ conv2 ];
7911
7912                                                                 // Otherwise, insert the intermediate dataType
7913                                                                 } else if ( converters[ conv2 ] !== true ) {
7914                                                                         current = tmp[ 0 ];
7915                                                                         dataTypes.splice( i--, 0, current );
7916                                                                 }
7917
7918                                                                 break;
7919                                                         }
7920                                                 }
7921                                         }
7922                                 }
7923
7924                                 // Apply converter (if not an equivalence)
7925                                 if ( conv !== true ) {
7926
7927                                         // Unless errors are allowed to bubble, catch and return them
7928                                         if ( conv && s["throws"] ) {
7929                                                 response = conv( response );
7930                                         } else {
7931                                                 try {
7932                                                         response = conv( response );
7933                                                 } catch ( e ) {
7934                                                         return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
7935                                                 }
7936                                         }
7937                                 }
7938                         }
7939
7940                         // Update prev for next iteration
7941                         prev = current;
7942                 }
7943         }
7944
7945         return { state: "success", data: response };
7946 }
7947 var oldCallbacks = [],
7948         rquestion = /\?/,
7949         rjsonp = /(=)\?(?=&|$)|\?\?/,
7950         nonce = jQuery.now();
7951
7952 // Default jsonp settings
7953 jQuery.ajaxSetup({
7954         jsonp: "callback",
7955         jsonpCallback: function() {
7956                 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
7957                 this[ callback ] = true;
7958                 return callback;
7959         }
7960 });
7961
7962 // Detect, normalize options and install callbacks for jsonp requests
7963 jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
7964
7965         var callbackName, overwritten, responseContainer,
7966                 data = s.data,
7967                 url = s.url,
7968                 hasCallback = s.jsonp !== false,
7969                 replaceInUrl = hasCallback && rjsonp.test( url ),
7970                 replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
7971                         !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
7972                         rjsonp.test( data );
7973
7974         // Handle iff the expected data type is "jsonp" or we have a parameter to set
7975         if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) {
7976
7977                 // Get callback name, remembering preexisting value associated with it
7978                 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
7979                         s.jsonpCallback() :
7980                         s.jsonpCallback;
7981                 overwritten = window[ callbackName ];
7982
7983                 // Insert callback into url or form data
7984                 if ( replaceInUrl ) {
7985                         s.url = url.replace( rjsonp, "$1" + callbackName );
7986                 } else if ( replaceInData ) {
7987                         s.data = data.replace( rjsonp, "$1" + callbackName );
7988                 } else if ( hasCallback ) {
7989                         s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
7990                 }
7991
7992                 // Use data converter to retrieve json after script execution
7993                 s.converters["script json"] = function() {
7994                         if ( !responseContainer ) {
7995                                 jQuery.error( callbackName + " was not called" );
7996                         }
7997                         return responseContainer[ 0 ];
7998                 };
7999
8000                 // force json dataType
8001                 s.dataTypes[ 0 ] = "json";
8002
8003                 // Install callback
8004                 window[ callbackName ] = function() {
8005                         responseContainer = arguments;
8006                 };
8007
8008                 // Clean-up function (fires after converters)
8009                 jqXHR.always(function() {
8010                         // Restore preexisting value
8011                         window[ callbackName ] = overwritten;
8012
8013                         // Save back as free
8014                         if ( s[ callbackName ] ) {
8015                                 // make sure that re-using the options doesn't screw things around
8016                                 s.jsonpCallback = originalSettings.jsonpCallback;
8017
8018                                 // save the callback name for future use
8019                                 oldCallbacks.push( callbackName );
8020                         }
8021
8022                         // Call if it was a function and we have a response
8023                         if ( responseContainer && jQuery.isFunction( overwritten ) ) {
8024                                 overwritten( responseContainer[ 0 ] );
8025                         }
8026
8027                         responseContainer = overwritten = undefined;
8028                 });
8029
8030                 // Delegate to script
8031                 return "script";
8032         }
8033 });
8034 // Install script dataType
8035 jQuery.ajaxSetup({
8036         accepts: {
8037                 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
8038         },
8039         contents: {
8040                 script: /javascript|ecmascript/
8041         },
8042         converters: {
8043                 "text script": function( text ) {
8044                         jQuery.globalEval( text );
8045                         return text;
8046                 }
8047         }
8048 });
8049
8050 // Handle cache's special case and global
8051 jQuery.ajaxPrefilter( "script", function( s ) {
8052         if ( s.cache === undefined ) {
8053                 s.cache = false;
8054         }
8055         if ( s.crossDomain ) {
8056                 s.type = "GET";
8057                 s.global = false;
8058         }
8059 });
8060
8061 // Bind script tag hack transport
8062 jQuery.ajaxTransport( "script", function(s) {
8063
8064         // This transport only deals with cross domain requests
8065         if ( s.crossDomain ) {
8066
8067                 var script,
8068                         head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
8069
8070                 return {
8071
8072                         send: function( _, callback ) {
8073
8074                                 script = document.createElement( "script" );
8075
8076                                 script.async = "async";
8077
8078                                 if ( s.scriptCharset ) {
8079                                         script.charset = s.scriptCharset;
8080                                 }
8081
8082                                 script.src = s.url;
8083
8084                                 // Attach handlers for all browsers
8085                                 script.onload = script.onreadystatechange = function( _, isAbort ) {
8086
8087                                         if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
8088
8089                                                 // Handle memory leak in IE
8090                                                 script.onload = script.onreadystatechange = null;
8091
8092                                                 // Remove the script
8093                                                 if ( head && script.parentNode ) {
8094                                                         head.removeChild( script );
8095                                                 }
8096
8097                                                 // Dereference the script
8098                                                 script = undefined;
8099
8100                                                 // Callback if not abort
8101                                                 if ( !isAbort ) {
8102                                                         callback( 200, "success" );
8103                                                 }
8104                                         }
8105                                 };
8106                                 // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
8107                                 // This arises when a base node is used (#2709 and #4378).
8108                                 head.insertBefore( script, head.firstChild );
8109                         },
8110
8111                         abort: function() {
8112                                 if ( script ) {
8113                                         script.onload( 0, 1 );
8114                                 }
8115                         }
8116                 };
8117         }
8118 });
8119 var xhrCallbacks,
8120         // #5280: Internet Explorer will keep connections alive if we don't abort on unload
8121         xhrOnUnloadAbort = window.ActiveXObject ? function() {
8122                 // Abort all pending requests
8123                 for ( var key in xhrCallbacks ) {
8124                         xhrCallbacks[ key ]( 0, 1 );
8125                 }
8126         } : false,
8127         xhrId = 0;
8128
8129 // Functions to create xhrs
8130 function createStandardXHR() {
8131         try {
8132                 return new window.XMLHttpRequest();
8133         } catch( e ) {}
8134 }
8135
8136 function createActiveXHR() {
8137         try {
8138                 return new window.ActiveXObject( "Microsoft.XMLHTTP" );
8139         } catch( e ) {}
8140 }
8141
8142 // Create the request object
8143 // (This is still attached to ajaxSettings for backward compatibility)
8144 jQuery.ajaxSettings.xhr = window.ActiveXObject ?
8145         /* Microsoft failed to properly
8146          * implement the XMLHttpRequest in IE7 (can't request local files),
8147          * so we use the ActiveXObject when it is available
8148          * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
8149          * we need a fallback.
8150          */
8151         function() {
8152                 return !this.isLocal && createStandardXHR() || createActiveXHR();
8153         } :
8154         // For all other browsers, use the standard XMLHttpRequest object
8155         createStandardXHR;
8156
8157 // Determine support properties
8158 (function( xhr ) {
8159         jQuery.extend( jQuery.support, {
8160                 ajax: !!xhr,
8161                 cors: !!xhr && ( "withCredentials" in xhr )
8162         });
8163 })( jQuery.ajaxSettings.xhr() );
8164
8165 // Create transport if the browser can provide an xhr
8166 if ( jQuery.support.ajax ) {
8167
8168         jQuery.ajaxTransport(function( s ) {
8169                 // Cross domain only allowed if supported through XMLHttpRequest
8170                 if ( !s.crossDomain || jQuery.support.cors ) {
8171
8172                         var callback;
8173
8174                         return {
8175                                 send: function( headers, complete ) {
8176
8177                                         // Get a new xhr
8178                                         var handle, i,
8179                                                 xhr = s.xhr();
8180
8181                                         // Open the socket
8182                                         // Passing null username, generates a login popup on Opera (#2865)
8183                                         if ( s.username ) {
8184                                                 xhr.open( s.type, s.url, s.async, s.username, s.password );
8185                                         } else {
8186                                                 xhr.open( s.type, s.url, s.async );
8187                                         }
8188
8189                                         // Apply custom fields if provided
8190                                         if ( s.xhrFields ) {
8191                                                 for ( i in s.xhrFields ) {
8192                                                         xhr[ i ] = s.xhrFields[ i ];
8193                                                 }
8194                                         }
8195
8196                                         // Override mime type if needed
8197                                         if ( s.mimeType && xhr.overrideMimeType ) {
8198                                                 xhr.overrideMimeType( s.mimeType );
8199                                         }
8200
8201                                         // X-Requested-With header
8202                                         // For cross-domain requests, seeing as conditions for a preflight are
8203                                         // akin to a jigsaw puzzle, we simply never set it to be sure.
8204                                         // (it can always be set on a per-request basis or even using ajaxSetup)
8205                                         // For same-domain requests, won't change header if already provided.
8206                                         if ( !s.crossDomain && !headers["X-Requested-With"] ) {
8207                                                 headers[ "X-Requested-With" ] = "XMLHttpRequest";
8208                                         }
8209
8210                                         // Need an extra try/catch for cross domain requests in Firefox 3
8211                                         try {
8212                                                 for ( i in headers ) {
8213                                                         xhr.setRequestHeader( i, headers[ i ] );
8214                                                 }
8215                                         } catch( _ ) {}
8216
8217                                         // Do send the request
8218                                         // This may raise an exception which is actually
8219                                         // handled in jQuery.ajax (so no try/catch here)
8220                                         xhr.send( ( s.hasContent && s.data ) || null );
8221
8222                                         // Listener
8223                                         callback = function( _, isAbort ) {
8224
8225                                                 var status,
8226                                                         statusText,
8227                                                         responseHeaders,
8228                                                         responses,
8229                                                         xml;
8230
8231                                                 // Firefox throws exceptions when accessing properties
8232                                                 // of an xhr when a network error occurred
8233                                                 // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
8234                                                 try {
8235
8236                                                         // Was never called and is aborted or complete
8237                                                         if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
8238
8239                                                                 // Only called once
8240                                                                 callback = undefined;
8241
8242                                                                 // Do not keep as active anymore
8243                                                                 if ( handle ) {
8244                                                                         xhr.onreadystatechange = jQuery.noop;
8245                                                                         if ( xhrOnUnloadAbort ) {
8246                                                                                 delete xhrCallbacks[ handle ];
8247                                                                         }
8248                                                                 }
8249
8250                                                                 // If it's an abort
8251                                                                 if ( isAbort ) {
8252                                                                         // Abort it manually if needed
8253                                                                         if ( xhr.readyState !== 4 ) {
8254                                                                                 xhr.abort();
8255                                                                         }
8256                                                                 } else {
8257                                                                         status = xhr.status;
8258                                                                         responseHeaders = xhr.getAllResponseHeaders();
8259                                                                         responses = {};
8260                                                                         xml = xhr.responseXML;
8261
8262                                                                         // Construct response list
8263                                                                         if ( xml && xml.documentElement /* #4958 */ ) {
8264                                                                                 responses.xml = xml;
8265                                                                         }
8266
8267                                                                         // When requesting binary data, IE6-9 will throw an exception
8268                                                                         // on any attempt to access responseText (#11426)
8269                                                                         try {
8270                                                                                 responses.text = xhr.responseText;
8271                                                                         } catch( _ ) {
8272                                                                         }
8273
8274                                                                         // Firefox throws an exception when accessing
8275                                                                         // statusText for faulty cross-domain requests
8276                                                                         try {
8277                                                                                 statusText = xhr.statusText;
8278                                                                         } catch( e ) {
8279                                                                                 // We normalize with Webkit giving an empty statusText
8280                                                                                 statusText = "";
8281                                                                         }
8282
8283                                                                         // Filter status for non standard behaviors
8284
8285                                                                         // If the request is local and we have data: assume a success
8286                                                                         // (success with no data won't get notified, that's the best we
8287                                                                         // can do given current implementations)
8288                                                                         if ( !status && s.isLocal && !s.crossDomain ) {
8289                                                                                 status = responses.text ? 200 : 404;
8290                                                                         // IE - #1450: sometimes returns 1223 when it should be 204
8291                                                                         } else if ( status === 1223 ) {
8292                                                                                 status = 204;
8293                                                                         }
8294                                                                 }
8295                                                         }
8296                                                 } catch( firefoxAccessException ) {
8297                                                         if ( !isAbort ) {
8298                                                                 complete( -1, firefoxAccessException );
8299                                                         }
8300                                                 }
8301
8302                                                 // Call complete if needed
8303                                                 if ( responses ) {
8304                                                         complete( status, statusText, responses, responseHeaders );
8305                                                 }
8306                                         };
8307
8308                                         if ( !s.async ) {
8309                                                 // if we're in sync mode we fire the callback
8310                                                 callback();
8311                                         } else if ( xhr.readyState === 4 ) {
8312                                                 // (IE6 & IE7) if it's in cache and has been
8313                                                 // retrieved directly we need to fire the callback
8314                                                 setTimeout( callback, 0 );
8315                                         } else {
8316                                                 handle = ++xhrId;
8317                                                 if ( xhrOnUnloadAbort ) {
8318                                                         // Create the active xhrs callbacks list if needed
8319                                                         // and attach the unload handler
8320                                                         if ( !xhrCallbacks ) {
8321                                                                 xhrCallbacks = {};
8322                                                                 jQuery( window ).unload( xhrOnUnloadAbort );
8323                                                         }
8324                                                         // Add to list of active xhrs callbacks
8325                                                         xhrCallbacks[ handle ] = callback;
8326                                                 }
8327                                                 xhr.onreadystatechange = callback;
8328                                         }
8329                                 },
8330
8331                                 abort: function() {
8332                                         if ( callback ) {
8333                                                 callback(0,1);
8334                                         }
8335                                 }
8336                         };
8337                 }
8338         });
8339 }
8340 var fxNow, timerId,
8341         rfxtypes = /^(?:toggle|show|hide)$/,
8342         rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
8343         rrun = /queueHooks$/,
8344         animationPrefilters = [ defaultPrefilter ],
8345         tweeners = {
8346                 "*": [function( prop, value ) {
8347                         var end, unit, prevScale,
8348                                 tween = this.createTween( prop, value ),
8349                                 parts = rfxnum.exec( value ),
8350                                 target = tween.cur(),
8351                                 start = +target || 0,
8352                                 scale = 1;
8353
8354                         if ( parts ) {
8355                                 end = +parts[2];
8356                                 unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
8357
8358                                 // We need to compute starting value
8359                                 if ( unit !== "px" && start ) {
8360                                         // Iteratively approximate from a nonzero starting point
8361                                         // Prefer the current property, because this process will be trivial if it uses the same units
8362                                         // Fallback to end or a simple constant
8363                                         start = jQuery.css( tween.elem, prop, true ) || end || 1;
8364
8365                                         do {
8366                                                 // If previous iteration zeroed out, double until we get *something*
8367                                                 // Use a string for doubling factor so we don't accidentally see scale as unchanged below
8368                                                 prevScale = scale = scale || ".5";
8369
8370                                                 // Adjust and apply
8371                                                 start = start / scale;
8372                                                 jQuery.style( tween.elem, prop, start + unit );
8373
8374                                                 // Update scale, tolerating zeroes from tween.cur()
8375                                                 scale = tween.cur() / target;
8376
8377                                         // Stop looping if we've hit the mark or scale is unchanged
8378                                         } while ( scale !== 1 && scale !== prevScale );
8379                                 }
8380
8381                                 tween.unit = unit;
8382                                 tween.start = start;
8383                                 // If a +=/-= token was provided, we're doing a relative animation
8384                                 tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
8385                         }
8386                         return tween;
8387                 }]
8388         };
8389
8390 // Animations created synchronously will run synchronously
8391 function createFxNow() {
8392         setTimeout(function() {
8393                 fxNow = undefined;
8394         }, 0 );
8395         return ( fxNow = jQuery.now() );
8396 }
8397
8398 function createTweens( animation, props ) {
8399         jQuery.each( props, function( prop, value ) {
8400                 var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
8401                         index = 0,
8402                         length = collection.length;
8403                 for ( ; index < length; index++ ) {
8404                         if ( collection[ index ].call( animation, prop, value ) ) {
8405
8406                                 // we're done with this property
8407                                 return;
8408                         }
8409                 }
8410         });
8411 }
8412
8413 function Animation( elem, properties, options ) {
8414         var result,
8415                 index = 0,
8416                 tweenerIndex = 0,
8417                 length = animationPrefilters.length,
8418                 deferred = jQuery.Deferred().always( function() {
8419                         // don't match elem in the :animated selector
8420                         delete tick.elem;
8421                 }),
8422                 tick = function() {
8423                         var currentTime = fxNow || createFxNow(),
8424                                 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
8425                                 percent = 1 - ( remaining / animation.duration || 0 ),
8426                                 index = 0,
8427                                 length = animation.tweens.length;
8428
8429                         for ( ; index < length ; index++ ) {
8430                                 animation.tweens[ index ].run( percent );
8431                         }
8432
8433                         deferred.notifyWith( elem, [ animation, percent, remaining ]);
8434
8435                         if ( percent < 1 && length ) {
8436                                 return remaining;
8437                         } else {
8438                                 deferred.resolveWith( elem, [ animation ] );
8439                                 return false;
8440                         }
8441                 },
8442                 animation = deferred.promise({
8443                         elem: elem,
8444                         props: jQuery.extend( {}, properties ),
8445                         opts: jQuery.extend( true, { specialEasing: {} }, options ),
8446                         originalProperties: properties,
8447                         originalOptions: options,
8448                         startTime: fxNow || createFxNow(),
8449                         duration: options.duration,
8450                         tweens: [],
8451                         createTween: function( prop, end, easing ) {
8452                                 var tween = jQuery.Tween( elem, animation.opts, prop, end,
8453                                                 animation.opts.specialEasing[ prop ] || animation.opts.easing );
8454                                 animation.tweens.push( tween );
8455                                 return tween;
8456                         },
8457                         stop: function( gotoEnd ) {
8458                                 var index = 0,
8459                                         // if we are going to the end, we want to run all the tweens
8460                                         // otherwise we skip this part
8461                                         length = gotoEnd ? animation.tweens.length : 0;
8462
8463                                 for ( ; index < length ; index++ ) {
8464                                         animation.tweens[ index ].run( 1 );
8465                                 }
8466
8467                                 // resolve when we played the last frame
8468                                 // otherwise, reject
8469                                 if ( gotoEnd ) {
8470                                         deferred.resolveWith( elem, [ animation, gotoEnd ] );
8471                                 } else {
8472                                         deferred.rejectWith( elem, [ animation, gotoEnd ] );
8473                                 }
8474                                 return this;
8475                         }
8476                 }),
8477                 props = animation.props;
8478
8479         propFilter( props, animation.opts.specialEasing );
8480
8481         for ( ; index < length ; index++ ) {
8482                 result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
8483                 if ( result ) {
8484                         return result;
8485                 }
8486         }
8487
8488         createTweens( animation, props );
8489
8490         if ( jQuery.isFunction( animation.opts.start ) ) {
8491                 animation.opts.start.call( elem, animation );
8492         }
8493
8494         jQuery.fx.timer(
8495                 jQuery.extend( tick, {
8496                         anim: animation,
8497                         queue: animation.opts.queue,
8498                         elem: elem
8499                 })
8500         );
8501
8502         // attach callbacks from options
8503         return animation.progress( animation.opts.progress )
8504                 .done( animation.opts.done, animation.opts.complete )
8505                 .fail( animation.opts.fail )
8506                 .always( animation.opts.always );
8507 }
8508
8509 function propFilter( props, specialEasing ) {
8510         var index, name, easing, value, hooks;
8511
8512         // camelCase, specialEasing and expand cssHook pass
8513         for ( index in props ) {
8514                 name = jQuery.camelCase( index );
8515                 easing = specialEasing[ name ];
8516                 value = props[ index ];
8517                 if ( jQuery.isArray( value ) ) {
8518                         easing = value[ 1 ];
8519                         value = props[ index ] = value[ 0 ];
8520                 }
8521
8522                 if ( index !== name ) {
8523                         props[ name ] = value;
8524                         delete props[ index ];
8525                 }
8526
8527                 hooks = jQuery.cssHooks[ name ];
8528                 if ( hooks && "expand" in hooks ) {
8529                         value = hooks.expand( value );
8530                         delete props[ name ];
8531
8532                         // not quite $.extend, this wont overwrite keys already present.
8533                         // also - reusing 'index' from above because we have the correct "name"
8534                         for ( index in value ) {
8535                                 if ( !( index in props ) ) {
8536                                         props[ index ] = value[ index ];
8537                                         specialEasing[ index ] = easing;
8538                                 }
8539                         }
8540                 } else {
8541                         specialEasing[ name ] = easing;
8542                 }
8543         }
8544 }
8545
8546 jQuery.Animation = jQuery.extend( Animation, {
8547
8548         tweener: function( props, callback ) {
8549                 if ( jQuery.isFunction( props ) ) {
8550                         callback = props;
8551                         props = [ "*" ];
8552                 } else {
8553                         props = props.split(" ");
8554                 }
8555
8556                 var prop,
8557                         index = 0,
8558                         length = props.length;
8559
8560                 for ( ; index < length ; index++ ) {
8561                         prop = props[ index ];
8562                         tweeners[ prop ] = tweeners[ prop ] || [];
8563                         tweeners[ prop ].unshift( callback );
8564                 }
8565         },
8566
8567         prefilter: function( callback, prepend ) {
8568                 if ( prepend ) {
8569                         animationPrefilters.unshift( callback );
8570                 } else {
8571                         animationPrefilters.push( callback );
8572                 }
8573         }
8574 });
8575
8576 function defaultPrefilter( elem, props, opts ) {
8577         var index, prop, value, length, dataShow, tween, hooks, oldfire,
8578                 anim = this,
8579                 style = elem.style,
8580                 orig = {},
8581                 handled = [],
8582                 hidden = elem.nodeType && isHidden( elem );
8583
8584         // handle queue: false promises
8585         if ( !opts.queue ) {
8586                 hooks = jQuery._queueHooks( elem, "fx" );
8587                 if ( hooks.unqueued == null ) {
8588                         hooks.unqueued = 0;
8589                         oldfire = hooks.empty.fire;
8590                         hooks.empty.fire = function() {
8591                                 if ( !hooks.unqueued ) {
8592                                         oldfire();
8593                                 }
8594                         };
8595                 }
8596                 hooks.unqueued++;
8597
8598                 anim.always(function() {
8599                         // doing this makes sure that the complete handler will be called
8600                         // before this completes
8601                         anim.always(function() {
8602                                 hooks.unqueued--;
8603                                 if ( !jQuery.queue( elem, "fx" ).length ) {
8604                                         hooks.empty.fire();
8605                                 }
8606                         });
8607                 });
8608         }
8609
8610         // height/width overflow pass
8611         if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
8612                 // Make sure that nothing sneaks out
8613                 // Record all 3 overflow attributes because IE does not
8614                 // change the overflow attribute when overflowX and
8615                 // overflowY are set to the same value
8616                 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
8617
8618                 // Set display property to inline-block for height/width
8619                 // animations on inline elements that are having width/height animated
8620                 if ( jQuery.css( elem, "display" ) === "inline" &&
8621                                 jQuery.css( elem, "float" ) === "none" ) {
8622
8623                         // inline-level elements accept inline-block;
8624                         // block-level elements need to be inline with layout
8625                         if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
8626                                 style.display = "inline-block";
8627
8628                         } else {
8629                                 style.zoom = 1;
8630                         }
8631                 }
8632         }
8633
8634         if ( opts.overflow ) {
8635                 style.overflow = "hidden";
8636                 if ( !jQuery.support.shrinkWrapBlocks ) {
8637                         anim.done(function() {
8638                                 style.overflow = opts.overflow[ 0 ];
8639                                 style.overflowX = opts.overflow[ 1 ];
8640                                 style.overflowY = opts.overflow[ 2 ];
8641                         });
8642                 }
8643         }
8644
8645
8646         // show/hide pass
8647         for ( index in props ) {
8648                 value = props[ index ];
8649                 if ( rfxtypes.exec( value ) ) {
8650                         delete props[ index ];
8651                         if ( value === ( hidden ? "hide" : "show" ) ) {
8652                                 continue;
8653                         }
8654                         handled.push( index );
8655                 }
8656         }
8657
8658         length = handled.length;
8659         if ( length ) {
8660                 dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
8661                 if ( hidden ) {
8662                         jQuery( elem ).show();
8663                 } else {
8664                         anim.done(function() {
8665                                 jQuery( elem ).hide();
8666                         });
8667                 }
8668                 anim.done(function() {
8669                         var prop;
8670                         jQuery.removeData( elem, "fxshow", true );
8671                         for ( prop in orig ) {
8672                                 jQuery.style( elem, prop, orig[ prop ] );
8673                         }
8674                 });
8675                 for ( index = 0 ; index < length ; index++ ) {
8676                         prop = handled[ index ];
8677                         tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
8678                         orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
8679
8680                         if ( !( prop in dataShow ) ) {
8681                                 dataShow[ prop ] = tween.start;
8682                                 if ( hidden ) {
8683                                         tween.end = tween.start;
8684                                         tween.start = prop === "width" || prop === "height" ? 1 : 0;
8685                                 }
8686                         }
8687                 }
8688         }
8689 }
8690
8691 function Tween( elem, options, prop, end, easing ) {
8692         return new Tween.prototype.init( elem, options, prop, end, easing );
8693 }
8694 jQuery.Tween = Tween;
8695
8696 Tween.prototype = {
8697         constructor: Tween,
8698         init: function( elem, options, prop, end, easing, unit ) {
8699                 this.elem = elem;
8700                 this.prop = prop;
8701                 this.easing = easing || "swing";
8702                 this.options = options;
8703                 this.start = this.now = this.cur();
8704                 this.end = end;
8705                 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
8706         },
8707         cur: function() {
8708                 var hooks = Tween.propHooks[ this.prop ];
8709
8710                 return hooks && hooks.get ?
8711                         hooks.get( this ) :
8712                         Tween.propHooks._default.get( this );
8713         },
8714         run: function( percent ) {
8715                 var eased,
8716                         hooks = Tween.propHooks[ this.prop ];
8717
8718                 this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration );
8719                 this.now = ( this.end - this.start ) * eased + this.start;
8720
8721                 if ( this.options.step ) {
8722                         this.options.step.call( this.elem, this.now, this );
8723                 }
8724
8725                 if ( hooks && hooks.set ) {
8726                         hooks.set( this );
8727                 } else {
8728                         Tween.propHooks._default.set( this );
8729                 }
8730                 return this;
8731         }
8732 };
8733
8734 Tween.prototype.init.prototype = Tween.prototype;
8735
8736 Tween.propHooks = {
8737         _default: {
8738                 get: function( tween ) {
8739                         var result;
8740
8741                         if ( tween.elem[ tween.prop ] != null &&
8742                                 (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
8743                                 return tween.elem[ tween.prop ];
8744                         }
8745
8746                         // passing any value as a 4th parameter to .css will automatically
8747                         // attempt a parseFloat and fallback to a string if the parse fails
8748                         // so, simple values such as "10px" are parsed to Float.
8749                         // complex values such as "rotate(1rad)" are returned as is.
8750                         result = jQuery.css( tween.elem, tween.prop, false, "" );
8751                         // Empty strings, null, undefined and "auto" are converted to 0.
8752                         return !result || result === "auto" ? 0 : result;
8753                 },
8754                 set: function( tween ) {
8755                         // use step hook for back compat - use cssHook if its there - use .style if its
8756                         // available and use plain properties where available
8757                         if ( jQuery.fx.step[ tween.prop ] ) {
8758                                 jQuery.fx.step[ tween.prop ]( tween );
8759                         } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
8760                                 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
8761                         } else {
8762                                 tween.elem[ tween.prop ] = tween.now;
8763                         }
8764                 }
8765         }
8766 };
8767
8768 // Remove in 2.0 - this supports IE8's panic based approach
8769 // to setting things on disconnected nodes
8770
8771 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
8772         set: function( tween ) {
8773                 if ( tween.elem.nodeType && tween.elem.parentNode ) {
8774                         tween.elem[ tween.prop ] = tween.now;
8775                 }
8776         }
8777 };
8778
8779 jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
8780         var cssFn = jQuery.fn[ name ];
8781         jQuery.fn[ name ] = function( speed, easing, callback ) {
8782                 return speed == null || typeof speed === "boolean" ||
8783                         // special check for .toggle( handler, handler, ... )
8784                         ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ?
8785                         cssFn.apply( this, arguments ) :
8786                         this.animate( genFx( name, true ), speed, easing, callback );
8787         };
8788 });
8789
8790 jQuery.fn.extend({
8791         fadeTo: function( speed, to, easing, callback ) {
8792
8793                 // show any hidden elements after setting opacity to 0
8794                 return this.filter( isHidden ).css( "opacity", 0 ).show()
8795
8796                         // animate to the value specified
8797                         .end().animate({ opacity: to }, speed, easing, callback );
8798         },
8799         animate: function( prop, speed, easing, callback ) {
8800                 var empty = jQuery.isEmptyObject( prop ),
8801                         optall = jQuery.speed( speed, easing, callback ),
8802                         doAnimation = function() {
8803                                 // Operate on a copy of prop so per-property easing won't be lost
8804                                 var anim = Animation( this, jQuery.extend( {}, prop ), optall );
8805
8806                                 // Empty animations resolve immediately
8807                                 if ( empty ) {
8808                                         anim.stop( true );
8809                                 }
8810                         };
8811
8812                 return empty || optall.queue === false ?
8813                         this.each( doAnimation ) :
8814                         this.queue( optall.queue, doAnimation );
8815         },
8816         stop: function( type, clearQueue, gotoEnd ) {
8817                 var stopQueue = function( hooks ) {
8818                         var stop = hooks.stop;
8819                         delete hooks.stop;
8820                         stop( gotoEnd );
8821                 };
8822
8823                 if ( typeof type !== "string" ) {
8824                         gotoEnd = clearQueue;
8825                         clearQueue = type;
8826                         type = undefined;
8827                 }
8828                 if ( clearQueue && type !== false ) {
8829                         this.queue( type || "fx", [] );
8830                 }
8831
8832                 return this.each(function() {
8833                         var dequeue = true,
8834                                 index = type != null && type + "queueHooks",
8835                                 timers = jQuery.timers,
8836                                 data = jQuery._data( this );
8837
8838                         if ( index ) {
8839                                 if ( data[ index ] && data[ index ].stop ) {
8840                                         stopQueue( data[ index ] );
8841                                 }
8842                         } else {
8843                                 for ( index in data ) {
8844                                         if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
8845                                                 stopQueue( data[ index ] );
8846                                         }
8847                                 }
8848                         }
8849
8850                         for ( index = timers.length; index--; ) {
8851                                 if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
8852                                         timers[ index ].anim.stop( gotoEnd );
8853                                         dequeue = false;
8854                                         timers.splice( index, 1 );
8855                                 }
8856                         }
8857
8858                         // start the next in the queue if the last step wasn't forced
8859                         // timers currently will call their complete callbacks, which will dequeue
8860                         // but only if they were gotoEnd
8861                         if ( dequeue || !gotoEnd ) {
8862                                 jQuery.dequeue( this, type );
8863                         }
8864                 });
8865         }
8866 });
8867
8868 // Generate parameters to create a standard animation
8869 function genFx( type, includeWidth ) {
8870         var which,
8871                 attrs = { height: type },
8872                 i = 0;
8873
8874         // if we include width, step value is 1 to do all cssExpand values,
8875         // if we don't include width, step value is 2 to skip over Left and Right
8876         for( ; i < 4 ; i += 2 - includeWidth ) {
8877                 which = cssExpand[ i ];
8878                 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
8879         }
8880
8881         if ( includeWidth ) {
8882                 attrs.opacity = attrs.width = type;
8883         }
8884
8885         return attrs;
8886 }
8887
8888 // Generate shortcuts for custom animations
8889 jQuery.each({
8890         slideDown: genFx("show"),
8891         slideUp: genFx("hide"),
8892         slideToggle: genFx("toggle"),
8893         fadeIn: { opacity: "show" },
8894         fadeOut: { opacity: "hide" },
8895         fadeToggle: { opacity: "toggle" }
8896 }, function( name, props ) {
8897         jQuery.fn[ name ] = function( speed, easing, callback ) {
8898                 return this.animate( props, speed, easing, callback );
8899         };
8900 });
8901
8902 jQuery.speed = function( speed, easing, fn ) {
8903         var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
8904                 complete: fn || !fn && easing ||
8905                         jQuery.isFunction( speed ) && speed,
8906                 duration: speed,
8907                 easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
8908         };
8909
8910         opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
8911                 opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
8912
8913         // normalize opt.queue - true/undefined/null -> "fx"
8914         if ( opt.queue == null || opt.queue === true ) {
8915                 opt.queue = "fx";
8916         }
8917
8918         // Queueing
8919         opt.old = opt.complete;
8920
8921         opt.complete = function() {
8922                 if ( jQuery.isFunction( opt.old ) ) {
8923                         opt.old.call( this );
8924                 }
8925
8926                 if ( opt.queue ) {
8927                         jQuery.dequeue( this, opt.queue );
8928                 }
8929         };
8930
8931         return opt;
8932 };
8933
8934 jQuery.easing = {
8935         linear: function( p ) {
8936                 return p;
8937         },
8938         swing: function( p ) {
8939                 return 0.5 - Math.cos( p*Math.PI ) / 2;
8940         }
8941 };
8942
8943 jQuery.timers = [];
8944 jQuery.fx = Tween.prototype.init;
8945 jQuery.fx.tick = function() {
8946         var timer,
8947                 timers = jQuery.timers,
8948                 i = 0;
8949
8950         for ( ; i < timers.length; i++ ) {
8951                 timer = timers[ i ];
8952                 // Checks the timer has not already been removed
8953                 if ( !timer() && timers[ i ] === timer ) {
8954                         timers.splice( i--, 1 );
8955                 }
8956         }
8957
8958         if ( !timers.length ) {
8959                 jQuery.fx.stop();
8960         }
8961 };
8962
8963 jQuery.fx.timer = function( timer ) {
8964         if ( timer() && jQuery.timers.push( timer ) && !timerId ) {
8965                 timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
8966         }
8967 };
8968
8969 jQuery.fx.interval = 13;
8970
8971 jQuery.fx.stop = function() {
8972         clearInterval( timerId );
8973         timerId = null;
8974 };
8975
8976 jQuery.fx.speeds = {
8977         slow: 600,
8978         fast: 200,
8979         // Default speed
8980         _default: 400
8981 };
8982
8983 // Back Compat <1.8 extension point
8984 jQuery.fx.step = {};
8985
8986 if ( jQuery.expr && jQuery.expr.filters ) {
8987         jQuery.expr.filters.animated = function( elem ) {
8988                 return jQuery.grep(jQuery.timers, function( fn ) {
8989                         return elem === fn.elem;
8990                 }).length;
8991         };
8992 }
8993 var rroot = /^(?:body|html)$/i;
8994
8995 jQuery.fn.offset = function( options ) {
8996         if ( arguments.length ) {
8997                 return options === undefined ?
8998                         this :
8999                         this.each(function( i ) {
9000                                 jQuery.offset.setOffset( this, options, i );
9001                         });
9002         }
9003
9004         var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left,
9005                 elem = this[ 0 ],
9006                 doc = elem && elem.ownerDocument;
9007
9008         if ( !doc ) {
9009                 return;
9010         }
9011
9012         if ( (body = doc.body) === elem ) {
9013                 return jQuery.offset.bodyOffset( elem );
9014         }
9015
9016         docElem = doc.documentElement;
9017
9018         // Make sure we're not dealing with a disconnected DOM node
9019         if ( !jQuery.contains( docElem, elem ) ) {
9020                 return { top: 0, left: 0 };
9021         }
9022
9023         box = elem.getBoundingClientRect();
9024         win = getWindow( doc );
9025         clientTop  = docElem.clientTop  || body.clientTop  || 0;
9026         clientLeft = docElem.clientLeft || body.clientLeft || 0;
9027         scrollTop  = win.pageYOffset || docElem.scrollTop;
9028         scrollLeft = win.pageXOffset || docElem.scrollLeft;
9029         top  = box.top  + scrollTop  - clientTop;
9030         left = box.left + scrollLeft - clientLeft;
9031
9032         return { top: top, left: left };
9033 };
9034
9035 jQuery.offset = {
9036
9037         bodyOffset: function( body ) {
9038                 var top = body.offsetTop,
9039                         left = body.offsetLeft;
9040
9041                 if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
9042                         top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
9043                         left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
9044                 }
9045
9046                 return { top: top, left: left };
9047         },
9048
9049         setOffset: function( elem, options, i ) {
9050                 var position = jQuery.css( elem, "position" );
9051
9052                 // set position first, in-case top/left are set even on static elem
9053                 if ( position === "static" ) {
9054                         elem.style.position = "relative";
9055                 }
9056
9057                 var curElem = jQuery( elem ),
9058                         curOffset = curElem.offset(),
9059                         curCSSTop = jQuery.css( elem, "top" ),
9060                         curCSSLeft = jQuery.css( elem, "left" ),
9061                         calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
9062                         props = {}, curPosition = {}, curTop, curLeft;
9063
9064                 // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
9065                 if ( calculatePosition ) {
9066                         curPosition = curElem.position();
9067                         curTop = curPosition.top;
9068                         curLeft = curPosition.left;
9069                 } else {
9070                         curTop = parseFloat( curCSSTop ) || 0;
9071                         curLeft = parseFloat( curCSSLeft ) || 0;
9072                 }
9073
9074                 if ( jQuery.isFunction( options ) ) {
9075                         options = options.call( elem, i, curOffset );
9076                 }
9077
9078                 if ( options.top != null ) {
9079                         props.top = ( options.top - curOffset.top ) + curTop;
9080                 }
9081                 if ( options.left != null ) {
9082                         props.left = ( options.left - curOffset.left ) + curLeft;
9083                 }
9084
9085                 if ( "using" in options ) {
9086                         options.using.call( elem, props );
9087                 } else {
9088                         curElem.css( props );
9089                 }
9090         }
9091 };
9092
9093
9094 jQuery.fn.extend({
9095
9096         position: function() {
9097                 if ( !this[0] ) {
9098                         return;
9099                 }
9100
9101                 var elem = this[0],
9102
9103                 // Get *real* offsetParent
9104                 offsetParent = this.offsetParent(),
9105
9106                 // Get correct offsets
9107                 offset       = this.offset(),
9108                 parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
9109
9110                 // Subtract element margins
9111                 // note: when an element has margin: auto the offsetLeft and marginLeft
9112                 // are the same in Safari causing offset.left to incorrectly be 0
9113                 offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
9114                 offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
9115
9116                 // Add offsetParent borders
9117                 parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
9118                 parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
9119
9120                 // Subtract the two offsets
9121                 return {
9122                         top:  offset.top  - parentOffset.top,
9123                         left: offset.left - parentOffset.left
9124                 };
9125         },
9126
9127         offsetParent: function() {
9128                 return this.map(function() {
9129                         var offsetParent = this.offsetParent || document.body;
9130                         while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
9131                                 offsetParent = offsetParent.offsetParent;
9132                         }
9133                         return offsetParent || document.body;
9134                 });
9135         }
9136 });
9137
9138
9139 // Create scrollLeft and scrollTop methods
9140 jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
9141         var top = /Y/.test( prop );
9142
9143         jQuery.fn[ method ] = function( val ) {
9144                 return jQuery.access( this, function( elem, method, val ) {
9145                         var win = getWindow( elem );
9146
9147                         if ( val === undefined ) {
9148                                 return win ? (prop in win) ? win[ prop ] :
9149                                         win.document.documentElement[ method ] :
9150                                         elem[ method ];
9151                         }
9152
9153                         if ( win ) {
9154                                 win.scrollTo(
9155                                         !top ? val : jQuery( win ).scrollLeft(),
9156                                          top ? val : jQuery( win ).scrollTop()
9157                                 );
9158
9159                         } else {
9160                                 elem[ method ] = val;
9161                         }
9162                 }, method, val, arguments.length, null );
9163         };
9164 });
9165
9166 function getWindow( elem ) {
9167         return jQuery.isWindow( elem ) ?
9168                 elem :
9169                 elem.nodeType === 9 ?
9170                         elem.defaultView || elem.parentWindow :
9171                         false;
9172 }
9173 // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
9174 jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
9175         jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
9176                 // margin is only for outerHeight, outerWidth
9177                 jQuery.fn[ funcName ] = function( margin, value ) {
9178                         var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
9179                                 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
9180
9181                         return jQuery.access( this, function( elem, type, value ) {
9182                                 var doc;
9183
9184                                 if ( jQuery.isWindow( elem ) ) {
9185                                         // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
9186                                         // isn't a whole lot we can do. See pull request at this URL for discussion:
9187                                         // https://github.com/jquery/jquery/pull/764
9188                                         return elem.document.documentElement[ "client" + name ];
9189                                 }
9190
9191                                 // Get document width or height
9192                                 if ( elem.nodeType === 9 ) {
9193                                         doc = elem.documentElement;
9194
9195                                         // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
9196                                         // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
9197                                         return Math.max(
9198                                                 elem.body[ "scroll" + name ], doc[ "scroll" + name ],
9199                                                 elem.body[ "offset" + name ], doc[ "offset" + name ],
9200                                                 doc[ "client" + name ]
9201                                         );
9202                                 }
9203
9204                                 return value === undefined ?
9205                                         // Get width or height on the element, requesting but not forcing parseFloat
9206                                         jQuery.css( elem, type, value, extra ) :
9207
9208                                         // Set width or height on the element
9209                                         jQuery.style( elem, type, value, extra );
9210                         }, type, chainable ? margin : undefined, chainable );
9211                 };
9212         });
9213 });
9214 // Expose jQuery to the global object
9215 window.jQuery = window.$ = jQuery;
9216
9217 // Expose jQuery as an AMD module, but only for AMD loaders that
9218 // understand the issues with loading multiple versions of jQuery
9219 // in a page that all might call define(). The loader will indicate
9220 // they have special allowances for multiple jQuery versions by
9221 // specifying define.amd.jQuery = true. Register as a named module,
9222 // since jQuery can be concatenated with other files that may use define,
9223 // but not use a proper concatenation script that understands anonymous
9224 // AMD modules. A named AMD is safest and most robust way to register.
9225 // Lowercase jquery is used because AMD module names are derived from
9226 // file names, and jQuery is normally delivered in a lowercase file name.
9227 // Do this after creating the global so that if an AMD module wants to call
9228 // noConflict to hide this version of jQuery, it will work.
9229 if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
9230         define( "jquery", [], function () { return jQuery; } );
9231 }
9232
9233 })( window );
9234
9235 $(document).ready(function(){
9236 /*
9237         $('#system h2').addClass('hide');
9238         $('#system table').addClass('hide');
9239         $('#cpuidle h2').addClass('hide');
9240         $('#cpuidle table').addClass('hide');
9241         $('#cpufreq h2').addClass('hide');
9242         $('#cpufreq table').addClass('hide');
9243 */
9244 //      $('#software h2').addClass('hide');
9245 //      $('#software table').addClass('hide');
9246         $('#device h2').addClass('hide');
9247         $('#device table').addClass('hide');
9248         $('#device p').addClass('hide');
9249 /*
9250         $('#tuning h2').addClass('hide');
9251         $('#tuning table').addClass('hide');
9252
9253         $('#top').append('<div class="SystemButton"   onclick="toggleSystem()">System Info</div>');
9254         $('#top').append('<div class="SummaryButton"  onclick="toggleSummary()">Summary</div>');
9255         $('#top').append('<div class="CpuidleButton"  onclick="toggleCpuidle()">CPU Idle</div>');
9256         $('#top').append('<div class="CpufreqButton"  onclick="toggleCpufreq()">CPU Frequency</div>');
9257 */
9258         $('#top').append('<div class="SoftwareButton" onclick="toggleSoftware()">Software info</div>');
9259         $('#top').append('<div class="DeviceButton"   onclick="toggleDevice()">Device Info</div>');
9260 //      $('#top').append('<div class="TuningButton"   onclick="toggleTuning()">Tuning</div>');
9261         $('#top').append('<div class="AllButton"      onclick="toggleAll()">All</div>');
9262 //      $('#top .SummaryButton').toggleClass('pressed');
9263         $('#top .SoftwareButton').toggleClass('pressed');
9264
9265     }
9266         );
9267 function toggleDummy() {
9268 /*
9269                 $('#system table').toggleClass('hide', true);
9270                 $('#system h2').toggleClass('hide', true);
9271                 $('#summary table').toggleClass('hide', true);
9272                 $('#summary h2').toggleClass('hide', true);
9273                 $('#summary p').toggleClass('hide', true);
9274                 $('#cpuidle table').toggleClass('hide', true);
9275                 $('#cpuidle h2').toggleClass('hide', true);
9276                 $('#cpufreq table').toggleClass('hide', true);
9277                 $('#cpufreq h2').toggleClass('hide', true);
9278 */
9279                 $('#software table').toggleClass('hide', true);
9280                 $('#software h2').toggleClass('hide', true);
9281                 $('#device table').toggleClass('hide', true);
9282                 $('#device h2').toggleClass('hide', true);
9283                 $('#device p').toggleClass('hide', true);
9284 /*
9285                 $('#tuning table').toggleClass('hide', true);
9286                 $('#tuning h2').toggleClass('hide', true);
9287                 $('#top .SystemButton').toggleClass('pressed', false);
9288                 $('#top .SummaryButton').toggleClass('pressed', false);
9289                 $('#top .CpuidleButton').toggleClass('pressed', false);
9290                 $('#top .CpufreqButton').toggleClass('pressed', false);
9291 */
9292                 $('#top .SoftwareButton').toggleClass('pressed', false);
9293                 $('#top .DeviceButton').toggleClass('pressed', false);
9294 //              $('#top .TuningButton').toggleClass('pressed', false);
9295                 $('#top .AllButton').toggleClass('pressed', false);
9296 }
9297 /*
9298 function toggleSystem() {
9299                 $('#system table').toggleClass('hide', false);
9300                 $('#system h2').toggleClass('hide', false);
9301                 $('#summary table').toggleClass('hide', true);
9302                 $('#summary h2').toggleClass('hide', true);
9303                 $('#summary p').toggleClass('hide', true);
9304                 $('#cpuidle table').toggleClass('hide', true);
9305                 $('#cpuidle h2').toggleClass('hide', true);
9306                 $('#cpufreq table').toggleClass('hide', true);
9307                 $('#cpufreq h2').toggleClass('hide', true);
9308                 $('#software table').toggleClass('hide', true);
9309                 $('#software h2').toggleClass('hide', true);
9310                 $('#device table').toggleClass('hide', true);
9311                 $('#device h2').toggleClass('hide', true);
9312                 $('#device p').toggleClass('hide', true);
9313                 $('#tuning table').toggleClass('hide', true);
9314                 $('#tuning h2').toggleClass('hide', true);
9315                 $('#top .SystemButton').toggleClass('pressed', true);
9316                 $('#top .SummaryButton').toggleClass('pressed', false);
9317                 $('#top .CpuidleButton').toggleClass('pressed', false);
9318                 $('#top .CpufreqButton').toggleClass('pressed', false);
9319                 $('#top .SoftwareButton').toggleClass('pressed', false);
9320                 $('#top .DeviceButton').toggleClass('pressed', false);
9321                 $('#top .TuningButton').toggleClass('pressed', false);
9322                 $('#top .AllButton').toggleClass('pressed', false);
9323 }
9324 function toggleSummary() {
9325                 $('#system table').toggleClass('hide', true);
9326                 $('#system h2').toggleClass('hide', true);
9327                 $('#summary table').toggleClass('hide', false);
9328                 $('#summary h2').toggleClass('hide', false);
9329                 $('#summary p').toggleClass('hide', false);
9330                 $('#cpuidle table').toggleClass('hide', true);
9331                 $('#cpuidle h2').toggleClass('hide', true);
9332                 $('#cpufreq table').toggleClass('hide', true);
9333                 $('#cpufreq h2').toggleClass('hide', true);
9334                 $('#software table').toggleClass('hide', true);
9335                 $('#software h2').toggleClass('hide', true);
9336                 $('#device table').toggleClass('hide', true);
9337                 $('#device h2').toggleClass('hide', true);
9338                 $('#device p').toggleClass('hide', true);
9339                 $('#tuning table').toggleClass('hide', true);
9340                 $('#tuning h2').toggleClass('hide', true);
9341                 $('#top .SystemButton').toggleClass('pressed', false);
9342                 $('#top .SummaryButton').toggleClass('pressed', true);
9343                 $('#top .CpuidleButton').toggleClass('pressed', false);
9344                 $('#top .CpufreqButton').toggleClass('pressed', false);
9345                 $('#top .SoftwareButton').toggleClass('pressed', false);
9346                 $('#top .DeviceButton').toggleClass('pressed', false);
9347                 $('#top .TuningButton').toggleClass('pressed', false);
9348                 $('#top .AllButton').toggleClass('pressed', false);
9349 }
9350 function toggleCpuidle() {
9351                 $('#system table').toggleClass('hide', true);
9352                 $('#system h2').toggleClass('hide', true);
9353                 $('#summary table').toggleClass('hide', true);
9354                 $('#summary h2').toggleClass('hide', true);
9355                 $('#summary p').toggleClass('hide', true);
9356                 $('#cpuidle table').toggleClass('hide', false);
9357                 $('#cpuidle h2').toggleClass('hide', false);
9358                 $('#cpufreq table').toggleClass('hide', true);
9359                 $('#cpufreq h2').toggleClass('hide', true);
9360                 $('#software table').toggleClass('hide', true);
9361                 $('#software h2').toggleClass('hide', true);
9362                 $('#device table').toggleClass('hide', true);
9363                 $('#device h2').toggleClass('hide', true);
9364                 $('#device p').toggleClass('hide', true);
9365                 $('#tuning table').toggleClass('hide', true);
9366                 $('#tuning h2').toggleClass('hide', true);
9367                 $('#top .SystemButton').toggleClass('pressed', false);
9368                 $('#top .SummaryButton').toggleClass('pressed', false);
9369                 $('#top .CpuidleButton').toggleClass('pressed', true);
9370                 $('#top .CpufreqButton').toggleClass('pressed', false);
9371                 $('#top .SoftwareButton').toggleClass('pressed', false);
9372                 $('#top .DeviceButton').toggleClass('pressed', false);
9373                 $('#top .TuningButton').toggleClass('pressed', false);
9374                 $('#top .AllButton').toggleClass('pressed', false);
9375
9376 }
9377 function toggleCpufreq() {
9378                 $('#system table').toggleClass('hide', true);
9379                 $('#system h2').toggleClass('hide', true);
9380                 $('#summary table').toggleClass('hide', true);
9381                 $('#summary h2').toggleClass('hide', true);
9382                 $('#summary p').toggleClass('hide', true);
9383                 $('#cpuidle table').toggleClass('hide', true);
9384                 $('#cpuidle h2').toggleClass('hide', true);
9385                 $('#cpufreq table').toggleClass('hide', false);
9386                 $('#cpufreq h2').toggleClass('hide', false);
9387                 $('#software table').toggleClass('hide', true);
9388                 $('#software h2').toggleClass('hide', true);
9389                 $('#device table').toggleClass('hide', true);
9390                 $('#device h2').toggleClass('hide', true);
9391                 $('#device p').toggleClass('hide', true);
9392                 $('#tuning table').toggleClass('hide', true);
9393                 $('#tuning h2').toggleClass('hide', true);
9394                 $('#top .SystemButton').toggleClass('pressed', false);
9395                 $('#top .SummaryButton').toggleClass('pressed', false);
9396                 $('#top .CpuidleButton').toggleClass('pressed', false);
9397                 $('#top .CpufreqButton').toggleClass('pressed', true);
9398                 $('#top .SoftwareButton').toggleClass('pressed', false);
9399                 $('#top .DeviceButton').toggleClass('pressed', false);
9400                 $('#top .TuningButton').toggleClass('pressed', false);
9401                 $('#top .AllButton').toggleClass('pressed', false);
9402 }
9403 */
9404 function toggleSoftware() {
9405 /*
9406                 $('#system table').toggleClass('hide', true);
9407                 $('#system h2').toggleClass('hide', true);
9408                 $('#summary table').toggleClass('hide', true);
9409                 $('#summary h2').toggleClass('hide', true);
9410                 $('#summary p').toggleClass('hide', true);
9411                 $('#cpuidle table').toggleClass('hide', true);
9412                 $('#cpuidle h2').toggleClass('hide', true);
9413                 $('#cpufreq table').toggleClass('hide', true);
9414                 $('#cpufreq h2').toggleClass('hide', true);
9415 */
9416                 $('#software table').toggleClass('hide', false);
9417                 $('#software h2').toggleClass('hide', false);
9418                 $('#device table').toggleClass('hide', true);
9419                 $('#device h2').toggleClass('hide', true);
9420                 $('#device p').toggleClass('hide', true);
9421 /*
9422                 $('#tuning table').toggleClass('hide', true);
9423                 $('#tuning h2').toggleClass('hide', true);
9424                 $('#top .SystemButton').toggleClass('pressed', false);
9425                 $('#top .SummaryButton').toggleClass('pressed', false);
9426                 $('#top .CpuidleButton').toggleClass('pressed', false);
9427                 $('#top .CpufreqButton').toggleClass('pressed', false);
9428 */
9429                 $('#top .SoftwareButton').toggleClass('pressed', true);
9430                 $('#top .DeviceButton').toggleClass('pressed', false);
9431 //              $('#top .TuningButton').toggleClass('pressed', false);
9432                 $('#top .AllButton').toggleClass('pressed', false);
9433 }
9434
9435 function toggleDevice() {
9436                 $('#system table').toggleClass('hide', true);
9437                 $('#system h2').toggleClass('hide', true);
9438                 $('#summary table').toggleClass('hide', true);
9439                 $('#summary h2').toggleClass('hide', true);
9440                 $('#summary p').toggleClass('hide', true);
9441                 $('#cpuidle table').toggleClass('hide', true);
9442                 $('#cpuidle h2').toggleClass('hide', true);
9443                 $('#cpufreq table').toggleClass('hide', true);
9444                 $('#cpufreq h2').toggleClass('hide', true);
9445                 $('#software table').toggleClass('hide', true);
9446                 $('#software h2').toggleClass('hide', true);
9447                 $('#device table').toggleClass('hide', false);
9448                 $('#device h2').toggleClass('hide', false);
9449                 $('#device p').toggleClass('hide', false);
9450                 $('#tuning table').toggleClass('hide', true);
9451                 $('#tuning h2').toggleClass('hide', true);
9452                 $('#top .SystemButton').toggleClass('pressed', false);
9453                 $('#top .SummaryButton').toggleClass('pressed', false);
9454                 $('#top .CpuidleButton').toggleClass('pressed', false);
9455                 $('#top .CpufreqButton').toggleClass('pressed', false);
9456                 $('#top .SoftwareButton').toggleClass('pressed', false);
9457                 $('#top .DeviceButton').toggleClass('pressed', true);
9458                 $('#top .TuningButton').toggleClass('pressed', false);
9459                 $('#top .AllButton').toggleClass('pressed', false);
9460 }
9461 /*
9462 function toggleTuning() {
9463                 $('#system table').toggleClass('hide', true);
9464                 $('#system h2').toggleClass('hide', true);
9465                 $('#summary table').toggleClass('hide', true);
9466                 $('#summary h2').toggleClass('hide', true);
9467                 $('#summary p').toggleClass('hide', true);
9468                 $('#cpuidle table').toggleClass('hide', true);
9469                 $('#cpuidle h2').toggleClass('hide', true);
9470                 $('#cpufreq table').toggleClass('hide', true);
9471                 $('#cpufreq h2').toggleClass('hide', true);
9472                 $('#software table').toggleClass('hide', true);
9473                 $('#software h2').toggleClass('hide', true);
9474                 $('#device table').toggleClass('hide', true);
9475                 $('#device h2').toggleClass('hide', true);
9476                 $('#device p').toggleClass('hide', true);
9477                 $('#tuning table').toggleClass('hide', false);
9478                 $('#tuning h2').toggleClass('hide', false);
9479                 $('#top .SystemButton').toggleClass('pressed', false);
9480                 $('#top .SummaryButton').toggleClass('pressed', false);
9481                 $('#top .CpuidleButton').toggleClass('pressed', false);
9482                 $('#top .CpufreqButton').toggleClass('pressed', false);
9483                 $('#top .SoftwareButton').toggleClass('pressed', false);
9484                 $('#top .DeviceButton').toggleClass('pressed', false);
9485                 $('#top .TuningButton').toggleClass('pressed', true);
9486                 $('#top .AllButton').toggleClass('pressed', false);
9487 }
9488 */
9489 function toggleAll() {
9490 /*
9491                 $('#system table').toggleClass('hide', false);
9492                 $('#system h2').toggleClass('hide', false);
9493                 $('#summary table').toggleClass('hide', false);
9494                 $('#summary h2').toggleClass('hide', false);
9495                 $('#summary p').toggleClass('hide', false);
9496                 $('#cpuidle table').toggleClass('hide', false);
9497                 $('#cpuidle h2').toggleClass('hide', false);
9498                 $('#cpufreq table').toggleClass('hide', false);
9499                 $('#cpufreq h2').toggleClass('hide', false);
9500 */
9501                 $('#software table').toggleClass('hide', false);
9502                 $('#software h2').toggleClass('hide', false);
9503                 $('#device table').toggleClass('hide', false);
9504                 $('#device h2').toggleClass('hide', false);
9505                 $('#device p').toggleClass('hide', false);
9506 /*
9507                 $('#tuning table').toggleClass('hide', false);
9508                 $('#tuning h2').toggleClass('hide', false);
9509                 $('#top .SystemButton').toggleClass('pressed', false);
9510                 $('#top .SummaryButton').toggleClass('pressed', false);
9511                 $('#top .CpuidleButton').toggleClass('pressed', false);
9512                 $('#top .CpufreqButton').toggleClass('pressed', false);
9513 */
9514                 $('#top .SoftwareButton').toggleClass('pressed', false);
9515                 $('#top .DeviceButton').toggleClass('pressed', false);
9516 //              $('#top .TuningButton').toggleClass('pressed', false);
9517                 $('#top .AllButton').toggleClass('pressed', true);
9518 }
9519 </script>
9520 <style type="text/css">
9521 table
9522 {
9523         background-color: #F8F8F8;
9524         color: black;
9525 }
9526
9527 th
9528 {
9529         text-align: right;
9530 }
9531 th.device
9532 {
9533         text-align: left;
9534 }
9535 th.process
9536 {
9537         text-align: left;
9538 }
9539
9540 td.package_odd
9541 {
9542         background-color: #E0ffE0;
9543         color: black;
9544         text-align: right;
9545 }
9546 td.package_even
9547 {
9548         background-color: #F0ffF0;
9549         color: black;
9550         text-align: right;
9551 }
9552
9553 td.core_even
9554 {
9555         background-color: #F0ffF0;
9556         color: black;
9557         text-align: right;
9558 }
9559
9560 td.core_odd
9561 {
9562         background-color: #E0E0ff;
9563         color: black;
9564         text-align: right;
9565 }
9566
9567 td.cpu_even_freq
9568 {
9569         background-color: #E2E2E2;
9570         color: black;
9571 }
9572
9573 td.cpu_odd_freq
9574 {
9575         background-color: #F4f4F4;
9576         color: black;
9577 }
9578
9579 td.cpu_even_even
9580 {
9581         background-color: #E0E0f0;
9582         color: black;
9583         text-align: right;
9584 }
9585
9586 td.cpu_even_odd
9587 {
9588         background-color: #F0f0F0;
9589         color: black;
9590         text-align: right;
9591 }
9592 td.cpu_odd_even
9593 {
9594         background-color: #E0E0ff;
9595         color: black;
9596         text-align: right;
9597 }
9598
9599 td.cpu_odd_odd
9600 {
9601         background-color: #F0ffF0;
9602         color: black;
9603         text-align: right;
9604 }
9605
9606 tr.device_odd
9607 {
9608         background-color: #E0E0E0;
9609         color: black;
9610 }
9611 tr.device_even
9612 {
9613         background-color: #F0f0F0;
9614         color: black;
9615 }
9616
9617 tr.process_odd
9618 {
9619         background-color: #E0E0E0;
9620         color: black;
9621 }
9622 tr.process_even
9623 {
9624         background-color: #F0f0F0;
9625         color: black;
9626 }
9627
9628 td.device_power
9629 {
9630         text-align: right;
9631 }
9632
9633 td.process_power
9634 {
9635         text-align: right;
9636 }
9637
9638 td.device_util
9639 {
9640         text-align: right;
9641 }
9642
9643 tr.tunable_odd
9644 {
9645         background-color: #E0E0E0;
9646         color: black;
9647 }
9648 tr.tunable_even
9649 {
9650         background-color: #F0f0F0;
9651         color: black;
9652 }
9653
9654 tr.tunable_odd_bad
9655 {
9656         background-color: #FFE0E0;
9657         color: black;
9658 }
9659 tr.tunable_even_bad
9660 {
9661         background-color: #FFf0F0;
9662         color: black;
9663 }
9664
9665 tr.system_odd
9666 {
9667         background-color: #E0E0E0;
9668         color: black;
9669 }
9670 tr.system_even
9671 {
9672         background-color: #F0f0F0;
9673         color: black;
9674 }
9675
9676 tr.device_odd
9677 {
9678         background-color: #E0E0E0;
9679         color: black;
9680 }
9681 tr.device_even
9682 {
9683         background-color: #F0f0F0;
9684         color: black;
9685 }
9686
9687 body {
9688         background-color: #eee; /* Background color */
9689         color: #222;            /* Foreground color used for text */
9690         font-family: Helvetica;
9691         font-size: 14px;
9692         margin: 0;              /* Amount of negative space around the
9693                                    outside of the body */
9694         padding: 0;             /* Amount of negative space around the
9695                                    inside of the body */
9696 }
9697 #top h1 {
9698         margin: 0;
9699         padding: 0;
9700 }
9701 #top h1 a {
9702         background-color: #ccc;
9703         border-bottom: 1px solid #666;
9704         color: #222;
9705         display: block;
9706         font-size: 20px;
9707         font-weight: bold;
9708         padding: 10px 0;
9709         text-align: center;
9710         text-decoration: none;
9711         text-shadow: 0px 1px 1px #fff;
9712         background-image: -webkit-gradient(linear, left top, left bottom,
9713                                                 from(#ccc), to(#999));
9714 }
9715
9716
9717 #top div {
9718         height: 30px;
9719         font-weight: bold;
9720         text-align: center;
9721         color: white;
9722         text-shadow: rgba(0,0,0,0.6) 0px -1px 1px;
9723         line-height: 28px;
9724         border-width:0px 8px 0px 8px;
9725 }
9726 #top div.SystemButton {
9727         position: absolute;
9728         top: 7px;
9729         left: 6px;
9730 }
9731 #top div.SummaryButton {
9732         position: absolute;
9733         top: 7px;
9734         left: 160px;
9735 }
9736 #top div.CpuidleButton {
9737         position: absolute;
9738         top: 7px;
9739         left: 320px;
9740 }
9741 #top div.CpufreqButton {
9742         position: absolute;
9743         top: 7px;
9744         left: 480px;
9745 }
9746 #top div.SoftwareButton {
9747         position: absolute;
9748         top: 7px;
9749 /*      left: 640px;*/
9750         left: 6px;
9751 }
9752 #top div.DeviceButton {
9753         position: absolute;
9754         top: 7px;
9755 /*      left: 800px;*/
9756         left: 160px;
9757 }
9758 #top div.TuningButton {
9759         position: absolute;
9760         top: 7px;
9761         left: 960px;
9762 }
9763 #top div.AllButton {
9764         position: absolute;
9765         top: 7px;
9766 /*      left: 1120px;*/
9767         left: 320px;
9768 }
9769 div.pressed {
9770         background-color: #000000;
9771         border: 1px solid #000000;
9772         color: #000000;
9773         display: block;
9774         border-width:0px 8px 0px 8px;
9775         -webkit-border-top-left-radius: 8px;
9776         -webkit-border-top-right-radius: 8px;
9777         -webkit-border-bottom-left-radius: 8px;
9778         -webkit-border-bottom-right-radius: 8px;
9779 }
9780 table.hide {
9781         display: none;
9782 }
9783 h2.hide {
9784         display: none;
9785 }
9786 p.hide {
9787         display: none
9788 }
9789 </style>
9790 </head>
9791
9792 <body>
9793 <div id="top">
9794 <h1><a href="#top">&nbsp;</a></h1>
9795 </div>