(function(){var A=false,B=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(G){var F=this.prototype;A=true;var E=new this();A=false;for(var D in G){E[D]=typeof G[D]=="function"&&typeof F[D]=="function"&&B.test(G[D])?(function(H,I){return function(){var K=this._super;this._super=F[H];var J=I.apply(this,arguments);this._super=K;return J}})(D,G[D]):G[D]}function C(){if(!A&&this.init){this.init.apply(this,arguments)}}C.prototype=E;C.constructor=C;C.extend=arguments.callee;return C}})();String.prototype.toFloat=function(A){var B=parseFloat(this.replace(/[\s\,]/g,""));if(isNaN(B)&&A!=undefined){return A}else{return B}};String.prototype.toInt=function(A){var C=this.replace(/[\s\,]/g,"");var B=(C.length>0&&C.charAt(0)=="#")?parseInt(C.substring(1),16):parseInt(C);if(isNaN(B)&&A!=undefined){return A}else{return B}};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.capitalize=function(){return this.replace(/\w+/g,function(A){return A.charAt(0).toUpperCase()+A.substr(1).toLowerCase()})};String.prototype.startsWith=function(A){return this.indexOf(A)==0};String.prototype.endsWith=function(A){return this.indexOf(A)==this.length-A.length};String.prototype.stripNonNumeric=function(){var B=/^\d|\.|-$/;var A="";for(var C=0;C<this.length;C++){if(B.test(this.charAt(C))){if(!((this.charAt(C)=="."&&A.indexOf(".")!=-1)||(this.charAt(C)=="-"&&A.length!=0))){A+=this.charAt(C)}}}return A};Number.prototype.format=function(J){var B=-1<J.indexOf(","),A=J.stripNonNumeric().split("."),H=this;if(1<A.length){H=H.toFixed(A[1].length)}else{if(2<A.length){throw ("NumberFormatException: invalid format, formats should have no more than 1 period: "+J)}else{H=H.toFixed(0)}}var K=H.toString();if(B){A=K.split(".");var I=A[0],E=[],F=I.length,D=Math.floor(F/3),C=I.length%3||3;for(var G=0;G<F;G+=C){if(G!=0){C=3}E[E.length]=I.substr(G,C);D-=1}K=E.join(",");if(A[1]){K+="."+A[1]}}return J.replace(/[\d,?\.?]+/,K)};Number.prototype.toInt=function(){return parseInt(Math.round(this))};Date.prototype.friendlyFormat=function(){var C=this.getTime();var A=new Date().getTime();var B=(A-C)/1000;return B<60&&"a moment ago"||B<120&&"a minute ago"||B<3600&&Math.floor(B/60)+" minutes ago"||B<7200&&"an hour ago"||B<86400&&Math.floor(B/3600)+" hours ago"||B<172800&&"a day ago"||B<604800&&Math.floor(B/86400)+" days ago"||B<1209600&&"a week ago"||Math.floor(B/604800)+" weeks ago"};Date.prototype.format=function(E){var D="";var C=Date.replaceChars;for(var B=0;B<E.length;B++){var A=E.charAt(B);if(C[A]){D+=C[A].call(this)}else{D+=A}}return D};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return(this.getDate()%10==1&&this.getDate()!=11?"st":(this.getDate()%10==2&&this.getDate()!=12?"nd":(this.getDate()%10==3&&this.getDate()!=13?"rd":"th")))},w:function(){return this.getDay()},z:function(){return"Not Yet Supported"},W:function(){return"Not Yet Supported"},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<11?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){return"Not Yet Supported"},L:function(){return"Not Yet Supported"},o:function(){return"Not Supported"},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return"Not Yet Supported"},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},e:function(){return"Not Yet Supported"},I:function(){return"Not Supported"},O:function(){return(this.getTimezoneOffset()<0?"-":"+")+(this.getTimezoneOffset()/60<10?"0":"")+(this.getTimezoneOffset()/60)+"00"},T:function(){return"Not Yet Supported"},Z:function(){return this.getTimezoneOffset()*60},c:function(){return"Not Yet Supported"},r:function(){return this.toString()},U:function(){return this.getTime()/1000}};function ifKeyCode(B,A){return function(C){if(C.keyCode==B){A.call(this,C)}}}jQuery.fn.enterdown=function(A){return this.keydown(function(B){if(B.keyCode==13){A.call(this,B)}})};jQuery.fn.superHide=jQuery.fn.hide;jQuery.fn.hide=function(){return this.each(function(){var A=$(this);if(A.css("display")!="none"){A.superHide()}})};jQuery.fn.isChecked=function(){var A=this.attr("checked");return A===true||A==="checked"};jQuery.fn.setChecked=function(A){if(A){return this.attr("checked","checked")}else{return this.removeAttr("checked")}};jQuery.purrr=function(A,D,C){var B='<div class="notice"><div class="notice-body"><img src="'+D+'" /><p>'+A+'</p></div><div class="notice-bottom"></div>';jQuery(B).purr({removeTimer:C||8000,usingTransparentPNG:true})};