PageRenderTime 61ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 1ms

/BlogEngine/BlogEngine.NET/Scripts/jquery-1.4.3-vsdoc.js

#
JavaScript | 8295 lines | 5904 code | 836 blank | 1555 comment | 880 complexity | b8df9c192618743de17330869a6cc6a0 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. /*
  2. * This file has been commented to support Visual Studio Intellisense.
  3. * You should not use this file at runtime inside the browser--it is only
  4. * intended to be used only for design-time IntelliSense. Please use the
  5. * standard jQuery library for all production use.
  6. *
  7. * Comment version: 1.4.3a
  8. */
  9. /*!
  10. * jQuery JavaScript Library v1.4.3
  11. * http://jquery.com/
  12. *
  13. * Copyright 2010, John Resig
  14. * Dual licensed under the MIT or GPL Version 2 licenses.
  15. * http://jquery.org/license
  16. *
  17. * Includes Sizzle.js
  18. * http://sizzlejs.com/
  19. * Copyright 2010, The Dojo Foundation
  20. * Released under the MIT, BSD, and GPL Licenses.
  21. *
  22. * Date: Thu Oct 14 23:10:06 2010 -0400
  23. */
  24. (function( window, undefined ) {
  25. // Use the correct document accordingly with window argument (sandbox)
  26. var document = window.document;
  27. var jQuery = (function() {
  28. // Define a local copy of jQuery
  29. var jQuery = function( selector, context ) {
  30. /// <summary>
  31. /// 1: $(expression, context) - This function accepts a string containing a CSS selector which is then used to match a set of elements.
  32. /// 2: $(html) - Create DOM elements on-the-fly from the provided String of raw HTML.
  33. /// 3: $(elements) - Wrap jQuery functionality around a single or multiple DOM Element(s).
  34. /// 4: $(callback) - A shorthand for $(document).ready().
  35. /// 5: $() - As of jQuery 1.4, if you pass no arguments in to the jQuery() method, an empty jQuery set will be returned.
  36. /// API: <see href="http://api.jquery.com/jQuery/">jQuery()</see>
  37. /// Categories: <see href="http://api.jquery.com/category/core/">Core</see>
  38. /// </summary>
  39. /// <param name="selector" type="String">
  40. /// 1: expression - An expression to search with.
  41. /// 2: html - A string of HTML to create on the fly.
  42. /// 3: elements - DOM element(s) to be encapsulated by a jQuery object.
  43. /// 4: callback - The function to execute when the DOM is ready.
  44. /// </param>
  45. /// <param name="context" type="jQuery">
  46. /// 1: context - A DOM Element, Document or jQuery to use as context.
  47. /// </param>
  48. /// <returns type="jQuery" />
  49. // The jQuery object is actually just the init constructor 'enhanced'
  50. return new jQuery.fn.init( selector, context );
  51. },
  52. // Map over jQuery in case of overwrite
  53. _jQuery = window.jQuery,
  54. // Map over the $ in case of overwrite
  55. _$ = window.$,
  56. // A central reference to the root jQuery(document)
  57. rootjQuery,
  58. // A simple way to check for HTML strings or ID strings
  59. // (both of which we optimize for)
  60. quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
  61. // Is it a simple selector
  62. isSimple = /^.[^:#\[\.,]*$/,
  63. // Check if a string has a non-whitespace character in it
  64. rnotwhite = /\S/,
  65. rwhite = /\s/,
  66. // Used for trimming whitespace
  67. trimLeft = /^\s+/,
  68. trimRight = /\s+$/,
  69. // Check for non-word characters
  70. rnonword = /\W/,
  71. // Check for digits
  72. rdigit = /\d/,
  73. // Match a standalone tag
  74. rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
  75. // JSON RegExp
  76. rvalidchars = /^[\],:{}\s]*$/,
  77. rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
  78. rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  79. rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
  80. // Useragent RegExp
  81. rwebkit = /(webkit)[ \/]([\w.]+)/,
  82. ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
  83. rmsie = /(msie) ([\w.]+)/,
  84. rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
  85. // Keep a UserAgent string for use with jQuery.browser
  86. userAgent = navigator.userAgent,
  87. // For matching the engine and version of the browser
  88. browserMatch,
  89. // Has the ready events already been bound?
  90. readyBound = false,
  91. // The functions to execute on DOM ready
  92. readyList = [],
  93. // The ready event handler
  94. DOMContentLoaded,
  95. // Save a reference to some core methods
  96. toString = Object.prototype.toString,
  97. hasOwn = Object.prototype.hasOwnProperty,
  98. push = Array.prototype.push,
  99. slice = Array.prototype.slice,
  100. trim = String.prototype.trim,
  101. indexOf = Array.prototype.indexOf,
  102. // [[Class]] -> type pairs
  103. class2type = {};
  104. jQuery.fn = jQuery.prototype = {
  105. init: function( selector, context ) {
  106. var match, elem, ret, doc;
  107. // Handle $(""), $(null), or $(undefined)
  108. if ( !selector ) {
  109. return this;
  110. }
  111. // Handle $(DOMElement)
  112. if ( selector.nodeType ) {
  113. this.context = this[0] = selector;
  114. this.length = 1;
  115. return this;
  116. }
  117. // The body element only exists once, optimize finding it
  118. if ( selector === "body" && !context && document.body ) {
  119. this.context = document;
  120. this[0] = document.body;
  121. this.selector = "body";
  122. this.length = 1;
  123. return this;
  124. }
  125. // Handle HTML strings
  126. if ( typeof selector === "string" ) {
  127. // Are we dealing with HTML string or an ID?
  128. match = quickExpr.exec( selector );
  129. // Verify a match, and that no context was specified for #id
  130. if ( match && (match[1] || !context) ) {
  131. // HANDLE: $(html) -> $(array)
  132. if ( match[1] ) {
  133. doc = (context ? context.ownerDocument || context : document);
  134. // If a single string is passed in and it's a single tag
  135. // just do a createElement and skip the rest
  136. ret = rsingleTag.exec( selector );
  137. if ( ret ) {
  138. if ( jQuery.isPlainObject( context ) ) {
  139. selector = [ document.createElement( ret[1] ) ];
  140. jQuery.fn.attr.call( selector, context, true );
  141. } else {
  142. selector = [ doc.createElement( ret[1] ) ];
  143. }
  144. } else {
  145. ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
  146. selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
  147. }
  148. return jQuery.merge( this, selector );
  149. // HANDLE: $("#id")
  150. } else {
  151. elem = document.getElementById( match[2] );
  152. // Check parentNode to catch when Blackberry 4.6 returns
  153. // nodes that are no longer in the document #6963
  154. if ( elem && elem.parentNode ) {
  155. // Handle the case where IE and Opera return items
  156. // by name instead of ID
  157. if ( elem.id !== match[2] ) {
  158. return rootjQuery.find( selector );
  159. }
  160. // Otherwise, we inject the element directly into the jQuery object
  161. this.length = 1;
  162. this[0] = elem;
  163. }
  164. this.context = document;
  165. this.selector = selector;
  166. return this;
  167. }
  168. // HANDLE: $("TAG")
  169. } else if ( !context && !rnonword.test( selector ) ) {
  170. this.selector = selector;
  171. this.context = document;
  172. selector = document.getElementsByTagName( selector );
  173. return jQuery.merge( this, selector );
  174. // HANDLE: $(expr, $(...))
  175. } else if ( !context || context.jquery ) {
  176. return (context || rootjQuery).find( selector );
  177. // HANDLE: $(expr, context)
  178. // (which is just equivalent to: $(context).find(expr)
  179. } else {
  180. return jQuery( context ).find( selector );
  181. }
  182. // HANDLE: $(function)
  183. // Shortcut for document ready
  184. } else if ( jQuery.isFunction( selector ) ) {
  185. return rootjQuery.ready( selector );
  186. }
  187. if (selector.selector !== undefined) {
  188. this.selector = selector.selector;
  189. this.context = selector.context;
  190. }
  191. return jQuery.makeArray( selector, this );
  192. },
  193. // Start with an empty selector
  194. selector: "",
  195. // The current version of jQuery being used
  196. jquery: "1.4.3",
  197. // The default length of a jQuery object is 0
  198. length: 0,
  199. // The number of elements contained in the matched element set
  200. size: function() {
  201. /// <summary>
  202. /// The number of elements currently matched.
  203. /// API: <see href="http://api.jquery.com/size/">.size()</see>
  204. /// Categories: <see href="http://api.jquery.com/category/miscellaneous/">Miscellaneous</see> > <see href="http://api.jquery.com/category/miscellaneous/dom-element-methods/">DOM Element Methods</see>
  205. /// </summary>
  206. /// <returns type="Number" />
  207. return this.length;
  208. },
  209. toArray: function() {
  210. /// <summary>
  211. /// Retrieve all the DOM elements contained in the jQuery set, as an array.
  212. /// API: <see href="http://api.jquery.com/toArray/">.toArray()</see>
  213. /// Categories: <see href="http://api.jquery.com/category/miscellaneous/">Miscellaneous</see> > <see href="http://api.jquery.com/category/miscellaneous/dom-element-methods/">DOM Element Methods</see>
  214. /// </summary>
  215. /// <returns type="Array" />
  216. return slice.call( this, 0 );
  217. },
  218. // Get the Nth element in the matched element set OR
  219. // Get the whole matched element set as a clean array
  220. get: function( num ) {
  221. /// <summary>
  222. /// Access a single matched element. num is used to access the
  223. /// Nth element matched.
  224. /// API: <see href="http://api.jquery.com/get/">.get()</see>
  225. /// Categories: <see href="http://api.jquery.com/category/miscellaneous/">Miscellaneous</see> > <see href="http://api.jquery.com/category/miscellaneous/dom-element-methods/">DOM Element Methods</see>
  226. /// </summary>
  227. /// <returns type="Element" />
  228. /// <param name="num" type="Number">
  229. /// Access the element in the Nth position.
  230. /// </param>
  231. return num == null ?
  232. // Return a 'clean' array
  233. this.toArray() :
  234. // Return just the object
  235. ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
  236. },
  237. // Take an array of elements and push it onto the stack
  238. // (returning the new matched element set)
  239. pushStack: function( elems, name, selector ) {
  240. /// <summary>
  241. /// Set the jQuery object to an array of elements, while maintaining the stack.
  242. /// API: <see href="http://api.jquery.com/pushStack/">.pushStack()</see>
  243. /// Categories: <see href="http://api.jquery.com/category/plugin-authoring/">Plugin Authoring</see>
  244. /// </summary>
  245. /// <returns type="jQuery" />
  246. /// <param name="elems" type="Elements">
  247. /// An array of elements
  248. /// </param>
  249. // Build a new jQuery matched element set
  250. var ret = jQuery();
  251. if ( jQuery.isArray( elems ) ) {
  252. push.apply( ret, elems );
  253. } else {
  254. jQuery.merge( ret, elems );
  255. }
  256. // Add the old object onto the stack (as a reference)
  257. ret.prevObject = this;
  258. ret.context = this.context;
  259. if ( name === "find" ) {
  260. ret.selector = this.selector + (this.selector ? " " : "") + selector;
  261. } else if ( name ) {
  262. ret.selector = this.selector + "." + name + "(" + selector + ")";
  263. }
  264. // Return the newly-formed element set
  265. return ret;
  266. },
  267. // Execute a callback for every element in the matched set.
  268. // (You can seed the arguments with an array of args, but this is
  269. // only used internally.)
  270. each: function( callback, args ) {
  271. /// <summary>
  272. /// Execute a function within the context of every matched element.
  273. /// This means that every time the passed-in function is executed
  274. /// (which is once for every element matched) the 'this' keyword
  275. /// points to the specific element.
  276. /// Additionally, the function, when executed, is passed a single
  277. /// argument representing the position of the element in the matched
  278. /// set.
  279. /// API: <see href="http://api.jquery.com/each/">.each()</see>
  280. /// Categories: <see href="http://api.jquery.com/category/core/">Core</see>
  281. /// </summary>
  282. /// <returns type="jQuery" />
  283. /// <param name="callback" type="Function">
  284. /// A function to execute
  285. /// </param>
  286. return jQuery.each( this, callback, args );
  287. },
  288. ready: function( fn ) {
  289. /// <summary>
  290. /// Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.
  291. /// API: <see href="http://api.jquery.com/ready/">.ready()</see>
  292. /// Categories: <see href="http://api.jquery.com/category/events/">Events</see> > <see href="http://api.jquery.com/category/document-loading/">Document Loading</see>
  293. /// </summary>
  294. /// <param name="fn" type="Function">
  295. /// The function to be executed when the DOM is ready.
  296. /// </param>
  297. // Attach the listeners
  298. jQuery.bindReady();
  299. // If the DOM is already ready
  300. if ( jQuery.isReady ) {
  301. // Execute the function immediately
  302. fn.call( document, jQuery );
  303. // Otherwise, remember the function for later
  304. } else if ( readyList ) {
  305. // Add the function to the wait list
  306. readyList.push( fn );
  307. }
  308. return this;
  309. },
  310. eq: function( i ) {
  311. /// <summary>
  312. /// Reduce the set of matched elements to a single element.
  313. /// The position of the element in the set of matched elements
  314. /// starts at 0 and goes to length - 1.
  315. /// API: <see href="http://api.jquery.com/filter/">.filter()</see>
  316. /// Categories: <see href="http://api.jquery.com/category/filtering/">Filtering</see>
  317. /// </summary>
  318. /// <returns type="jQuery" />
  319. /// <param name="index" type="Number">
  320. /// An integer indicating the 0-based position of the element.
  321. /// If the index is a negative value, the index indicates the
  322. /// position of the element, counting backwards from the last element in the set.
  323. /// </param>
  324. return i === -1 ?
  325. this.slice( i ) :
  326. this.slice( i, +i + 1 );
  327. },
  328. first: function() {
  329. /// <summary>
  330. /// Reduce the set of matched elements to the first in the set.
  331. /// API: <see href="http://api.jquery.com/first/">.first()</see>
  332. /// Categories: <see href="http://api.jquery.com/category/filtering/">Filtering</see>
  333. /// </summary>
  334. /// <returns type="jQuery" />
  335. return this.eq( 0 );
  336. },
  337. last: function() {
  338. /// <summary>
  339. /// Reduce the set of matched elements to the final one in the set.
  340. /// API: <see href="http://api.jquery.com/last/">.last()</see>
  341. /// Categories: <see href="http://api.jquery.com/category/filtering/">Filtering</see>
  342. /// </summary>
  343. /// <returns type="jQuery" />
  344. return this.eq( -1 );
  345. },
  346. slice: function() {
  347. /// <summary>
  348. /// Reduce the set of matched elements to a subset specified by a range of indices.
  349. /// Behaves exactly like the built-in Array slice method.
  350. /// API: <see href="http://api.jquery.com/slice/">.slice()</see>
  351. /// Categories: <see href="http://api.jquery.com/category/filtering/">Filtering</see>
  352. /// </summary>
  353. /// <param name="start" type="Number" integer="true">
  354. /// An integer indicating the 0-based position at which the elements begin to be
  355. /// selected. If negative, it indicates an offset from the end of the set.
  356. /// </param>
  357. /// <param name="end" optional="true" type="Number" integer="true">
  358. /// An integer indicating the 0-based position at which the elements stop being
  359. /// selected. If negative, it indicates an offset from the end of the set.
  360. /// If omitted, the range continues until the end of the set.
  361. /// </param>
  362. /// <returns type="jQuery">The sliced elements</returns>
  363. return this.pushStack( slice.apply( this, arguments ),
  364. "slice", slice.call(arguments).join(",") );
  365. },
  366. map: function( callback ) {
  367. /// <summary>
  368. /// This member is internal.
  369. /// </summary>
  370. /// <private />
  371. /// <returns type="jQuery" />
  372. return this.pushStack( jQuery.map(this, function( elem, i ) {
  373. return callback.call( elem, i, elem );
  374. }));
  375. },
  376. end: function() {
  377. /// <summary>
  378. /// End the most recent 'destructive' filtering operation, reverting the list of matched elements
  379. /// back to its previous state. After an end operation, the list of matched elements will
  380. /// revert to the last state of matched elements.
  381. /// If there was no destructive operation before, an empty set is returned.
  382. /// API: <see href="http://api.jquery.com/end/">.end()</see>
  383. /// Categories: <see href="http://api.jquery.com/category/traversing/traversal/">Traversal/</see> > <see href="http://api.jquery.com/category/traversing/miscellaneous-traversal/">Miscellaneous Traversal/</see>
  384. /// </summary>
  385. /// <returns type="jQuery" />
  386. return this.prevObject || jQuery(null);
  387. },
  388. // For internal use only.
  389. // Behaves like an Array's method, not like a jQuery method.
  390. push: push,
  391. sort: [].sort,
  392. splice: [].splice
  393. };
  394. // Give the init function the jQuery prototype for later instantiation
  395. jQuery.fn.init.prototype = jQuery.fn;
  396. jQuery.extend = jQuery.fn.extend = function() {
  397. /// <summary>
  398. /// Merge the contents of two or more objects together into the first
  399. /// object and returns the original, modified object.
  400. /// API: <see href="http://api.jquery.com/jQuery.extend/">jQuery.extend()</see>
  401. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  402. /// </summary>
  403. /// <remarks>
  404. /// This is a great utility for simple inheritance.
  405. /// jQuery.extend(settings, options);
  406. /// var settings = jQuery.extend({}, defaults, options);
  407. /// </remarks>
  408. /// <param name="target" type="Object">
  409. /// The object to extend
  410. /// </param>
  411. /// <param name="prop1" type="Object">
  412. /// The object that will be merged into the first.
  413. /// </param>
  414. /// <param name="propN" type="Object" optional="true" parameterArray="true">
  415. /// (optional) More objects to merge into the first
  416. /// </param>
  417. /// <returns type="Object" />
  418. // copy reference to target object
  419. var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy, copyIsArray;
  420. // Handle a deep copy situation
  421. if ( typeof target === "boolean" ) {
  422. deep = target;
  423. target = arguments[1] || {};
  424. // skip the boolean and the target
  425. i = 2;
  426. }
  427. // Handle case when target is a string or something (possible in deep copy)
  428. if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
  429. target = {};
  430. }
  431. // extend jQuery itself if only one argument is passed
  432. if ( length === i ) {
  433. target = this;
  434. --i;
  435. }
  436. for ( ; i < length; i++ ) {
  437. // Only deal with non-null/undefined values
  438. if ( (options = arguments[ i ]) != null ) {
  439. // Extend the base object
  440. for ( name in options ) {
  441. src = target[ name ];
  442. copy = options[ name ];
  443. // Prevent never-ending loop
  444. if ( target === copy ) {
  445. continue;
  446. }
  447. // Recurse if we're merging plain objects or arrays
  448. if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
  449. if ( copyIsArray ) {
  450. copyIsArray = false;
  451. clone = src && jQuery.isArray(src) ? src : [];
  452. } else {
  453. clone = src && jQuery.isPlainObject(src) ? src : {};
  454. }
  455. // Never move original objects, clone them
  456. target[ name ] = jQuery.extend( deep, clone, copy );
  457. // Don't bring in undefined values
  458. } else if ( copy !== undefined ) {
  459. target[ name ] = copy;
  460. }
  461. }
  462. }
  463. }
  464. // Return the modified object
  465. return target;
  466. };
  467. jQuery.extend({
  468. noConflict: function( deep ) {
  469. /// <summary>
  470. /// Relinquish jQuery's control of the $ variable.
  471. /// Run this function to give control of the $ variable back
  472. /// to whichever library first implemented it.
  473. /// API: <see href="http://api.jquery.com/jQuery.noConflict/">jQuery.noConflict()</see>
  474. /// Categories: <see href="http://api.jquery.com/category/core/">Core</see>
  475. /// </summary>
  476. /// <remarks>
  477. /// This helps to make sure that jQuery doesn't conflict with the $ object
  478. /// of other libraries.
  479. /// By using this function, you will only be able to access jQuery
  480. /// using the 'jQuery' variable. For example, where you used to do
  481. /// $(&quot;div p&quot;), you now must do jQuery(&quot;div p&quot;).
  482. /// </remarks>
  483. /// <param name="removeAll" type="Boolean" optional="true">
  484. /// (optional) A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
  485. /// </param>
  486. /// <returns type="Object" />
  487. window.$ = _$;
  488. if ( deep ) {
  489. window.jQuery = _jQuery;
  490. }
  491. return jQuery;
  492. },
  493. // Is the DOM ready to be used? Set to true once it occurs.
  494. isReady: false,
  495. // A counter to track how many items to wait for before
  496. // the ready event fires. See #6781
  497. readyWait: 1,
  498. // Handle when the DOM is ready
  499. ready: function( wait ) {
  500. /// <summary>
  501. /// This method is internal.
  502. /// </summary>
  503. /// <private />
  504. // A third-party is pushing the ready event forwards
  505. if ( wait === true ) {
  506. jQuery.readyWait--;
  507. }
  508. // Make sure that the DOM is not already loaded
  509. if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
  510. // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
  511. if ( !document.body ) {
  512. return setTimeout( jQuery.ready, 1 );
  513. }
  514. // Remember that the DOM is ready
  515. jQuery.isReady = true;
  516. // If a normal DOM Ready event fired, decrement, and wait if need be
  517. if ( wait !== true && --jQuery.readyWait > 0 ) {
  518. return;
  519. }
  520. // If there are functions bound, to execute
  521. if ( readyList ) {
  522. // Execute all of them
  523. var fn, i = 0;
  524. while ( (fn = readyList[ i++ ]) ) {
  525. fn.call( document, jQuery );
  526. }
  527. // Reset the list of functions
  528. readyList = null;
  529. }
  530. // Trigger any bound ready events
  531. if ( jQuery.fn.triggerHandler ) {
  532. jQuery( document ).triggerHandler( "ready" );
  533. }
  534. }
  535. },
  536. bindReady: function() {
  537. /// <summary>
  538. /// This method is internal.
  539. /// </summary>
  540. /// <private />
  541. if ( readyBound ) {
  542. return;
  543. }
  544. readyBound = true;
  545. // Catch cases where $(document).ready() is called after the
  546. // browser event has already occurred.
  547. if ( document.readyState === "complete" ) {
  548. // Handle it asynchronously to allow scripts the opportunity to delay ready
  549. return setTimeout( jQuery.ready, 1 );
  550. }
  551. // Mozilla, Opera and webkit nightlies currently support this event
  552. if ( document.addEventListener ) {
  553. // Use the handy event callback
  554. document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
  555. // A fallback to window.onload, that will always work
  556. window.addEventListener( "load", jQuery.ready, false );
  557. // If IE event model is used
  558. } else if ( document.attachEvent ) {
  559. // ensure firing before onload,
  560. // maybe late but safe also for iframes
  561. document.attachEvent("onreadystatechange", DOMContentLoaded);
  562. // A fallback to window.onload, that will always work
  563. window.attachEvent( "onload", jQuery.ready );
  564. // If IE and not a frame
  565. // continually check to see if the document is ready
  566. var toplevel = false;
  567. try {
  568. toplevel = window.frameElement == null;
  569. } catch(e) {}
  570. if ( document.documentElement.doScroll && toplevel ) {
  571. doScrollCheck();
  572. }
  573. }
  574. },
  575. // See test/unit/core.js for details concerning isFunction.
  576. // Since version 1.3, DOM methods and functions like alert
  577. // aren't supported. They return false on IE (#2968).
  578. isFunction: function( obj ) {
  579. /// <summary>
  580. /// Determine if the argument passed is a Javascript function object.
  581. /// API: <see href="http://api.jquery.com/jQuery.isFunction/">jQuery.isFunction()</see>
  582. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  583. /// </summary>
  584. /// <param name="obj" type="Object">
  585. /// Object to test whether or not it is a function.
  586. /// </param>
  587. /// <returns type="Boolean">
  588. /// True if the parameter is a function; otherwise false.
  589. /// </returns>
  590. return jQuery.type(obj) === "function";
  591. },
  592. isArray: Array.isArray || function( obj ) {
  593. /// <summary>
  594. /// Determine if the argument is an array.
  595. /// API: <see href="http://api.jquery.com/jQuery.isArray/">jQuery.isArray()</see>
  596. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  597. /// </summary>
  598. /// <param name="obj" type="Object">
  599. /// Object to test whether or not it is an array.
  600. /// </param>
  601. /// <returns type="Boolean">
  602. /// True if the parameter is an array; otherwise false.
  603. /// </returns>
  604. return jQuery.type(obj) === "array";
  605. },
  606. // A crude way of determining if an object is a window
  607. isWindow: function( obj ) {
  608. /// <summary>
  609. /// Determine whether the argument is a window.
  610. /// API: <see href="http://api.jquery.com/jQuery.isWindow/">jQuery.isWindow()</see>
  611. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  612. /// </summary>
  613. /// <param name="obj" type="Object">
  614. /// Object to test whether or not it is a window.
  615. /// </param>
  616. /// <returns type="Boolean">
  617. /// True if the parameter is a window; otherwise false.
  618. /// </returns>
  619. return obj && typeof obj === "object" && "setInterval" in obj;
  620. },
  621. isNaN: function( obj ) {
  622. /// <summary>
  623. /// Determine whether the argument is a number.
  624. /// API: <see href="http://api.jquery.com/jQuery.isNaN/">jQuery.isNaN()</see>
  625. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  626. /// </summary>
  627. /// <param name="obj" type="Object">
  628. /// Object to test whether or not it is a number.
  629. /// </param>
  630. /// <returns type="Boolean">
  631. /// True if the parameter is a number; otherwise false.
  632. /// </returns>
  633. return obj == null || !rdigit.test( obj ) || isNaN( obj );
  634. },
  635. type: function( obj ) {
  636. /// <summary>
  637. /// Determine whether the argument is a number.
  638. /// API: <see href="http://api.jquery.com/jQuery.type/">jQuery.type()</see>
  639. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  640. /// </summary>
  641. /// <param name="obj" type="Object">
  642. /// Object to get the internal JavaScript [[Class]] of.
  643. /// </param>
  644. /// <returns type="String">
  645. /// True if the parameter is a number; otherwise false.
  646. /// </returns>
  647. return obj == null ?
  648. String( obj ) :
  649. class2type[ toString.call(obj) ] || "object";
  650. },
  651. isPlainObject: function( obj ) {
  652. /// <summary>
  653. /// Check to see if an object is a plain object (created using "{}" or "new Object").
  654. /// API: <see href="http://api.jquery.com/jQuery.isPlainObject/">jQuery.isPlainObject()</see>
  655. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  656. /// </summary>
  657. /// <param name="obj" type="Object">
  658. /// The object that will be checked to see if it's a plain object.
  659. /// </param>
  660. /// <returns type="Boolean" />
  661. // Must be an Object.
  662. // Because of IE, we also have to check the presence of the constructor property.
  663. // Make sure that DOM nodes and window objects don't pass through, as well
  664. if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
  665. return false;
  666. }
  667. // Not own constructor property must be Object
  668. if ( obj.constructor &&
  669. !hasOwn.call(obj, "constructor") &&
  670. !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
  671. return false;
  672. }
  673. // Own properties are enumerated firstly, so to speed up,
  674. // if last one is own, then all properties are own.
  675. var key;
  676. for ( key in obj ) {}
  677. return key === undefined || hasOwn.call( obj, key );
  678. },
  679. isEmptyObject: function( obj ) {
  680. /// <summary>
  681. /// Check to see if an object is empty (contains no properties).
  682. /// API: <see href="http://api.jquery.com/jQuery.isEmptyObject/">jQuery.isEmptyObject()</see>
  683. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  684. /// </summary>
  685. /// <param name="obj" type="Object">
  686. /// The object that will be checked to see if it's empty.
  687. /// </param>
  688. /// <returns type="Boolean" />
  689. for ( var name in obj ) {
  690. return false;
  691. }
  692. return true;
  693. },
  694. error: function( msg ) {
  695. throw msg;
  696. },
  697. parseJSON: function( data ) {
  698. /// <summary>
  699. /// Takes a well-formed JSON string and returns the resulting JavaScript object.
  700. /// API: <see href="http://api.jquery.com/jQuery.parseJSON/">jQuery.parseJSON()</see>
  701. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  702. /// </summary>
  703. /// <param name="obj" type="Object">
  704. /// The object that will be checked to see if it's empty.
  705. /// </param>
  706. /// <returns type="Object" />
  707. if ( typeof data !== "string" || !data ) {
  708. return null;
  709. }
  710. // Make sure leading/trailing whitespace is removed (IE can't handle it)
  711. data = jQuery.trim( data );
  712. // Make sure the incoming data is actual JSON
  713. // Logic borrowed from http://json.org/json2.js
  714. if ( rvalidchars.test(data.replace(rvalidescape, "@")
  715. .replace(rvalidtokens, "]")
  716. .replace(rvalidbraces, "")) ) {
  717. // Try to use the native JSON parser first
  718. return window.JSON && window.JSON.parse ?
  719. window.JSON.parse( data ) :
  720. (new Function("return " + data))();
  721. } else {
  722. jQuery.error( "Invalid JSON: " + data );
  723. }
  724. },
  725. noop: function() {
  726. /// <summary>
  727. /// An empty function.
  728. /// API: <see href="http://api.jquery.com/jQuery.noop/">jQuery.noop()</see>
  729. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  730. /// </summary>
  731. /// <returns type="Function" />
  732. },
  733. // Evalulates a script in a global context
  734. globalEval: function( data ) {
  735. /// <summary>
  736. /// Execute some JavaScript code globally.
  737. /// API: <see href="http://api.jquery.com/jQuery.globalEval/">jQuery.globalEval()</see>
  738. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  739. /// </summary>
  740. if ( data && rnotwhite.test(data) ) {
  741. // Inspired by code by Andrea Giammarchi
  742. // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
  743. var head = document.getElementsByTagName("head")[0] || document.documentElement,
  744. script = document.createElement("script");
  745. script.type = "text/javascript";
  746. if ( jQuery.support.scriptEval ) {
  747. script.appendChild( document.createTextNode( data ) );
  748. } else {
  749. script.text = data;
  750. }
  751. // Use insertBefore instead of appendChild to circumvent an IE6 bug.
  752. // This arises when a base node is used (#2709).
  753. head.insertBefore( script, head.firstChild );
  754. head.removeChild( script );
  755. }
  756. },
  757. nodeName: function( elem, name ) {
  758. /// <summary>
  759. /// Checks whether the specified element has the specified DOM node name.
  760. /// </summary>
  761. /// <param name="elem" type="Element">
  762. /// The element to examine
  763. /// </param>
  764. /// <param name="name" type="String">
  765. /// The node name to check
  766. /// </param>
  767. /// <returns type="Boolean">True if the specified node name matches the node's DOM node name; otherwise false</returns>
  768. return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
  769. },
  770. // args is for internal usage only
  771. each: function( object, callback, args ) {
  772. /// <summary>
  773. /// A generic iterator function, which can be used to seamlessly iterate over both objects and arrays.
  774. /// Arrays and array-like objects with a length property (such as a function's arguments object) are
  775. /// iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
  776. /// the first, and the value as the second.
  777. /// API: <see href="http://api.jquery.com/jQuery.each/">jQuery.each()</see>
  778. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  779. /// </summary>
  780. /// <param name="obj" type="Object">
  781. /// The object, or array, to iterate over.
  782. /// </param>
  783. /// <param name="fn" type="Function">
  784. /// The function that will be executed on every object.
  785. /// </param>
  786. /// <returns type="Object" />
  787. var name, i = 0,
  788. length = object.length,
  789. isObj = length === undefined || jQuery.isFunction(object);
  790. if ( args ) {
  791. if ( isObj ) {
  792. for ( name in object ) {
  793. if ( callback.apply( object[ name ], args ) === false ) {
  794. break;
  795. }
  796. }
  797. } else {
  798. for ( ; i < length; ) {
  799. if ( callback.apply( object[ i++ ], args ) === false ) {
  800. break;
  801. }
  802. }
  803. }
  804. // A special, fast, case for the most common use of each
  805. } else {
  806. if ( isObj ) {
  807. for ( name in object ) {
  808. if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
  809. break;
  810. }
  811. }
  812. } else {
  813. for ( var value = object[0];
  814. i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
  815. }
  816. }
  817. return object;
  818. },
  819. // Use native String.trim function wherever possible
  820. trim: trim ?
  821. function( text ) {
  822. /// <summary>
  823. /// Remove the whitespace from the beginning and end of a string.
  824. /// API: <see href="http://api.jquery.com/jQuery.trim/">jQuery.trim()</see>
  825. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  826. /// </summary>
  827. /// <returns type="String" />
  828. /// <param name="text" type="String">
  829. /// The string to trim.
  830. /// </param>
  831. return text == null ?
  832. "" :
  833. trim.call( text );
  834. } :
  835. // Otherwise use our own trimming functionality
  836. function( text ) {
  837. return text == null ?
  838. "" :
  839. text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
  840. },
  841. // results is for internal usage only
  842. makeArray: function( array, results ) {
  843. /// <summary>
  844. /// Convert an array-like object into a true JavaScript array.
  845. /// API: <see href="http://api.jquery.com/jQuery.makeArray/">jQuery.makeArray()</see>
  846. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  847. /// </summary>
  848. /// <param name="array" type="Object">
  849. /// Any object to turn into a native Array.
  850. /// </param>
  851. /// <returns type="Array" />
  852. var ret = results || [];
  853. if ( array != null ) {
  854. // The window, strings (and functions) also have 'length'
  855. // The extra typeof function check is to prevent crashes
  856. // in Safari 2 (See: #3039)
  857. // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
  858. var type = jQuery.type(array);
  859. if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
  860. push.call( ret, array );
  861. } else {
  862. jQuery.merge( ret, array );
  863. }
  864. }
  865. return ret;
  866. },
  867. inArray: function( elem, array ) {
  868. /// <summary>
  869. /// Search for a specified value within an array and return its index (or -1 if not found).
  870. /// API: <see href="http://api.jquery.com/jQuery.inArray/">jQuery.inArray()</see>
  871. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  872. /// Part of JavaScript
  873. /// </summary>
  874. /// <param name="value" type="Any">
  875. /// The value to search for.
  876. /// </param>
  877. /// <param name="array" type="Array">
  878. /// An array through which to search.
  879. /// </param>
  880. /// <returns type="Array" />
  881. if ( array.indexOf ) {
  882. return array.indexOf( elem );
  883. }
  884. for ( var i = 0, length = array.length; i < length; i++ ) {
  885. if ( array[ i ] === elem ) {
  886. return i;
  887. }
  888. }
  889. return -1;
  890. },
  891. merge: function( first, second ) {
  892. /// <summary>
  893. /// Merge the contents of two arrays together into the first array.
  894. /// API: <see href="http://api.jquery.com/jQuery.merge/">jQuery.merge()</see>
  895. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  896. /// </summary>
  897. /// <param name="first" type="Array">
  898. /// The first array to merge.
  899. /// </param>
  900. /// <param name="second" type="Array">
  901. /// The second array to merge.
  902. /// </param>
  903. /// <returns type="Array" />
  904. var i = first.length, j = 0;
  905. if ( typeof second.length === "number" ) {
  906. for ( var l = second.length; j < l; j++ ) {
  907. first[ i++ ] = second[ j ];
  908. }
  909. } else {
  910. while ( second[j] !== undefined ) {
  911. first[ i++ ] = second[ j++ ];
  912. }
  913. }
  914. first.length = i;
  915. return first;
  916. },
  917. grep: function( elems, callback, inv ) {
  918. /// <summary>
  919. /// Finds the elements of an array which satisfy a filter function. The original array is not affected.
  920. /// API: <see href="http://api.jquery.com/jQuery.grep/">jQuery.grep()</see>
  921. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  922. /// </summary>
  923. /// <remarks>
  924. /// The specified function will be passed two arguments: The
  925. /// current array item and the index of the item in the array. The
  926. /// function must return 'true' to keep the item in the array,
  927. /// false to remove it.
  928. /// });
  929. /// Part of JavaScript
  930. /// </remarks>
  931. /// <param name="array" type="Array">
  932. /// The array to search through.
  933. /// </param>
  934. /// <param name="function(elementOfArray, indexInArray)" type="Function">
  935. /// 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.
  936. /// </param>
  937. /// <param name="inv" type="Boolean">
  938. /// 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.
  939. /// </param>
  940. /// <returns type="Array" />
  941. var ret = [], retVal;
  942. inv = !!inv;
  943. // Go through the array, only saving the items
  944. // that pass the validator function
  945. for ( var i = 0, length = elems.length; i < length; i++ ) {
  946. retVal = !!callback( elems[ i ], i );
  947. if ( inv !== retVal ) {
  948. ret.push( elems[ i ] );
  949. }
  950. }
  951. return ret;
  952. },
  953. // arg is for internal usage only
  954. map: function( elems, callback, arg ) {
  955. /// <summary>
  956. /// Translate all items in an array or array-like object to another array of items.
  957. /// API: <see href="http://api.jquery.com/jQuery.map/">jQuery.map()</see>
  958. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  959. /// </summary>
  960. /// <remarks>
  961. /// The translation function that is provided to this method is
  962. /// called for each item in the array and is passed one argument:
  963. /// The item to be translated.
  964. /// The function can then return the translated value, 'null'
  965. /// (to remove the item), or an array of values - which will
  966. /// be flattened into the full array.
  967. /// </remarks>
  968. /// <returns type="Array" />
  969. /// <param name="elems" type="Array">
  970. /// array The Array to translate.
  971. /// </param>
  972. /// <param name="fn" type="Function">
  973. /// The function to process each item against.
  974. /// </param>
  975. var ret = [], value;
  976. // Go through the array, translating each of the items to their
  977. // new value (or values).
  978. for ( var i = 0, length = elems.length; i < length; i++ ) {
  979. value = callback( elems[ i ], i, arg );
  980. if ( value != null ) {
  981. ret[ ret.length ] = value;
  982. }
  983. }
  984. return ret.concat.apply( [], ret );
  985. },
  986. // A global GUID counter for objects
  987. guid: 1,
  988. proxy: function( fn, proxy, thisObject ) {
  989. /// <summary>
  990. /// Takes a function and returns a new one that will always have a particular scope.
  991. /// API: <see href="http://api.jquery.com/jQuery.proxy/">jQuery.proxy()</see>
  992. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  993. /// </summary>
  994. /// <param name="fn" type="Function">
  995. /// The function whose scope will be changed.
  996. /// </param>
  997. /// <param name="proxy" type="Object">
  998. /// The object to which the scope of the function should be set.
  999. /// </param>
  1000. /// <returns type="Function" />
  1001. if ( arguments.length === 2 ) {
  1002. if ( typeof proxy === "string" ) {
  1003. thisObject = fn;
  1004. fn = thisObject[ proxy ];
  1005. proxy = undefined;
  1006. } else if ( proxy && !jQuery.isFunction( proxy ) ) {
  1007. thisObject = proxy;
  1008. proxy = undefined;
  1009. }
  1010. }
  1011. if ( !proxy && fn ) {
  1012. proxy = function() {
  1013. return fn.apply( thisObject || this, arguments );
  1014. };
  1015. }
  1016. // Set the guid of unique handler to the same of original handler, so it can be removed
  1017. if ( fn ) {
  1018. proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
  1019. }
  1020. // So proxy can be declared as an argument
  1021. return proxy;
  1022. },
  1023. // Mutifunctional method to get and set values to a collection
  1024. // The value/s can be optionally by executed if its a function
  1025. access: function( elems, key, value, exec, fn, pass ) {
  1026. /// <summary>
  1027. /// This member is internal.
  1028. /// </summary>
  1029. /// <private />
  1030. var length = elems.length;
  1031. // Setting many attributes
  1032. if ( typeof key === "object" ) {
  1033. for ( var k in key ) {
  1034. jQuery.access( elems, k, key[k], exec, fn, value );
  1035. }
  1036. return elems;
  1037. }
  1038. // Setting one attribute
  1039. if ( value !== undefined ) {
  1040. // Optionally, function values get executed if exec is true
  1041. exec = !pass && exec && jQuery.isFunction(value);
  1042. for ( var i = 0; i < length; i++ ) {
  1043. fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
  1044. }
  1045. return elems;
  1046. }
  1047. // Getting an attribute
  1048. return length ? fn( elems[0], key ) : undefined;
  1049. },
  1050. now: function() {
  1051. /// <summary>
  1052. /// Returns the number of milliseconds since midnight of January 1, 1970 and the current date and time.
  1053. /// </summary>
  1054. /// <returns type="Number" integer="true" />
  1055. return (new Date()).getTime();
  1056. },
  1057. // Use of jQuery.browser is frowned upon.
  1058. // More details: http://docs.jquery.com/Utilities/jQuery.browser
  1059. uaMatch: function( ua ) {
  1060. ua = ua.toLowerCase();
  1061. var match = rwebkit.exec( ua ) ||
  1062. ropera.exec( ua ) ||
  1063. rmsie.exec( ua ) ||
  1064. ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
  1065. [];
  1066. return { browser: match[1] || "", version: match[2] || "0" };
  1067. },
  1068. browser: {}
  1069. });
  1070. // Populate the class2type map
  1071. jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
  1072. class2type[ "[object " + name + "]" ] = name.toLowerCase();
  1073. });
  1074. browserMatch = jQuery.uaMatch( userAgent );
  1075. if ( browserMatch.browser ) {
  1076. jQuery.browser[ browserMatch.browser ] = true;
  1077. jQuery.browser.version = browserMatch.version;
  1078. }
  1079. // Deprecated, use jQuery.browser.webkit instead
  1080. if ( jQuery.browser.webkit ) {
  1081. jQuery.browser.safari = true;
  1082. }
  1083. if ( indexOf ) {
  1084. jQuery.inArray = function( elem, array ) {
  1085. /// <summary>
  1086. /// Search for a specified value within an array and return its index (or -1 if not found).
  1087. /// API: <see href="http://api.jquery.com/jQuery.inArray/">jQuery.inArray()</see>
  1088. /// Categories: <see href="http://api.jquery.com/category/utilities/">Utilities</see>
  1089. /// </summary>
  1090. /// <param name="value">
  1091. /// The value to search for.
  1092. // </param>
  1093. /// <param name="array" type="Array">
  1094. /// An array through which to search.
  1095. /// </param>
  1096. /// <returns type="Number" integer="true">The 0-based index of the item if it was found, otherwise -1.</returns>
  1097. return indexOf.call( array, elem );
  1098. };
  1099. }
  1100. // Verify that \s matches non-breaking spaces
  1101. // (IE fails on this test)
  1102. if ( !rwhite.test( "\xA0" ) ) {
  1103. trimLeft = /^[\s\xA0]+/;
  1104. trimRight = /[\s\xA0]+$/;
  1105. }
  1106. // All jQuery objects should point back to these
  1107. rootjQuery = jQuery(document);
  1108. // Cleanup functions for the document ready method
  1109. if ( document.addEventListener ) {
  1110. DOMContentLoaded = function() {
  1111. document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
  1112. jQuery.ready();
  1113. };
  1114. } else if ( document.attachEvent ) {
  1115. DOMContentLoaded = function() {
  1116. // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
  1117. if ( document.readyState === "complete" ) {
  1118. document.detachEvent( "onreadystatechange", DOMContentLoaded );
  1119. jQuery.ready();
  1120. }
  1121. };
  1122. }
  1123. // The DOM ready check for Internet Explorer
  1124. function doScrollCheck() {
  1125. if ( jQuery.isReady ) {
  1126. return;
  1127. }
  1128. try {
  1129. // If IE is used, use the trick by Diego Perini
  1130. // http://javascript.nwbox.com/IEContentLoaded/
  1131. document.documentElement.doScroll("left");
  1132. } catch(e) {
  1133. setTimeout( doScrollCheck, 1 );
  1134. return;
  1135. }
  1136. // and execute any waiting functions
  1137. jQuery.ready();
  1138. }
  1139. // Expose jQuery to the global object
  1140. return (window.jQuery = window.$ = jQuery);
  1141. })();
  1142. // [vsdoc] The following function has been modified for IntelliSense.
  1143. // [vsdoc] Stubbing support properties to "false" for IntelliSense compat.
  1144. (function() {
  1145. jQuery.support = {};
  1146. var root = document.documentElement,
  1147. script = document.createElement("script"),
  1148. div = document.createElement("div"),
  1149. id = "script" + jQuery.now();
  1150. div.style.display = "none";
  1151. div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
  1152. var all = div.getElementsByTagName("*"),
  1153. a = div.getElementsByTagName("a")[0],
  1154. select = document.createElement("select"),
  1155. opt = select.appendChild( document.createElement("option") );
  1156. // Can't get basic test support
  1157. if ( !all || !all.length || !a ) {
  1158. return;
  1159. }
  1160. jQuery.support = {
  1161. // IE strips leading whitespace when .innerHTML is used
  1162. leadingWhitespace: div.firstChild.nodeType === 3,
  1163. // Make sure that tbody elements aren't automatically inserted
  1164. // IE will insert them into empty tables
  1165. tbody: !div.getElementsByTagName("tbody").length,
  1166. // Make sure that link elements get serialized correctly by innerHTML
  1167. // This requires a wrapper element in IE
  1168. htmlSerialize: !!div.getElementsByTagName("link").length,
  1169. // Get the style information from getAttribute
  1170. // (IE uses .cssText insted)
  1171. style: /red/.test( a.getAttribute("style") ),
  1172. // Make sure that URLs aren't manipulated
  1173. // (IE normalizes it by default)
  1174. hrefNormalized: a.getAttribute("href") === "/a",
  1175. // Make sure that element opacity exists
  1176. // (IE uses filter instead)
  1177. // Use a regex to work around a WebKit issue. See #5145
  1178. opacity: /^0.55$/.test( a.style.opacity ),
  1179. // Verify style float existence
  1180. // (IE uses styleFloat instead of cssFloat)
  1181. cssFloat: !!a.style.cssFloat,
  1182. // Make sure that if no value is specified for a checkbox
  1183. // that it defaults to "on".
  1184. // (WebKit defaults to "" instead)
  1185. checkOn: div.getElementsByTagName("input")[0].value === "on",
  1186. // Make sure that a selected-by-default option has a working selected property.
  1187. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
  1188. optSelected: opt.selected,
  1189. // Will be defined later
  1190. optDisabled: false,
  1191. checkClone: false,
  1192. scriptEval: false,
  1193. noCloneEvent: true,
  1194. boxModel: null,
  1195. inlineBlockNeedsLayout: false,
  1196. shrinkWrapBlocks: false,
  1197. reliableHiddenOffsets: true
  1198. };
  1199. // Make sure that the options inside disabled selects aren't marked as disabled
  1200. // (WebKit marks them as diabled)
  1201. select.disabled = true;
  1202. jQuery.support.optDisabled = !opt.disabled;
  1203. script.type = "text/javascript";
  1204. try {
  1205. script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
  1206. } catch(e) {}
  1207. root.insertBefore( script, root.firstChild );
  1208. // Make sure that the execution of code works by injecting a script
  1209. // tag with appendChild/createTextNode
  1210. // (IE doesn't support this, fails, and uses .text instead)
  1211. if ( window[ id ] ) {
  1212. jQuery.support.scriptEval = true;
  1213. delete window[ id ];
  1214. }
  1215. root.removeChild( script );
  1216. if ( div.attachEvent && div.fireEvent ) {
  1217. div.attachEvent("onclick", function click() {
  1218. // Cloning a node shouldn't copy over any
  1219. // bound event handlers (IE does this)
  1220. jQuery.support.noCloneEvent = false;
  1221. div.detachEvent("onclick", click);
  1222. });
  1223. div.cloneNode(true).fireEvent("onclick");
  1224. }
  1225. div = document.createElement("div");
  1226. div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
  1227. var fragment = document.createDocumentFragment();
  1228. fragment.appendChild( div.firstChild );
  1229. // WebKit doesn't clone checked state correctly in fragments
  1230. jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
  1231. // Figure out if the W3C box model works as expected
  1232. // document.body must exist before we can do this
  1233. jQuery(function() {
  1234. var div = document.createElement("div");
  1235. div.style.width = div.style.paddingLeft = "1px";
  1236. document.body.appendChild( div );
  1237. jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
  1238. if ( "zoom" in div.style ) {
  1239. // Check if natively block-level elements act like inline-block
  1240. // elements when setting their display to 'inline' and giving
  1241. // them layout
  1242. // (IE < 8 does this)
  1243. div.style.display = "inline";
  1244. div.style.zoom = 1;
  1245. jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
  1246. // Check if elements with layout shrink-wrap their children
  1247. // (IE 6 does this)
  1248. div.style.display = "";
  1249. div.innerHTML = "<div style='width:4px;'></div>";
  1250. jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
  1251. }
  1252. div.innerHTML = "<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";
  1253. var tds = div.getElementsByTagName("td");
  1254. // Check if table cells still have offsetWidth/Height when they are set
  1255. // to display:none and there are still other visible table cells in a
  1256. // table row; if so, offsetWidth/Height are not reliable for use when
  1257. // determining if an element has been hidden directly using
  1258. // display:none (it is still safe to use offsets if a parent element is
  1259. // hidden; don safety goggles and see bug #4512 for more information).
  1260. // (only IE 8 fails this test)
  1261. jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
  1262. tds[0].style.display = "";
  1263. tds[1].style.display = "none";
  1264. // Check if empty table cells still have offsetWidth/Height
  1265. // (IE < 8 fail this test)
  1266. jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
  1267. div.innerHTML = "";
  1268. document.body.removeChild( div ).style.display = "none";
  1269. div = tds = null;
  1270. });
  1271. // Technique from Juriy Zaytsev
  1272. // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
  1273. var eventSupported = function( eventName ) {
  1274. var el = document.createElement("div");
  1275. eventName = "on" + eventName;
  1276. var isSupported = (eventName in el);
  1277. if ( !isSupported ) {
  1278. el.setAttribute(eventName, "return;");
  1279. isSupported = typeof el[eventName] === "function";
  1280. }
  1281. el = null;
  1282. return isSupported;
  1283. };
  1284. jQuery.support.submitBubbles = eventSupported("submit");
  1285. jQuery.support.changeBubbles = eventSupported("change");
  1286. // release memory in IE
  1287. root = script = div = all = a = null;
  1288. })();
  1289. jQuery.props = {
  1290. "for": "htmlFor",
  1291. "class": "className",
  1292. readonly: "readOnly",
  1293. maxlength: "maxLength",
  1294. cellspacing: "cellSpacing",
  1295. rowspan: "rowSpan",
  1296. colspan: "colSpan",
  1297. tabindex: "tabIndex",
  1298. usemap: "useMap",
  1299. frameborder: "frameBorder"
  1300. };
  1301. var windowData = {},
  1302. rbrace = /^(?:\{.*\}|\[.*\])$/;
  1303. jQuery.extend({
  1304. cache: {},
  1305. // Please use with caution
  1306. uuid: 0,
  1307. // Unique for each copy of jQuery on the page
  1308. expando: "jQuery" + jQuery.now(),
  1309. // The following elements thr…

Large files files are truncated, but you can click here to view the full file