/**

	config.js
	Descrição: Arquivo com configurações dos templates
	© 2006 - Direct Talk Comércio e Tecnologia Ltda
	*/
	
	var DTvalidateConfig = {
	"elements" :
		[
			{
				"id" : "nome_usuario",
				"feedback" : "O campo nome está vazio.",
				"validationType" : "texto",
				"failureFeedback" : "Não é correto colocar números ou caracteres especiais no nome de usuário"
			},
			{
				"id" : "email",
				"feedback" : "O campo E-mail está vazio.",
				"validationType" : "email",
				"failureFeedback" : "Email inválido"
			},
			{
				"id" : "telefone_servico",
				"feedback" : "O campo Telefone para Aquisição de Serviço está vazio",
				"validationType" : "function",
				"failureFeedback" : "Telefone inválido"
			},
			{
				"id" : "telefone_contato",
				"feedback" : "O campo Telefone de Contato está vazio",
				"validationType" : "function",
				"failureFeedback" : "Telefone inválido"
			}			
			],
	"options" :
		{
		"err_frase":"Ocorreram #total_err# erros na validação:",
		"classDefault" : "text",
		"classError" : "textErro",
		"submitButtom" : "submit",
		"onComplete" : function(){
		}
		}
	};
	
	var myDTvalidate 	= new DTvalidate(DTvalidateConfig);
$(document).ready(function(){
		
		$("input#telefone_contato")
		.maskedinput("(999)9999-9999")
		.bind("blur", function(){
			var fkValue 	= $(this).val();
			$("input#telefone_contato").val(fkValue.replace(/[\(\)\-\s]/gi, ""));
		});
		
		$("input#telefone_servico")
		.maskedinput("(999)9999-9999")
		.bind("blur", function(){
			var fkValue 	= $(this).val();
			$("input#telefone_servico").val(fkValue.replace(/[\(\)\-\s]/gi, ""));
		});		
		$("input#nome_usuario").get(0).focus();
	});

