var map;
var geoXml; 
var toggleState = 1;
var minMapScale = 12;
var maxMapScale = 16;

function initialize() {
	if (GBrowserIsCompatible()) {
		var now = new Date();
		bicycleLanes = new GGeoXml("http://www.lokeshdhakar.com/projects/bikingdc/data/dc_bikelanes.KMZ?" + now.getSeconds());

		G_NORMAL_MAP.getMinimumResolution = function () { return minMapScale };
		G_NORMAL_MAP.getMaximumResolution = function () { return maxMapScale };
		
		map = new GMap2(document.getElementById("mapCanvas")); 
		map.setCenter(new GLatLng(38.898748,-77.037684), 14); // DC
		map.addControl(new GLargeMapControl());
		map.addOverlay(bicycleLanes);
	}
} 

jQuery(function($){
	$('#sidebar .closeButton').bind( "click", function(event){
		$('#sidebar').toggle();
		$('#sidebarMin').toggle();
		event.preventDefault();
	});

	$('#sidebarMin .expandButton').bind( "click", function(event){
		$('#sidebar').toggle();
		$('#sidebarMin').toggle();
		event.preventDefault();
	});

});