
		
			$(document).ready(function()
			{
				var container = $("#section-info .section-content");
				var welcomeHeight = $(".welcome").height();
				var collectorHeight = $(".collector").height();
				var mitchellHeight = $(".mitchell").height();
				var bakeryHeight = $(".bakery").height();
				
				$("#sectionContainer").css("height", welcomeHeight + 46); // 46 = section-top and section-bottom height + section-content top and bottom margins
				
				$("ul.sections li").hide().css("opacity", 0);
				$("#section-info .section-content").css("height", "200px");
				
				container.animate({height: welcomeHeight}, 0);
				$(".welcome").fadeTo(0, 1);
				
				function fadeWelcome() {
					$(".welcome").show();
					container.stop().animate({height: welcomeHeight}, 400);
					$(".welcome").stop().delay(200).fadeTo(600, 1);
					$("#pointer").stop().animate({marginTop : "11px"}, 100);
				}
				
				$(".section-logos").hover(
					function() {
					},
					function() {
						fadeWelcome();
					}
				);
				
				$("#tab1").hover(
					function() {
					
						$("#pointer").stop().animate({marginLeft : "292px"}, 200).animate({marginTop : "0px"}, 100);
						
						$(".welcome").stop().fadeTo(300, 0);
						$(".welcome").hide(fadeBakery());
						function fadeBakery() {
							$(".collector").show();
							container.stop().animate({height: collectorHeight}, 400);
							$(".collector").stop().delay(200).fadeTo(600, 1);
						}
					},
					function() {
						$(".collector").stop().fadeTo(600, 0);
						$(".collector").hide();
					}
				);
				
				$("#tab2").hover(
					function() {
						
						$("#pointer").stop().animate({marginLeft : "392px"}, 200).animate({marginTop : "0px"}, 100);
						
						$(".welcome").stop().fadeTo(600, 0);
						$(".welcome").hide(fadeMobile());
						function fadeMobile() {
							$(".mitchell").show();
							container.stop().animate({height: mitchellHeight}, 400);
							$(".mitchell").stop().delay(200).fadeTo(600, 1);
						}
					},
					function() {
						$(".mitchell").stop().fadeTo(600, 0);
						$(".mitchell").hide();
					}
				);
				
				$("#tab3").hover(
					function() {
						
						$("#pointer").stop().animate({marginLeft : "492px"}, 200).animate({marginTop : "0px"}, 100);
						
						$(".welcome").stop().fadeTo(600, 0);
						$(".welcome").hide(fadeChoice());
						function fadeChoice() {
							$(".bakery").show();
							container.stop().animate({height: bakeryHeight}, 400);
							$(".bakery").stop().delay(200).fadeTo(600, 1);
						}
					},
					function() {
						$(".bakery").stop().fadeTo(600, 0);
						$(".bakery").hide();
					}
				);
				
});