$(function() {
	//sumile logo
	$("h1 img").css("opacity", "0");
	$("h1").css({backgroundPosition: "-13px 0px"})
	.animate({backgroundPosition: "0px 0px"}, 400, function() {
		$(this).find("img").animate({opacity: "1"}, 1800, "linear", function() {
			$("h1").animate({backgroundPosition: "0px -30px"}, 800);
		});
	});
	//navigation border
	var borderList;
	switch($("body").attr("class")) {
		case "pageHome":
		borderList = $("#navHome");
		break;
		case "pageNews":
		borderList = $("#navNews");
		break;
		case "pageConcept":
		borderList = $("#navConcept");
		break;
		case "pageMenu":
		borderList = $("#navMenu");
		break;
		case "pageChefs":
		borderList = $("#navChefs");
		break;
		case "pagePhotos":
		borderList = $("#navPhotos");
		break;
		case "pageLocation":
		borderList = $("#navLocation");
		break;
	}
	borderList.find("img").animate({borderTopColor: "#722e8d"}, 2500);
	//button
	var effectSq = $("<div>").css({
		width: "8px",
		height: "8px",
		backgroundColor: "#a17dbb",
		position: "absolute",
		left: "0px",
		top: "12px",
		overflow: "hidden"
	});
	$("#nav li a").each(function() {
		$(this).hover(function() {
			$(this).prepend(effectSq.clone());
			$(this).find("div").stop(true, true).animate({
				opacity: "0"
			}, 300, function(){
				$(this).remove();
			});
			$(this).find("img").stop(true, false).animate({left: "6px"}, 500);
		},
		function() {
			$(this).find("img").stop(true, false).animate({left: "0px"}, 200);
		});
	});
});

