$(document).ready(function() {
 	$.fn.replace = function(o) {return this.after(o).remove();}; 

 	$('img').each(function() {
  		if ($(this).attr('alt') !== '') {
			$(this).replace('<p class="replaced_image">[Image - '+$(this).attr('alt')+']</p>');
		}
		else {
			$(this).css('display', 'none');
		}
  	})
});
