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

/src/packages/jQuery.1.7/Content/Scripts/jquery-1.7-vsdoc.js

https://bitbucket.org/FunnelWeb/dev/
JavaScript | 2289 lines | 1376 code | 299 blank | 614 comment | 471 complexity | 1e8120ede0cdbe016ae9a547209a9c4e MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause
  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.7
  8. */
  9. /*!
  10. * jQuery JavaScript Library v1.7
  11. * http://jquery.com/
  12. *
  13. * Distributed in whole under the terms of the MIT
  14. *
  15. * Copyright 2010, John Resig
  16. *
  17. * Permission is hereby granted, free of charge, to any person obtaining
  18. * a copy of this software and associated documentation files (the
  19. * "Software"), to deal in the Software without restriction, including
  20. * without limitation the rights to use, copy, modify, merge, publish,
  21. * distribute, sublicense, and/or sell copies of the Software, and to
  22. * permit persons to whom the Software is furnished to do so, subject to
  23. * the following conditions:
  24. *
  25. * The above copyright notice and this permission notice shall be
  26. * included in all copies or substantial portions of the Software.
  27. *
  28. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  29. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  30. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  31. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  32. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  33. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  34. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  35. *
  36. * Includes Sizzle.js
  37. * http://sizzlejs.com/
  38. * Copyright 2010, The Dojo Foundation
  39. * Released under the MIT and BSD Licenses.
  40. */
  41. (function ( window, undefined ) {
  42. var jQuery = function( selector, context ) {
  43. /// <summary>
  44. /// 1: Accepts a string containing a CSS selector which is then used to match a set of elements.
  45. /// &#10; 1.1 - $(selector, context)
  46. /// &#10; 1.2 - $(element)
  47. /// &#10; 1.3 - $(object)
  48. /// &#10; 1.4 - $(elementArray)
  49. /// &#10; 1.5 - $(jQuery object)
  50. /// &#10; 1.6 - $()
  51. /// &#10;2: Creates DOM elements on the fly from the provided string of raw HTML.
  52. /// &#10; 2.1 - $(html, ownerDocument)
  53. /// &#10; 2.2 - $(html, props)
  54. /// &#10;3: Binds a function to be executed when the DOM has finished loading.
  55. /// &#10; 3.1 - $(callback)
  56. /// </summary>
  57. /// <param name="selector" type="String">
  58. /// A string containing a selector expression
  59. /// </param>
  60. /// <param name="context" type="jQuery">
  61. /// A DOM Element, Document, or jQuery to use as context
  62. /// </param>
  63. /// <returns type="jQuery" />
  64. // The jQuery object is actually just the init constructor 'enhanced'
  65. return new jQuery.fn.init( selector, context, rootjQuery );
  66. };
  67. jQuery.Callbacks = function( flags ) {
  68. // Convert flags from String-formatted to Object-formatted
  69. // (we check in cache first)
  70. flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
  71. var // Actual callback list
  72. list = [],
  73. // Stack of fire calls for repeatable lists
  74. stack = [],
  75. // Last fire value (for non-forgettable lists)
  76. memory,
  77. // Flag to know if list is currently firing
  78. firing,
  79. // First callback to fire (used internally by add and fireWith)
  80. firingStart,
  81. // End of the loop when firing
  82. firingLength,
  83. // Index of currently firing callback (modified by remove if needed)
  84. firingIndex,
  85. // Add one or several callbacks to the list
  86. add = function( args ) {
  87. var i,
  88. length,
  89. elem,
  90. type,
  91. actual;
  92. for ( i = 0, length = args.length; i < length; i++ ) {
  93. elem = args[ i ];
  94. type = jQuery.type( elem );
  95. if ( type === "array" ) {
  96. // Inspect recursively
  97. add( elem );
  98. } else if ( type === "function" ) {
  99. // Add if not in unique mode and callback is not in
  100. if ( !flags.unique || !self.has( elem ) ) {
  101. list.push( elem );
  102. }
  103. }
  104. }
  105. },
  106. // Fire callbacks
  107. fire = function( context, args ) {
  108. args = args || [];
  109. memory = !flags.memory || [ context, args ];
  110. firing = true;
  111. firingIndex = firingStart || 0;
  112. firingStart = 0;
  113. firingLength = list.length;
  114. for ( ; list && firingIndex < firingLength; firingIndex++ ) {
  115. if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
  116. memory = true; // Mark as halted
  117. break;
  118. }
  119. }
  120. firing = false;
  121. if ( list ) {
  122. if ( !flags.once ) {
  123. if ( stack && stack.length ) {
  124. memory = stack.shift();
  125. self.fireWith( memory[ 0 ], memory[ 1 ] );
  126. }
  127. } else if ( memory === true ) {
  128. self.disable();
  129. } else {
  130. list = [];
  131. }
  132. }
  133. },
  134. // Actual Callbacks object
  135. self = {
  136. // Add a callback or a collection of callbacks to the list
  137. add: function() {
  138. if ( list ) {
  139. var length = list.length;
  140. add( arguments );
  141. // Do we need to add the callbacks to the
  142. // current firing batch?
  143. if ( firing ) {
  144. firingLength = list.length;
  145. // With memory, if we're not firing then
  146. // we should call right away, unless previous
  147. // firing was halted (stopOnFalse)
  148. } else if ( memory && memory !== true ) {
  149. firingStart = length;
  150. fire( memory[ 0 ], memory[ 1 ] );
  151. }
  152. }
  153. return this;
  154. },
  155. // Remove a callback from the list
  156. remove: function() {
  157. if ( list ) {
  158. var args = arguments,
  159. argIndex = 0,
  160. argLength = args.length;
  161. for ( ; argIndex < argLength ; argIndex++ ) {
  162. for ( var i = 0; i < list.length; i++ ) {
  163. if ( args[ argIndex ] === list[ i ] ) {
  164. // Handle firingIndex and firingLength
  165. if ( firing ) {
  166. if ( i <= firingLength ) {
  167. firingLength--;
  168. if ( i <= firingIndex ) {
  169. firingIndex--;
  170. }
  171. }
  172. }
  173. // Remove the element
  174. list.splice( i--, 1 );
  175. // If we have some unicity property then
  176. // we only need to do this once
  177. if ( flags.unique ) {
  178. break;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. return this;
  185. },
  186. // Control if a given callback is in the list
  187. has: function( fn ) {
  188. if ( list ) {
  189. var i = 0,
  190. length = list.length;
  191. for ( ; i < length; i++ ) {
  192. if ( fn === list[ i ] ) {
  193. return true;
  194. }
  195. }
  196. }
  197. return false;
  198. },
  199. // Remove all callbacks from the list
  200. empty: function() {
  201. list = [];
  202. return this;
  203. },
  204. // Have the list do nothing anymore
  205. disable: function() {
  206. list = stack = memory = undefined;
  207. return this;
  208. },
  209. // Is it disabled?
  210. disabled: function() {
  211. return !list;
  212. },
  213. // Lock the list in its current state
  214. lock: function() {
  215. stack = undefined;
  216. if ( !memory || memory === true ) {
  217. self.disable();
  218. }
  219. return this;
  220. },
  221. // Is it locked?
  222. locked: function() {
  223. return !stack;
  224. },
  225. // Call all callbacks with the given context and arguments
  226. fireWith: function( context, args ) {
  227. if ( stack ) {
  228. if ( firing ) {
  229. if ( !flags.once ) {
  230. stack.push( [ context, args ] );
  231. }
  232. } else if ( !( flags.once && memory ) ) {
  233. fire( context, args );
  234. }
  235. }
  236. return this;
  237. },
  238. // Call all the callbacks with the given arguments
  239. fire: function() {
  240. self.fireWith( this, arguments );
  241. return this;
  242. },
  243. // To know if the callbacks have already been called at least once
  244. fired: function() {
  245. return !!memory;
  246. }
  247. };
  248. return self;
  249. };
  250. jQuery.Deferred = function( func ) {
  251. var doneList = jQuery.Callbacks( "once memory" ),
  252. failList = jQuery.Callbacks( "once memory" ),
  253. progressList = jQuery.Callbacks( "memory" ),
  254. state = "pending",
  255. lists = {
  256. resolve: doneList,
  257. reject: failList,
  258. notify: progressList
  259. },
  260. promise = {
  261. done: doneList.add,
  262. fail: failList.add,
  263. progress: progressList.add,
  264. state: function() {
  265. return state;
  266. },
  267. // Deprecated
  268. isResolved: doneList.fired,
  269. isRejected: failList.fired,
  270. then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
  271. deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
  272. return this;
  273. },
  274. always: function() {
  275. return deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
  276. },
  277. pipe: function( fnDone, fnFail, fnProgress ) {
  278. return jQuery.Deferred(function( newDefer ) {
  279. jQuery.each( {
  280. done: [ fnDone, "resolve" ],
  281. fail: [ fnFail, "reject" ],
  282. progress: [ fnProgress, "notify" ]
  283. }, function( handler, data ) {
  284. var fn = data[ 0 ],
  285. action = data[ 1 ],
  286. returned;
  287. if ( jQuery.isFunction( fn ) ) {
  288. deferred[ handler ](function() {
  289. returned = fn.apply( this, arguments );
  290. if ( returned && jQuery.isFunction( returned.promise ) ) {
  291. returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
  292. } else {
  293. newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
  294. }
  295. });
  296. } else {
  297. deferred[ handler ]( newDefer[ action ] );
  298. }
  299. });
  300. }).promise();
  301. },
  302. // Get a promise for this deferred
  303. // If obj is provided, the promise aspect is added to the object
  304. promise: function( obj ) {
  305. if ( obj == null ) {
  306. obj = promise;
  307. } else {
  308. for ( var key in promise ) {
  309. obj[ key ] = promise[ key ];
  310. }
  311. }
  312. return obj;
  313. }
  314. },
  315. deferred = promise.promise({}),
  316. key;
  317. for ( key in lists ) {
  318. deferred[ key ] = lists[ key ].fire;
  319. deferred[ key + "With" ] = lists[ key ].fireWith;
  320. }
  321. // Handle state
  322. deferred.done( function() {
  323. state = "resolved";
  324. }, failList.disable, progressList.lock ).fail( function() {
  325. state = "rejected";
  326. }, doneList.disable, progressList.lock );
  327. // Call given func if any
  328. if ( func ) {
  329. func.call( deferred, deferred );
  330. }
  331. // All done!
  332. return deferred;
  333. };
  334. jQuery.Event = function( src, props ) {
  335. // Allow instantiation without the 'new' keyword
  336. if ( !(this instanceof jQuery.Event) ) {
  337. return new jQuery.Event( src, props );
  338. }
  339. // Event object
  340. if ( src && src.type ) {
  341. this.originalEvent = src;
  342. this.type = src.type;
  343. // Events bubbling up the document may have been marked as prevented
  344. // by a handler lower down the tree; reflect the correct value.
  345. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
  346. src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
  347. // Event type
  348. } else {
  349. this.type = src;
  350. }
  351. // Put explicitly provided properties onto the event object
  352. if ( props ) {
  353. jQuery.extend( this, props );
  354. }
  355. // Create a timestamp if incoming event doesn't have one
  356. this.timeStamp = src && src.timeStamp || jQuery.now();
  357. // Mark it as fixed
  358. this[ jQuery.expando ] = true;
  359. };
  360. jQuery._data = function( elem, name, data ) {
  361. return jQuery.data( elem, name, data, true );
  362. };
  363. jQuery._mark = function( elem, type ) {
  364. if ( elem ) {
  365. type = ( type || "fx" ) + "mark";
  366. jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
  367. }
  368. };
  369. jQuery._unmark = function( force, elem, type ) {
  370. if ( force !== true ) {
  371. type = elem;
  372. elem = force;
  373. force = false;
  374. }
  375. if ( elem ) {
  376. type = type || "fx";
  377. var key = type + "mark",
  378. count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
  379. if ( count ) {
  380. jQuery._data( elem, key, count );
  381. } else {
  382. jQuery.removeData( elem, key, true );
  383. handleQueueMarkDefer( elem, type, "mark" );
  384. }
  385. }
  386. };
  387. jQuery.acceptData = function( elem ) {
  388. if ( elem.nodeName ) {
  389. var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
  390. if ( match ) {
  391. return !(match === true || elem.getAttribute("classid") !== match);
  392. }
  393. }
  394. return true;
  395. };
  396. jQuery.access = function( elems, key, value, exec, fn, pass ) {
  397. var length = elems.length;
  398. // Setting many attributes
  399. if ( typeof key === "object" ) {
  400. for ( var k in key ) {
  401. jQuery.access( elems, k, key[k], exec, fn, value );
  402. }
  403. return elems;
  404. }
  405. // Setting one attribute
  406. if ( value !== undefined ) {
  407. // Optionally, function values get executed if exec is true
  408. exec = !pass && exec && jQuery.isFunction(value);
  409. for ( var i = 0; i < length; i++ ) {
  410. fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
  411. }
  412. return elems;
  413. }
  414. // Getting an attribute
  415. return length ? fn( elems[0], key ) : undefined;
  416. };
  417. jQuery.active = 0;
  418. jQuery.ajax = function( url, options ) {
  419. /// <summary>
  420. /// Perform an asynchronous HTTP (Ajax) request.
  421. /// &#10;1 - jQuery.ajax(url, settings)
  422. /// &#10;2 - jQuery.ajax(settings)
  423. /// </summary>
  424. /// <param name="url" type="String">
  425. /// A string containing the URL to which the request is sent.
  426. /// </param>
  427. /// <param name="options" type="Object">
  428. /// 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.
  429. /// </param>
  430. // If url is an object, simulate pre-1.5 signature
  431. if ( typeof url === "object" ) {
  432. options = url;
  433. url = undefined;
  434. }
  435. // Force options to be an object
  436. options = options || {};
  437. var // Create the final options object
  438. s = jQuery.ajaxSetup( {}, options ),
  439. // Callbacks context
  440. callbackContext = s.context || s,
  441. // Context for global events
  442. // It's the callbackContext if one was provided in the options
  443. // and if it's a DOM node or a jQuery collection
  444. globalEventContext = callbackContext !== s &&
  445. ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
  446. jQuery( callbackContext ) : jQuery.event,
  447. // Deferreds
  448. deferred = jQuery.Deferred(),
  449. completeDeferred = jQuery.Callbacks( "once memory" ),
  450. // Status-dependent callbacks
  451. statusCode = s.statusCode || {},
  452. // ifModified key
  453. ifModifiedKey,
  454. // Headers (they are sent all at once)
  455. requestHeaders = {},
  456. requestHeadersNames = {},
  457. // Response headers
  458. responseHeadersString,
  459. responseHeaders,
  460. // transport
  461. transport,
  462. // timeout handle
  463. timeoutTimer,
  464. // Cross-domain detection vars
  465. parts,
  466. // The jqXHR state
  467. state = 0,
  468. // To know if global events are to be dispatched
  469. fireGlobals,
  470. // Loop variable
  471. i,
  472. // Fake xhr
  473. jqXHR = {
  474. readyState: 0,
  475. // Caches the header
  476. setRequestHeader: function( name, value ) {
  477. if ( !state ) {
  478. var lname = name.toLowerCase();
  479. name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
  480. requestHeaders[ name ] = value;
  481. }
  482. return this;
  483. },
  484. // Raw string
  485. getAllResponseHeaders: function() {
  486. return state === 2 ? responseHeadersString : null;
  487. },
  488. // Builds headers hashtable if needed
  489. getResponseHeader: function( key ) {
  490. var match;
  491. if ( state === 2 ) {
  492. if ( !responseHeaders ) {
  493. responseHeaders = {};
  494. while( ( match = rheaders.exec( responseHeadersString ) ) ) {
  495. responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
  496. }
  497. }
  498. match = responseHeaders[ key.toLowerCase() ];
  499. }
  500. return match === undefined ? null : match;
  501. },
  502. // Overrides response content-type header
  503. overrideMimeType: function( type ) {
  504. if ( !state ) {
  505. s.mimeType = type;
  506. }
  507. return this;
  508. },
  509. // Cancel the request
  510. abort: function( statusText ) {
  511. statusText = statusText || "abort";
  512. if ( transport ) {
  513. transport.abort( statusText );
  514. }
  515. done( 0, statusText );
  516. return this;
  517. }
  518. };
  519. // Callback for when everything is done
  520. // It is defined here because jslint complains if it is declared
  521. // at the end of the function (which would be more logical and readable)
  522. function done( status, nativeStatusText, responses, headers ) {
  523. // Called once
  524. if ( state === 2 ) {
  525. return;
  526. }
  527. // State is "done" now
  528. state = 2;
  529. // Clear timeout if it exists
  530. if ( timeoutTimer ) {
  531. clearTimeout( timeoutTimer );
  532. }
  533. // Dereference transport for early garbage collection
  534. // (no matter how long the jqXHR object will be used)
  535. transport = undefined;
  536. // Cache response headers
  537. responseHeadersString = headers || "";
  538. // Set readyState
  539. jqXHR.readyState = status > 0 ? 4 : 0;
  540. var isSuccess,
  541. success,
  542. error,
  543. statusText = nativeStatusText,
  544. response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
  545. lastModified,
  546. etag;
  547. // If successful, handle type chaining
  548. if ( status >= 200 && status < 300 || status === 304 ) {
  549. // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  550. if ( s.ifModified ) {
  551. if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
  552. jQuery.lastModified[ ifModifiedKey ] = lastModified;
  553. }
  554. if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
  555. jQuery.etag[ ifModifiedKey ] = etag;
  556. }
  557. }
  558. // If not modified
  559. if ( status === 304 ) {
  560. statusText = "notmodified";
  561. isSuccess = true;
  562. // If we have data
  563. } else {
  564. try {
  565. success = ajaxConvert( s, response );
  566. statusText = "success";
  567. isSuccess = true;
  568. } catch(e) {
  569. // We have a parsererror
  570. statusText = "parsererror";
  571. error = e;
  572. }
  573. }
  574. } else {
  575. // We extract error from statusText
  576. // then normalize statusText and status for non-aborts
  577. error = statusText;
  578. if ( !statusText || status ) {
  579. statusText = "error";
  580. if ( status < 0 ) {
  581. status = 0;
  582. }
  583. }
  584. }
  585. // Set data for the fake xhr object
  586. jqXHR.status = status;
  587. jqXHR.statusText = "" + ( nativeStatusText || statusText );
  588. // Success/Error
  589. if ( isSuccess ) {
  590. deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
  591. } else {
  592. deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
  593. }
  594. // Status-dependent callbacks
  595. jqXHR.statusCode( statusCode );
  596. statusCode = undefined;
  597. if ( fireGlobals ) {
  598. globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
  599. [ jqXHR, s, isSuccess ? success : error ] );
  600. }
  601. // Complete
  602. completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
  603. if ( fireGlobals ) {
  604. globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
  605. // Handle the global AJAX counter
  606. if ( !( --jQuery.active ) ) {
  607. jQuery.event.trigger( "ajaxStop" );
  608. }
  609. }
  610. }
  611. // Attach deferreds
  612. deferred.promise( jqXHR );
  613. jqXHR.success = jqXHR.done;
  614. jqXHR.error = jqXHR.fail;
  615. jqXHR.complete = completeDeferred.add;
  616. // Status-dependent callbacks
  617. jqXHR.statusCode = function( map ) {
  618. if ( map ) {
  619. var tmp;
  620. if ( state < 2 ) {
  621. for ( tmp in map ) {
  622. statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
  623. }
  624. } else {
  625. tmp = map[ jqXHR.status ];
  626. jqXHR.then( tmp, tmp );
  627. }
  628. }
  629. return this;
  630. };
  631. // Remove hash character (#7531: and string promotion)
  632. // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
  633. // We also use the url parameter if available
  634. s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
  635. // Extract dataTypes list
  636. s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
  637. // Determine if a cross-domain request is in order
  638. if ( s.crossDomain == null ) {
  639. parts = rurl.exec( s.url.toLowerCase() );
  640. s.crossDomain = !!( parts &&
  641. ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
  642. ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
  643. ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
  644. );
  645. }
  646. // Convert data if not already a string
  647. if ( s.data && s.processData && typeof s.data !== "string" ) {
  648. s.data = jQuery.param( s.data, s.traditional );
  649. }
  650. // Apply prefilters
  651. inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
  652. // If request was aborted inside a prefiler, stop there
  653. if ( state === 2 ) {
  654. return false;
  655. }
  656. // We can fire global events as of now if asked to
  657. fireGlobals = s.global;
  658. // Uppercase the type
  659. s.type = s.type.toUpperCase();
  660. // Determine if request has content
  661. s.hasContent = !rnoContent.test( s.type );
  662. // Watch for a new set of requests
  663. if ( fireGlobals && jQuery.active++ === 0 ) {
  664. jQuery.event.trigger( "ajaxStart" );
  665. }
  666. // More options handling for requests with no content
  667. if ( !s.hasContent ) {
  668. // If data is available, append data to url
  669. if ( s.data ) {
  670. s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
  671. // #9682: remove data so that it's not used in an eventual retry
  672. delete s.data;
  673. }
  674. // Get ifModifiedKey before adding the anti-cache parameter
  675. ifModifiedKey = s.url;
  676. // Add anti-cache in url if needed
  677. if ( s.cache === false ) {
  678. var ts = jQuery.now(),
  679. // try replacing _= if it is there
  680. ret = s.url.replace( rts, "$1_=" + ts );
  681. // if nothing was replaced, add timestamp to the end
  682. s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
  683. }
  684. }
  685. // Set the correct header, if data is being sent
  686. if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
  687. jqXHR.setRequestHeader( "Content-Type", s.contentType );
  688. }
  689. // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  690. if ( s.ifModified ) {
  691. ifModifiedKey = ifModifiedKey || s.url;
  692. if ( jQuery.lastModified[ ifModifiedKey ] ) {
  693. jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
  694. }
  695. if ( jQuery.etag[ ifModifiedKey ] ) {
  696. jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
  697. }
  698. }
  699. // Set the Accepts header for the server, depending on the dataType
  700. jqXHR.setRequestHeader(
  701. "Accept",
  702. s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
  703. s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
  704. s.accepts[ "*" ]
  705. );
  706. // Check for headers option
  707. for ( i in s.headers ) {
  708. jqXHR.setRequestHeader( i, s.headers[ i ] );
  709. }
  710. // Allow custom headers/mimetypes and early abort
  711. if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
  712. // Abort if not done already
  713. jqXHR.abort();
  714. return false;
  715. }
  716. // Install callbacks on deferreds
  717. for ( i in { success: 1, error: 1, complete: 1 } ) {
  718. jqXHR[ i ]( s[ i ] );
  719. }
  720. // Get transport
  721. transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
  722. // If no transport, we auto-abort
  723. if ( !transport ) {
  724. done( -1, "No Transport" );
  725. } else {
  726. jqXHR.readyState = 1;
  727. // Send global event
  728. if ( fireGlobals ) {
  729. globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
  730. }
  731. // Timeout
  732. if ( s.async && s.timeout > 0 ) {
  733. timeoutTimer = setTimeout( function(){
  734. jqXHR.abort( "timeout" );
  735. }, s.timeout );
  736. }
  737. try {
  738. state = 1;
  739. transport.send( requestHeaders, done );
  740. } catch (e) {
  741. // Propagate exception as error if not done
  742. if ( state < 2 ) {
  743. done( -1, e );
  744. // Simply rethrow otherwise
  745. } else {
  746. jQuery.error( e );
  747. }
  748. }
  749. }
  750. return jqXHR;
  751. };
  752. jQuery.ajaxPrefilter = function( dataTypeExpression, func ) {
  753. /// <summary>
  754. /// Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
  755. /// </summary>
  756. /// <param name="dataTypeExpression" type="String">
  757. /// An optional string containing one or more space-separated dataTypes
  758. /// </param>
  759. /// <param name="func" type="Function">
  760. /// A handler to set default values for future Ajax requests.
  761. /// </param>
  762. /// <returns type="undefined" />
  763. if ( typeof dataTypeExpression !== "string" ) {
  764. func = dataTypeExpression;
  765. dataTypeExpression = "*";
  766. }
  767. if ( jQuery.isFunction( func ) ) {
  768. var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
  769. i = 0,
  770. length = dataTypes.length,
  771. dataType,
  772. list,
  773. placeBefore;
  774. // For each dataType in the dataTypeExpression
  775. for ( ; i < length; i++ ) {
  776. dataType = dataTypes[ i ];
  777. // We control if we're asked to add before
  778. // any existing element
  779. placeBefore = /^\+/.test( dataType );
  780. if ( placeBefore ) {
  781. dataType = dataType.substr( 1 ) || "*";
  782. }
  783. list = structure[ dataType ] = structure[ dataType ] || [];
  784. // then we add to the structure accordingly
  785. list[ placeBefore ? "unshift" : "push" ]( func );
  786. }
  787. }
  788. };
  789. jQuery.ajaxSettings = { "url": 'http://localhost:25813/?ver=1.7&newLineMethod=xml',
  790. "isLocal": false,
  791. "global": true,
  792. "type": 'GET',
  793. "contentType": 'application/x-www-form-urlencoded',
  794. "processData": true,
  795. "async": true,
  796. "accepts": {},
  797. "contents": {},
  798. "responseFields": {},
  799. "converters": {},
  800. "flatOptions": {},
  801. "jsonp": 'callback' };
  802. jQuery.ajaxSetup = function( target, settings ) {
  803. /// <summary>
  804. /// Set default values for future Ajax requests.
  805. /// </summary>
  806. /// <param name="target" type="Object">
  807. /// A set of key/value pairs that configure the default Ajax request. All options are optional.
  808. /// </param>
  809. if ( settings ) {
  810. // Building a settings object
  811. ajaxExtend( target, jQuery.ajaxSettings );
  812. } else {
  813. // Extending ajaxSettings
  814. settings = target;
  815. target = jQuery.ajaxSettings;
  816. }
  817. ajaxExtend( target, settings );
  818. return target;
  819. };
  820. jQuery.ajaxTransport = function( dataTypeExpression, func ) {
  821. if ( typeof dataTypeExpression !== "string" ) {
  822. func = dataTypeExpression;
  823. dataTypeExpression = "*";
  824. }
  825. if ( jQuery.isFunction( func ) ) {
  826. var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
  827. i = 0,
  828. length = dataTypes.length,
  829. dataType,
  830. list,
  831. placeBefore;
  832. // For each dataType in the dataTypeExpression
  833. for ( ; i < length; i++ ) {
  834. dataType = dataTypes[ i ];
  835. // We control if we're asked to add before
  836. // any existing element
  837. placeBefore = /^\+/.test( dataType );
  838. if ( placeBefore ) {
  839. dataType = dataType.substr( 1 ) || "*";
  840. }
  841. list = structure[ dataType ] = structure[ dataType ] || [];
  842. // then we add to the structure accordingly
  843. list[ placeBefore ? "unshift" : "push" ]( func );
  844. }
  845. }
  846. };
  847. jQuery.attr = function( elem, name, value, pass ) {
  848. var ret, hooks, notxml,
  849. nType = elem.nodeType;
  850. // don't get/set attributes on text, comment and attribute nodes
  851. if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
  852. return undefined;
  853. }
  854. if ( pass && name in jQuery.attrFn ) {
  855. return jQuery( elem )[ name ]( value );
  856. }
  857. // Fallback to prop when attributes are not supported
  858. if ( !("getAttribute" in elem) ) {
  859. return jQuery.prop( elem, name, value );
  860. }
  861. notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
  862. // All attributes are lowercase
  863. // Grab necessary hook if one is defined
  864. if ( notxml ) {
  865. name = name.toLowerCase();
  866. hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
  867. }
  868. if ( value !== undefined ) {
  869. if ( value === null ) {
  870. jQuery.removeAttr( elem, name );
  871. return undefined;
  872. } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
  873. return ret;
  874. } else {
  875. elem.setAttribute( name, "" + value );
  876. return value;
  877. }
  878. } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
  879. return ret;
  880. } else {
  881. ret = elem.getAttribute( name );
  882. // Non-existent attributes return null, we normalize to undefined
  883. return ret === null ?
  884. undefined :
  885. ret;
  886. }
  887. };
  888. jQuery.attrFn = { "val": true,
  889. "css": true,
  890. "html": true,
  891. "text": true,
  892. "data": true,
  893. "width": true,
  894. "height": true,
  895. "offset": true,
  896. "blur": true,
  897. "focus": true,
  898. "focusin": true,
  899. "focusout": true,
  900. "load": true,
  901. "resize": true,
  902. "scroll": true,
  903. "unload": true,
  904. "click": true,
  905. "dblclick": true,
  906. "mousedown": true,
  907. "mouseup": true,
  908. "mousemove": true,
  909. "mouseover": true,
  910. "mouseout": true,
  911. "mouseenter": true,
  912. "mouseleave": true,
  913. "change": true,
  914. "select": true,
  915. "submit": true,
  916. "keydown": true,
  917. "keypress": true,
  918. "keyup": true,
  919. "error": true,
  920. "contextmenu": true };
  921. jQuery.attrHooks = { "type": {},
  922. "value": {},
  923. "tabindex": {} };
  924. jQuery.bindReady = function() {
  925. if ( readyList ) {
  926. return;
  927. }
  928. readyList = jQuery.Callbacks( "once memory" );
  929. // Catch cases where $(document).ready() is called after the
  930. // browser event has already occurred.
  931. if ( document.readyState === "complete" ) {
  932. // Handle it asynchronously to allow scripts the opportunity to delay ready
  933. return setTimeout( jQuery.ready, 1 );
  934. }
  935. // Mozilla, Opera and webkit nightlies currently support this event
  936. if ( document.addEventListener ) {
  937. // Use the handy event callback
  938. document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
  939. // A fallback to window.onload, that will always work
  940. window.addEventListener( "load", jQuery.ready, false );
  941. // If IE event model is used
  942. } else if ( document.attachEvent ) {
  943. // ensure firing before onload,
  944. // maybe late but safe also for iframes
  945. document.attachEvent( "onreadystatechange", DOMContentLoaded );
  946. // A fallback to window.onload, that will always work
  947. window.attachEvent( "onload", jQuery.ready );
  948. // If IE and not a frame
  949. // continually check to see if the document is ready
  950. var toplevel = false;
  951. try {
  952. toplevel = window.frameElement == null;
  953. } catch(e) {}
  954. if ( document.documentElement.doScroll && toplevel ) {
  955. doScrollCheck();
  956. }
  957. }
  958. };
  959. jQuery.boxModel = true;
  960. jQuery.browser = { "msie": true,
  961. "version": '9.0' };
  962. jQuery.buildFragment = function( args, nodes, scripts ) {
  963. var fragment, cacheable, cacheresults, doc,
  964. first = args[ 0 ];
  965. // nodes may contain either an explicit document object,
  966. // a jQuery collection or context object.
  967. // If nodes[0] contains a valid object to assign to doc
  968. if ( nodes && nodes[0] ) {
  969. doc = nodes[0].ownerDocument || nodes[0];
  970. }
  971. // Ensure that an attr object doesn't incorrectly stand in as a document object
  972. // Chrome and Firefox seem to allow this to occur and will throw exception
  973. // Fixes #8950
  974. if ( !doc.createDocumentFragment ) {
  975. doc = document;
  976. }
  977. // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
  978. // Cloning options loses the selected state, so don't cache them
  979. // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
  980. // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
  981. // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
  982. if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
  983. first.charAt(0) === "<" && !rnocache.test( first ) &&
  984. (jQuery.support.checkClone || !rchecked.test( first )) &&
  985. (!jQuery.support.unknownElems && rnoshimcache.test( first )) ) {
  986. cacheable = true;
  987. cacheresults = jQuery.fragments[ first ];
  988. if ( cacheresults && cacheresults !== 1 ) {
  989. fragment = cacheresults;
  990. }
  991. }
  992. if ( !fragment ) {
  993. fragment = doc.createDocumentFragment();
  994. jQuery.clean( args, doc, fragment, scripts );
  995. }
  996. if ( cacheable ) {
  997. jQuery.fragments[ first ] = cacheresults ? fragment : 1;
  998. }
  999. return { fragment: fragment, cacheable: cacheable };
  1000. };
  1001. jQuery.cache = {};
  1002. jQuery.camelCase = function( string ) {
  1003. return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
  1004. };
  1005. jQuery.clean = function( elems, context, fragment, scripts ) {
  1006. var checkScriptType;
  1007. context = context || document;
  1008. // !context.createElement fails in IE with an error but returns typeof 'object'
  1009. if ( typeof context.createElement === "undefined" ) {
  1010. context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
  1011. }
  1012. var ret = [], j;
  1013. for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
  1014. if ( typeof elem === "number" ) {
  1015. elem += "";
  1016. }
  1017. if ( !elem ) {
  1018. continue;
  1019. }
  1020. // Convert html string into DOM nodes
  1021. if ( typeof elem === "string" ) {
  1022. if ( !rhtml.test( elem ) ) {
  1023. elem = context.createTextNode( elem );
  1024. } else {
  1025. // Fix "XHTML"-style tags in all browsers
  1026. elem = elem.replace(rxhtmlTag, "<$1></$2>");
  1027. // Trim whitespace, otherwise indexOf won't work as expected
  1028. var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
  1029. wrap = wrapMap[ tag ] || wrapMap._default,
  1030. depth = wrap[0],
  1031. div = context.createElement("div");
  1032. // Append wrapper element to unknown element safe doc fragment
  1033. if ( context === document ) {
  1034. // Use the fragment we've already created for this document
  1035. safeFragment.appendChild( div );
  1036. } else {
  1037. // Use a fragment created with the owner document
  1038. createSafeFragment( context ).appendChild( div );
  1039. }
  1040. // Go to html and back, then peel off extra wrappers
  1041. div.innerHTML = wrap[1] + elem + wrap[2];
  1042. // Move to the right depth
  1043. while ( depth-- ) {
  1044. div = div.lastChild;
  1045. }
  1046. // Remove IE's autoinserted <tbody> from table fragments
  1047. if ( !jQuery.support.tbody ) {
  1048. // String was a <table>, *may* have spurious <tbody>
  1049. var hasBody = rtbody.test(elem),
  1050. tbody = tag === "table" && !hasBody ?
  1051. div.firstChild && div.firstChild.childNodes :
  1052. // String was a bare <thead> or <tfoot>
  1053. wrap[1] === "<table>" && !hasBody ?
  1054. div.childNodes :
  1055. [];
  1056. for ( j = tbody.length - 1; j >= 0 ; --j ) {
  1057. if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
  1058. tbody[ j ].parentNode.removeChild( tbody[ j ] );
  1059. }
  1060. }
  1061. }
  1062. // IE completely kills leading whitespace when innerHTML is used
  1063. if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
  1064. div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
  1065. }
  1066. elem = div.childNodes;
  1067. }
  1068. }
  1069. // Resets defaultChecked for any radios and checkboxes
  1070. // about to be appended to the DOM in IE 6/7 (#8060)
  1071. var len;
  1072. if ( !jQuery.support.appendChecked ) {
  1073. if ( elem[0] && typeof (len = elem.length) === "number" ) {
  1074. for ( j = 0; j < len; j++ ) {
  1075. findInputs( elem[j] );
  1076. }
  1077. } else {
  1078. findInputs( elem );
  1079. }
  1080. }
  1081. if ( elem.nodeType ) {
  1082. ret.push( elem );
  1083. } else {
  1084. ret = jQuery.merge( ret, elem );
  1085. }
  1086. }
  1087. if ( fragment ) {
  1088. checkScriptType = function( elem ) {
  1089. return !elem.type || rscriptType.test( elem.type );
  1090. };
  1091. for ( i = 0; ret[i]; i++ ) {
  1092. if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
  1093. scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
  1094. } else {
  1095. if ( ret[i].nodeType === 1 ) {
  1096. var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
  1097. ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
  1098. }
  1099. fragment.appendChild( ret[i] );
  1100. }
  1101. }
  1102. }
  1103. return ret;
  1104. };
  1105. jQuery.cleanData = function( elems ) {
  1106. var data, id,
  1107. cache = jQuery.cache,
  1108. special = jQuery.event.special,
  1109. deleteExpando = jQuery.support.deleteExpando;
  1110. for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
  1111. if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
  1112. continue;
  1113. }
  1114. id = elem[ jQuery.expando ];
  1115. if ( id ) {
  1116. data = cache[ id ];
  1117. if ( data && data.events ) {
  1118. for ( var type in data.events ) {
  1119. if ( special[ type ] ) {
  1120. jQuery.event.remove( elem, type );
  1121. // This is a shortcut to avoid jQuery.event.remove's overhead
  1122. } else {
  1123. jQuery.removeEvent( elem, type, data.handle );
  1124. }
  1125. }
  1126. // Null the DOM reference to avoid IE6/7/8 leak (#7054)
  1127. if ( data.handle ) {
  1128. data.handle.elem = null;
  1129. }
  1130. }
  1131. if ( deleteExpando ) {
  1132. delete elem[ jQuery.expando ];
  1133. } else if ( elem.removeAttribute ) {
  1134. elem.removeAttribute( jQuery.expando );
  1135. }
  1136. delete cache[ id ];
  1137. }
  1138. }
  1139. };
  1140. jQuery.clone = function( elem, dataAndEvents, deepDataAndEvents ) {
  1141. var clone = elem.cloneNode(true),
  1142. srcElements,
  1143. destElements,
  1144. i;
  1145. if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
  1146. (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
  1147. // IE copies events bound via attachEvent when using cloneNode.
  1148. // Calling detachEvent on the clone will also remove the events
  1149. // from the original. In order to get around this, we use some
  1150. // proprietary methods to clear the events. Thanks to MooTools
  1151. // guys for this hotness.
  1152. cloneFixAttributes( elem, clone );
  1153. // Using Sizzle here is crazy slow, so we use getElementsByTagName
  1154. // instead
  1155. srcElements = getAll( elem );
  1156. destElements = getAll( clone );
  1157. // Weird iteration because IE will replace the length property
  1158. // with an element if you are cloning the body and one of the
  1159. // elements on the page has a name or id of "length"
  1160. for ( i = 0; srcElements[i]; ++i ) {
  1161. // Ensure that the destination node is not null; Fixes #9587
  1162. if ( destElements[i] ) {
  1163. cloneFixAttributes( srcElements[i], destElements[i] );
  1164. }
  1165. }
  1166. }
  1167. // Copy the events from the original to the clone
  1168. if ( dataAndEvents ) {
  1169. cloneCopyEvent( elem, clone );
  1170. if ( deepDataAndEvents ) {
  1171. srcElements = getAll( elem );
  1172. destElements = getAll( clone );
  1173. for ( i = 0; srcElements[i]; ++i ) {
  1174. cloneCopyEvent( srcElements[i], destElements[i] );
  1175. }
  1176. }
  1177. }
  1178. srcElements = destElements = null;
  1179. // Return the cloned set
  1180. return clone;
  1181. };
  1182. jQuery.contains = function( a, b ) {
  1183. /// <summary>
  1184. /// Check to see if a DOM element is within another DOM element.
  1185. /// </summary>
  1186. /// <param name="a" domElement="true">
  1187. /// The DOM element that may contain the other element.
  1188. /// </param>
  1189. /// <param name="b" domElement="true">
  1190. /// The DOM element that may be contained by the other element.
  1191. /// </param>
  1192. /// <returns type="Boolean" />
  1193. return a !== b && (a.contains ? a.contains(b) : true);
  1194. };
  1195. jQuery.css = function( elem, name, extra ) {
  1196. var ret, hooks;
  1197. // Make sure that we're working with the right name
  1198. name = jQuery.camelCase( name );
  1199. hooks = jQuery.cssHooks[ name ];
  1200. name = jQuery.cssProps[ name ] || name;
  1201. // cssFloat needs a special treatment
  1202. if ( name === "cssFloat" ) {
  1203. name = "float";
  1204. }
  1205. // If a hook was provided get the computed value from there
  1206. if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
  1207. return ret;
  1208. // Otherwise, if a way to get the computed value exists, use that
  1209. } else if ( curCSS ) {
  1210. return curCSS( elem, name );
  1211. }
  1212. };
  1213. jQuery.cssHooks = { "opacity": {},
  1214. "height": {},
  1215. "width": {} };
  1216. jQuery.cssNumber = { "fillOpacity": true,
  1217. "fontWeight": true,
  1218. "lineHeight": true,
  1219. "opacity": true,
  1220. "orphans": true,
  1221. "widows": true,
  1222. "zIndex": true,
  1223. "zoom": true };
  1224. jQuery.cssProps = { "float": 'cssFloat' };
  1225. jQuery.curCSS = function( elem, name, extra ) {
  1226. var ret, hooks;
  1227. // Make sure that we're working with the right name
  1228. name = jQuery.camelCase( name );
  1229. hooks = jQuery.cssHooks[ name ];
  1230. name = jQuery.cssProps[ name ] || name;
  1231. // cssFloat needs a special treatment
  1232. if ( name === "cssFloat" ) {
  1233. name = "float";
  1234. }
  1235. // If a hook was provided get the computed value from there
  1236. if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
  1237. return ret;
  1238. // Otherwise, if a way to get the computed value exists, use that
  1239. } else if ( curCSS ) {
  1240. return curCSS( elem, name );
  1241. }
  1242. };
  1243. jQuery.data = function( elem, name, data, pvt /* Internal Use Only */ ) {
  1244. /// <summary>
  1245. /// 1: Store arbitrary data associated with the specified element. Returns the value that was set.
  1246. /// &#10; 1.1 - jQuery.data(element, key, value)
  1247. /// &#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.
  1248. /// &#10; 2.1 - jQuery.data(element, key)
  1249. /// &#10; 2.2 - jQuery.data(element)
  1250. /// </summary>
  1251. /// <param name="elem" domElement="true">
  1252. /// The DOM element to associate with the data.
  1253. /// </param>
  1254. /// <param name="name" type="String">
  1255. /// A string naming the piece of data to set.
  1256. /// </param>
  1257. /// <param name="data" type="Object">
  1258. /// The new data value.
  1259. /// </param>
  1260. /// <returns type="Object" />
  1261. if ( !jQuery.acceptData( elem ) ) {
  1262. return;
  1263. }
  1264. var privateCache, thisCache, ret,
  1265. internalKey = jQuery.expando,
  1266. getByName = typeof name === "string",
  1267. // We have to handle DOM nodes and JS objects differently because IE6-7
  1268. // can't GC object references properly across the DOM-JS boundary
  1269. isNode = elem.nodeType,
  1270. // Only DOM nodes need the global jQuery cache; JS object data is
  1271. // attached directly to the object so GC can occur automatically
  1272. cache = isNode ? jQuery.cache : elem,
  1273. // Only defining an ID for JS objects if its cache already exists allows
  1274. // the code to shortcut on the same path as a DOM node with no cache
  1275. id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando,
  1276. isEvents = name === "events";
  1277. // Avoid doing any more work than we need to when trying to get data on an
  1278. // object that has no data at all
  1279. if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
  1280. return;
  1281. }
  1282. if ( !id ) {
  1283. // Only DOM nodes need a new unique ID for each element since their data
  1284. // ends up in the global cache
  1285. if ( isNode ) {
  1286. elem[ jQuery.expando ] = id = ++jQuery.uuid;
  1287. } else {
  1288. id = jQuery.expando;
  1289. }
  1290. }
  1291. if ( !cache[ id ] ) {
  1292. cache[ id ] = {};
  1293. // Avoids exposing jQuery metadata on plain JS objects when the object
  1294. // is serialized using JSON.stringify
  1295. if ( !isNode ) {
  1296. cache[ id ].toJSON = jQuery.noop;
  1297. }
  1298. }
  1299. // An object can be passed to jQuery.data instead of a key/value pair; this gets
  1300. // shallow copied over onto the existing cache
  1301. if ( typeof name === "object" || typeof name === "function" ) {
  1302. if ( pvt ) {
  1303. cache[ id ] = jQuery.extend( cache[ id ], name );
  1304. } else {
  1305. cache[ id ].data = jQuery.extend( cache[ id ].data, name );
  1306. }
  1307. }
  1308. privateCache = thisCache = cache[ id ];
  1309. // jQuery data() is stored in a separate object inside the object's internal data
  1310. // cache in order to avoid key collisions between internal data and user-defined
  1311. // data.
  1312. if ( !pvt ) {
  1313. if ( !thisCache.data ) {
  1314. thisCache.data = {};
  1315. }
  1316. thisCache = thisCache.data;
  1317. }
  1318. if ( data !== undefined ) {
  1319. thisCache[ jQuery.camelCase( name ) ] = data;
  1320. }
  1321. // Users should not attempt to inspect the internal events object using jQuery.data,
  1322. // it is undocumented and subject to change. But does anyone listen? No.
  1323. if ( isEvents && !thisCache[ name ] ) {
  1324. return privateCache.events;
  1325. }
  1326. // Check for both converted-to-camel and non-converted data property names
  1327. // If a data property was specified
  1328. if ( getByName ) {
  1329. // First Try to find as-is property data
  1330. ret = thisCache[ name ];
  1331. // Test for null|undefined property data
  1332. if ( ret == null ) {
  1333. // Try to find the camelCased property
  1334. ret = thisCache[ jQuery.camelCase( name ) ];
  1335. }
  1336. } else {
  1337. ret = thisCache;
  1338. }
  1339. return ret;
  1340. };
  1341. jQuery.dequeue = function( elem, type ) {
  1342. /// <summary>
  1343. /// Execute the next function on the queue for the matched element.
  1344. /// </summary>
  1345. /// <param name="elem" domElement="true">
  1346. /// A DOM element from which to remove and execute a queued function.
  1347. /// </param>
  1348. /// <param name="type" type="String">
  1349. /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
  1350. /// </param>
  1351. /// <returns type="jQuery" />
  1352. type = type || "fx";
  1353. var queue = jQuery.queue( elem, type ),
  1354. fn = queue.shift(),
  1355. hooks = {};
  1356. // If the fx queue is dequeued, always remove the progress sentinel
  1357. if ( fn === "inprogress" ) {
  1358. fn = queue.shift();
  1359. }
  1360. if ( fn ) {
  1361. // Add a progress sentinel to prevent the fx queue from being
  1362. // automatically dequeued
  1363. if ( type === "fx" ) {
  1364. queue.unshift( "inprogress" );
  1365. }
  1366. jQuery._data( elem, type + ".run", hooks );
  1367. fn.call( elem, function() {
  1368. jQuery.dequeue( elem, type );
  1369. }, hooks );
  1370. }
  1371. if ( !queue.length ) {
  1372. jQuery.removeData( elem, type + "queue " + type + ".run", true );
  1373. handleQueueMarkDefer( elem, type, "queue" );
  1374. }
  1375. };
  1376. jQuery.dir = function( elem, dir, until ) {
  1377. var matched = [],
  1378. cur = elem[ dir ];
  1379. while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
  1380. if ( cur.nodeType === 1 ) {
  1381. matched.push( cur );
  1382. }
  1383. cur = cur[dir];
  1384. }
  1385. return matched;
  1386. };
  1387. jQuery.each = function( object, callback, args ) {
  1388. /// <summary>
  1389. /// 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.
  1390. /// </summary>
  1391. /// <param name="object" type="Object">
  1392. /// The object or array to iterate over.
  1393. /// </param>
  1394. /// <param name="callback" type="Function">
  1395. /// The function that will be executed on every object.
  1396. /// </param>
  1397. /// <returns type="Object" />
  1398. var name, i = 0,
  1399. length = object.length,
  1400. isObj = length === undefined || jQuery.isFunction( object );
  1401. if ( args ) {
  1402. if ( isObj ) {
  1403. for ( name in object ) {
  1404. if ( callback.apply( object[ name ], args ) === false ) {
  1405. break;
  1406. }
  1407. }
  1408. } else {
  1409. for ( ; i < length; ) {
  1410. if ( callback.apply( object[ i++ ], args ) === false ) {
  1411. break;
  1412. }
  1413. }
  1414. }
  1415. // A special, fast, case for the most common use of each
  1416. } else {
  1417. if ( isObj ) {
  1418. for ( name in object ) {
  1419. if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
  1420. break;
  1421. }
  1422. }
  1423. } else {
  1424. for ( ; i < length; ) {
  1425. if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
  1426. break;
  1427. }
  1428. }
  1429. }
  1430. }
  1431. return object;
  1432. };
  1433. jQuery.easing = {};
  1434. jQuery.error = function( msg ) {
  1435. /// <summary>
  1436. /// Takes a string and throws an exception containing it.
  1437. /// </summary>
  1438. /// <param name="msg" type="String">
  1439. /// The message to send out.
  1440. /// </param>
  1441. throw msg;
  1442. };
  1443. jQuery.etag = {};
  1444. jQuery.event = { "global": {},
  1445. "customEvent": {},
  1446. "props": ['attrChange','attrName','relatedNode','srcElement','altKey','bubbles','cancelable','ctrlKey','currentTarget','eventPhase','metaKey','relatedTarget','shiftKey','target','timeStamp','view','which'],
  1447. "fixHooks": {},
  1448. "keyHooks": {},
  1449. "mouseHooks": {},
  1450. "special": {},
  1451. "triggered": false };
  1452. jQuery.expr = { "order": ['ID','CLASS','NAME','TAG'],
  1453. "match": {},
  1454. "leftMatch": {},
  1455. "attrMap": {},
  1456. "attrHandle": {},
  1457. "relative": {},
  1458. "find": {},
  1459. "preFilter": {},
  1460. "filters": {},
  1461. "setFilters": {},
  1462. "filter": {},
  1463. ":": {} };
  1464. jQuery.extend = function() {
  1465. /// <summary>
  1466. /// Merge the contents of two or more objects together into the first object.
  1467. /// &#10;1 - jQuery.extend(target, object1, objectN)
  1468. /// &#10;2 - jQuery.extend(deep, target, object1, objectN)
  1469. /// </summary>
  1470. /// <param name="" type="Boolean">
  1471. /// If true, the merge becomes recursive (aka. deep copy).
  1472. /// </param>
  1473. /// <param name="" type="Object">
  1474. /// The object to extend. It will receive the new properties.
  1475. /// </param>
  1476. /// <param name="" type="Object">
  1477. /// An object containing additional properties to merge in.
  1478. /// </param>
  1479. /// <param name="" type="Object">
  1480. /// Additional objects containing properties to merge in.
  1481. /// </param>
  1482. /// <returns type="Object" />
  1483. var options, name, src, copy, copyIsArray, clone,
  1484. target = arguments[0] || {},
  1485. i = 1,
  1486. length = arguments.length,
  1487. deep = false;
  1488. // Handle a deep copy situation
  1489. if ( typeof target === "boolean" ) {
  1490. deep = target;
  1491. target = arguments[1] || {};
  1492. // skip the boolean and the target
  1493. i = 2;
  1494. }
  1495. // Handle case when target is a string or something (possible in deep copy)
  1496. if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
  1497. target = {};
  1498. }
  1499. // extend jQuery itself if only one argument is passed
  1500. if ( length === i ) {
  1501. target = this;
  1502. --i;
  1503. }
  1504. for ( ; i < length; i++ ) {
  1505. // Only deal with non-null/undefined values
  1506. if ( (options = arguments[ i ]) != null ) {
  1507. // Extend the base object
  1508. for ( name in options ) {
  1509. src = target[ name ];
  1510. copy = options[ name ];
  1511. // Prevent never-ending loop
  1512. if ( target === copy ) {
  1513. continue;
  1514. }
  1515. // Recurse if we're merging plain objects or arrays
  1516. if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
  1517. if ( copyIsArray ) {
  1518. copyIsArray = false;
  1519. clone = src && jQuery.isArray(src) ? src : [];
  1520. } else {
  1521. clone = src && jQuery.isPlainObject(src) ? src : {};
  1522. }
  1523. // Never move original objects, clone them
  1524. target[ name ] = jQuery.extend( deep, clone, copy );
  1525. // Don't bring in undefined values
  1526. } else if ( copy !== undefined ) {
  1527. target[ name ] = copy;
  1528. }
  1529. }
  1530. }
  1531. }
  1532. // Return the modified object
  1533. return target;
  1534. };
  1535. jQuery.filter = function( expr, elems, not ) {
  1536. if ( not ) {
  1537. expr = ":not(" + expr + ")";
  1538. }
  1539. return elems.length === 1 ?
  1540. jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
  1541. jQuery.find.matches(expr, elems);
  1542. };
  1543. jQuery.find = function( query, context, extra, seed ) {
  1544. context = context || document;
  1545. // Only use querySelectorAll on non-XML documents
  1546. // (ID selectors don't work in non-HTML documents)
  1547. if ( !seed && !Sizzle.isXML(context) ) {
  1548. // See if we find a selector to speed up
  1549. var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
  1550. if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
  1551. // Speed-up: Sizzle("TAG")
  1552. if ( match[1] ) {
  1553. return makeArray( context.getElementsByTagName( query ), extra );
  1554. // Speed-up: Sizzle(".CLASS")
  1555. } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
  1556. return makeArray( context.getElementsByClassName( match[2] ), extra );
  1557. }
  1558. }
  1559. if ( context.nodeType === 9 ) {
  1560. // Speed-up: Sizzle("body")
  1561. // The body element only exists once, optimize finding it
  1562. if ( query === "body" && context.body ) {
  1563. return makeArray( [ context.body ], extra );
  1564. // Speed-up: Sizzle("#ID")
  1565. } else if ( match && match[3] ) {
  1566. var elem = context.getElementById( match[3] );
  1567. // Check parentNode to catch when Blackberry 4.6 returns
  1568. // nodes that are no longer in the document #6963
  1569. if ( elem && elem.parentNode ) {
  1570. // Handle the case where IE and Opera return items
  1571. // by name instead of ID
  1572. if ( elem.id === match[3] ) {
  1573. return makeArray( [ elem ], extra );
  1574. }
  1575. } else {
  1576. return makeArray( [], extra );
  1577. }
  1578. }
  1579. try {
  1580. return makeArray( context.querySelectorAll(query), extra );
  1581. } catch(qsaError) {}
  1582. // qSA works strangely on Element-rooted queries
  1583. // We can work around this by specifying an extra ID on the root
  1584. // and working up from there (Thanks to Andrew Dupont for the technique)
  1585. // IE 8 doesn't work on object elements
  1586. } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
  1587. var oldContext = context,
  1588. old = context.getAttribute( "id" ),
  1589. nid = old || id,
  1590. hasParent = context.parentNode,
  1591. relativeHierarchySelector = /^\s*[+~]/.test( query );
  1592. if ( !old ) {
  1593. context.setAttribute( "id", nid );
  1594. } else {
  1595. nid = nid.replace( /'/g, "\\$&" );
  1596. }
  1597. if ( relativeHierarchySelector && hasParent ) {
  1598. context = context.parentNode;
  1599. }
  1600. try {
  1601. if ( !relativeHierarchySelector || hasParent ) {
  1602. return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
  1603. }
  1604. } catch(pseudoError) {
  1605. } finally {
  1606. if ( !old ) {
  1607. oldContext.removeAttribute( "id" );
  1608. }
  1609. }
  1610. }
  1611. }
  1612. return oldSizzle(query, context, extra, seed);
  1613. };
  1614. jQuery.fn = { "selector": '',
  1615. "jquery": '1.7',
  1616. "length": 0 };
  1617. jQuery.fragments = {};
  1618. jQuery.fx = function( elem, options, prop ) {
  1619. this.options = options;
  1620. this.elem = elem;
  1621. this.prop = prop;
  1622. options.orig = options.orig || {};
  1623. };
  1624. jQuery.get = function( url, data, callback, type ) {
  1625. /// <summary>
  1626. /// Load data from the server using a HTTP GET request.
  1627. /// </summary>
  1628. /// <param name="url" type="String">
  1629. /// A string containing the URL to which the request is sent.
  1630. /// </param>
  1631. /// <param name="data" type="String">
  1632. /// A map or string that is sent to the server with the request.
  1633. /// </param>
  1634. /// <param name="callback" type="Function">
  1635. /// A callback function that is executed if the request succeeds.
  1636. /// </param>
  1637. /// <param name="type" type="String">
  1638. /// The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
  1639. /// </param>
  1640. // shift arguments if data argument was omitted
  1641. if ( jQuery.isFunction( data ) ) {
  1642. type = type || callback;
  1643. callback = data;
  1644. data = undefined;
  1645. }
  1646. return jQuery.ajax({
  1647. type: method,
  1648. url: url,
  1649. data: data,
  1650. success: callback,
  1651. dataType: type
  1652. });
  1653. };
  1654. jQuery.getJSON = function( url, data, callback ) {
  1655. /// <summary>
  1656. /// Load JSON-encoded data from the server using a GET HTTP request.
  1657. /// </summary>
  1658. /// <param name="url" type="String">
  1659. /// A string containing the URL to which the request is sent.
  1660. /// </param>
  1661. /// <param name="data" type="Object">
  1662. /// A map or string that is sent to the server with the request.
  1663. /// </param>
  1664. /// <param name="callback" type="Function">
  1665. /// A callback function that is executed if the request succeeds.
  1666. /// </param>
  1667. return jQuery.get( url, data, callback, "json" );
  1668. };
  1669. jQuery.getScript = function( url, callback ) {
  1670. /// <summary>
  1671. /// Load a JavaScript file from the server using a GET HTTP request, then execute it.
  1672. /// </summary>
  1673. /// <param name="url" type="String">
  1674. /// A string containing the URL to which the request is sent.
  1675. /// </param>
  1676. /// <param name="callback" type="Function">
  1677. /// A callback function that is executed if the request succeeds.
  1678. /// </param>
  1679. return jQuery.get( url, undefined, callback, "script" );
  1680. };
  1681. jQuery.globalEval = function( data ) {
  1682. /// <summary>
  1683. /// Execute some JavaScript code globally.
  1684. /// </summary>
  1685. /// <param name="data" type="String">
  1686. /// The JavaScript code to execute.
  1687. /// </param>
  1688. if ( data && rnotwhite.test( data ) ) {
  1689. // We use execScript on Internet Explorer
  1690. // We use an anonymous function so that context is window
  1691. // rather than jQuery in Firefox
  1692. ( window.execScript || function( data ) {
  1693. window[ "eval" ].call( window, data );
  1694. } )( data );
  1695. }
  1696. };
  1697. jQuery.grep = function( elems, callback, inv ) {
  1698. /// <summary>
  1699. /// Finds the elements of an array which satisfy a filter function. The original array is not affected.
  1700. /// </summary>
  1701. /// <param name="elems" type="Array">
  1702. /// The array to search through.
  1703. /// </param>
  1704. /// <param name="callback" type="Function">
  1705. /// 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.
  1706. /// </param>
  1707. /// <param name="inv" type="Boolean">
  1708. /// 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.
  1709. /// </param>
  1710. /// <returns type="Array" />
  1711. var ret = [], retVal;
  1712. inv = !!inv;
  1713. // Go through the array, only saving the items
  1714. // that pass the validator function
  1715. for ( var i = 0, length = elems.length; i < length; i++ ) {
  1716. retVal = !!callback( elems[ i ], i );
  1717. if ( inv !== retVal ) {
  1718. ret.push( elems[ i ] );
  1719. }
  1720. }
  1721. return ret;
  1722. };
  1723. jQuery.guid = 1;
  1724. jQuery.hasData = function( elem ) {
  1725. /// <summary>
  1726. /// Determine whether an element has any jQuery data associated with it.
  1727. /// </summary>
  1728. /// <param name="elem" domElement="true">
  1729. /// A DOM element to be checked for data.
  1730. /// </param>
  1731. /// <returns type="Boolean" />
  1732. elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
  1733. return !!elem && !isEmptyDataObject( elem );
  1734. };
  1735. jQuery.holdReady = function( hold ) {
  1736. /// <summary>
  1737. /// Holds or releases the execution of jQuery's ready event.
  1738. /// </summary>
  1739. /// <param name="hold" type="Boolean">
  1740. /// Indicates whether the ready hold is being requested or released
  1741. /// </param>
  1742. /// <returns type="undefined" />
  1743. if ( hold ) {
  1744. jQuery.readyWait++;
  1745. } else {
  1746. jQuery.ready( true );
  1747. }
  1748. };
  1749. jQuery.inArray = function( elem, array, i ) {
  1750. /// <summary>
  1751. /// Search for a specified value within an array and return its index (or -1 if not found).
  1752. /// </summary>
  1753. /// <param name="elem" type="Object">
  1754. /// The value to search for.
  1755. /// </param>
  1756. /// <param name="array" type="Array">
  1757. /// An array through which to search.
  1758. /// </param>
  1759. /// <returns type="Number" />
  1760. var len;
  1761. if ( array ) {
  1762. if ( indexOf ) {
  1763. return indexOf.call( array, elem, i );
  1764. }
  1765. len = array.length;
  1766. i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
  1767. for ( ; i < len; i++ ) {
  1768. // Skip accessing in sparse arrays
  1769. if ( i in array && array[ i ] === elem ) {
  1770. return i;
  1771. }
  1772. }
  1773. }
  1774. return -1;
  1775. };
  1776. jQuery.isArray = Array.isArray || function (obj) {
  1777. /// <summary>
  1778. /// Determine whether the argument is an array.
  1779. /// </summary>
  1780. /// <param name="obj" type="Object">
  1781. /// Object to test whether or not it is an array.
  1782. /// </param>
  1783. /// <returns type="boolean" />
  1784. return jQuery.type(obj) === "array";
  1785. };
  1786. jQuery.isEmptyObject = function( obj ) {
  1787. /// <summary>
  1788. /// Check to see if an object is empty (contains no properties).
  1789. /// </summary>
  1790. /// <param name="obj" type="Object">
  1791. /// The object that will be checked to see if it's empty.
  1792. /// </param>
  1793. /// <returns type="Boolean" />
  1794. for ( var name in obj ) {
  1795. return false;
  1796. }
  1797. return true;
  1798. };
  1799. jQuery.isFunction = function( obj ) {
  1800. /// <summary>
  1801. /// Determine if the argument passed is a Javascript function object.
  1802. /// </summary>
  1803. /// <param name="obj" type="Object">
  1804. /// Object to test whether or not it is a function.
  1805. /// </param>
  1806. /// <returns type="boolean" />
  1807. return jQuery.type(obj) === "function";
  1808. };
  1809. jQuery.isNumeric = function( obj ) {
  1810. /// <summary>
  1811. /// Determines whether its argument is a number.
  1812. /// </summary>
  1813. /// <param name="obj" type="Object">
  1814. /// The value to be tested.
  1815. /// </param>
  1816. /// <returns type="Boolean" />
  1817. return obj != null && rdigit.test( obj ) && !isNaN( obj );
  1818. };
  1819. jQuery.isPlainObject = function( obj ) {
  1820. /// <summary>
  1821. /// Check to see if an object is a plain object (created using "{}" or "new Object").
  1822. /// </summary>
  1823. /// <param name="obj" type="Object">
  1824. /// The object that will be checked to see if it's a plain object.
  1825. /// </param>
  1826. /// <returns type="Boolean" />
  1827. // Must be an Object.
  1828. // Because of IE, we also have to check the presence of the constructor property.
  1829. // Make sure that DOM nodes and window objects don't pass through, as well
  1830. if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
  1831. return false;
  1832. }
  1833. try {
  1834. // Not own constructor property must be Object
  1835. if ( obj.constructor &&
  1836. !hasOwn.call(obj, "constructor") &&
  1837. !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
  1838. return false;
  1839. }
  1840. } catch ( e ) {
  1841. // IE8,9 Will throw exceptions on certain host objects #9897
  1842. return false;
  1843. }
  1844. // Own properties are enumerated firstly, so to speed up,
  1845. // if last one is own, then all properties are own.
  1846. var key;
  1847. for ( key in obj ) {}
  1848. return key === undefined || hasOwn.call( obj, key );
  1849. };
  1850. jQuery.isReady = true;
  1851. jQuery.isWindow = function( obj ) {
  1852. /// <summary>
  1853. /// Determine whether the argument is a window.
  1854. /// </summary>
  1855. /// <param name="obj" type="Object">
  1856. /// Object to test whether or not it is a window.
  1857. /// </param>
  1858. /// <returns type="boolean" />
  1859. return obj && typeof obj === "object" && "setInterval" in obj;
  1860. };
  1861. jQuery.isXMLDoc = function( elem ) {
  1862. /// <summary>
  1863. /// Check to see if a DOM node is within an XML document (or is an XML document).
  1864. /// </summary>
  1865. /// <param name="elem" domElement="true">
  1866. /// The DOM node that will be checked to see if it's in an XML document.
  1867. /// </param>
  1868. /// <returns type="Boolean" />
  1869. // documentElement is verified for cases where it doesn't yet exist
  1870. // (such as loading iframes in IE - #4833)
  1871. var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
  1872. return documentElement ? documentElement.nodeName !== "HTML" : false;
  1873. };
  1874. jQuery.lastModified = {};
  1875. jQuery.makeArray = function( array, results ) {
  1876. /// <summary>
  1877. /// Convert an array-like object into a true JavaScript array.
  1878. /// </summary>
  1879. /// <param name="array" type="Object">
  1880. /// Any object to turn into a native Array.
  1881. /// </param>
  1882. /// <returns type="Array" />
  1883. var ret = results || [];
  1884. if ( array != null ) {
  1885. // The window, strings (and functions) also have 'length'
  1886. // The extra typeof function check is to prevent crashes
  1887. // in Safari 2 (See: #3039)
  1888. // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
  1889. var type = jQuery.type( array );
  1890. if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
  1891. push.call( ret, array );
  1892. } else {
  1893. jQuery.merge( ret, array );
  1894. }
  1895. }
  1896. return ret;
  1897. };
  1898. jQuery.map = function( elems, callback, arg ) {
  1899. /// <summary>
  1900. /// Translate all items in an array or object to new array of items.
  1901. /// &#10;1 - jQuery.map(array, callback(elementOfArray, indexInArray))
  1902. /// &#10;2 - jQuery.map(arrayOrObject, callback( value, indexOrKey ))
  1903. /// </summary>
  1904. /// <param name="elems" type="Array">
  1905. /// The Array to translate.
  1906. /// </param>
  1907. /// <param name="callback" type="Function">
  1908. /// The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
  1909. /// </param>
  1910. /// <returns type="Array" />
  1911. var value, key, ret = [],
  1912. i = 0,
  1913. length = elems.length,
  1914. // jquery objects are treated as arrays
  1915. isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
  1916. // Go through the array, translating each of the items to their
  1917. if ( isArray ) {
  1918. for ( ; i < length; i++ ) {
  1919. value = callback( elems[ i ], i, arg );
  1920. if ( value != null ) {
  1921. ret[ ret.length ] = value;
  1922. }
  1923. }
  1924. // Go through every key on the object,
  1925. } else {
  1926. for ( key in elems ) {
  1927. value = callback( elems[ key ], key, arg );
  1928. if ( value != null ) {
  1929. ret[ ret.length ] = value;
  1930. }
  1931. }
  1932. }
  1933. // Flatten any nested arrays
  1934. return ret.concat.apply( [], ret );
  1935. };
  1936. jQuery.merge = function( first, second ) {
  1937. /// <summary>
  1938. /// Merge the contents of two arrays together into the first array.
  1939. /// </summary>
  1940. /// <param name="first" type="Array">
  1941. /// The first array to merge, the elements of second added.
  1942. /// </param>
  1943. /// <param name="second" type="Array">
  1944. /// The second array to merge into the first, unaltered.
  1945. /// </param>
  1946. /// <returns type="Array" />
  1947. var i = first.length,
  1948. j = 0;
  1949. if ( typeof second.length === "number" ) {
  1950. for ( var l = second.length; j < l; j++ ) {
  1951. first[ i++ ] = second[ j ];
  1952. }
  1953. } else {
  1954. while ( second[j] !== undefined ) {
  1955. first[ i++ ] = second[ j++ ];
  1956. }
  1957. }
  1958. first.length = i;
  1959. return first;
  1960. };
  1961. jQuery.noConflict = function( deep ) {
  1962. /// <summary>
  1963. /// Relinquish jQuery's control of the $ variable.
  1964. /// </summary>
  1965. /// <param name="deep" type="Boolean">
  1966. /// A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
  1967. /// </param>
  1968. /// <returns type="Object" />
  1969. if ( window.$ === jQuery ) {
  1970. window.$ = _$;
  1971. }
  1972. if ( deep && window.jQuery === jQuery ) {
  1973. window.jQuery = _jQuery;
  1974. }
  1975. return jQuery;
  1976. };
  1977. jQuery.noData = { "embed": true,
  1978. "object": 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
  1979. "applet": true };
  1980. jQuery.nodeName = function( elem, name ) {
  1981. return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
  1982. };
  1983. jQuery.noop = function() {
  1984. /// <summary>
  1985. /// An empty function.
  1986. /// </summary>
  1987. /// <returns type="Function" />
  1988. };
  1989. jQuery.now = function() {
  1990. /// <summary