// Bartalos Illustration JavScript v1.0a

$(document).ready(function() {

	// GLOBAL
		// t is for main menu timer, hide after load
			var t;
	
		// main menu functions
	
			expand_logo = function() {
				$("#header h1, #header h1 a").animate({ height: "65px" }, "slow");
			};
	
			collapse_logo = function() {
				$("#header h1, #header h1 a").animate({ height: "33px" }, "fast");
			};
						  
		// menu action
			$("#header h1 a").hover(
				function () {
					clearTimeout(t);
					expand_logo();
				}, 
				function () {
					t = setTimeout("collapse_logo();", 600);
				}
			);
			
		// credits actions
			$("#credits").hide();
			$("#credits_trigger a").mouseover(function() {
				$("#credits").fadeIn("slow");
				return false;
			});
		
	// ARTIST PAGE
		// hide when JS present (for degradation)
		$("#contact").hide();
		$("#links").hide();
		
		// menu actions
		$("#trigger_biography").click(function () {
			$(".page_artist_menu_select").removeClass();
			$(this).parent("li").addClass("page_artist_menu_select");
			$("#biography").fadeIn();
			$("#contact").hide();
			$("#links").hide();
			return false;
		});
		
		$("#trigger_contact").click(function () {
			$(".page_artist_menu_select").removeClass();
			$(this).parent("li").addClass("page_artist_menu_select");
			$("#biography").hide();
			$("#contact").fadeIn();
			$("#links").hide();
			return false;
		});
		
		$("#trigger_links").click(function () {
			$(".page_artist_menu_select").removeClass();
			$(this).parent("li").addClass("page_artist_menu_select");
			$("#biography").hide();
			$("#contact").hide();
			$("#links").fadeIn();
			return false;
		});
	
});