$(document).ready(function(){	
if ($("#contact-locations").size()>0) {
	$("#contact-locations h3").click(function(){
		$(".contact-location").removeClass("active");

		var flag = $(this).prev();
		var title = $(this);
		var addresses = $(this).next();

		addresses.addClass("active");
		
		$("#contact-locations").prepend(addresses);
		$("#contact-locations").prepend(title);
		$("#contact-locations").prepend(flag);
		
		$("body").scrollTo( "133", "4000");
	});

	$("#belgium").click(function(){
		map.panTo(new google.maps.LatLng(51.116, 3.403));
		map.setZoom(9);
	});

	$("#france").click(function(){
		map.panTo(new google.maps.LatLng(48.90064, 2.22602));
		map.setZoom(7);
	});

	$("#germany").click(function(){
		map.panTo(new google.maps.LatLng(50.84, 10.39));
		map.setZoom(5);
	});

	$("#netherlands").click(function(){
		map.panTo(new google.maps.LatLng(52.10783, 5.04682));
		map.setZoom(9);
	});
	
	$("#uk").click(function(){
		map.panTo(new google.maps.LatLng(52.075, -1.07));
		map.setZoom(7);
	});

	$("#usa").click(function(){
		map.panTo(new google.maps.LatLng(39.25, -99.7));
		map.setZoom(4);
	});
	
	var fragment = window.location.hash;
	if (fragment!="") {
		var id = (fragment.match(/^#(\w+)$/))[1];
		if ($('#' + id).length) {
			$('#' + id).click();
		}
	};
};
});

