// Scripts file for www.arciszewska.com
// Author: Lukasz Kokoszkiewicz [lukasz@kokoszkiewicz.com]

function loadEvents(data) {
	// defining data
	var locations = data.locations;
	var images = data.images;

	// top menu events - start
	$(".buttontop").mouseover( function() {
		$(this).css("background-color", "#d0ccc9");
		$("#"+$(this).attr("id")+"_TXT").css("color", "#771a22");
	});
	
	$(".buttontop").mouseout( function() {
		$(this).css("background-color", "#b6b1ab");
		$("#"+$(this).attr("id")+"_TXT").css("color", "#FFFFFF");
	});
	
	$(".buttontop").click( function() {
		location.href = locations[$(this).attr("id")];
	});
	// top menu events - stop
	
	// bottom right menu events - start
	$(".rightMenuButtonBG").mouseover( function() {
		$("#"+images[$(this).attr("id")]).attr("src", "images/"+images[$(this).attr("id")]+"_h.jpg");
		$("#"+$(this).attr("id")+"_TXT").css("color","#771a22");
	});
	
	$(".rightMenuButtonBG").mouseout( function() {
		$("#"+images[$(this).attr("id")]).attr("src", "images/"+images[$(this).attr("id")]+".jpg");
		$("#"+$(this).attr("id")+"_TXT").css("color","#FFFFFF");
	});
	
	$(".rightMenuButtonBG").click( function() {
		location.href = locations[$(this).attr("id")];
	});
	// bottom right menu events - stop
	$("#showHideAboutMe").hide()
	$("#toggleAboutMe").click( function() {
		$("#showHideAboutMe").toggle("slow");
	});
}

function initializePages() {
	$(".pages").hide();
	$("#page_1").show("slow");
	$("#button_1").css("font-weight","bold");
	
	$(".pageButton").click( function() {
		$(".pages").hide();
		$("#page_"+this.value).show("slow");
		
		$(".pageButton").css("font-weight","normal");
		$("#button_"+this.value).css("font-weight","bold");
	});
}






