(function($) {
	$.fn.ir = function(options) {
		var defaults = {
			folder: '/images',
			ext: 'jpg'
		};
		var opt = $.extend(defaults, options);
		return this.each(function() {
			var string = $(this).text();
			var filename = string.toLowerCase().replace(/ /g, '-').replace(/([^0-9a-z-])/g, '');
			$(this).html('<img src="' + opt.folder + '/' + filename + '.' + opt.ext + '" alt="' + string + '" />');
		});
	};
})(jQuery);
