$(function(){
  // $f("player", "/swf/flowplayer-3.2.2.swf", {
  //    // clip properties common to all playlist entries
  //    clip: {
  //      baseUrl: '/audio',
  //      subTitle: '10 a&ntilde;os'
  //    },
  //    playlist: [
  //      { title: 'Aorta', url: 'aorta-10a-aorta.mp3'},
  //      { title: 'Siente el metal', url: 'aorta-10a-siente-el-metal.mp3'}
  //    ],
  //    plugins: {
  //      controls: {
  //        playlist: true,
  //        fullscreen: false,
  //        height: 19,
  //        autoHide: false
  //      },
  //      audio: {
  //        url: '/swf/flowplayer.audio-3.2.1.swf'
  //      }
  //    },
  //  });
  //  $f("player").playlist("div.clips:first", {loop:true});
	
	var fecha = $("a.pop")
	
	if (fecha != null) {
	 fecha.fancybox();
	}
	$('#na').focus();  
	
	$('#contactanos').validate({
		submitHandler: function(form) {
   			form.submit();
 		},
		debug: true,
		errorElement: "em",
		errorContainer: $("#warning"),
		errorPlacement: function(error, element) {
			error.appendTo( element.parent("p").children(".error") );
		},
		rules: {
			na: {
				required: true,
				minlength: 2
			},
			ce: {
				required: true,
				email: true
			},
			tc: {
				required: true,
			},
			txt: {
				required: true,
				minlength: 20
			}
		},
		messages: {
			na: {
				required: "Por favor, ingresa tu nombre",
				minlength:  "El texto debe ser mayor a 2 caracteres" 
			},
			ce: "Por favor, ingresa tu correo",
			tc: "Por favor, ingresa el motivo de la consulta",
			txt: {
				required: "Por favor, ingresa un mensaje!",
				minlength: "El texto debe ser mayor a 20 caracteres"
			}
		}
	});
});