$(document).ready(function(){$("div.error").remove();$(window).scroll(function(){var d=$(document).scrollTop();var e=$("#encabezado").height();var c=$(document).height()-$("#pie").height()-$("#menu").height();if(d>e){if(d<c){$("#menu").stop().animate({top:d-e})}}else{$("#menu").stop().animate({top:0})}});$("#menu ul li").hover(function(){$(this).css("background-color","#DBEBF6").stop().animate({paddingLeft:"25"})},function(){$(this).css("background-color","#F0F7FC").stop().animate({paddingLeft:"15"})});$("#galeria a").click(function(c){$("body").css("overflow","hidden");$("<div id='fondo'></div>").css("top",$(document).scrollTop()).css("opacity","0").animate({opacity:"0.7"},"slow").click(function(){a()}).appendTo("body");$("<div id='contenedor'></div>").hide().appendTo("body");$("<img />").attr("src",$(this).attr("href")).addClass("bordef").css("height",$(window).height()*0.9).load(function(){b()}).click(function(){a()}).fadeIn().appendTo("#contenedor");$("<strong class='borde'>X</strong>").click(function(){a()}).appendTo("#contenedor");return false});function b(){var c=($(window).height()-$("#contenedor").height())/2;var d=($(window).width()-$("#contenedor").width())/2;$("#contenedor").css({top:c+$(document).scrollTop(),left:d}).fadeIn()}function a(){$("#contenedor, #fondo").fadeOut("slow",function(){$(this).remove();$("body").css("overflow","auto")})}});
