Show images in page if PNG
http://stackoverflow.com/questions/6736885/use-jquery-to-check-for-link-extension
by Michel Plungjan
HTML
<a href="http://userlogos.org/files/logos/pek/stackoverflow.png">Image 01 shows in page</a><br />
<a href="http://29.media.tumblr.com/tumblr_ljkk51MscO1qeyuguo1_500.gif">Image 02 loads in frame</a><br/>
<a href="http://www.google.com/">Page loads in frame</a><hr/>
<div class="test"></div>
JavaScript
$('a[href$=".png"]').click(function(e) {
$('.test').append($("<img>", {src: this.href}));
e.preventDefault();
});