Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Web/Scripts/jquery-1.5.1-vsdoc.js @ 15728

Last change on this file since 15728 was 9582, checked in by fschoepp, 12 years ago

#1888:

  • Added an overview for users to inspect their orders
  • Order Administrators may now suspend or reactivate orders
  • When creating an order, its necessary to enter payment information (paypal, credit card,...) before
  • Also, the billing period and type must be entered during the creation of an order.
File size: 246.8 KB
Line 
1/*
2* This file has been generated 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.5.1
8*/
9
10/*!
11* jQuery JavaScript Library v1.5.1
12* http://jquery.com/
13*
14* Distributed in whole under the terms of the MIT
15*
16* Copyright 2010, John Resig
17*
18* Permission is hereby granted, free of charge, to any person obtaining
19* a copy of this software and associated documentation files (the
20* "Software"), to deal in the Software without restriction, including
21* without limitation the rights to use, copy, modify, merge, publish,
22* distribute, sublicense, and/or sell copies of the Software, and to
23* permit persons to whom the Software is furnished to do so, subject to
24* the following conditions:
25*
26* The above copyright notice and this permission notice shall be
27* included in all copies or substantial portions of the Software.
28*
29* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
33* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
34* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
35* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36*
37* Includes Sizzle.js
38* http://sizzlejs.com/
39* Copyright 2010, The Dojo Foundation
40* Released under the MIT and BSD Licenses.
41*/
42
43(function (window, undefined) {
44    var jQuery = function (selector, context) {
45        /// <summary>
46        ///     1: Accepts a string containing a CSS selector which is then used to match a set of elements.
47        ///     &#10;    1.1 - $(selector, context)
48        ///     &#10;    1.2 - $(element)
49        ///     &#10;    1.3 - $(elementArray)
50        ///     &#10;    1.4 - $(jQuery object)
51        ///     &#10;    1.5 - $()
52        ///     &#10;2: Creates DOM elements on the fly from the provided string of raw HTML.
53        ///     &#10;    2.1 - $(html, ownerDocument)
54        ///     &#10;    2.2 - $(html, props)
55        ///     &#10;3: Binds a function to be executed when the DOM has finished loading.
56        ///     &#10;    3.1 - $(callback)
57        /// </summary>
58        /// <param name="selector" type="String">
59        ///     A string containing a selector expression
60        /// </param>
61        /// <param name="context" type="jQuery">
62        ///     A DOM Element, Document, or jQuery to use as context
63        /// </param>
64        /// <returns type="jQuery" />
65
66        // The jQuery object is actually just the init constructor 'enhanced'
67        return new jQuery.fn.init(selector, context, rootjQuery);
68    };
69    jQuery.Deferred = function (func) {
70
71        var deferred = jQuery._Deferred(),
72      failDeferred = jQuery._Deferred(),
73      promise;
74        // Add errorDeferred methods, then and promise
75        jQuery.extend(deferred, {
76            then: function (doneCallbacks, failCallbacks) {
77                deferred.done(doneCallbacks).fail(failCallbacks);
78                return this;
79            },
80            fail: failDeferred.done,
81            rejectWith: failDeferred.resolveWith,
82            reject: failDeferred.resolve,
83            isRejected: failDeferred.isResolved,
84            // Get a promise for this deferred
85            // If obj is provided, the promise aspect is added to the object
86            promise: function (obj) {
87                if (obj == null) {
88                    if (promise) {
89                        return promise;
90                    }
91                    promise = obj = {};
92                }
93                var i = promiseMethods.length;
94                while (i--) {
95                    obj[promiseMethods[i]] = deferred[promiseMethods[i]];
96                }
97                return obj;
98            }
99        });
100        // Make sure only one callback list will be used
101        deferred.done(failDeferred.cancel).fail(deferred.cancel);
102        // Unexpose cancel
103        delete deferred.cancel;
104        // Call given func if any
105        if (func) {
106            func.call(deferred, deferred);
107        }
108        return deferred;
109    };
110    jQuery.Event = function (src) {
111
112        // Allow instantiation without the 'new' keyword
113        if (!this.preventDefault) {
114            return new jQuery.Event(src);
115        }
116
117        // Event object
118        if (src && src.type) {
119            this.originalEvent = src;
120            this.type = src.type;
121
122            // Events bubbling up the document may have been marked as prevented
123            // by a handler lower down the tree; reflect the correct value.
124            this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
125      src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
126
127            // Event type
128        } else {
129            this.type = src;
130        }
131
132        // timeStamp is buggy for some events on Firefox(#3843)
133        // So we won't rely on the native value
134        this.timeStamp = jQuery.now();
135
136        // Mark it as fixed
137        this[jQuery.expando] = true;
138    };
139    jQuery._Deferred = function () {
140
141        var // callbacks list
142      callbacks = [],
143        // stored [ context , args ]
144      fired,
145        // to avoid firing when already doing so
146      firing,
147        // flag to know if the deferred has been cancelled
148      cancelled,
149        // the deferred itself
150      deferred = {
151
152          // done( f1, f2, ...)
153          done: function () {
154              if (!cancelled) {
155                  var args = arguments,
156              i,
157              length,
158              elem,
159              type,
160              _fired;
161                  if (fired) {
162                      _fired = fired;
163                      fired = 0;
164                  }
165                  for (i = 0, length = args.length; i < length; i++) {
166                      elem = args[i];
167                      type = jQuery.type(elem);
168                      if (type === "array") {
169                          deferred.done.apply(deferred, elem);
170                      } else if (type === "function") {
171                          callbacks.push(elem);
172                      }
173                  }
174                  if (_fired) {
175                      deferred.resolveWith(_fired[0], _fired[1]);
176                  }
177              }
178              return this;
179          },
180
181          // resolve with given context and args
182          resolveWith: function (context, args) {
183              if (!cancelled && !fired && !firing) {
184                  firing = 1;
185                  try {
186                      while (callbacks[0]) {
187                          callbacks.shift().apply(context, args);
188                      }
189                  }
190                  // We have to add a catch block for
191                  // IE prior to 8 or else the finally
192                  // block will never get executed
193                  catch (e) {
194                      throw e;
195                  }
196                  finally {
197                      fired = [context, args];
198                      firing = 0;
199                  }
200              }
201              return this;
202          },
203
204          // resolve with this as context and given arguments
205          resolve: function () {
206              deferred.resolveWith(jQuery.isFunction(this.promise) ? this.promise() : this, arguments);
207              return this;
208          },
209
210          // Has this deferred been resolved?
211          isResolved: function () {
212              return !!(firing || fired);
213          },
214
215          // Cancel
216          cancel: function () {
217              cancelled = 1;
218              callbacks = [];
219              return this;
220          }
221      };
222
223        return deferred;
224    };
225    jQuery._data = function (elem, name, data) {
226
227        return jQuery.data(elem, name, data, true);
228    };
229    jQuery.acceptData = function (elem) {
230
231        if (elem.nodeName) {
232            var match = jQuery.noData[elem.nodeName.toLowerCase()];
233
234            if (match) {
235                return !(match === true || elem.getAttribute("classid") !== match);
236            }
237        }
238
239        return true;
240    };
241    jQuery.access = function (elems, key, value, exec, fn, pass) {
242
243        var length = elems.length;
244
245        // Setting many attributes
246        if (typeof key === "object") {
247            for (var k in key) {
248                jQuery.access(elems, k, key[k], exec, fn, value);
249            }
250            return elems;
251        }
252
253        // Setting one attribute
254        if (value !== undefined) {
255            // Optionally, function values get executed if exec is true
256            exec = !pass && exec && jQuery.isFunction(value);
257
258            for (var i = 0; i < length; i++) {
259                fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass);
260            }
261
262            return elems;
263        }
264
265        // Getting an attribute
266        return length ? fn(elems[0], key) : undefined;
267    };
268    jQuery.active = 0;
269    jQuery.ajax = function (url, options) {
270        /// <summary>
271        ///     Perform an asynchronous HTTP (Ajax) request.
272        ///     &#10;1 - jQuery.ajax(url, settings)
273        ///     &#10;2 - jQuery.ajax(settings)
274        /// </summary>
275        /// <param name="url" type="String">
276        ///     A string containing the URL to which the request is sent.
277        /// </param>
278        /// <param name="options" type="Object">
279        ///     A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.
280        /// </param>
281
282
283        // If url is an object, simulate pre-1.5 signature
284        if (typeof url === "object") {
285            options = url;
286            url = undefined;
287        }
288
289        // Force options to be an object
290        options = options || {};
291
292        var // Create the final options object
293      s = jQuery.ajaxSetup({}, options),
294        // Callbacks context
295      callbackContext = s.context || s,
296        // Context for global events
297        // It's the callbackContext if one was provided in the options
298        // and if it's a DOM node or a jQuery collection
299      globalEventContext = callbackContext !== s &&
300        (callbackContext.nodeType || callbackContext instanceof jQuery) ?
301            jQuery(callbackContext) : jQuery.event,
302        // Deferreds
303      deferred = jQuery.Deferred(),
304      completeDeferred = jQuery._Deferred(),
305        // Status-dependent callbacks
306      statusCode = s.statusCode || {},
307        // ifModified key
308      ifModifiedKey,
309        // Headers (they are sent all at once)
310      requestHeaders = {},
311        // Response headers
312      responseHeadersString,
313      responseHeaders,
314        // transport
315      transport,
316        // timeout handle
317      timeoutTimer,
318        // Cross-domain detection vars
319      parts,
320        // The jqXHR state
321      state = 0,
322        // To know if global events are to be dispatched
323      fireGlobals,
324        // Loop variable
325      i,
326        // Fake xhr
327      jqXHR = {
328
329          readyState: 0,
330
331          // Caches the header
332          setRequestHeader: function (name, value) {
333              if (!state) {
334                  requestHeaders[name.toLowerCase().replace(rucHeaders, rucHeadersFunc)] = value;
335              }
336              return this;
337          },
338
339          // Raw string
340          getAllResponseHeaders: function () {
341              return state === 2 ? responseHeadersString : null;
342          },
343
344          // Builds headers hashtable if needed
345          getResponseHeader: function (key) {
346              var match;
347              if (state === 2) {
348                  if (!responseHeaders) {
349                      responseHeaders = {};
350                      while ((match = rheaders.exec(responseHeadersString))) {
351                          responseHeaders[match[1].toLowerCase()] = match[2];
352                      }
353                  }
354                  match = responseHeaders[key.toLowerCase()];
355              }
356              return match === undefined ? null : match;
357          },
358
359          // Overrides response content-type header
360          overrideMimeType: function (type) {
361              if (!state) {
362                  s.mimeType = type;
363              }
364              return this;
365          },
366
367          // Cancel the request
368          abort: function (statusText) {
369              statusText = statusText || "abort";
370              if (transport) {
371                  transport.abort(statusText);
372              }
373              done(0, statusText);
374              return this;
375          }
376      };
377
378        // Callback for when everything is done
379        // It is defined here because jslint complains if it is declared
380        // at the end of the function (which would be more logical and readable)
381        function done(status, statusText, responses, headers) {
382
383            // Called once
384            if (state === 2) {
385                return;
386            }
387
388            // State is "done" now
389            state = 2;
390
391            // Clear timeout if it exists
392            if (timeoutTimer) {
393                clearTimeout(timeoutTimer);
394            }
395
396            // Dereference transport for early garbage collection
397            // (no matter how long the jqXHR object will be used)
398            transport = undefined;
399
400            // Cache response headers
401            responseHeadersString = headers || "";
402
403            // Set readyState
404            jqXHR.readyState = status ? 4 : 0;
405
406            var isSuccess,
407        success,
408        error,
409        response = responses ? ajaxHandleResponses(s, jqXHR, responses) : undefined,
410        lastModified,
411        etag;
412
413            // If successful, handle type chaining
414            if (status >= 200 && status < 300 || status === 304) {
415
416                // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
417                if (s.ifModified) {
418
419                    if ((lastModified = jqXHR.getResponseHeader("Last-Modified"))) {
420                        jQuery.lastModified[ifModifiedKey] = lastModified;
421                    }
422                    if ((etag = jqXHR.getResponseHeader("Etag"))) {
423                        jQuery.etag[ifModifiedKey] = etag;
424                    }
425                }
426
427                // If not modified
428                if (status === 304) {
429
430                    statusText = "notmodified";
431                    isSuccess = true;
432
433                    // If we have data
434                } else {
435
436                    try {
437                        success = ajaxConvert(s, response);
438                        statusText = "success";
439                        isSuccess = true;
440                    } catch (e) {
441                        // We have a parsererror
442                        statusText = "parsererror";
443                        error = e;
444                    }
445                }
446            } else {
447                // We extract error from statusText
448                // then normalize statusText and status for non-aborts
449                error = statusText;
450                if (!statusText || status) {
451                    statusText = "error";
452                    if (status < 0) {
453                        status = 0;
454                    }
455                }
456            }
457
458            // Set data for the fake xhr object
459            jqXHR.status = status;
460            jqXHR.statusText = statusText;
461
462            // Success/Error
463            if (isSuccess) {
464                deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
465            } else {
466                deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
467            }
468
469            // Status-dependent callbacks
470            jqXHR.statusCode(statusCode);
471            statusCode = undefined;
472
473            if (fireGlobals) {
474                globalEventContext.trigger("ajax" + (isSuccess ? "Success" : "Error"),
475            [jqXHR, s, isSuccess ? success : error]);
476            }
477
478            // Complete
479            completeDeferred.resolveWith(callbackContext, [jqXHR, statusText]);
480
481            if (fireGlobals) {
482                globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
483                // Handle the global AJAX counter
484                if (!(--jQuery.active)) {
485                    jQuery.event.trigger("ajaxStop");
486                }
487            }
488        }
489
490        // Attach deferreds
491        deferred.promise(jqXHR);
492        jqXHR.success = jqXHR.done;
493        jqXHR.error = jqXHR.fail;
494        jqXHR.complete = completeDeferred.done;
495
496        // Status-dependent callbacks
497        jqXHR.statusCode = function (map) {
498            if (map) {
499                var tmp;
500                if (state < 2) {
501                    for (tmp in map) {
502                        statusCode[tmp] = [statusCode[tmp], map[tmp]];
503                    }
504                } else {
505                    tmp = map[jqXHR.status];
506                    jqXHR.then(tmp, tmp);
507                }
508            }
509            return this;
510        };
511
512        // Remove hash character (#7531: and string promotion)
513        // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
514        // We also use the url parameter if available
515        s.url = ((url || s.url) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
516
517        // Extract dataTypes list
518        s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().split(rspacesAjax);
519
520        // Determine if a cross-domain request is in order
521        if (!s.crossDomain) {
522            parts = rurl.exec(s.url.toLowerCase());
523            s.crossDomain = !!(parts &&
524        (parts[1] != ajaxLocParts[1] || parts[2] != ajaxLocParts[2] ||
525          (parts[3] || (parts[1] === "http:" ? 80 : 443)) !=
526            (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443)))
527      );
528        }
529
530        // Convert data if not already a string
531        if (s.data && s.processData && typeof s.data !== "string") {
532            s.data = jQuery.param(s.data, s.traditional);
533        }
534
535        // Apply prefilters
536        inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
537
538        // If request was aborted inside a prefiler, stop there
539        if (state === 2) {
540            return false;
541        }
542
543        // We can fire global events as of now if asked to
544        fireGlobals = s.global;
545
546        // Uppercase the type
547        s.type = s.type.toUpperCase();
548
549        // Determine if request has content
550        s.hasContent = !rnoContent.test(s.type);
551
552        // Watch for a new set of requests
553        if (fireGlobals && jQuery.active++ === 0) {
554            jQuery.event.trigger("ajaxStart");
555        }
556
557        // More options handling for requests with no content
558        if (!s.hasContent) {
559
560            // If data is available, append data to url
561            if (s.data) {
562                s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
563            }
564
565            // Get ifModifiedKey before adding the anti-cache parameter
566            ifModifiedKey = s.url;
567
568            // Add anti-cache in url if needed
569            if (s.cache === false) {
570
571                var ts = jQuery.now(),
572                // try replacing _= if it is there
573          ret = s.url.replace(rts, "$1_=" + ts);
574
575                // if nothing was replaced, add timestamp to the end
576                s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
577            }
578        }
579
580        // Set the correct header, if data is being sent
581        if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
582            requestHeaders["Content-Type"] = s.contentType;
583        }
584
585        // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
586        if (s.ifModified) {
587            ifModifiedKey = ifModifiedKey || s.url;
588            if (jQuery.lastModified[ifModifiedKey]) {
589                requestHeaders["If-Modified-Since"] = jQuery.lastModified[ifModifiedKey];
590            }
591            if (jQuery.etag[ifModifiedKey]) {
592                requestHeaders["If-None-Match"] = jQuery.etag[ifModifiedKey];
593            }
594        }
595
596        // Set the Accepts header for the server, depending on the dataType
597        requestHeaders.Accept = s.dataTypes[0] && s.accepts[s.dataTypes[0]] ?
598      s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", */*; q=0.01" : "") :
599      s.accepts["*"];
600
601        // Check for headers option
602        for (i in s.headers) {
603            jqXHR.setRequestHeader(i, s.headers[i]);
604        }
605
606        // Allow custom headers/mimetypes and early abort
607        if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
608            // Abort if not done already
609            jqXHR.abort();
610            return false;
611
612        }
613
614        // Install callbacks on deferreds
615        for (i in { success: 1, error: 1, complete: 1 }) {
616            jqXHR[i](s[i]);
617        }
618
619        // Get transport
620        transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
621
622        // If no transport, we auto-abort
623        if (!transport) {
624            done(-1, "No Transport");
625        } else {
626            jqXHR.readyState = 1;
627            // Send global event
628            if (fireGlobals) {
629                globalEventContext.trigger("ajaxSend", [jqXHR, s]);
630            }
631            // Timeout
632            if (s.async && s.timeout > 0) {
633                timeoutTimer = setTimeout(function () {
634                    jqXHR.abort("timeout");
635                }, s.timeout);
636            }
637
638            try {
639                state = 1;
640                transport.send(requestHeaders, done);
641            } catch (e) {
642                // Propagate exception as error if not done
643                if (status < 2) {
644                    done(-1, e);
645                    // Simply rethrow otherwise
646                } else {
647                    jQuery.error(e);
648                }
649            }
650        }
651
652        return jqXHR;
653    };
654    jQuery.ajaxPrefilter = function (dataTypeExpression, func) {
655
656
657        if (typeof dataTypeExpression !== "string") {
658            func = dataTypeExpression;
659            dataTypeExpression = "*";
660        }
661
662        if (jQuery.isFunction(func)) {
663            var dataTypes = dataTypeExpression.toLowerCase().split(rspacesAjax),
664        i = 0,
665        length = dataTypes.length,
666        dataType,
667        list,
668        placeBefore;
669
670            // For each dataType in the dataTypeExpression
671            for (; i < length; i++) {
672                dataType = dataTypes[i];
673                // We control if we're asked to add before
674                // any existing element
675                placeBefore = /^\+/.test(dataType);
676                if (placeBefore) {
677                    dataType = dataType.substr(1) || "*";
678                }
679                list = structure[dataType] = structure[dataType] || [];
680                // then we add to the structure accordingly
681                list[placeBefore ? "unshift" : "push"](func);
682            }
683        }
684    };
685    jQuery.ajaxSettings = { "url": 'http://localhost:25813/',
686        "isLocal": false,
687        "global": true,
688        "type": 'GET',
689        "contentType": 'application/x-www-form-urlencoded',
690        "processData": true,
691        "async": true,
692        "accepts": {},
693        "contents": {},
694        "responseFields": {},
695        "converters": {},
696        "jsonp": 'callback'
697    };
698    jQuery.ajaxSetup = function (target, settings) {
699        /// <summary>
700        ///     Set default values for future Ajax requests.
701        /// </summary>
702        /// <param name="target" type="Object">
703        ///     A set of key/value pairs that configure the default Ajax request. All options are optional.
704        /// </param>
705
706        if (!settings) {
707            // Only one parameter, we extend ajaxSettings
708            settings = target;
709            target = jQuery.extend(true, jQuery.ajaxSettings, settings);
710        } else {
711            // target was provided, we extend into it
712            jQuery.extend(true, target, jQuery.ajaxSettings, settings);
713        }
714        // Flatten fields we don't want deep extended
715        for (var field in { context: 1, url: 1 }) {
716            if (field in settings) {
717                target[field] = settings[field];
718            } else if (field in jQuery.ajaxSettings) {
719                target[field] = jQuery.ajaxSettings[field];
720            }
721        }
722        return target;
723    };
724    jQuery.ajaxTransport = function (dataTypeExpression, func) {
725
726
727        if (typeof dataTypeExpression !== "string") {
728            func = dataTypeExpression;
729            dataTypeExpression = "*";
730        }
731
732        if (jQuery.isFunction(func)) {
733            var dataTypes = dataTypeExpression.toLowerCase().split(rspacesAjax),
734        i = 0,
735        length = dataTypes.length,
736        dataType,
737        list,
738        placeBefore;
739
740            // For each dataType in the dataTypeExpression
741            for (; i < length; i++) {
742                dataType = dataTypes[i];
743                // We control if we're asked to add before
744                // any existing element
745                placeBefore = /^\+/.test(dataType);
746                if (placeBefore) {
747                    dataType = dataType.substr(1) || "*";
748                }
749                list = structure[dataType] = structure[dataType] || [];
750                // then we add to the structure accordingly
751                list[placeBefore ? "unshift" : "push"](func);
752            }
753        }
754    };
755    jQuery.attr = function (elem, name, value, pass) {
756
757        // don't get/set attributes on text, comment and attribute nodes
758        if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2) {
759            return undefined;
760        }
761
762        if (pass && name in jQuery.attrFn) {
763            return jQuery(elem)[name](value);
764        }
765
766        var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc(elem),
767        // Whether we are setting (or getting)
768      set = value !== undefined;
769
770        // Try to normalize/fix the name
771        name = notxml && jQuery.props[name] || name;
772
773        // Only do all the following if this is a node (faster for style)
774        if (elem.nodeType === 1) {
775            // These attributes require special treatment
776            var special = rspecialurl.test(name);
777
778            // Safari mis-reports the default selected property of an option
779            // Accessing the parent's selectedIndex property fixes it
780            if (name === "selected" && !jQuery.support.optSelected) {
781                var parent = elem.parentNode;
782                if (parent) {
783                    parent.selectedIndex;
784
785                    // Make sure that it also works with optgroups, see #5701
786                    if (parent.parentNode) {
787                        parent.parentNode.selectedIndex;
788                    }
789                }
790            }
791
792            // If applicable, access the attribute via the DOM 0 way
793            // 'in' checks fail in Blackberry 4.7 #6931
794            if ((name in elem || elem[name] !== undefined) && notxml && !special) {
795                if (set) {
796                    // We can't allow the type property to be changed (since it causes problems in IE)
797                    if (name === "type" && rtype.test(elem.nodeName) && elem.parentNode) {
798                        jQuery.error("type property can't be changed");
799                    }
800
801                    if (value === null) {
802                        if (elem.nodeType === 1) {
803                            elem.removeAttribute(name);
804                        }
805
806                    } else {
807                        elem[name] = value;
808                    }
809                }
810
811                // browsers index elements by id/name on forms, give priority to attributes.
812                if (jQuery.nodeName(elem, "form") && elem.getAttributeNode(name)) {
813                    return elem.getAttributeNode(name).nodeValue;
814                }
815
816                // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
817                // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
818                if (name === "tabIndex") {
819                    var attributeNode = elem.getAttributeNode("tabIndex");
820
821                    return attributeNode && attributeNode.specified ?
822            attributeNode.value :
823            rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ?
824              0 :
825              undefined;
826                }
827
828                return elem[name];
829            }
830
831            if (!jQuery.support.style && notxml && name === "style") {
832                if (set) {
833                    elem.style.cssText = "" + value;
834                }
835
836                return elem.style.cssText;
837            }
838
839            if (set) {
840                // convert the value to a string (all browsers do this but IE) see #1070
841                elem.setAttribute(name, "" + value);
842            }
843
844            // Ensure that missing attributes return undefined
845            // Blackberry 4.7 returns "" from getAttribute #6938
846            if (!elem.attributes[name] && (elem.hasAttribute && !elem.hasAttribute(name))) {
847                return undefined;
848            }
849
850            var attr = !jQuery.support.hrefNormalized && notxml && special ?
851            // Some attributes require a special call on IE
852          elem.getAttribute(name, 2) :
853          elem.getAttribute(name);
854
855            // Non-existent attributes return null, we normalize to undefined
856            return attr === null ? undefined : attr;
857        }
858        // Handle everything which isn't a DOM element node
859        if (set) {
860            elem[name] = value;
861        }
862        return elem[name];
863    };
864    jQuery.attrFn = { "val": true,
865        "css": true,
866        "html": true,
867        "text": true,
868        "data": true,
869        "width": true,
870        "height": true,
871        "offset": true,
872        "blur": true,
873        "focus": true,
874        "focusin": true,
875        "focusout": true,
876        "load": true,
877        "resize": true,
878        "scroll": true,
879        "unload": true,
880        "click": true,
881        "dblclick": true,
882        "mousedown": true,
883        "mouseup": true,
884        "mousemove": true,
885        "mouseover": true,
886        "mouseout": true,
887        "mouseenter": true,
888        "mouseleave": true,
889        "change": true,
890        "select": true,
891        "submit": true,
892        "keydown": true,
893        "keypress": true,
894        "keyup": true,
895        "error": true
896    };
897    jQuery.bindReady = function () {
898
899        if (readyBound) {
900            return;
901        }
902
903        readyBound = true;
904
905        // Catch cases where $(document).ready() is called after the
906        // browser event has already occurred.
907        if (document.readyState === "complete") {
908            // Handle it asynchronously to allow scripts the opportunity to delay ready
909            return setTimeout(jQuery.ready, 1);
910        }
911
912        // Mozilla, Opera and webkit nightlies currently support this event
913        if (document.addEventListener) {
914            // Use the handy event callback
915            document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
916
917            // A fallback to window.onload, that will always work
918            window.addEventListener("load", jQuery.ready, false);
919
920            // If IE event model is used
921        } else if (document.attachEvent) {
922            // ensure firing before onload,
923            // maybe late but safe also for iframes
924            document.attachEvent("onreadystatechange", DOMContentLoaded);
925
926            // A fallback to window.onload, that will always work
927            window.attachEvent("onload", jQuery.ready);
928
929            // If IE and not a frame
930            // continually check to see if the document is ready
931            var toplevel = false;
932
933            try {
934                toplevel = window.frameElement == null;
935            } catch (e) { }
936
937            if (document.documentElement.doScroll && toplevel) {
938                doScrollCheck();
939            }
940        }
941    };
942    jQuery.boxModel = true;
943    jQuery.browser = { "webkit": true,
944        "version": '534.13',
945        "safari": true
946    };
947    jQuery.buildFragment = function (args, nodes, scripts) {
948
949        var fragment, cacheable, cacheresults,
950    doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
951
952        // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
953        // Cloning options loses the selected state, so don't cache them
954        // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
955        // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
956        if (args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
957    args[0].charAt(0) === "<" && !rnocache.test(args[0]) && (jQuery.support.checkClone || !rchecked.test(args[0]))) {
958
959            cacheable = true;
960            cacheresults = jQuery.fragments[args[0]];
961            if (cacheresults) {
962                if (cacheresults !== 1) {
963                    fragment = cacheresults;
964                }
965            }
966        }
967
968        if (!fragment) {
969            fragment = doc.createDocumentFragment();
970            jQuery.clean(args, doc, fragment, scripts);
971        }
972
973        if (cacheable) {
974            jQuery.fragments[args[0]] = cacheresults ? fragment : 1;
975        }
976
977        return { fragment: fragment, cacheable: cacheable };
978    };
979    jQuery.cache = {};
980    jQuery.camelCase = function (string) {
981
982        return string.replace(rdashAlpha, fcamelCase);
983    };
984    jQuery.clean = function (elems, context, fragment, scripts) {
985
986        context = context || document;
987
988        // !context.createElement fails in IE with an error but returns typeof 'object'
989        if (typeof context.createElement === "undefined") {
990            context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
991        }
992
993        var ret = [];
994
995        for (var i = 0, elem; (elem = elems[i]) != null; i++) {
996            if (typeof elem === "number") {
997                elem += "";
998            }
999
1000            if (!elem) {
1001                continue;
1002            }
1003
1004            // Convert html string into DOM nodes
1005            if (typeof elem === "string" && !rhtml.test(elem)) {
1006                elem = context.createTextNode(elem);
1007
1008            } else if (typeof elem === "string") {
1009                // Fix "XHTML"-style tags in all browsers
1010                elem = elem.replace(rxhtmlTag, "<$1></$2>");
1011
1012                // Trim whitespace, otherwise indexOf won't work as expected
1013                var tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(),
1014          wrap = wrapMap[tag] || wrapMap._default,
1015          depth = wrap[0],
1016          div = context.createElement("div");
1017
1018                // Go to html and back, then peel off extra wrappers
1019                div.innerHTML = wrap[1] + elem + wrap[2];
1020
1021                // Move to the right depth
1022                while (depth--) {
1023                    div = div.lastChild;
1024                }
1025
1026                // Remove IE's autoinserted <tbody> from table fragments
1027                if (!jQuery.support.tbody) {
1028
1029                    // String was a <table>, *may* have spurious <tbody>
1030                    var hasBody = rtbody.test(elem),
1031            tbody = tag === "table" && !hasBody ?
1032              div.firstChild && div.firstChild.childNodes :
1033
1034                    // String was a bare <thead> or <tfoot>
1035              wrap[1] === "<table>" && !hasBody ?
1036                div.childNodes :
1037                [];
1038
1039                    for (var j = tbody.length - 1; j >= 0; --j) {
1040                        if (jQuery.nodeName(tbody[j], "tbody") && !tbody[j].childNodes.length) {
1041                            tbody[j].parentNode.removeChild(tbody[j]);
1042                        }
1043                    }
1044
1045                }
1046
1047                // IE completely kills leading whitespace when innerHTML is used
1048                if (!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
1049                    div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]), div.firstChild);
1050                }
1051
1052                elem = div.childNodes;
1053            }
1054
1055            if (elem.nodeType) {
1056                ret.push(elem);
1057            } else {
1058                ret = jQuery.merge(ret, elem);
1059            }
1060        }
1061
1062        if (fragment) {
1063            for (i = 0; ret[i]; i++) {
1064                if (scripts && jQuery.nodeName(ret[i], "script") && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript")) {
1065                    scripts.push(ret[i].parentNode ? ret[i].parentNode.removeChild(ret[i]) : ret[i]);
1066
1067                } else {
1068                    if (ret[i].nodeType === 1) {
1069                        ret.splice.apply(ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));
1070                    }
1071                    fragment.appendChild(ret[i]);
1072                }
1073            }
1074        }
1075
1076        return ret;
1077    };
1078    jQuery.cleanData = function (elems) {
1079
1080        var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
1081      deleteExpando = jQuery.support.deleteExpando;
1082
1083        for (var i = 0, elem; (elem = elems[i]) != null; i++) {
1084            if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) {
1085                continue;
1086            }
1087
1088            id = elem[jQuery.expando];
1089
1090            if (id) {
1091                data = cache[id] && cache[id][internalKey];
1092
1093                if (data && data.events) {
1094                    for (var type in data.events) {
1095                        if (special[type]) {
1096                            jQuery.event.remove(elem, type);
1097
1098                            // This is a shortcut to avoid jQuery.event.remove's overhead
1099                        } else {
1100                            jQuery.removeEvent(elem, type, data.handle);
1101                        }
1102                    }
1103
1104                    // Null the DOM reference to avoid IE6/7/8 leak (#7054)
1105                    if (data.handle) {
1106                        data.handle.elem = null;
1107                    }
1108                }
1109
1110                if (deleteExpando) {
1111                    delete elem[jQuery.expando];
1112
1113                } else if (elem.removeAttribute) {
1114                    elem.removeAttribute(jQuery.expando);
1115                }
1116
1117                delete cache[id];
1118            }
1119        }
1120    };
1121    jQuery.clone = function (elem, dataAndEvents, deepDataAndEvents) {
1122
1123        var clone = elem.cloneNode(true),
1124        srcElements,
1125        destElements,
1126        i;
1127
1128        if ((!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
1129        (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
1130            // IE copies events bound via attachEvent when using cloneNode.
1131            // Calling detachEvent on the clone will also remove the events
1132            // from the original. In order to get around this, we use some
1133            // proprietary methods to clear the events. Thanks to MooTools
1134            // guys for this hotness.
1135
1136            cloneFixAttributes(elem, clone);
1137
1138            // Using Sizzle here is crazy slow, so we use getElementsByTagName
1139            // instead
1140            srcElements = getAll(elem);
1141            destElements = getAll(clone);
1142
1143            // Weird iteration because IE will replace the length property
1144            // with an element if you are cloning the body and one of the
1145            // elements on the page has a name or id of "length"
1146            for (i = 0; srcElements[i]; ++i) {
1147                cloneFixAttributes(srcElements[i], destElements[i]);
1148            }
1149        }
1150
1151        // Copy the events from the original to the clone
1152        if (dataAndEvents) {
1153            cloneCopyEvent(elem, clone);
1154
1155            if (deepDataAndEvents) {
1156                srcElements = getAll(elem);
1157                destElements = getAll(clone);
1158
1159                for (i = 0; srcElements[i]; ++i) {
1160                    cloneCopyEvent(srcElements[i], destElements[i]);
1161                }
1162            }
1163        }
1164
1165        // Return the cloned set
1166        return clone;
1167    };
1168    jQuery.contains = function (a, b) {
1169        /// <summary>
1170        ///     Check to see if a DOM node is within another DOM node.
1171        /// </summary>
1172        /// <param name="a" domElement="true">
1173        ///     The DOM element that may contain the other element.
1174        /// </param>
1175        /// <param name="b" domElement="true">
1176        ///     The DOM node that may be contained by the other element.
1177        /// </param>
1178        /// <returns type="Boolean" />
1179
1180        return a !== b && (a.contains ? a.contains(b) : true);
1181    };
1182    jQuery.css = function (elem, name, extra) {
1183
1184        // Make sure that we're working with the right name
1185        var ret, origName = jQuery.camelCase(name),
1186      hooks = jQuery.cssHooks[origName];
1187
1188        name = jQuery.cssProps[origName] || origName;
1189
1190        // If a hook was provided get the computed value from there
1191        if (hooks && "get" in hooks && (ret = hooks.get(elem, true, extra)) !== undefined) {
1192            return ret;
1193
1194            // Otherwise, if a way to get the computed value exists, use that
1195        } else if (curCSS) {
1196            return curCSS(elem, name, origName);
1197        }
1198    };
1199    jQuery.cssHooks = { "opacity": {},
1200        "height": {},
1201        "width": {}
1202    };
1203    jQuery.cssNumber = { "zIndex": true,
1204        "fontWeight": true,
1205        "opacity": true,
1206        "zoom": true,
1207        "lineHeight": true
1208    };
1209    jQuery.cssProps = { "float": 'cssFloat' };
1210    jQuery.curCSS = function (elem, name, extra) {
1211
1212        // Make sure that we're working with the right name
1213        var ret, origName = jQuery.camelCase(name),
1214      hooks = jQuery.cssHooks[origName];
1215
1216        name = jQuery.cssProps[origName] || origName;
1217
1218        // If a hook was provided get the computed value from there
1219        if (hooks && "get" in hooks && (ret = hooks.get(elem, true, extra)) !== undefined) {
1220            return ret;
1221
1222            // Otherwise, if a way to get the computed value exists, use that
1223        } else if (curCSS) {
1224            return curCSS(elem, name, origName);
1225        }
1226    };
1227    jQuery.data = function (elem, name, data, pvt /* Internal Use Only */) {
1228        /// <summary>
1229        ///     1: Store arbitrary data associated with the specified element.
1230        ///     &#10;    1.1 - jQuery.data(element, key, value)
1231        ///     &#10;2: Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
1232        ///     &#10;    2.1 - jQuery.data(element, key)
1233        ///     &#10;    2.2 - jQuery.data(element)
1234        /// </summary>
1235        /// <param name="elem" domElement="true">
1236        ///     The DOM element to associate with the data.
1237        /// </param>
1238        /// <param name="name" type="String">
1239        ///     A string naming the piece of data to set.
1240        /// </param>
1241        /// <param name="data" type="Object">
1242        ///     The new data value.
1243        /// </param>
1244        /// <returns type="jQuery" />
1245
1246        if (!jQuery.acceptData(elem)) {
1247            return;
1248        }
1249
1250        var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
1251
1252        // We have to handle DOM nodes and JS objects differently because IE6-7
1253        // can't GC object references properly across the DOM-JS boundary
1254      isNode = elem.nodeType,
1255
1256        // Only DOM nodes need the global jQuery cache; JS object data is
1257        // attached directly to the object so GC can occur automatically
1258      cache = isNode ? jQuery.cache : elem,
1259
1260        // Only defining an ID for JS objects if its cache already exists allows
1261        // the code to shortcut on the same path as a DOM node with no cache
1262      id = isNode ? elem[jQuery.expando] : elem[jQuery.expando] && jQuery.expando;
1263
1264        // Avoid doing any more work than we need to when trying to get data on an
1265        // object that has no data at all
1266        if ((!id || (pvt && id && !cache[id][internalKey])) && getByName && data === undefined) {
1267            return;
1268        }
1269
1270        if (!id) {
1271            // Only DOM nodes need a new unique ID for each element since their data
1272            // ends up in the global cache
1273            if (isNode) {
1274                elem[jQuery.expando] = id = ++jQuery.uuid;
1275            } else {
1276                id = jQuery.expando;
1277            }
1278        }
1279
1280        if (!cache[id]) {
1281            cache[id] = {};
1282
1283            // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1284            // metadata on plain JS objects when the object is serialized using
1285            // JSON.stringify
1286            if (!isNode) {
1287                cache[id].toJSON = jQuery.noop;
1288            }
1289        }
1290
1291        // An object can be passed to jQuery.data instead of a key/value pair; this gets
1292        // shallow copied over onto the existing cache
1293        if (typeof name === "object" || typeof name === "function") {
1294            if (pvt) {
1295                cache[id][internalKey] = jQuery.extend(cache[id][internalKey], name);
1296            } else {
1297                cache[id] = jQuery.extend(cache[id], name);
1298            }
1299        }
1300
1301        thisCache = cache[id];
1302
1303        // Internal jQuery data is stored in a separate object inside the object's data
1304        // cache in order to avoid key collisions between internal data and user-defined
1305        // data
1306        if (pvt) {
1307            if (!thisCache[internalKey]) {
1308                thisCache[internalKey] = {};
1309            }
1310
1311            thisCache = thisCache[internalKey];
1312        }
1313
1314        if (data !== undefined) {
1315            thisCache[name] = data;
1316        }
1317
1318        // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
1319        // not attempt to inspect the internal events object using jQuery.data, as this
1320        // internal data object is undocumented and subject to change.
1321        if (name === "events" && !thisCache[name]) {
1322            return thisCache[internalKey] && thisCache[internalKey].events;
1323        }
1324
1325        return getByName ? thisCache[name] : thisCache;
1326    };
1327    jQuery.dequeue = function (elem, type) {
1328        /// <summary>
1329        ///     Execute the next function on the queue for the matched element.
1330        /// </summary>
1331        /// <param name="elem" domElement="true">
1332        ///     A DOM element from which to remove and execute a queued function.
1333        /// </param>
1334        /// <param name="type" type="String">
1335        ///     A string containing the name of the queue. Defaults to fx, the standard effects queue.
1336        /// </param>
1337        /// <returns type="jQuery" />
1338
1339        type = type || "fx";
1340
1341        var queue = jQuery.queue(elem, type),
1342      fn = queue.shift();
1343
1344        // If the fx queue is dequeued, always remove the progress sentinel
1345        if (fn === "inprogress") {
1346            fn = queue.shift();
1347        }
1348
1349        if (fn) {
1350            // Add a progress sentinel to prevent the fx queue from being
1351            // automatically dequeued
1352            if (type === "fx") {
1353                queue.unshift("inprogress");
1354            }
1355
1356            fn.call(elem, function () {
1357                jQuery.dequeue(elem, type);
1358            });
1359        }
1360
1361        if (!queue.length) {
1362            jQuery.removeData(elem, type + "queue", true);
1363        }
1364    };
1365    jQuery.dir = function (elem, dir, until) {
1366
1367        var matched = [],
1368      cur = elem[dir];
1369
1370        while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) {
1371            if (cur.nodeType === 1) {
1372                matched.push(cur);
1373            }
1374            cur = cur[dir];
1375        }
1376        return matched;
1377    };
1378    jQuery.each = function (object, callback, args) {
1379        /// <summary>
1380        ///     A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
1381        /// </summary>
1382        /// <param name="object" type="Object">
1383        ///     The object or array to iterate over.
1384        /// </param>
1385        /// <param name="callback" type="Function">
1386        ///     The function that will be executed on every object.
1387        /// </param>
1388        /// <returns type="Object" />
1389
1390        var name, i = 0,
1391      length = object.length,
1392      isObj = length === undefined || jQuery.isFunction(object);
1393
1394        if (args) {
1395            if (isObj) {
1396                for (name in object) {
1397                    if (callback.apply(object[name], args) === false) {
1398                        break;
1399                    }
1400                }
1401            } else {
1402                for (; i < length; ) {
1403                    if (callback.apply(object[i++], args) === false) {
1404                        break;
1405                    }
1406                }
1407            }
1408
1409            // A special, fast, case for the most common use of each
1410        } else {
1411            if (isObj) {
1412                for (name in object) {
1413                    if (callback.call(object[name], name, object[name]) === false) {
1414                        break;
1415                    }
1416                }
1417            } else {
1418                for (var value = object[0];
1419          i < length && callback.call(value, i, value) !== false; value = object[++i]) { }
1420            }
1421        }
1422
1423        return object;
1424    };
1425    jQuery.easing = {};
1426    jQuery.error = function (msg) {
1427        /// <summary>
1428        ///     Takes a string and throws an exception containing it.
1429        /// </summary>
1430        /// <param name="msg" type="String">
1431        ///     The message to send out.
1432        /// </param>
1433
1434        throw msg;
1435    };
1436    jQuery.etag = {};
1437    jQuery.event = { "global": {},
1438        "props": ['altKey', 'attrChange', 'attrName', 'bubbles', 'button', 'cancelable', 'charCode', 'clientX', 'clientY', 'ctrlKey', 'currentTarget', 'data', 'detail', 'eventPhase', 'fromElement', 'handler', 'keyCode', 'layerX', 'layerY', 'metaKey', 'newValue', 'offsetX', 'offsetY', 'pageX', 'pageY', 'prevValue', 'relatedNode', 'relatedTarget', 'screenX', 'screenY', 'shiftKey', 'srcElement', 'target', 'toElement', 'view', 'wheelDelta', 'which'],
1439        "guid": 100000000,
1440        "special": {},
1441        "triggered": false
1442    };
1443    jQuery.expr = { "order": ['ID', 'CLASS', 'NAME', 'TAG'],
1444        "match": {},
1445        "leftMatch": {},
1446        "attrMap": {},
1447        "attrHandle": {},
1448        "relative": {},
1449        "find": {},
1450        "preFilter": {},
1451        "filters": {},
1452        "setFilters": {},
1453        "filter": {},
1454        ":": {}
1455    };
1456    jQuery.extend = function () {
1457        /// <summary>
1458        ///     Merge the contents of two or more objects together into the first object.
1459        ///     &#10;1 - jQuery.extend(target, object1, objectN)
1460        ///     &#10;2 - jQuery.extend(deep, target, object1, objectN)
1461        /// </summary>
1462        /// <param name="" type="Boolean">
1463        ///     If true, the merge becomes recursive (aka. deep copy).
1464        /// </param>
1465        /// <param name="" type="Object">
1466        ///     The object to extend. It will receive the new properties.
1467        /// </param>
1468        /// <param name="" type="Object">
1469        ///     An object containing additional properties to merge in.
1470        /// </param>
1471        /// <param name="" type="Object">
1472        ///     Additional objects containing properties to merge in.
1473        /// </param>
1474        /// <returns type="Object" />
1475
1476        var options, name, src, copy, copyIsArray, clone,
1477    target = arguments[0] || {},
1478    i = 1,
1479    length = arguments.length,
1480    deep = false;
1481
1482        // Handle a deep copy situation
1483        if (typeof target === "boolean") {
1484            deep = target;
1485            target = arguments[1] || {};
1486            // skip the boolean and the target
1487            i = 2;
1488        }
1489
1490        // Handle case when target is a string or something (possible in deep copy)
1491        if (typeof target !== "object" && !jQuery.isFunction(target)) {
1492            target = {};
1493        }
1494
1495        // extend jQuery itself if only one argument is passed
1496        if (length === i) {
1497            target = this;
1498            --i;
1499        }
1500
1501        for (; i < length; i++) {
1502            // Only deal with non-null/undefined values
1503            if ((options = arguments[i]) != null) {
1504                // Extend the base object
1505                for (name in options) {
1506                    src = target[name];
1507                    copy = options[name];
1508
1509                    // Prevent never-ending loop
1510                    if (target === copy) {
1511                        continue;
1512                    }
1513
1514                    // Recurse if we're merging plain objects or arrays
1515                    if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {
1516                        if (copyIsArray) {
1517                            copyIsArray = false;
1518                            clone = src && jQuery.isArray(src) ? src : [];
1519
1520                        } else {
1521                            clone = src && jQuery.isPlainObject(src) ? src : {};
1522                        }
1523
1524                        // Never move original objects, clone them
1525                        target[name] = jQuery.extend(deep, clone, copy);
1526
1527                        // Don't bring in undefined values
1528                    } else if (copy !== undefined) {
1529                        target[name] = copy;
1530                    }
1531                }
1532            }
1533        }
1534
1535        // Return the modified object
1536        return target;
1537    };
1538    jQuery.filter = function (expr, elems, not) {
1539
1540        if (not) {
1541            expr = ":not(" + expr + ")";
1542        }
1543
1544        return elems.length === 1 ?
1545      jQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [] :
1546      jQuery.find.matches(expr, elems);
1547    };
1548    jQuery.find = function (query, context, extra, seed) {
1549
1550        context = context || document;
1551
1552        // Only use querySelectorAll on non-XML documents
1553        // (ID selectors don't work in non-HTML documents)
1554        if (!seed && !Sizzle.isXML(context)) {
1555            // See if we find a selector to speed up
1556            var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query);
1557
1558            if (match && (context.nodeType === 1 || context.nodeType === 9)) {
1559                // Speed-up: Sizzle("TAG")
1560                if (match[1]) {
1561                    return makeArray(context.getElementsByTagName(query), extra);
1562
1563                    // Speed-up: Sizzle(".CLASS")
1564                } else if (match[2] && Expr.find.CLASS && context.getElementsByClassName) {
1565                    return makeArray(context.getElementsByClassName(match[2]), extra);
1566                }
1567            }
1568
1569            if (context.nodeType === 9) {
1570                // Speed-up: Sizzle("body")
1571                // The body element only exists once, optimize finding it
1572                if (query === "body" && context.body) {
1573                    return makeArray([context.body], extra);
1574
1575                    // Speed-up: Sizzle("#ID")
1576                } else if (match && match[3]) {
1577                    var elem = context.getElementById(match[3]);
1578
1579                    // Check parentNode to catch when Blackberry 4.6 returns
1580                    // nodes that are no longer in the document #6963
1581                    if (elem && elem.parentNode) {
1582                        // Handle the case where IE and Opera return items
1583                        // by name instead of ID
1584                        if (elem.id === match[3]) {
1585                            return makeArray([elem], extra);
1586                        }
1587
1588                    } else {
1589                        return makeArray([], extra);
1590                    }
1591                }
1592
1593                try {
1594                    return makeArray(context.querySelectorAll(query), extra);
1595                } catch (qsaError) { }
1596
1597                // qSA works strangely on Element-rooted queries
1598                // We can work around this by specifying an extra ID on the root
1599                // and working up from there (Thanks to Andrew Dupont for the technique)
1600                // IE 8 doesn't work on object elements
1601            } else if (context.nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
1602                var oldContext = context,
1603            old = context.getAttribute("id"),
1604            nid = old || id,
1605            hasParent = context.parentNode,
1606            relativeHierarchySelector = /^\s*[+~]/.test(query);
1607
1608                if (!old) {
1609                    context.setAttribute("id", nid);
1610                } else {
1611                    nid = nid.replace(/'/g, "\\$&");
1612                }
1613                if (relativeHierarchySelector && hasParent) {
1614                    context = context.parentNode;
1615                }
1616
1617                try {
1618                    if (!relativeHierarchySelector || hasParent) {
1619                        return makeArray(context.querySelectorAll("[id='" + nid + "'] " + query), extra);
1620                    }
1621
1622                } catch (pseudoError) {
1623                } finally {
1624                    if (!old) {
1625                        oldContext.removeAttribute("id");
1626                    }
1627                }
1628            }
1629        }
1630
1631        return oldSizzle(query, context, extra, seed);
1632    };
1633    jQuery.fn = { "selector": '',
1634        "jquery": '1.5.1',
1635        "length": 0
1636    };
1637    jQuery.fragments = {};
1638    jQuery.fx = function (elem, options, prop) {
1639
1640        this.options = options;
1641        this.elem = elem;
1642        this.prop = prop;
1643
1644        if (!options.orig) {
1645            options.orig = {};
1646        }
1647    };
1648    jQuery.get = function (url, data, callback, type) {
1649        /// <summary>
1650        ///     Load data from the server using a HTTP GET request.
1651        /// </summary>
1652        /// <param name="url" type="String">
1653        ///     A string containing the URL to which the request is sent.
1654        /// </param>
1655        /// <param name="data" type="String">
1656        ///     A map or string that is sent to the server with the request.
1657        /// </param>
1658        /// <param name="callback" type="Function">
1659        ///     A callback function that is executed if the request succeeds.
1660        /// </param>
1661        /// <param name="type" type="String">
1662        ///     The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
1663        /// </param>
1664
1665        // shift arguments if data argument was omitted
1666        if (jQuery.isFunction(data)) {
1667            type = type || callback;
1668            callback = data;
1669            data = undefined;
1670        }
1671
1672        return jQuery.ajax({
1673            type: method,
1674            url: url,
1675            data: data,
1676            success: callback,
1677            dataType: type
1678        });
1679    };
1680    jQuery.getJSON = function (url, data, callback) {
1681        /// <summary>
1682        ///     Load JSON-encoded data from the server using a GET HTTP request.
1683        /// </summary>
1684        /// <param name="url" type="String">
1685        ///     A string containing the URL to which the request is sent.
1686        /// </param>
1687        /// <param name="data" type="Object">
1688        ///     A map or string that is sent to the server with the request.
1689        /// </param>
1690        /// <param name="callback" type="Function">
1691        ///     A callback function that is executed if the request succeeds.
1692        /// </param>
1693
1694        return jQuery.get(url, data, callback, "json");
1695    };
1696    jQuery.getScript = function (url, callback) {
1697        /// <summary>
1698        ///     Load a JavaScript file from the server using a GET HTTP request, then execute it.
1699        /// </summary>
1700        /// <param name="url" type="String">
1701        ///     A string containing the URL to which the request is sent.
1702        /// </param>
1703        /// <param name="callback" type="Function">
1704        ///     A callback function that is executed if the request succeeds.
1705        /// </param>
1706        /// <returns type="XMLHttpRequest" />
1707
1708        return jQuery.get(url, undefined, callback, "script");
1709    };
1710    jQuery.globalEval = function (data) {
1711        /// <summary>
1712        ///     Execute some JavaScript code globally.
1713        /// </summary>
1714        /// <param name="data" type="String">
1715        ///     The JavaScript code to execute.
1716        /// </param>
1717
1718        if (data && rnotwhite.test(data)) {
1719            // Inspired by code by Andrea Giammarchi
1720            // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
1721            var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement,
1722        script = document.createElement("script");
1723
1724            if (jQuery.support.scriptEval()) {
1725                script.appendChild(document.createTextNode(data));
1726            } else {
1727                script.text = data;
1728            }
1729
1730            // Use insertBefore instead of appendChild to circumvent an IE6 bug.
1731            // This arises when a base node is used (#2709).
1732            head.insertBefore(script, head.firstChild);
1733            head.removeChild(script);
1734        }
1735    };
1736    jQuery.grep = function (elems, callback, inv) {
1737        /// <summary>
1738        ///     Finds the elements of an array which satisfy a filter function. The original array is not affected.
1739        /// </summary>
1740        /// <param name="elems" type="Array">
1741        ///     The array to search through.
1742        /// </param>
1743        /// <param name="callback" type="Function">
1744        ///     The function to process each item against.  The first argument to the function is the item, and the second argument is the index.  The function should return a Boolean value.  this will be the global window object.
1745        /// </param>
1746        /// <param name="inv" type="Boolean">
1747        ///     If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true.  If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
1748        /// </param>
1749        /// <returns type="Array" />
1750
1751        var ret = [], retVal;
1752        inv = !!inv;
1753
1754        // Go through the array, only saving the items
1755        // that pass the validator function
1756        for (var i = 0, length = elems.length; i < length; i++) {
1757            retVal = !!callback(elems[i], i);
1758            if (inv !== retVal) {
1759                ret.push(elems[i]);
1760            }
1761        }
1762
1763        return ret;
1764    };
1765    jQuery.guid = 1;
1766    jQuery.hasData = function (elem) {
1767        /// <summary>
1768        ///     Determine whether an element has any jQuery data associated with it.
1769        /// </summary>
1770        /// <param name="elem" domElement="true">
1771        ///     A DOM element to be checked for data.
1772        /// </param>
1773        /// <returns type="Boolean" />
1774
1775        elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
1776
1777        return !!elem && !isEmptyDataObject(elem);
1778    };
1779    jQuery.inArray = function (elem, array) {
1780        /// <summary>
1781        ///     Search for a specified value within an array and return its index (or -1 if not found).
1782        /// </summary>
1783        /// <param name="elem" type="Object">
1784        ///     The value to search for.
1785        /// </param>
1786        /// <param name="array" type="Array">
1787        ///     An array through which to search.
1788        /// </param>
1789        /// <returns type="Number" />
1790
1791        return indexOf.call(array, elem);
1792    };
1793    jQuery.isEmptyObject = function (obj) {
1794        /// <summary>
1795        ///     Check to see if an object is empty (contains no properties).
1796        /// </summary>
1797        /// <param name="obj" type="Object">
1798        ///     The object that will be checked to see if it's empty.
1799        /// </param>
1800        /// <returns type="Boolean" />
1801
1802        for (var name in obj) {
1803            return false;
1804        }
1805        return true;
1806    };
1807    jQuery.isFunction = function (obj) {
1808        /// <summary>
1809        ///     Determine if the argument passed is a Javascript function object.
1810        /// </summary>
1811        /// <param name="obj" type="Object">
1812        ///     Object to test whether or not it is a function.
1813        /// </param>
1814        /// <returns type="boolean" />
1815
1816        return jQuery.type(obj) === "function";
1817    };
1818    jQuery.isNaN = function (obj) {
1819
1820        return obj == null || !rdigit.test(obj) || isNaN(obj);
1821    };
1822    jQuery.isPlainObject = function (obj) {
1823        /// <summary>
1824        ///     Check to see if an object is a plain object (created using "{}" or "new Object").
1825        /// </summary>
1826        /// <param name="obj" type="Object">
1827        ///     The object that will be checked to see if it's a plain object.
1828        /// </param>
1829        /// <returns type="Boolean" />
1830
1831        // Must be an Object.
1832        // Because of IE, we also have to check the presence of the constructor property.
1833        // Make sure that DOM nodes and window objects don't pass through, as well
1834        if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
1835            return false;
1836        }
1837
1838        // Not own constructor property must be Object
1839        if (obj.constructor &&
1840      !hasOwn.call(obj, "constructor") &&
1841      !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
1842            return false;
1843        }
1844
1845        // Own properties are enumerated firstly, so to speed up,
1846        // if last one is own, then all properties are own.
1847
1848        var key;
1849        for (key in obj) { }
1850
1851        return key === undefined || hasOwn.call(obj, key);
1852    };
1853    jQuery.isReady = true;
1854    jQuery.isWindow = function (obj) {
1855        /// <summary>
1856        ///     Determine whether the argument is a window.
1857        /// </summary>
1858        /// <param name="obj" type="Object">
1859        ///     Object to test whether or not it is a window.
1860        /// </param>
1861        /// <returns type="boolean" />
1862
1863        return obj && typeof obj === "object" && "setInterval" in obj;
1864    };
1865    jQuery.isXMLDoc = function (elem) {
1866        /// <summary>
1867        ///     Check to see if a DOM node is within an XML document (or is an XML document).
1868        /// </summary>
1869        /// <param name="elem" domElement="true">
1870        ///     The DOM node that will be checked to see if it's in an XML document.
1871        /// </param>
1872        /// <returns type="Boolean" />
1873
1874        // documentElement is verified for cases where it doesn't yet exist
1875        // (such as loading iframes in IE - #4833)
1876        var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
1877
1878        return documentElement ? documentElement.nodeName !== "HTML" : false;
1879    };
1880    jQuery.lastModified = {};
1881    jQuery.makeArray = function (array, results) {
1882        /// <summary>
1883        ///     Convert an array-like object into a true JavaScript array.
1884        /// </summary>
1885        /// <param name="array" type="Object">
1886        ///     Any object to turn into a native Array.
1887        /// </param>
1888        /// <returns type="Array" />
1889
1890        var ret = results || [];
1891
1892        if (array != null) {
1893            // The window, strings (and functions) also have 'length'
1894            // The extra typeof function check is to prevent crashes
1895            // in Safari 2 (See: #3039)
1896            // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
1897            var type = jQuery.type(array);
1898
1899            if (array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow(array)) {
1900                push.call(ret, array);
1901            } else {
1902                jQuery.merge(ret, array);
1903            }
1904        }
1905
1906        return ret;
1907    };
1908    jQuery.map = function (elems, callback, arg) {
1909        /// <summary>
1910        ///     Translate all items in an array or array-like object to another array of items.
1911        /// </summary>
1912        /// <param name="elems" type="Array">
1913        ///     The Array to translate.
1914        /// </param>
1915        /// <param name="callback" type="Function">
1916        ///     The function to process each item against.  The first argument to the function is the list item, the second argument is the index in array The function can return any value.  this will be the global window object.
1917        /// </param>
1918        /// <returns type="Array" />
1919
1920        var ret = [], value;
1921
1922        // Go through the array, translating each of the items to their
1923        // new value (or values).
1924        for (var i = 0, length = elems.length; i < length; i++) {
1925            value = callback(elems[i], i, arg);
1926
1927            if (value != null) {
1928                ret[ret.length] = value;
1929            }
1930        }
1931
1932        // Flatten any nested arrays
1933        return ret.concat.apply([], ret);
1934    };
1935    jQuery.merge = function (first, second) {
1936        /// <summary>
1937        ///     Merge the contents of two arrays together into the first array.
1938        /// </summary>
1939        /// <param name="first" type="Array">
1940        ///     The first array to merge, the elements of second added.
1941        /// </param>
1942        /// <param name="second" type="Array">
1943        ///     The second array to merge into the first, unaltered.
1944        /// </param>
1945        /// <returns type="Array" />
1946
1947        var i = first.length,
1948      j = 0;
1949
1950        if (typeof second.length === "number") {
1951            for (var l = second.length; j < l; j++) {
1952                first[i++] = second[j];
1953            }
1954
1955        } else {
1956            while (second[j] !== undefined) {
1957                first[i++] = second[j++];
1958            }
1959        }
1960
1961        first.length = i;
1962
1963        return first;
1964    };
1965    jQuery.noConflict = function (deep) {
1966        /// <summary>
1967        ///     Relinquish jQuery's control of the $ variable.
1968        /// </summary>
1969        /// <param name="deep" type="Boolean">
1970        ///     A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
1971        /// </param>
1972        /// <returns type="Object" />
1973
1974        window.$ = _$;
1975
1976        if (deep) {
1977            window.jQuery = _jQuery;
1978        }
1979
1980        return jQuery;
1981    };
1982    jQuery.noData = { "embed": true,
1983        "object": 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
1984        "applet": true
1985    };
1986    jQuery.nodeName = function (elem, name) {
1987
1988        return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
1989    };
1990    jQuery.noop = function () {
1991        /// <summary>
1992        ///     An empty function.
1993        /// </summary>
1994        /// <returns type="Function" />
1995    };
1996    jQuery.now = function () {
1997        /// <summary>
1998        ///     Return a number representing the current time.
1999        /// </summary>
2000        /// <returns type="Number" />
2001
2002        return (new Date()).getTime();
2003    };
2004    jQuery.nth = function (cur, result, dir, elem) {
2005
2006        result = result || 1;
2007        var num = 0;
2008
2009        for (; cur; cur = cur[dir]) {
2010            if (cur.nodeType === 1 && ++num === result) {
2011                break;
2012            }
2013        }
2014
2015        return cur;
2016    };
2017    jQuery.offset = {};
2018    jQuery.param = function (a, traditional) {
2019        /// <summary>
2020        ///     Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
2021        ///     &#10;1 - jQuery.param(obj)
2022        ///     &#10;2 - jQuery.param(obj, traditional)
2023        /// </summary>
2024        /// <param name="a" type="Object">
2025        ///     An array or object to serialize.
2026        /// </param>
2027        /// <param name="traditional" type="Boolean">
2028        ///     A Boolean indicating whether to perform a traditional "shallow" serialization.
2029        /// </param>
2030        /// <returns type="String" />
2031
2032        var s = [],
2033      add = function (key, value) {
2034          // If value is a function, invoke it and return its value
2035          value = jQuery.isFunction(value) ? value() : value;
2036          s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
2037      };
2038
2039        // Set traditional to true for jQuery <= 1.3.2 behavior.
2040        if (traditional === undefined) {
2041            traditional = jQuery.ajaxSettings.traditional;
2042        }
2043
2044        // If an array was passed in, assume that it is an array of form elements.
2045        if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
2046            // Serialize the form elements
2047            jQuery.each(a, function () {
2048                add(this.name, this.value);
2049            });
2050
2051        } else {
2052            // If traditional, encode the "old" way (the way 1.3.2 or older
2053            // did it), otherwise encode params recursively.
2054            for (var prefix in a) {
2055                buildParams(prefix, a[prefix], traditional, add);
2056            }
2057        }
2058
2059        // Return the resulting serialization
2060        return s.join("&").replace(r20, "+");
2061    };
2062    jQuery.parseJSON = function (data) {
2063        /// <summary>
2064        ///     Takes a well-formed JSON string and returns the resulting JavaScript object.
2065        /// </summary>
2066        /// <param name="data" type="String">
2067        ///     The JSON string to parse.
2068        /// </param>
2069        /// <returns type="Object" />
2070
2071        if (typeof data !== "string" || !data) {
2072            return null;
2073        }
2074
2075        // Make sure leading/trailing whitespace is removed (IE can't handle it)
2076        data = jQuery.trim(data);
2077
2078        // Make sure the incoming data is actual JSON
2079        // Logic borrowed from http://json.org/json2.js
2080        if (rvalidchars.test(data.replace(rvalidescape, "@")
2081      .replace(rvalidtokens, "]")
2082      .replace(rvalidbraces, ""))) {
2083
2084            // Try to use the native JSON parser first
2085            return window.JSON && window.JSON.parse ?
2086        window.JSON.parse(data) :
2087        (new Function("return " + data))();
2088
2089        } else {
2090            jQuery.error("Invalid JSON: " + data);
2091        }
2092    };
2093    jQuery.parseXML = function (data, xml, tmp) {
2094        /// <summary>
2095        ///     Parses a string into an XML document.
2096        /// </summary>
2097        /// <param name="data" type="String">
2098        ///     a well-formed XML string to be parsed
2099        /// </param>
2100        /// <returns type="XMLDocument" />
2101
2102
2103        if (window.DOMParser) { // Standard
2104            tmp = new DOMParser();
2105            xml = tmp.parseFromString(data, "text/xml");
2106        } else { // IE
2107            xml = new ActiveXObject("Microsoft.XMLDOM");
2108            xml.async = "false";
2109            xml.loadXML(data);
2110        }
2111
2112        tmp = xml.documentElement;
2113
2114        if (!tmp || !tmp.nodeName || tmp.nodeName === "parsererror") {
2115            jQuery.error("Invalid XML: " + data);
2116        }
2117
2118        return xml;
2119    };
2120    jQuery.post = function (url, data, callback, type) {
2121        /// <summary>
2122        ///     Load data from the server using a HTTP POST request.
2123        /// </summary>
2124        /// <param name="url" type="String">
2125        ///     A string containing the URL to which the request is sent.
2126        /// </param>
2127        /// <param name="data" type="String">
2128        ///     A map or string that is sent to the server with the request.
2129        /// </param>
2130        /// <param name="callback" type="Function">
2131        ///     A callback function that is executed if the request succeeds.
2132        /// </param>
2133        /// <param name="type" type="String">
2134        ///     The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
2135        /// </param>
2136
2137        // shift arguments if data argument was omitted
2138        if (jQuery.isFunction(data)) {
2139            type = type || callback;
2140            callback = data;
2141            data = undefined;
2142        }
2143
2144        return jQuery.ajax({
2145            type: method,
2146            url: url,
2147            data: data,
2148            success: callback,
2149            dataType: type
2150        });
2151    };
2152    jQuery.props = { "for": 'htmlFor',
2153        "class": 'className',
2154        "readonly": 'readOnly',
2155        "maxlength": 'maxLength',
2156        "cellspacing": 'cellSpacing',
2157        "rowspan": 'rowSpan',
2158        "colspan": 'colSpan',
2159        "tabindex": 'tabIndex',
2160        "usemap": 'useMap',
2161        "frameborder": 'frameBorder'
2162    };
2163    jQuery.proxy = function (fn, proxy, thisObject) {
2164        /// <summary>
2165        ///     Takes a function and returns a new one that will always have a particular context.
2166        ///     &#10;1 - jQuery.proxy(function, context)
2167        ///     &#10;2 - jQuery.proxy(context, name)
2168        /// </summary>
2169        /// <param name="fn" type="Function">
2170        ///     The function whose context will be changed.
2171        /// </param>
2172        /// <param name="proxy" type="Object">
2173        ///     The object to which the context (`this`) of the function should be set.
2174        /// </param>
2175        /// <returns type="Function" />
2176
2177        if (arguments.length === 2) {
2178            if (typeof proxy === "string") {
2179                thisObject = fn;
2180                fn = thisObject[proxy];
2181                proxy = undefined;
2182
2183            } else if (proxy && !jQuery.isFunction(proxy)) {
2184                thisObject = proxy;
2185                proxy = undefined;
2186            }
2187        }
2188
2189        if (!proxy && fn) {
2190            proxy = function () {
2191                return fn.apply(thisObject || this, arguments);
2192            };
2193        }
2194
2195        // Set the guid of unique handler to the same of original handler, so it can be removed
2196        if (fn) {
2197            proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
2198        }
2199
2200        // So proxy can be declared as an argument
2201        return proxy;
2202    };
2203    jQuery.queue = function (elem, type, data) {
2204        /// <summary>
2205        ///     1: Show the queue of functions to be executed on the matched element.
2206        ///     &#10;    1.1 - jQuery.queue(element, queueName)
2207        ///     &#10;2: Manipulate the queue of functions to be executed on the matched element.
2208        ///     &#10;    2.1 - jQuery.queue(element, queueName, newQueue)
2209        ///     &#10;    2.2 - jQuery.queue(element, queueName, callback())
2210        /// </summary>
2211        /// <param name="elem" domElement="true">
2212        ///     A DOM element where the array of queued functions is attached.
2213        /// </param>
2214        /// <param name="type" type="String">
2215        ///     A string containing the name of the queue. Defaults to fx, the standard effects queue.
2216        /// </param>
2217        /// <param name="data" type="Array">
2218        ///     An array of functions to replace the current queue contents.
2219        /// </param>
2220        /// <returns type="jQuery" />
2221
2222        if (!elem) {
2223            return;
2224        }
2225
2226        type = (type || "fx") + "queue";
2227        var q = jQuery._data(elem, type);
2228
2229        // Speed up dequeue by getting out quickly if this is just a lookup
2230        if (!data) {
2231            return q || [];
2232        }
2233
2234        if (!q || jQuery.isArray(data)) {
2235            q = jQuery._data(elem, type, jQuery.makeArray(data));
2236
2237        } else {
2238            q.push(data);
2239        }
2240
2241        return q;
2242    };
2243    jQuery.ready = function (wait) {
2244
2245        // A third-party is pushing the ready event forwards
2246        if (wait === true) {
2247            jQuery.readyWait--;
2248        }
2249
2250        // Make sure that the DOM is not already loaded
2251        if (!jQuery.readyWait || (wait !== true && !jQuery.isReady)) {
2252            // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
2253            if (!document.body) {
2254                return setTimeout(jQuery.ready, 1);
2255            }
2256
2257            // Remember that the DOM is ready
2258            jQuery.isReady = true;
2259
2260            // If a normal DOM Ready event fired, decrement, and wait if need be
2261            if (wait !== true && --jQuery.readyWait > 0) {
2262                return;
2263            }
2264
2265            // If there are functions bound, to execute
2266            readyList.resolveWith(document, [jQuery]);
2267
2268            // Trigger any bound ready events
2269            if (jQuery.fn.trigger) {
2270                jQuery(document).trigger("ready").unbind("ready");
2271            }
2272        }
2273    };
2274    jQuery.readyWait = 0;
2275    jQuery.removeData = function (elem, name, pvt /* Internal Use Only */) {
2276        /// <summary>
2277        ///     Remove a previously-stored piece of data.
2278        /// </summary>
2279        /// <param name="elem" domElement="true">
2280        ///     A DOM element from which to remove data.
2281        /// </param>
2282        /// <param name="name" type="String">
2283        ///     A string naming the piece of data to remove.
2284        /// </param>
2285        /// <returns type="jQuery" />
2286
2287        if (!jQuery.acceptData(elem)) {
2288            return;
2289        }
2290
2291        var internalKey = jQuery.expando, isNode = elem.nodeType,
2292
2293        // See jQuery.data for more information
2294      cache = isNode ? jQuery.cache : elem,
2295
2296        // See jQuery.data for more information
2297      id = isNode ? elem[jQuery.expando] : jQuery.expando;
2298
2299        // If there is already no cache entry for this object, there is no
2300        // purpose in continuing
2301        if (!cache[id]) {
2302            return;
2303        }
2304
2305        if (name) {
2306            var thisCache = pvt ? cache[id][internalKey] : cache[id];
2307
2308            if (thisCache) {
2309                delete thisCache[name];
2310
2311                // If there is no data left in the cache, we want to continue
2312                // and let the cache object itself get destroyed
2313                if (!isEmptyDataObject(thisCache)) {
2314                    return;
2315                }
2316            }
2317        }
2318
2319        // See jQuery.data for more information
2320        if (pvt) {
2321            delete cache[id][internalKey];
2322
2323            // Don't destroy the parent cache unless the internal data object
2324            // had been the only thing left in it
2325            if (!isEmptyDataObject(cache[id])) {
2326                return;
2327            }
2328        }
2329
2330        var internalCache = cache[id][internalKey];
2331
2332        // Browsers that fail expando deletion also refuse to delete expandos on
2333        // the window, but it will allow it on all other JS objects; other browsers
2334        // don't care
2335        if (jQuery.support.deleteExpando || cache != window) {
2336            delete cache[id];
2337        } else {
2338            cache[id] = null;
2339        }
2340
2341        // We destroyed the entire user cache at once because it's faster than
2342        // iterating through each key, but we need to continue to persist internal
2343        // data if it existed
2344        if (internalCache) {
2345            cache[id] = {};
2346            // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
2347            // metadata on plain JS objects when the object is serialized using
2348            // JSON.stringify
2349            if (!isNode) {
2350                cache[id].toJSON = jQuery.noop;
2351            }
2352
2353            cache[id][internalKey] = internalCache;
2354
2355            // Otherwise, we need to eliminate the expando on the node to avoid
2356            // false lookups in the cache for entries that no longer exist
2357        } else if (isNode) {
2358            // IE does not allow us to delete expando properties from nodes,
2359            // nor does it have a removeAttribute function on Document nodes;
2360            // we must handle all of these cases
2361            if (jQuery.support.deleteExpando) {
2362                delete elem[jQuery.expando];
2363            } else if (elem.removeAttribute) {
2364                elem.removeAttribute(jQuery.expando);
2365            } else {
2366                elem[jQuery.expando] = null;
2367            }
2368        }
2369    };
2370    jQuery.removeEvent = function (elem, type, handle) {
2371
2372        if (elem.removeEventListener) {
2373            elem.removeEventListener(type, handle, false);
2374        }
2375    };
2376    jQuery.sibling = function (n, elem) {
2377
2378        var r = [];
2379
2380        for (; n; n = n.nextSibling) {
2381            if (n.nodeType === 1 && n !== elem) {
2382                r.push(n);
2383            }
2384        }
2385
2386        return r;
2387    };
2388    jQuery.speed = function (speed, easing, fn) {
2389
2390        var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
2391            complete: fn || !fn && easing ||
2392        jQuery.isFunction(speed) && speed,
2393            duration: speed,
2394            easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
2395        };
2396
2397        opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
2398      opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
2399
2400        // Queueing
2401        opt.old = opt.complete;
2402        opt.complete = function () {
2403            if (opt.queue !== false) {
2404                jQuery(this).dequeue();
2405            }
2406            if (jQuery.isFunction(opt.old)) {
2407                opt.old.call(this);
2408            }
2409        };
2410
2411        return opt;
2412    };
2413    jQuery.style = function (elem, name, value, extra) {
2414
2415        // Don't set styles on text and comment nodes
2416        if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
2417            return;
2418        }
2419
2420        // Make sure that we're working with the right name
2421        var ret, origName = jQuery.camelCase(name),
2422      style = elem.style, hooks = jQuery.cssHooks[origName];
2423
2424        name = jQuery.cssProps[origName] || origName;
2425
2426        // Check if we're setting a value
2427        if (value !== undefined) {
2428            // Make sure that NaN and null values aren't set. See: #7116
2429            if (typeof value === "number" && isNaN(value) || value == null) {
2430                return;
2431            }
2432
2433            // If a number was passed in, add 'px' to the (except for certain CSS properties)
2434            if (typeof value === "number" && !jQuery.cssNumber[origName]) {
2435                value += "px";
2436            }
2437
2438            // If a hook was provided, use that value, otherwise just set the specified value
2439            if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value)) !== undefined) {
2440                // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
2441                // Fixes bug #5509
2442                try {
2443                    style[name] = value;
2444                } catch (e) { }
2445            }
2446
2447        } else {
2448            // If a hook was provided get the non-computed value from there
2449            if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
2450                return ret;
2451            }
2452
2453            // Otherwise just get the value from the style object
2454            return style[name];
2455        }
2456    };
2457    jQuery.sub = function () {
2458        /// <summary>
2459        ///     Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.
2460        /// </summary>
2461        /// <returns type="jQuery" />
2462
2463        function jQuerySubclass(selector, context) {
2464            return new jQuerySubclass.fn.init(selector, context);
2465        }
2466        jQuery.extend(true, jQuerySubclass, this);
2467        jQuerySubclass.superclass = this;
2468        jQuerySubclass.fn = jQuerySubclass.prototype = this();
2469        jQuerySubclass.fn.constructor = jQuerySubclass;
2470        jQuerySubclass.subclass = this.subclass;
2471        jQuerySubclass.fn.init = function init(selector, context) {
2472            if (context && context instanceof jQuery && !(context instanceof jQuerySubclass)) {
2473                context = jQuerySubclass(context);
2474            }
2475
2476            return jQuery.fn.init.call(this, selector, context, rootjQuerySubclass);
2477        };
2478        jQuerySubclass.fn.init.prototype = jQuerySubclass.fn;
2479        var rootjQuerySubclass = jQuerySubclass(document);
2480        return jQuerySubclass;
2481    };
2482    jQuery.support = { "leadingWhitespace": true,
2483        "tbody": true,
2484        "htmlSerialize": true,
2485        "style": true,
2486        "hrefNormalized": true,
2487        "opacity": true,
2488        "cssFloat": true,
2489        "checkOn": false,
2490        "optSelected": true,
2491        "deleteExpando": true,
2492        "optDisabled": true,
2493        "checkClone": true,
2494        "noCloneEvent": true,
2495        "noCloneChecked": true,
2496        "boxModel": true,
2497        "inlineBlockNeedsLayout": false,
2498        "shrinkWrapBlocks": false,
2499        "reliableHiddenOffsets": true,
2500        "submitBubbles": true,
2501        "changeBubbles": true,
2502        "ajax": true,
2503        "cors": true
2504    };
2505    jQuery.swap = function (elem, options, callback) {
2506
2507        var old = {};
2508
2509        // Remember the old values, and insert the new ones
2510        for (var name in options) {
2511            old[name] = elem.style[name];
2512            elem.style[name] = options[name];
2513        }
2514
2515        callback.call(elem);
2516
2517        // Revert the old values
2518        for (name in options) {
2519            elem.style[name] = old[name];
2520        }
2521    };
2522    jQuery.text = function (elems) {
2523
2524        var ret = "", elem;
2525
2526        for (var i = 0; elems[i]; i++) {
2527            elem = elems[i];
2528
2529            // Get the text from text nodes and CDATA nodes
2530            if (elem.nodeType === 3 || elem.nodeType === 4) {
2531                ret += elem.nodeValue;
2532
2533                // Traverse everything else, except comment nodes
2534            } else if (elem.nodeType !== 8) {
2535                ret += Sizzle.getText(elem.childNodes);
2536            }
2537        }
2538
2539        return ret;
2540    };
2541    jQuery.trim = function (text) {
2542        /// <summary>
2543        ///     Remove the whitespace from the beginning and end of a string.
2544        /// </summary>
2545        /// <param name="text" type="String">
2546        ///     The string to trim.
2547        /// </param>
2548        /// <returns type="String" />
2549
2550        return text == null ?
2551        "" :
2552        trim.call(text);
2553    };
2554    jQuery.type = function (obj) {
2555        /// <summary>
2556        ///     Determine the internal JavaScript [[Class]] of an object.
2557        /// </summary>
2558        /// <param name="obj" type="Object">
2559        ///     Object to get the internal JavaScript [[Class]] of.
2560        /// </param>
2561        /// <returns type="String" />
2562
2563        return obj == null ?
2564      String(obj) :
2565      class2type[toString.call(obj)] || "object";
2566    };
2567    jQuery.uaMatch = function (ua) {
2568
2569        ua = ua.toLowerCase();
2570
2571        var match = rwebkit.exec(ua) ||
2572      ropera.exec(ua) ||
2573      rmsie.exec(ua) ||
2574      ua.indexOf("compatible") < 0 && rmozilla.exec(ua) ||
2575      [];
2576
2577        return { browser: match[1] || "", version: match[2] || "0" };
2578    };
2579    jQuery.unique = function (results) {
2580        /// <summary>
2581        ///     Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
2582        /// </summary>
2583        /// <param name="results" type="Array">
2584        ///     The Array of DOM elements.
2585        /// </param>
2586        /// <returns type="Array" />
2587
2588        if (sortOrder) {
2589            hasDuplicate = baseHasDuplicate;
2590            results.sort(sortOrder);
2591
2592            if (hasDuplicate) {
2593                for (var i = 1; i < results.length; i++) {
2594                    if (results[i] === results[i - 1]) {
2595                        results.splice(i--, 1);
2596                    }
2597                }
2598            }
2599        }
2600
2601        return results;
2602    };
2603    jQuery.uuid = 0;
2604    jQuery.when = function (object) {
2605        /// <summary>
2606        ///     Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
2607        /// </summary>
2608        /// <param name="object" type="Deferred">
2609        ///     One or more Deferred objects, or plain JavaScript objects.
2610        /// </param>
2611        /// <returns type="Promise" />
2612
2613        var lastIndex = arguments.length,
2614      deferred = lastIndex <= 1 && object && jQuery.isFunction(object.promise) ?
2615        object :
2616        jQuery.Deferred(),
2617      promise = deferred.promise();
2618
2619        if (lastIndex > 1) {
2620            var array = slice.call(arguments, 0),
2621        count = lastIndex,
2622        iCallback = function (index) {
2623            return function (value) {
2624                array[index] = arguments.length > 1 ? slice.call(arguments, 0) : value;
2625                if (!(--count)) {
2626                    deferred.resolveWith(promise, array);
2627                }
2628            };
2629        };
2630            while ((lastIndex--)) {
2631                object = array[lastIndex];
2632                if (object && jQuery.isFunction(object.promise)) {
2633                    object.promise().then(iCallback(lastIndex), deferred.reject);
2634                } else {
2635                    --count;
2636                }
2637            }
2638            if (!count) {
2639                deferred.resolveWith(promise, array);
2640            }
2641        } else if (deferred !== object) {
2642            deferred.resolve(object);
2643        }
2644        return promise;
2645    };
2646    jQuery.Event.prototype.isDefaultPrevented = function returnFalse() {
2647        /// <summary>
2648        ///     Returns whether event.preventDefault() was ever called on this event object.
2649        /// </summary>
2650        /// <returns type="Boolean" />
2651
2652        return false;
2653    };
2654    jQuery.Event.prototype.isImmediatePropagationStopped = function returnFalse() {
2655        /// <summary>
2656        ///     Returns whether event.stopImmediatePropagation() was ever called on this event object.
2657        /// </summary>
2658        /// <returns type="Boolean" />
2659
2660        return false;
2661    };
2662    jQuery.Event.prototype.isPropagationStopped = function returnFalse() {
2663        /// <summary>
2664        ///     Returns whether event.stopPropagation() was ever called on this event object.
2665        /// </summary>
2666        /// <returns type="Boolean" />
2667
2668        return false;
2669    };
2670    jQuery.Event.prototype.preventDefault = function () {
2671        /// <summary>
2672        ///     If this method is called, the default action of the event will not be triggered.
2673        /// </summary>
2674        /// <returns type="undefined" />
2675
2676        this.isDefaultPrevented = returnTrue;
2677
2678        var e = this.originalEvent;
2679        if (!e) {
2680            return;
2681        }
2682
2683        // if preventDefault exists run it on the original event
2684        if (e.preventDefault) {
2685            e.preventDefault();
2686
2687            // otherwise set the returnValue property of the original event to false (IE)
2688        } else {
2689            e.returnValue = false;
2690        }
2691    };
2692    jQuery.Event.prototype.stopImmediatePropagation = function () {
2693        /// <summary>
2694        ///     Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.
2695        /// </summary>
2696
2697        this.isImmediatePropagationStopped = returnTrue;
2698        this.stopPropagation();
2699    };
2700    jQuery.Event.prototype.stopPropagation = function () {
2701        /// <summary>
2702        ///     Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
2703        /// </summary>
2704
2705        this.isPropagationStopped = returnTrue;
2706
2707        var e = this.originalEvent;
2708        if (!e) {
2709            return;
2710        }
2711        // if stopPropagation exists run it on the original event
2712        if (e.stopPropagation) {
2713            e.stopPropagation();
2714        }
2715        // otherwise set the cancelBubble property of the original event to true (IE)
2716        e.cancelBubble = true;
2717    };
2718    jQuery.prototype._toggle = function (fn) {
2719
2720        // Save reference to arguments for access in closure
2721        var args = arguments,
2722      i = 1;
2723
2724        // link all the functions, so any of them can unbind this click handler
2725        while (i < args.length) {
2726            jQuery.proxy(fn, args[i++]);
2727        }
2728
2729        return this.click(jQuery.proxy(fn, function (event) {
2730            // Figure out which function to execute
2731            var lastToggle = (jQuery._data(this, "lastToggle" + fn.guid) || 0) % i;
2732            jQuery._data(this, "lastToggle" + fn.guid, lastToggle + 1);
2733
2734            // Make sure that clicks stop
2735            event.preventDefault();
2736
2737            // and execute the function
2738            return args[lastToggle].apply(this, arguments) || false;
2739        }));
2740    };
2741    jQuery.prototype.add = function (selector, context) {
2742        /// <summary>
2743        ///     Add elements to the set of matched elements.
2744        ///     &#10;1 - add(selector)
2745        ///     &#10;2 - add(elements)
2746        ///     &#10;3 - add(html)
2747        ///     &#10;4 - add(selector, context)
2748        /// </summary>
2749        /// <param name="selector" type="String">
2750        ///     A string containing a selector expression to match additional elements against.
2751        /// </param>
2752        /// <param name="context" domElement="true">
2753        ///     The point in the document at which the selector should begin matching; similar to the context argument of the $() method.
2754        /// </param>
2755        /// <returns type="jQuery" />
2756
2757        var set = typeof selector === "string" ?
2758        jQuery(selector, context) :
2759        jQuery.makeArray(selector),
2760      all = jQuery.merge(this.get(), set);
2761
2762        return this.pushStack(isDisconnected(set[0]) || isDisconnected(all[0]) ?
2763      all :
2764      jQuery.unique(all));
2765    };
2766    jQuery.prototype.addClass = function (value) {
2767        /// <summary>
2768        ///     Adds the specified class(es) to each of the set of matched elements.
2769        ///     &#10;1 - addClass(className)
2770        ///     &#10;2 - addClass(function(index, class))
2771        /// </summary>
2772        /// <param name="value" type="String">
2773        ///     One or more class names to be added to the class attribute of each matched element.
2774        /// </param>
2775        /// <returns type="jQuery" />
2776
2777        if (jQuery.isFunction(value)) {
2778            return this.each(function (i) {
2779                var self = jQuery(this);
2780                self.addClass(value.call(this, i, self.attr("class")));
2781            });
2782        }
2783
2784        if (value && typeof value === "string") {
2785            var classNames = (value || "").split(rspaces);
2786
2787            for (var i = 0, l = this.length; i < l; i++) {
2788                var elem = this[i];
2789
2790                if (elem.nodeType === 1) {
2791                    if (!elem.className) {
2792                        elem.className = value;
2793
2794                    } else {
2795                        var className = " " + elem.className + " ",
2796              setClass = elem.className;
2797
2798                        for (var c = 0, cl = classNames.length; c < cl; c++) {
2799                            if (className.indexOf(" " + classNames[c] + " ") < 0) {
2800                                setClass += " " + classNames[c];
2801                            }
2802                        }
2803                        elem.className = jQuery.trim(setClass);
2804                    }
2805                }
2806            }
2807        }
2808
2809        return this;
2810    };
2811    jQuery.prototype.after = function () {
2812        /// <summary>
2813        ///     Insert content, specified by the parameter, after each element in the set of matched elements.
2814        ///     &#10;1 - after(content, content)
2815        ///     &#10;2 - after(function(index))
2816        /// </summary>
2817        /// <param name="" type="jQuery">
2818        ///     HTML string, DOM element, or jQuery object to insert after each element in the set of matched elements.
2819        /// </param>
2820        /// <param name="" type="jQuery">
2821        ///     One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
2822        /// </param>
2823        /// <returns type="jQuery" />
2824
2825        if (this[0] && this[0].parentNode) {
2826            return this.domManip(arguments, false, function (elem) {
2827                this.parentNode.insertBefore(elem, this.nextSibling);
2828            });
2829        } else if (arguments.length) {
2830            var set = this.pushStack(this, "after", arguments);
2831            set.push.apply(set, jQuery(arguments[0]).toArray());
2832            return set;
2833        }
2834    };
2835    jQuery.prototype.ajaxComplete = function (f) {
2836        /// <summary>
2837        ///     Register a handler to be called when Ajax requests complete. This is an Ajax Event.
2838        /// </summary>
2839        /// <param name="f" type="Function">
2840        ///     The function to be invoked.
2841        /// </param>
2842        /// <returns type="jQuery" />
2843
2844        return this.bind(o, f);
2845    };
2846    jQuery.prototype.ajaxError = function (f) {
2847        /// <summary>
2848        ///     Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
2849        /// </summary>
2850        /// <param name="f" type="Function">
2851        ///     The function to be invoked.
2852        /// </param>
2853        /// <returns type="jQuery" />
2854
2855        return this.bind(o, f);
2856    };
2857    jQuery.prototype.ajaxSend = function (f) {
2858        /// <summary>
2859        ///     Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
2860        /// </summary>
2861        /// <param name="f" type="Function">
2862        ///     The function to be invoked.
2863        /// </param>
2864        /// <returns type="jQuery" />
2865
2866        return this.bind(o, f);
2867    };
2868    jQuery.prototype.ajaxStart = function (f) {
2869        /// <summary>
2870        ///     Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
2871        /// </summary>
2872        /// <param name="f" type="Function">
2873        ///     The function to be invoked.
2874        /// </param>
2875        /// <returns type="jQuery" />
2876
2877        return this.bind(o, f);
2878    };
2879    jQuery.prototype.ajaxStop = function (f) {
2880        /// <summary>
2881        ///     Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
2882        /// </summary>
2883        /// <param name="f" type="Function">
2884        ///     The function to be invoked.
2885        /// </param>
2886        /// <returns type="jQuery" />
2887
2888        return this.bind(o, f);
2889    };
2890    jQuery.prototype.ajaxSuccess = function (f) {
2891        /// <summary>
2892        ///     Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
2893        /// </summary>
2894        /// <param name="f" type="Function">
2895        ///     The function to be invoked.
2896        /// </param>
2897        /// <returns type="jQuery" />
2898
2899        return this.bind(o, f);
2900    };
2901    jQuery.prototype.andSelf = function () {
2902        /// <summary>
2903        ///     Add the previous set of elements on the stack to the current set.
2904        /// </summary>
2905        /// <returns type="jQuery" />
2906
2907        return this.add(this.prevObject);
2908    };
2909    jQuery.prototype.animate = function (prop, speed, easing, callback) {
2910        /// <summary>
2911        ///     Perform a custom animation of a set of CSS properties.
2912        ///     &#10;1 - animate(properties, duration, easing, complete)
2913        ///     &#10;2 - animate(properties, options)
2914        /// </summary>
2915        /// <param name="prop" type="Object">
2916        ///     A map of CSS properties that the animation will move toward.
2917        /// </param>
2918        /// <param name="speed" type="Number">
2919        ///     A string or number determining how long the animation will run.
2920        /// </param>
2921        /// <param name="easing" type="String">
2922        ///     A string indicating which easing function to use for the transition.
2923        /// </param>
2924        /// <param name="callback" type="Function">
2925        ///     A function to call once the animation is complete.
2926        /// </param>
2927        /// <returns type="jQuery" />
2928
2929        var optall = jQuery.speed(speed, easing, callback);
2930
2931        if (jQuery.isEmptyObject(prop)) {
2932            return this.each(optall.complete);
2933        }
2934
2935        return this[optall.queue === false ? "each" : "queue"](function () {
2936            // XXX 'this' does not always have a nodeName when running the
2937            // test suite
2938
2939            var opt = jQuery.extend({}, optall), p,
2940        isElement = this.nodeType === 1,
2941        hidden = isElement && jQuery(this).is(":hidden"),
2942        self = this;
2943
2944            for (p in prop) {
2945                var name = jQuery.camelCase(p);
2946
2947                if (p !== name) {
2948                    prop[name] = prop[p];
2949                    delete prop[p];
2950                    p = name;
2951                }
2952
2953                if (prop[p] === "hide" && hidden || prop[p] === "show" && !hidden) {
2954                    return opt.complete.call(this);
2955                }
2956
2957                if (isElement && (p === "height" || p === "width")) {
2958                    // Make sure that nothing sneaks out
2959                    // Record all 3 overflow attributes because IE does not
2960                    // change the overflow attribute when overflowX and
2961                    // overflowY are set to the same value
2962                    opt.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY];
2963
2964                    // Set display property to inline-block for height/width
2965                    // animations on inline elements that are having width/height
2966                    // animated
2967                    if (jQuery.css(this, "display") === "inline" &&
2968              jQuery.css(this, "float") === "none") {
2969                        if (!jQuery.support.inlineBlockNeedsLayout) {
2970                            this.style.display = "inline-block";
2971
2972                        } else {
2973                            var display = defaultDisplay(this.nodeName);
2974
2975                            // inline-level elements accept inline-block;
2976                            // block-level elements need to be inline with layout
2977                            if (display === "inline") {
2978                                this.style.display = "inline-block";
2979
2980                            } else {
2981                                this.style.display = "inline";
2982                                this.style.zoom = 1;
2983                            }
2984                        }
2985                    }
2986                }
2987
2988                if (jQuery.isArray(prop[p])) {
2989                    // Create (if needed) and add to specialEasing
2990                    (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
2991                    prop[p] = prop[p][0];
2992                }
2993            }
2994
2995            if (opt.overflow != null) {
2996                this.style.overflow = "hidden";
2997            }
2998
2999            opt.curAnim = jQuery.extend({}, prop);
3000
3001            jQuery.each(prop, function (name, val) {
3002                var e = new jQuery.fx(self, opt, name);
3003
3004                if (rfxtypes.test(val)) {
3005                    e[val === "toggle" ? hidden ? "show" : "hide" : val](prop);
3006
3007                } else {
3008                    var parts = rfxnum.exec(val),
3009            start = e.cur();
3010
3011                    if (parts) {
3012                        var end = parseFloat(parts[2]),
3013              unit = parts[3] || (jQuery.cssNumber[name] ? "" : "px");
3014
3015                        // We need to compute starting value
3016                        if (unit !== "px") {
3017                            jQuery.style(self, name, (end || 1) + unit);
3018                            start = ((end || 1) / e.cur()) * start;
3019                            jQuery.style(self, name, start + unit);
3020                        }
3021
3022                        // If a +=/-= token was provided, we're doing a relative animation
3023                        if (parts[1]) {
3024                            end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
3025                        }
3026
3027                        e.custom(start, end, unit);
3028
3029                    } else {
3030                        e.custom(start, val, "");
3031                    }
3032                }
3033            });
3034
3035            // For JS strict compliance
3036            return true;
3037        });
3038    };
3039    jQuery.prototype.append = function () {
3040        /// <summary>
3041        ///     Insert content, specified by the parameter, to the end of each element in the set of matched elements.
3042        ///     &#10;1 - append(content, content)
3043        ///     &#10;2 - append(function(index, html))
3044        /// </summary>
3045        /// <param name="" type="jQuery">
3046        ///     DOM element, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
3047        /// </param>
3048        /// <param name="" type="jQuery">
3049        ///     One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
3050        /// </param>
3051        /// <returns type="jQuery" />
3052
3053        return this.domManip(arguments, true, function (elem) {
3054            if (this.nodeType === 1) {
3055                this.appendChild(elem);
3056            }
3057        });
3058    };
3059    jQuery.prototype.appendTo = function (selector) {
3060        /// <summary>
3061        ///     Insert every element in the set of matched elements to the end of the target.
3062        /// </summary>
3063        /// <param name="selector" type="jQuery">
3064        ///     A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
3065        /// </param>
3066        /// <returns type="jQuery" />
3067
3068        var ret = [],
3069      insert = jQuery(selector),
3070      parent = this.length === 1 && this[0].parentNode;
3071
3072        if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
3073            insert[original](this[0]);
3074            return this;
3075
3076        } else {
3077            for (var i = 0, l = insert.length; i < l; i++) {
3078                var elems = (i > 0 ? this.clone(true) : this).get();
3079                jQuery(insert[i])[original](elems);
3080                ret = ret.concat(elems);
3081            }
3082
3083            return this.pushStack(ret, name, insert.selector);
3084        }
3085    };
3086    jQuery.prototype.attr = function (name, value) {
3087        /// <summary>
3088        ///     1: Get the value of an attribute for the first element in the set of matched elements.
3089        ///     &#10;    1.1 - attr(attributeName)
3090        ///     &#10;2: Set one or more attributes for the set of matched elements.
3091        ///     &#10;    2.1 - attr(attributeName, value)
3092        ///     &#10;    2.2 - attr(map)
3093        ///     &#10;    2.3 - attr(attributeName, function(index, attr))
3094        /// </summary>
3095        /// <param name="name" type="String">
3096        ///     The name of the attribute to set.
3097        /// </param>
3098        /// <param name="value" type="Number">
3099        ///     A value to set for the attribute.
3100        /// </param>
3101        /// <returns type="jQuery" />
3102
3103        return jQuery.access(this, name, value, true, jQuery.attr);
3104    };
3105    jQuery.prototype.before = function () {
3106        /// <summary>
3107        ///     Insert content, specified by the parameter, before each element in the set of matched elements.
3108        ///     &#10;1 - before(content, content)
3109        ///     &#10;2 - before(function)
3110        /// </summary>
3111        /// <param name="" type="jQuery">
3112        ///     HTML string, DOM element, or jQuery object to insert before each element in the set of matched elements.
3113        /// </param>
3114        /// <param name="" type="jQuery">
3115        ///     One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
3116        /// </param>
3117        /// <returns type="jQuery" />
3118
3119        if (this[0] && this[0].parentNode) {
3120            return this.domManip(arguments, false, function (elem) {
3121                this.parentNode.insertBefore(elem, this);
3122            });
3123        } else if (arguments.length) {
3124            var set = jQuery(arguments[0]);
3125            set.push.apply(set, this.toArray());
3126            return this.pushStack(set, "before", arguments);
3127        }
3128    };
3129    jQuery.prototype.bind = function (type, data, fn) {
3130        /// <summary>
3131        ///     Attach a handler to an event for the elements.
3132        ///     &#10;1 - bind(eventType, eventData, handler(eventObject))
3133        ///     &#10;2 - bind(eventType, eventData, false)
3134        ///     &#10;3 - bind(events)
3135        /// </summary>
3136        /// <param name="type" type="String">
3137        ///     A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
3138        /// </param>
3139        /// <param name="data" type="Object">
3140        ///     A map of data that will be passed to the event handler.
3141        /// </param>
3142        /// <param name="fn" type="Function">
3143        ///     A function to execute each time the event is triggered.
3144        /// </param>
3145        /// <returns type="jQuery" />
3146
3147        // Handle object literals
3148        if (typeof type === "object") {
3149            for (var key in type) {
3150                this[name](key, data, type[key], fn);
3151            }
3152            return this;
3153        }
3154
3155        if (jQuery.isFunction(data) || data === false) {
3156            fn = data;
3157            data = undefined;
3158        }
3159
3160        var handler = name === "one" ? jQuery.proxy(fn, function (event) {
3161            jQuery(this).unbind(event, handler);
3162            return fn.apply(this, arguments);
3163        }) : fn;
3164
3165        if (type === "unload" && name !== "one") {
3166            this.one(type, data, fn);
3167
3168        } else {
3169            for (var i = 0, l = this.length; i < l; i++) {
3170                jQuery.event.add(this[i], type, handler, data);
3171            }
3172        }
3173
3174        return this;
3175    };
3176    jQuery.prototype.blur = function (data, fn) {
3177        /// <summary>
3178        ///     Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.
3179        ///     &#10;1 - blur(handler(eventObject))
3180        ///     &#10;2 - blur(eventData, handler(eventObject))
3181        ///     &#10;3 - blur()
3182        /// </summary>
3183        /// <param name="data" type="Object">
3184        ///     A map of data that will be passed to the event handler.
3185        /// </param>
3186        /// <param name="fn" type="Function">
3187        ///     A function to execute each time the event is triggered.
3188        /// </param>
3189        /// <returns type="jQuery" />
3190
3191        if (fn == null) {
3192            fn = data;
3193            data = null;
3194        }
3195
3196        return arguments.length > 0 ?
3197      this.bind(name, data, fn) :
3198      this.trigger(name);
3199    };
3200    jQuery.prototype.change = function (data, fn) {
3201        /// <summary>
3202        ///     Bind an event handler to the "change" JavaScript event, or trigger that event on an element.
3203        ///     &#10;1 - change(handler(eventObject))
3204        ///     &#10;2 - change(eventData, handler(eventObject))
3205        ///     &#10;3 - change()
3206        /// </summary>
3207        /// <param name="data" type="Object">
3208        ///     A map of data that will be passed to the event handler.
3209        /// </param>
3210        /// <param name="fn" type="Function">
3211        ///     A function to execute each time the event is triggered.
3212        /// </param>
3213        /// <returns type="jQuery" />
3214
3215        if (fn == null) {
3216            fn = data;
3217            data = null;
3218        }
3219
3220        return arguments.length > 0 ?
3221      this.bind(name, data, fn) :
3222      this.trigger(name);
3223    };
3224    jQuery.prototype.children = function (until, selector) {
3225        /// <summary>
3226        ///     Get the children of each element in the set of matched elements, optionally filtered by a selector.
3227        /// </summary>
3228        /// <param name="until" type="String">
3229        ///     A string containing a selector expression to match elements against.
3230        /// </param>
3231        /// <returns type="jQuery" />
3232
3233        var ret = jQuery.map(this, fn, until),
3234        // The variable 'args' was introduced in
3235        // https://github.com/jquery/jquery/commit/52a0238
3236        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
3237        // http://code.google.com/p/v8/issues/detail?id=1050
3238      args = slice.call(arguments);
3239
3240        if (!runtil.test(name)) {
3241            selector = until;
3242        }
3243
3244        if (selector && typeof selector === "string") {
3245            ret = jQuery.filter(selector, ret);
3246        }
3247
3248        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
3249
3250        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
3251            ret = ret.reverse();
3252        }
3253
3254        return this.pushStack(ret, name, args.join(","));
3255    };
3256    jQuery.prototype.clearQueue = function (type) {
3257        /// <summary>
3258        ///     Remove from the queue all items that have not yet been run.
3259        /// </summary>
3260        /// <param name="type" type="String">
3261        ///     A string containing the name of the queue. Defaults to fx, the standard effects queue.
3262        /// </param>
3263        /// <returns type="jQuery" />
3264
3265        return this.queue(type || "fx", []);
3266    };
3267    jQuery.prototype.click = function (data, fn) {
3268        /// <summary>
3269        ///     Bind an event handler to the "click" JavaScript event, or trigger that event on an element.
3270        ///     &#10;1 - click(handler(eventObject))
3271        ///     &#10;2 - click(eventData, handler(eventObject))
3272        ///     &#10;3 - click()
3273        /// </summary>
3274        /// <param name="data" type="Object">
3275        ///     A map of data that will be passed to the event handler.
3276        /// </param>
3277        /// <param name="fn" type="Function">
3278        ///     A function to execute each time the event is triggered.
3279        /// </param>
3280        /// <returns type="jQuery" />
3281
3282        if (fn == null) {
3283            fn = data;
3284            data = null;
3285        }
3286
3287        return arguments.length > 0 ?
3288      this.bind(name, data, fn) :
3289      this.trigger(name);
3290    };
3291    jQuery.prototype.clone = function (dataAndEvents, deepDataAndEvents) {
3292        /// <summary>
3293        ///     Create a deep copy of the set of matched elements.
3294        ///     &#10;1 - clone(withDataAndEvents)
3295        ///     &#10;2 - clone(withDataAndEvents, deepWithDataAndEvents)
3296        /// </summary>
3297        /// <param name="dataAndEvents" type="Boolean">
3298        ///     A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. *For 1.5.0 the default value is incorrectly true. This will be changed back to false in 1.5.1 and up.
3299        /// </param>
3300        /// <param name="deepDataAndEvents" type="Boolean">
3301        ///     A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).
3302        /// </param>
3303        /// <returns type="jQuery" />
3304
3305        dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
3306        deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
3307
3308        return this.map(function () {
3309            return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
3310        });
3311    };
3312    jQuery.prototype.closest = function (selectors, context) {
3313        /// <summary>
3314        ///     1: Get the first ancestor element that matches the selector, beginning at the current element and progressing up through the DOM tree.
3315        ///     &#10;    1.1 - closest(selector)
3316        ///     &#10;    1.2 - closest(selector, context)
3317        ///     &#10;2: Gets an array of all the elements and selectors matched against the current element up through the DOM tree.
3318        ///     &#10;    2.1 - closest(selectors, context)
3319        /// </summary>
3320        /// <param name="selectors" type="String">
3321        ///     A string containing a selector expression to match elements against.
3322        /// </param>
3323        /// <param name="context" domElement="true">
3324        ///     A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
3325        /// </param>
3326        /// <returns type="jQuery" />
3327
3328        var ret = [], i, l, cur = this[0];
3329
3330        if (jQuery.isArray(selectors)) {
3331            var match, selector,
3332        matches = {},
3333        level = 1;
3334
3335            if (cur && selectors.length) {
3336                for (i = 0, l = selectors.length; i < l; i++) {
3337                    selector = selectors[i];
3338
3339                    if (!matches[selector]) {
3340                        matches[selector] = jQuery.expr.match.POS.test(selector) ?
3341              jQuery(selector, context || this.context) :
3342              selector;
3343                    }
3344                }
3345
3346                while (cur && cur.ownerDocument && cur !== context) {
3347                    for (selector in matches) {
3348                        match = matches[selector];
3349
3350                        if (match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match)) {
3351                            ret.push({ selector: selector, elem: cur, level: level });
3352                        }
3353                    }
3354
3355                    cur = cur.parentNode;
3356                    level++;
3357                }
3358            }
3359
3360            return ret;
3361        }
3362
3363        var pos = POS.test(selectors) ?
3364      jQuery(selectors, context || this.context) : null;
3365
3366        for (i = 0, l = this.length; i < l; i++) {
3367            cur = this[i];
3368
3369            while (cur) {
3370                if (pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors)) {
3371                    ret.push(cur);
3372                    break;
3373
3374                } else {
3375                    cur = cur.parentNode;
3376                    if (!cur || !cur.ownerDocument || cur === context) {
3377                        break;
3378                    }
3379                }
3380            }
3381        }
3382
3383        ret = ret.length > 1 ? jQuery.unique(ret) : ret;
3384
3385        return this.pushStack(ret, "closest", selectors);
3386    };
3387    jQuery.prototype.constructor = function (selector, context) {
3388
3389        // The jQuery object is actually just the init constructor 'enhanced'
3390        return new jQuery.fn.init(selector, context, rootjQuery);
3391    };
3392    jQuery.prototype.contents = function (until, selector) {
3393        /// <summary>
3394        ///     Get the children of each element in the set of matched elements, including text and comment nodes.
3395        /// </summary>
3396        /// <returns type="jQuery" />
3397
3398        var ret = jQuery.map(this, fn, until),
3399        // The variable 'args' was introduced in
3400        // https://github.com/jquery/jquery/commit/52a0238
3401        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
3402        // http://code.google.com/p/v8/issues/detail?id=1050
3403      args = slice.call(arguments);
3404
3405        if (!runtil.test(name)) {
3406            selector = until;
3407        }
3408
3409        if (selector && typeof selector === "string") {
3410            ret = jQuery.filter(selector, ret);
3411        }
3412
3413        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
3414
3415        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
3416            ret = ret.reverse();
3417        }
3418
3419        return this.pushStack(ret, name, args.join(","));
3420    };
3421    jQuery.prototype.css = function (name, value) {
3422        /// <summary>
3423        ///     1: Get the value of a style property for the first element in the set of matched elements.
3424        ///     &#10;    1.1 - css(propertyName)
3425        ///     &#10;2: Set one or more CSS properties for the  set of matched elements.
3426        ///     &#10;    2.1 - css(propertyName, value)
3427        ///     &#10;    2.2 - css(propertyName, function(index, value))
3428        ///     &#10;    2.3 - css(map)
3429        /// </summary>
3430        /// <param name="name" type="String">
3431        ///     A CSS property name.
3432        /// </param>
3433        /// <param name="value" type="Number">
3434        ///     A value to set for the property.
3435        /// </param>
3436        /// <returns type="jQuery" />
3437
3438        // Setting 'undefined' is a no-op
3439        if (arguments.length === 2 && value === undefined) {
3440            return this;
3441        }
3442
3443        return jQuery.access(this, name, value, true, function (elem, name, value) {
3444            return value !== undefined ?
3445      jQuery.style(elem, name, value) :
3446      jQuery.css(elem, name);
3447        });
3448    };
3449    jQuery.prototype.data = function (key, value) {
3450        /// <summary>
3451        ///     1: Store arbitrary data associated with the matched elements.
3452        ///     &#10;    1.1 - data(key, value)
3453        ///     &#10;    1.2 - data(obj)
3454        ///     &#10;2: Returns value at named data store for the first element in the jQuery collection, as set by data(name, value).
3455        ///     &#10;    2.1 - data(key)
3456        ///     &#10;    2.2 - data()
3457        /// </summary>
3458        /// <param name="key" type="String">
3459        ///     A string naming the piece of data to set.
3460        /// </param>
3461        /// <param name="value" type="Object">
3462        ///     The new data value; it can be any Javascript type including Array or Object.
3463        /// </param>
3464        /// <returns type="jQuery" />
3465
3466        var data = null;
3467
3468        if (typeof key === "undefined") {
3469            if (this.length) {
3470                data = jQuery.data(this[0]);
3471
3472                if (this[0].nodeType === 1) {
3473                    var attr = this[0].attributes, name;
3474                    for (var i = 0, l = attr.length; i < l; i++) {
3475                        name = attr[i].name;
3476
3477                        if (name.indexOf("data-") === 0) {
3478                            name = name.substr(5);
3479                            dataAttr(this[0], name, data[name]);
3480                        }
3481                    }
3482                }
3483            }
3484
3485            return data;
3486
3487        } else if (typeof key === "object") {
3488            return this.each(function () {
3489                jQuery.data(this, key);
3490            });
3491        }
3492
3493        var parts = key.split(".");
3494        parts[1] = parts[1] ? "." + parts[1] : "";
3495
3496        if (value === undefined) {
3497            data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
3498
3499            // Try to fetch any internally stored data first
3500            if (data === undefined && this.length) {
3501                data = jQuery.data(this[0], key);
3502                data = dataAttr(this[0], key, data);
3503            }
3504
3505            return data === undefined && parts[1] ?
3506        this.data(parts[0]) :
3507        data;
3508
3509        } else {
3510            return this.each(function () {
3511                var $this = jQuery(this),
3512          args = [parts[0], value];
3513
3514                $this.triggerHandler("setData" + parts[1] + "!", args);
3515                jQuery.data(this, key, value);
3516                $this.triggerHandler("changeData" + parts[1] + "!", args);
3517            });
3518        }
3519    };
3520    jQuery.prototype.dblclick = function (data, fn) {
3521        /// <summary>
3522        ///     Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element.
3523        ///     &#10;1 - dblclick(handler(eventObject))
3524        ///     &#10;2 - dblclick(eventData, handler(eventObject))
3525        ///     &#10;3 - dblclick()
3526        /// </summary>
3527        /// <param name="data" type="Object">
3528        ///     A map of data that will be passed to the event handler.
3529        /// </param>
3530        /// <param name="fn" type="Function">
3531        ///     A function to execute each time the event is triggered.
3532        /// </param>
3533        /// <returns type="jQuery" />
3534
3535        if (fn == null) {
3536            fn = data;
3537            data = null;
3538        }
3539
3540        return arguments.length > 0 ?
3541      this.bind(name, data, fn) :
3542      this.trigger(name);
3543    };
3544    jQuery.prototype.delay = function (time, type) {
3545        /// <summary>
3546        ///     Set a timer to delay execution of subsequent items in the queue.
3547        /// </summary>
3548        /// <param name="time" type="Number">
3549        ///     An integer indicating the number of milliseconds to delay execution of the next item in the queue.
3550        /// </param>
3551        /// <param name="type" type="String">
3552        ///     A string containing the name of the queue. Defaults to fx, the standard effects queue.
3553        /// </param>
3554        /// <returns type="jQuery" />
3555
3556        time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
3557        type = type || "fx";
3558
3559        return this.queue(type, function () {
3560            var elem = this;
3561            setTimeout(function () {
3562                jQuery.dequeue(elem, type);
3563            }, time);
3564        });
3565    };
3566    jQuery.prototype.delegate = function (selector, types, data, fn) {
3567        /// <summary>
3568        ///     Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.
3569        ///     &#10;1 - delegate(selector, eventType, handler)
3570        ///     &#10;2 - delegate(selector, eventType, eventData, handler)
3571        /// </summary>
3572        /// <param name="selector" type="String">
3573        ///     A selector to filter the elements that trigger the event.
3574        /// </param>
3575        /// <param name="types" type="String">
3576        ///     A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.
3577        /// </param>
3578        /// <param name="data" type="Object">
3579        ///     A map of data that will be passed to the event handler.
3580        /// </param>
3581        /// <param name="fn" type="Function">
3582        ///     A function to execute at the time the event is triggered.
3583        /// </param>
3584        /// <returns type="jQuery" />
3585
3586        return this.live(types, data, fn, selector);
3587    };
3588    jQuery.prototype.dequeue = function (type) {
3589        /// <summary>
3590        ///     Execute the next function on the queue for the matched elements.
3591        /// </summary>
3592        /// <param name="type" type="String">
3593        ///     A string containing the name of the queue. Defaults to fx, the standard effects queue.
3594        /// </param>
3595        /// <returns type="jQuery" />
3596
3597        return this.each(function () {
3598            jQuery.dequeue(this, type);
3599        });
3600    };
3601    jQuery.prototype.detach = function (selector) {
3602        /// <summary>
3603        ///     Remove the set of matched elements from the DOM.
3604        /// </summary>
3605        /// <param name="selector" type="String">
3606        ///     A selector expression that filters the set of matched elements to be removed.
3607        /// </param>
3608        /// <returns type="jQuery" />
3609
3610        return this.remove(selector, true);
3611    };
3612    jQuery.prototype.die = function (types, data, fn, origSelector /* Internal Use Only */) {
3613        /// <summary>
3614        ///     1: Remove all event handlers previously attached using .live() from the elements.
3615        ///     &#10;    1.1 - die()
3616        ///     &#10;2: Remove an event handler previously attached using .live() from the elements.
3617        ///     &#10;    2.1 - die(eventType, handler)
3618        /// </summary>
3619        /// <param name="types" type="String">
3620        ///     A string containing a JavaScript event type, such as click or keydown.
3621        /// </param>
3622        /// <param name="data" type="String">
3623        ///     The function that is to be no longer executed.
3624        /// </param>
3625        /// <returns type="jQuery" />
3626
3627        var type, i = 0, match, namespaces, preType,
3628      selector = origSelector || this.selector,
3629      context = origSelector ? this : jQuery(this.context);
3630
3631        if (typeof types === "object" && !types.preventDefault) {
3632            for (var key in types) {
3633                context[name](key, data, types[key], selector);
3634            }
3635
3636            return this;
3637        }
3638
3639        if (jQuery.isFunction(data)) {
3640            fn = data;
3641            data = undefined;
3642        }
3643
3644        types = (types || "").split(" ");
3645
3646        while ((type = types[i++]) != null) {
3647            match = rnamespaces.exec(type);
3648            namespaces = "";
3649
3650            if (match) {
3651                namespaces = match[0];
3652                type = type.replace(rnamespaces, "");
3653            }
3654
3655            if (type === "hover") {
3656                types.push("mouseenter" + namespaces, "mouseleave" + namespaces);
3657                continue;
3658            }
3659
3660            preType = type;
3661
3662            if (type === "focus" || type === "blur") {
3663                types.push(liveMap[type] + namespaces);
3664                type = type + namespaces;
3665
3666            } else {
3667                type = (liveMap[type] || type) + namespaces;
3668            }
3669
3670            if (name === "live") {
3671                // bind live handler
3672                for (var j = 0, l = context.length; j < l; j++) {
3673                    jQuery.event.add(context[j], "live." + liveConvert(type, selector),
3674            { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType });
3675                }
3676
3677            } else {
3678                // unbind live handler
3679                context.unbind("live." + liveConvert(type, selector), fn);
3680            }
3681        }
3682
3683        return this;
3684    };
3685    jQuery.prototype.domManip = function (args, table, callback) {
3686
3687        var results, first, fragment, parent,
3688      value = args[0],
3689      scripts = [];
3690
3691        // We can't cloneNode fragments that contain checked, in WebKit
3692        if (!jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test(value)) {
3693            return this.each(function () {
3694                jQuery(this).domManip(args, table, callback, true);
3695            });
3696        }
3697
3698        if (jQuery.isFunction(value)) {
3699            return this.each(function (i) {
3700                var self = jQuery(this);
3701                args[0] = value.call(this, i, table ? self.html() : undefined);
3702                self.domManip(args, table, callback);
3703            });
3704        }
3705
3706        if (this[0]) {
3707            parent = value && value.parentNode;
3708
3709            // If we're in a fragment, just use that instead of building a new one
3710            if (jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length) {
3711                results = { fragment: parent };
3712
3713            } else {
3714                results = jQuery.buildFragment(args, this, scripts);
3715            }
3716
3717            fragment = results.fragment;
3718
3719            if (fragment.childNodes.length === 1) {
3720                first = fragment = fragment.firstChild;
3721            } else {
3722                first = fragment.firstChild;
3723            }
3724
3725            if (first) {
3726                table = table && jQuery.nodeName(first, "tr");
3727
3728                for (var i = 0, l = this.length, lastIndex = l - 1; i < l; i++) {
3729                    callback.call(
3730            table ?
3731              root(this[i], first) :
3732              this[i],
3733                    // Make sure that we do not leak memory by inadvertently discarding
3734                    // the original fragment (which might have attached data) instead of
3735                    // using it; in addition, use the original fragment object for the last
3736                    // item instead of first because it can end up being emptied incorrectly
3737                    // in certain situations (Bug #8070).
3738                    // Fragments from the fragment cache must always be cloned and never used
3739                    // in place.
3740            results.cacheable || (l > 1 && i < lastIndex) ?
3741              jQuery.clone(fragment, true, true) :
3742              fragment
3743          );
3744                }
3745            }
3746
3747            if (scripts.length) {
3748                jQuery.each(scripts, evalScript);
3749            }
3750        }
3751
3752        return this;
3753    };
3754    jQuery.prototype.each = function (callback, args) {
3755        /// <summary>
3756        ///     Iterate over a jQuery object, executing a function for each matched element.
3757        /// </summary>
3758        /// <param name="callback" type="Function">
3759        ///     A function to execute for each matched element.
3760        /// </param>
3761        /// <returns type="jQuery" />
3762
3763        return jQuery.each(this, callback, args);
3764    };
3765    jQuery.prototype.empty = function () {
3766        /// <summary>
3767        ///     Remove all child nodes of the set of matched elements from the DOM.
3768        /// </summary>
3769        /// <returns type="jQuery" />
3770
3771        for (var i = 0, elem; (elem = this[i]) != null; i++) {
3772            // Remove element nodes and prevent memory leaks
3773            if (elem.nodeType === 1) {
3774                jQuery.cleanData(elem.getElementsByTagName("*"));
3775            }
3776
3777            // Remove any remaining nodes
3778            while (elem.firstChild) {
3779                elem.removeChild(elem.firstChild);
3780            }
3781        }
3782
3783        return this;
3784    };
3785    jQuery.prototype.end = function () {
3786        /// <summary>
3787        ///     End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
3788        /// </summary>
3789        /// <returns type="jQuery" />
3790
3791        return this.prevObject || this.constructor(null);
3792    };
3793    jQuery.prototype.eq = function (i) {
3794        /// <summary>
3795        ///     Reduce the set of matched elements to the one at the specified index.
3796        ///     &#10;1 - eq(index)
3797        ///     &#10;2 - eq(-index)
3798        /// </summary>
3799        /// <param name="i" type="Number">
3800        ///     An integer indicating the 0-based position of the element.
3801        /// </param>
3802        /// <returns type="jQuery" />
3803
3804        return i === -1 ?
3805      this.slice(i) :
3806      this.slice(i, +i + 1);
3807    };
3808    jQuery.prototype.error = function (data, fn) {
3809        /// <summary>
3810        ///     Bind an event handler to the "error" JavaScript event.
3811        ///     &#10;1 - error(handler(eventObject))
3812        ///     &#10;2 - error(eventData, handler(eventObject))
3813        /// </summary>
3814        /// <param name="data" type="Object">
3815        ///     A map of data that will be passed to the event handler.
3816        /// </param>
3817        /// <param name="fn" type="Function">
3818        ///     A function to execute each time the event is triggered.
3819        /// </param>
3820        /// <returns type="jQuery" />
3821
3822        if (fn == null) {
3823            fn = data;
3824            data = null;
3825        }
3826
3827        return arguments.length > 0 ?
3828      this.bind(name, data, fn) :
3829      this.trigger(name);
3830    };
3831    jQuery.prototype.extend = function () {
3832
3833        var options, name, src, copy, copyIsArray, clone,
3834    target = arguments[0] || {},
3835    i = 1,
3836    length = arguments.length,
3837    deep = false;
3838
3839        // Handle a deep copy situation
3840        if (typeof target === "boolean") {
3841            deep = target;
3842            target = arguments[1] || {};
3843            // skip the boolean and the target
3844            i = 2;
3845        }
3846
3847        // Handle case when target is a string or something (possible in deep copy)
3848        if (typeof target !== "object" && !jQuery.isFunction(target)) {
3849            target = {};
3850        }
3851
3852        // extend jQuery itself if only one argument is passed
3853        if (length === i) {
3854            target = this;
3855            --i;
3856        }
3857
3858        for (; i < length; i++) {
3859            // Only deal with non-null/undefined values
3860            if ((options = arguments[i]) != null) {
3861                // Extend the base object
3862                for (name in options) {
3863                    src = target[name];
3864                    copy = options[name];
3865
3866                    // Prevent never-ending loop
3867                    if (target === copy) {
3868                        continue;
3869                    }
3870
3871                    // Recurse if we're merging plain objects or arrays
3872                    if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {
3873                        if (copyIsArray) {
3874                            copyIsArray = false;
3875                            clone = src && jQuery.isArray(src) ? src : [];
3876
3877                        } else {
3878                            clone = src && jQuery.isPlainObject(src) ? src : {};
3879                        }
3880
3881                        // Never move original objects, clone them
3882                        target[name] = jQuery.extend(deep, clone, copy);
3883
3884                        // Don't bring in undefined values
3885                    } else if (copy !== undefined) {
3886                        target[name] = copy;
3887                    }
3888                }
3889            }
3890        }
3891
3892        // Return the modified object
3893        return target;
3894    };
3895    jQuery.prototype.fadeIn = function (speed, easing, callback) {
3896        /// <summary>
3897        ///     Display the matched elements by fading them to opaque.
3898        ///     &#10;1 - fadeIn(duration, callback)
3899        ///     &#10;2 - fadeIn(duration, easing, callback)
3900        /// </summary>
3901        /// <param name="speed" type="Number">
3902        ///     A string or number determining how long the animation will run.
3903        /// </param>
3904        /// <param name="easing" type="String">
3905        ///     A string indicating which easing function to use for the transition.
3906        /// </param>
3907        /// <param name="callback" type="Function">
3908        ///     A function to call once the animation is complete.
3909        /// </param>
3910        /// <returns type="jQuery" />
3911
3912        return this.animate(props, speed, easing, callback);
3913    };
3914    jQuery.prototype.fadeOut = function (speed, easing, callback) {
3915        /// <summary>
3916        ///     Hide the matched elements by fading them to transparent.
3917        ///     &#10;1 - fadeOut(duration, callback)
3918        ///     &#10;2 - fadeOut(duration, easing, callback)
3919        /// </summary>
3920        /// <param name="speed" type="Number">
3921        ///     A string or number determining how long the animation will run.
3922        /// </param>
3923        /// <param name="easing" type="String">
3924        ///     A string indicating which easing function to use for the transition.
3925        /// </param>
3926        /// <param name="callback" type="Function">
3927        ///     A function to call once the animation is complete.
3928        /// </param>
3929        /// <returns type="jQuery" />
3930
3931        return this.animate(props, speed, easing, callback);
3932    };
3933    jQuery.prototype.fadeTo = function (speed, to, easing, callback) {
3934        /// <summary>
3935        ///     Adjust the opacity of the matched elements.
3936        ///     &#10;1 - fadeTo(duration, opacity, callback)
3937        ///     &#10;2 - fadeTo(duration, opacity, easing, callback)
3938        /// </summary>
3939        /// <param name="speed" type="Number">
3940        ///     A string or number determining how long the animation will run.
3941        /// </param>
3942        /// <param name="to" type="Number">
3943        ///     A number between 0 and 1 denoting the target opacity.
3944        /// </param>
3945        /// <param name="easing" type="String">
3946        ///     A string indicating which easing function to use for the transition.
3947        /// </param>
3948        /// <param name="callback" type="Function">
3949        ///     A function to call once the animation is complete.
3950        /// </param>
3951        /// <returns type="jQuery" />
3952
3953        return this.filter(":hidden").css("opacity", 0).show().end()
3954          .animate({ opacity: to }, speed, easing, callback);
3955    };
3956    jQuery.prototype.fadeToggle = function (speed, easing, callback) {
3957        /// <summary>
3958        ///     Display or hide the matched elements by animating their opacity.
3959        /// </summary>
3960        /// <param name="speed" type="Number">
3961        ///     A string or number determining how long the animation will run.
3962        /// </param>
3963        /// <param name="easing" type="String">
3964        ///     A string indicating which easing function to use for the transition.
3965        /// </param>
3966        /// <param name="callback" type="Function">
3967        ///     A function to call once the animation is complete.
3968        /// </param>
3969        /// <returns type="jQuery" />
3970
3971        return this.animate(props, speed, easing, callback);
3972    };
3973    jQuery.prototype.filter = function (selector) {
3974        /// <summary>
3975        ///     Reduce the set of matched elements to those that match the selector or pass the function's test.
3976        ///     &#10;1 - filter(selector)
3977        ///     &#10;2 - filter(function(index))
3978        ///     &#10;3 - filter(element)
3979        ///     &#10;4 - filter(jQuery object)
3980        /// </summary>
3981        /// <param name="selector" type="String">
3982        ///     A string containing a selector expression to match the current set of elements against.
3983        /// </param>
3984        /// <returns type="jQuery" />
3985
3986        return this.pushStack(winnow(this, selector, true), "filter", selector);
3987    };
3988    jQuery.prototype.find = function (selector) {
3989        /// <summary>
3990        ///     Get the descendants of each element in the current set of matched elements, filtered by a selector.
3991        /// </summary>
3992        /// <param name="selector" type="String">
3993        ///     A string containing a selector expression to match elements against.
3994        /// </param>
3995        /// <returns type="jQuery" />
3996
3997        var ret = this.pushStack("", "find", selector),
3998      length = 0;
3999
4000        for (var i = 0, l = this.length; i < l; i++) {
4001            length = ret.length;
4002            jQuery.find(selector, this[i], ret);
4003
4004            if (i > 0) {
4005                // Make sure that the results are unique
4006                for (var n = length; n < ret.length; n++) {
4007                    for (var r = 0; r < length; r++) {
4008                        if (ret[r] === ret[n]) {
4009                            ret.splice(n--, 1);
4010                            break;
4011                        }
4012                    }
4013                }
4014            }
4015        }
4016
4017        return ret;
4018    };
4019    jQuery.prototype.first = function () {
4020        /// <summary>
4021        ///     Reduce the set of matched elements to the first in the set.
4022        /// </summary>
4023        /// <returns type="jQuery" />
4024
4025        return this.eq(0);
4026    };
4027    jQuery.prototype.focus = function (data, fn) {
4028        /// <summary>
4029        ///     Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.
4030        ///     &#10;1 - focus(handler(eventObject))
4031        ///     &#10;2 - focus(eventData, handler(eventObject))
4032        ///     &#10;3 - focus()
4033        /// </summary>
4034        /// <param name="data" type="Object">
4035        ///     A map of data that will be passed to the event handler.
4036        /// </param>
4037        /// <param name="fn" type="Function">
4038        ///     A function to execute each time the event is triggered.
4039        /// </param>
4040        /// <returns type="jQuery" />
4041
4042        if (fn == null) {
4043            fn = data;
4044            data = null;
4045        }
4046
4047        return arguments.length > 0 ?
4048      this.bind(name, data, fn) :
4049      this.trigger(name);
4050    };
4051    jQuery.prototype.focusin = function (data, fn) {
4052        /// <summary>
4053        ///     Bind an event handler to the "focusin" JavaScript event.
4054        ///     &#10;1 - focusin(handler(eventObject))
4055        ///     &#10;2 - focusin(eventData, handler(eventObject))
4056        /// </summary>
4057        /// <param name="data" type="Object">
4058        ///     A map of data that will be passed to the event handler.
4059        /// </param>
4060        /// <param name="fn" type="Function">
4061        ///     A function to execute each time the event is triggered.
4062        /// </param>
4063        /// <returns type="jQuery" />
4064
4065        if (fn == null) {
4066            fn = data;
4067            data = null;
4068        }
4069
4070        return arguments.length > 0 ?
4071      this.bind(name, data, fn) :
4072      this.trigger(name);
4073    };
4074    jQuery.prototype.focusout = function (data, fn) {
4075        /// <summary>
4076        ///     Bind an event handler to the "focusout" JavaScript event.
4077        ///     &#10;1 - focusout(handler(eventObject))
4078        ///     &#10;2 - focusout(eventData, handler(eventObject))
4079        /// </summary>
4080        /// <param name="data" type="Object">
4081        ///     A map of data that will be passed to the event handler.
4082        /// </param>
4083        /// <param name="fn" type="Function">
4084        ///     A function to execute each time the event is triggered.
4085        /// </param>
4086        /// <returns type="jQuery" />
4087
4088        if (fn == null) {
4089            fn = data;
4090            data = null;
4091        }
4092
4093        return arguments.length > 0 ?
4094      this.bind(name, data, fn) :
4095      this.trigger(name);
4096    };
4097    jQuery.prototype.get = function (num) {
4098        /// <summary>
4099        ///     Retrieve the DOM elements matched by the jQuery object.
4100        /// </summary>
4101        /// <param name="num" type="Number">
4102        ///     A zero-based integer indicating which element to retrieve.
4103        /// </param>
4104        /// <returns type="Array" />
4105
4106        return num == null ?
4107
4108        // Return a 'clean' array
4109      this.toArray() :
4110
4111        // Return just the object
4112      (num < 0 ? this[this.length + num] : this[num]);
4113    };
4114    jQuery.prototype.has = function (target) {
4115        /// <summary>
4116        ///     Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
4117        ///     &#10;1 - has(selector)
4118        ///     &#10;2 - has(contained)
4119        /// </summary>
4120        /// <param name="target" type="String">
4121        ///     A string containing a selector expression to match elements against.
4122        /// </param>
4123        /// <returns type="jQuery" />
4124
4125        var targets = jQuery(target);
4126        return this.filter(function () {
4127            for (var i = 0, l = targets.length; i < l; i++) {
4128                if (jQuery.contains(this, targets[i])) {
4129                    return true;
4130                }
4131            }
4132        });
4133    };
4134    jQuery.prototype.hasClass = function (selector) {
4135        /// <summary>
4136        ///     Determine whether any of the matched elements are assigned the given class.
4137        /// </summary>
4138        /// <param name="selector" type="String">
4139        ///     The class name to search for.
4140        /// </param>
4141        /// <returns type="Boolean" />
4142
4143        var className = " " + selector + " ";
4144        for (var i = 0, l = this.length; i < l; i++) {
4145            if ((" " + this[i].className + " ").replace(rclass, " ").indexOf(className) > -1) {
4146                return true;
4147            }
4148        }
4149
4150        return false;
4151    };
4152    jQuery.prototype.height = function (size) {
4153        /// <summary>
4154        ///     1: Get the current computed height for the first element in the set of matched elements.
4155        ///     &#10;    1.1 - height()
4156        ///     &#10;2: Set the CSS height of every matched element.
4157        ///     &#10;    2.1 - height(value)
4158        ///     &#10;    2.2 - height(function(index, height))
4159        /// </summary>
4160        /// <param name="size" type="Number">
4161        ///     An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
4162        /// </param>
4163        /// <returns type="jQuery" />
4164
4165        // Get window width or height
4166        var elem = this[0];
4167        if (!elem) {
4168            return size == null ? null : this;
4169        }
4170
4171        if (jQuery.isFunction(size)) {
4172            return this.each(function (i) {
4173                var self = jQuery(this);
4174                self[type](size.call(this, i, self[type]()));
4175            });
4176        }
4177
4178        if (jQuery.isWindow(elem)) {
4179            // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
4180            // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
4181            var docElemProp = elem.document.documentElement["client" + name];
4182            return elem.document.compatMode === "CSS1Compat" && docElemProp ||
4183        elem.document.body["client" + name] || docElemProp;
4184
4185            // Get document width or height
4186        } else if (elem.nodeType === 9) {
4187            // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
4188            return Math.max(
4189        elem.documentElement["client" + name],
4190        elem.body["scroll" + name], elem.documentElement["scroll" + name],
4191        elem.body["offset" + name], elem.documentElement["offset" + name]
4192      );
4193
4194            // Get or set width or height on the element
4195        } else if (size === undefined) {
4196            var orig = jQuery.css(elem, type),
4197        ret = parseFloat(orig);
4198
4199            return jQuery.isNaN(ret) ? orig : ret;
4200
4201            // Set the width or height on the element (default to pixels if value is unitless)
4202        } else {
4203            return this.css(type, typeof size === "string" ? size : size + "px");
4204        }
4205    };
4206    jQuery.prototype.hide = function (speed, easing, callback) {
4207        /// <summary>
4208        ///     Hide the matched elements.
4209        ///     &#10;1 - hide()
4210        ///     &#10;2 - hide(duration, callback)
4211        ///     &#10;3 - hide(duration, easing, callback)
4212        /// </summary>
4213        /// <param name="speed" type="Number">
4214        ///     A string or number determining how long the animation will run.
4215        /// </param>
4216        /// <param name="easing" type="String">
4217        ///     A string indicating which easing function to use for the transition.
4218        /// </param>
4219        /// <param name="callback" type="Function">
4220        ///     A function to call once the animation is complete.
4221        /// </param>
4222        /// <returns type="jQuery" />
4223
4224        if (speed || speed === 0) {
4225            return this.animate(genFx("hide", 3), speed, easing, callback);
4226
4227        } else {
4228            for (var i = 0, j = this.length; i < j; i++) {
4229                var display = jQuery.css(this[i], "display");
4230
4231                if (display !== "none" && !jQuery._data(this[i], "olddisplay")) {
4232                    jQuery._data(this[i], "olddisplay", display);
4233                }
4234            }
4235
4236            // Set the display of the elements in a second loop
4237            // to avoid the constant reflow
4238            for (i = 0; i < j; i++) {
4239                this[i].style.display = "none";
4240            }
4241
4242            return this;
4243        }
4244    };
4245    jQuery.prototype.hover = function (fnOver, fnOut) {
4246        /// <summary>
4247        ///     1: Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
4248        ///     &#10;    1.1 - hover(handlerIn(eventObject), handlerOut(eventObject))
4249        ///     &#10;2: Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
4250        ///     &#10;    2.1 - hover(handlerInOut(eventObject))
4251        /// </summary>
4252        /// <param name="fnOver" type="Function">
4253        ///     A function to execute when the mouse pointer enters the element.
4254        /// </param>
4255        /// <param name="fnOut" type="Function">
4256        ///     A function to execute when the mouse pointer leaves the element.
4257        /// </param>
4258        /// <returns type="jQuery" />
4259
4260        return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
4261    };
4262    jQuery.prototype.html = function (value) {
4263        /// <summary>
4264        ///     1: Get the HTML contents of the first element in the set of matched elements.
4265        ///     &#10;    1.1 - html()
4266        ///     &#10;2: Set the HTML contents of each element in the set of matched elements.
4267        ///     &#10;    2.1 - html(htmlString)
4268        ///     &#10;    2.2 - html(function(index, oldhtml))
4269        /// </summary>
4270        /// <param name="value" type="String">
4271        ///     A string of HTML to set as the content of each matched element.
4272        /// </param>
4273        /// <returns type="jQuery" />
4274
4275        if (value === undefined) {
4276            return this[0] && this[0].nodeType === 1 ?
4277        this[0].innerHTML.replace(rinlinejQuery, "") :
4278        null;
4279
4280            // See if we can take a shortcut and just use innerHTML
4281        } else if (typeof value === "string" && !rnocache.test(value) &&
4282      (jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value)) &&
4283      !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
4284
4285            value = value.replace(rxhtmlTag, "<$1></$2>");
4286
4287            try {
4288                for (var i = 0, l = this.length; i < l; i++) {
4289                    // Remove element nodes and prevent memory leaks
4290                    if (this[i].nodeType === 1) {
4291                        jQuery.cleanData(this[i].getElementsByTagName("*"));
4292                        this[i].innerHTML = value;
4293                    }
4294                }
4295
4296                // If using innerHTML throws an exception, use the fallback method
4297            } catch (e) {
4298                this.empty().append(value);
4299            }
4300
4301        } else if (jQuery.isFunction(value)) {
4302            this.each(function (i) {
4303                var self = jQuery(this);
4304
4305                self.html(value.call(this, i, self.html()));
4306            });
4307
4308        } else {
4309            this.empty().append(value);
4310        }
4311
4312        return this;
4313    };
4314    jQuery.prototype.index = function (elem) {
4315        /// <summary>
4316        ///     Search for a given element from among the matched elements.
4317        ///     &#10;1 - index()
4318        ///     &#10;2 - index(selector)
4319        ///     &#10;3 - index(element)
4320        /// </summary>
4321        /// <param name="elem" type="String">
4322        ///     A selector representing a jQuery collection in which to look for an element.
4323        /// </param>
4324        /// <returns type="Number" />
4325
4326        if (!elem || typeof elem === "string") {
4327            return jQuery.inArray(this[0],
4328            // If it receives a string, the selector is used
4329            // If it receives nothing, the siblings are used
4330        elem ? jQuery(elem) : this.parent().children());
4331        }
4332        // Locate the position of the desired element
4333        return jQuery.inArray(
4334        // If it receives a jQuery object, the first element is used
4335      elem.jquery ? elem[0] : elem, this);
4336    };
4337    jQuery.prototype.init = function (selector, context, rootjQuery) {
4338
4339        var match, elem, ret, doc;
4340
4341        // Handle $(""), $(null), or $(undefined)
4342        if (!selector) {
4343            return this;
4344        }
4345
4346        // Handle $(DOMElement)
4347        if (selector.nodeType) {
4348            this.context = this[0] = selector;
4349            this.length = 1;
4350            return this;
4351        }
4352
4353        // The body element only exists once, optimize finding it
4354        if (selector === "body" && !context && document.body) {
4355            this.context = document;
4356            this[0] = document.body;
4357            this.selector = "body";
4358            this.length = 1;
4359            return this;
4360        }
4361
4362        // Handle HTML strings
4363        if (typeof selector === "string") {
4364            // Are we dealing with HTML string or an ID?
4365            match = quickExpr.exec(selector);
4366
4367            // Verify a match, and that no context was specified for #id
4368            if (match && (match[1] || !context)) {
4369
4370                // HANDLE: $(html) -> $(array)
4371                if (match[1]) {
4372                    context = context instanceof jQuery ? context[0] : context;
4373                    doc = (context ? context.ownerDocument || context : document);
4374
4375                    // If a single string is passed in and it's a single tag
4376                    // just do a createElement and skip the rest
4377                    ret = rsingleTag.exec(selector);
4378
4379                    if (ret) {
4380                        if (jQuery.isPlainObject(context)) {
4381                            selector = [document.createElement(ret[1])];
4382                            jQuery.fn.attr.call(selector, context, true);
4383
4384                        } else {
4385                            selector = [doc.createElement(ret[1])];
4386                        }
4387
4388                    } else {
4389                        ret = jQuery.buildFragment([match[1]], [doc]);
4390                        selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
4391                    }
4392
4393                    return jQuery.merge(this, selector);
4394
4395                    // HANDLE: $("#id")
4396                } else {
4397                    elem = document.getElementById(match[2]);
4398
4399                    // Check parentNode to catch when Blackberry 4.6 returns
4400                    // nodes that are no longer in the document #6963
4401                    if (elem && elem.parentNode) {
4402                        // Handle the case where IE and Opera return items
4403                        // by name instead of ID
4404                        if (elem.id !== match[2]) {
4405                            return rootjQuery.find(selector);
4406                        }
4407
4408                        // Otherwise, we inject the element directly into the jQuery object
4409                        this.length = 1;
4410                        this[0] = elem;
4411                    }
4412
4413                    this.context = document;
4414                    this.selector = selector;
4415                    return this;
4416                }
4417
4418                // HANDLE: $(expr, $(...))
4419            } else if (!context || context.jquery) {
4420                return (context || rootjQuery).find(selector);
4421
4422                // HANDLE: $(expr, context)
4423                // (which is just equivalent to: $(context).find(expr)
4424            } else {
4425                return this.constructor(context).find(selector);
4426            }
4427
4428            // HANDLE: $(function)
4429            // Shortcut for document ready
4430        } else if (jQuery.isFunction(selector)) {
4431            return rootjQuery.ready(selector);
4432        }
4433
4434        if (selector.selector !== undefined) {
4435            this.selector = selector.selector;
4436            this.context = selector.context;
4437        }
4438
4439        return jQuery.makeArray(selector, this);
4440    };
4441    jQuery.prototype.innerHeight = function () {
4442        /// <summary>
4443        ///     Get the current computed height for the first element in the set of matched elements, including padding but not border.
4444        /// </summary>
4445        /// <returns type="Number" />
4446
4447        return this[0] ?
4448      parseFloat(jQuery.css(this[0], type, "padding")) :
4449      null;
4450    };
4451    jQuery.prototype.innerWidth = function () {
4452        /// <summary>
4453        ///     Get the current computed width for the first element in the set of matched elements, including padding but not border.
4454        /// </summary>
4455        /// <returns type="Number" />
4456
4457        return this[0] ?
4458      parseFloat(jQuery.css(this[0], type, "padding")) :
4459      null;
4460    };
4461    jQuery.prototype.insertAfter = function (selector) {
4462        /// <summary>
4463        ///     Insert every element in the set of matched elements after the target.
4464        /// </summary>
4465        /// <param name="selector" type="jQuery">
4466        ///     A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
4467        /// </param>
4468        /// <returns type="jQuery" />
4469
4470        var ret = [],
4471      insert = jQuery(selector),
4472      parent = this.length === 1 && this[0].parentNode;
4473
4474        if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
4475            insert[original](this[0]);
4476            return this;
4477
4478        } else {
4479            for (var i = 0, l = insert.length; i < l; i++) {
4480                var elems = (i > 0 ? this.clone(true) : this).get();
4481                jQuery(insert[i])[original](elems);
4482                ret = ret.concat(elems);
4483            }
4484
4485            return this.pushStack(ret, name, insert.selector);
4486        }
4487    };
4488    jQuery.prototype.insertBefore = function (selector) {
4489        /// <summary>
4490        ///     Insert every element in the set of matched elements before the target.
4491        /// </summary>
4492        /// <param name="selector" type="jQuery">
4493        ///     A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
4494        /// </param>
4495        /// <returns type="jQuery" />
4496
4497        var ret = [],
4498      insert = jQuery(selector),
4499      parent = this.length === 1 && this[0].parentNode;
4500
4501        if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
4502            insert[original](this[0]);
4503            return this;
4504
4505        } else {
4506            for (var i = 0, l = insert.length; i < l; i++) {
4507                var elems = (i > 0 ? this.clone(true) : this).get();
4508                jQuery(insert[i])[original](elems);
4509                ret = ret.concat(elems);
4510            }
4511
4512            return this.pushStack(ret, name, insert.selector);
4513        }
4514    };
4515    jQuery.prototype.is = function (selector) {
4516        /// <summary>
4517        ///     Check the current matched set of elements against a selector and return true if at least one of these elements matches the selector.
4518        /// </summary>
4519        /// <param name="selector" type="String">
4520        ///     A string containing a selector expression to match elements against.
4521        /// </param>
4522        /// <returns type="Boolean" />
4523
4524        return !!selector && jQuery.filter(selector, this).length > 0;
4525    };
4526    jQuery.prototype.keydown = function (data, fn) {
4527        /// <summary>
4528        ///     Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.
4529        ///     &#10;1 - keydown(handler(eventObject))
4530        ///     &#10;2 - keydown(eventData, handler(eventObject))
4531        ///     &#10;3 - keydown()
4532        /// </summary>
4533        /// <param name="data" type="Object">
4534        ///     A map of data that will be passed to the event handler.
4535        /// </param>
4536        /// <param name="fn" type="Function">
4537        ///     A function to execute each time the event is triggered.
4538        /// </param>
4539        /// <returns type="jQuery" />
4540
4541        if (fn == null) {
4542            fn = data;
4543            data = null;
4544        }
4545
4546        return arguments.length > 0 ?
4547      this.bind(name, data, fn) :
4548      this.trigger(name);
4549    };
4550    jQuery.prototype.keypress = function (data, fn) {
4551        /// <summary>
4552        ///     Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.
4553        ///     &#10;1 - keypress(handler(eventObject))
4554        ///     &#10;2 - keypress(eventData, handler(eventObject))
4555        ///     &#10;3 - keypress()
4556        /// </summary>
4557        /// <param name="data" type="Object">
4558        ///     A map of data that will be passed to the event handler.
4559        /// </param>
4560        /// <param name="fn" type="Function">
4561        ///     A function to execute each time the event is triggered.
4562        /// </param>
4563        /// <returns type="jQuery" />
4564
4565        if (fn == null) {
4566            fn = data;
4567            data = null;
4568        }
4569
4570        return arguments.length > 0 ?
4571      this.bind(name, data, fn) :
4572      this.trigger(name);
4573    };
4574    jQuery.prototype.keyup = function (data, fn) {
4575        /// <summary>
4576        ///     Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.
4577        ///     &#10;1 - keyup(handler(eventObject))
4578        ///     &#10;2 - keyup(eventData, handler(eventObject))
4579        ///     &#10;3 - keyup()
4580        /// </summary>
4581        /// <param name="data" type="Object">
4582        ///     A map of data that will be passed to the event handler.
4583        /// </param>
4584        /// <param name="fn" type="Function">
4585        ///     A function to execute each time the event is triggered.
4586        /// </param>
4587        /// <returns type="jQuery" />
4588
4589        if (fn == null) {
4590            fn = data;
4591            data = null;
4592        }
4593
4594        return arguments.length > 0 ?
4595      this.bind(name, data, fn) :
4596      this.trigger(name);
4597    };
4598    jQuery.prototype.last = function () {
4599        /// <summary>
4600        ///     Reduce the set of matched elements to the final one in the set.
4601        /// </summary>
4602        /// <returns type="jQuery" />
4603
4604        return this.eq(-1);
4605    };
4606    jQuery.prototype.length = 0;
4607    jQuery.prototype.live = function (types, data, fn, origSelector /* Internal Use Only */) {
4608        /// <summary>
4609        ///     Attach a handler to the event for all elements which match the current selector, now and in the future.
4610        ///     &#10;1 - live(eventType, handler)
4611        ///     &#10;2 - live(eventType, eventData, handler)
4612        ///     &#10;3 - live(events)
4613        /// </summary>
4614        /// <param name="types" type="String">
4615        ///     A string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names, as well.
4616        /// </param>
4617        /// <param name="data" type="Object">
4618        ///     A map of data that will be passed to the event handler.
4619        /// </param>
4620        /// <param name="fn" type="Function">
4621        ///     A function to execute at the time the event is triggered.
4622        /// </param>
4623        /// <returns type="jQuery" />
4624
4625        var type, i = 0, match, namespaces, preType,
4626      selector = origSelector || this.selector,
4627      context = origSelector ? this : jQuery(this.context);
4628
4629        if (typeof types === "object" && !types.preventDefault) {
4630            for (var key in types) {
4631                context[name](key, data, types[key], selector);
4632            }
4633
4634            return this;
4635        }
4636
4637        if (jQuery.isFunction(data)) {
4638            fn = data;
4639            data = undefined;
4640        }
4641
4642        types = (types || "").split(" ");
4643
4644        while ((type = types[i++]) != null) {
4645            match = rnamespaces.exec(type);
4646            namespaces = "";
4647
4648            if (match) {
4649                namespaces = match[0];
4650                type = type.replace(rnamespaces, "");
4651            }
4652
4653            if (type === "hover") {
4654                types.push("mouseenter" + namespaces, "mouseleave" + namespaces);
4655                continue;
4656            }
4657
4658            preType = type;
4659
4660            if (type === "focus" || type === "blur") {
4661                types.push(liveMap[type] + namespaces);
4662                type = type + namespaces;
4663
4664            } else {
4665                type = (liveMap[type] || type) + namespaces;
4666            }
4667
4668            if (name === "live") {
4669                // bind live handler
4670                for (var j = 0, l = context.length; j < l; j++) {
4671                    jQuery.event.add(context[j], "live." + liveConvert(type, selector),
4672            { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType });
4673                }
4674
4675            } else {
4676                // unbind live handler
4677                context.unbind("live." + liveConvert(type, selector), fn);
4678            }
4679        }
4680
4681        return this;
4682    };
4683    jQuery.prototype.load = function (url, params, callback) {
4684        /// <summary>
4685        ///     1: Bind an event handler to the "load" JavaScript event.
4686        ///     &#10;    1.1 - load(handler(eventObject))
4687        ///     &#10;    1.2 - load(eventData, handler(eventObject))
4688        ///     &#10;2: Load data from the server and place the returned HTML into the matched element.
4689        ///     &#10;    2.1 - load(url, data, complete(responseText, textStatus, XMLHttpRequest))
4690        /// </summary>
4691        /// <param name="url" type="String">
4692        ///     A string containing the URL to which the request is sent.
4693        /// </param>
4694        /// <param name="params" type="String">
4695        ///     A map or string that is sent to the server with the request.
4696        /// </param>
4697        /// <param name="callback" type="Function">
4698        ///     A callback function that is executed when the request completes.
4699        /// </param>
4700        /// <returns type="jQuery" />
4701
4702        if (typeof url !== "string" && _load) {
4703            return _load.apply(this, arguments);
4704
4705            // Don't do a request if no elements are being requested
4706        } else if (!this.length) {
4707            return this;
4708        }
4709
4710        var off = url.indexOf(" ");
4711        if (off >= 0) {
4712            var selector = url.slice(off, url.length);
4713            url = url.slice(0, off);
4714        }
4715
4716        // Default to a GET request
4717        var type = "GET";
4718
4719        // If the second parameter was provided
4720        if (params) {
4721            // If it's a function
4722            if (jQuery.isFunction(params)) {
4723                // We assume that it's the callback
4724                callback = params;
4725                params = undefined;
4726
4727                // Otherwise, build a param string
4728            } else if (typeof params === "object") {
4729                params = jQuery.param(params, jQuery.ajaxSettings.traditional);
4730                type = "POST";
4731            }
4732        }
4733
4734        var self = this;
4735
4736        // Request the remote document
4737        jQuery.ajax({
4738            url: url,
4739            type: type,
4740            dataType: "html",
4741            data: params,
4742            // Complete callback (responseText is used internally)
4743            complete: function (jqXHR, status, responseText) {
4744                // Store the response as specified by the jqXHR object
4745                responseText = jqXHR.responseText;
4746                // If successful, inject the HTML into all the matched elements
4747                if (jqXHR.isResolved()) {
4748                    // #4825: Get the actual response in case
4749                    // a dataFilter is present in ajaxSettings
4750                    jqXHR.done(function (r) {
4751                        responseText = r;
4752                    });
4753                    // See if a selector was specified
4754                    self.html(selector ?
4755                    // Create a dummy div to hold the results
4756            jQuery("<div>")
4757                    // inject the contents of the document in, removing the scripts
4758                    // to avoid any 'Permission Denied' errors in IE
4759              .append(responseText.replace(rscript, ""))
4760
4761                    // Locate the specified elements
4762              .find(selector) :
4763
4764                    // If not, just inject the full result
4765            responseText);
4766                }
4767
4768                if (callback) {
4769                    self.each(callback, [responseText, status, jqXHR]);
4770                }
4771            }
4772        });
4773
4774        return this;
4775    };
4776    jQuery.prototype.map = function (callback) {
4777        /// <summary>
4778        ///     Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
4779        /// </summary>
4780        /// <param name="callback" type="Function">
4781        ///     A function object that will be invoked for each element in the current set.
4782        /// </param>
4783        /// <returns type="jQuery" />
4784
4785        return this.pushStack(jQuery.map(this, function (elem, i) {
4786            return callback.call(elem, i, elem);
4787        }));
4788    };
4789    jQuery.prototype.mousedown = function (data, fn) {
4790        /// <summary>
4791        ///     Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.
4792        ///     &#10;1 - mousedown(handler(eventObject))
4793        ///     &#10;2 - mousedown(eventData, handler(eventObject))
4794        ///     &#10;3 - mousedown()
4795        /// </summary>
4796        /// <param name="data" type="Object">
4797        ///     A map of data that will be passed to the event handler.
4798        /// </param>
4799        /// <param name="fn" type="Function">
4800        ///     A function to execute each time the event is triggered.
4801        /// </param>
4802        /// <returns type="jQuery" />
4803
4804        if (fn == null) {
4805            fn = data;
4806            data = null;
4807        }
4808
4809        return arguments.length > 0 ?
4810      this.bind(name, data, fn) :
4811      this.trigger(name);
4812    };
4813    jQuery.prototype.mouseenter = function (data, fn) {
4814        /// <summary>
4815        ///     Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.
4816        ///     &#10;1 - mouseenter(handler(eventObject))
4817        ///     &#10;2 - mouseenter(eventData, handler(eventObject))
4818        ///     &#10;3 - mouseenter()
4819        /// </summary>
4820        /// <param name="data" type="Object">
4821        ///     A map of data that will be passed to the event handler.
4822        /// </param>
4823        /// <param name="fn" type="Function">
4824        ///     A function to execute each time the event is triggered.
4825        /// </param>
4826        /// <returns type="jQuery" />
4827
4828        if (fn == null) {
4829            fn = data;
4830            data = null;
4831        }
4832
4833        return arguments.length > 0 ?
4834      this.bind(name, data, fn) :
4835      this.trigger(name);
4836    };
4837    jQuery.prototype.mouseleave = function (data, fn) {
4838        /// <summary>
4839        ///     Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.
4840        ///     &#10;1 - mouseleave(handler(eventObject))
4841        ///     &#10;2 - mouseleave(eventData, handler(eventObject))
4842        ///     &#10;3 - mouseleave()
4843        /// </summary>
4844        /// <param name="data" type="Object">
4845        ///     A map of data that will be passed to the event handler.
4846        /// </param>
4847        /// <param name="fn" type="Function">
4848        ///     A function to execute each time the event is triggered.
4849        /// </param>
4850        /// <returns type="jQuery" />
4851
4852        if (fn == null) {
4853            fn = data;
4854            data = null;
4855        }
4856
4857        return arguments.length > 0 ?
4858      this.bind(name, data, fn) :
4859      this.trigger(name);
4860    };
4861    jQuery.prototype.mousemove = function (data, fn) {
4862        /// <summary>
4863        ///     Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.
4864        ///     &#10;1 - mousemove(handler(eventObject))
4865        ///     &#10;2 - mousemove(eventData, handler(eventObject))
4866        ///     &#10;3 - mousemove()
4867        /// </summary>
4868        /// <param name="data" type="Object">
4869        ///     A map of data that will be passed to the event handler.
4870        /// </param>
4871        /// <param name="fn" type="Function">
4872        ///     A function to execute each time the event is triggered.
4873        /// </param>
4874        /// <returns type="jQuery" />
4875
4876        if (fn == null) {
4877            fn = data;
4878            data = null;
4879        }
4880
4881        return arguments.length > 0 ?
4882      this.bind(name, data, fn) :
4883      this.trigger(name);
4884    };
4885    jQuery.prototype.mouseout = function (data, fn) {
4886        /// <summary>
4887        ///     Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.
4888        ///     &#10;1 - mouseout(handler(eventObject))
4889        ///     &#10;2 - mouseout(eventData, handler(eventObject))
4890        ///     &#10;3 - mouseout()
4891        /// </summary>
4892        /// <param name="data" type="Object">
4893        ///     A map of data that will be passed to the event handler.
4894        /// </param>
4895        /// <param name="fn" type="Function">
4896        ///     A function to execute each time the event is triggered.
4897        /// </param>
4898        /// <returns type="jQuery" />
4899
4900        if (fn == null) {
4901            fn = data;
4902            data = null;
4903        }
4904
4905        return arguments.length > 0 ?
4906      this.bind(name, data, fn) :
4907      this.trigger(name);
4908    };
4909    jQuery.prototype.mouseover = function (data, fn) {
4910        /// <summary>
4911        ///     Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.
4912        ///     &#10;1 - mouseover(handler(eventObject))
4913        ///     &#10;2 - mouseover(eventData, handler(eventObject))
4914        ///     &#10;3 - mouseover()
4915        /// </summary>
4916        /// <param name="data" type="Object">
4917        ///     A map of data that will be passed to the event handler.
4918        /// </param>
4919        /// <param name="fn" type="Function">
4920        ///     A function to execute each time the event is triggered.
4921        /// </param>
4922        /// <returns type="jQuery" />
4923
4924        if (fn == null) {
4925            fn = data;
4926            data = null;
4927        }
4928
4929        return arguments.length > 0 ?
4930      this.bind(name, data, fn) :
4931      this.trigger(name);
4932    };
4933    jQuery.prototype.mouseup = function (data, fn) {
4934        /// <summary>
4935        ///     Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.
4936        ///     &#10;1 - mouseup(handler(eventObject))
4937        ///     &#10;2 - mouseup(eventData, handler(eventObject))
4938        ///     &#10;3 - mouseup()
4939        /// </summary>
4940        /// <param name="data" type="Object">
4941        ///     A map of data that will be passed to the event handler.
4942        /// </param>
4943        /// <param name="fn" type="Function">
4944        ///     A function to execute each time the event is triggered.
4945        /// </param>
4946        /// <returns type="jQuery" />
4947
4948        if (fn == null) {
4949            fn = data;
4950            data = null;
4951        }
4952
4953        return arguments.length > 0 ?
4954      this.bind(name, data, fn) :
4955      this.trigger(name);
4956    };
4957    jQuery.prototype.next = function (until, selector) {
4958        /// <summary>
4959        ///     Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
4960        /// </summary>
4961        /// <param name="until" type="String">
4962        ///     A string containing a selector expression to match elements against.
4963        /// </param>
4964        /// <returns type="jQuery" />
4965
4966        var ret = jQuery.map(this, fn, until),
4967        // The variable 'args' was introduced in
4968        // https://github.com/jquery/jquery/commit/52a0238
4969        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
4970        // http://code.google.com/p/v8/issues/detail?id=1050
4971      args = slice.call(arguments);
4972
4973        if (!runtil.test(name)) {
4974            selector = until;
4975        }
4976
4977        if (selector && typeof selector === "string") {
4978            ret = jQuery.filter(selector, ret);
4979        }
4980
4981        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
4982
4983        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
4984            ret = ret.reverse();
4985        }
4986
4987        return this.pushStack(ret, name, args.join(","));
4988    };
4989    jQuery.prototype.nextAll = function (until, selector) {
4990        /// <summary>
4991        ///     Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
4992        /// </summary>
4993        /// <param name="until" type="String">
4994        ///     A string containing a selector expression to match elements against.
4995        /// </param>
4996        /// <returns type="jQuery" />
4997
4998        var ret = jQuery.map(this, fn, until),
4999        // The variable 'args' was introduced in
5000        // https://github.com/jquery/jquery/commit/52a0238
5001        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5002        // http://code.google.com/p/v8/issues/detail?id=1050
5003      args = slice.call(arguments);
5004
5005        if (!runtil.test(name)) {
5006            selector = until;
5007        }
5008
5009        if (selector && typeof selector === "string") {
5010            ret = jQuery.filter(selector, ret);
5011        }
5012
5013        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5014
5015        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5016            ret = ret.reverse();
5017        }
5018
5019        return this.pushStack(ret, name, args.join(","));
5020    };
5021    jQuery.prototype.nextUntil = function (until, selector) {
5022        /// <summary>
5023        ///     Get all following siblings of each element up to but not including the element matched by the selector.
5024        /// </summary>
5025        /// <param name="until" type="String">
5026        ///     A string containing a selector expression to indicate where to stop matching following sibling elements.
5027        /// </param>
5028        /// <returns type="jQuery" />
5029
5030        var ret = jQuery.map(this, fn, until),
5031        // The variable 'args' was introduced in
5032        // https://github.com/jquery/jquery/commit/52a0238
5033        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5034        // http://code.google.com/p/v8/issues/detail?id=1050
5035      args = slice.call(arguments);
5036
5037        if (!runtil.test(name)) {
5038            selector = until;
5039        }
5040
5041        if (selector && typeof selector === "string") {
5042            ret = jQuery.filter(selector, ret);
5043        }
5044
5045        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5046
5047        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5048            ret = ret.reverse();
5049        }
5050
5051        return this.pushStack(ret, name, args.join(","));
5052    };
5053    jQuery.prototype.not = function (selector) {
5054        /// <summary>
5055        ///     Remove elements from the set of matched elements.
5056        ///     &#10;1 - not(selector)
5057        ///     &#10;2 - not(elements)
5058        ///     &#10;3 - not(function(index))
5059        /// </summary>
5060        /// <param name="selector" type="String">
5061        ///     A string containing a selector expression to match elements against.
5062        /// </param>
5063        /// <returns type="jQuery" />
5064
5065        return this.pushStack(winnow(this, selector, false), "not", selector);
5066    };
5067    jQuery.prototype.offset = function (options) {
5068        /// <summary>
5069        ///     1: Get the current coordinates of the first element in the set of matched elements, relative to the document.
5070        ///     &#10;    1.1 - offset()
5071        ///     &#10;2: Set the current coordinates of every element in the set of matched elements, relative to the document.
5072        ///     &#10;    2.1 - offset(coordinates)
5073        ///     &#10;    2.2 - offset(function(index, coords))
5074        /// </summary>
5075        /// <param name="options" type="Object">
5076        ///     An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
5077        /// </param>
5078        /// <returns type="jQuery" />
5079
5080        var elem = this[0], box;
5081
5082        if (options) {
5083            return this.each(function (i) {
5084                jQuery.offset.setOffset(this, options, i);
5085            });
5086        }
5087
5088        if (!elem || !elem.ownerDocument) {
5089            return null;
5090        }
5091
5092        if (elem === elem.ownerDocument.body) {
5093            return jQuery.offset.bodyOffset(elem);
5094        }
5095
5096        try {
5097            box = elem.getBoundingClientRect();
5098        } catch (e) { }
5099
5100        var doc = elem.ownerDocument,
5101      docElem = doc.documentElement;
5102
5103        // Make sure we're not dealing with a disconnected DOM node
5104        if (!box || !jQuery.contains(docElem, elem)) {
5105            return box ? { top: box.top, left: box.left} : { top: 0, left: 0 };
5106        }
5107
5108        var body = doc.body,
5109      win = getWindow(doc),
5110      clientTop = docElem.clientTop || body.clientTop || 0,
5111      clientLeft = docElem.clientLeft || body.clientLeft || 0,
5112      scrollTop = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop),
5113      scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
5114      top = box.top + scrollTop - clientTop,
5115      left = box.left + scrollLeft - clientLeft;
5116
5117        return { top: top, left: left };
5118    };
5119    jQuery.prototype.offsetParent = function () {
5120        /// <summary>
5121        ///     Get the closest ancestor element that is positioned.
5122        /// </summary>
5123        /// <returns type="jQuery" />
5124
5125        return this.map(function () {
5126            var offsetParent = this.offsetParent || document.body;
5127            while (offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static")) {
5128                offsetParent = offsetParent.offsetParent;
5129            }
5130            return offsetParent;
5131        });
5132    };
5133    jQuery.prototype.one = function (type, data, fn) {
5134        /// <summary>
5135        ///     Attach a handler to an event for the elements. The handler is executed at most once per element.
5136        /// </summary>
5137        /// <param name="type" type="String">
5138        ///     A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
5139        /// </param>
5140        /// <param name="data" type="Object">
5141        ///     A map of data that will be passed to the event handler.
5142        /// </param>
5143        /// <param name="fn" type="Function">
5144        ///     A function to execute at the time the event is triggered.
5145        /// </param>
5146        /// <returns type="jQuery" />
5147
5148        // Handle object literals
5149        if (typeof type === "object") {
5150            for (var key in type) {
5151                this[name](key, data, type[key], fn);
5152            }
5153            return this;
5154        }
5155
5156        if (jQuery.isFunction(data) || data === false) {
5157            fn = data;
5158            data = undefined;
5159        }
5160
5161        var handler = name === "one" ? jQuery.proxy(fn, function (event) {
5162            jQuery(this).unbind(event, handler);
5163            return fn.apply(this, arguments);
5164        }) : fn;
5165
5166        if (type === "unload" && name !== "one") {
5167            this.one(type, data, fn);
5168
5169        } else {
5170            for (var i = 0, l = this.length; i < l; i++) {
5171                jQuery.event.add(this[i], type, handler, data);
5172            }
5173        }
5174
5175        return this;
5176    };
5177    jQuery.prototype.outerHeight = function (margin) {
5178        /// <summary>
5179        ///     Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin.
5180        /// </summary>
5181        /// <param name="margin" type="Boolean">
5182        ///     A Boolean indicating whether to include the element's margin in the calculation.
5183        /// </param>
5184        /// <returns type="Number" />
5185
5186        return this[0] ?
5187      parseFloat(jQuery.css(this[0], type, margin ? "margin" : "border")) :
5188      null;
5189    };
5190    jQuery.prototype.outerWidth = function (margin) {
5191        /// <summary>
5192        ///     Get the current computed width for the first element in the set of matched elements, including padding and border.
5193        /// </summary>
5194        /// <param name="margin" type="Boolean">
5195        ///     A Boolean indicating whether to include the element's margin in the calculation.
5196        /// </param>
5197        /// <returns type="Number" />
5198
5199        return this[0] ?
5200      parseFloat(jQuery.css(this[0], type, margin ? "margin" : "border")) :
5201      null;
5202    };
5203    jQuery.prototype.parent = function (until, selector) {
5204        /// <summary>
5205        ///     Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
5206        /// </summary>
5207        /// <param name="until" type="String">
5208        ///     A string containing a selector expression to match elements against.
5209        /// </param>
5210        /// <returns type="jQuery" />
5211
5212        var ret = jQuery.map(this, fn, until),
5213        // The variable 'args' was introduced in
5214        // https://github.com/jquery/jquery/commit/52a0238
5215        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5216        // http://code.google.com/p/v8/issues/detail?id=1050
5217      args = slice.call(arguments);
5218
5219        if (!runtil.test(name)) {
5220            selector = until;
5221        }
5222
5223        if (selector && typeof selector === "string") {
5224            ret = jQuery.filter(selector, ret);
5225        }
5226
5227        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5228
5229        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5230            ret = ret.reverse();
5231        }
5232
5233        return this.pushStack(ret, name, args.join(","));
5234    };
5235    jQuery.prototype.parents = function (until, selector) {
5236        /// <summary>
5237        ///     Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
5238        /// </summary>
5239        /// <param name="until" type="String">
5240        ///     A string containing a selector expression to match elements against.
5241        /// </param>
5242        /// <returns type="jQuery" />
5243
5244        var ret = jQuery.map(this, fn, until),
5245        // The variable 'args' was introduced in
5246        // https://github.com/jquery/jquery/commit/52a0238
5247        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5248        // http://code.google.com/p/v8/issues/detail?id=1050
5249      args = slice.call(arguments);
5250
5251        if (!runtil.test(name)) {
5252            selector = until;
5253        }
5254
5255        if (selector && typeof selector === "string") {
5256            ret = jQuery.filter(selector, ret);
5257        }
5258
5259        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5260
5261        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5262            ret = ret.reverse();
5263        }
5264
5265        return this.pushStack(ret, name, args.join(","));
5266    };
5267    jQuery.prototype.parentsUntil = function (until, selector) {
5268        /// <summary>
5269        ///     Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector.
5270        /// </summary>
5271        /// <param name="until" type="String">
5272        ///     A string containing a selector expression to indicate where to stop matching ancestor elements.
5273        /// </param>
5274        /// <returns type="jQuery" />
5275
5276        var ret = jQuery.map(this, fn, until),
5277        // The variable 'args' was introduced in
5278        // https://github.com/jquery/jquery/commit/52a0238
5279        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5280        // http://code.google.com/p/v8/issues/detail?id=1050
5281      args = slice.call(arguments);
5282
5283        if (!runtil.test(name)) {
5284            selector = until;
5285        }
5286
5287        if (selector && typeof selector === "string") {
5288            ret = jQuery.filter(selector, ret);
5289        }
5290
5291        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5292
5293        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5294            ret = ret.reverse();
5295        }
5296
5297        return this.pushStack(ret, name, args.join(","));
5298    };
5299    jQuery.prototype.position = function () {
5300        /// <summary>
5301        ///     Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
5302        /// </summary>
5303        /// <returns type="Object" />
5304
5305        if (!this[0]) {
5306            return null;
5307        }
5308
5309        var elem = this[0],
5310
5311        // Get *real* offsetParent
5312    offsetParent = this.offsetParent(),
5313
5314        // Get correct offsets
5315    offset = this.offset(),
5316    parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0} : offsetParent.offset();
5317
5318        // Subtract element margins
5319        // note: when an element has margin: auto the offsetLeft and marginLeft
5320        // are the same in Safari causing offset.left to incorrectly be 0
5321        offset.top -= parseFloat(jQuery.css(elem, "marginTop")) || 0;
5322        offset.left -= parseFloat(jQuery.css(elem, "marginLeft")) || 0;
5323
5324        // Add offsetParent borders
5325        parentOffset.top += parseFloat(jQuery.css(offsetParent[0], "borderTopWidth")) || 0;
5326        parentOffset.left += parseFloat(jQuery.css(offsetParent[0], "borderLeftWidth")) || 0;
5327
5328        // Subtract the two offsets
5329        return {
5330            top: offset.top - parentOffset.top,
5331            left: offset.left - parentOffset.left
5332        };
5333    };
5334    jQuery.prototype.prepend = function () {
5335        /// <summary>
5336        ///     Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
5337        ///     &#10;1 - prepend(content, content)
5338        ///     &#10;2 - prepend(function(index, html))
5339        /// </summary>
5340        /// <param name="" type="jQuery">
5341        ///     DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
5342        /// </param>
5343        /// <param name="" type="jQuery">
5344        ///     One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
5345        /// </param>
5346        /// <returns type="jQuery" />
5347
5348        return this.domManip(arguments, true, function (elem) {
5349            if (this.nodeType === 1) {
5350                this.insertBefore(elem, this.firstChild);
5351            }
5352        });
5353    };
5354    jQuery.prototype.prependTo = function (selector) {
5355        /// <summary>
5356        ///     Insert every element in the set of matched elements to the beginning of the target.
5357        /// </summary>
5358        /// <param name="selector" type="jQuery">
5359        ///     A selector, element, HTML string, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
5360        /// </param>
5361        /// <returns type="jQuery" />
5362
5363        var ret = [],
5364      insert = jQuery(selector),
5365      parent = this.length === 1 && this[0].parentNode;
5366
5367        if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
5368            insert[original](this[0]);
5369            return this;
5370
5371        } else {
5372            for (var i = 0, l = insert.length; i < l; i++) {
5373                var elems = (i > 0 ? this.clone(true) : this).get();
5374                jQuery(insert[i])[original](elems);
5375                ret = ret.concat(elems);
5376            }
5377
5378            return this.pushStack(ret, name, insert.selector);
5379        }
5380    };
5381    jQuery.prototype.prev = function (until, selector) {
5382        /// <summary>
5383        ///     Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
5384        /// </summary>
5385        /// <param name="until" type="String">
5386        ///     A string containing a selector expression to match elements against.
5387        /// </param>
5388        /// <returns type="jQuery" />
5389
5390        var ret = jQuery.map(this, fn, until),
5391        // The variable 'args' was introduced in
5392        // https://github.com/jquery/jquery/commit/52a0238
5393        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5394        // http://code.google.com/p/v8/issues/detail?id=1050
5395      args = slice.call(arguments);
5396
5397        if (!runtil.test(name)) {
5398            selector = until;
5399        }
5400
5401        if (selector && typeof selector === "string") {
5402            ret = jQuery.filter(selector, ret);
5403        }
5404
5405        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5406
5407        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5408            ret = ret.reverse();
5409        }
5410
5411        return this.pushStack(ret, name, args.join(","));
5412    };
5413    jQuery.prototype.prevAll = function (until, selector) {
5414        /// <summary>
5415        ///     Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
5416        /// </summary>
5417        /// <param name="until" type="String">
5418        ///     A string containing a selector expression to match elements against.
5419        /// </param>
5420        /// <returns type="jQuery" />
5421
5422        var ret = jQuery.map(this, fn, until),
5423        // The variable 'args' was introduced in
5424        // https://github.com/jquery/jquery/commit/52a0238
5425        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5426        // http://code.google.com/p/v8/issues/detail?id=1050
5427      args = slice.call(arguments);
5428
5429        if (!runtil.test(name)) {
5430            selector = until;
5431        }
5432
5433        if (selector && typeof selector === "string") {
5434            ret = jQuery.filter(selector, ret);
5435        }
5436
5437        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5438
5439        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5440            ret = ret.reverse();
5441        }
5442
5443        return this.pushStack(ret, name, args.join(","));
5444    };
5445    jQuery.prototype.prevUntil = function (until, selector) {
5446        /// <summary>
5447        ///     Get all preceding siblings of each element up to but not including the element matched by the selector.
5448        /// </summary>
5449        /// <param name="until" type="String">
5450        ///     A string containing a selector expression to indicate where to stop matching preceding sibling elements.
5451        /// </param>
5452        /// <returns type="jQuery" />
5453
5454        var ret = jQuery.map(this, fn, until),
5455        // The variable 'args' was introduced in
5456        // https://github.com/jquery/jquery/commit/52a0238
5457        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5458        // http://code.google.com/p/v8/issues/detail?id=1050
5459      args = slice.call(arguments);
5460
5461        if (!runtil.test(name)) {
5462            selector = until;
5463        }
5464
5465        if (selector && typeof selector === "string") {
5466            ret = jQuery.filter(selector, ret);
5467        }
5468
5469        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
5470
5471        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
5472            ret = ret.reverse();
5473        }
5474
5475        return this.pushStack(ret, name, args.join(","));
5476    };
5477    jQuery.prototype.pushStack = function (elems, name, selector) {
5478        /// <summary>
5479        ///     Add a collection of DOM elements onto the jQuery stack.
5480        ///     &#10;1 - pushStack(elements)
5481        ///     &#10;2 - pushStack(elements, name, arguments)
5482        /// </summary>
5483        /// <param name="elems" type="Array">
5484        ///     An array of elements to push onto the stack and make into a new jQuery object.
5485        /// </param>
5486        /// <param name="name" type="String">
5487        ///     The name of a jQuery method that generated the array of elements.
5488        /// </param>
5489        /// <param name="selector" type="Array">
5490        ///     The arguments that were passed in to the jQuery method (for serialization).
5491        /// </param>
5492        /// <returns type="jQuery" />
5493
5494        // Build a new jQuery matched element set
5495        var ret = this.constructor();
5496
5497        if (jQuery.isArray(elems)) {
5498            push.apply(ret, elems);
5499
5500        } else {
5501            jQuery.merge(ret, elems);
5502        }
5503
5504        // Add the old object onto the stack (as a reference)
5505        ret.prevObject = this;
5506
5507        ret.context = this.context;
5508
5509        if (name === "find") {
5510            ret.selector = this.selector + (this.selector ? " " : "") + selector;
5511        } else if (name) {
5512            ret.selector = this.selector + "." + name + "(" + selector + ")";
5513        }
5514
5515        // Return the newly-formed element set
5516        return ret;
5517    };
5518    jQuery.prototype.queue = function (type, data) {
5519        /// <summary>
5520        ///     1: Show the queue of functions to be executed on the matched elements.
5521        ///     &#10;    1.1 - queue(queueName)
5522        ///     &#10;2: Manipulate the queue of functions to be executed on the matched elements.
5523        ///     &#10;    2.1 - queue(queueName, newQueue)
5524        ///     &#10;    2.2 - queue(queueName, callback( next ))
5525        /// </summary>
5526        /// <param name="type" type="String">
5527        ///     A string containing the name of the queue. Defaults to fx, the standard effects queue.
5528        /// </param>
5529        /// <param name="data" type="Array">
5530        ///     An array of functions to replace the current queue contents.
5531        /// </param>
5532        /// <returns type="jQuery" />
5533
5534        if (typeof type !== "string") {
5535            data = type;
5536            type = "fx";
5537        }
5538
5539        if (data === undefined) {
5540            return jQuery.queue(this[0], type);
5541        }
5542        return this.each(function (i) {
5543            var queue = jQuery.queue(this, type, data);
5544
5545            if (type === "fx" && queue[0] !== "inprogress") {
5546                jQuery.dequeue(this, type);
5547            }
5548        });
5549    };
5550    jQuery.prototype.ready = function (fn) {
5551        /// <summary>
5552        ///     Specify a function to execute when the DOM is fully loaded.
5553        /// </summary>
5554        /// <param name="fn" type="Function">
5555        ///     A function to execute after the DOM is ready.
5556        /// </param>
5557        /// <returns type="jQuery" />
5558
5559        // Attach the listeners
5560        jQuery.bindReady();
5561
5562        // Add the callback
5563        readyList.done(fn);
5564
5565        return this;
5566    };
5567    jQuery.prototype.remove = function (selector, keepData) {
5568        /// <summary>
5569        ///     Remove the set of matched elements from the DOM.
5570        /// </summary>
5571        /// <param name="selector" type="String">
5572        ///     A selector expression that filters the set of matched elements to be removed.
5573        /// </param>
5574        /// <returns type="jQuery" />
5575
5576        for (var i = 0, elem; (elem = this[i]) != null; i++) {
5577            if (!selector || jQuery.filter(selector, [elem]).length) {
5578                if (!keepData && elem.nodeType === 1) {
5579                    jQuery.cleanData(elem.getElementsByTagName("*"));
5580                    jQuery.cleanData([elem]);
5581                }
5582
5583                if (elem.parentNode) {
5584                    elem.parentNode.removeChild(elem);
5585                }
5586            }
5587        }
5588
5589        return this;
5590    };
5591    jQuery.prototype.removeAttr = function (name, fn) {
5592        /// <summary>
5593        ///     Remove an attribute from each element in the set of matched elements.
5594        /// </summary>
5595        /// <param name="name" type="String">
5596        ///     An attribute to remove.
5597        /// </param>
5598        /// <returns type="jQuery" />
5599
5600        return this.each(function () {
5601            jQuery.attr(this, name, "");
5602            if (this.nodeType === 1) {
5603                this.removeAttribute(name);
5604            }
5605        });
5606    };
5607    jQuery.prototype.removeClass = function (value) {
5608        /// <summary>
5609        ///     Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
5610        ///     &#10;1 - removeClass(className)
5611        ///     &#10;2 - removeClass(function(index, class))
5612        /// </summary>
5613        /// <param name="value" type="String">
5614        ///     A class name to be removed from the class attribute of each matched element.
5615        /// </param>
5616        /// <returns type="jQuery" />
5617
5618        if (jQuery.isFunction(value)) {
5619            return this.each(function (i) {
5620                var self = jQuery(this);
5621                self.removeClass(value.call(this, i, self.attr("class")));
5622            });
5623        }
5624
5625        if ((value && typeof value === "string") || value === undefined) {
5626            var classNames = (value || "").split(rspaces);
5627
5628            for (var i = 0, l = this.length; i < l; i++) {
5629                var elem = this[i];
5630
5631                if (elem.nodeType === 1 && elem.className) {
5632                    if (value) {
5633                        var className = (" " + elem.className + " ").replace(rclass, " ");
5634                        for (var c = 0, cl = classNames.length; c < cl; c++) {
5635                            className = className.replace(" " + classNames[c] + " ", " ");
5636                        }
5637                        elem.className = jQuery.trim(className);
5638
5639                    } else {
5640                        elem.className = "";
5641                    }
5642                }
5643            }
5644        }
5645
5646        return this;
5647    };
5648    jQuery.prototype.removeData = function (key) {
5649        /// <summary>
5650        ///     Remove a previously-stored piece of data.
5651        /// </summary>
5652        /// <param name="key" type="String">
5653        ///     A string naming the piece of data to delete.
5654        /// </param>
5655        /// <returns type="jQuery" />
5656
5657        return this.each(function () {
5658            jQuery.removeData(this, key);
5659        });
5660    };
5661    jQuery.prototype.replaceAll = function (selector) {
5662        /// <summary>
5663        ///     Replace each target element with the set of matched elements.
5664        /// </summary>
5665        /// <param name="selector" type="String">
5666        ///     A selector expression indicating which element(s) to replace.
5667        /// </param>
5668        /// <returns type="jQuery" />
5669
5670        var ret = [],
5671      insert = jQuery(selector),
5672      parent = this.length === 1 && this[0].parentNode;
5673
5674        if (parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1) {
5675            insert[original](this[0]);
5676            return this;
5677
5678        } else {
5679            for (var i = 0, l = insert.length; i < l; i++) {
5680                var elems = (i > 0 ? this.clone(true) : this).get();
5681                jQuery(insert[i])[original](elems);
5682                ret = ret.concat(elems);
5683            }
5684
5685            return this.pushStack(ret, name, insert.selector);
5686        }
5687    };
5688    jQuery.prototype.replaceWith = function (value) {
5689        /// <summary>
5690        ///     Replace each element in the set of matched elements with the provided new content.
5691        ///     &#10;1 - replaceWith(newContent)
5692        ///     &#10;2 - replaceWith(function)
5693        /// </summary>
5694        /// <param name="value" type="jQuery">
5695        ///     The content to insert. May be an HTML string, DOM element, or jQuery object.
5696        /// </param>
5697        /// <returns type="jQuery" />
5698
5699        if (this[0] && this[0].parentNode) {
5700            // Make sure that the elements are removed from the DOM before they are inserted
5701            // this can help fix replacing a parent with child elements
5702            if (jQuery.isFunction(value)) {
5703                return this.each(function (i) {
5704                    var self = jQuery(this), old = self.html();
5705                    self.replaceWith(value.call(this, i, old));
5706                });
5707            }
5708
5709            if (typeof value !== "string") {
5710                value = jQuery(value).detach();
5711            }
5712
5713            return this.each(function () {
5714                var next = this.nextSibling,
5715          parent = this.parentNode;
5716
5717                jQuery(this).remove();
5718
5719                if (next) {
5720                    jQuery(next).before(value);
5721                } else {
5722                    jQuery(parent).append(value);
5723                }
5724            });
5725        } else {
5726            return this.pushStack(jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value);
5727        }
5728    };
5729    jQuery.prototype.resize = function (data, fn) {
5730        /// <summary>
5731        ///     Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.
5732        ///     &#10;1 - resize(handler(eventObject))
5733        ///     &#10;2 - resize(eventData, handler(eventObject))
5734        ///     &#10;3 - resize()
5735        /// </summary>
5736        /// <param name="data" type="Object">
5737        ///     A map of data that will be passed to the event handler.
5738        /// </param>
5739        /// <param name="fn" type="Function">
5740        ///     A function to execute each time the event is triggered.
5741        /// </param>
5742        /// <returns type="jQuery" />
5743
5744        if (fn == null) {
5745            fn = data;
5746            data = null;
5747        }
5748
5749        return arguments.length > 0 ?
5750      this.bind(name, data, fn) :
5751      this.trigger(name);
5752    };
5753    jQuery.prototype.scroll = function (data, fn) {
5754        /// <summary>
5755        ///     Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.
5756        ///     &#10;1 - scroll(handler(eventObject))
5757        ///     &#10;2 - scroll(eventData, handler(eventObject))
5758        ///     &#10;3 - scroll()
5759        /// </summary>
5760        /// <param name="data" type="Object">
5761        ///     A map of data that will be passed to the event handler.
5762        /// </param>
5763        /// <param name="fn" type="Function">
5764        ///     A function to execute each time the event is triggered.
5765        /// </param>
5766        /// <returns type="jQuery" />
5767
5768        if (fn == null) {
5769            fn = data;
5770            data = null;
5771        }
5772
5773        return arguments.length > 0 ?
5774      this.bind(name, data, fn) :
5775      this.trigger(name);
5776    };
5777    jQuery.prototype.scrollLeft = function (val) {
5778        /// <summary>
5779        ///     1: Get the current horizontal position of the scroll bar for the first element in the set of matched elements.
5780        ///     &#10;    1.1 - scrollLeft()
5781        ///     &#10;2: Set the current horizontal position of the scroll bar for each of the set of matched elements.
5782        ///     &#10;    2.1 - scrollLeft(value)
5783        /// </summary>
5784        /// <param name="val" type="Number">
5785        ///     An integer indicating the new position to set the scroll bar to.
5786        /// </param>
5787        /// <returns type="jQuery" />
5788
5789        var elem = this[0], win;
5790
5791        if (!elem) {
5792            return null;
5793        }
5794
5795        if (val !== undefined) {
5796            // Set the scroll offset
5797            return this.each(function () {
5798                win = getWindow(this);
5799
5800                if (win) {
5801                    win.scrollTo(
5802            !i ? val : jQuery(win).scrollLeft(),
5803            i ? val : jQuery(win).scrollTop()
5804          );
5805
5806                } else {
5807                    this[method] = val;
5808                }
5809            });
5810        } else {
5811            win = getWindow(elem);
5812
5813            // Return the scroll offset
5814            return win ? ("pageXOffset" in win) ? win[i ? "pageYOffset" : "pageXOffset"] :
5815        jQuery.support.boxModel && win.document.documentElement[method] ||
5816          win.document.body[method] :
5817        elem[method];
5818        }
5819    };
5820    jQuery.prototype.scrollTop = function (val) {
5821        /// <summary>
5822        ///     1: Get the current vertical position of the scroll bar for the first element in the set of matched elements.
5823        ///     &#10;    1.1 - scrollTop()
5824        ///     &#10;2: Set the current vertical position of the scroll bar for each of the set of matched elements.
5825        ///     &#10;    2.1 - scrollTop(value)
5826        /// </summary>
5827        /// <param name="val" type="Number">
5828        ///     An integer indicating the new position to set the scroll bar to.
5829        /// </param>
5830        /// <returns type="jQuery" />
5831
5832        var elem = this[0], win;
5833
5834        if (!elem) {
5835            return null;
5836        }
5837
5838        if (val !== undefined) {
5839            // Set the scroll offset
5840            return this.each(function () {
5841                win = getWindow(this);
5842
5843                if (win) {
5844                    win.scrollTo(
5845            !i ? val : jQuery(win).scrollLeft(),
5846            i ? val : jQuery(win).scrollTop()
5847          );
5848
5849                } else {
5850                    this[method] = val;
5851                }
5852            });
5853        } else {
5854            win = getWindow(elem);
5855
5856            // Return the scroll offset
5857            return win ? ("pageXOffset" in win) ? win[i ? "pageYOffset" : "pageXOffset"] :
5858        jQuery.support.boxModel && win.document.documentElement[method] ||
5859          win.document.body[method] :
5860        elem[method];
5861        }
5862    };
5863    jQuery.prototype.select = function (data, fn) {
5864        /// <summary>
5865        ///     Bind an event handler to the "select" JavaScript event, or trigger that event on an element.
5866        ///     &#10;1 - select(handler(eventObject))
5867        ///     &#10;2 - select(eventData, handler(eventObject))
5868        ///     &#10;3 - select()
5869        /// </summary>
5870        /// <param name="data" type="Object">
5871        ///     A map of data that will be passed to the event handler.
5872        /// </param>
5873        /// <param name="fn" type="Function">
5874        ///     A function to execute each time the event is triggered.
5875        /// </param>
5876        /// <returns type="jQuery" />
5877
5878        if (fn == null) {
5879            fn = data;
5880            data = null;
5881        }
5882
5883        return arguments.length > 0 ?
5884      this.bind(name, data, fn) :
5885      this.trigger(name);
5886    };
5887    jQuery.prototype.serialize = function () {
5888        /// <summary>
5889        ///     Encode a set of form elements as a string for submission.
5890        /// </summary>
5891        /// <returns type="String" />
5892
5893        return jQuery.param(this.serializeArray());
5894    };
5895    jQuery.prototype.serializeArray = function () {
5896        /// <summary>
5897        ///     Encode a set of form elements as an array of names and values.
5898        /// </summary>
5899        /// <returns type="Array" />
5900
5901        return this.map(function () {
5902            return this.elements ? jQuery.makeArray(this.elements) : this;
5903        })
5904    .filter(function () {
5905        return this.name && !this.disabled &&
5906        (this.checked || rselectTextarea.test(this.nodeName) ||
5907          rinput.test(this.type));
5908    })
5909    .map(function (i, elem) {
5910        var val = jQuery(this).val();
5911
5912        return val == null ?
5913        null :
5914        jQuery.isArray(val) ?
5915          jQuery.map(val, function (val, i) {
5916              return { name: elem.name, value: val.replace(rCRLF, "\r\n") };
5917          }) :
5918          { name: elem.name, value: val.replace(rCRLF, "\r\n") };
5919    }).get();
5920    };
5921    jQuery.prototype.show = function (speed, easing, callback) {
5922        /// <summary>
5923        ///     Display the matched elements.
5924        ///     &#10;1 - show()
5925        ///     &#10;2 - show(duration, callback)
5926        ///     &#10;3 - show(duration, easing, callback)
5927        /// </summary>
5928        /// <param name="speed" type="Number">
5929        ///     A string or number determining how long the animation will run.
5930        /// </param>
5931        /// <param name="easing" type="String">
5932        ///     A string indicating which easing function to use for the transition.
5933        /// </param>
5934        /// <param name="callback" type="Function">
5935        ///     A function to call once the animation is complete.
5936        /// </param>
5937        /// <returns type="jQuery" />
5938
5939        var elem, display;
5940
5941        if (speed || speed === 0) {
5942            return this.animate(genFx("show", 3), speed, easing, callback);
5943
5944        } else {
5945            for (var i = 0, j = this.length; i < j; i++) {
5946                elem = this[i];
5947                display = elem.style.display;
5948
5949                // Reset the inline display of this element to learn if it is
5950                // being hidden by cascaded rules or not
5951                if (!jQuery._data(elem, "olddisplay") && display === "none") {
5952                    display = elem.style.display = "";
5953                }
5954
5955                // Set elements which have been overridden with display: none
5956                // in a stylesheet to whatever the default browser style is
5957                // for such an element
5958                if (display === "" && jQuery.css(elem, "display") === "none") {
5959                    jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
5960                }
5961            }
5962
5963            // Set the display of most of the elements in a second loop
5964            // to avoid the constant reflow
5965            for (i = 0; i < j; i++) {
5966                elem = this[i];
5967                display = elem.style.display;
5968
5969                if (display === "" || display === "none") {
5970                    elem.style.display = jQuery._data(elem, "olddisplay") || "";
5971                }
5972            }
5973
5974            return this;
5975        }
5976    };
5977    jQuery.prototype.siblings = function (until, selector) {
5978        /// <summary>
5979        ///     Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
5980        /// </summary>
5981        /// <param name="until" type="String">
5982        ///     A string containing a selector expression to match elements against.
5983        /// </param>
5984        /// <returns type="jQuery" />
5985
5986        var ret = jQuery.map(this, fn, until),
5987        // The variable 'args' was introduced in
5988        // https://github.com/jquery/jquery/commit/52a0238
5989        // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5990        // http://code.google.com/p/v8/issues/detail?id=1050
5991      args = slice.call(arguments);
5992
5993        if (!runtil.test(name)) {
5994            selector = until;
5995        }
5996
5997        if (selector && typeof selector === "string") {
5998            ret = jQuery.filter(selector, ret);
5999        }
6000
6001        ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
6002
6003        if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
6004            ret = ret.reverse();
6005        }
6006
6007        return this.pushStack(ret, name, args.join(","));
6008    };
6009    jQuery.prototype.size = function () {
6010        /// <summary>
6011        ///     Return the number of elements in the jQuery object.
6012        /// </summary>
6013        /// <returns type="Number" />
6014
6015        return this.length;
6016    };
6017    jQuery.prototype.slice = function () {
6018        /// <summary>
6019        ///     Reduce the set of matched elements to a subset specified by a range of indices.
6020        /// </summary>
6021        /// <param name="" type="Number">
6022        ///     An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.
6023        /// </param>
6024        /// <param name="" type="Number">
6025        ///     An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.
6026        /// </param>
6027        /// <returns type="jQuery" />
6028
6029        return this.pushStack(slice.apply(this, arguments),
6030      "slice", slice.call(arguments).join(","));
6031    };
6032    jQuery.prototype.slideDown = function (speed, easing, callback) {
6033        /// <summary>
6034        ///     Display the matched elements with a sliding motion.
6035        ///     &#10;1 - slideDown(duration, callback)
6036        ///     &#10;2 - slideDown(duration, easing, callback)
6037        /// </summary>
6038        /// <param name="speed" type="Number">
6039        ///     A string or number determining how long the animation will run.
6040        /// </param>
6041        /// <param name="easing" type="String">
6042        ///     A string indicating which easing function to use for the transition.
6043        /// </param>
6044        /// <param name="callback" type="Function">
6045        ///     A function to call once the animation is complete.
6046        /// </param>
6047        /// <returns type="jQuery" />
6048
6049        return this.animate(props, speed, easing, callback);
6050    };
6051    jQuery.prototype.slideToggle = function (speed, easing, callback) {
6052        /// <summary>
6053        ///     Display or hide the matched elements with a sliding motion.
6054        ///     &#10;1 - slideToggle(duration, callback)
6055        ///     &#10;2 - slideToggle(duration, easing, callback)
6056        /// </summary>
6057        /// <param name="speed" type="Number">
6058        ///     A string or number determining how long the animation will run.
6059        /// </param>
6060        /// <param name="easing" type="String">
6061        ///     A string indicating which easing function to use for the transition.
6062        /// </param>
6063        /// <param name="callback" type="Function">
6064        ///     A function to call once the animation is complete.
6065        /// </param>
6066        /// <returns type="jQuery" />
6067
6068        return this.animate(props, speed, easing, callback);
6069    };
6070    jQuery.prototype.slideUp = function (speed, easing, callback) {
6071        /// <summary>
6072        ///     Hide the matched elements with a sliding motion.
6073        ///     &#10;1 - slideUp(duration, callback)
6074        ///     &#10;2 - slideUp(duration, easing, callback)
6075        /// </summary>
6076        /// <param name="speed" type="Number">
6077        ///     A string or number determining how long the animation will run.
6078        /// </param>
6079        /// <param name="easing" type="String">
6080        ///     A string indicating which easing function to use for the transition.
6081        /// </param>
6082        /// <param name="callback" type="Function">
6083        ///     A function to call once the animation is complete.
6084        /// </param>
6085        /// <returns type="jQuery" />
6086
6087        return this.animate(props, speed, easing, callback);
6088    };
6089    jQuery.prototype.stop = function (clearQueue, gotoEnd) {
6090        /// <summary>
6091        ///     Stop the currently-running animation on the matched elements.
6092        /// </summary>
6093        /// <param name="clearQueue" type="Boolean">
6094        ///     A Boolean indicating whether to remove queued animation as well. Defaults to false.
6095        /// </param>
6096        /// <param name="gotoEnd" type="Boolean">
6097        ///     A Boolean indicating whether to complete the current animation immediately. Defaults to false.
6098        /// </param>
6099        /// <returns type="jQuery" />
6100
6101        var timers = jQuery.timers;
6102
6103        if (clearQueue) {
6104            this.queue([]);
6105        }
6106
6107        this.each(function () {
6108            // go in reverse order so anything added to the queue during the loop is ignored
6109            for (var i = timers.length - 1; i >= 0; i--) {
6110                if (timers[i].elem === this) {
6111                    if (gotoEnd) {
6112                        // force the next step to be the last
6113                        timers[i](true);
6114                    }
6115
6116                    timers.splice(i, 1);
6117                }
6118            }
6119        });
6120
6121        // start the next in the queue if the last step wasn't forced
6122        if (!gotoEnd) {
6123            this.dequeue();
6124        }
6125
6126        return this;
6127    };
6128    jQuery.prototype.submit = function (data, fn) {
6129        /// <summary>
6130        ///     Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.
6131        ///     &#10;1 - submit(handler(eventObject))
6132        ///     &#10;2 - submit(eventData, handler(eventObject))
6133        ///     &#10;3 - submit()
6134        /// </summary>
6135        /// <param name="data" type="Object">
6136        ///     A map of data that will be passed to the event handler.
6137        /// </param>
6138        /// <param name="fn" type="Function">
6139        ///     A function to execute each time the event is triggered.
6140        /// </param>
6141        /// <returns type="jQuery" />
6142
6143        if (fn == null) {
6144            fn = data;
6145            data = null;
6146        }
6147
6148        return arguments.length > 0 ?
6149      this.bind(name, data, fn) :
6150      this.trigger(name);
6151    };
6152    jQuery.prototype.text = function (text) {
6153        /// <summary>
6154        ///     1: Get the combined text contents of each element in the set of matched elements, including their descendants.
6155        ///     &#10;    1.1 - text()
6156        ///     &#10;2: Set the content of each element in the set of matched elements to the specified text.
6157        ///     &#10;    2.1 - text(textString)
6158        ///     &#10;    2.2 - text(function(index, text))
6159        /// </summary>
6160        /// <param name="text" type="String">
6161        ///     A string of text to set as the content of each matched element.
6162        /// </param>
6163        /// <returns type="jQuery" />
6164
6165        if (jQuery.isFunction(text)) {
6166            return this.each(function (i) {
6167                var self = jQuery(this);
6168
6169                self.text(text.call(this, i, self.text()));
6170            });
6171        }
6172
6173        if (typeof text !== "object" && text !== undefined) {
6174            return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(text));
6175        }
6176
6177        return jQuery.text(this);
6178    };
6179    jQuery.prototype.toArray = function () {
6180        /// <summary>
6181        ///     Retrieve all the DOM elements contained in the jQuery set, as an array.
6182        /// </summary>
6183        /// <returns type="Array" />
6184
6185        return slice.call(this, 0);
6186    };
6187    jQuery.prototype.toggle = function (fn, fn2, callback) {
6188        /// <summary>
6189        ///     1: Bind two or more handlers to the matched elements, to be executed on alternate clicks.
6190        ///     &#10;    1.1 - toggle(handler(eventObject), handler(eventObject), handler(eventObject))
6191        ///     &#10;2: Display or hide the matched elements.
6192        ///     &#10;    2.1 - toggle(duration, callback)
6193        ///     &#10;    2.2 - toggle(duration, easing, callback)
6194        ///     &#10;    2.3 - toggle(showOrHide)
6195        /// </summary>
6196        /// <param name="fn" type="Function">
6197        ///     A function to execute every even time the element is clicked.
6198        /// </param>
6199        /// <param name="fn2" type="Function">
6200        ///     A function to execute every odd time the element is clicked.
6201        /// </param>
6202        /// <param name="callback" type="Function">
6203        ///     Additional handlers to cycle through after clicks.
6204        /// </param>
6205        /// <returns type="jQuery" />
6206
6207        var bool = typeof fn === "boolean";
6208
6209        if (jQuery.isFunction(fn) && jQuery.isFunction(fn2)) {
6210            this._toggle.apply(this, arguments);
6211
6212        } else if (fn == null || bool) {
6213            this.each(function () {
6214                var state = bool ? fn : jQuery(this).is(":hidden");
6215                jQuery(this)[state ? "show" : "hide"]();
6216            });
6217
6218        } else {
6219            this.animate(genFx("toggle", 3), fn, fn2, callback);
6220        }
6221
6222        return this;
6223    };
6224    jQuery.prototype.toggleClass = function (value, stateVal) {
6225        /// <summary>
6226        ///     Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
6227        ///     &#10;1 - toggleClass(className)
6228        ///     &#10;2 - toggleClass(className, switch)
6229        ///     &#10;3 - toggleClass(function(index, class), switch)
6230        /// </summary>
6231        /// <param name="value" type="String">
6232        ///     One or more class names (separated by spaces) to be toggled for each element in the matched set.
6233        /// </param>
6234        /// <param name="stateVal" type="Boolean">
6235        ///     A boolean value to determine whether the class should be added or removed.
6236        /// </param>
6237        /// <returns type="jQuery" />
6238
6239        var type = typeof value,
6240      isBool = typeof stateVal === "boolean";
6241
6242        if (jQuery.isFunction(value)) {
6243            return this.each(function (i) {
6244                var self = jQuery(this);
6245                self.toggleClass(value.call(this, i, self.attr("class"), stateVal), stateVal);
6246            });
6247        }
6248
6249        return this.each(function () {
6250            if (type === "string") {
6251                // toggle individual class names
6252                var className,
6253          i = 0,
6254          self = jQuery(this),
6255          state = stateVal,
6256          classNames = value.split(rspaces);
6257
6258                while ((className = classNames[i++])) {
6259                    // check each className given, space seperated list
6260                    state = isBool ? state : !self.hasClass(className);
6261                    self[state ? "addClass" : "removeClass"](className);
6262                }
6263
6264            } else if (type === "undefined" || type === "boolean") {
6265                if (this.className) {
6266                    // store className if set
6267                    jQuery._data(this, "__className__", this.className);
6268                }
6269
6270                // toggle whole className
6271                this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || "";
6272            }
6273        });
6274    };
6275    jQuery.prototype.trigger = function (type, data) {
6276        /// <summary>
6277        ///     Execute all handlers and behaviors attached to the matched elements for the given event type.
6278        ///     &#10;1 - trigger(eventType, extraParameters)
6279        ///     &#10;2 - trigger(event)
6280        /// </summary>
6281        /// <param name="type" type="String">
6282        ///     A string containing a JavaScript event type, such as click or submit.
6283        /// </param>
6284        /// <param name="data" type="Array">
6285        ///     An array of additional parameters to pass along to the event handler.
6286        /// </param>
6287        /// <returns type="jQuery" />
6288
6289        return this.each(function () {
6290            jQuery.event.trigger(type, data, this);
6291        });
6292    };
6293    jQuery.prototype.triggerHandler = function (type, data) {
6294        /// <summary>
6295        ///     Execute all handlers attached to an element for an event.
6296        /// </summary>
6297        /// <param name="type" type="String">
6298        ///     A string containing a JavaScript event type, such as click or submit.
6299        /// </param>
6300        /// <param name="data" type="Array">
6301        ///     An array of additional parameters to pass along to the event handler.
6302        /// </param>
6303        /// <returns type="Object" />
6304
6305        if (this[0]) {
6306            var event = jQuery.Event(type);
6307            event.preventDefault();
6308            event.stopPropagation();
6309            jQuery.event.trigger(event, data, this[0]);
6310            return event.result;
6311        }
6312    };
6313    jQuery.prototype.unbind = function (type, fn) {
6314        /// <summary>
6315        ///     Remove a previously-attached event handler from the elements.
6316        ///     &#10;1 - unbind(eventType, handler(eventObject))
6317        ///     &#10;2 - unbind(eventType, false)
6318        ///     &#10;3 - unbind(event)
6319        /// </summary>
6320        /// <param name="type" type="String">
6321        ///     A string containing a JavaScript event type, such as click or submit.
6322        /// </param>
6323        /// <param name="fn" type="Function">
6324        ///     The function that is to be no longer executed.
6325        /// </param>
6326        /// <returns type="jQuery" />
6327
6328        // Handle object literals
6329        if (typeof type === "object" && !type.preventDefault) {
6330            for (var key in type) {
6331                this.unbind(key, type[key]);
6332            }
6333
6334        } else {
6335            for (var i = 0, l = this.length; i < l; i++) {
6336                jQuery.event.remove(this[i], type, fn);
6337            }
6338        }
6339
6340        return this;
6341    };
6342    jQuery.prototype.undelegate = function (selector, types, fn) {
6343        /// <summary>
6344        ///     Remove a handler from the event for all elements which match the current selector, now or in the future, based upon a specific set of root elements.
6345        ///     &#10;1 - undelegate()
6346        ///     &#10;2 - undelegate(selector, eventType)
6347        ///     &#10;3 - undelegate(selector, eventType, handler)
6348        /// </summary>
6349        /// <param name="selector" type="String">
6350        ///     A selector which will be used to filter the event results.
6351        /// </param>
6352        /// <param name="types" type="String">
6353        ///     A string containing a JavaScript event type, such as "click" or "keydown"
6354        /// </param>
6355        /// <param name="fn" type="Function">
6356        ///     A function to execute at the time the event is triggered.
6357        /// </param>
6358        /// <returns type="jQuery" />
6359
6360        if (arguments.length === 0) {
6361            return this.unbind("live");
6362
6363        } else {
6364            return this.die(types, null, fn, selector);
6365        }
6366    };
6367    jQuery.prototype.unload = function (data, fn) {
6368        /// <summary>
6369        ///     Bind an event handler to the "unload" JavaScript event.
6370        ///     &#10;1 - unload(handler(eventObject))
6371        ///     &#10;2 - unload(eventData, handler(eventObject))
6372        /// </summary>
6373        /// <param name="data" type="Object">
6374        ///     A map of data that will be passed to the event handler.
6375        /// </param>
6376        /// <param name="fn" type="Function">
6377        ///     A function to execute each time the event is triggered.
6378        /// </param>
6379        /// <returns type="jQuery" />
6380
6381        if (fn == null) {
6382            fn = data;
6383            data = null;
6384        }
6385
6386        return arguments.length > 0 ?
6387      this.bind(name, data, fn) :
6388      this.trigger(name);
6389    };
6390    jQuery.prototype.unwrap = function () {
6391        /// <summary>
6392        ///     Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
6393        /// </summary>
6394        /// <returns type="jQuery" />
6395
6396        return this.parent().each(function () {
6397            if (!jQuery.nodeName(this, "body")) {
6398                jQuery(this).replaceWith(this.childNodes);
6399            }
6400        }).end();
6401    };
6402    jQuery.prototype.val = function (value) {
6403        /// <summary>
6404        ///     1: Get the current value of the first element in the set of matched elements.
6405        ///     &#10;    1.1 - val()
6406        ///     &#10;2: Set the value of each element in the set of matched elements.
6407        ///     &#10;    2.1 - val(value)
6408        ///     &#10;    2.2 - val(function(index, value))
6409        /// </summary>
6410        /// <param name="value" type="String">
6411        ///     A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
6412        /// </param>
6413        /// <returns type="jQuery" />
6414
6415        if (!arguments.length) {
6416            var elem = this[0];
6417
6418            if (elem) {
6419                if (jQuery.nodeName(elem, "option")) {
6420                    // attributes.value is undefined in Blackberry 4.7 but
6421                    // uses .value. See #6932
6422                    var val = elem.attributes.value;
6423                    return !val || val.specified ? elem.value : elem.text;
6424                }
6425
6426                // We need to handle select boxes special
6427                if (jQuery.nodeName(elem, "select")) {
6428                    var index = elem.selectedIndex,
6429            values = [],
6430            options = elem.options,
6431            one = elem.type === "select-one";
6432
6433                    // Nothing was selected
6434                    if (index < 0) {
6435                        return null;
6436                    }
6437
6438                    // Loop through all the selected options
6439                    for (var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++) {
6440                        var option = options[i];
6441
6442                        // Don't return options that are disabled or in a disabled optgroup
6443                        if (option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
6444                (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) {
6445
6446                            // Get the specific value for the option
6447                            value = jQuery(option).val();
6448
6449                            // We don't need an array for one selects
6450                            if (one) {
6451                                return value;
6452                            }
6453
6454                            // Multi-Selects return an array
6455                            values.push(value);
6456                        }
6457                    }
6458
6459                    // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
6460                    if (one && !values.length && options.length) {
6461                        return jQuery(options[index]).val();
6462                    }
6463
6464                    return values;
6465                }
6466
6467                // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
6468                if (rradiocheck.test(elem.type) && !jQuery.support.checkOn) {
6469                    return elem.getAttribute("value") === null ? "on" : elem.value;
6470                }
6471
6472                // Everything else, we just grab the value
6473                return (elem.value || "").replace(rreturn, "");
6474
6475            }
6476
6477            return undefined;
6478        }
6479
6480        var isFunction = jQuery.isFunction(value);
6481
6482        return this.each(function (i) {
6483            var self = jQuery(this), val = value;
6484
6485            if (this.nodeType !== 1) {
6486                return;
6487            }
6488
6489            if (isFunction) {
6490                val = value.call(this, i, self.val());
6491            }
6492
6493            // Treat null/undefined as ""; convert numbers to string
6494            if (val == null) {
6495                val = "";
6496            } else if (typeof val === "number") {
6497                val += "";
6498            } else if (jQuery.isArray(val)) {
6499                val = jQuery.map(val, function (value) {
6500                    return value == null ? "" : value + "";
6501                });
6502            }
6503
6504            if (jQuery.isArray(val) && rradiocheck.test(this.type)) {
6505                this.checked = jQuery.inArray(self.val(), val) >= 0;
6506
6507            } else if (jQuery.nodeName(this, "select")) {
6508                var values = jQuery.makeArray(val);
6509
6510                jQuery("option", this).each(function () {
6511                    this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0;
6512                });
6513
6514                if (!values.length) {
6515                    this.selectedIndex = -1;
6516                }
6517
6518            } else {
6519                this.value = val;
6520            }
6521        });
6522    };
6523    jQuery.prototype.width = function (size) {
6524        /// <summary>
6525        ///     1: Get the current computed width for the first element in the set of matched elements.
6526        ///     &#10;    1.1 - width()
6527        ///     &#10;2: Set the CSS width of each element in the set of matched elements.
6528        ///     &#10;    2.1 - width(value)
6529        ///     &#10;    2.2 - width(function(index, width))
6530        /// </summary>
6531        /// <param name="size" type="Number">
6532        ///     An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
6533        /// </param>
6534        /// <returns type="jQuery" />
6535
6536        // Get window width or height
6537        var elem = this[0];
6538        if (!elem) {
6539            return size == null ? null : this;
6540        }
6541
6542        if (jQuery.isFunction(size)) {
6543            return this.each(function (i) {
6544                var self = jQuery(this);
6545                self[type](size.call(this, i, self[type]()));
6546            });
6547        }
6548
6549        if (jQuery.isWindow(elem)) {
6550            // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
6551            // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
6552            var docElemProp = elem.document.documentElement["client" + name];
6553            return elem.document.compatMode === "CSS1Compat" && docElemProp ||
6554        elem.document.body["client" + name] || docElemProp;
6555
6556            // Get document width or height
6557        } else if (elem.nodeType === 9) {
6558            // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
6559            return Math.max(
6560        elem.documentElement["client" + name],
6561        elem.body["scroll" + name], elem.documentElement["scroll" + name],
6562        elem.body["offset" + name], elem.documentElement["offset" + name]
6563      );
6564
6565            // Get or set width or height on the element
6566        } else if (size === undefined) {
6567            var orig = jQuery.css(elem, type),
6568        ret = parseFloat(orig);
6569
6570            return jQuery.isNaN(ret) ? orig : ret;
6571
6572            // Set the width or height on the element (default to pixels if value is unitless)
6573        } else {
6574            return this.css(type, typeof size === "string" ? size : size + "px");
6575        }
6576    };
6577    jQuery.prototype.wrap = function (html) {
6578        /// <summary>
6579        ///     Wrap an HTML structure around each element in the set of matched elements.
6580        ///     &#10;1 - wrap(wrappingElement)
6581        ///     &#10;2 - wrap(wrappingFunction)
6582        /// </summary>
6583        /// <param name="html" type="jQuery">
6584        ///     An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.
6585        /// </param>
6586        /// <returns type="jQuery" />
6587
6588        return this.each(function () {
6589            jQuery(this).wrapAll(html);
6590        });
6591    };
6592    jQuery.prototype.wrapAll = function (html) {
6593        /// <summary>
6594        ///     Wrap an HTML structure around all elements in the set of matched elements.
6595        /// </summary>
6596        /// <param name="html" type="jQuery">
6597        ///     An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the matched elements.
6598        /// </param>
6599        /// <returns type="jQuery" />
6600
6601        if (jQuery.isFunction(html)) {
6602            return this.each(function (i) {
6603                jQuery(this).wrapAll(html.call(this, i));
6604            });
6605        }
6606
6607        if (this[0]) {
6608            // The elements to wrap the target around
6609            var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
6610
6611            if (this[0].parentNode) {
6612                wrap.insertBefore(this[0]);
6613            }
6614
6615            wrap.map(function () {
6616                var elem = this;
6617
6618                while (elem.firstChild && elem.firstChild.nodeType === 1) {
6619                    elem = elem.firstChild;
6620                }
6621
6622                return elem;
6623            }).append(this);
6624        }
6625
6626        return this;
6627    };
6628    jQuery.prototype.wrapInner = function (html) {
6629        /// <summary>
6630        ///     Wrap an HTML structure around the content of each element in the set of matched elements.
6631        ///     &#10;1 - wrapInner(wrappingElement)
6632        ///     &#10;2 - wrapInner(wrappingFunction)
6633        /// </summary>
6634        /// <param name="html" type="String">
6635        ///     An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
6636        /// </param>
6637        /// <returns type="jQuery" />
6638
6639        if (jQuery.isFunction(html)) {
6640            return this.each(function (i) {
6641                jQuery(this).wrapInner(html.call(this, i));
6642            });
6643        }
6644
6645        return this.each(function () {
6646            var self = jQuery(this),
6647        contents = self.contents();
6648
6649            if (contents.length) {
6650                contents.wrapAll(html);
6651
6652            } else {
6653                self.append(html);
6654            }
6655        });
6656    };
6657    jQuery.fn = jQuery.prototype;
6658    jQuery.fn.init.prototype = jQuery.fn;
6659    window.jQuery = window.$ = jQuery;
6660})(window);
Note: See TracBrowser for help on using the repository browser.