var map = null;
var geocoder = null;

function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
			if (!point) {
				alert(address + " not found");
			} else {
				map.setCenter(point, 13);
				var marker = new GMarker(point);
				map.addOverlay(marker);
			}
		});
	}
}

function getdirections() {
	$dirfr = $('#dirfrom').val();
	$dirto = $('#dirto').val();
	$data  = "dirfr=" + $dirfr + "&dirto=" + $dirto;
	$("#googlemap").slideToggle(0, function() {
		$.ajax({
			type: "POST",
			url: "/directions.php",
			data: $data,
			success: function(html){
				$("#googlemap").html(html);
				$("#googlemap").slideToggle(300);
				map.checkResize();
			}
		});
	});
}
$(document).ready(function() {
	$("a.group").fancybox({ 'hideOnContentClick': true });
});
