/*
Javascript for Our-Building Page with rollovers and changing text displayed

Adam Onishi, 22-10-2009
*/

function removeAll(){
	$(".zone-info").css({marginTop: "30px", opacity:0}).show();
	$(".section-hover").css({opacity:0}).show();
	$("#buttons a").removeClass("act-on");
}

$(document).ready(function() {
	$(".zone-info").css({marginTop: "30px", opacity:0}).show();
	$("#whole-info.zone-info").css({marginTop: "0px", opacity:1}).show();
	
	$(".section-hover").css({opacity:0}).show();
	$("#whole-hover.section-hover").css({opacity:1}).show();
	$("a#whole-button").addClass("act-on");
	active_sect = "whole";
});

$(function() {
	$("a#exchange-button").click (function(){
		removeAll();
		
		$("#exchange-info.zone-info").stop().animate ({marginTop: "0px", opacity:'1'}, 400);
		$("#exchange-hover.section-hover").stop().animate ({opacity:'1'}, 400);
		$(this).addClass("act-on");
		
		return false;
	}); 
	
	
	$("a#boardroom-button").click (function(){
		removeAll();
		
		$("#boardroom-info.zone-info").stop().animate ({marginTop: "0px", opacity:'1'}, 400);
		$("#boardroom-hover.section-hover").stop().animate ({opacity:'1'}, 400);
		$(this).addClass("act-on");
		
		return false;
	}); 

	$("a#ground-button").click (function(){
		removeAll();
		
		$("#ground-info.zone-info").stop().animate ({marginTop: "0px", opacity:'1'}, 400);
		$("#ground-hover.section-hover").stop().animate ({opacity:'1'}, 400);
		$(this).addClass("act-on");
		
		return false;
	}); 
	
	$("a#whole-button").click (function(){
		removeAll();
		
		$("#whole-info.zone-info").stop().animate ({marginTop: "0px", opacity:'1'}, 400);
		$("#whole-hover.section-hover").stop().animate ({opacity:'1'}, 400);
		$(this).addClass("act-on");
		
		return false;
	}); 
});