Number.implement({zeroise:function(a){return String(this).zeroise(a)}});Array.implement({count:function(){return this.length}});String.implement({strip_tags:function(){return(this.stripScripts()).replace(/<\/?[^>]+>/gmi,"")},reverse:function(){return((this.split("")).reverse()).join("")},lcfirst:function(){return this.replace(/\b([A-Z])/,function(a){return a.toLowerCase()})},ucfirst:function(){return this.replace(/\b([a-z])/,function(a){return a.toUpperCase()})},ltrim:function(){return this.replace(/^\s*/,"")},rtrim:function(){return this.replace(/\s*$/,"")},nl2br:function(){return(this.replace(/\r/g,"")).replace(/\n/g,"<br />")},number_format:function(a,b,c){var d=String((this.toFloat()).toFixed(a||2));d=(d.reverse()).replace(/((?:\d(?!\d+?\.)(?=\d)){3})/g,"$1"+(c||","));return(d.replace(/\./,(b||"."))).reverse()},repeat:function(c){var a=[];for(var b=0;b<c;b++){a.push(this)}return a.join("")},zeroise:function(a){return"0".repeat(a-this.length)+this}});(function(){var b;var a=function(f){var d=$(f.target);var c=d.getParents();b.each(function(g){var e=g.element;if(e!=d&&!c.contains(e)){g.fn.call(e,f)}})};Element.Events.outerClick={onAdd:function(c){if(!b){document.addEvent("click",a);b=[]}b.push({element:this,fn:c})},onRemove:function(c){b=b.filter(function(d){return d.element!=this||d.fn!=c},this);if(!b.length){document.removeEvent("click",a);b=null}}}})();Element.Events.pressEnter={base:"keydown",condition:function(a){return(a.key=="enter")}};