$(document).ready(function() {

	$("#bloquemosaico li a img").hide();
	$("#bloquemosaico li a").hover(
		function() { $(this).find("img").fadeIn(300); },
		function() { $(this).find("img").fadeOut(300); }
	);
	
	$("#galeria li a").click(
		function() {
			enlace = $(this).attr("href");
			$("#fotog img").fadeOut("1000", function(){
				$(this).attr("src", enlace);						
			});
			$('#fotog img').load(function(){
 				$(this).fadeIn("1000");
			});
			return false;
		}	
	);

	// Target _blank para enlaces externos
	$("a[@rel='external']").click(function(){
		this.target = "_blank";
	});
	
	// Rollover links
	$("#linklist div.link").hover(
		function() { $(this).addClass("hover"); },
		function() { $(this).removeClass("hover"); }
	);
	/*
	$("#linklist div.link").click(
		function() { 
		enlace = $(this).find("a").attr("href");
		return !window.open(enlace);
		}
	);
	*/
	
});

function antispam()
{
  j = "mai";
  b = "r.com";
  k = "mal";
  h = "roc";
  c = "dit";
  a = "io@";
  z = "lto:";
  f = "oro";
  d = "edo";
  r = "?subject=Contacto Web Malditoroedor.com&body=Por favor, especifique los siguientes datos para facilitar la respuesta a su mensaje:%0A%0ANombre: %0AEmpresa: %0A%0AMotivo del mensaje:";
  return j+z+h+a+k+c+f+d+b+r;
};
