
jQuery(document).ready(function(){

    
    jQuery("#form").submit(function(){
        var ok = true;

        if(jQuery("input#nombre").attr("value") == ""){
            ok = false;
        }

        if(jQuery("input#email").attr("value") == ""){
            ok = false;
        }

        if(jQuery("input#telefono").attr("value") == ""){
            ok = false;
        }

        if(ok == false){
            alert("Por favor, rellene todos los campos");
            return false;
        }

        if(jQuery("input#privacidad").attr("checked") == false){
            alert("Debes aceptar las condiciones de uso y privacidad");
            return false;
        }

        return true;

    });
    
});
