Fawn.tour = {
	currentLoc : -1
	,inProgress : false
	,timeOnEach : 5000
	,next : function(){
		if (!Fawn.tour.inProgress) {
			return;
		}
		Fawn.tour.currentLoc++;
		var loc = Fawn.tour.locations[Fawn.tour.currentLoc];
		Fawn.GMap.map.openInfoWindowHtml(
			new GLatLng(loc.lat, loc.lng),
			Fawn.tour._locMarkup(loc)
		);
		// wrap around
		if ((Fawn.tour.currentLoc + 1) == Fawn.tour.locations.length) {
			Fawn.tour.currentLoc = -1;
		}
		setTimeout(Fawn.tour.next, Fawn.tour.timeOnEach);
	}
	,addAllMarkers : function(){
		var loc;
		for (var i = 0, l = Fawn.tour.locations.length; i < l; i++) {
			loc = Fawn.tour.locations[i];
			loc.gmarker = new GMarker(new GLatLng(loc.lat, loc.lng), Fawn.GMap.icon);
			loc.gmarker.locNum = i;
			Fawn.GMap.map.addOverlay(loc.gmarker);
		}
	}
	,_locMarkup : function(loc) {
		return "<h3><a href='" + Fawn.HTML_ROOT + "/station.php?id="
			+ loc.id + "'>" + loc.name + ", FL</a></h3><em>" + loc.facility + "</em>"
			+ "<div style='margin-top:4px; color:#666'>Lat " + loc.lat + "&deg; | Long " + loc.lng + "&deg;</div>";
	}
	,init : function() {
		if (!Fawn.GMap.init("map", true)) {
			return false;
		}
		Fawn.GMap.map.addControl(new GMapTypeControl());
		Fawn.tour.addAllMarkers();
		Fawn.tour.inProgress = true;
		GEvent.addListener(Fawn.GMap.map, "click", function(marker, point) {
			Fawn.GMap.map.addControl(new GLargeMapControl());
			//Fawn.GMap.map.setMapType(G_NORMAL_MAP);
			if (Fawn.tour.inProgress) {
				Fawn.tour.inProgress = false;
			}
			if (marker && marker.locNum != undefined) {
				var loc = Fawn.tour.locations[marker.locNum];
				Fawn.GMap.map.openInfoWindowHtml(
					new GLatLng(loc.lat, loc.lng),
					Fawn.tour._locMarkup(loc)
				);
			}
			if (typeof point != 'undefined')
                $('#debug').html('Lat ' 
                    + Math.round(point.y * 10000)/10000 + '&deg; | Long: ' 
                    + Math.round(point.x * 10000)/10000 + '&deg;'
                );
            else
                $('#debug').html('');
		});
		setTimeout(function(){
			Fawn.GMap.map.setZoom(7);
		}, 1000);
		setTimeout(Fawn.tour.next, 1500);
		return true;
	}
};
// You must specify Fawn.tour.locations before calling Fawn.tour.init();