/*
@description Regional office map
@author RZ
@created 2008-08-01
*/

$(document).ready(function() {

	$('#offices').css('background-image','url(/display_images/regions/map0.png)');
	
	bindHover = function (map, area, name) {
		//hovers
		$('#offices .'+name+', #offices .'+area).hover(
			function() {//mouseover
				$('#offices .map').hide();
				$('#offices li').css('background-color','transparent');
				$('#offices .'+map).show();
				$('#offices .'+name).css('background-color','#DEEEF7');
			},
			function() {//mouseout
				
			}
		);
	}
	
	// vars
	office = [
		["map1", "area1", "name1"],
		["map2", "area2", "name2"],
		["map3", "area3", "name3"],
		["map4", "area4", "name4"],
		["map5", "area5", "name5"],
		["map6", "area6", "name6"]
	]
	for (i in office) {
		var map = office[i][0];
		var area = office[i][1];
		var name = office[i][2];
		bindHover(map, area, name);
	}
	
	$('.gor_list h3').toggle(
		function(){
			$(this).parent().find('div').show();
		},
		function(){
			$(this).parent().find('div').hide();
		}
	);
	
});