function overlay(){function b(a){$("#close_overlay_link").click(function(){$("#overlay").css("filter","alpha(opacity=0)");$("#overlay").fadeOut("slow",function(){$("#overlay").remove();a=="home"&&window.location.replace("/")})})}function c(){var a;if(self.pageYOffset)a=self.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)a=document.documentElement.scrollTop;else if(document.body)a=document.body.scrollTop;return a}function d(){var a;if(self.innerHeight)a=self.innerHeight; else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body)a=document.body.clientHeight;return a}this.display_overlay=function(){$("<div>").attr("id","overlay").attr("class","overlay").appendTo("body");var a=c();a!=0&&d();document_height=$(document).height();document_width=$(document).width();$("#overlay").css({height:document_height+"px",width:document_width+"px"});$("#overlay").fadeIn("medium",function(){var e=a+100;$("<div>").attr("id", "overlay-background").attr("class","overlay-background").prependTo("#overlay").css("margin-top",e+"px").css("display","none");var f=setInterval(function(){clearInterval(f);if($("#overlay-background").attr("id")=="overlay-background"){$("<div>").attr("id","close_overlay_link").prependTo("#overlay-background");$("#close_overlay_link").html('<a title="close" href="javascript:void(0);">X</a>');b()}},500);$("<div>").attr("id","overlay-content").attr("class","overlay-content").appendTo("#overlay-background")})}; this.close_overlay=b;this.get_page_scroll=c;this.get_page_height=d};

