(function($) {
	$.fn.prepare = function(options) {
		options = $.extend({
			path: "/img/catalog/",
			attr: {name: "class", value: "gallery"}
		},options);
		return $("a[href^='javascript:ViewImg'], a[href^='JavaScript:ViewImg']", this).each(function() { 
			this.href = options.path + this.href.split("'")[1]; // javascript:ViewImg(400,300,'1.jpg');
			this.title === "" && $(this).attr("title", " ");
			$(this).attr(options.attr.name, options.attr.value);
		});
	}; 
})(jQuery); 
