function resetMenu() {
	$("#section-menu span").css("cursor", "pointer");
	$("#section-menu span").css("color", "#CCCC33");
}

function navigationEvents() {
	$("#section-menu span").hover(
		function() {
			if($(this).css("cursor") == "pointer") {
				$(this).css("color", "#0099CC");
			}
		},
		function () {
			if($(this).css("cursor") == "pointer") {
				$(this).css("color", "#CCCC33");
			}
		}

	);
	
	$("#apresentacao-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#apresentacao-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#valores-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#valores-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#visao-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#visao-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#datas-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#datas-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#banco-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#banco-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#conversas-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#conversas-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#activar-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#activar-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#igualdade-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#igualdade-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
	
	$("#inclusive-entry").click(
		function() {
			if($(this).css("cursor") == "pointer") {
				resetMenu();
				
				$(this).css("cursor", "default");
				$(this).css("color", "#0099CC");
				
				$(".right-column-container").children().each(function(index) {
					if($(this).css("display") != "none") {
						$(this).fadeOut("fast", function() {
							$("#inclusive-section-container").fadeIn("fast");
						});
					}
				});
			}
		}
	);
}

$(document).ready(function() {
	$(window).load(function() {
		$("#main-container").css("visibility", "visible");
	});
	
	if(currentPage == "inicio") {
		if(lang == "pt") {
			$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-inicio.jpg)");
		}
		
		if(lang == "en") {
			$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-home.jpg)");
		}
		
		$("#logo-container").css("height", "476px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-inicio.jpg)");
	}
	
	if(currentPage == "a-activar") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-activar.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-activar.jpg)");
	}
	
	if(currentPage == "formacao") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-formacao.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-formacao.jpg)");
	}
	
	if(currentPage == "infancia") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-infancia.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-infancia.jpg)");
	}
	
	if(currentPage == "juventude") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-juventude.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-juventude.jpg)");
	}
	
	if(currentPage == "outros-projectos") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-outros.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-outros.jpg)");
	}
	
	if(currentPage == "noticias" || currentPage == "noticia") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-noticias.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-noticias.jpg)");
	}
	
	if(currentPage == "contactos") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-contactos.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-contactos.jpg)");
	}
	
	if(currentPage == "galeria") {
		$("#logo-container").css("background-image", "url(" + templateDir + "/images/header-galeria.jpg)");
		$("#logo-container").css("height", "360px");
		
		$("#bottom-container").css("background-image", "url(" + templateDir + "/images/footer-galeria.jpg)");
	}
	
	navigationEvents();
});

