// JavaScript Document

$(document).ready(function()
{
  
  
  $(".rollover").hover(
	function(){
		if($(this).attr("src").indexOf("-active") == -1) {
			var newSrc = $(this).attr("src").replace(".jpg","B.html#hover");
			$(this).attr("src",newSrc);
		}
	},
	function(){
		if($(this).attr("src").indexOf("B.html#hover") != -1) {
			var oldSrc = $(this).attr("src").replace("B.html#hover",".jpg");
			$(this).attr("src",oldSrc);
		}
	}
	
	
	
);
  
  $(".rollover_scene").hover(
	function(){
		if($(this).attr("src").indexOf("-active") == -1) {
			var newSrc = $(this).attr("src").replace(".png","B-2.html#hover");
			$(this).attr("src",newSrc);
		}
	},
	function(){
		if($(this).attr("src").indexOf("B-2.html#hover") != -1) {
			var oldSrc = $(this).attr("src").replace("B-2.html#hover",".png");
			$(this).attr("src",oldSrc);
		}
	}
  );
  
	
	$(".rollover_site").hover(
	function(){
		if($(this).attr("src").indexOf("-active") == -1) {
			var newSrc = $(this).attr("src").replace(".jpg","B.html#hover");
			$(this).attr("src",newSrc);
		}
	},
	function(){
		if($(this).attr("src").indexOf("B.html#hover") != -1) {
			var oldSrc = $(this).attr("src").replace("B.html#hover",".jpg");
			$(this).attr("src",oldSrc);
		}
	}
		
);
	
	$(".rollover_site").click(
	function(){
		if($(this).attr("src").indexOf("-active") == -1) {
			var newSrc = $(this).attr("src").replace("offB.html#hover","on.html");
			$(this).attr("src",newSrc);
			var oldSrc = $(".site_active").attr("src").replace("on.html","off.html");
			$(".site_active").attr("src",oldSrc);
			$(".site_active").removeClass("site_active");
			$(this).addClass("site_active");
			var the_id = $(this).attr("id");
			$("div.active_update").css("display","none");
			$("div.active_update").removeClass("active_update");
			$("div[id='" +the_id+ "']").css("display","block");
			$("div[id='" +the_id+ "']").addClass("active_update");
		}
	}
);	


  
});








