Attach ajaxError to document.

http://api.jquery.com/ajaxerror/

As of jQuery 1.8, the .ajaxError() method should only be attached to document.