How does jquery return functions like success and error
<p>I've looked though the jquery code, and it's not clear to me.  How do I make my own function return success or error like in the following code:</p>

<pre><code>   $.ajax({
      type: "GET",
      url: "/some.xml",
      success: function()
      { /** found! **/},
      error: function(xhr, status, error) {
        if(xhr.status==404)
          { /** not found! **/}
      }
    });
</code></pre>
