/*
 * Translated default messages for the jQuery validation plugin.
 * Language: ES
 * Author: David Esperalta - http://www.dec.gesbit.com/
 */
jQuery.extend(jQuery.validator.messages, {
  required: "Este campo es obligatorio.",
  remote: "Por favor, rellena este campo.",
  email: "Por favor, escribe una dirección de correo válida",
  url: "Por favor, escribe una URL válida.",
  date: "Por favor, escribe una fecha válida.",
  dateISO: "Por favor, escribe una fecha (ISO) válida.",
  number: "Por favor, escribe un número entero válido.",
  digits: "Por favor, escribe sólo dígitos.",
  creditcard: "Por favor, escribe un número de tarjeta válido.",
  equalTo: "Por favor, escribe el mismo valor de nuevo.",
  accept: "Por favor, escribe un valor con una extensión aceptada.",
  maxlength: jQuery.format("Por favor, no escribas más de {0} caracteres."),
  minlength: jQuery.format("Por favor, no escribas menos de {0} caracteres."),
  rangelength: jQuery.format("Por favor, escribe un valor entre {0} y {1} caracteres."),
  range: jQuery.format("Por favor, escribe un valor entre {0} y {1}."),
  max: jQuery.format("Por favor, escribe un valor igual o menor que {0}."),
  min: jQuery.format("Por favor, escribe un valor igual o mayor que {0}.")
});

jQuery.validator.addMethod("TelContacto", function(value, element) {

var TelContactoFijo = document.getElementById('TelFijo').value;
var TelContactoMovil = document.getElementById('TelMovil').value;

if((TelContactoFijo ==  '') && (TelContactoMovil == '' )){
			return false;
}
else{
            return true;
}
},'Debe escribir un teléfono de contacto. Ya sea Fijo o móvil');

