$(document).ready(function(){	

	//google maps
	$(".map-list li a").click(
		function()
		{
			//get the office clicked on
			var location = $(this).attr('href').replace("#", "");
			var zoom = parseInt($(this).attr("rel"));
			var longitude;
			var latitude;
			$("div.geo").each(function() {
				if(location == $(this).attr('id'))
				{
					//get the children of the div
					latitude = parseFloat($(this).children('.latitude').attr('title'));
					longitude = parseFloat($(this).children('.longitude').attr('title'));
				}
			});
			//$("#map1").googleMapZoomIn(latitude, longitude, officeName, {	controls: ["GSmallMapControl", "GMapTypeControl"],	markers: $(".geo")	});	
			
			$("#map1").googleMap(latitude, longitude, zoom, {controls: ["GSmallMapControl", "GMapTypeControl"],markers: $(".geo")})
			return false;
		}
	);
});



$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};

function urlCleanFormat(s) {
	alert("s: " + s);
	s = s.replace(/\s/g, "").toLowerCase();
	s = s.replace(/\//g, ""); 
	s = s.replace(/'/g, ""); 
	s = s.replace(/&amp;/g, ""); 
	s = s.replace(/&/g, ""); 
	return s;
};