$(document).ready(function()
{
	Shadowbox.init();
});

function limitChars(texto, limite, info)
{
	var text = $('#'+texto).val();
	var textlength = text.length;

	if (textlength > limite) {
		$('#' + info).html('Você ultrapassou o limite de '+limite+' caracteres');
		$('#' + texto).val(text.subtr(0, limite));

		return false;
	}
	else {
		$('#' + info).html('Você ainda pode escrever mais '+ (limite - textlength) +' caracteres');
		return true;
	}
}

