Replace .load & .error with .on
Replace .succes & .error with .done & .fail
remove unused local vars
simplify logical statement
Merge pull request #3814 from TuckerWhitehouse/error_deprecated

Replace deprecated functions ($.fn.load, $.fn.error, jqXHR.success & jqXHR.error)
Merge pull request #4007 from shikolay/master

Micro cleanups