There have been a couple instances recently where I wanted to fire some custom handlers when particular events in ajax.js were invoked. It's possible I'm a bit off track with this and there may be an alternate solution, as admittedly jQuery is not my strongest language.
To give an example, suppose you wanted to manipulate a page element when Drupal.ajax.prototype.beforeSend is called. Up to this point, I would handle this by adding something along these lines in a custom .js file:
(function ($) {
// Drupal's core beforeSend function
var beforeSend = Drupal.ajax.prototype.beforeSend;