$(document).ready(function() {
		$("body").addClass("js");
		$("body").append('<div id="cover"></div>');
		$("#sponsorInfo").append('<a href="#" class="close">Close</a>').hide();
		$("#cover").hide();
		$("#whatisthis h3").append('<span class="rolling"></span>').hide()
		$('.rolling').load('rolling.png', function() {
			$('.rolling img').hide();
		  	$("#whatisthis h3").slideDown(1500);
			$(".rolling").css("margin-left","-13px").animate(
				{left: '+=13'}, 1500).fadeOut();
		});
			
		$("#registerForm").append('<a href="#" class="close">Close</a>').hide();
		$("#explanation").append('<a href="#" class="close">Close</a>').hide();	
	
	$("#register>p:first a").click(function() {
		if($("#wufooFormz7x3k1")){
			register_cover = $("#registerForm").height();
			$("#cover").height(register_cover+100);	
			$("#registerForm, #cover").fadeIn('slow');
		} else {
			alert("reload");
		}
		return false;
	});
	$("#registerForm .close").click(function() {	
		$("body").removeClass("register");
		$("#registerForm, #cover").fadeOut('slow');
		return false;
	});
	$("#sponsors>p a").click(function() {	
		sponsors_cover = $("#sponsorInfo").height();
		$("#cover").height(sponsors_cover+100);
		$("#sponsorInfo, #cover").fadeIn('slow');
		return false;
	});
	$("#sponsors .close").click(function() {	
		$("#sponsorInfo, #cover").fadeOut('slow');
		return false;
	});
	
	$("#whatisthis h3").click(function() {	
		whatisthis_cover = $("#explanation").height();
		$("#cover").height(whatisthis_cover+100);
		$("#explanation, #cover").fadeIn('slow');
		return false;
	});
	$("#explanation .close").click(function() {	
		$("#explanation, #cover").fadeOut('slow');
		return false;
	});
});