// BASE; Minified Code @ 27/0/2012
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
String.prototype.count=function(needle){if(needle=="\\")return(this.length-this.replace(/\\/g,"").length);return((this.length-this.replace(new RegExp(needle,"g"),"").length)/needle.length);}
String.prototype.contains=function(needle){return(this.indexOf(needle)!=-1);}
String.prototype.after=function(needle,originalIfNone){var i=this.lastIndexOf(needle);return(i==-1?(originalIfNone===false?"":this):this.substr(i+needle.length));}
String.prototype.ucFirst=function(lowercase){return this.charAt(0).toUpperCase()+(lowercase===true?this.substr(1).toLowerCase():this.substr(1));}
String.prototype.first=function(){return this.replace(/\ (.)*/,'')}
String.prototype.last=function(){return this.replace(/(.)*\ /,'');}
String.prototype.getExt=function(){var i=this.lastIndexOf('.');return(i==-1?false:this.substr(i+1));}
String.prototype.removeExt=function(){var i=this.lastIndexOf('.');return(i==-1?this:this.substr(0,i));}
function isValidEmail(email){var filter=/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;return filter.test(email);}
function compareNumbers(a,b){return a-b;}
function timetest(fn,loops,alertTime){if(loops===undefined)loops=10000;var timeStart=(new Date()).getTime();for(var i=0;i<loops;i++){fn();}
var timeEnd=(new Date()).getTime();var time=timeEnd-timeStart;if(alertTime===true)alert(time);return time;}
function viewport(){var dimensions={width:false,height:false};if(document.documentElement){dimensions.width=document.documentElement.offsetWidth;dimensions.height=document.documentElement.offsetHeight;}else if(window.innerWidth&&window.innerHeight){dimensions.width=window.innerWidth;dimensions.height=window.innerHeight;}
return dimensions;}
// (c) IDESIGN MEDIA
