$(document).ready(function(){

	$("div.clickable").click(function(){
    	window.location = $(this).attr("url");
    	return false;
	});
	
	$('div.c').hover(
		function(){
			$('a', this).css('color', '#3182c4')
			$(this).css('background-position', '0px -184px')
		},
		function(){
			$('a', this).css('color', '#7d7d7d')
			$(this).css('background-position', '0px 0px')
	});
	
	$('div.m').hover(
		function(){
			$('a', this).css('color', '#3182c4')
			$(this).css('background-position', '-360px -276px')
		},
		function(){
			$('a', this).css('color', '#7d7d7d')
			$(this).css('background-position', '-360px -92px')
	});
	
	$('div.y').hover(
		function(){
			$('a', this).css('color', '#3182c4')
			$(this).css('background-position', '-360px -184px')
		},
		function(){
			$('a', this).css('color', '#7d7d7d')
			$(this).css('background-position', '-360px 0px')
	});
	
	$('div.k').hover(
		function(){
			$('a', this).css('color', '#3182c4')
			$(this).css('background-position', '0px -276px')
		},
		function(){
			$('a', this).css('color', '#7d7d7d')
			$(this).css('background-position', '0px -92px')
	});
	
	$('#hertfordshire').hover(
		function(){
			$('.addr3').toggleClass('active')
			$("#locationmap").attr("src","/images/herfordshire.gif");
		},
		function(){
			$('.addr3').toggleClass('active')
			$("#locationmap").attr("src","/images/map.gif");
	});
	
	$('#hastings').hover(
		function(){
			$('.addr2').toggleClass('active')
			$("#locationmap").attr("src","/images/hastings.gif");
		},
		function(){
			$('.addr2').toggleClass('active')
			$("#locationmap").attr("src","/images/map.gif");
	});
	
	$('.addr3').hover(
		function(){
			$(this).toggleClass('active')
			$("#locationmap").attr("src","/images/herfordshire.gif");
		},
		function(){
			$(this).toggleClass('active')
			$("#locationmap").attr("src","/images/map.gif");
	});
	
	$('.addr2').hover(
		function(){
			$(this).toggleClass('active')
			$("#locationmap").attr("src","/images/hastings.gif");
		},
		function(){
			$(this).toggleClass('active')
			$("#locationmap").attr("src","/images/map.gif");
	});

						   
});


