(function($){$.fn.extend({elastic:function(){var _2=new Array("paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width");
										
										return this.each(function(){if(this.type=="textarea"){var _3=$(this);

										var _4=parseInt(_3.css("height"));
										var _5=parseInt(_3.css("lineHeight"))*2||parseInt(_3.css("fontSize"))*2;
										var _6=0;
										var _7=null;
										function update(){
											if(!_7){_7=$("<div />").css({"visibility":"hidden","position":"absolute","overflow-x":"hidden"}).appendTo("body");
											$.each(_2,function(){_7.css(this,_3.css(this));
										});
										}
var _8=_3.val().replace(/<|>/g," ").replace(/\n/g,"<br />");
										if(_7.text()!=_8){_7.html(_8);
										_6=(_7.height()+_5>_4)?_7.height()+_5:_4;
										if(_6!=_3.height()){_3.animate({"height":_6},200);
										}}}
_3.css({overflow:"hidden",display:"block"}).bind("focus",function(){self.periodicalUpdater=window.setInterval(function(){update();
										},600);
										}).bind("blur",function(){clearInterval(self.periodicalUpdater);
										});
										update();
										}});
										}});
										})(jQuery);
										

$(document).ready(function() {
	$('textarea').elastic();
										
});
										