$(document).ready(function()	{
	$('#enlightenment').tinyscrollbar({ size: 500, sizethumb: 194 });	
	
	$('.turtleSnooze').hover(function(){
		$(this).animate({opacity: '1'},300);
		}, function() {
		$(this).animate({opacity: '0'},300);
	});
	
	$('.bunnyGhost').hover(function(){
		$(this).animate({opacity: '1'},300);
		}, function() {
		$(this).animate({opacity: '0'},300);
	});
	
	$(".witnessTheFlyingMachine").click(
		function()	{
			$(this).animate({opacity: '0'},300).fadeOut().delay(20000).animate({opacity: '1'},300).fadeIn();
			$(".flyingMachine").animate({opacity: '1', top: '20',left: '400'}, {easing: "linear",duration:4000})
			.animate({top: '0',left: '200'}, {easing: "linear",duration:4000})
			.animate({top: '20',left: '0'}, {easing: "linear",duration:4000})
			.animate({top: '10',left: '-200'}, {easing: "linear",duration:4000})
			.animate({top: '0',left: '-400',opacity: '0'}, {easing: "linear",duration:4000}).fadeOut()
			.animate({top: '0',left: '650',opacity: '0.3'}, {easing: "linear",duration:10}).fadeIn();
			
			$("#smokePuff-A").delay(2000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-B").delay(3000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-C").delay(4000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-D").delay(5000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-E").delay(6000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-F").delay(7000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-G").delay(8000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-H").delay(9000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-I").delay(10000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-J").delay(11000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-K").delay(12000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-L").delay(13000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-M").delay(14000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-N").delay(15000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			$("#smokePuff-O").delay(16000).animate({opacity: '1',top: '140',right: '-70'},700).fadeOut(200).fadeIn(20).animate({opacity: '0',top: '180',right: '26'},20);
			
			$(".clouds-A").animate({top: '45',left: '650'}, {easing: "linear",duration:22000}).fadeOut(100).animate({top: '45',left: '0'}, {easing: "linear",duration:10}).fadeIn(300);
			$(".clouds-D").animate({top: '80',left: '650'}, {easing: "linear",duration:10000}).fadeOut(100).animate({top: '80',left: '40'}, {easing: "linear",duration:10}).fadeIn(300);
			$(".clouds-C").animate({top: '100',left: '650'}, {easing: "linear",duration:16000}).fadeOut(100).animate({top: '0',right: '0'}, {easing: "linear",duration:10}).fadeIn(300);
			$(".clouds-E").delay(9000).animate({top: '200',left: '650'}, {easing: "linear",duration:9000}).fadeOut(100).animate({top: '200',left: '-350'}, {easing: "linear",duration:10}).fadeIn(300);
			
			
			$(".moon").animate({opacity: '0.3'},5000).animate({opacity: '1'},5000).animate({opacity: '0.3'},5000).animate({opacity: '1'},5000);
			$(".midniteHabit").delay(11000).animate({top: '200',left: '475'}, {easing: "linear",duration:4000}).animate({opacity: '0.2',top: '400',left: '450'}, {easing: "linear",duration:4000}).fadeOut().animate({opacity: '1',top: '-60',left: '450'}, {easing: "linear",duration:10}).fadeIn();
		}
	);
	
	$(".gaslightTrigger").mouseover(
		function()	{
			$(".womenSlaughtered").animate({opacity: '0'},300);
			$(".examineVictims").animate({opacity: '1'},300);
			$(".gaslightFinialLeft").animate({left: '210'}, 200);
			$(".gaslightFinialRight").animate({left: '750'}, 200);
		}
	);
	
	$(".gaslightTrigger").mouseout(
		function()	{
			$(".womenSlaughtered").animate({opacity: '1'},300);
			$(".examineVictims").animate({opacity: '0'},300);
			$(".gaslightFinialLeft").animate({left: '45'}, 200);
			$(".gaslightFinialRight").animate({left: '915'}, 200);
		}
	);
	
	$(".chapmanTrigger").mouseover(
		function()	{
			$(".chapmansElixirs").animate({opacity: '0.15'},300);
			$(".crossbones").animate({opacity: '1.0'},300);
			$(".beware").animate({top: '150'},{queue:false, duration:500, easing:'easeOutElastic'});
			$(".fleurDeHallucinations").animate({top: '409'},{queue:false, duration:500, easing:'easeOutElastic'});
		}
	);
	
	$(".chapmanTrigger").mouseout(
		function()	{
			$(".chapmansElixirs").animate({opacity: '1'},300);
			$(".crossbones").animate({opacity: '0.0'},200);
			$(".beware").animate({top: '-157'},{queue:false, duration:300});
			$(".fleurDeHallucinations").animate({top: '700'},{queue:false, duration:300});
		}
	);
});
