(function(a){a.fn.autogrow=function(c){var g={expandTolerance:1};c=a.extend(g,c);var d=!(a.browser.msie||a.browser.opera);function b(l){var j=a(l.target||l),i=j.val().length,k=j.innerWidth();if(i!=j.data("autogrow-length")||k!=j.data("autogrow-width")){if(d&&(ih?"auto":"hidden"));j.css("height",h+"px")}return j}function f(h){var i=parseInt(h,10);return isNaN(i)?null:i}function e(h){h.data("autogrow-min",c.minHeight||f(h.css("min-height"))||0);h.data("autogrow-max",c.maxHeight||f(h.css("max-height"))||99999);h.data("autogrow-line-height",c.lineHeight||f(h.css("line-height")));b(h)}this.each(function(){var h=a(this);if(!h.data("autogrow-initialized")){h.css("padding-top",0).css("padding-bottom",0);h.bind("keyup",b).bind("focus",b);h.data("autogrow-initialized",true)}e(h);setTimeout(function(){e(h)},100)});return this}})(jQuery);