(function(){
	$.fn.rubberize = function(options){
	defaults = {minRows: 1};
	config = $.extend(defaults, options);

	return this.each(function() {
		obj = $(this);
		obj.val('');
		obj.attr('rows', config['minRows']);
		obj.keypress(function(e){change_size($(this));	}).blur(function(){change_size($(this));});
	});
	function change_size(obj){
		fsize = parseInt(obj.css('font-size'))/2.5;
		chars = Math.round(obj.width() / Math.ceil(fsize));							
		cur_val = obj.val().length + ((obj.val().match(/$/gm).length * chars));
		obj.attr('rows', Math.ceil(cur_val/chars));
	}
}
})(jQuery)