jQuery 1.6.2, HTML, CSS, JavaScript
No-Library (pure JS), HTML, CSS, JavaScript
Using .error Alternatively use .bind('error abort', as suggested by ShankarSangoli
http://stackoverflow.com/questions/6736885/use-jquery-to-check-for-link-extension