$(function(){
	$('#b a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-150px 0)"}, {duration:500})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(-300px 0)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 0"})
			}})
		})
		.focus(function(){
			$(this).stop().animate({backgroundPosition:"(-150px 0)"}, {duration:500})
		})
		.blur(function(){
			$(this).stop().animate({backgroundPosition:"(-300px 0)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 0"})
			}})
		})
});
//funcion para validar los campos del formulario de contactos
function validarform(form){
	document.getElementById('Nombre').value=document.getElementById('Nombre').value.replace(/^\s*|\s*$/g,"");
	document.getElementById('ciudad').value=document.getElementById('ciudad').value.replace(/^\s*|\s*$/g,"");
	document.getElementById('Email').value=document.getElementById('Email').value.replace(/^\s*|\s*$/g,"");
	document.getElementById('mensaje').value=document.getElementById('mensaje').value.replace(/^\s*|\s*$/g,"");
	if(document.getElementById('Nombre').value.length==0){
		alert('Debe Escribir su Nombre!!');
		document.getElementById('Nombre').focus();
	}else if(document.getElementById('pais').value==0){
		alert('Debe Seleccionar un País!!');
		document.getElementById('pais').focus();
	}else if(document.getElementById('ciudad').value.length==0){
		alert('Debe Escribir un nombre de Ciudad!!');
		document.getElementById('ciudad').focus();
	}else if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.getElementById('Email').value)){
		alert('Debe Escribir un E-mail valido!!');
		document.getElementById('Email').focus();
	}else if(document.getElementById('mensaje').value.length==0){
		alert('Debe Escribir un Mensaje!!');
		document.getElementById('mensaje').focus();
	}else{
		document.getElementById('pag').value=document.location.href;
		document.getElementById(form).action='enviarcont.php';
		document.getElementById(form).submit();
	}
}