root/trunk/Wierszowki/Wierszowki.Web/Scripts/jquery-1.3.1-vsdoc.js @ 874

Wersja 752, 187.5 KB (wprowadzona przez marek, 17 years temu)

wiersz

Line 
1/*
2 * This file has been commented to support Visual Studio Intellisense.
3 * You should not use this file at runtime inside the browser--it is only
4 * intended to be used only for design-time IntelliSense.  Please use the
5 * standard jQuery library for all production use.
6 *
7 * Comment version: 1.3.1a
8 */
9
10/*
11 * jQuery JavaScript Library v1.3.1
12 * http://jquery.com/
13 *
14 * Copyright (c) 2009 John Resig
15 *
16 * Permission is hereby granted, free of charge, to any person obtaining
17 * a copy of this software and associated documentation files (the
18 * "Software"), to deal in the Software without restriction, including
19 * without limitation the rights to use, copy, modify, merge, publish,
20 * distribute, sublicense, and/or sell copies of the Software, and to
21 * permit persons to whom the Software is furnished to do so, subject to
22 * the following conditions:
23 *
24 * The above copyright notice and this permission notice shall be
25 * included in all copies or substantial portions of the Software.
26 *
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 *
35 * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009)
36 * Revision: 6158
37 */
38
39(function(){
40
41var
42        // Will speed up references to window, and allows munging its name.
43        window = this,
44        // Will speed up references to undefined, and allows munging its name.
45        undefined,
46        // Map over jQuery in case of overwrite
47        _jQuery = window.jQuery,
48        // Map over the $ in case of overwrite
49        _$ = window.$,
50
51        jQuery = window.jQuery = window.$ = function(selector, context) {
52        ///     <summary>
53        ///             1: $(expression, context) - This function accepts a string containing a CSS selector which is then used to match a set of elements.
54        ///             2: $(html) - Create DOM elements on-the-fly from the provided String of raw HTML.
55        ///             3: $(elements) - Wrap jQuery functionality around a single or multiple DOM Element(s).
56        ///             4: $(callback) - A shorthand for $(document).ready().
57        ///     </summary>
58        ///     <param name="selector" type="String">
59        ///             1: expression - An expression to search with.
60        ///             2: html - A string of HTML to create on the fly.
61        ///             3: elements - DOM element(s) to be encapsulated by a jQuery object.
62        ///             4: callback - The function to execute when the DOM is ready.
63        ///     </param>
64        ///     <param name="context" type="jQuery">
65        ///             1: context - A DOM Element, Document or jQuery to use as context.
66        ///     </param>
67        /// <field name="selector" Type="Object">
68        ///     The DOM node context originally passed to jQuery() (if none was passed then context will be equal to the document).
69        /// </field>
70        /// <field name="context" Type="String">
71        ///     A selector representing selector originally passed to jQuery().
72        /// </field>
73        ///     <returns type="jQuery" />
74       
75                // The jQuery object is actually just the init constructor 'enhanced'
76                return new jQuery.fn.init( selector, context );
77        },
78
79        // A simple way to check for HTML strings or ID strings
80        // (both of which we optimize for)
81        quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
82        // Is it a simple selector
83        isSimple = /^.[^:#\[\.,]*$/;
84
85jQuery.fn = jQuery.prototype = {
86        init: function( selector, context ) {
87                ///     <summary>
88                ///             1: $(expression, context) - This function accepts a string containing a CSS selector which is then used to match a set of elements.
89                ///             2: $(html) - Create DOM elements on-the-fly from the provided String of raw HTML.
90                ///             3: $(elements) - Wrap jQuery functionality around a single or multiple DOM Element(s).
91                ///             4: $(callback) - A shorthand for $(document).ready().
92                ///     </summary>
93                ///     <param name="selector" type="String">
94                ///             1: expression - An expression to search with.
95                ///             2: html - A string of HTML to create on the fly.
96                ///             3: elements - DOM element(s) to be encapsulated by a jQuery object.
97                ///             4: callback - The function to execute when the DOM is ready.
98                ///     </param>
99                ///     <param name="context" type="jQuery">
100                ///             1: context - A DOM Element, Document or jQuery to use as context.
101                ///     </param>
102                ///     <returns type="jQuery" />
103
104                // Make sure that a selection was provided
105                selector = selector || document;
106
107                // Handle $(DOMElement)
108                if ( selector.nodeType ) {
109                        this[0] = selector;
110                        this.length = 1;
111                        this.context = selector;
112                        return this;
113                }
114                // Handle HTML strings
115                if (typeof selector === "string") {
116                    // Are we dealing with HTML string or an ID?
117                    var match = quickExpr.exec(selector);
118
119                    // Verify a match, and that no context was specified for #id
120                    if (match && (match[1] || !context)) {
121
122                        // HANDLE: $(html) -> $(array)
123                        if (match[1])
124                            selector = jQuery.clean([match[1]], context);
125
126                        // HANDLE: $("#id")
127                        else {
128                            var elem = document.getElementById(match[3]);
129
130                            // Handle the case where IE and Opera return items
131                            // by name instead of ID
132                            if (elem && elem.id != match[3])
133                                return jQuery().find(selector);
134
135                            // Otherwise, we inject the element directly into the jQuery object
136                            var ret = jQuery(elem || []);
137                            ret.context = document;
138                            ret.selector = selector;
139                            return ret;
140                        }
141
142                        // HANDLE: $(expr, [context])
143                        // (which is just equivalent to: $(content).find(expr)
144                    } else
145                        return jQuery(context).find(selector);
146
147                    // HANDLE: $(function)
148                    // Shortcut for document ready
149                } else if ( jQuery.isFunction( selector ) )
150                        return jQuery( document ).ready( selector );
151
152                // Make sure that old selector state is passed along
153                if ( selector.selector && selector.context ) {
154                        this.selector = selector.selector;
155                        this.context = selector.context;
156                }
157
158                return this.setArray(jQuery.makeArray(selector));
159        },
160
161        // Start with an empty selector
162        selector: "",
163
164        // The current version of jQuery being used
165        jquery: "1.3.1",
166
167        // The number of elements contained in the matched element set
168        size: function() {
169                ///     <summary>
170                ///             The number of elements currently matched.
171                ///             Part of Core
172                ///     </summary>
173                ///     <returns type="Number" />
174
175                return this.length;
176        },
177
178        // Get the Nth element in the matched element set OR
179        // Get the whole matched element set as a clean array
180        get: function( num ) {
181                ///     <summary>
182                ///             Access a single matched element. num is used to access the
183                ///             Nth element matched.
184                ///             Part of Core
185                ///     </summary>
186                ///     <returns type="Element" />
187                ///     <param name="num" type="Number">
188                ///             Access the element in the Nth position.
189                ///     </param>
190
191                return num == undefined ?
192
193                        // Return a 'clean' array
194                        jQuery.makeArray( this ) :
195
196                        // Return just the object
197                        this[ num ];
198        },
199
200        // Take an array of elements and push it onto the stack
201        // (returning the new matched element set)
202        pushStack: function( elems, name, selector ) {
203                ///     <summary>
204                ///             Set the jQuery object to an array of elements, while maintaining
205                ///             the stack.
206                ///             Part of Core
207                ///     </summary>
208                ///     <returns type="jQuery" />
209                ///     <param name="elems" type="Elements">
210                ///             An array of elements
211                ///     </param>
212               
213                // Build a new jQuery matched element set
214                var ret = jQuery( elems );
215
216                // Add the old object onto the stack (as a reference)
217                ret.prevObject = this;
218
219                ret.context = this.context;
220
221                if ( name === "find" )
222                        ret.selector = this.selector + (this.selector ? " " : "") + selector;
223                else if ( name )
224                        ret.selector = this.selector + "." + name + "(" + selector + ")";
225
226                // Return the newly-formed element set
227                return ret;
228        },
229
230        // Force the current matched set of elements to become
231        // the specified array of elements (destroying the stack in the process)
232        // You should use pushStack() in order to do this, but maintain the stack
233        setArray: function( elems ) {
234                ///     <summary>
235                ///             Set the jQuery object to an array of elements. This operation is
236                ///             completely destructive - be sure to use .pushStack() if you wish to maintain
237                ///             the jQuery stack.
238                ///             Part of Core
239                ///     </summary>
240                ///     <returns type="jQuery" />
241                ///     <param name="elems" type="Elements">
242                ///             An array of elements
243                ///     </param>
244               
245                // Resetting the length to 0, then using the native Array push
246                // is a super-fast way to populate an object with array-like properties
247                this.length = 0;
248                Array.prototype.push.apply( this, elems );
249
250                return this;
251        },
252
253        // Execute a callback for every element in the matched set.
254        // (You can seed the arguments with an array of args, but this is
255        // only used internally.)
256        each: function( callback, args ) {
257                ///     <summary>
258                ///             Execute a function within the context of every matched element.
259                ///             This means that every time the passed-in function is executed
260                ///             (which is once for every element matched) the 'this' keyword
261                ///             points to the specific element.
262                ///             Additionally, the function, when executed, is passed a single
263                ///             argument representing the position of the element in the matched
264                ///             set.
265                ///             Part of Core
266                ///     </summary>
267                ///     <returns type="jQuery" />
268                ///     <param name="callback" type="Function">
269                ///             A function to execute
270                ///     </param>
271
272                return jQuery.each( this, callback, args );
273        },
274
275        // Determine the position of an element within
276        // the matched set of elements
277        index: function( elem ) {
278                ///     <summary>
279                ///             Searches every matched element for the object and returns
280                ///             the index of the element, if found, starting with zero.
281                ///             Returns -1 if the object wasn't found.
282                ///             Part of Core
283                ///     </summary>
284                ///     <returns type="Number" />
285                ///     <param name="elem" type="Element">
286                ///             Object to search for
287                ///     </param>
288
289                // Locate the position of the desired element
290                return jQuery.inArray(
291                        // If it receives a jQuery object, the first element is used
292                        elem && elem.jquery ? elem[0] : elem
293                , this );
294        },
295
296        attr: function( name, value, type ) {
297                ///     <summary>
298                ///             Set a single property to a computed value, on all matched elements.
299                ///             Instead of a value, a function is provided, that computes the value.
300                ///             Part of DOM/Attributes
301                ///     </summary>
302                ///     <returns type="jQuery" />
303                ///     <param name="name" type="String">
304                ///             The name of the property to set.
305                ///     </param>
306                ///     <param name="value" type="Function">
307                ///             A function returning the value to set.
308                ///     </param>
309
310                var options = name;
311
312                // Look for the case where we're accessing a style value
313                if ( typeof name === "string" )
314                        if ( value === undefined )
315                                return this[0] && jQuery[ type || "attr" ]( this[0], name );
316
317                        else {
318                                options = {};
319                                options[ name ] = value;
320                        }
321
322                // Check to see if we're setting style values
323                return this.each(function(i){
324                        // Set all the styles
325                        for ( name in options )
326                                jQuery.attr(
327                                        type ?
328                                                this.style :
329                                                this,
330                                        name, jQuery.prop( this, options[ name ], type, i, name )
331                                );
332                });
333        },
334
335        css: function( key, value ) {
336                ///     <summary>
337                ///             Set a single style property to a value, on all matched elements.
338                ///             If a number is provided, it is automatically converted into a pixel value.
339                ///             Part of CSS
340                ///     </summary>
341                ///     <returns type="jQuery" />
342                ///     <param name="key" type="String">
343                ///             The name of the property to set.
344                ///     </param>
345                ///     <param name="value" type="String">
346                ///             The value to set the property to.
347                ///     </param>
348
349                // ignore negative width and height values
350                if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
351                        value = undefined;
352                return this.attr( key, value, "curCSS" );
353        },
354
355        text: function( text ) {
356                ///     <summary>
357                ///             Set the text contents of all matched elements.
358                ///             Similar to html(), but escapes HTML (replace &quot;&lt;&quot; and &quot;&gt;&quot; with their
359                ///             HTML entities).
360                ///             Part of DOM/Attributes
361                ///     </summary>
362                ///     <returns type="String" />
363                ///     <param name="text" type="String">
364                ///             The text value to set the contents of the element to.
365                ///     </param>
366
367                if ( typeof text !== "object" && text != null )
368                        return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
369
370                var ret = "";
371
372                jQuery.each( text || this, function(){
373                        jQuery.each( this.childNodes, function(){
374                                if ( this.nodeType != 8 )
375                                        ret += this.nodeType != 1 ?
376                                                this.nodeValue :
377                                                jQuery.fn.text( [ this ] );
378                        });
379                });
380
381                return ret;
382        },
383
384        wrapAll: function( html ) {
385                ///     <summary>
386                ///             Wrap all matched elements with a structure of other elements.
387                ///             This wrapping process is most useful for injecting additional
388                ///             stucture into a document, without ruining the original semantic
389                ///             qualities of a document.
390                ///             This works by going through the first element
391                ///             provided and finding the deepest ancestor element within its
392                ///             structure - it is that element that will en-wrap everything else.
393                ///             This does not work with elements that contain text. Any necessary text
394                ///             must be added after the wrapping is done.
395                ///             Part of DOM/Manipulation
396                ///     </summary>
397                ///     <returns type="jQuery" />
398                ///     <param name="html" type="Element">
399                ///             A DOM element that will be wrapped around the target.
400                ///     </param>
401
402                if ( this[0] ) {
403                        // The elements to wrap the target around
404                        var wrap = jQuery( html, this[0].ownerDocument ).clone();
405
406                        if ( this[0].parentNode )
407                                wrap.insertBefore( this[0] );
408
409                        wrap.map(function(){
410                                var elem = this;
411
412                                while ( elem.firstChild )
413                                        elem = elem.firstChild;
414
415                                return elem;
416                        }).append(this);
417                }
418
419                return this;
420        },
421
422        wrapInner: function( html ) {
423                ///     <summary>
424                ///             Wraps the inner child contents of each matched elemenht (including text nodes) with an HTML structure.
425                ///     </summary>
426                ///     <param name="html" type="String">
427                ///             A string of HTML or a DOM element that will be wrapped around the target contents.
428                ///     </param>
429                ///     <returns type="jQuery" />
430
431                return this.each(function(){
432                        jQuery( this ).contents().wrapAll( html );
433                });
434        },
435
436        wrap: function( html ) {
437                ///     <summary>
438                ///             Wrap all matched elements with a structure of other elements.
439                ///             This wrapping process is most useful for injecting additional
440                ///             stucture into a document, without ruining the original semantic
441                ///             qualities of a document.
442                ///             This works by going through the first element
443                ///             provided and finding the deepest ancestor element within its
444                ///             structure - it is that element that will en-wrap everything else.
445                ///             This does not work with elements that contain text. Any necessary text
446                ///             must be added after the wrapping is done.
447                ///             Part of DOM/Manipulation
448                ///     </summary>
449                ///     <returns type="jQuery" />
450                ///     <param name="html" type="Element">
451                ///             A DOM element that will be wrapped around the target.
452                ///     </param>
453               
454                return this.each(function(){
455                        jQuery( this ).wrapAll( html );
456                });
457        },
458
459        append: function() {
460                ///     <summary>
461                ///             Append content to the inside of every matched element.
462                ///             This operation is similar to doing an appendChild to all the
463                ///             specified elements, adding them into the document.
464                ///             Part of DOM/Manipulation
465                ///     </summary>
466                ///     <returns type="jQuery" />
467                ///     <param name="content" type="Content">
468                ///             Content to append to the target
469                ///     </param>
470
471                return this.domManip(arguments, true, function(elem){
472                        if (this.nodeType == 1)
473                                this.appendChild( elem );
474                });
475        },
476
477        prepend: function() {
478                ///     <summary>
479                ///             Prepend content to the inside of every matched element.
480                ///             This operation is the best way to insert elements
481                ///             inside, at the beginning, of all matched elements.
482                ///             Part of DOM/Manipulation
483                ///     </summary>
484                ///     <returns type="jQuery" />
485                ///     <param name="" type="Content">
486                ///             Content to prepend to the target.
487                ///     </param>
488
489                return this.domManip(arguments, true, function(elem){
490                        if (this.nodeType == 1)
491                                this.insertBefore( elem, this.firstChild );
492                });
493        },
494
495        before: function() {
496                ///     <summary>
497                ///             Insert content before each of the matched elements.
498                ///             Part of DOM/Manipulation
499                ///     </summary>
500                ///     <returns type="jQuery" />
501                ///     <param name="" type="Content">
502                ///             Content to insert before each target.
503                ///     </param>
504
505                return this.domManip(arguments, false, function(elem){
506                        this.parentNode.insertBefore( elem, this );
507                });
508        },
509
510        after: function() {
511                ///     <summary>
512                ///             Insert content after each of the matched elements.
513                ///             Part of DOM/Manipulation
514                ///     </summary>
515                ///     <returns type="jQuery" />
516                ///     <param name="" type="Content">
517                ///             Content to insert after each target.
518                ///     </param>
519
520                return this.domManip(arguments, false, function(elem){
521                        this.parentNode.insertBefore( elem, this.nextSibling );
522                });
523        },
524
525        end: function() {
526                ///     <summary>
527                ///             End the most recent 'destructive' operation, reverting the list of matched elements
528                ///             back to its previous state. After an end operation, the list of matched elements will
529                ///             revert to the last state of matched elements.
530                ///             If there was no destructive operation before, an empty set is returned.
531                ///             Part of DOM/Traversing
532                ///     </summary>
533                ///     <returns type="jQuery" />
534
535                return this.prevObject || jQuery( [] );
536        },
537
538        // For internal use only.
539        // Behaves like an Array's .push method, not like a jQuery method.
540        push: [].push,
541
542        find: function( selector ) {
543                ///     <summary>
544                ///             Searches for all elements that match the specified expression.
545                ///             This method is a good way to find additional descendant
546                ///             elements with which to process.
547                ///             All searching is done using a jQuery expression. The expression can be
548                ///             written using CSS 1-3 Selector syntax, or basic XPath.
549                ///             Part of DOM/Traversing
550                ///     </summary>
551                ///     <returns type="jQuery" />
552                ///     <param name="selector" type="String">
553                ///             An expression to search with.
554                ///     </param>
555                ///     <returns type="jQuery" />
556
557                if ( this.length === 1 && !/,/.test(selector) ) {
558                        var ret = this.pushStack( [], "find", selector );
559                        ret.length = 0;
560                        jQuery.find( selector, this[0], ret );
561                        return ret;
562                } else {
563                        var elems = jQuery.map(this, function(elem){
564                                return jQuery.find( selector, elem );
565                        });
566
567                        return this.pushStack( /[^+>] [^+>]/.test( selector ) ?
568                                jQuery.unique( elems ) :
569                                elems, "find", selector );
570                }
571        },
572
573        clone: function( events ) {
574                ///     <summary>
575                ///             Clone matched DOM Elements and select the clones.
576                ///             This is useful for moving copies of the elements to another
577                ///             location in the DOM.
578                ///             Part of DOM/Manipulation
579                ///     </summary>
580                ///     <returns type="jQuery" />
581                ///     <param name="deep" type="Boolean" optional="true">
582                ///             (Optional) Set to false if you don't want to clone all descendant nodes, in addition to the element itself.
583                ///     </param>
584
585                // Do the clone
586                var ret = this.map(function(){
587                        if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
588                                // IE copies events bound via attachEvent when
589                                // using cloneNode. Calling detachEvent on the
590                                // clone will also remove the events from the orignal
591                                // In order to get around this, we use innerHTML.
592                                // Unfortunately, this means some modifications to
593                                // attributes in IE that are actually only stored
594                                // as properties will not be copied (such as the
595                                // the name attribute on an input).
596                                var clone = this.cloneNode(true),
597                                        container = document.createElement("div");
598                                container.appendChild(clone);
599                                return jQuery.clean([container.innerHTML])[0];
600                        } else
601                                return this.cloneNode(true);
602                });
603
604                // Need to set the expando to null on the cloned set if it exists
605                // removeData doesn't work here, IE removes it from the original as well
606                // this is primarily for IE but the data expando shouldn't be copied over in any browser
607                var clone = ret.find("*").andSelf().each(function(){
608                        if ( this[ expando ] !== undefined )
609                                this[ expando ] = null;
610                });
611
612                // Copy the events from the original to the clone
613                if ( events === true )
614                        this.find("*").andSelf().each(function(i){
615                                if (this.nodeType == 3)
616                                        return;
617                                var events = jQuery.data( this, "events" );
618
619                                for ( var type in events )
620                                        for ( var handler in events[ type ] )
621                                                jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
622                        });
623
624                // Return the cloned set
625                return ret;
626        },
627
628        filter: function( selector ) {
629                ///     <summary>
630                ///             Removes all elements from the set of matched elements that do not
631                ///             pass the specified filter. This method is used to narrow down
632                ///             the results of a search.
633                ///             })
634                ///             Part of DOM/Traversing
635                ///     </summary>
636                ///     <returns type="jQuery" />
637                ///     <param name="selector" type="Function">
638                ///             A function to use for filtering
639                ///     </param>
640                ///     <returns type="jQuery" />
641       
642                return this.pushStack(
643                        jQuery.isFunction( selector ) &&
644                        jQuery.grep(this, function(elem, i){
645                                return selector.call( elem, i );
646                        }) ||
647
648                        jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
649                                return elem.nodeType === 1;
650                        }) ), "filter", selector );
651        },
652
653        closest: function( selector ) {
654                ///     <summary>
655                ///             Get a set of elements containing the closest parent element that matches the specified selector, the starting element included.
656                ///     </summary>
657                ///     <returns type="jQuery" />
658                ///     <param name="selector" type="Function">
659                ///             An expression to filter the elements with.
660                ///     </param>
661                ///     <returns type="jQuery" />
662
663                var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null;
664
665                return this.map(function(){
666                        var cur = this;
667                        while ( cur && cur.ownerDocument ) {
668                                if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) )
669                                        return cur;
670                                cur = cur.parentNode;
671                        }
672                });
673        },
674
675        not: function( selector ) {
676                ///     <summary>
677                ///             Removes any elements inside the array of elements from the set
678                ///             of matched elements. This method is used to remove one or more
679                ///             elements from a jQuery object.
680                ///             Part of DOM/Traversing
681                ///     </summary>
682                ///     <param name="selector" type="jQuery">
683                ///             A set of elements to remove from the jQuery set of matched elements.
684                ///     </param>
685                ///     <returns type="jQuery" />
686
687                if ( typeof selector === "string" )
688                        // test special case where just one selector is passed in
689                        if ( isSimple.test( selector ) )
690                                return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
691                        else
692                                selector = jQuery.multiFilter( selector, this );
693
694                var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
695                return this.filter(function() {
696                        return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
697                });
698        },
699
700        add: function( selector ) {
701                ///     <summary>
702                ///             Adds one or more Elements to the set of matched elements.
703                ///             Part of DOM/Traversing
704                ///     </summary>
705                ///     <param name="elements" type="Element">
706                ///             One or more Elements to add
707                ///     </param>
708                ///     <returns type="jQuery" />
709       
710                return this.pushStack( jQuery.unique( jQuery.merge(
711                        this.get(),
712                        typeof selector === "string" ?
713                                jQuery( selector ) :
714                                jQuery.makeArray( selector )
715                )));
716        },
717
718        is: function( selector ) {
719                ///     <summary>
720                ///             Checks the current selection against an expression and returns true,
721                ///             if at least one element of the selection fits the given expression.
722                ///             Does return false, if no element fits or the expression is not valid.
723                ///             filter(String) is used internally, therefore all rules that apply there
724                ///             apply here, too.
725                ///             Part of DOM/Traversing
726                ///     </summary>
727                ///     <returns type="Boolean" />
728                ///     <param name="expr" type="String">
729                ///              The expression with which to filter
730                ///     </param>
731
732                return !!selector && jQuery.multiFilter( selector, this ).length > 0;
733        },
734
735        hasClass: function( selector ) {
736                ///     <summary>
737                ///             Checks the current selection against a class and returns whether at least one selection has a given class.
738                ///     </summary>
739                ///     <param name="selector" type="String">The class to check against</param>
740                ///     <returns type="Boolean">True if at least one element in the selection has the class, otherwise false.</returns>
741
742                return !!selector && this.is( "." + selector );
743        },
744
745        val: function( value ) {
746                ///     <summary>
747                ///             Set the value of every matched element.
748                ///             Part of DOM/Attributes
749                ///     </summary>
750                ///     <returns type="jQuery" />
751                ///     <param name="val" type="String">
752                ///              Set the property to the specified value.
753                ///     </param>
754
755                if ( value === undefined ) {                   
756                        var elem = this[0];
757
758                        if ( elem ) {
759                                if( jQuery.nodeName( elem, 'option' ) )
760                                        return (elem.attributes.value || {}).specified ? elem.value : elem.text;
761                               
762                                // We need to handle select boxes special
763                                if ( jQuery.nodeName( elem, "select" ) ) {
764                                        var index = elem.selectedIndex,
765                                                values = [],
766                                                options = elem.options,
767                                                one = elem.type == "select-one";
768
769                                        // Nothing was selected
770                                        if ( index < 0 )
771                                                return null;
772
773                                        // Loop through all the selected options
774                                        for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
775                                                var option = options[ i ];
776
777                                                if ( option.selected ) {
778                                                        // Get the specifc value for the option
779                                                        value = jQuery(option).val();
780
781                                                        // We don't need an array for one selects
782                                                        if ( one )
783                                                                return value;
784
785                                                        // Multi-Selects return an array
786                                                        values.push( value );
787                                                }
788                                        }
789
790                                        return values;                         
791                                }
792
793                                // Everything else, we just grab the value
794                                return (elem.value || "").replace(/\r/g, "");
795
796                        }
797
798                        return undefined;
799                }
800
801                if ( typeof value === "number" )
802                        value += '';
803
804                return this.each(function(){
805                        if ( this.nodeType != 1 )
806                                return;
807
808                        if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
809                                this.checked = (jQuery.inArray(this.value, value) >= 0 ||
810                                        jQuery.inArray(this.name, value) >= 0);
811
812                        else if ( jQuery.nodeName( this, "select" ) ) {
813                                var values = jQuery.makeArray(value);
814
815                                jQuery( "option", this ).each(function(){
816                                        this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
817                                                jQuery.inArray( this.text, values ) >= 0);
818                                });
819
820                                if ( !values.length )
821                                        this.selectedIndex = -1;
822
823                        } else
824                                this.value = value;
825                });
826        },
827
828        html: function( value ) {
829                ///     <summary>
830                ///             Set the html contents of every matched element.
831                ///             This property is not available on XML documents.
832                ///             Part of DOM/Attributes
833                ///     </summary>
834                ///     <returns type="jQuery" />
835                ///     <param name="val" type="String">
836                ///              Set the html contents to the specified value.
837                ///     </param>
838
839                return value === undefined ?
840                        (this[0] ?
841                                this[0].innerHTML :
842                                null) :
843                        this.empty().append( value );
844        },
845
846        replaceWith: function( value ) {
847                ///     <summary>
848                ///             Replaces all matched element with the specified HTML or DOM elements.
849                ///     </summary>
850                ///     <param name="value" type="String">
851                ///             The content with which to replace the matched elements.
852                ///     </param>
853                ///     <returns type="jQuery">The element that was just replaced.</returns>
854
855                return this.after( value ).remove();
856        },
857
858        eq: function( i ) {
859                ///     <summary>
860                ///             Reduce the set of matched elements to a single element.
861                ///             The position of the element in the set of matched elements
862                ///             starts at 0 and goes to length - 1.
863                ///             Part of Core
864                ///     </summary>
865                ///     <returns type="jQuery" />
866                ///     <param name="num" type="Number">
867                ///             pos The index of the element that you wish to limit to.
868                ///     </param>
869
870                return this.slice( i, +i + 1 );
871        },
872
873        slice: function() {
874                ///     <summary>
875                ///             Selects a subset of the matched elements.  Behaves exactly like the built-in Array slice method.
876                ///     </summary>
877                ///     <param name="start" type="Number" integer="true">Where to start the subset (0-based).</param>
878                ///     <param name="end" optional="true" type="Number" integer="true">Where to end the subset (not including the end element itself).
879                ///             If omitted, ends at the end of the selection</param>
880                ///     <returns type="jQuery">The sliced elements</returns>
881
882                return this.pushStack( Array.prototype.slice.apply( this, arguments ),
883                        "slice", Array.prototype.slice.call(arguments).join(",") );
884        },
885
886        map: function( callback ) {
887                ///     <summary>
888                ///             This member is internal.
889                ///     </summary>
890                ///     <private />
891                ///     <returns type="jQuery" />
892               
893                return this.pushStack( jQuery.map(this, function(elem, i){
894                        return callback.call( elem, i, elem );
895                }));
896        },
897
898        andSelf: function() {
899                ///     <summary>
900                ///             Adds the previous selection to the current selection.
901                ///     </summary>
902                ///     <returns type="jQuery" />
903               
904                return this.add( this.prevObject );
905        },
906
907        domManip: function( args, table, callback ) {
908                ///     <param name="args" type="Array">
909                ///              Args
910                ///     </param>
911                ///     <param name="table" type="Boolean">
912                ///              Insert TBODY in TABLEs if one is not found.
913                ///     </param>
914                ///     <param name="dir" type="Number">
915                ///              If dir&lt;0, process args in reverse order.
916                ///     </param>
917                ///     <param name="fn" type="Function">
918                ///              The function doing the DOM manipulation.
919                ///     </param>
920                ///     <returns type="jQuery" />
921                ///     <summary>
922                ///             Part of Core
923                ///     </summary>
924               
925                if ( this[0] ) {
926                        var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
927                                scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
928                                first = fragment.firstChild,
929                                extra = this.length > 1 ? fragment.cloneNode(true) : fragment;
930
931                        if ( first )
932                                for ( var i = 0, l = this.length; i < l; i++ )
933                                        callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment );
934                       
935                        if ( scripts )
936                                jQuery.each( scripts, evalScript );
937                }
938
939                return this;
940               
941                function root( elem, cur ) {
942                        return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
943                                (elem.getElementsByTagName("tbody")[0] ||
944                                elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
945                                elem;
946                }
947        }
948};
949
950// Give the init function the jQuery prototype for later instantiation
951jQuery.fn.init.prototype = jQuery.fn;
952
953function evalScript( i, elem ) {
954        ///     <summary>
955        ///             This method is internal.
956        ///     </summary>
957        /// <private />
958       
959        if ( elem.src )
960                jQuery.ajax({
961                        url: elem.src,
962                        async: false,
963                        dataType: "script"
964                });
965
966        else
967                jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
968
969        if ( elem.parentNode )
970                elem.parentNode.removeChild( elem );
971}
972
973function now(){
974        ///     <summary>
975        ///             Gets the current date.
976        ///     </summary>
977        ///     <returns type="Date">The current date.</returns>
978        return +new Date;
979}
980
981jQuery.extend = jQuery.fn.extend = function() {
982        ///     <summary>
983        ///             Extend one object with one or more others, returning the original,
984        ///             modified, object. This is a great utility for simple inheritance.
985        ///             jQuery.extend(settings, options);
986        ///             var settings = jQuery.extend({}, defaults, options);
987        ///             Part of JavaScript
988        ///     </summary>
989        ///     <param name="target" type="Object">
990        ///              The object to extend
991        ///     </param>
992        ///     <param name="prop1" type="Object">
993        ///              The object that will be merged into the first.
994        ///     </param>
995        ///     <param name="propN" type="Object" optional="true" parameterArray="true">
996        ///              (optional) More objects to merge into the first
997        ///     </param>
998        ///     <returns type="Object" />
999
1000        // copy reference to target object
1001        var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
1002
1003        // Handle a deep copy situation
1004        if ( typeof target === "boolean" ) {
1005                deep = target;
1006                target = arguments[1] || {};
1007                // skip the boolean and the target
1008                i = 2;
1009        }
1010
1011        // Handle case when target is a string or something (possible in deep copy)
1012        if ( typeof target !== "object" && !jQuery.isFunction(target) )
1013                target = {};
1014
1015        // extend jQuery itself if only one argument is passed
1016        if ( length == i ) {
1017                target = this;
1018                --i;
1019        }
1020
1021        for ( ; i < length; i++ )
1022                // Only deal with non-null/undefined values
1023                if ( (options = arguments[ i ]) != null )
1024                        // Extend the base object
1025                        for ( var name in options ) {
1026                                var src = target[ name ], copy = options[ name ];
1027
1028                                // Prevent never-ending loop
1029                                if ( target === copy )
1030                                        continue;
1031
1032                                // Recurse if we're merging object values
1033                                if ( deep && copy && typeof copy === "object" && !copy.nodeType )
1034                                        target[ name ] = jQuery.extend( deep,
1035                                                // Never move original objects, clone them
1036                                                src || ( copy.length != null ? [ ] : { } )
1037                                        , copy );
1038
1039                                // Don't bring in undefined values
1040                                else if ( copy !== undefined )
1041                                        target[ name ] = copy;
1042
1043                        }
1044
1045        // Return the modified object
1046        return target;
1047};
1048
1049// exclude the following css properties to add px
1050var     exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
1051        // cache defaultView
1052        defaultView = document.defaultView || {},
1053        toString = Object.prototype.toString;
1054
1055jQuery.extend({
1056        noConflict: function( deep ) {
1057                ///     <summary>
1058                ///             Run this function to give control of the $ variable back
1059                ///             to whichever library first implemented it. This helps to make
1060                ///             sure that jQuery doesn't conflict with the $ object
1061                ///             of other libraries.
1062                ///             By using this function, you will only be able to access jQuery
1063                ///             using the 'jQuery' variable. For example, where you used to do
1064                ///             $(&quot;div p&quot;), you now must do jQuery(&quot;div p&quot;).
1065                ///             Part of Core
1066                ///     </summary>
1067                ///     <returns type="undefined" />
1068               
1069                window.$ = _$;
1070
1071                if ( deep )
1072                        window.jQuery = _jQuery;
1073
1074                return jQuery;
1075        },
1076
1077        // See test/unit/core.js for details concerning isFunction.
1078        // Since version 1.3, DOM methods and functions like alert
1079        // aren't supported. They return false on IE (#2968).
1080        isFunction: function( obj ) {
1081                ///     <summary>
1082                ///             Determines if the parameter passed is a function.
1083                ///     </summary>
1084                ///     <param name="obj" type="Object">The object to check</param>
1085                ///     <returns type="Boolean">True if the parameter is a function; otherwise false.</returns>
1086               
1087                return toString.call(obj) === "[object Function]";
1088        },
1089
1090        isArray: function(obj) {
1091            /// <summary>
1092            ///         Determine if the parameter passed is an array.
1093            /// </summary>
1094            /// <param name="obj" type="Object">Object to test whether or not it is an array.</param>
1095            /// <returns type="Boolean">True if the parameter is a function; otherwise false.</returns>
1096               
1097                return toString.call(obj) === "[object Array]";
1098        },
1099
1100        // check if an element is in a (or is an) XML document
1101        isXMLDoc: function( elem ) {
1102                ///     <summary>
1103                ///             Determines if the parameter passed is an XML document.
1104                ///     </summary>
1105                ///     <param name="elem" type="Object">The object to test</param>
1106                ///     <returns type="Boolean">True if the parameter is an XML document; otherwise false.</returns>
1107
1108            return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
1109                        !!elem.ownerDocument && jQuery.isXMLDoc(elem.ownerDocument);
1110    },
1111
1112        // Evalulates a script in a global context
1113        globalEval: function( data ) {
1114                ///     <summary>
1115                ///             Internally evaluates a script in a global context.
1116                ///     </summary>
1117                ///     <private />
1118
1119                data = jQuery.trim( data );
1120
1121                if ( data ) {
1122                        // Inspired by code by Andrea Giammarchi
1123                        // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
1124                        var head = document.getElementsByTagName("head")[0] || document.documentElement,
1125                                script = document.createElement("script");
1126
1127                        script.type = "text/javascript";
1128                        if ( jQuery.support.scriptEval )
1129                                script.appendChild( document.createTextNode( data ) );
1130                        else
1131                                script.text = data;
1132
1133                        // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
1134                        // This arises when a base node is used (#2709).
1135                        head.insertBefore( script, head.firstChild );
1136                        head.removeChild( script );
1137                }
1138        },
1139
1140        nodeName: function( elem, name ) {
1141                ///     <summary>
1142                ///             Checks whether the specified element has the specified DOM node name.
1143                ///     </summary>
1144                ///     <param name="elem" type="Element">The element to examine</param>
1145                ///     <param name="name" type="String">The node name to check</param>
1146                ///     <returns type="Boolean">True if the specified node name matches the node's DOM node name; otherwise false</returns>
1147
1148                return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
1149        },
1150
1151        // args is for internal usage only
1152        each: function( object, callback, args ) {
1153                ///     <summary>
1154                ///             A generic iterator function, which can be used to seemlessly
1155                ///             iterate over both objects and arrays. This function is not the same
1156                ///             as $().each() - which is used to iterate, exclusively, over a jQuery
1157                ///             object. This function can be used to iterate over anything.
1158                ///             The callback has two arguments:the key (objects) or index (arrays) as first
1159                ///             the first, and the value as the second.
1160                ///             Part of JavaScript
1161                ///     </summary>
1162                ///     <param name="obj" type="Object">
1163                ///              The object, or array, to iterate over.
1164                ///     </param>
1165                ///     <param name="fn" type="Function">
1166                ///              The function that will be executed on every object.
1167                ///     </param>
1168                ///     <returns type="Object" />
1169               
1170                var name, i = 0, length = object.length;
1171
1172                if ( args ) {
1173                        if ( length === undefined ) {
1174                                for ( name in object )
1175                                        if ( callback.apply( object[ name ], args ) === false )
1176                                                break;
1177                        } else
1178                                for ( ; i < length; )
1179                                        if ( callback.apply( object[ i++ ], args ) === false )
1180                                                break;
1181
1182                // A special, fast, case for the most common use of each
1183                } else {
1184                        if ( length === undefined ) {
1185                                for ( name in object )
1186                                        if ( callback.call( object[ name ], name, object[ name ] ) === false )
1187                                                break;
1188                        } else
1189                                for ( var value = object[0];
1190                                        i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
1191                }
1192
1193                return object;
1194        },
1195
1196        prop: function( elem, value, type, i, name ) {
1197                ///     <summary>
1198                ///             This method is internal.
1199                ///     </summary>
1200                ///     <private />
1201                // This member is not documented within the jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.prop
1202
1203                // Handle executable functions
1204                if ( jQuery.isFunction( value ) )
1205                        value = value.call( elem, i );
1206
1207                // Handle passing in a number to a CSS property
1208                return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ?
1209                        value + "px" :
1210                        value;
1211        },
1212
1213        className: {
1214                // internal only, use addClass("class")
1215                add: function( elem, classNames ) {
1216                        ///     <summary>
1217                        ///             Internal use only; use addClass('class')
1218                        ///     </summary>
1219                        ///     <private />
1220
1221                        jQuery.each((classNames || "").split(/\s+/), function(i, className){
1222                                if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
1223                                        elem.className += (elem.className ? " " : "") + className;
1224                        });
1225                },
1226
1227                // internal only, use removeClass("class")
1228                remove: function( elem, classNames ) {
1229                        ///     <summary>
1230                        ///             Internal use only; use removeClass('class')
1231                        ///     </summary>
1232                        ///     <private />
1233
1234                        if (elem.nodeType == 1)
1235                                elem.className = classNames !== undefined ?
1236                                        jQuery.grep(elem.className.split(/\s+/), function(className){
1237                                                return !jQuery.className.has( classNames, className );
1238                                        }).join(" ") :
1239                                        "";
1240                },
1241
1242                // internal only, use hasClass("class")
1243                has: function( elem, className ) {
1244                        ///     <summary>
1245                        ///             Internal use only; use hasClass('class')
1246                        ///     </summary>
1247                        ///     <private />
1248
1249                    return elem && jQuery.inArray(className, (elem.className || elem).toString().split(/\s+/)) > -1;
1250                }
1251        },
1252
1253        // A method for quickly swapping in/out CSS properties to get correct calculations
1254        swap: function( elem, options, callback ) {
1255                ///     <summary>
1256                ///             Swap in/out style options.
1257                ///     </summary>
1258
1259                var old = {};
1260                // Remember the old values, and insert the new ones
1261                for ( var name in options ) {
1262                        old[ name ] = elem.style[ name ];
1263                        elem.style[ name ] = options[ name ];
1264                }
1265
1266                callback.call( elem );
1267
1268                // Revert the old values
1269                for ( var name in options )
1270                        elem.style[ name ] = old[ name ];
1271        },
1272
1273        css: function( elem, name, force ) {
1274                ///     <summary>
1275                ///             This method is internal only.
1276                ///     </summary>
1277                ///     <private />
1278                // This method is undocumented in jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.css
1279
1280                if ( name == "width" || name == "height" ) {
1281                        var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
1282
1283                        function getWH() {
1284                                val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
1285                                var padding = 0, border = 0;
1286                                jQuery.each( which, function() {
1287                                        padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
1288                                        border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
1289                                });
1290                                val -= Math.round(padding + border);
1291                        }
1292
1293                        if ( jQuery(elem).is(":visible") )
1294                                getWH();
1295                        else
1296                                jQuery.swap( elem, props, getWH );
1297
1298                        return Math.max(0, val);
1299                }
1300
1301                return jQuery.curCSS( elem, name, force );
1302        },
1303
1304        curCSS: function( elem, name, force ) {
1305                ///     <summary>
1306                ///             This method is internal only.
1307                ///     </summary>
1308                ///     <private />
1309                // This method is undocumented in jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.curCSS
1310
1311                var ret, style = elem.style;
1312
1313                // We need to handle opacity special in IE
1314                if ( name == "opacity" && !jQuery.support.opacity ) {
1315                        ret = jQuery.attr( style, "opacity" );
1316
1317                        return ret == "" ?
1318                                "1" :
1319                                ret;
1320                }
1321
1322                // Make sure we're using the right name for getting the float value
1323                if ( name.match( /float/i ) )
1324                        name = styleFloat;
1325
1326                if ( !force && style && style[ name ] )
1327                        ret = style[ name ];
1328
1329                else if ( defaultView.getComputedStyle ) {
1330
1331                        // Only "float" is needed here
1332                        if ( name.match( /float/i ) )
1333                                name = "float";
1334
1335                        name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
1336
1337                        var computedStyle = defaultView.getComputedStyle( elem, null );
1338
1339                        if ( computedStyle )
1340                                ret = computedStyle.getPropertyValue( name );
1341
1342                        // We should always get a number back from opacity
1343                        if ( name == "opacity" && ret == "" )
1344                                ret = "1";
1345
1346                } else if ( elem.currentStyle ) {
1347                        var camelCase = name.replace(/\-(\w)/g, function(all, letter){
1348                                return letter.toUpperCase();
1349                        });
1350
1351                        ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
1352
1353                        // From the awesome hack by Dean Edwards
1354                        // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
1355
1356                        // If we're not dealing with a regular pixel number
1357                        // but a number that has a weird ending, we need to convert it to pixels
1358                        if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
1359                                // Remember the original values
1360                                var left = style.left, rsLeft = elem.runtimeStyle.left;
1361
1362                                // Put in the new values to get a computed value out
1363                                elem.runtimeStyle.left = elem.currentStyle.left;
1364                                style.left = ret || 0;
1365                                ret = style.pixelLeft + "px";
1366
1367                                // Revert the changed values
1368                                style.left = left;
1369                                elem.runtimeStyle.left = rsLeft;
1370                        }
1371                }
1372
1373                return ret;
1374        },
1375
1376        clean: function( elems, context, fragment ) {
1377                ///     <summary>
1378                ///             This method is internal only.
1379                ///     </summary>
1380                ///     <private />
1381                // This method is undocumented in the jQuery API: http://docs.jquery.com/action/edit/Internals/jQuery.clean
1382
1383
1384                context = context || document;
1385
1386                // !context.createElement fails in IE with an error but returns typeof 'object'
1387                if ( typeof context.createElement === "undefined" )
1388                        context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
1389
1390                // If a single string is passed in and it's a single tag
1391                // just do a createElement and skip the rest
1392                if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
1393                        var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
1394                        if ( match )
1395                                return [ context.createElement( match[1] ) ];
1396                }
1397
1398                var ret = [], scripts = [], div = context.createElement("div");
1399
1400                jQuery.each(elems, function(i, elem){
1401                        if ( typeof elem === "number" )
1402                                elem += '';
1403
1404                        if ( !elem )
1405                                return;
1406
1407                        // Convert html string into DOM nodes
1408                        if ( typeof elem === "string" ) {
1409                                // Fix "XHTML"-style tags in all browsers
1410                                elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
1411                                        return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
1412                                                all :
1413                                                front + "></" + tag + ">";
1414                                });
1415
1416                                // Trim whitespace, otherwise indexOf won't work as expected
1417                                var tags = jQuery.trim( elem ).toLowerCase();
1418
1419                                var wrap =
1420                                        // option or optgroup
1421                                        !tags.indexOf("<opt") &&
1422                                        [ 1, "<select multiple='multiple'>", "</select>" ] ||
1423
1424                                        !tags.indexOf("<leg") &&
1425                                        [ 1, "<fieldset>", "</fieldset>" ] ||
1426
1427                                        tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
1428                                        [ 1, "<table>", "</table>" ] ||
1429
1430                                        !tags.indexOf("<tr") &&
1431                                        [ 2, "<table><tbody>", "</tbody></table>" ] ||
1432
1433                                        // <thead> matched above
1434                                        (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
1435                                        [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
1436
1437                                        !tags.indexOf("<col") &&
1438                                        [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
1439
1440                                        // IE can't serialize <link> and <script> tags normally
1441                                        !jQuery.support.htmlSerialize &&
1442                                        [ 1, "div<div>", "</div>" ] ||
1443
1444                                        [ 0, "", "" ];
1445
1446                                // Go to html and back, then peel off extra wrappers
1447                                div.innerHTML = wrap[1] + elem + wrap[2];
1448
1449                                // Move to the right depth
1450                                while ( wrap[0]-- )
1451                                        div = div.lastChild;
1452
1453                                // Remove IE's autoinserted <tbody> from table fragments
1454                                if ( !jQuery.support.tbody ) {
1455
1456                                        // String was a <table>, *may* have spurious <tbody>
1457                                        var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
1458                                                div.firstChild && div.firstChild.childNodes :
1459
1460                                                // String was a bare <thead> or <tfoot>
1461                                                wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
1462                                                        div.childNodes :
1463                                                        [];
1464
1465                                        for ( var j = tbody.length - 1; j >= 0 ; --j )
1466                                                if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
1467                                                        tbody[ j ].parentNode.removeChild( tbody[ j ] );
1468
1469                                        }
1470
1471                                // IE completely kills leading whitespace when innerHTML is used
1472                                if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
1473                                        div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
1474                               
1475                                elem = jQuery.makeArray( div.childNodes );
1476                        }
1477
1478                        if ( elem.nodeType )
1479                                ret.push( elem );
1480                        else
1481                                ret = jQuery.merge( ret, elem );
1482
1483                });
1484
1485                if ( fragment ) {
1486                        for ( var i = 0; ret[i]; i++ ) {
1487                                if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
1488                                        scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
1489                                } else {
1490                                        if ( ret[i].nodeType === 1 )
1491                                                ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
1492                                        fragment.appendChild( ret[i] );
1493                                }
1494                        }
1495                       
1496                        return scripts;
1497                }
1498
1499                return ret;
1500        },
1501
1502        attr: function( elem, name, value ) {
1503                ///     <summary>
1504                ///             This method is internal.
1505                ///     </summary>
1506                ///     <private />
1507
1508                // don't set attributes on text and comment nodes
1509                if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
1510                        return undefined;
1511
1512                var notxml = !jQuery.isXMLDoc( elem ),
1513                        // Whether we are setting (or getting)
1514                        set = value !== undefined;
1515
1516                // Try to normalize/fix the name
1517                name = notxml && jQuery.props[ name ] || name;
1518
1519                // Only do all the following if this is a node (faster for style)
1520                // IE elem.getAttribute passes even for style
1521                if ( elem.tagName ) {
1522
1523                        // These attributes require special treatment
1524                        var special = /href|src|style/.test( name );
1525
1526                        // Safari mis-reports the default selected property of a hidden option
1527                        // Accessing the parent's selectedIndex property fixes it
1528                        if ( name == "selected" && elem.parentNode )
1529                                elem.parentNode.selectedIndex;
1530
1531                        // If applicable, access the attribute via the DOM 0 way
1532                        if ( name in elem && notxml && !special ) {
1533                                if ( set ){
1534                                        // We can't allow the type property to be changed (since it causes problems in IE)
1535                                        if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
1536                                                throw "type property can't be changed";
1537
1538                                        elem[ name ] = value;
1539                                }
1540
1541                                // browsers index elements by id/name on forms, give priority to attributes.
1542                                if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
1543                                        return elem.getAttributeNode( name ).nodeValue;
1544
1545                                // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
1546                                // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
1547                                if ( name == "tabIndex" ) {
1548                                        var attributeNode = elem.getAttributeNode( "tabIndex" );
1549                                        return attributeNode && attributeNode.specified
1550                                                ? attributeNode.value
1551                                                : elem.nodeName.match(/(button|input|object|select|textarea)/i)
1552                                                        ? 0
1553                                                        : elem.nodeName.match(/^(a|area)$/i) && elem.href
1554                                                                ? 0
1555                                                                : undefined;
1556                                }
1557
1558                                return elem[ name ];
1559                        }
1560
1561                        if ( !jQuery.support.style && notxml &&  name == "style" )
1562                                return jQuery.attr( elem.style, "cssText", value );
1563
1564                        if ( set )
1565                                // convert the value to a string (all browsers do this but IE) see #1070
1566                                elem.setAttribute( name, "" + value );
1567
1568                        var attr = !jQuery.support.hrefNormalized && notxml && special
1569                                        // Some attributes require a special call on IE
1570                                        ? elem.getAttribute( name, 2 )
1571                                        : elem.getAttribute( name );
1572
1573                        // Non-existent attributes return null, we normalize to undefined
1574                        return attr === null ? undefined : attr;
1575                }
1576
1577                // elem is actually elem.style ... set the style
1578
1579                // IE uses filters for opacity
1580                if ( !jQuery.support.opacity && name == "opacity" ) {
1581                        if ( set ) {
1582                                // IE has trouble with opacity if it does not have layout
1583                                // Force it by setting the zoom level
1584                                elem.zoom = 1;
1585
1586                                // Set the alpha filter to set the opacity
1587                                elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
1588                                        (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
1589                        }
1590
1591                        return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
1592                                (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
1593                                "";
1594                }
1595
1596                name = name.replace(/-([a-z])/ig, function(all, letter){
1597                        return letter.toUpperCase();
1598                });
1599
1600                if ( set )
1601                        elem[ name ] = value;
1602
1603                return elem[ name ];
1604        },
1605
1606        trim: function( text ) {
1607                ///     <summary>
1608                ///             Remove the whitespace from the beginning and end of a string.
1609                ///             Part of JavaScript
1610                ///     </summary>
1611                ///     <returns type="String" />
1612                ///     <param name="text" type="String">
1613                ///             The string to trim.
1614                ///     </param>
1615
1616                return (text || "").replace( /^\s+|\s+$/g, "" );
1617        },
1618
1619        makeArray: function( array ) {
1620                ///     <summary>
1621                ///             Turns anything into a true array.  This is an internal method.
1622                ///     </summary>
1623                ///     <param name="array" type="Object">Anything to turn into an actual Array</param>
1624                ///     <returns type="Array" />
1625                ///     <private />
1626
1627                var ret = [];
1628
1629                if( array != null ){
1630                        var i = array.length;
1631                        // The window, strings (and functions) also have 'length'
1632                        if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
1633                                ret[0] = array;
1634                        else
1635                                while( i )
1636                                        ret[--i] = array[i];
1637                }
1638
1639                return ret;
1640        },
1641
1642        inArray: function( elem, array ) {
1643                ///     <summary>
1644                ///             Determines the index of the first parameter in the array.
1645                ///     </summary>
1646                ///     <param name="elem">The value to see if it exists in the array.</param>
1647                ///     <param name="array" type="Array">The array to look through for the value</param>
1648                ///     <returns type="Number" integer="true">The 0-based index of the item if it was found, otherwise -1.</returns>
1649
1650                for ( var i = 0, length = array.length; i < length; i++ )
1651                // Use === because on IE, window == document
1652                        if ( array[ i ] === elem )
1653                                return i;
1654
1655                return -1;
1656        },
1657
1658        merge: function( first, second ) {
1659                ///     <summary>
1660                ///             Merge two arrays together, removing all duplicates.
1661                ///             The new array is: All the results from the first array, followed
1662                ///             by the unique results from the second array.
1663                ///             Part of JavaScript
1664                ///     </summary>
1665                ///     <returns type="Array" />
1666                ///     <param name="first" type="Array">
1667                ///              The first array to merge.
1668                ///     </param>
1669                ///     <param name="second" type="Array">
1670                ///              The second array to merge.
1671                ///     </param>
1672
1673                // We have to loop this way because IE & Opera overwrite the length
1674                // expando of getElementsByTagName
1675                var i = 0, elem, pos = first.length;
1676                // Also, we need to make sure that the correct elements are being returned
1677                // (IE returns comment nodes in a '*' query)
1678                if ( !jQuery.support.getAll ) {
1679                        while ( (elem = second[ i++ ]) != null )
1680                                if ( elem.nodeType != 8 )
1681                                        first[ pos++ ] = elem;
1682
1683                } else
1684                        while ( (elem = second[ i++ ]) != null )
1685                                first[ pos++ ] = elem;
1686
1687                return first;
1688        },
1689
1690        unique: function( array ) {
1691                ///     <summary>
1692                ///             Removes all duplicate elements from an array of elements.
1693                ///     </summary>
1694                ///     <param name="array" type="Array&lt;Element&gt;">The array to translate</param>
1695                ///     <returns type="Array&lt;Element&gt;">The array after translation.</returns>
1696
1697                var ret = [], done = {};
1698
1699                try {
1700
1701                        for ( var i = 0, length = array.length; i < length; i++ ) {
1702                                var id = jQuery.data( array[ i ] );
1703
1704                                if ( !done[ id ] ) {
1705                                        done[ id ] = true;
1706                                        ret.push( array[ i ] );
1707                                }
1708                        }
1709
1710                } catch( e ) {
1711                        ret = array;
1712                }
1713
1714                return ret;
1715        },
1716
1717        grep: function( elems, callback, inv ) {
1718                ///     <summary>
1719                ///             Filter items out of an array, by using a filter function.
1720                ///             The specified function will be passed two arguments: The
1721                ///             current array item and the index of the item in the array. The
1722                ///             function must return 'true' to keep the item in the array,
1723                ///             false to remove it.
1724                ///             });
1725                ///             Part of JavaScript
1726                ///     </summary>
1727                ///     <returns type="Array" />
1728                ///     <param name="elems" type="Array">
1729                ///             array The Array to find items in.
1730                ///     </param>
1731                ///     <param name="fn" type="Function">
1732                ///              The function to process each item against.
1733                ///     </param>
1734                ///     <param name="inv" type="Boolean">
1735                ///              Invert the selection - select the opposite of the function.
1736                ///     </param>
1737               
1738                var ret = [];
1739
1740                // Go through the array, only saving the items
1741                // that pass the validator function
1742                for ( var i = 0, length = elems.length; i < length; i++ )
1743                        if ( !inv != !callback( elems[ i ], i ) )
1744                                ret.push( elems[ i ] );
1745
1746                return ret;
1747        },
1748
1749        map: function( elems, callback ) {
1750                ///     <summary>
1751                ///             Translate all items in an array to another array of items.
1752                ///             The translation function that is provided to this method is
1753                ///             called for each item in the array and is passed one argument:
1754                ///             The item to be translated.
1755                ///             The function can then return the translated value, 'null'
1756                ///             (to remove the item), or  an array of values - which will
1757                ///             be flattened into the full array.
1758                ///             Part of JavaScript
1759                ///     </summary>
1760                ///     <returns type="Array" />
1761                ///     <param name="elems" type="Array">
1762                ///             array The Array to translate.
1763                ///     </param>
1764                ///     <param name="fn" type="Function">
1765                ///              The function to process each item against.
1766                ///     </param>
1767               
1768                var ret = [];
1769
1770                // Go through the array, translating each of the items to their
1771                // new value (or values).
1772                for ( var i = 0, length = elems.length; i < length; i++ ) {
1773                        var value = callback( elems[ i ], i );
1774
1775                        if ( value != null )
1776                                ret[ ret.length ] = value;
1777                }
1778
1779                return ret.concat.apply( [], ret );
1780        }
1781});
1782
1783// Use of jQuery.browser is deprecated.
1784// It's included for backwards compatibility and plugins,
1785// although they should work to migrate away.
1786
1787var userAgent = navigator.userAgent.toLowerCase();
1788
1789// Figure out what browser is being used
1790jQuery.browser = {
1791        version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
1792        safari: /webkit/.test( userAgent ),
1793        opera: /opera/.test( userAgent ),
1794        msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
1795        mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
1796};
1797
1798// [vsdoc] The following section has been denormalized from original sources for IntelliSense.
1799// jQuery.each({
1800//      parent: function(elem){return elem.parentNode;},
1801//      parents: function(elem){return jQuery.dir(elem,"parentNode");},
1802//      next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
1803//      prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
1804//      nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
1805//      prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
1806//      siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
1807//      children: function(elem){return jQuery.sibling(elem.firstChild);},
1808//      contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
1809// }, function(name, fn){
1810//      jQuery.fn[ name ] = function( selector ) {
1811//              ///     <summary>
1812//              ///             Get a set of elements containing the unique parents of the matched
1813//              ///             set of elements.
1814//              ///             Can be filtered with an optional expressions.
1815//              ///             Part of DOM/Traversing
1816//              ///     </summary>
1817//              ///     <param name="expr" type="String" optional="true">
1818//              ///             (optional) An expression to filter the parents with
1819//              ///     </param>
1820//              ///     <returns type="jQuery" />   
1821//             
1822//              var ret = jQuery.map( this, fn );
1823//
1824//              if ( selector && typeof selector == "string" )
1825//                      ret = jQuery.multiFilter( selector, ret );
1826//
1827//              return this.pushStack( jQuery.unique( ret ), name, selector );
1828//      };
1829// });
1830
1831jQuery.each({
1832        parent: function(elem){return elem.parentNode;}
1833}, function(name, fn){
1834        jQuery.fn[ name ] = function( selector ) {
1835                ///     <summary>
1836                ///             Get a set of elements containing the unique parents of the matched
1837                ///             set of elements.
1838                ///             Can be filtered with an optional expressions.
1839                ///             Part of DOM/Traversing
1840                ///     </summary>
1841                ///     <param name="expr" type="String" optional="true">
1842                ///             (optional) An expression to filter the parents with
1843                ///     </param>
1844                ///     <returns type="jQuery" />   
1845               
1846                var ret = jQuery.map( this, fn );
1847
1848                if ( selector && typeof selector == "string" )
1849                        ret = jQuery.multiFilter( selector, ret );
1850
1851                return this.pushStack( jQuery.unique( ret ), name, selector );
1852        };
1853});
1854
1855jQuery.each({
1856        parents: function(elem){return jQuery.dir(elem,"parentNode");}
1857}, function(name, fn){
1858        jQuery.fn[ name ] = function( selector ) {
1859                ///     <summary>
1860                ///             Get a set of elements containing the unique ancestors of the matched
1861                ///             set of elements (except for the root element).
1862                ///             Can be filtered with an optional expressions.
1863                ///             Part of DOM/Traversing
1864                ///     </summary>
1865                ///     <param name="expr" type="String" optional="true">
1866                ///             (optional) An expression to filter the ancestors with
1867                ///     </param>
1868                ///     <returns type="jQuery" />   
1869               
1870                var ret = jQuery.map( this, fn );
1871
1872                if ( selector && typeof selector == "string" )
1873                        ret = jQuery.multiFilter( selector, ret );
1874
1875                return this.pushStack( jQuery.unique( ret ), name, selector );
1876        };
1877});
1878
1879jQuery.each({
1880        next: function(elem){return jQuery.nth(elem,2,"nextSibling");}
1881}, function(name, fn){
1882        jQuery.fn[ name ] = function( selector ) {
1883                ///     <summary>
1884                ///             Get a set of elements containing the unique next siblings of each of the
1885                ///             matched set of elements.
1886                ///             It only returns the very next sibling, not all next siblings.
1887                ///             Can be filtered with an optional expressions.
1888                ///             Part of DOM/Traversing
1889                ///     </summary>
1890                ///     <param name="expr" type="String" optional="true">
1891                ///             (optional) An expression to filter the next Elements with
1892                ///     </param>
1893                ///     <returns type="jQuery" />
1894               
1895                var ret = jQuery.map( this, fn );
1896
1897                if ( selector && typeof selector == "string" )
1898                        ret = jQuery.multiFilter( selector, ret );
1899
1900                return this.pushStack( jQuery.unique( ret ), name, selector );
1901        };
1902});
1903
1904jQuery.each({
1905        prev: function(elem){return jQuery.nth(elem,2,"previousSibling");}
1906}, function(name, fn){
1907        jQuery.fn[ name ] = function( selector ) {
1908                ///     <summary>
1909                ///             Get a set of elements containing the unique previous siblings of each of the
1910                ///             matched set of elements.
1911                ///             Can be filtered with an optional expressions.
1912                ///             It only returns the immediately previous sibling, not all previous siblings.
1913                ///             Part of DOM/Traversing
1914                ///     </summary>
1915                ///     <param name="expr" type="String" optional="true">
1916                ///             (optional) An expression to filter the previous Elements with
1917                ///     </param>
1918                ///     <returns type="jQuery" />
1919               
1920                var ret = jQuery.map( this, fn );
1921
1922                if ( selector && typeof selector == "string" )
1923                        ret = jQuery.multiFilter( selector, ret );
1924
1925                return this.pushStack( jQuery.unique( ret ), name, selector );
1926        };
1927});
1928
1929jQuery.each({
1930        nextAll: function(elem){return jQuery.dir(elem,"nextSibling");}
1931}, function(name, fn){
1932        jQuery.fn[name] = function(selector) {
1933                ///     <summary>
1934                ///             Finds all sibling elements after the current element.
1935                ///             Can be filtered with an optional expressions.
1936                ///             Part of DOM/Traversing
1937                ///     </summary>
1938                ///     <param name="expr" type="String" optional="true">
1939                ///             (optional) An expression to filter the next Elements with
1940                ///     </param>
1941                ///     <returns type="jQuery" />
1942               
1943                var ret = jQuery.map( this, fn );
1944
1945                if ( selector && typeof selector == "string" )
1946                        ret = jQuery.multiFilter( selector, ret );
1947
1948                return this.pushStack( jQuery.unique( ret ), name, selector );
1949        };
1950});
1951
1952jQuery.each({
1953        prevAll: function(elem){return jQuery.dir(elem,"previousSibling");}
1954}, function(name, fn){
1955        jQuery.fn[ name ] = function( selector ) {
1956                ///     <summary>
1957                ///             Finds all sibling elements before the current element.
1958                ///             Can be filtered with an optional expressions.
1959                ///             Part of DOM/Traversing
1960                ///     </summary>
1961                ///     <param name="expr" type="String" optional="true">
1962                ///             (optional) An expression to filter the previous Elements with
1963                ///     </param>
1964                ///     <returns type="jQuery" />
1965       
1966                var ret = jQuery.map( this, fn );
1967
1968                if ( selector && typeof selector == "string" )
1969                        ret = jQuery.multiFilter( selector, ret );
1970
1971                return this.pushStack( jQuery.unique( ret ), name, selector );
1972        };
1973});
1974
1975jQuery.each({
1976        siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);}
1977}, function(name, fn){
1978        jQuery.fn[ name ] = function( selector ) {
1979                ///     <summary>
1980                ///             Get a set of elements containing all of the unique siblings of each of the
1981                ///             matched set of elements.
1982                ///             Can be filtered with an optional expressions.
1983                ///             Part of DOM/Traversing
1984                ///     </summary>
1985                ///     <param name="expr" type="String" optional="true">
1986                ///             (optional) An expression to filter the sibling Elements with
1987                ///     </param>
1988                ///     <returns type="jQuery" />
1989               
1990                var ret = jQuery.map( this, fn );
1991
1992                if ( selector && typeof selector == "string" )
1993                        ret = jQuery.multiFilter( selector, ret );
1994
1995                return this.pushStack( jQuery.unique( ret ), name, selector );
1996        };
1997});
1998
1999jQuery.each({
2000        children: function(elem){return jQuery.sibling(elem.firstChild);}
2001}, function(name, fn){
2002        jQuery.fn[ name ] = function( selector ) {
2003                ///     <summary>
2004                ///             Get a set of elements containing all of the unique children of each of the
2005                ///             matched set of elements.
2006                ///             Can be filtered with an optional expressions.
2007                ///             Part of DOM/Traversing
2008                ///     </summary>
2009                ///     <param name="expr" type="String" optional="true">
2010                ///             (optional) An expression to filter the child Elements with
2011                ///     </param>
2012                ///     <returns type="jQuery" />
2013               
2014                var ret = jQuery.map( this, fn );
2015
2016                if ( selector && typeof selector == "string" )
2017                        ret = jQuery.multiFilter( selector, ret );
2018
2019                return this.pushStack( jQuery.unique( ret ), name, selector );
2020        };
2021});
2022
2023jQuery.each({
2024        contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
2025}, function(name, fn){
2026        jQuery.fn[ name ] = function( selector ) {
2027                ///     <summary>Finds all the child nodes inside the matched elements including text nodes, or the content document if the element is an iframe.</summary>
2028                ///     <returns type="jQuery" />
2029               
2030                var ret = jQuery.map( this, fn );
2031
2032                if ( selector && typeof selector == "string" )
2033                        ret = jQuery.multiFilter( selector, ret );
2034
2035                return this.pushStack( jQuery.unique( ret ), name, selector );
2036        };
2037});
2038
2039// [vsdoc] The following section has been denormalized from original sources for IntelliSense.
2040// jQuery.each({
2041//      appendTo: "append",
2042//      prependTo: "prepend",
2043//      insertBefore: "before",
2044//      insertAfter: "after",
2045//      replaceAll: "replaceWith"
2046// }, function(name, original){
2047//      jQuery.fn[ name ] = function() {
2048//              var args = arguments;
2049//
2050//              return this.each(function(){
2051//                      for ( var i = 0, length = args.length; i < length; i++ )
2052//                              jQuery( args[ i ] )[ original ]( this );
2053//              });
2054//      };
2055// });
2056
2057jQuery.fn.appendTo = function() {
2058        ///     <summary>
2059        ///             Append all of the matched elements to another, specified, set of elements.
2060        ///             This operation is, essentially, the reverse of doing a regular
2061        ///             $(A).append(B), in that instead of appending B to A, you're appending
2062        ///             A to B.
2063        ///             Part of DOM/Manipulation
2064        ///     </summary>
2065        ///     <param name="content" type="Content">
2066        ///              Content to append to the selected element to.
2067        ///     </param>
2068        ///     <returns type="jQuery" />
2069        var args = arguments;
2070        return this.each(function(){
2071                for ( var i = 0, length = args.length; i < length; i++ )
2072                        jQuery( args[ i ] )[ "append" ]( this );
2073        });
2074};
2075
2076jQuery.fn.prependTo = function() {
2077        ///     <summary>
2078        ///             Prepend all of the matched elements to another, specified, set of elements.
2079        ///             This operation is, essentially, the reverse of doing a regular
2080        ///             $(A).prepend(B), in that instead of prepending B to A, you're prepending
2081        ///             A to B.
2082        ///             Part of DOM/Manipulation
2083        ///     </summary>
2084        ///     <param name="content" type="Content">
2085        ///              Content to prepend to the selected element to.
2086        ///     </param>
2087        ///     <returns type="jQuery" />
2088        var args = arguments;
2089        return this.each(function(){
2090                for ( var i = 0, length = args.length; i < length; i++ )
2091                        jQuery( args[ i ] )[ "prepend" ]( this );
2092        });
2093};
2094
2095jQuery.fn.insertBefore = function() {
2096        ///     <summary>
2097        ///             Insert all of the matched elements before another, specified, set of elements.
2098        ///             This operation is, essentially, the reverse of doing a regular
2099        ///             $(A).before(B), in that instead of inserting B before A, you're inserting
2100        ///             A before B.
2101        ///             Part of DOM/Manipulation
2102        ///     </summary>
2103        ///     <param name="content" type="Content">
2104        ///              Content to insert the selected element before.
2105        ///     </param>
2106        ///     <returns type="jQuery" />
2107        var args = arguments;
2108        return this.each(function(){
2109                for ( var i = 0, length = args.length; i < length; i++ )
2110                        jQuery( args[ i ] )[ "before" ]( this );
2111        });
2112};
2113
2114jQuery.fn.insertAfter = function() {
2115        ///     <summary>
2116        ///             Insert all of the matched elements after another, specified, set of elements.
2117        ///             This operation is, essentially, the reverse of doing a regular
2118        ///             $(A).after(B), in that instead of inserting B after A, you're inserting
2119        ///             A after B.
2120        ///             Part of DOM/Manipulation
2121        ///     </summary>
2122        ///     <param name="content" type="Content">
2123        ///              Content to insert the selected element after.
2124        ///     </param>
2125        ///     <returns type="jQuery" />
2126        var args = arguments;
2127        return this.each(function(){
2128                for ( var i = 0, length = args.length; i < length; i++ )
2129                        jQuery( args[ i ] )[ "after" ]( this );
2130        });
2131};
2132
2133jQuery.fn.replaceAll = function() {
2134        ///     <summary>Replaces the elements matched by the specified selector with the matched elements</summary>
2135        ///     <param name="selector" type="String">The elements to find and replace the matched elements with</param>
2136        ///     <returns type="jQuery" />
2137        var args = arguments;
2138        return this.each(function(){
2139                for ( var i = 0, length = args.length; i < length; i++ )
2140                        jQuery( args[ i ] )[ "replaceWith" ]( this );
2141        });
2142};
2143
2144// [vsdoc] The following section has been denormalized from original sources for IntelliSense.
2145// jQuery.each({
2146//      removeAttr: function( name ) {
2147//              jQuery.attr( this, name, "" );
2148//              if (this.nodeType == 1)
2149//                      this.removeAttribute( name );
2150//      },
2151//
2152//      addClass: function( classNames ) {
2153//              jQuery.className.add( this, classNames );
2154//      },
2155//
2156//      removeClass: function( classNames ) {
2157//              jQuery.className.remove( this, classNames );
2158//      },
2159//
2160//      toggleClass: function( classNames, state ) {
2161//              if( typeof state !== "boolean" )
2162//                      state = !jQuery.className.has( this, classNames );
2163//              jQuery.className[ state ? "add" : "remove" ]( this, classNames );
2164//      },
2165//
2166//      remove: function( selector ) {
2167//              if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
2168//                      // Prevent memory leaks
2169//                      jQuery( "*", this ).add([this]).each(function(){
2170//                              jQuery.event.remove(this);
2171//                              jQuery.removeData(this);
2172//                      });
2173//                      if (this.parentNode)
2174//                              this.parentNode.removeChild( this );
2175//              }
2176//      },
2177//
2178//      empty: function() {
2179//              // Remove element nodes and prevent memory leaks
2180//              jQuery( ">*", this ).remove();
2181//
2182//              // Remove any remaining nodes
2183//              while ( this.firstChild )
2184//                      this.removeChild( this.firstChild );
2185//      }
2186// }, function(name, fn){
2187//      jQuery.fn[ name ] = function(){
2188//              return this.each( fn, arguments );
2189//      };
2190// });
2191
2192jQuery.fn.removeAttr = function(){
2193        ///     <summary>
2194        ///             Remove an attribute from each of the matched elements.
2195        ///             Part of DOM/Attributes
2196        ///     </summary>
2197        ///     <param name="key" type="String">
2198        ///             name The name of the attribute to remove.
2199        ///     </param>
2200        ///     <returns type="jQuery" />
2201        return this.each( function( name ) {
2202                jQuery.attr( this, name, "" );
2203                if (this.nodeType == 1)
2204                        this.removeAttribute( name );
2205        }, arguments );
2206};
2207
2208jQuery.fn.addClass = function(){
2209        ///     <summary>
2210        ///             Adds the specified class(es) to each of the set of matched elements.
2211        ///             Part of DOM/Attributes
2212        ///     </summary>
2213        ///     <param name="classNames" type="String">
2214        ///             lass One or more CSS classes to add to the elements
2215        ///     </param>
2216        ///     <returns type="jQuery" />
2217        return this.each( function( classNames ) {
2218                jQuery.className.add( this, classNames );
2219        }, arguments );
2220};
2221
2222jQuery.fn.removeClass = function(){
2223        ///     <summary>
2224        ///             Removes all or the specified class(es) from the set of matched elements.
2225        ///             Part of DOM/Attributes
2226        ///     </summary>
2227        ///     <param name="cssClasses" type="String" optional="true">
2228        ///             (Optional) One or more CSS classes to remove from the elements
2229        ///     </param>
2230        ///     <returns type="jQuery" />
2231        return this.each( function( classNames ) {
2232                jQuery.className.remove( this, classNames );
2233        }, arguments );
2234};
2235
2236jQuery.fn.toggleClass = function(){
2237        ///     <summary>
2238        ///             Adds the specified class if it is not present, removes it if it is
2239        ///             present.
2240        ///             Part of DOM/Attributes
2241        ///     </summary>
2242        ///     <param name="cssClass" type="String">
2243        ///             A CSS class with which to toggle the elements
2244        ///     </param>
2245        ///     <returns type="jQuery" />
2246        return this.each( function( classNames, state ) {
2247                if( typeof state !== "boolean" )
2248                        state = !jQuery.className.has( this, classNames );
2249                jQuery.className[ state ? "add" : "remove" ]( this, classNames );
2250        }, arguments );
2251};
2252
2253jQuery.fn.remove = function(){
2254        ///     <summary>
2255        ///             Removes all matched elements from the DOM. This does NOT remove them from the
2256        ///             jQuery object, allowing you to use the matched elements further.
2257        ///             Can be filtered with an optional expressions.
2258        ///             Part of DOM/Manipulation
2259        ///     </summary>
2260        ///     <param name="expr" type="String" optional="true">
2261        ///             (optional) A jQuery expression to filter elements by.
2262        ///     </param>
2263        ///     <returns type="jQuery" />
2264        return this.each( function( selector ) {
2265                if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
2266                        // Prevent memory leaks
2267                        jQuery( "*", this ).add([this]).each(function(){
2268                                jQuery.event.remove(this);
2269                                jQuery.removeData(this);
2270                        });
2271                        if (this.parentNode)
2272                                this.parentNode.removeChild( this );
2273                }
2274        }, arguments );
2275};
2276
2277jQuery.fn.empty = function(){
2278        ///     <summary>
2279        ///             Removes all child nodes from the set of matched elements.
2280        ///             Part of DOM/Manipulation
2281        ///     </summary>
2282        ///     <returns type="jQuery" />
2283        return this.each( function() {
2284                // Remove element nodes and prevent memory leaks
2285                jQuery( ">*", this ).remove();
2286
2287                // Remove any remaining nodes
2288                while ( this.firstChild )
2289                        this.removeChild( this.firstChild );
2290        }, arguments );
2291};
2292
2293// Helper function used by the dimensions and offset modules
2294function num(elem, prop) {
2295        return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
2296}
2297var expando = "jQuery" + now(), uuid = 0, windowData = {};
2298
2299jQuery.extend({
2300        cache: {},
2301
2302        data: function( elem, name, data ) {
2303                elem = elem == window ?
2304                        windowData :
2305                        elem;
2306
2307                var id = elem[ expando ];
2308
2309                // Compute a unique ID for the element
2310                if ( !id )
2311                        id = elem[ expando ] = ++uuid;
2312
2313                // Only generate the data cache if we're
2314                // trying to access or manipulate it
2315                if ( name && !jQuery.cache[ id ] )
2316                        jQuery.cache[ id ] = {};
2317
2318                // Prevent overriding the named cache with undefined values
2319                if ( data !== undefined )
2320                        jQuery.cache[ id ][ name ] = data;
2321
2322                // Return the named cache data, or the ID for the element
2323                return name ?
2324                        jQuery.cache[ id ][ name ] :
2325                        id;
2326        },
2327
2328        removeData: function( elem, name ) {
2329                elem = elem == window ?
2330                        windowData :
2331                        elem;
2332
2333                var id = elem[ expando ];
2334
2335                // If we want to remove a specific section of the element's data
2336                if ( name ) {
2337                        if ( jQuery.cache[ id ] ) {
2338                                // Remove the section of cache data
2339                                delete jQuery.cache[ id ][ name ];
2340
2341                                // If we've removed all the data, remove the element's cache
2342                                name = "";
2343
2344                                for ( name in jQuery.cache[ id ] )
2345                                        break;
2346
2347                                if ( !name )
2348                                        jQuery.removeData( elem );
2349                        }
2350
2351                // Otherwise, we want to remove all of the element's data
2352                } else {
2353                        // Clean up the element expando
2354                        try {
2355                                delete elem[ expando ];
2356                        } catch(e){
2357                                // IE has trouble directly removing the expando
2358                                // but it's ok with using removeAttribute
2359                                if ( elem.removeAttribute )
2360                                        elem.removeAttribute( expando );
2361                        }
2362
2363                        // Completely remove the data cache
2364                        delete jQuery.cache[ id ];
2365                }
2366        },
2367        queue: function( elem, type, data ) {
2368                if ( elem ){
2369       
2370                        type = (type || "fx") + "queue";
2371       
2372                        var q = jQuery.data( elem, type );
2373       
2374                        if ( !q || jQuery.isArray(data) )
2375                                q = jQuery.data( elem, type, jQuery.makeArray(data) );
2376                        else if( data )
2377                                q.push( data );
2378       
2379                }
2380                return q;
2381        },
2382
2383        dequeue: function( elem, type ){
2384                var queue = jQuery.queue( elem, type ),
2385                        fn = queue.shift();
2386               
2387                if( !type || type === "fx" )
2388                        fn = queue[0];
2389                       
2390                if( fn !== undefined )
2391                        fn.call(elem);
2392        }
2393});
2394
2395jQuery.fn.extend({
2396        data: function( key, value ){
2397                var parts = key.split(".");
2398                parts[1] = parts[1] ? "." + parts[1] : "";
2399
2400                if ( value === undefined ) {
2401                        var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
2402
2403                        if ( data === undefined && this.length )
2404                                data = jQuery.data( this[0], key );
2405
2406                        return data === undefined && parts[1] ?
2407                                this.data( parts[0] ) :
2408                                data;
2409                } else
2410                        return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
2411                                jQuery.data( this, key, value );
2412                        });
2413        },
2414
2415        removeData: function( key ){
2416                return this.each(function(){
2417                        jQuery.removeData( this, key );
2418                });
2419        },
2420        queue: function(type, data){
2421                ///     <summary>
2422                ///             1: queue() - Returns a reference to the first element's queue (which is an array of functions).
2423                ///             2: queue(callback) - Adds a new function, to be executed, onto the end of the queue of all matched elements.
2424                ///             3: queue(queue) - Replaces the queue of all matched element with this new queue (the array of functions).
2425                ///     </summary>
2426                ///     <param name="type" type="Function">The function to add to the queue.</param>
2427                ///     <returns type="jQuery" />
2428
2429                if ( typeof type !== "string" ) {
2430                        data = type;
2431                        type = "fx";
2432                }
2433
2434                if ( data === undefined )
2435                        return jQuery.queue( this[0], type );
2436
2437                return this.each(function(){
2438                        var queue = jQuery.queue( this, type, data );
2439                       
2440                         if( type == "fx" && queue.length == 1 )
2441                                queue[0].call(this);
2442                });
2443        },
2444        dequeue: function(type){
2445                ///     <summary>
2446                ///             Removes a queued function from the front of the queue and executes it.
2447                ///     </summary>
2448                ///     <param name="type" type="String" optional="true">The type of queue to access.</param>
2449                ///     <returns type="jQuery" />
2450               
2451                return this.each(function(){
2452                        jQuery.dequeue( this, type );
2453                });
2454        }
2455});/*!
2456 * Sizzle CSS Selector Engine - v0.9.3
2457 *  Copyright 2009, The Dojo Foundation
2458 *  Released under the MIT, BSD, and GPL Licenses.
2459 *  More information: http://sizzlejs.com/
2460 */
2461(function(){
2462
2463var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,
2464        done = 0,
2465        toString = Object.prototype.toString;
2466
2467var Sizzle = function(selector, context, results, seed) {
2468        results = results || [];
2469        context = context || document;
2470
2471        if ( context.nodeType !== 1 && context.nodeType !== 9 )
2472                return [];
2473       
2474        if ( !selector || typeof selector !== "string" ) {
2475                return results;
2476        }
2477
2478        var parts = [], m, set, checkSet, check, mode, extra, prune = true;
2479       
2480        // Reset the position of the chunker regexp (start from head)
2481        chunker.lastIndex = 0;
2482       
2483        while ( (m = chunker.exec(selector)) !== null ) {
2484                parts.push( m[1] );
2485               
2486                if ( m[2] ) {
2487                        extra = RegExp.rightContext;
2488                        break;
2489                }
2490        }
2491
2492        if ( parts.length > 1 && origPOS.exec( selector ) ) {
2493                if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
2494                        set = posProcess( parts[0] + parts[1], context );
2495                } else {
2496                        set = Expr.relative[ parts[0] ] ?
2497                                [ context ] :
2498                                Sizzle( parts.shift(), context );
2499
2500                        while ( parts.length ) {
2501                                selector = parts.shift();
2502
2503                                if ( Expr.relative[ selector ] )
2504                                        selector += parts.shift();
2505
2506                                set = posProcess( selector, set );
2507                        }
2508                }
2509        } else {
2510                var ret = seed ?
2511                        { expr: parts.pop(), set: makeArray(seed) } :
2512                        Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) );
2513                set = Sizzle.filter( ret.expr, ret.set );
2514
2515                if ( parts.length > 0 ) {
2516                        checkSet = makeArray(set);
2517                } else {
2518                        prune = false;
2519                }
2520
2521                while ( parts.length ) {
2522                        var cur = parts.pop(), pop = cur;
2523
2524                        if ( !Expr.relative[ cur ] ) {
2525                                cur = "";
2526                        } else {
2527                                pop = parts.pop();
2528                        }
2529
2530                        if ( pop == null ) {
2531                                pop = context;
2532                        }
2533
2534                        Expr.relative[ cur ]( checkSet, pop, isXML(context) );
2535                }
2536        }
2537
2538        if ( !checkSet ) {
2539                checkSet = set;
2540        }
2541
2542        if ( !checkSet ) {
2543                throw "Syntax error, unrecognized expression: " + (cur || selector);
2544        }
2545
2546        if ( toString.call(checkSet) === "[object Array]" ) {
2547                if ( !prune ) {
2548                        results.push.apply( results, checkSet );
2549                } else if ( context.nodeType === 1 ) {
2550                        for ( var i = 0; checkSet[i] != null; i++ ) {
2551                                if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
2552                                        results.push( set[i] );
2553                                }
2554                        }
2555                } else {
2556                        for ( var i = 0; checkSet[i] != null; i++ ) {
2557                                if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
2558                                        results.push( set[i] );
2559                                }
2560                        }
2561                }
2562        } else {
2563                makeArray( checkSet, results );
2564        }
2565
2566        if ( extra ) {
2567                Sizzle( extra, context, results, seed );
2568        }
2569
2570        return results;
2571};
2572
2573Sizzle.matches = function(expr, set){
2574        return Sizzle(expr, null, null, set);
2575};
2576
2577Sizzle.find = function(expr, context, isXML){
2578        var set, match;
2579
2580        if ( !expr ) {
2581                return [];
2582        }
2583
2584        for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
2585                var type = Expr.order[i], match;
2586               
2587                if ( (match = Expr.match[ type ].exec( expr )) ) {
2588                        var left = RegExp.leftContext;
2589
2590                        if ( left.substr( left.length - 1 ) !== "\\" ) {
2591                                match[1] = (match[1] || "").replace(/\\/g, "");
2592                                set = Expr.find[ type ]( match, context, isXML );
2593                                if ( set != null ) {
2594                                        expr = expr.replace( Expr.match[ type ], "" );
2595                                        break;
2596                                }
2597                        }
2598                }
2599        }
2600
2601        if ( !set ) {
2602                set = context.getElementsByTagName("*");
2603        }
2604
2605        return {set: set, expr: expr};
2606};
2607
2608Sizzle.filter = function(expr, set, inplace, not){
2609        var old = expr, result = [], curLoop = set, match, anyFound;
2610
2611        while ( expr && set.length ) {
2612                for ( var type in Expr.filter ) {
2613                        if ( (match = Expr.match[ type ].exec( expr )) != null ) {
2614                                var filter = Expr.filter[ type ], found, item;
2615                                anyFound = false;
2616
2617                                if ( curLoop == result ) {
2618                                        result = [];
2619                                }
2620
2621                                if ( Expr.preFilter[ type ] ) {
2622                                        match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not );
2623
2624                                        if ( !match ) {
2625                                                anyFound = found = true;
2626                                        } else if ( match === true ) {
2627                                                continue;
2628                                        }
2629                                }
2630
2631                                if ( match ) {
2632                                        for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
2633                                                if ( item ) {
2634                                                        found = filter( item, match, i, curLoop );
2635                                                        var pass = not ^ !!found;
2636
2637                                                        if ( inplace && found != null ) {
2638                                                                if ( pass ) {
2639                                                                        anyFound = true;
2640                                                                } else {
2641                                                                        curLoop[i] = false;
2642                                                                }
2643                                                        } else if ( pass ) {
2644                                                                result.push( item );
2645                                                                anyFound = true;
2646                                                        }
2647                                                }
2648                                        }
2649                                }
2650
2651                                if ( found !== undefined ) {
2652                                        if ( !inplace ) {
2653                                                curLoop = result;
2654                                        }
2655
2656                                        expr = expr.replace( Expr.match[ type ], "" );
2657
2658                                        if ( !anyFound ) {
2659                                                return [];
2660                                        }
2661
2662                                        break;
2663                                }
2664                        }
2665                }
2666
2667                expr = expr.replace(/\s*,\s*/, "");
2668
2669                // Improper expression
2670                if ( expr == old ) {
2671                        if ( anyFound == null ) {
2672                                throw "Syntax error, unrecognized expression: " + expr;
2673                        } else {
2674                                break;
2675                        }
2676                }
2677
2678                old = expr;
2679        }
2680
2681        return curLoop;
2682};
2683
2684var Expr = Sizzle.selectors = {
2685        order: [ "ID", "NAME", "TAG" ],
2686        match: {
2687                ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
2688                CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
2689                NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
2690                ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
2691                TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
2692                CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
2693                POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
2694                PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
2695        },
2696        attrMap: {
2697                "class": "className",
2698                "for": "htmlFor"
2699        },
2700        attrHandle: {
2701                href: function(elem){
2702                        return elem.getAttribute("href");
2703                }
2704        },
2705        relative: {
2706                "+": function(checkSet, part){
2707                        for ( var i = 0, l = checkSet.length; i < l; i++ ) {
2708                                var elem = checkSet[i];
2709                                if ( elem ) {
2710                                        var cur = elem.previousSibling;
2711                                        while ( cur && cur.nodeType !== 1 ) {
2712                                                cur = cur.previousSibling;
2713                                        }
2714                                        checkSet[i] = typeof part === "string" ?
2715                                                cur || false :
2716                                                cur === part;
2717                                }
2718                        }
2719
2720                        if ( typeof part === "string" ) {
2721                                Sizzle.filter( part, checkSet, true );
2722                        }
2723                },
2724                ">": function(checkSet, part, isXML){
2725                        if ( typeof part === "string" && !/\W/.test(part) ) {
2726                                part = isXML ? part : part.toUpperCase();
2727
2728                                for ( var i = 0, l = checkSet.length; i < l; i++ ) {
2729                                        var elem = checkSet[i];
2730                                        if ( elem ) {
2731                                                var parent = elem.parentNode;
2732                                                checkSet[i] = parent.nodeName === part ? parent : false;
2733                                        }
2734                                }
2735                        } else {
2736                                for ( var i = 0, l = checkSet.length; i < l; i++ ) {
2737                                        var elem = checkSet[i];
2738                                        if ( elem ) {
2739                                                checkSet[i] = typeof part === "string" ?
2740                                                        elem.parentNode :
2741                                                        elem.parentNode === part;
2742                                        }
2743                                }
2744
2745                                if ( typeof part === "string" ) {
2746                                        Sizzle.filter( part, checkSet, true );
2747                                }
2748                        }
2749                },
2750                "": function(checkSet, part, isXML){
2751                        var doneName = "done" + (done++), checkFn = dirCheck;
2752
2753                        if ( !part.match(/\W/) ) {
2754                                var nodeCheck = part = isXML ? part : part.toUpperCase();
2755                                checkFn = dirNodeCheck;
2756                        }
2757
2758                        checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
2759                },
2760                "~": function(checkSet, part, isXML){
2761                        var doneName = "done" + (done++), checkFn = dirCheck;
2762
2763                        if ( typeof part === "string" && !part.match(/\W/) ) {
2764                                var nodeCheck = part = isXML ? part : part.toUpperCase();
2765                                checkFn = dirNodeCheck;
2766                        }
2767
2768                        checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
2769                }
2770        },
2771        find: {
2772                ID: function(match, context, isXML){
2773                        if ( typeof context.getElementById !== "undefined" && !isXML ) {
2774                                var m = context.getElementById(match[1]);
2775                                return m ? [m] : [];
2776                        }
2777                },
2778                NAME: function(match, context, isXML){
2779                        if ( typeof context.getElementsByName !== "undefined" && !isXML ) {
2780                                return context.getElementsByName(match[1]);
2781                        }
2782                },
2783                TAG: function(match, context){
2784                        return context.getElementsByTagName(match[1]);
2785                }
2786        },
2787        preFilter: {
2788                CLASS: function(match, curLoop, inplace, result, not){
2789                        match = " " + match[1].replace(/\\/g, "") + " ";
2790
2791                        var elem;
2792                        for ( var i = 0; (elem = curLoop[i]) != null; i++ ) {
2793                                if ( elem ) {
2794                                        if ( not ^ (" " + elem.className + " ").indexOf(match) >= 0 ) {
2795                                                if ( !inplace )
2796                                                        result.push( elem );
2797                                        } else if ( inplace ) {
2798                                                curLoop[i] = false;
2799                                        }
2800                                }
2801                        }
2802
2803                        return false;
2804                },
2805                ID: function(match){
2806                        return match[1].replace(/\\/g, "");
2807                },
2808                TAG: function(match, curLoop){
2809                        for ( var i = 0; curLoop[i] === false; i++ ){}
2810                        return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
2811                },
2812                CHILD: function(match){
2813                        if ( match[1] == "nth" ) {
2814                                // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
2815                                var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
2816                                        match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
2817                                        !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
2818
2819                                // calculate the numbers (first)n+(last) including if they are negative
2820                                match[2] = (test[1] + (test[2] || 1)) - 0;
2821                                match[3] = test[3] - 0;
2822                        }
2823
2824                        // TODO: Move to normal caching system
2825                        match[0] = "done" + (done++);
2826
2827                        return match;
2828                },
2829                ATTR: function(match){
2830                        var name = match[1].replace(/\\/g, "");
2831                       
2832                        if ( Expr.attrMap[name] ) {
2833                                match[1] = Expr.attrMap[name];
2834                        }
2835
2836                        if ( match[2] === "~=" ) {
2837                                match[4] = " " + match[4] + " ";
2838                        }
2839
2840                        return match;
2841                },
2842                PSEUDO: function(match, curLoop, inplace, result, not){
2843                        if ( match[1] === "not" ) {
2844                                // If we're dealing with a complex expression, or a simple one
2845                                if ( match[3].match(chunker).length > 1 ) {
2846                                        match[3] = Sizzle(match[3], null, null, curLoop);
2847                                } else {
2848                                        var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
2849                                        if ( !inplace ) {
2850                                                result.push.apply( result, ret );
2851                                        }
2852                                        return false;
2853                                }
2854                        } else if ( Expr.match.POS.test( match[0] ) ) {
2855                                return true;
2856                        }
2857                       
2858                        return match;
2859                },
2860                POS: function(match){
2861                        match.unshift( true );
2862                        return match;
2863                }
2864        },
2865        filters: {
2866                enabled: function(elem){
2867                        return elem.disabled === false && elem.type !== "hidden";
2868                },
2869                disabled: function(elem){
2870                        return elem.disabled === true;
2871                },
2872                checked: function(elem){
2873                        return elem.checked === true;
2874                },
2875                selected: function(elem){
2876                        // Accessing this property makes selected-by-default
2877                        // options in Safari work properly
2878                        elem.parentNode.selectedIndex;
2879                        return elem.selected === true;
2880                },
2881                parent: function(elem){
2882                        return !!elem.firstChild;
2883                },
2884                empty: function(elem){
2885                        return !elem.firstChild;
2886                },
2887                has: function(elem, i, match){
2888                        return !!Sizzle( match[3], elem ).length;
2889                },
2890                header: function(elem){
2891                        return /h\d/i.test( elem.nodeName );
2892                },
2893                text: function(elem){
2894                        return "text" === elem.type;
2895                },
2896                radio: function(elem){
2897                        return "radio" === elem.type;
2898                },
2899                checkbox: function(elem){
2900                        return "checkbox" === elem.type;
2901                },
2902                file: function(elem){
2903                        return "file" === elem.type;
2904                },
2905                password: function(elem){
2906                        return "password" === elem.type;
2907                },
2908                submit: function(elem){
2909                        return "submit" === elem.type;
2910                },
2911                image: function(elem){
2912                        return "image" === elem.type;
2913                },
2914                reset: function(elem){
2915                        return "reset" === elem.type;
2916                },
2917                button: function(elem){
2918                        return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
2919                },
2920                input: function(elem){
2921                        return /input|select|textarea|button/i.test(elem.nodeName);
2922                }
2923        },
2924        setFilters: {
2925                first: function(elem, i){
2926                        return i === 0;
2927                },
2928                last: function(elem, i, match, array){
2929                        return i === array.length - 1;
2930                },
2931                even: function(elem, i){
2932                        return i % 2 === 0;
2933                },
2934                odd: function(elem, i){
2935                        return i % 2 === 1;
2936                },
2937                lt: function(elem, i, match){
2938                        return i < match[3] - 0;
2939                },
2940                gt: function(elem, i, match){
2941                        return i > match[3] - 0;
2942                },
2943                nth: function(elem, i, match){
2944                        return match[3] - 0 == i;
2945                },
2946                eq: function(elem, i, match){
2947                        return match[3] - 0 == i;
2948                }
2949        },
2950        filter: {
2951                CHILD: function(elem, match){
2952                        var type = match[1], parent = elem.parentNode;
2953
2954                        var doneName = match[0];
2955                       
2956                        if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) {
2957                                var count = 1;
2958
2959                                for ( var node = parent.firstChild; node; node = node.nextSibling ) {
2960                                        if ( node.nodeType == 1 ) {
2961                                                node.nodeIndex = count++;
2962                                        }
2963                                }
2964
2965                                parent[ doneName ] = count - 1;
2966                        }
2967
2968                        if ( type == "first" ) {
2969                                return elem.nodeIndex == 1;
2970                        } else if ( type == "last" ) {
2971                                return elem.nodeIndex == parent[ doneName ];
2972                        } else if ( type == "only" ) {
2973                                return parent[ doneName ] == 1;
2974                        } else if ( type == "nth" ) {
2975                                var add = false, first = match[2], last = match[3];
2976
2977                                if ( first == 1 && last == 0 ) {
2978                                        return true;
2979                                }
2980
2981                                if ( first == 0 ) {
2982                                        if ( elem.nodeIndex == last ) {
2983                                                add = true;
2984                                        }
2985                                } else if ( (elem.nodeIndex - last) % first == 0 && (elem.nodeIndex - last) / first >= 0 ) {
2986                                        add = true;
2987                                }
2988
2989                                return add;
2990                        }
2991                },
2992                PSEUDO: function(elem, match, i, array){
2993                        var name = match[1], filter = Expr.filters[ name ];
2994
2995                        if ( filter ) {
2996                                return filter( elem, i, match, array );
2997                        } else if ( name === "contains" ) {
2998                                return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
2999                        } else if ( name === "not" ) {
3000                                var not = match[3];
3001
3002                                for ( var i = 0, l = not.length; i < l; i++ ) {
3003                                        if ( not[i] === elem ) {
3004                                                return false;
3005                                        }
3006                                }
3007
3008                                return true;
3009                        }
3010                },
3011                ID: function(elem, match){
3012                        return elem.nodeType === 1 && elem.getAttribute("id") === match;
3013                },
3014                TAG: function(elem, match){
3015                        return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
3016                },
3017                CLASS: function(elem, match){
3018                        return match.test( elem.className );
3019                },
3020                ATTR: function(elem, match){
3021                        var result = Expr.attrHandle[ match[1] ] ? Expr.attrHandle[ match[1] ]( elem ) : elem[ match[1] ] || elem.getAttribute( match[1] ), value = result + "", type = match[2], check = match[4];
3022                        return result == null ?
3023                                type === "!=" :
3024                                type === "=" ?
3025                                value === check :
3026                                type === "*=" ?
3027                                value.indexOf(check) >= 0 :
3028                                type === "~=" ?
3029                                (" " + value + " ").indexOf(check) >= 0 :
3030                                !match[4] ?
3031                                result :
3032                                type === "!=" ?
3033                                value != check :
3034                                type === "^=" ?
3035                                value.indexOf(check) === 0 :
3036                                type === "$=" ?
3037                                value.substr(value.length - check.length) === check :
3038                                type === "|=" ?
3039                                value === check || value.substr(0, check.length + 1) === check + "-" :
3040                                false;
3041                },
3042                POS: function(elem, match, i, array){
3043                        var name = match[2], filter = Expr.setFilters[ name ];
3044
3045                        if ( filter ) {
3046                                return filter( elem, i, match, array );
3047                        }
3048                }
3049        }
3050};
3051
3052var origPOS = Expr.match.POS;
3053
3054for ( var type in Expr.match ) {
3055        Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
3056}
3057
3058var makeArray = function(array, results) {
3059        array = Array.prototype.slice.call( array );
3060
3061        if ( results ) {
3062                results.push.apply( results, array );
3063                return results;
3064        }
3065       
3066        return array;
3067};
3068
3069// Perform a simple check to determine if the browser is capable of
3070// converting a NodeList to an array using builtin methods.
3071try {
3072        Array.prototype.slice.call( document.documentElement.childNodes );
3073
3074// Provide a fallback method if it does not work
3075} catch(e){
3076        makeArray = function(array, results) {
3077                var ret = results || [];
3078
3079                if ( toString.call(array) === "[object Array]" ) {
3080                        Array.prototype.push.apply( ret, array );
3081                } else {
3082                        if ( typeof array.length === "number" ) {
3083                                for ( var i = 0, l = array.length; i < l; i++ ) {
3084                                        ret.push( array[i] );
3085                                }
3086                        } else {
3087                                for ( var i = 0; array[i]; i++ ) {
3088                                        ret.push( array[i] );
3089                                }
3090                        }
3091                }
3092
3093                return ret;
3094        };
3095}
3096
3097// [vsdoc] The following function has been commented out for IntelliSense.
3098// Check to see if the browser returns elements by name when
3099// querying by getElementById (and provide a workaround)
3100//(function(){
3101//      // We're going to inject a fake input element with a specified name
3102//      var form = document.createElement("form"),
3103//              id = "script" + (new Date).getTime();
3104//      form.innerHTML = "<input name='" + id + "'/>";
3105
3106//      // Inject it into the root element, check its status, and remove it quickly
3107//      var root = document.documentElement;
3108//      root.insertBefore( form, root.firstChild );
3109
3110//      // The workaround has to do additional checks after a getElementById
3111//      // Which slows things down for other browsers (hence the branching)
3112//      if ( !!document.getElementById( id ) ) {
3113//              Expr.find.ID = function(match, context, isXML){
3114//                      if ( typeof context.getElementById !== "undefined" && !isXML ) {
3115//                              var m = context.getElementById(match[1]);
3116//                              return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
3117//                      }
3118//              };
3119
3120//              Expr.filter.ID = function(elem, match){
3121//                      var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
3122//                      return elem.nodeType === 1 && node && node.nodeValue === match;
3123//              };
3124//      }
3125
3126//      root.removeChild( form );
3127//})();
3128
3129// [vsdoc] The following function has been commented out for IntelliSense.
3130//(function(){
3131//      // Check to see if the browser returns only elements
3132//      // when doing getElementsByTagName("*")
3133
3134//      // Create a fake element
3135//      var div = document.createElement("div");
3136//      div.appendChild( document.createComment("") );
3137
3138//      // Make sure no comments are found
3139//      if ( div.getElementsByTagName("*").length > 0 ) {
3140//              Expr.find.TAG = function(match, context){
3141//                      var results = context.getElementsByTagName(match[1]);
3142
3143//                      // Filter out possible comments
3144//                      if ( match[1] === "*" ) {
3145//                              var tmp = [];
3146
3147//                              for ( var i = 0; results[i]; i++ ) {
3148//                                      if ( results[i].nodeType === 1 ) {
3149//                                              tmp.push( results[i] );
3150//                                      }
3151//                              }
3152
3153//                              results = tmp;
3154//                      }
3155
3156//                      return results;
3157//              };
3158//      }
3159
3160//      // Check to see if an attribute returns normalized href attributes
3161//      div.innerHTML = "<a href='#'></a>";
3162//      if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) {
3163//              Expr.attrHandle.href = function(elem){
3164//                      return elem.getAttribute("href", 2);
3165//              };
3166//      }
3167// })();
3168
3169if ( document.querySelectorAll ) (function(){
3170        var oldSizzle = Sizzle, div = document.createElement("div");
3171        div.innerHTML = "<p class='TEST'></p>";
3172
3173        // Safari can't handle uppercase or unicode characters when
3174        // in quirks mode.
3175        if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
3176                return;
3177        }
3178       
3179        Sizzle = function(query, context, extra, seed){
3180                context = context || document;
3181
3182                // Only use querySelectorAll on non-XML documents
3183                // (ID selectors don't work in non-HTML documents)
3184                if ( !seed && context.nodeType === 9 && !isXML(context) ) {
3185                        try {
3186                                return makeArray( context.querySelectorAll(query), extra );
3187                        } catch(e){}
3188                }
3189               
3190                return oldSizzle(query, context, extra, seed);
3191        };
3192
3193        Sizzle.find = oldSizzle.find;
3194        Sizzle.filter = oldSizzle.filter;
3195        Sizzle.selectors = oldSizzle.selectors;
3196        Sizzle.matches = oldSizzle.matches;
3197})();
3198
3199if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) {
3200        Expr.order.splice(1, 0, "CLASS");
3201        Expr.find.CLASS = function(match, context) {
3202                return context.getElementsByClassName(match[1]);
3203        };
3204}
3205
3206function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
3207        for ( var i = 0, l = checkSet.length; i < l; i++ ) {
3208                var elem = checkSet[i];
3209                if ( elem ) {
3210                        elem = elem[dir];
3211                        var match = false;
3212
3213                        while ( elem && elem.nodeType ) {
3214                                var done = elem[doneName];
3215                                if ( done ) {
3216                                        match = checkSet[ done ];
3217                                        break;
3218                                }
3219
3220                                if ( elem.nodeType === 1 && !isXML )
3221                                        elem[doneName] = i;
3222
3223                                if ( elem.nodeName === cur ) {
3224                                        match = elem;
3225                                        break;
3226                                }
3227
3228                                elem = elem[dir];
3229                        }
3230
3231                        checkSet[i] = match;
3232                }
3233        }
3234}
3235
3236function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
3237        for ( var i = 0, l = checkSet.length; i < l; i++ ) {
3238                var elem = checkSet[i];
3239                if ( elem ) {
3240                        elem = elem[dir];
3241                        var match = false;
3242
3243                        while ( elem && elem.nodeType ) {
3244                                if ( elem[doneName] ) {
3245                                        match = checkSet[ elem[doneName] ];
3246                                        break;
3247                                }
3248
3249                                if ( elem.nodeType === 1 ) {
3250                                        if ( !isXML )
3251                                                elem[doneName] = i;
3252
3253                                        if ( typeof cur !== "string" ) {
3254                                                if ( elem === cur ) {
3255                                                        match = true;
3256                                                        break;
3257                                                }
3258
3259                                        } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
3260                                                match = elem;
3261                                                break;
3262                                        }
3263                                }
3264
3265                                elem = elem[dir];
3266                        }
3267
3268                        checkSet[i] = match;
3269                }
3270        }
3271}
3272
3273var contains = document.compareDocumentPosition ?  function(a, b){
3274        return a.compareDocumentPosition(b) & 16;
3275} : function(a, b){
3276        return a !== b && (a.contains ? a.contains(b) : true);
3277};
3278
3279var isXML = function(elem){
3280        return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
3281                !!elem.ownerDocument && isXML( elem.ownerDocument );
3282};
3283
3284var posProcess = function(selector, context){
3285        var tmpSet = [], later = "", match,
3286                root = context.nodeType ? [context] : context;
3287
3288        // Position selectors must be done after the filter
3289        // And so must :not(positional) so we move all PSEUDOs to the end
3290        while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
3291                later += match[0];
3292                selector = selector.replace( Expr.match.PSEUDO, "" );
3293        }
3294
3295        selector = Expr.relative[selector] ? selector + "*" : selector;
3296
3297        for ( var i = 0, l = root.length; i < l; i++ ) {
3298                Sizzle( selector, root[i], tmpSet );
3299        }
3300
3301        return Sizzle.filter( later, tmpSet );
3302};
3303
3304// EXPOSE
3305jQuery.find = Sizzle;
3306jQuery.filter = Sizzle.filter;
3307jQuery.expr = Sizzle.selectors;
3308jQuery.expr[":"] = jQuery.expr.filters;
3309
3310Sizzle.selectors.filters.hidden = function(elem){
3311        return "hidden" === elem.type ||
3312                jQuery.css(elem, "display") === "none" ||
3313                jQuery.css(elem, "visibility") === "hidden";
3314};
3315
3316Sizzle.selectors.filters.visible = function(elem){
3317        return "hidden" !== elem.type &&
3318                jQuery.css(elem, "display") !== "none" &&
3319                jQuery.css(elem, "visibility") !== "hidden";
3320};
3321
3322Sizzle.selectors.filters.animated = function(elem){
3323        return jQuery.grep(jQuery.timers, function(fn){
3324                return elem === fn.elem;
3325        }).length;
3326};
3327
3328jQuery.multiFilter = function( expr, elems, not ) {
3329        ///     <summary>
3330        ///             This member is internal only.
3331        ///     </summary>
3332        ///     <private />
3333
3334        if ( not ) {
3335                expr = ":not(" + expr + ")";
3336        }
3337
3338        return Sizzle.matches(expr, elems);
3339};
3340
3341jQuery.dir = function( elem, dir ){
3342        ///     <summary>
3343        ///             This member is internal only.
3344        ///     </summary>
3345        ///     <private />
3346        // This member is not documented in the jQuery API: http://docs.jquery.com/Special:Search?ns0=1&search=dir
3347        var matched = [], cur = elem[dir];
3348        while ( cur && cur != document ) {
3349                if ( cur.nodeType == 1 )
3350                        matched.push( cur );
3351                cur = cur[dir];
3352        }
3353        return matched;
3354};
3355
3356jQuery.nth = function(cur, result, dir, elem){
3357        ///     <summary>
3358        ///             This member is internal only.
3359        ///     </summary>
3360        ///     <private />
3361        // This member is not documented in the jQuery API: http://docs.jquery.com/Special:Search?ns0=1&search=nth
3362        result = result || 1;
3363        var num = 0;
3364
3365        for ( ; cur; cur = cur[dir] )
3366                if ( cur.nodeType == 1 && ++num == result )
3367                        break;
3368
3369        return cur;
3370};
3371
3372jQuery.sibling = function(n, elem){
3373        ///     <summary>
3374        ///             This member is internal only.
3375        ///     </summary>
3376        ///     <private />
3377        // This member is not documented in the jQuery API: http://docs.jquery.com/Special:Search?ns0=1&search=nth
3378        var r = [];
3379
3380        for ( ; n; n = n.nextSibling ) {
3381                if ( n.nodeType == 1 && n != elem )
3382                        r.push( n );
3383        }
3384
3385        return r;
3386};
3387
3388return;
3389
3390window.Sizzle = Sizzle;
3391
3392})();
3393/*
3394 * A number of helper functions used for managing events.
3395 * Many of the ideas behind this code originated from
3396 * Dean Edwards' addEvent library.
3397 */
3398jQuery.event = {
3399
3400        // Bind an event to an element
3401        // Original by Dean Edwards
3402        add: function(elem, types, handler, data) {
3403                ///     <summary>
3404                ///             This method is internal.
3405                ///     </summary>
3406                ///     <private />
3407                if ( elem.nodeType == 3 || elem.nodeType == 8 )
3408                        return;
3409
3410                // For whatever reason, IE has trouble passing the window object
3411                // around, causing it to be cloned in the process
3412                if ( elem.setInterval && elem != window )
3413                        elem = window;
3414
3415                // Make sure that the function being executed has a unique ID
3416                if ( !handler.guid )
3417                        handler.guid = this.guid++;
3418
3419                // if data is passed, bind to handler
3420                if ( data !== undefined ) {
3421                        // Create temporary function pointer to original handler
3422                        var fn = handler;
3423
3424                        // Create unique handler function, wrapped around original handler
3425                        handler = this.proxy( fn );
3426
3427                        // Store data in unique handler
3428                        handler.data = data;
3429                }
3430
3431                // Init the element's event structure
3432                var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
3433                        handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
3434                                // Handle the second event of a trigger and when
3435                                // an event is called after a page has unloaded
3436                                return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
3437                                        jQuery.event.handle.apply(arguments.callee.elem, arguments) :
3438                                        undefined;
3439                        });
3440                // Add elem as a property of the handle function
3441                // This is to prevent a memory leak with non-native
3442                // event in IE.
3443                handle.elem = elem;
3444
3445                // Handle multiple events separated by a space
3446                // jQuery(...).bind("mouseover mouseout", fn);
3447                jQuery.each(types.split(/\s+/), function(index, type) {
3448                        // Namespaced event handlers
3449                        var namespaces = type.split(".");
3450                        type = namespaces.shift();
3451                        handler.type = namespaces.slice().sort().join(".");
3452
3453                        // Get the current list of functions bound to this event
3454                        var handlers = events[type];
3455                       
3456                        if ( jQuery.event.specialAll[type] )
3457                                jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
3458
3459                        // Init the event handler queue
3460                        if (!handlers) {
3461                                handlers = events[type] = {};
3462
3463                                // Check for a special event handler
3464                                // Only use addEventListener/attachEvent if the special
3465                                // events handler returns false
3466                                if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
3467                                        // Bind the global event handler to the element
3468                                        if (elem.addEventListener)
3469                                                elem.addEventListener(type, handle, false);
3470                                        else if (elem.attachEvent)
3471                                                elem.attachEvent("on" + type, handle);
3472                                }
3473                        }
3474
3475                        // Add the function to the element's handler list
3476                        handlers[handler.guid] = handler;
3477
3478                        // Keep track of which events have been used, for global triggering
3479                        jQuery.event.global[type] = true;
3480                });
3481
3482                // Nullify elem to prevent memory leaks in IE
3483                elem = null;
3484        },
3485
3486        guid: 1,
3487        global: {},
3488
3489        // Detach an event or set of events from an element
3490        remove: function(elem, types, handler) {
3491                ///     <summary>
3492                ///             This method is internal.
3493                ///     </summary>
3494                ///     <private />
3495               
3496                // don't do events on text and comment nodes
3497                if ( elem.nodeType == 3 || elem.nodeType == 8 )
3498                        return;
3499
3500                var events = jQuery.data(elem, "events"), ret, index;
3501
3502                if ( events ) {
3503                        // Unbind all events for the element
3504                        if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") )
3505                                for ( var type in events )
3506                                        this.remove( elem, type + (types || "") );
3507                        else {
3508                                // types is actually an event object here
3509                                if ( types.type ) {
3510                                        handler = types.handler;
3511                                        types = types.type;
3512                                }
3513
3514                                // Handle multiple events seperated by a space
3515                                // jQuery(...).unbind("mouseover mouseout", fn);
3516                                jQuery.each(types.split(/\s+/), function(index, type){
3517                                        // Namespaced event handlers
3518                                        var namespaces = type.split(".");
3519                                        type = namespaces.shift();
3520                                        var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
3521
3522                                        if ( events[type] ) {
3523                                                // remove the given handler for the given type
3524                                                if ( handler )
3525                                                        delete events[type][handler.guid];
3526
3527                                                // remove all handlers for the given type
3528                                                else
3529                                                        for ( var handle in events[type] )
3530                                                                // Handle the removal of namespaced events
3531                                                                if ( namespace.test(events[type][handle].type) )
3532                                                                        delete events[type][handle];
3533                                                                       
3534                                                if ( jQuery.event.specialAll[type] )
3535                                                        jQuery.event.specialAll[type].teardown.call(elem, namespaces);
3536
3537                                                // remove generic event handler if no more handlers exist
3538                                                for ( ret in events[type] ) break;
3539                                                if ( !ret ) {
3540                                                        if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
3541                                                                if (elem.removeEventListener)
3542                                                                        elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
3543                                                                else if (elem.detachEvent)
3544                                                                        elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
3545                                                        }
3546                                                        ret = null;
3547                                                        delete events[type];
3548                                                }
3549                                        }
3550                                });
3551                        }
3552
3553                        // Remove the expando if it's no longer used
3554                        for ( ret in events ) break;
3555                        if ( !ret ) {
3556                                var handle = jQuery.data( elem, "handle" );
3557                                if ( handle ) handle.elem = null;
3558                                jQuery.removeData( elem, "events" );
3559                                jQuery.removeData( elem, "handle" );
3560                        }
3561                }
3562        },
3563
3564        // bubbling is internal
3565        trigger: function( event, data, elem, bubbling ) {
3566                ///     <summary>
3567                ///             This method is internal.
3568                ///     </summary>
3569                ///     <private />
3570               
3571                // Event object or event type
3572                var type = event.type || event;
3573
3574                if( !bubbling ){
3575                        event = typeof event === "object" ?
3576                                // jQuery.Event object
3577                                event[expando] ? event :
3578                                // Object literal
3579                                jQuery.extend( jQuery.Event(type), event ) :
3580                                // Just the event type (string)
3581                                jQuery.Event(type);
3582
3583                        if ( type.indexOf("!") >= 0 ) {
3584                                event.type = type = type.slice(0, -1);
3585                                event.exclusive = true;
3586                        }
3587
3588                        // Handle a global trigger
3589                        if ( !elem ) {
3590                                // Don't bubble custom events when global (to avoid too much overhead)
3591                                event.stopPropagation();
3592                                // Only trigger if we've ever bound an event for it
3593                                if ( this.global[type] )
3594                                        jQuery.each( jQuery.cache, function(){
3595                                                if ( this.events && this.events[type] )
3596                                                        jQuery.event.trigger( event, data, this.handle.elem );
3597                                        });
3598                        }
3599
3600                        // Handle triggering a single element
3601
3602                        // don't do events on text and comment nodes
3603                        if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
3604                                return undefined;
3605                       
3606                        // Clean up in case it is reused
3607                        event.result = undefined;
3608                        event.target = elem;
3609                       
3610                        // Clone the incoming data, if any
3611                        data = jQuery.makeArray(data);
3612                        data.unshift( event );
3613                }
3614
3615                event.currentTarget = elem;
3616
3617                // Trigger the event, it is assumed that "handle" is a function
3618                var handle = jQuery.data(elem, "handle");
3619                if ( handle )
3620                        handle.apply( elem, data );
3621
3622                // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
3623                if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
3624                        event.result = false;
3625
3626                // Trigger the native events (except for clicks on links)
3627                if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
3628                        this.triggered = true;
3629                        try {
3630                                elem[ type ]();
3631                        // prevent IE from throwing an error for some hidden elements
3632                        } catch (e) {}
3633                }
3634
3635                this.triggered = false;
3636
3637                if ( !event.isPropagationStopped() ) {
3638                        var parent = elem.parentNode || elem.ownerDocument;
3639                        if ( parent )
3640                                jQuery.event.trigger(event, data, parent, true);
3641                }
3642        },
3643
3644        handle: function(event) {
3645                ///     <summary>
3646                ///             This method is internal.
3647                ///     </summary>
3648                ///     <private />
3649               
3650                // returned undefined or false
3651                var all, handlers;
3652
3653                event = arguments[0] = jQuery.event.fix( event || window.event );
3654
3655                // Namespaced event handlers
3656                var namespaces = event.type.split(".");
3657                event.type = namespaces.shift();
3658
3659                // Cache this now, all = true means, any handler
3660                all = !namespaces.length && !event.exclusive;
3661               
3662                var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
3663
3664                handlers = ( jQuery.data(this, "events") || {} )[event.type];
3665
3666                for ( var j in handlers ) {
3667                        var handler = handlers[j];
3668
3669                        // Filter the functions by class
3670                        if ( all || namespace.test(handler.type) ) {
3671                                // Pass in a reference to the handler function itself
3672                                // So that we can later remove it
3673                                event.handler = handler;
3674                                event.data = handler.data;
3675
3676                                var ret = handler.apply(this, arguments);
3677
3678                                if( ret !== undefined ){
3679                                        event.result = ret;
3680                                        if ( ret === false ) {
3681                                                event.preventDefault();
3682                                                event.stopPropagation();
3683                                        }
3684                                }
3685
3686                                if( event.isImmediatePropagationStopped() )
3687                                        break;
3688
3689                        }
3690                }
3691        },
3692
3693        props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
3694
3695        fix: function(event) {
3696                ///     <summary>
3697                ///             This method is internal.
3698                ///     </summary>
3699                ///     <private />
3700               
3701                if ( event[expando] )
3702                        return event;
3703
3704                // store a copy of the original event object
3705                // and "clone" to set read-only properties
3706                var originalEvent = event;
3707                event = jQuery.Event( originalEvent );
3708
3709                for ( var i = this.props.length, prop; i; ){
3710                        prop = this.props[ --i ];
3711                        event[ prop ] = originalEvent[ prop ];
3712                }
3713
3714                // Fix target property, if necessary
3715                if ( !event.target )
3716                        event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
3717
3718                // check if target is a textnode (safari)
3719                if ( event.target.nodeType == 3 )
3720                        event.target = event.target.parentNode;
3721
3722                // Add relatedTarget, if necessary
3723                if ( !event.relatedTarget && event.fromElement )
3724                        event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
3725
3726                // Calculate pageX/Y if missing and clientX/Y available
3727                if ( event.pageX == null && event.clientX != null ) {
3728                        var doc = document.documentElement, body = document.body;
3729                        event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
3730                        event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
3731                }
3732
3733                // Add which for key events
3734                if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
3735                        event.which = event.charCode || event.keyCode;
3736
3737                // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
3738                if ( !event.metaKey && event.ctrlKey )
3739                        event.metaKey = event.ctrlKey;
3740
3741                // Add which for click: 1 == left; 2 == middle; 3 == right
3742                // Note: button is not normalized, so don't use it
3743                if ( !event.which && event.button )
3744                        event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
3745
3746                return event;
3747        },
3748
3749        proxy: function( fn, proxy ){
3750                ///     <summary>
3751                ///             This method is internal.
3752                ///     </summary>
3753                ///     <private />
3754               
3755                proxy = proxy || function(){ return fn.apply(this, arguments); };
3756                // Set the guid of unique handler to the same of original handler, so it can be removed
3757                proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
3758                // So proxy can be declared as an argument
3759                return proxy;
3760        },
3761
3762        special: {
3763                ready: {
3764                        ///     <summary>
3765                        ///             This method is internal.
3766                        ///     </summary>
3767                        ///     <private />
3768                       
3769                        // Make sure the ready event is setup
3770                        setup: bindReady,
3771                        teardown: function() {}
3772                }
3773        },
3774       
3775        specialAll: {
3776                live: {
3777                        setup: function( selector, namespaces ){
3778                                jQuery.event.add( this, namespaces[0], liveHandler );
3779                        },
3780                        teardown:  function( namespaces ){
3781                                if ( namespaces.length ) {
3782                                        var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
3783                                       
3784                                        jQuery.each( (jQuery.data(this, "events").live || {}), function(){
3785                                                if ( name.test(this.type) )
3786                                                        remove++;
3787                                        });
3788                                       
3789                                        if ( remove < 1 )
3790                                                jQuery.event.remove( this, namespaces[0], liveHandler );
3791                                }
3792                        }
3793                }
3794        }
3795};
3796
3797jQuery.Event = function( src ){
3798        // Allow instantiation without the 'new' keyword
3799        if( !this.preventDefault )
3800                return new jQuery.Event(src);
3801       
3802        // Event object
3803        if( src && src.type ){
3804                this.originalEvent = src;
3805                this.type = src.type;
3806        // Event type
3807        }else
3808                this.type = src;
3809
3810        // timeStamp is buggy for some events on Firefox(#3843)
3811        // So we won't rely on the native value
3812        this.timeStamp = now();
3813       
3814        // Mark it as fixed
3815        this[expando] = true;
3816};
3817
3818function returnFalse(){
3819        return false;
3820}
3821function returnTrue(){
3822        return true;
3823}
3824
3825// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
3826// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
3827jQuery.Event.prototype = {
3828        preventDefault: function() {
3829                this.isDefaultPrevented = returnTrue;
3830
3831                var e = this.originalEvent;
3832                if( !e )
3833                        return;
3834                // if preventDefault exists run it on the original event
3835                if (e.preventDefault)
3836                        e.preventDefault();
3837                // otherwise set the returnValue property of the original event to false (IE)
3838                e.returnValue = false;
3839        },
3840        stopPropagation: function() {
3841                this.isPropagationStopped = returnTrue;
3842
3843                var e = this.originalEvent;
3844                if( !e )
3845                        return;
3846                // if stopPropagation exists run it on the original event
3847                if (e.stopPropagation)
3848                        e.stopPropagation();
3849                // otherwise set the cancelBubble property of the original event to true (IE)
3850                e.cancelBubble = true;
3851        },
3852        stopImmediatePropagation:function(){
3853                this.isImmediatePropagationStopped = returnTrue;
3854                this.stopPropagation();
3855        },
3856        isDefaultPrevented: returnFalse,
3857        isPropagationStopped: returnFalse,
3858        isImmediatePropagationStopped: returnFalse
3859};
3860// Checks if an event happened on an element within another element
3861// Used in jQuery.event.special.mouseenter and mouseleave handlers
3862var withinElement = function(event) {
3863        // Check if mouse(over|out) are still within the same parent element
3864        var parent = event.relatedTarget;
3865        // Traverse up the tree
3866        while ( parent && parent != this )
3867                try { parent = parent.parentNode; }
3868                catch(e) { parent = this; }
3869       
3870        if( parent != this ){
3871                // set the correct event type
3872                event.type = event.data;
3873                // handle event if we actually just moused on to a non sub-element
3874                jQuery.event.handle.apply( this, arguments );
3875        }
3876};
3877       
3878jQuery.each({
3879        mouseover: 'mouseenter',
3880        mouseout: 'mouseleave'
3881}, function( orig, fix ){
3882        jQuery.event.special[ fix ] = {
3883                setup: function(){
3884                        ///     <summary>
3885                        ///             This method is internal.
3886                        ///     </summary>
3887                        ///     <private />
3888                       
3889                        jQuery.event.add( this, orig, withinElement, fix );
3890                },
3891                teardown: function(){
3892                        ///     <summary>
3893                        ///             This method is internal.
3894                        ///     </summary>
3895                        ///     <private />
3896                       
3897                        jQuery.event.remove( this, orig, withinElement );
3898                }
3899        };                         
3900});
3901
3902jQuery.fn.extend({
3903        bind: function( type, data, fn ) {
3904                ///     <summary>
3905                ///             Binds a handler to one or more events for each matched element.  Can also bind custom events.
3906                ///     </summary>
3907                ///     <param name="type" type="String">One or more event types separated by a space.  Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param>
3908                ///     <param name="data" optional="true" type="Object">Additional data passed to the event handler as event.data</param>
3909                ///     <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements.  function callback(eventObject) such that this corresponds to the dom element.</param>
3910               
3911                return type == "unload" ? this.one(type, data, fn) : this.each(function(){
3912                        jQuery.event.add( this, type, fn || data, fn && data );
3913                });
3914        },
3915
3916        one: function( type, data, fn ) {
3917                ///     <summary>
3918                ///             Binds a handler to one or more events to be executed exactly once for each matched element.
3919                ///     </summary>
3920                ///     <param name="type" type="String">One or more event types separated by a space.  Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param>
3921                ///     <param name="data" optional="true" type="Object">Additional data passed to the event handler as event.data</param>
3922                ///     <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements.  function callback(eventObject) such that this corresponds to the dom element.</param>
3923               
3924                var one = jQuery.event.proxy( fn || data, function(event) {
3925                        jQuery(this).unbind(event, one);
3926                        return (fn || data).apply( this, arguments );
3927                });
3928                return this.each(function(){
3929                        jQuery.event.add( this, type, one, fn && data);
3930                });
3931        },
3932
3933        unbind: function( type, fn ) {
3934                ///     <summary>
3935                ///             Unbinds a handler from one or more events for each matched element.
3936                ///     </summary>
3937                ///     <param name="type" type="String">One or more event types separated by a space.  Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param>
3938                ///     <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements.  function callback(eventObject) such that this corresponds to the dom element.</param>
3939               
3940                return this.each(function(){
3941                        jQuery.event.remove( this, type, fn );
3942                });
3943        },
3944
3945        trigger: function( type, data ) {
3946                ///     <summary>
3947                ///             Triggers a type of event on every matched element.
3948                ///     </summary>
3949                ///     <param name="type" type="String">One or more event types separated by a space.  Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param>
3950                ///     <param name="data" optional="true" type="Array">Additional data passed to the event handler as additional arguments.</param>
3951                ///     <param name="fn" type="Function">This parameter is undocumented.</param>
3952               
3953                return this.each(function(){
3954                        jQuery.event.trigger( type, data, this );
3955                });
3956        },
3957
3958        triggerHandler: function( type, data ) {
3959                ///     <summary>
3960                ///             Triggers all bound event handlers on an element for a specific event type without executing the browser's default actions.
3961                ///     </summary>
3962                ///     <param name="type" type="String">One or more event types separated by a space.  Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error .</param>
3963                ///     <param name="data" optional="true" type="Array">Additional data passed to the event handler as additional arguments.</param>
3964                ///     <param name="fn" type="Function">This parameter is undocumented.</param>
3965       
3966                if( this[0] ){
3967                        var event = jQuery.Event(type);
3968                        event.preventDefault();
3969                        event.stopPropagation();
3970                        jQuery.event.trigger( event, data, this[0] );
3971                        return event.result;
3972                }               
3973        },
3974
3975        toggle: function( fn ) {
3976                ///     <summary>
3977                ///             Toggles among two or more function calls every other click.
3978                ///     </summary>
3979                ///     <param name="fn" type="Function">The functions among which to toggle execution</param>
3980               
3981                // Save reference to arguments for access in closure
3982                var args = arguments, i = 1;
3983
3984                // link all the functions, so any of them can unbind this click handler
3985                while( i < args.length )
3986                        jQuery.event.proxy( fn, args[i++] );
3987
3988                return this.click( jQuery.event.proxy( fn, function(event) {
3989                        // Figure out which function to execute
3990                        this.lastToggle = ( this.lastToggle || 0 ) % i;
3991
3992                        // Make sure that clicks stop
3993                        event.preventDefault();
3994
3995                        // and execute the function
3996                        return args[ this.lastToggle++ ].apply( this, arguments ) || false;
3997                }));
3998        },
3999
4000        hover: function(fnOver, fnOut) {
4001                ///     <summary>
4002                ///             Simulates hovering (moving the mouse on or off of an object).
4003                ///     </summary>
4004                ///     <param name="fnOver" type="Function">The function to fire when the mouse is moved over a matched element.</param>
4005                ///     <param name="fnOut" type="Function">The function to fire when the mouse is moved off of a matched element.</param>
4006               
4007                return this.mouseenter(fnOver).mouseleave(fnOut);
4008        },
4009
4010        ready: function(fn) {
4011                ///     <summary>
4012                ///             Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.
4013                ///     </summary>
4014                ///     <param name="fn" type="Function">The function to be executed when the DOM is ready.</param>
4015
4016                // Attach the listeners
4017                bindReady();
4018
4019                // If the DOM is already ready
4020                if ( jQuery.isReady )
4021                        // Execute the function immediately
4022                        fn.call( document, jQuery );
4023
4024                // Otherwise, remember the function for later
4025                else
4026                        // Add the function to the wait list
4027                        jQuery.readyList.push( fn );
4028
4029                return this;
4030        },
4031       
4032        live: function( type, fn ){
4033                ///     <summary>
4034                ///             Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events.
4035                ///     </summary>
4036                ///     <param name="type" type="String">An event type</param>
4037                ///     <param name="fn" type="Function">A function to bind to the event on each of the set of matched elements</param>
4038
4039                var proxy = jQuery.event.proxy( fn );
4040                proxy.guid += this.selector + type;
4041
4042                jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );
4043
4044                return this;
4045        },
4046       
4047        die: function( type, fn ){
4048                ///     <summary>
4049                ///             This does the opposite of live, it removes a bound live event.
4050                ///             You can also unbind custom events registered with live.
4051                ///             If the type is provided, all bound live events of that type are removed.
4052                ///             If the function that was passed to live is provided as the second argument, only that specific event handler is removed.
4053                ///     </summary>
4054                ///     <param name="type" type="String">A live event type to unbind.</param>
4055                ///     <param name="fn" type="Function">A function to unbind from the event on each of the set of matched elements.</param>
4056
4057                jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
4058                return this;
4059        }
4060});
4061
4062function liveHandler( event ){
4063        var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
4064                stop = true,
4065                elems = [];
4066
4067        jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
4068                if ( check.test(fn.type) ) {
4069                        var elem = jQuery(event.target).closest(fn.data)[0];
4070                        if ( elem )
4071                                elems.push({ elem: elem, fn: fn });
4072                }
4073        });
4074
4075        jQuery.each(elems, function(){
4076                if ( this.fn.call(this.elem, event, this.fn.data) === false )
4077                        stop = false;
4078        });
4079
4080        return stop;
4081}
4082
4083function liveConvert(type, selector){
4084        return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
4085}
4086
4087jQuery.extend({
4088        isReady: false,
4089        readyList: [],
4090        // Handle when the DOM is ready
4091        ready: function() {
4092                ///     <summary>
4093                ///             This method is internal.
4094                ///     </summary>
4095                ///     <private />
4096               
4097                // Make sure that the DOM is not already loaded
4098                if ( !jQuery.isReady ) {
4099                        // Remember that the DOM is ready
4100                        jQuery.isReady = true;
4101
4102                        // If there are functions bound, to execute
4103                        if ( jQuery.readyList ) {
4104                                // Execute all of them
4105                                jQuery.each( jQuery.readyList, function(){
4106                                        this.call( document, jQuery );
4107                                });
4108
4109                                // Reset the list of functions
4110                                jQuery.readyList = null;
4111                        }
4112
4113                        // Trigger any bound ready events
4114                        jQuery(document).triggerHandler("ready");
4115                }
4116        }
4117});
4118
4119var readyBound = false;
4120
4121function bindReady(){
4122        if ( readyBound ) return;
4123        readyBound = true;
4124
4125        // Mozilla, Opera and webkit nightlies currently support this event
4126        if ( document.addEventListener ) {
4127                // Use the handy event callback
4128                document.addEventListener( "DOMContentLoaded", function(){
4129                        document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
4130                        jQuery.ready();
4131                }, false );
4132
4133        // If IE event model is used
4134        } else if ( document.attachEvent ) {
4135                // ensure firing before onload,
4136                // maybe late but safe also for iframes
4137                document.attachEvent("onreadystatechange", function(){
4138                        if ( document.readyState === "complete" ) {
4139                                document.detachEvent( "onreadystatechange", arguments.callee );
4140                                jQuery.ready();
4141                        }
4142                });
4143
4144                // If IE and not an iframe
4145                // continually check to see if the document is ready
4146                if ( document.documentElement.doScroll && typeof window.frameElement === "undefined" ) (function(){
4147                        if ( jQuery.isReady ) return;
4148
4149                        try {
4150                                // If IE is used, use the trick by Diego Perini
4151                                // http://javascript.nwbox.com/IEContentLoaded/
4152                                document.documentElement.doScroll("left");
4153                        } catch( error ) {
4154                                setTimeout( arguments.callee, 0 );
4155                                return;
4156                        }
4157
4158                        // and execute any waiting functions
4159                        jQuery.ready();
4160                })();
4161        }
4162
4163        // A fallback to window.onload, that will always work
4164        jQuery.event.add( window, "load", jQuery.ready );
4165}
4166
4167// [vsdoc] The following section has been denormalized from original sources for IntelliSense.
4168
4169jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
4170        "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
4171        "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){
4172
4173        // Handle event binding
4174        jQuery.fn[name] = function(fn){
4175                return fn ? this.bind(name, fn) : this.trigger(name);
4176        };
4177});
4178
4179jQuery.fn["blur"] = function(fn) {
4180        ///     <summary>
4181        ///             1: blur() - Triggers the blur event of each matched element.
4182        ///             2: blur(fn) - Binds a function to the blur event of each matched element.
4183        ///     </summary>
4184        ///     <param name="fn" type="Function">The function to execute.</param>
4185        ///     <returns type="jQuery" />
4186        return fn ? this.bind("blur", fn) : this.trigger(name);
4187};
4188
4189jQuery.fn["focus"] = function(fn) {
4190        ///     <summary>
4191        ///             1: focus() - Triggers the focus event of each matched element.
4192        ///             2: focus(fn) - Binds a function to the focus event of each matched element.
4193        ///     </summary>
4194        ///     <param name="fn" type="Function">The function to execute.</param>
4195        ///     <returns type="jQuery" />
4196        return fn ? this.bind("focus", fn) : this.trigger(name);
4197};
4198
4199jQuery.fn["load"] = function(fn) {
4200        ///     <summary>
4201        ///             1: load() - Triggers the load event of each matched element.
4202        ///             2: load(fn) - Binds a function to the load event of each matched element.
4203        ///     </summary>
4204        ///     <param name="fn" type="Function">The function to execute.</param>
4205        ///     <returns type="jQuery" />
4206        return fn ? this.bind("load", fn) : this.trigger(name);
4207};
4208
4209jQuery.fn["resize"] = function(fn) {
4210        ///     <summary>
4211        ///             1: resize() - Triggers the resize event of each matched element.
4212        ///             2: resize(fn) - Binds a function to the resize event of each matched element.
4213        ///     </summary>
4214        ///     <param name="fn" type="Function">The function to execute.</param>
4215        ///     <returns type="jQuery" />
4216        return fn ? this.bind("resize", fn) : this.trigger(name);
4217};
4218
4219jQuery.fn["scroll"] = function(fn) {
4220        ///     <summary>
4221        ///             1: scroll() - Triggers the scroll event of each matched element.
4222        ///             2: scroll(fn) - Binds a function to the scroll event of each matched element.
4223        ///     </summary>
4224        ///     <param name="fn" type="Function">The function to execute.</param>
4225        ///     <returns type="jQuery" />
4226        return fn ? this.bind("scroll", fn) : this.trigger(name);
4227};
4228
4229jQuery.fn["unload"] = function(fn) {
4230        ///     <summary>
4231        ///             1: unload() - Triggers the unload event of each matched element.
4232        ///             2: unload(fn) - Binds a function to the unload event of each matched element.
4233        ///     </summary>
4234        ///     <param name="fn" type="Function">The function to execute.</param>
4235        ///     <returns type="jQuery" />
4236        return fn ? this.bind("unload", fn) : this.trigger(name);
4237};
4238
4239jQuery.fn["click"] = function(fn) {
4240        ///     <summary>
4241        ///             1: click() - Triggers the click event of each matched element.
4242        ///             2: click(fn) - Binds a function to the click event of each matched element.
4243        ///     </summary>
4244        ///     <param name="fn" type="Function">The function to execute.</param>
4245        ///     <returns type="jQuery" />
4246        return fn ? this.bind("click", fn) : this.trigger(name);
4247};
4248
4249jQuery.fn["dblclick"] = function(fn) {
4250        ///     <summary>
4251        ///             1: dblclick() - Triggers the dblclick event of each matched element.
4252        ///             2: dblclick(fn) - Binds a function to the dblclick event of each matched element.
4253        ///     </summary>
4254        ///     <param name="fn" type="Function">The function to execute.</param>
4255        ///     <returns type="jQuery" />
4256        return fn ? this.bind("dblclick", fn) : this.trigger(name);
4257};
4258
4259jQuery.fn["mousedown"] = function(fn) {
4260        ///     <summary>
4261        ///             Binds a function to the mousedown event of each matched element.
4262        ///     </summary>
4263        ///     <param name="fn" type="Function">The function to execute.</param>
4264        ///     <returns type="jQuery" />
4265        return fn ? this.bind("mousedown", fn) : this.trigger(name);
4266};
4267
4268jQuery.fn["mouseup"] = function(fn) {
4269        ///     <summary>
4270        ///             Bind a function to the mouseup event of each matched element.
4271        ///     </summary>
4272        ///     <param name="fn" type="Function">The function to execute.</param>
4273        ///     <returns type="jQuery" />
4274        return fn ? this.bind("mouseup", fn) : this.trigger(name);
4275};
4276
4277jQuery.fn["mousemove"] = function(fn) {
4278        ///     <summary>
4279        ///             Bind a function to the mousemove event of each matched element.
4280        ///     </summary>
4281        ///     <param name="fn" type="Function">The function to execute.</param>
4282        ///     <returns type="jQuery" />
4283        return fn ? this.bind("mousemove", fn) : this.trigger(name);
4284};
4285
4286jQuery.fn["mouseover"] = function(fn) {
4287        ///     <summary>
4288        ///             Bind a function to the mouseover event of each matched element.
4289        ///     </summary>
4290        ///     <param name="fn" type="Function">The function to execute.</param>
4291        ///     <returns type="jQuery" />
4292        return fn ? this.bind("mouseover", fn) : this.trigger(name);
4293};
4294
4295jQuery.fn["mouseout"] = function(fn) {
4296        ///     <summary>
4297        ///             Bind a function to the mouseout event of each matched element.
4298        ///     </summary>
4299        ///     <param name="fn" type="Function">The function to execute.</param>
4300        ///     <returns type="jQuery" />
4301        return fn ? this.bind("mouseout", fn) : this.trigger(name);
4302};
4303
4304jQuery.fn["mouseenter"] = function(fn) {
4305        ///     <summary>
4306        ///             Bind a function to the mouseenter event of each matched element.
4307        ///     </summary>
4308        ///     <param name="fn" type="Function">The function to execute.</param>
4309        ///     <returns type="jQuery" />
4310        return fn ? this.bind("mouseenter", fn) : this.trigger(name);
4311};
4312
4313jQuery.fn["mouseleave"] = function(fn) {
4314        ///     <summary>
4315        ///             Bind a function to the mouseleave event of each matched element.
4316        ///     </summary>
4317        ///     <param name="fn" type="Function">The function to execute.</param>
4318        ///     <returns type="jQuery" />
4319        return fn ? this.bind("mouseleave", fn) : this.trigger(name);
4320};
4321
4322jQuery.fn["change"] = function(fn) {
4323        ///     <summary>
4324        ///             1: change() - Triggers the change event of each matched element.
4325        ///             2: change(fn) - Binds a function to the change event of each matched element.
4326        ///     </summary>
4327        ///     <param name="fn" type="Function">The function to execute.</param>
4328        ///     <returns type="jQuery" />
4329        return fn ? this.bind("change", fn) : this.trigger(name);
4330};
4331
4332jQuery.fn["select"] = function(fn) {
4333        ///     <summary>
4334        ///             1: select() - Triggers the select event of each matched element.
4335        ///             2: select(fn) - Binds a function to the select event of each matched element.
4336        ///     </summary>
4337        ///     <param name="fn" type="Function">The function to execute.</param>
4338        ///     <returns type="jQuery" />
4339        return fn ? this.bind("select", fn) : this.trigger(name);
4340};
4341
4342jQuery.fn["submit"] = function(fn) {
4343        ///     <summary>
4344        ///             1: submit() - Triggers the submit event of each matched element.
4345        ///             2: submit(fn) - Binds a function to the submit event of each matched element.
4346        ///     </summary>
4347        ///     <param name="fn" type="Function">The function to execute.</param>
4348        ///     <returns type="jQuery" />
4349        return fn ? this.bind("submit", fn) : this.trigger(name);
4350};
4351
4352jQuery.fn["keydown"] = function(fn) {
4353        ///     <summary>
4354        ///             1: keydown() - Triggers the keydown event of each matched element.
4355        ///             2: keydown(fn) - Binds a function to the keydown event of each matched element.
4356        ///     </summary>
4357        ///     <param name="fn" type="Function">The function to execute.</param>
4358        ///     <returns type="jQuery" />
4359        return fn ? this.bind("keydown", fn) : this.trigger(name);
4360};
4361
4362jQuery.fn["keypress"] = function(fn) {
4363        ///     <summary>
4364        ///             1: keypress() - Triggers the keypress event of each matched element.
4365        ///             2: keypress(fn) - Binds a function to the keypress event of each matched element.
4366        ///     </summary>
4367        ///     <param name="fn" type="Function">The function to execute.</param>
4368        ///     <returns type="jQuery" />
4369        return fn ? this.bind("keypress", fn) : this.trigger(name);
4370};
4371
4372jQuery.fn["keyup"] = function(fn) {
4373        ///     <summary>
4374        ///             1: keyup() - Triggers the keyup event of each matched element.
4375        ///             2: keyup(fn) - Binds a function to the keyup event of each matched element.
4376        ///     </summary>
4377        ///     <param name="fn" type="Function">The function to execute.</param>
4378        ///     <returns type="jQuery" />
4379        return fn ? this.bind("keyup", fn) : this.trigger(name);
4380};
4381
4382jQuery.fn["error"] = function(fn) {
4383        ///     <summary>
4384        ///             1: error() - Triggers the error event of each matched element.
4385        ///             2: error(fn) - Binds a function to the error event of each matched element.
4386        ///     </summary>
4387        ///     <param name="fn" type="Function">The function to execute.</param>
4388        ///     <returns type="jQuery" />
4389        return fn ? this.bind("error", fn) : this.trigger(name);
4390};
4391
4392// Prevent memory leaks in IE
4393// And prevent errors on refresh with events like mouseover in other browsers
4394// Window isn't included so as not to unbind existing unload events
4395jQuery( window ).bind( 'unload', function(){
4396        for ( var id in jQuery.cache )
4397                // Skip the window
4398                if ( id != 1 && jQuery.cache[ id ].handle )
4399                        jQuery.event.remove( jQuery.cache[ id ].handle.elem );
4400});
4401
4402// [vsdoc] The following function has been commented out for IntelliSense.
4403//(function(){
4404
4405//      jQuery.support = {};
4406
4407//      var root = document.documentElement,
4408//              script = document.createElement("script"),
4409//              div = document.createElement("div"),
4410//              id = "script" + (new Date).getTime();
4411
4412//      div.style.display = "none";
4413//     
4414//      div.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
4415
4416//      var all = div.getElementsByTagName("*"),
4417//              a = div.getElementsByTagName("a")[0];
4418
4419//      // Can't get basic test support
4420//      if ( !all || !all.length || !a ) {
4421//              return;
4422//      }
4423
4424//      jQuery.support = {
4425//              // IE strips leading whitespace when .innerHTML is used
4426//              leadingWhitespace: div.firstChild.nodeType == 3,
4427//             
4428//              // Make sure that tbody elements aren't automatically inserted
4429//              // IE will insert them into empty tables
4430//              tbody: !div.getElementsByTagName("tbody").length,
4431//             
4432//              // Make sure that you can get all elements in an <object> element
4433//              // IE 7 always returns no results
4434//              objectAll: !!div.getElementsByTagName("object")[0]
4435//                      .getElementsByTagName("*").length,
4436//             
4437//              // Make sure that link elements get serialized correctly by innerHTML
4438//              // This requires a wrapper element in IE
4439//              htmlSerialize: !!div.getElementsByTagName("link").length,
4440//             
4441//              // Get the style information from getAttribute
4442//              // (IE uses .cssText insted)
4443//              style: /red/.test( a.getAttribute("style") ),
4444//             
4445//              // Make sure that URLs aren't manipulated
4446//              // (IE normalizes it by default)
4447//              hrefNormalized: a.getAttribute("href") === "/a",
4448//             
4449//              // Make sure that element opacity exists
4450//              // (IE uses filter instead)
4451//              opacity: a.style.opacity === "0.5",
4452//             
4453//              // Verify style float existence
4454//              // (IE uses styleFloat instead of cssFloat)
4455//              cssFloat: !!a.style.cssFloat,
4456
4457//              // Will be defined later
4458//              scriptEval: false,
4459//              noCloneEvent: true,
4460//              boxModel: null
4461//      };
4462//     
4463//      script.type = "text/javascript";
4464//      try {
4465//              script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
4466//      } catch(e){}
4467
4468//      root.insertBefore( script, root.firstChild );
4469//     
4470//      // Make sure that the execution of code works by injecting a script
4471//      // tag with appendChild/createTextNode
4472//      // (IE doesn't support this, fails, and uses .text instead)
4473//      if ( window[ id ] ) {
4474//              jQuery.support.scriptEval = true;
4475//              delete window[ id ];
4476//      }
4477
4478//      root.removeChild( script );
4479
4480//      if ( div.attachEvent && div.fireEvent ) {
4481//              div.attachEvent("onclick", function(){
4482//                      // Cloning a node shouldn't copy over any
4483//                      // bound event handlers (IE does this)
4484//                      jQuery.support.noCloneEvent = false;
4485//                      div.detachEvent("onclick", arguments.callee);
4486//              });
4487//              div.cloneNode(true).fireEvent("onclick");
4488//      }
4489
4490//      // Figure out if the W3C box model works as expected
4491//      // document.body must exist before we can do this
4492//      jQuery(function(){
4493//              var div = document.createElement("div");
4494//              div.style.width = "1px";
4495//              div.style.paddingLeft = "1px";
4496
4497//              document.body.appendChild( div );
4498//              jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
4499//              document.body.removeChild( div );
4500//      });
4501//})();
4502
4503// [vsdoc] The following function has been modified for IntelliSense.
4504// var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";
4505var styleFloat = "cssFloat";
4506
4507
4508jQuery.props = {
4509        "for": "htmlFor",
4510        "class": "className",
4511        "float": styleFloat,
4512        cssFloat: styleFloat,
4513        styleFloat: styleFloat,
4514        readonly: "readOnly",
4515        maxlength: "maxLength",
4516        cellspacing: "cellSpacing",
4517        rowspan: "rowSpan",
4518        tabindex: "tabIndex"
4519};
4520jQuery.fn.extend({
4521        // Keep a copy of the old load
4522        _load: jQuery.fn.load,
4523
4524        load: function( url, params, callback ) {
4525                ///     <summary>
4526                ///             Loads HTML from a remote file and injects it into the DOM.  By default performs a GET request, but if parameters are included
4527                ///             then a POST will be performed.
4528                ///     </summary>
4529                ///     <param name="url" type="String">The URL of the HTML page to load.</param>
4530                ///     <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param>
4531                ///     <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete.  It should map function(responseText, textStatus, XMLHttpRequest) such that this maps the injected DOM element.</param>
4532                ///     <returns type="jQuery" />
4533               
4534                if ( typeof url !== "string" )
4535                        return this._load( url );
4536
4537                var off = url.indexOf(" ");
4538                if ( off >= 0 ) {
4539                        var selector = url.slice(off, url.length);
4540                        url = url.slice(0, off);
4541                }
4542
4543                // Default to a GET request
4544                var type = "GET";
4545
4546                // If the second parameter was provided
4547                if ( params )
4548                        // If it's a function
4549                        if ( jQuery.isFunction( params ) ) {
4550                                // We assume that it's the callback
4551                                callback = params;
4552                                params = null;
4553
4554                        // Otherwise, build a param string
4555                        } else if( typeof params === "object" ) {
4556                                params = jQuery.param( params );
4557                                type = "POST";
4558                        }
4559
4560                var self = this;
4561
4562                // Request the remote document
4563                jQuery.ajax({
4564                        url: url,
4565                        type: type,
4566                        dataType: "html",
4567                        data: params,
4568                        complete: function(res, status){
4569                                // If successful, inject the HTML into all the matched elements
4570                                if ( status == "success" || status == "notmodified" )
4571                                        // See if a selector was specified
4572                                        self.html( selector ?
4573                                                // Create a dummy div to hold the results
4574                                                jQuery("<div/>")
4575                                                        // inject the contents of the document in, removing the scripts
4576                                                        // to avoid any 'Permission Denied' errors in IE
4577                                                        .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
4578
4579                                                        // Locate the specified elements
4580                                                        .find(selector) :
4581
4582                                                // If not, just inject the full result
4583                                                res.responseText );
4584
4585                                if( callback )
4586                                        self.each( callback, [res.responseText, status, res] );
4587                        }
4588                });
4589                return this;
4590        },
4591
4592        serialize: function() {
4593                ///     <summary>
4594                ///             Serializes a set of input elements into a string of data.
4595                ///     </summary>
4596                ///     <returns type="String">The serialized result</returns>
4597       
4598                return jQuery.param(this.serializeArray());
4599        },
4600        serializeArray: function() {
4601                ///     <summary>
4602                ///             Serializes all forms and form elements but returns a JSON data structure.
4603                ///     </summary>
4604                ///     <returns type="String">A JSON data structure representing the serialized items.</returns>
4605       
4606                return this.map(function(){
4607                        return this.elements ? jQuery.makeArray(this.elements) : this;
4608                })
4609                .filter(function(){
4610                        return this.name && !this.disabled &&
4611                                (this.checked || /select|textarea/i.test(this.nodeName) ||
4612                                        /text|hidden|password/i.test(this.type));
4613                })
4614                .map(function(i, elem){
4615                        var val = jQuery(this).val();
4616                        return val == null ? null :
4617                                jQuery.isArray(val) ?
4618                                        jQuery.map( val, function(val, i){
4619                                                return {name: elem.name, value: val};
4620                                        }) :
4621                                        {name: elem.name, value: val};
4622                }).get();
4623        }
4624});
4625
4626// [vsdoc] The following section has been denormalized from original sources for IntelliSense.
4627// Attach a bunch of functions for handling common AJAX events
4628// jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
4629//      jQuery.fn[o] = function(f){
4630//              return this.bind(o, f);
4631//      };
4632// });
4633
4634jQuery.fn["ajaxStart"] = function(callback) {
4635        ///     <summary>
4636        ///             Attach a function to be executed whenever an AJAX request begins and there is none already active. This is an Ajax Event.
4637        ///     </summary>
4638        ///     <param name="callback" type="Function">The function to execute.</param>
4639        ///     <returns type="jQuery" />
4640        return this.bind("ajaxStart", f);
4641};
4642
4643jQuery.fn["ajaxStop"] = function(callback) {
4644        ///     <summary>
4645        ///             Attach a function to be executed whenever all AJAX requests have ended. This is an Ajax Event.
4646        ///     </summary>
4647        ///     <param name="callback" type="Function">The function to execute.</param>
4648        ///     <returns type="jQuery" />
4649        return this.bind("ajaxStop", f);
4650};
4651
4652jQuery.fn["ajaxComplete"] = function(callback) {
4653        ///     <summary>
4654        ///             Attach a function to be executed whenever an AJAX request completes. This is an Ajax Event.
4655        ///     </summary>
4656        ///     <param name="callback" type="Function">The function to execute.</param>
4657        ///     <returns type="jQuery" />
4658        return this.bind("ajaxComplete", f);
4659};
4660
4661jQuery.fn["ajaxError"] = function(callback) {
4662        ///     <summary>
4663        ///             Attach a function to be executed whenever an AJAX request fails. This is an Ajax Event.
4664        ///     </summary>
4665        ///     <param name="callback" type="Function">The function to execute.</param>
4666        ///     <returns type="jQuery" />
4667        return this.bind("ajaxError", f);
4668};
4669
4670jQuery.fn["ajaxSuccess"] = function(callback) {
4671        ///     <summary>
4672        ///             Attach a function to be executed whenever an AJAX request completes successfully. This is an Ajax Event.
4673        ///     </summary>
4674        ///     <param name="callback" type="Function">The function to execute.</param>
4675        ///     <returns type="jQuery" />
4676        return this.bind("ajaxSuccess", f);
4677};
4678
4679jQuery.fn["ajaxSend"] = function(callback) {
4680        ///     <summary>
4681        ///             Attach a function to be executed before an AJAX request is sent. This is an Ajax Event.
4682        ///     </summary>
4683        ///     <param name="callback" type="Function">The function to execute.</param>
4684        ///     <returns type="jQuery" />
4685        return this.bind("ajaxSend", f);
4686};
4687
4688
4689var jsc = now();
4690
4691jQuery.extend({
4692 
4693        get: function( url, data, callback, type ) {
4694                ///     <summary>
4695                ///             Loads a remote page using an HTTP GET request.
4696                ///     </summary>
4697                ///     <param name="url" type="String">The URL of the HTML page to load.</param>
4698                ///     <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param>
4699                ///     <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete.  It should map function(responseText, textStatus) such that this maps the options for this AJAX request.</param>
4700                ///     <param name="type" optional="true" type="String">Type of data to be returned to callback function.  Valid valiues are xml, html, script, json, text, _default.</param>
4701                ///     <returns type="XMLHttpRequest" />
4702               
4703                // shift arguments if data argument was ommited
4704                if ( jQuery.isFunction( data ) ) {
4705                        callback = data;
4706                        data = null;
4707                }
4708
4709                return jQuery.ajax({
4710                        type: "GET",
4711                        url: url,
4712                        data: data,
4713                        success: callback,
4714                        dataType: type
4715                });
4716        },
4717
4718        getScript: function( url, callback ) {
4719                ///     <summary>
4720                ///             Loads and executes a local JavaScript file using an HTTP GET request.
4721                ///     </summary>
4722                ///     <param name="url" type="String">The URL of the script to load.</param>
4723                ///     <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete.  It should map function(data, textStatus) such that this maps the options for the AJAX request.</param>
4724                ///     <returns type="XMLHttpRequest" />
4725       
4726                return jQuery.get(url, null, callback, "script");
4727        },
4728
4729        getJSON: function( url, data, callback ) {
4730                ///     <summary>
4731                ///             Loads JSON data using an HTTP GET request.
4732                ///     </summary>
4733                ///     <param name="url" type="String">The URL of the JSON data to load.</param>
4734                ///     <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param>
4735                ///     <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete if the data is loaded successfully.  It should map function(data, textStatus) such that this maps the options for this AJAX request.</param>
4736                ///     <returns type="XMLHttpRequest" />
4737       
4738                return jQuery.get(url, data, callback, "json");
4739        },
4740
4741        post: function( url, data, callback, type ) {
4742                ///     <summary>
4743                ///             Loads a remote page using an HTTP POST request.
4744                ///     </summary>
4745                ///     <param name="url" type="String">The URL of the HTML page to load.</param>
4746                ///     <param name="data" optional="true" type="Map">Key/value pairs that will be sent to the server.</param>
4747                ///     <param name="callback" optional="true" type="Function">The function called when the AJAX request is complete.  It should map function(responseText, textStatus) such that this maps the options for this AJAX request.</param>
4748                ///     <param name="type" optional="true" type="String">Type of data to be returned to callback function.  Valid valiues are xml, html, script, json, text, _default.</param>
4749                ///     <returns type="XMLHttpRequest" />
4750               
4751                if ( jQuery.isFunction( data ) ) {
4752                        callback = data;
4753                        data = {};
4754                }
4755
4756                return jQuery.ajax({
4757                        type: "POST",
4758                        url: url,
4759                        data: data,
4760                        success: callback,
4761                        dataType: type
4762                });
4763        },
4764
4765        ajaxSetup: function( settings ) {
4766                ///     <summary>
4767                ///             Sets up global settings for AJAX requests.
4768                ///     </summary>
4769                ///     <param name="settings" type="Options">A set of key/value pairs that configure the default Ajax request.</param>
4770       
4771                jQuery.extend( jQuery.ajaxSettings, settings );
4772        },
4773
4774        ajaxSettings: {
4775                url: location.href,
4776                global: true,
4777                type: "GET",
4778                contentType: "application/x-www-form-urlencoded",
4779                processData: true,
4780                async: true,
4781                /*
4782                timeout: 0,
4783                data: null,
4784                username: null,
4785                password: null,
4786                */
4787                // Create the request object; Microsoft failed to properly
4788                // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
4789                // This function can be overriden by calling jQuery.ajaxSetup
4790                xhr:function(){
4791                        return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
4792                },
4793                accepts: {
4794                        xml: "application/xml, text/xml",
4795                        html: "text/html",
4796                        script: "text/javascript, application/javascript",
4797                        json: "application/json, text/javascript",
4798                        text: "text/plain",
4799                        _default: "*/*"
4800                }
4801        },
4802
4803        // Last-Modified header cache for next request
4804        lastModified: {},
4805
4806        ajax: function( s ) {
4807                ///     <summary>
4808                ///             Load a remote page using an HTTP request.
4809                ///     </summary>
4810                ///     <private />
4811               
4812                // Extend the settings, but re-extend 's' so that it can be
4813                // checked again later (in the test suite, specifically)
4814                s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
4815
4816                var jsonp, jsre = /=\?(&|$)/g, status, data,
4817                        type = s.type.toUpperCase();
4818
4819                // convert data if not already a string
4820                if ( s.data && s.processData && typeof s.data !== "string" )
4821                        s.data = jQuery.param(s.data);
4822
4823                // Handle JSONP Parameter Callbacks
4824                if ( s.dataType == "jsonp" ) {
4825                        if ( type == "GET" ) {
4826                                if ( !s.url.match(jsre) )
4827                                        s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
4828                        } else if ( !s.data || !s.data.match(jsre) )
4829                                s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
4830                        s.dataType = "json";
4831                }
4832
4833                // Build temporary JSONP function
4834                if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
4835                        jsonp = "jsonp" + jsc++;
4836
4837                        // Replace the =? sequence both in the query string and the data
4838                        if ( s.data )
4839                                s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
4840                        s.url = s.url.replace(jsre, "=" + jsonp + "$1");
4841
4842                        // We need to make sure
4843                        // that a JSONP style response is executed properly
4844                        s.dataType = "script";
4845
4846                        // Handle JSONP-style loading
4847                        window[ jsonp ] = function(tmp){
4848                                data = tmp;
4849                                success();
4850                                complete();
4851                                // Garbage collect
4852                                window[ jsonp ] = undefined;
4853                                try{ delete window[ jsonp ]; } catch(e){}
4854                                if ( head )
4855                                        head.removeChild( script );
4856                        };
4857                }
4858
4859                if ( s.dataType == "script" && s.cache == null )
4860                        s.cache = false;
4861
4862                if ( s.cache === false && type == "GET" ) {
4863                        var ts = now();
4864                        // try replacing _= if it is there
4865                        var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
4866                        // if nothing was replaced, add timestamp to the end
4867                        s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
4868                }
4869
4870                // If data is available, append data to url for get requests
4871                if ( s.data && type == "GET" ) {
4872                        s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
4873
4874                        // IE likes to send both get and post data, prevent this
4875                        s.data = null;
4876                }
4877
4878                // Watch for a new set of requests
4879                if ( s.global && ! jQuery.active++ )
4880                        jQuery.event.trigger( "ajaxStart" );
4881
4882                // Matches an absolute URL, and saves the domain
4883                var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );
4884
4885                // If we're requesting a remote document
4886                // and trying to load JSON or Script with a GET
4887                if ( s.dataType == "script" && type == "GET" && parts
4888                        && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
4889
4890                        var head = document.getElementsByTagName("head")[0];
4891                        var script = document.createElement("script");
4892                        script.src = s.url;
4893                        if (s.scriptCharset)
4894                                script.charset = s.scriptCharset;
4895
4896                        // Handle Script loading
4897                        if ( !jsonp ) {
4898                                var done = false;
4899
4900                                // Attach handlers for all browsers
4901                                script.onload = script.onreadystatechange = function(){
4902                                        if ( !done && (!this.readyState ||
4903                                                        this.readyState == "loaded" || this.readyState == "complete") ) {
4904                                                done = true;
4905                                                success();
4906                                                complete();
4907                                                head.removeChild( script );
4908                                        }
4909                                };
4910                        }
4911
4912                        head.appendChild(script);
4913
4914                        // We handle everything using the script element injection
4915                        return undefined;
4916                }
4917
4918                var requestDone = false;
4919
4920                // Create the request object
4921                var xhr = s.xhr();
4922
4923                // Open the socket
4924                // Passing null username, generates a login popup on Opera (#2865)
4925                if( s.username )
4926                        xhr.open(type, s.url, s.async, s.username, s.password);
4927                else
4928                        xhr.open(type, s.url, s.async);
4929
4930                // Need an extra try/catch for cross domain requests in Firefox 3
4931                try {
4932                        // Set the correct header, if data is being sent
4933                        if ( s.data )
4934                                xhr.setRequestHeader("Content-Type", s.contentType);
4935
4936                        // Set the If-Modified-Since header, if ifModified mode.
4937                        if ( s.ifModified )
4938                                xhr.setRequestHeader("If-Modified-Since",
4939                                        jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
4940
4941                        // Set header so the called script knows that it's an XMLHttpRequest
4942                        xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
4943
4944                        // Set the Accepts header for the server, depending on the dataType
4945                        xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
4946                                s.accepts[ s.dataType ] + ", */*" :
4947                                s.accepts._default );
4948                } catch(e){}
4949
4950                // Allow custom headers/mimetypes and early abort
4951                if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
4952                        // Handle the global AJAX counter
4953                        if ( s.global && ! --jQuery.active )
4954                                jQuery.event.trigger( "ajaxStop" );
4955                        // close opended socket
4956                        xhr.abort();
4957                        return false;
4958                }
4959
4960                if ( s.global )
4961                        jQuery.event.trigger("ajaxSend", [xhr, s]);
4962
4963                // Wait for a response to come back
4964                var onreadystatechange = function(isTimeout){
4965                        // The request was aborted, clear the interval and decrement jQuery.active
4966                        if (xhr.readyState == 0) {
4967                                if (ival) {
4968                                        // clear poll interval
4969                                        clearInterval(ival);
4970                                        ival = null;
4971                                        // Handle the global AJAX counter
4972                                        if ( s.global && ! --jQuery.active )
4973                                                jQuery.event.trigger( "ajaxStop" );
4974                                }
4975                        // The transfer is complete and the data is available, or the request timed out
4976                        } else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
4977                                requestDone = true;
4978
4979                                // clear poll interval
4980                                if (ival) {
4981                                        clearInterval(ival);
4982                                        ival = null;
4983                                }
4984
4985                                status = isTimeout == "timeout" ? "timeout" :
4986                                        !jQuery.httpSuccess( xhr ) ? "error" :
4987                                        s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
4988                                        "success";
4989
4990                                if ( status == "success" ) {
4991                                        // Watch for, and catch, XML document parse errors
4992                                        try {
4993                                                // process the data (runs the xml through httpData regardless of callback)
4994                                                data = jQuery.httpData( xhr, s.dataType, s );
4995                                        } catch(e) {
4996                                                status = "parsererror";
4997                                        }
4998                                }
4999
5000                                // Make sure that the request was successful or notmodified
5001                                if ( status == "success" ) {
5002                                        // Cache Last-Modified header, if ifModified mode.
5003                                        var modRes;
5004                                        try {
5005                                                modRes = xhr.getResponseHeader("Last-Modified");
5006                                        } catch(e) {} // swallow exception thrown by FF if header is not available
5007
5008                                        if ( s.ifModified && modRes )
5009                                                jQuery.lastModified[s.url] = modRes;
5010
5011                                        // JSONP handles its own success callback
5012                                        if ( !jsonp )
5013                                                success();
5014                                } else
5015                                        jQuery.handleError(s, xhr, status);
5016
5017                                // Fire the complete handlers
5018                                complete();
5019
5020                                if ( isTimeout )
5021                                        xhr.abort();
5022
5023                                // Stop memory leaks
5024                                if ( s.async )
5025                                        xhr = null;
5026                        }
5027                };
5028
5029                if ( s.async ) {
5030                        // don't attach the handler to the request, just poll it instead
5031                        var ival = setInterval(onreadystatechange, 13);
5032
5033                        // Timeout checker
5034                        if ( s.timeout > 0 )
5035                                setTimeout(function(){
5036                                        // Check to see if the request is still happening
5037                                        if ( xhr && !requestDone )
5038                                                onreadystatechange( "timeout" );
5039                                }, s.timeout);
5040                }
5041
5042                // Send the data
5043                try {
5044                        xhr.send(s.data);
5045                } catch(e) {
5046                        jQuery.handleError(s, xhr, null, e);
5047                }
5048
5049                // firefox 1.5 doesn't fire statechange for sync requests
5050                if ( !s.async )
5051                        onreadystatechange();
5052
5053                function success(){
5054                        // If a local callback was specified, fire it and pass it the data
5055                        if ( s.success )
5056                                s.success( data, status );
5057
5058                        // Fire the global callback
5059                        if ( s.global )
5060                                jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
5061                }
5062
5063                function complete(){
5064                        // Process result
5065                        if ( s.complete )
5066                                s.complete(xhr, status);
5067
5068                        // The request was completed
5069                        if ( s.global )
5070                                jQuery.event.trigger( "ajaxComplete", [xhr, s] );
5071
5072                        // Handle the global AJAX counter
5073                        if ( s.global && ! --jQuery.active )
5074                                jQuery.event.trigger( "ajaxStop" );
5075                }
5076
5077                // return XMLHttpRequest to allow aborting the request etc.
5078                return xhr;
5079        },
5080
5081        handleError: function( s, xhr, status, e ) {
5082                ///     <summary>
5083                ///             This method is internal.
5084                ///     </summary>
5085                ///     <private />
5086
5087                // If a local callback was specified, fire it
5088                if ( s.error ) s.error( xhr, status, e );
5089
5090                // Fire the global callback
5091                if ( s.global )
5092                        jQuery.event.trigger( "ajaxError", [xhr, s, e] );
5093        },
5094
5095        // Counter for holding the number of active queries
5096        active: 0,
5097
5098        // Determines if an XMLHttpRequest was successful or not
5099        httpSuccess: function( xhr ) {
5100                ///     <summary>
5101                ///             This method is internal.
5102                ///     </summary>
5103                ///     <private />
5104               
5105                try {
5106                        // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
5107                        return !xhr.status && location.protocol == "file:" ||
5108                                ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
5109                } catch(e){}
5110                return false;
5111        },
5112
5113        // Determines if an XMLHttpRequest returns NotModified
5114        httpNotModified: function( xhr, url ) {
5115                ///     <summary>
5116                ///             This method is internal.
5117                ///     </summary>
5118                ///     <private />
5119               
5120                try {
5121                        var xhrRes = xhr.getResponseHeader("Last-Modified");
5122
5123                        // Firefox always returns 200. check Last-Modified date
5124                        return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
5125                } catch(e){}
5126                return false;
5127        },
5128
5129        httpData: function( xhr, type, filter ) {
5130                ///     <summary>
5131                ///             This method is internal.
5132                ///     </summary>
5133                ///     <private />
5134               
5135                var ct = xhr.getResponseHeader("content-type"),
5136                        xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
5137                        data = xml ? xhr.responseXML : xhr.responseText;
5138
5139                if ( xml && data.documentElement.tagName == "parsererror" )
5140                        throw "parsererror";
5141                       
5142                // Allow a pre-filtering function to sanitize the response
5143                // s != null is checked to keep backwards compatibility
5144                if( s && s.dataFilter )
5145                        data = s.dataFilter( data, type );
5146
5147                // The filter can actually parse the response
5148                if( typeof data === "string" ){
5149
5150                        // If the type is "script", eval it in global context
5151                        if ( type == "script" )
5152                                jQuery.globalEval( data );
5153
5154                        // Get the JavaScript object, if JSON is used.
5155                        if ( type == "json" )
5156                                data = window["eval"]("(" + data + ")");
5157                }
5158               
5159                return data;
5160        },
5161
5162        // Serialize an array of form elements or a set of
5163        // key/values into a query string
5164        param: function( a ) {
5165                ///     <summary>
5166                ///             This method is internal.  Use serialize() instead.
5167                ///     </summary>
5168                ///     <param name="a" type="Map">A map of key/value pairs to serialize into a string.</param>'
5169                ///     <returns type="String" />
5170                ///     <private />
5171       
5172                var s = [ ];
5173
5174                function add( key, value ){
5175                        s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
5176                };
5177
5178                // If an array was passed in, assume that it is an array
5179                // of form elements
5180                if ( jQuery.isArray(a) || a.jquery )
5181                        // Serialize the form elements
5182                        jQuery.each( a, function(){
5183                                add( this.name, this.value );
5184                        });
5185
5186                // Otherwise, assume that it's an object of key/value pairs
5187                else
5188                        // Serialize the key/values
5189                        for ( var j in a )
5190                                // If the value is an array then the key names need to be repeated
5191                                if ( jQuery.isArray(a[j]) )
5192                                        jQuery.each( a[j], function(){
5193                                                add( j, this );
5194                                        });
5195                                else
5196                                        add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );
5197
5198                // Return the resulting serialization
5199                return s.join("&").replace(/%20/g, "+");
5200        }
5201
5202});
5203var elemdisplay = {},
5204        timerId,
5205        fxAttrs = [
5206                // height animations
5207                [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
5208                // width animations
5209                [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
5210                // opacity animations
5211                [ "opacity" ]
5212        ];
5213
5214function genFx( type, num ){
5215        var obj = {};
5216        jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
5217                obj[ this ] = type;
5218        });
5219        return obj;
5220}
5221
5222jQuery.fn.extend({
5223        show: function(speed,callback){
5224                ///     <summary>
5225                ///             Show all matched elements using a graceful animation and firing an optional callback after completion.
5226                ///     </summary>
5227                ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5228                ///             the number of milliseconds to run the animation</param>
5229                ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5230                ///     <returns type="jQuery" />
5231               
5232                if ( speed ) {
5233                        return this.animate( genFx("show", 3), speed, callback);
5234                } else {
5235                        for ( var i = 0, l = this.length; i < l; i++ ){
5236                                var old = jQuery.data(this[i], "olddisplay");
5237                               
5238                                this[i].style.display = old || "";
5239                               
5240                                if ( jQuery.css(this[i], "display") === "none" ) {
5241                                        var tagName = this[i].tagName, display;
5242                                       
5243                                        if ( elemdisplay[ tagName ] ) {
5244                                                display = elemdisplay[ tagName ];
5245                                        } else {
5246                                                var elem = jQuery("<" + tagName + " />").appendTo("body");
5247                                               
5248                                                display = elem.css("display");
5249                                                if ( display === "none" )
5250                                                        display = "block";
5251                                               
5252                                                elem.remove();
5253                                               
5254                                                elemdisplay[ tagName ] = display;
5255                                        }
5256                                       
5257                                        this[i].style.display = jQuery.data(this[i], "olddisplay", display);
5258                                }
5259                        }
5260                       
5261                        return this;
5262                }
5263        },
5264
5265        hide: function(speed,callback){
5266                ///     <summary>
5267                ///             Hides all matched elements using a graceful animation and firing an optional callback after completion.
5268                ///     </summary>
5269                ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5270                ///             the number of milliseconds to run the animation</param>
5271                ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5272                ///     <returns type="jQuery" />
5273       
5274                if ( speed ) {
5275                        return this.animate( genFx("hide", 3), speed, callback);
5276                } else {
5277                        for ( var i = 0, l = this.length; i < l; i++ ){
5278                                var old = jQuery.data(this[i], "olddisplay");
5279                                if ( !old && old !== "none" )
5280                                        jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
5281                                this[i].style.display = "none";
5282                        }
5283                        return this;
5284                }
5285        },
5286
5287        // Save the old toggle function
5288        _toggle: jQuery.fn.toggle,
5289
5290        toggle: function( fn, fn2 ){
5291                ///     <summary>
5292                ///             Toggles displaying each of the set of matched elements.
5293                ///     </summary>
5294                ///     <returns type="jQuery" />
5295               
5296                var bool = typeof fn === "boolean";
5297
5298                return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
5299                        this._toggle.apply( this, arguments ) :
5300                        fn == null || bool ?
5301                                this.each(function(){
5302                                        var state = bool ? fn : jQuery(this).is(":hidden");
5303                                        jQuery(this)[ state ? "show" : "hide" ]();
5304                                }) :
5305                                this.animate(genFx("toggle", 3), fn, fn2);
5306        },
5307
5308        fadeTo: function(speed,to,callback){
5309                ///     <summary>
5310                ///             Fades the opacity of all matched elements to a specified opacity.
5311                ///     </summary>
5312                ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5313                ///             the number of milliseconds to run the animation</param>
5314                ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5315                ///     <returns type="jQuery" />
5316                return this.animate({opacity: to}, speed, callback);
5317        },
5318
5319        animate: function( prop, speed, easing, callback ) {
5320                ///     <summary>
5321                ///             A function for making custom animations.
5322                ///     </summary>
5323                ///     <param name="prop" type="Options">A set of style attributes that you wish to animate and to what end.</param>
5324                ///     <param name="speed" optional="true" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5325                ///             the number of milliseconds to run the animation</param>
5326                ///     <param name="easing" optional="true" type="String">The name of the easing effect that you want to use.  There are two built-in values, 'linear' and 'swing'.</param>
5327                ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5328                ///     <returns type="jQuery" />
5329
5330                var optall = jQuery.speed(speed, easing, callback);
5331
5332                return this[ optall.queue === false ? "each" : "queue" ](function(){
5333               
5334                        var opt = jQuery.extend({}, optall), p,
5335                                hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
5336                                self = this;
5337       
5338                        for ( p in prop ) {
5339                                if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
5340                                        return opt.complete.call(this);
5341
5342                                if ( ( p == "height" || p == "width" ) && this.style ) {
5343                                        // Store display property
5344                                        opt.display = jQuery.css(this, "display");
5345
5346                                        // Make sure that nothing sneaks out
5347                                        opt.overflow = this.style.overflow;
5348                                }
5349                        }
5350
5351                        if ( opt.overflow != null )
5352                                this.style.overflow = "hidden";
5353
5354                        opt.curAnim = jQuery.extend({}, prop);
5355
5356                        jQuery.each( prop, function(name, val){
5357                                var e = new jQuery.fx( self, opt, name );
5358
5359                                if ( /toggle|show|hide/.test(val) )
5360                                        e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
5361                                else {
5362                                        var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
5363                                                start = e.cur(true) || 0;
5364
5365                                        if ( parts ) {
5366                                                var end = parseFloat(parts[2]),
5367                                                        unit = parts[3] || "px";
5368
5369                                                // We need to compute starting value
5370                                                if ( unit != "px" ) {
5371                                                        self.style[ name ] = (end || 1) + unit;
5372                                                        start = ((end || 1) / e.cur(true)) * start;
5373                                                        self.style[ name ] = start + unit;
5374                                                }
5375
5376                                                // If a +=/-= token was provided, we're doing a relative animation
5377                                                if ( parts[1] )
5378                                                        end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
5379
5380                                                e.custom( start, end, unit );
5381                                        } else
5382                                                e.custom( start, val, "" );
5383                                }
5384                        });
5385
5386                        // For JS strict compliance
5387                        return true;
5388                });
5389        },
5390
5391        stop: function(clearQueue, gotoEnd){
5392                ///     <summary>
5393                ///             Stops all currently animations on the specified elements.
5394                ///     </summary>
5395                ///     <param name="clearQueue" optional="true" type="Boolean">True to clear animations that are queued to run.</param>
5396                ///     <param name="gotoEnd" optional="true" type="Boolean">True to move the element value to the end of its animation target.</param>
5397                ///     <returns type="jQuery" />
5398               
5399                var timers = jQuery.timers;
5400
5401                if (clearQueue)
5402                        this.queue([]);
5403
5404                this.each(function(){
5405                        // go in reverse order so anything added to the queue during the loop is ignored
5406                        for ( var i = timers.length - 1; i >= 0; i-- )
5407                                if ( timers[i].elem == this ) {
5408                                        if (gotoEnd)
5409                                                // force the next step to be the last
5410                                                timers[i](true);
5411                                        timers.splice(i, 1);
5412                                }
5413                });
5414
5415                // start the next in the queue if the last step wasn't forced
5416                if (!gotoEnd)
5417                        this.dequeue();
5418
5419                return this;
5420        }
5421
5422});
5423
5424// Generate shortcuts for custom animations
5425// jQuery.each({
5426//      slideDown: genFx("show", 1),
5427//      slideUp: genFx("hide", 1),
5428//      slideToggle: genFx("toggle", 1),
5429//      fadeIn: { opacity: "show" },
5430//      fadeOut: { opacity: "hide" }
5431// }, function( name, props ){
5432//      jQuery.fn[ name ] = function( speed, callback ){
5433//              return this.animate( props, speed, callback );
5434//      };
5435// });
5436
5437// [vsdoc] The following section has been denormalized from original sources for IntelliSense.
5438
5439jQuery.fn.slideDown = function( speed, callback ){
5440        ///     <summary>
5441        ///             Reveal all matched elements by adjusting their height.
5442        ///     </summary>
5443        ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5444        ///             the number of milliseconds to run the animation</param>
5445        ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5446        ///     <returns type="jQuery" />
5447        return this.animate( genFx("show", 1), speed, callback );
5448};
5449
5450jQuery.fn.slideUp = function( speed, callback ){
5451        ///     <summary>
5452        ///             Hiding all matched elements by adjusting their height.
5453        ///     </summary>
5454        ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5455        ///             the number of milliseconds to run the animation</param>
5456        ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5457        ///     <returns type="jQuery" />
5458        return this.animate( genFx("hide", 1), speed, callback );
5459};
5460
5461jQuery.fn.slideToggle = function( speed, callback ){
5462        ///     <summary>
5463        ///             Toggles the visibility of all matched elements by adjusting their height.
5464        ///     </summary>
5465        ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5466        ///             the number of milliseconds to run the animation</param>
5467        ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5468        ///     <returns type="jQuery" />
5469        return this.animate( genFx("toggle", 1), speed, callback );
5470};
5471
5472jQuery.fn.fadeIn = function( speed, callback ){
5473        ///     <summary>
5474        ///             Fades in all matched elements by adjusting their opacity.
5475        ///     </summary>
5476        ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5477        ///             the number of milliseconds to run the animation</param>
5478        ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5479        ///     <returns type="jQuery" />
5480        return this.animate( { opacity: "show" }, speed, callback );
5481};
5482
5483jQuery.fn.fadeOut = function( speed, callback ){
5484        ///     <summary>
5485        ///             Fades the opacity of all matched elements to a specified opacity.
5486        ///     </summary>
5487        ///     <param name="speed" type="String">A string representing one of three predefined speeds ('slow', 'normal', or 'fast'), or
5488        ///             the number of milliseconds to run the animation</param>
5489        ///     <param name="callback" optional="true" type="Function">A function to be executed whenever the animation completes, once for each animated element.  It should map function callback() such that this is the DOM element being animated.</param>
5490        ///     <returns type="jQuery" />
5491        return this.animate( { opacity: "hide" }, speed, callback );
5492};
5493
5494jQuery.extend({
5495
5496        speed: function(speed, easing, fn) {
5497                ///     <summary>
5498                ///             This member is internal.
5499                ///     </summary>
5500                ///     <private />
5501                var opt = typeof speed === "object" ? speed : {
5502                        complete: fn || !fn && easing ||
5503                                jQuery.isFunction( speed ) && speed,
5504                        duration: speed,
5505                        easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
5506                };
5507
5508                opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
5509                        jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
5510
5511                // Queueing
5512                opt.old = opt.complete;
5513                opt.complete = function(){
5514                        if ( opt.queue !== false )
5515                                jQuery(this).dequeue();
5516                        if ( jQuery.isFunction( opt.old ) )
5517                                opt.old.call( this );
5518                };
5519
5520                return opt;
5521        },
5522
5523        easing: {
5524                linear: function( p, n, firstNum, diff ) {
5525                ///     <summary>
5526                ///             This member is internal.
5527                        ///     </summary>
5528                ///     <private />
5529                        return firstNum + diff * p;
5530                },
5531                swing: function( p, n, firstNum, diff ) {
5532                ///     <summary>
5533                ///             This member is internal.
5534                        ///     </summary>
5535                ///     <private />
5536                        return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
5537                }
5538        },
5539
5540        timers: [],
5541
5542        fx: function( elem, options, prop ){
5543                ///     <summary>
5544                ///             This member is internal.
5545                ///     </summary>
5546                ///     <private />
5547                this.options = options;
5548                this.elem = elem;
5549                this.prop = prop;
5550
5551                if ( !options.orig )
5552                        options.orig = {};
5553        }
5554
5555});
5556
5557jQuery.fx.prototype = {
5558
5559        // Simple function for setting a style value
5560        update: function(){
5561                ///     <summary>
5562                ///             This member is internal.
5563                ///     </summary>
5564                ///     <private />
5565                if ( this.options.step )
5566                        this.options.step.call( this.elem, this.now, this );
5567
5568                (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
5569
5570                // Set display property to block for height/width animations
5571                if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
5572                        this.elem.style.display = "block";
5573        },
5574
5575        // Get the current size
5576        cur: function(force){
5577                ///     <summary>
5578                ///             This member is internal.
5579                ///     </summary>
5580                ///     <private />
5581                if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
5582                        return this.elem[ this.prop ];
5583
5584                var r = parseFloat(jQuery.css(this.elem, this.prop, force));
5585                return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
5586        },
5587
5588        // Start an animation from one number to another
5589        custom: function(from, to, unit){
5590                this.startTime = now();
5591                this.start = from;
5592                this.end = to;
5593                this.unit = unit || this.unit || "px";
5594                this.now = this.start;
5595                this.pos = this.state = 0;
5596
5597                var self = this;
5598                function t(gotoEnd){
5599                        return self.step(gotoEnd);
5600                }
5601
5602                t.elem = this.elem;
5603
5604                if ( t() && jQuery.timers.push(t) == 1 ) {
5605                        timerId = setInterval(function(){
5606                                var timers = jQuery.timers;
5607
5608                                for ( var i = 0; i < timers.length; i++ )
5609                                        if ( !timers[i]() )
5610                                                timers.splice(i--, 1);
5611
5612                                if ( !timers.length ) {
5613                                        clearInterval( timerId );
5614                                }
5615                        }, 13);
5616                }
5617        },
5618
5619        // Simple 'show' function
5620        show: function(){
5621                ///     <summary>
5622                ///             Displays each of the set of matched elements if they are hidden.
5623                ///     </summary>
5624                // Remember where we started, so that we can go back to it later
5625                this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
5626                this.options.show = true;
5627
5628                // Begin the animation
5629                // Make sure that we start at a small width/height to avoid any
5630                // flash of content
5631                this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
5632
5633                // Start by showing the element
5634                jQuery(this.elem).show();
5635        },
5636
5637        // Simple 'hide' function
5638        hide: function(){
5639                ///     <summary>
5640                ///             Hides each of the set of matched elements if they are shown.
5641                ///     </summary>
5642
5643                // Remember where we started, so that we can go back to it later
5644                this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
5645                this.options.hide = true;
5646
5647                // Begin the animation
5648                this.custom(this.cur(), 0);
5649        },
5650
5651        // Each step of an animation
5652        step: function(gotoEnd){
5653                ///     <summary>
5654                ///             This method is internal.
5655                ///     </summary>
5656                ///     <private />
5657                var t = now();
5658
5659                if ( gotoEnd || t >= this.options.duration + this.startTime ) {
5660                        this.now = this.end;
5661                        this.pos = this.state = 1;
5662                        this.update();
5663
5664                        this.options.curAnim[ this.prop ] = true;
5665
5666                        var done = true;
5667                        for ( var i in this.options.curAnim )
5668                                if ( this.options.curAnim[i] !== true )
5669                                        done = false;
5670
5671                        if ( done ) {
5672                                if ( this.options.display != null ) {
5673                                        // Reset the overflow
5674                                        this.elem.style.overflow = this.options.overflow;
5675
5676                                        // Reset the display
5677                                        this.elem.style.display = this.options.display;
5678                                        if ( jQuery.css(this.elem, "display") == "none" )
5679                                                this.elem.style.display = "block";
5680                                }
5681
5682                                // Hide the element if the "hide" operation was done
5683                                if ( this.options.hide )
5684                                        jQuery(this.elem).hide();
5685
5686                                // Reset the properties, if the item has been hidden or shown
5687                                if ( this.options.hide || this.options.show )
5688                                        for ( var p in this.options.curAnim )
5689                                                jQuery.attr(this.elem.style, p, this.options.orig[p]);
5690                                       
5691                                // Execute the complete function
5692                                this.options.complete.call( this.elem );
5693                        }
5694
5695                        return false;
5696                } else {
5697                        var n = t - this.startTime;
5698                        this.state = n / this.options.duration;
5699
5700                        // Perform the easing function, defaults to swing
5701                        this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
5702                        this.now = this.start + ((this.end - this.start) * this.pos);
5703
5704                        // Perform the next step of the animation
5705                        this.update();
5706                }
5707
5708                return true;
5709        }
5710
5711};
5712
5713jQuery.extend( jQuery.fx, {
5714        speeds:{
5715                slow: 600,
5716                fast: 200,
5717                // Default speed
5718                _default: 400
5719        },
5720        step: {
5721
5722                opacity: function(fx){
5723                        jQuery.attr(fx.elem.style, "opacity", fx.now);
5724                },
5725
5726                _default: function(fx){
5727                        if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
5728                                fx.elem.style[ fx.prop ] = fx.now + fx.unit;
5729                        else
5730                                fx.elem[ fx.prop ] = fx.now;
5731                }
5732        }
5733});
5734if ( document.documentElement["getBoundingClientRect"] )
5735        jQuery.fn.offset = function() {
5736                ///     <summary>
5737                ///             Gets the current offset of the first matched element relative to the viewport.
5738                ///     </summary>
5739                ///     <returns type="Object">An object with two Integer properties, 'top' and 'left'.</returns>
5740                if ( !this[0] ) return { top: 0, left: 0 };
5741                if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
5742                var box  = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
5743                        clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
5744                        top  = box.top  + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,
5745                        left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
5746                return { top: top, left: left };
5747        };
5748else
5749        jQuery.fn.offset = function() {
5750                ///     <summary>
5751                ///             Gets the current offset of the first matched element relative to the viewport.
5752                ///     </summary>
5753                ///     <returns type="Object">An object with two Integer properties, 'top' and 'left'.</returns>
5754                if ( !this[0] ) return { top: 0, left: 0 };
5755                if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
5756                jQuery.offset.initialized || jQuery.offset.initialize();
5757
5758                var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
5759                        doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
5760                        body = doc.body, defaultView = doc.defaultView,
5761                        prevComputedStyle = defaultView.getComputedStyle(elem, null),
5762                        top = elem.offsetTop, left = elem.offsetLeft;
5763
5764                while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
5765                        computedStyle = defaultView.getComputedStyle(elem, null);
5766                        top -= elem.scrollTop, left -= elem.scrollLeft;
5767                        if ( elem === offsetParent ) {
5768                                top += elem.offsetTop, left += elem.offsetLeft;
5769                                if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
5770                                        top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
5771                                        left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
5772                                prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
5773                        }
5774                        if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" )
5775                                top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
5776                                left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
5777                        prevComputedStyle = computedStyle;
5778                }
5779
5780                if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
5781                        top  += body.offsetTop,
5782                        left += body.offsetLeft;
5783
5784                if ( prevComputedStyle.position === "fixed" )
5785                        top  += Math.max(docElem.scrollTop, body.scrollTop),
5786                        left += Math.max(docElem.scrollLeft, body.scrollLeft);
5787
5788                return { top: top, left: left };
5789        };
5790
5791jQuery.offset = {
5792        initialize: function() {
5793                if ( this.initialized ) return;
5794                var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
5795                        html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';
5796
5797                rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
5798                for ( prop in rules ) container.style[prop] = rules[prop];
5799
5800                container.innerHTML = html;
5801                body.insertBefore(container, body.firstChild);
5802                innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;
5803
5804                this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
5805                this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
5806
5807                innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
5808                this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
5809
5810                body.style.marginTop = '1px';
5811                this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
5812                body.style.marginTop = bodyMarginTop;
5813
5814                body.removeChild(container);
5815                this.initialized = true;
5816        },
5817
5818        bodyOffset: function(body) {
5819                jQuery.offset.initialized || jQuery.offset.initialize();
5820                var top = body.offsetTop, left = body.offsetLeft;
5821                if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
5822                        top  += parseInt( jQuery.curCSS(body, 'marginTop',  true), 10 ) || 0,
5823                        left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
5824                return { top: top, left: left };
5825        }
5826};
5827
5828
5829jQuery.fn.extend({
5830        position: function() {
5831                ///     <summary>
5832                ///             Gets the top and left positions of an element relative to its offset parent.
5833                ///     </summary>
5834                ///     <returns type="Object">An object with two integer properties, 'top' and 'left'.</returns>
5835                var left = 0, top = 0, results;
5836
5837                if ( this[0] ) {
5838                        // Get *real* offsetParent
5839                        var offsetParent = this.offsetParent(),
5840
5841                        // Get correct offsets
5842                        offset       = this.offset(),
5843                        parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
5844
5845                        // Subtract element margins
5846                        // note: when an element has margin: auto the offsetLeft and marginLeft
5847                        // are the same in Safari causing offset.left to incorrectly be 0
5848                        offset.top  -= num( this, 'marginTop'  );
5849                        offset.left -= num( this, 'marginLeft' );
5850
5851                        // Add offsetParent borders
5852                        parentOffset.top  += num( offsetParent, 'borderTopWidth'  );
5853                        parentOffset.left += num( offsetParent, 'borderLeftWidth' );
5854
5855                        // Subtract the two offsets
5856                        results = {
5857                                top:  offset.top  - parentOffset.top,
5858                                left: offset.left - parentOffset.left
5859                        };
5860                }
5861
5862                return results;
5863        },
5864
5865        offsetParent: function() {
5866                ///     <summary>
5867                ///             This method is internal.
5868                ///     </summary>
5869                ///     <private />
5870                var offsetParent = this[0].offsetParent || document.body;
5871                while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
5872                        offsetParent = offsetParent.offsetParent;
5873                return jQuery(offsetParent);
5874        }
5875});
5876
5877
5878// Create scrollLeft and scrollTop methods
5879jQuery.each( ['Left'], function(i, name) {
5880        var method = 'scroll' + name;
5881       
5882        jQuery.fn[ method ] = function(val) {
5883                ///     <summary>
5884                ///             Gets and optionally sets the scroll left offset of the first matched element.
5885                ///     </summary>
5886                ///     <param name="val" type="Number" integer="true" optional="true">A positive number representing the desired scroll left offset.</param>
5887                ///     <returns type="Number" integer="true">The scroll left offset of the first matched element.</returns>
5888                if (!this[0]) return null;
5889
5890                return val !== undefined ?
5891
5892                        // Set the scroll offset
5893                        this.each(function() {
5894                                this == window || this == document ?
5895                                        window.scrollTo(
5896                                                !i ? val : jQuery(window).scrollLeft(),
5897                                                 i ? val : jQuery(window).scrollTop()
5898                                        ) :
5899                                        this[ method ] = val;
5900                        }) :
5901
5902                        // Return the scroll offset
5903                        this[0] == window || this[0] == document ?
5904                                self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
5905                                        jQuery.boxModel && document.documentElement[ method ] ||
5906                                        document.body[ method ] :
5907                                this[0][ method ];
5908        };
5909});
5910
5911// Create scrollLeft and scrollTop methods
5912jQuery.each( ['Top'], function(i, name) {
5913        var method = 'scroll' + name;
5914       
5915        jQuery.fn[ method ] = function(val) {
5916                ///     <summary>
5917                ///             Gets and optionally sets the scroll top offset of the first matched element.
5918                ///     </summary>
5919                ///     <param name="val" type="Number" integer="true" optional="true">A positive number representing the desired scroll top offset.</param>
5920                ///     <returns type="Number" integer="true">The scroll top offset of the first matched element.</returns>
5921                if (!this[0]) return null;
5922
5923                return val !== undefined ?
5924
5925                        // Set the scroll offset
5926                        this.each(function() {
5927                                this == window || this == document ?
5928                                        window.scrollTo(
5929                                                !i ? val : jQuery(window).scrollLeft(),
5930                                                 i ? val : jQuery(window).scrollTop()
5931                                        ) :
5932                                        this[ method ] = val;
5933                        }) :
5934
5935                        // Return the scroll offset
5936                        this[0] == window || this[0] == document ?
5937                                self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
5938                                        jQuery.boxModel && document.documentElement[ method ] ||
5939                                        document.body[ method ] :
5940                                this[0][ method ];
5941        };
5942});
5943
5944// Create innerHeight, innerWidth, outerHeight and outerWidth methods
5945jQuery.each([ "Height" ], function(i, name){
5946
5947        var tl = i ? "Left"  : "Top",  // top or left
5948                br = i ? "Right" : "Bottom"; // bottom or right
5949
5950        // innerHeight and innerWidth
5951        jQuery.fn["inner" + name] = function(){
5952                ///     <summary>
5953                ///             Gets the inner height of the first matched element, excluding border but including padding.
5954                ///     </summary>
5955                ///     <returns type="Number" integer="true">The outer height of the first matched element.</returns>
5956                return this[ name.toLowerCase() ]() +
5957                        num(this, "padding" + tl) +
5958                        num(this, "padding" + br);
5959        };
5960
5961        // outerHeight and outerWidth
5962        jQuery.fn["outer" + name] = function(margin) {
5963                ///     <summary>
5964                ///             Gets the outer height of the first matched element, including border and padding by default.
5965                ///     </summary>
5966                ///     <param name="margins" type="Map">A set of key/value pairs that specify the options for the method.</param>
5967                ///     <returns type="Number" integer="true">The outer height of the first matched element.</returns>
5968                return this["inner" + name]() +
5969                        num(this, "border" + tl + "Width") +
5970                        num(this, "border" + br + "Width") +
5971                        (margin ?
5972                                num(this, "margin" + tl) + num(this, "margin" + br) : 0);
5973        };
5974       
5975        var type = name.toLowerCase();
5976
5977        jQuery.fn[ type ] = function( size ) {
5978                ///     <summary>
5979                ///             Set the CSS height of every matched element. If no explicit unit
5980                ///             was specified (like 'em' or '%') then &quot;px&quot; is added to the width.  If no parameter is specified, it gets
5981                ///             the current computed pixel height of the first matched element.
5982                ///             Part of CSS
5983                ///     </summary>
5984                ///     <returns type="jQuery" type="jQuery" />
5985                ///     <param name="cssProperty" type="String">
5986                ///             Set the CSS property to the specified value. Omit to get the value of the first matched element.
5987                ///     </param>
5988
5989                // Get window width or height
5990                return this[0] == window ?
5991                        // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
5992                        document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
5993                        document.body[ "client" + name ] :
5994
5995                        // Get document width or height
5996                        this[0] == document ?
5997                                // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
5998                                Math.max(
5999                                        document.documentElement["client" + name],
6000                                        document.body["scroll" + name], document.documentElement["scroll" + name],
6001                                        document.body["offset" + name], document.documentElement["offset" + name]
6002                                ) :
6003
6004                                // Get or set width or height on the element
6005                                size === undefined ?
6006                                        // Get width or height on the element
6007                                        (this.length ? jQuery.css( this[0], type ) : null) :
6008
6009                                        // Set the width or height on the element (default to pixels if value is unitless)
6010                                        this.css( type, typeof size === "string" ? size : size + "px" );
6011        };
6012
6013});
6014
6015// Create innerHeight, innerWidth, outerHeight and outerWidth methods
6016jQuery.each([ "Width" ], function(i, name){
6017
6018        var tl = i ? "Left"  : "Top",  // top or left
6019                br = i ? "Right" : "Bottom"; // bottom or right
6020
6021        // innerHeight and innerWidth
6022        jQuery.fn["inner" + name] = function(){
6023                ///     <summary>
6024                ///             Gets the inner width of the first matched element, excluding border but including padding.
6025                ///     </summary>
6026                ///     <returns type="Number" integer="true">The outer width of the first matched element.</returns>
6027
6028                return this[ name.toLowerCase() ]() +
6029                        num(this, "padding" + tl) +
6030                        num(this, "padding" + br);
6031        };
6032
6033        // outerHeight and outerWidth
6034        jQuery.fn["outer" + name] = function(margin) {
6035                ///     <summary>
6036                ///             Gets the outer width of the first matched element, including border and padding by default.
6037                ///     </summary>
6038                ///     <param name="margins" type="Map">A set of key/value pairs that specify the options for the method.</param>
6039                ///     <returns type="Number" integer="true">The outer width of the first matched element.</returns>
6040                return this["inner" + name]() +
6041                        num(this, "border" + tl + "Width") +
6042                        num(this, "border" + br + "Width") +
6043                        (margin ?
6044                                num(this, "margin" + tl) + num(this, "margin" + br) : 0);
6045        };
6046       
6047        var type = name.toLowerCase();
6048
6049        jQuery.fn[ type ] = function( size ) {
6050                ///     <summary>
6051                ///             Set the CSS width of every matched element. If no explicit unit
6052                ///             was specified (like 'em' or '%') then &quot;px&quot; is added to the width.  If no parameter is specified, it gets
6053                ///             the current computed pixel width of the first matched element.
6054                ///             Part of CSS
6055                ///     </summary>
6056                ///     <returns type="jQuery" type="jQuery" />
6057                ///     <param name="cssProperty" type="String">
6058                ///             Set the CSS property to the specified value. Omit to get the value of the first matched element.
6059                ///     </param>
6060
6061                // Get window width or height
6062                return this[0] == window ?
6063                        // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
6064                        document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
6065                        document.body[ "client" + name ] :
6066
6067                        // Get document width or height
6068                        this[0] == document ?
6069                                // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
6070                                Math.max(
6071                                        document.documentElement["client" + name],
6072                                        document.body["scroll" + name], document.documentElement["scroll" + name],
6073                                        document.body["offset" + name], document.documentElement["offset" + name]
6074                                ) :
6075
6076                                // Get or set width or height on the element
6077                                size === undefined ?
6078                                        // Get width or height on the element
6079                                        (this.length ? jQuery.css( this[0], type ) : null) :
6080
6081                                        // Set the width or height on the element (default to pixels if value is unitless)
6082                                        this.css( type, typeof size === "string" ? size : size + "px" );
6083        };
6084
6085});})();
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.