+
+/**
+ * Attach a function to be executed whenever an AJAX request begins.
+ *
+ * @example $("#loading").ajaxStart(function(){
+ * $(this).show();
+ * });
+ * @desc Show a loading message whenever an AJAX request starts.
+ *
+ * @name ajaxStart
+ * @type jQuery
+ * @param Function callback The function to execute.
+ * @cat AJAX
+ */
+
+/**
+ * Attach a function to be executed whenever all AJAX requests have ended.
+ *
+ * @example $("#loading").ajaxStop(function(){
+ * $(this).hide();
+ * });
+ * @desc Hide a loading message after all the AJAX requests have stopped.
+ *
+ * @name ajaxStop
+ * @type jQuery
+ * @param Function callback The function to execute.
+ * @cat AJAX
+ */
+
+/**
+ * Attach a function to be executed whenever an AJAX request completes.
+ *
+ * @example $("#msg").ajaxComplete(function(){
+ * $(this).append("<li>Request Complete.</li>");
+ * });
+ * @desc Show a message when an AJAX request completes.
+ *
+ * @name ajaxComplete
+ * @type jQuery
+ * @param Function callback The function to execute.
+ * @cat AJAX
+ */
+
+/**
+ * Attach a function to be executed whenever an AJAX request completes
+ * successfully.
+ *
+ * @example $("#msg").ajaxSuccess(function(){
+ * $(this).append("<li>Successful Request!</li>");
+ * });
+ * @desc Show a message when an AJAX request completes successfully.
+ *
+ * @name ajaxSuccess
+ * @type jQuery
+ * @param Function callback The function to execute.
+ * @cat AJAX
+ */
+
+/**
+ * Attach a function to be executed whenever an AJAX request fails.
+ *
+ * @example $("#msg").ajaxError(function(){
+ * $(this).append("<li>Error requesting page.</li>");
+ * });
+ * @desc Show a message when an AJAX request fails.
+ *
+ * @name ajaxError
+ * @type jQuery
+ * @param Function callback The function to execute.
+ * @cat AJAX
+ */
+
+/**
+ * @test stop(); var counter = { complete: 0, success: 0, error: 0 };
+ * var success = function() { counter.success++ };
+ * var error = function() { counter.error++ };
+ * var complete = function() { counter.complete++ };
+ * $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success);
+ * // start with successful test
+ * $.ajax({url: "data/name.php", success: success, error: error, complete: function() {
+ * ok( counter.error == 0, 'Check succesful request' );
+ * ok( counter.success == 2, 'Check succesful request' );
+ * ok( counter.complete == 3, 'Check succesful request' );
+ * counter.error = 0; counter.success = 0; counter.complete = 0;
+ * $.ajaxTimeout(500);
+ * $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() {
+ * ok( counter.error == 2, 'Check failed request' );
+ * ok( counter.success == 0, 'Check failed request' );
+ * ok( counter.complete == 3, 'Check failed request' );
+ * start();
+ * }});
+ * }});
+
+ * @test stop(); var counter = { complete: 0, success: 0, error: 0 };
+ * counter.error = 0; counter.success = 0; counter.complete = 0;
+ * var success = function() { counter.success++ };
+ * var error = function() { counter.error++ };
+ * $.ajaxTimeout(0);
+ * $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() {
+ * ok( counter.error == 0, 'Check sucesful request without globals' );
+ * ok( counter.success == 1, 'Check sucesful request without globals' );
+ * ok( counter.complete == 0, 'Check sucesful request without globals' );
+ * counter.error = 0; counter.success = 0; counter.complete = 0;
+ * $.ajaxTimeout(500);
+ * $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() {
+ * ok( counter.error == 1, 'Check failed request without globals' );
+ * ok( counter.success == 0, 'Check failed request without globals' );
+ * ok( counter.complete == 0, 'Check failed request without globals' );
+ * start();
+ * }});
+ * }});
+ *
+ * @name ajaxHandlersTesting
+ * @private
+ */
+
+