/*
<script type="text/javascript"><!--//--><![CDATA[//><!—
// Your code here
//--><!]]></script>
*/

/*
Extensões da classe String
*/
String.prototype.cc_trim = function() {
	return this.replace(/^\s+|\s+$/, ''); 
};

String.prototype.cc_camelize = function() {
	var oStringList = this.split('-');
    if (oStringList.length == 1) return oStringList[0];

    var camelizedString = this.indexOf('-') == 0
      ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
      : oStringList[0];

    for (var i = 1, len = oStringList.length; i < len; i++) {
      var s = oStringList[i];
      camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
    }

    return camelizedString;
};

String.prototype.cc_remove_acentos = function(){
	var valor = this.length;
	var valorLength = valor.length;
	var caracteres_inv = "ÁÉÍÓÚÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÃÕÇáéíóúàèìòùâêîôûäëïöüãõç";
	var caracteres_val = "AEIOUAEIOUAEIOUAEIOUAOCaeiouaeiouaeiouaeiouaoc";
	var retorno  = "";
	for(i=0; i<caracteres_inv.length; i++){
	   for(j=0; j<valorLength; j++){
		  retorno = valor.replace(caracteres_inv.substr(i,1),caracteres_val.substr(i,1));
		  valor = retorno;
		}
	}
	return valor;
}

/*
function $() {
	var elements = new Array();
	
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string'){
			element = document.getElementById(element);
		}
		if (arguments.length == 1){
			return element;
		}
		elements.push(element);
	}
	return elements;
}
*/