var arrMeses = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'];

$.datepicker.regional['pt-BR_plus'] = {
	closeText: 'Fechar',
	prevText: '<<',
	nextText: '>>',
	currentText: 'Hoje',
	monthNames: ['Janeiro', 'Fevereiro', 'Mar&ccedil;o', 'Abril', 'Maio', 'Junho',
	'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
	monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
	'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
	dayNames: ['Domingo', 'Segunda-feira', 'Ter&ccedil;a-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sabado'],
	dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
	dayNamesMin: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'],
	dateFormat: 'dd/mm/yy', firstDay: 0,
	isRTL: false
};

$.stopEvent = function(e) {
    e.stopPropagation();
    e.preventDefault();
};

jQuery.extend(jQuery.fn, {
  htmlLoader: function(css) {
    return $(this).html('<div class="loader" style="'+css+'"></div>');
  }
});

jQuery.extend(jQuery.fn, {
  appendLoader: function(css) {
    return $(this).append('<div class="loader" style="'+css+'"></div>');
  }
});

jQuery.extend(jQuery.fn, {
  htmlLoaderElement: function(type, css) {
    return $(this).html('<'+type+' class="loader" style="'+css+'"></'+type+'>');
  }
});

jQuery.extend(jQuery.fn, {
  appendLoaderElement: function(type, css) {
    return $(this).append('<'+type+' class="loader" style="'+css+'"></'+type+'>');
  }
});

var const_WhiteChars = ' \t\n\r';

String.prototype.isValidEmail = function(){
  pattern = new RegExp("^([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[@]([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[.]([a-z,A-Z]){2,3}([0-9,a-z,A-Z])?$");
  return !(this.search(pattern) == -1);
}

String.prototype.isEmpty = function(){
	var iCount, sChar;
	if(this==null || this.length<=0)
		return true;
	for(iCount=0; iCount<this.length; iCount++){
		sChar = this.charAt(iCount);
		if(const_WhiteChars.indexOf(sChar)==-1) return false;
	}
	return true;
}
// Trim() //
String.prototype.Trim = function(){
	var iCount, iPos, sChar, sValor1=this;
	if(sValor1==null || sValor1.length<=0)
		return;

	for(iCount=0; iCount<const_WhiteChars.length; iCount++){
		sChar = const_WhiteChars.substr(iCount,1);
		while(sValor1.indexOf(sChar)>=0){
			sValor1 = sValor1.replace(sChar,'');
		}
	}
	return sValor1;
}

// Left(iQtde) //
String.prototype.Left = function(iQtde){
	return this.slice(0, iQtde);
}
// Right(iQtde) //
String.prototype.Right = function(iQtde){
	return this.slice(iQtde, this.length);
}


