
LoginCadastro = {
	logar : function(){
        $.ajax({
            type:   'GET',
             url:    BASE_URL,
             data:   $('#form1').serialize(),
			 dataType:	'json',
            success: function(d){
                if (d != 'null' && d.fid_cpf > '') {
                    location.href = BASE_URL + 'cliente-dashboard';
                } else {
					alert('CPF Inválido!')
				}

            }
        });

    },
	cadastro : function(){

		
		$.ajax({
            type:   'POST',
             url:    BASE_URL,
             data:   $('#form2').serialize(),
             success: function(d){

                if (d == 'Cadadstro realizado com sucesso!') {
                    location.href = BASE_URL + 'cliente-dashboard';
                } else {
					alert(d);
				}

            }
        });
		
	}

}
