$(document).ready(function() {


	/* Rollovers. */
							   
	$(this).find(".section").hover(function() {
		$(this).find(".section-over").css('display','block');
	}, function() {
		$(this).find(".section-over").hide();
	});
	
	
	/* Arrows. */
	
	$(".arrow").click(function () {
		$("#content").animate({left: -300});
		$("#content2").show().animate({right: -510});
		$(".arrow").fadeOut();
		$(".arrow2").fadeIn();
		$(".arrow3").fadeOut();
	}); 
	
	$(".arrow2").click(function () {
		$("#content").animate({left: 0});
		$(".arrow").fadeIn();
		$(".arrow2").fadeOut();
		$(".arrow3").fadeIn();
	}); 
	
	$(".arrow3").click(function () {
		$("#content2").show().animate({right: 0});
		$(".arrow3").fadeOut();
		$(".arrow4").fadeIn();
	}); 
	
	$(".news").click(function () {
		if(!$(this).hasClass("active")) {
			$("#content2").animate({right: -510});
			$(".newspanel").hide();
			$("#"+ $(this).attr("rel")).show();
			$(".news").removeClass("active");
			$(this).addClass("active");
			$("#content2").show().animate({right: 0});
			$(".arrow4").fadeIn();
		}
		return false;
	});
	
	$(".arrow4").click(function () {
		$("#content2").animate({right: -510});
		$(".arrow3").fadeIn();
		$(".arrow4").fadeOut();
	}); 


	/* Left navigation. */
	
	$("#left a").click(function() {
		$(this).addClass("active_tab").parent("li").siblings().find("a").removeClass("active_tab");
		if($(this).next("ul").length > 0 && $(this).hasClass("go") === false) {
			$(this).next("ul").slideToggle();
			$(this).parent("li").siblings().find("ul").slideUp();
			return false;
		} else {
			return true;
		}
	});
	
	
	/* Thumbnails. */
	
	$("#thumbs a").click(function() {
		if($(this).hasClass("active") == false) {
			var rel = $(this).attr("rel");
			$("#right img.main").fadeOut();
			$("#right img[rel='"+rel+"']").fadeIn();
			$(this).addClass("active").siblings().removeClass("active");
		}
		return false;
	});
	
	
	
	/* Contact Maps. */
	
	$("#lmap, #wsmap").click(function() {
		$(".lmap, .wsmap").fadeOut();
		$("."+ $(this).attr("id")).fadeIn();
		return false;
	});

});
