$(document).ready(function(){
	
});



/* FUNCTIONS */

/* Value to Integer */
function intval(v){
	v = parseInt(v);
	return isNaN(v) ? 0 : v;
}


/* Trim functions - obj.trim() */
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}


/* Proper Case */
function pCase(s){
	return s.replace(/(\w)(\w*)/g,function(strMatch, strFirst, strRest, intMatchPos, strSource) { 
		return strFirst.toUpperCase() 
		+strRest.toLowerCase(); 
	}); 
}