jQuery.fn.texrep = function(options){
	
	  // hardcoded options
	  var baseurl = '';       
	  var cachefolder = 'cache';
	  var mimetype = 'image/png';
	  var extension = '.png';
	
	// passable options
	var settings = jQuery.extend({
		"font": "",			// fontfile
		"backcolor": "ffffff",		// background color
		"textcolor": "000000",		// text color
		"textsize" : "12",		// text size
		"transparent" : "1"		// transparency
		}, options || {});
	
	// replace text with images
	return this.each(function(){
		var text = jQuery(this).html();
		var self = jQuery(this);
		jQuery.get('texrep.php', 
			{cache: settings.cache, mime: mimetype, ext: extension,
 transparent: settings.transparent, text: text, font: settings.font,
 textsize: settings.textsize, textcolor: settings.textcolor,
 backcolor: settings.backcolor},
			function(image){                
				self.html('<img src="'+baseurl+image+'" alt="'+text+'">');
			 });
	});
}
