doc = document.URL;
page = doc.indexOf('dish.php');

function dish() {
	$('.hide').hide();
	$('.bio_entry img').css("float", "none");
	$('.bio_entry img').toggle(
		function() {
			//first
			h = $(this).parent().height();
			$(this).parent().css({
				position: "relative",
				height: h
			});
			$(this).css("position", "absolute");
			$(this).animate({
				left: "+=214"
			}, 250, function() {
				$(this).css("position", "static");
				$(this).css("float", "right");
				$(this).parent().find('.hide').fadeIn();
				$(this).parent().css("height", "auto");
			});
		},
		function() {
			//second
			var img = $(this);
			$(this).parent().find('.hide').fadeOut(
				function() {
					$(this).parent().css("height", "141px");
					img.css("position", "absolute");
					img.animate({
						left: "20px"
					});
				}, function() {
					img.css("position", "static");
					img.css("float", "none");
					img.css("left", "20px");
				}
			);
		}
	);
}

$(document).ready(
	function() {
		$('.header-img').css({
			opacity: "0"
		});
		
		$('.inactive').css("visibility", "visible");
		$('.active').css({
			display: "none",
			visibility: "visible",
			width: "392px"
		}, 2000);
		$('.highlight').hide();
		
		if (page != -1) { dish(); }
		
		$('.active').show("slow", function() {
			$('.highlight').fadeIn("slow", function() {
				$('.header-img').animate({
					opacity: '+=1'
				}, 2000);
			});
		});
	}
);