/*
* GappEdit's autogrow
* 
* usage: $('#idoftextarea').autogrow();
*dependant on counLines() function
*/
(function($) {
	$.fn.autogrow = function(options) {
		var opts = $.extend({}, $.fn.autogrow.defaults, options);
		return this.each(function() {
			this.rows = countLines(this.value,this.cols);
			$(this).css({ overflow: "hidden" }).bind("keypress", function() {
				$this = $(this);
				this.rows = countLines(this.value,this.cols);
			});

		});
	}
	$.fn.autogrow.defaults = { rows: 0 };
})(jQuery);	