$(document).ready(function() {
	
	/* general */
	$.metadata.setType("attr", "validate");
	
	// handle validation
	var validateContactForm = jQuery('form#contact-form').validate();
					
	// google maps
	if (document.getElementById("contact-map")) {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("contact-map"));
			map.setCenter(new GLatLng(48.68268756016676, 7.918910980224609), 13);
			map.addControl(new GSmallMapControl());
	        map.addControl(new GMapTypeControl());
		}
		function createMarker(point, number) {
			var marker = new GMarker(point);
			return marker;
		}
		var point = new GLatLng(48.68268756016676, 7.918910980224609);
		map.addOverlay(createMarker(point));
		map.openInfoWindow(new GLatLng(48.68268756016676, 7.918910980224609), "<strong>Passage 309</strong>");
	}
	
});	

// provide simple location handling for flash map
function openMapLink(loc) {
	parent.location.href = loc;
	return true;
}
