$(document).ready(function(){
	$("#learn_more").fadeOut(0);
	$("#close_button").css({"opacity": "0.3"});//preloading stuff	
	$("#black").css({"opacity": "0"});//preloading stuff	
	$("#black2").css({"opacity": "0"});//preloading stuff
	$("#black3").css({"opacity": "0"});//preloading stuff
	
	$("#black").animate({"opacity": "0.97"}, {"duration": (1000)});//fades the black bit in when the page loads
	$("#black2").animate({"opacity": "0.97"}, {"duration": (1000)});//fades the black bit in when the page loads
	
	$("#black3").animate({"opacity": "0.97"}, {"duration": (1000)});//fades the black bit in when the page loads
	
	$("#learn_more").fadeIn(5000); //fades the find out more thing in slowly
	
	$("#close_button").mouseenter(function(){ //close button stuff
			$(this).stop().animate({"opacity": "1"}, {"duration": (250)});							   
	});
	$("#close_button").mouseleave(function(){ //close button stuff
			$(this).stop().animate({"opacity": "0.3"}, {"duration": (2500)});		
	});
	$("#close_button").click(function(){ //this closes the popup and the black section
			$("#black").fadeOut(1200);
	});
	$("#close_button2").click(function(){ //this closes the popup and the black section
			$("#black2").fadeOut(1200);
	});
	$("#close_button3").click(function(){ //this closes the popup and the black section
			$("#black3").fadeOut(1200);
	});
});
