function gLoad() {

	$('.container a.maplink').click(function(){
		domId = $(this).attr('rel');
		GEvent.trigger(markers[domId], "click");
	});

	if (GBrowserIsCompatible()) {
		// create the map centered on the Bowl
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(34.053868329055504, -118.25129985809326), 15);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		

		// create a custom icon for the WDCH point
		var wIcon = new GIcon();
		wIcon.image = "/media/images/visit/star.png";
		wIcon.iconSize = new GSize(31,31);
		wIcon.iconAnchor = new GPoint(16, 16);
		wIcon.infoWindowAnchor = new GPoint(15,15);
		var marker = new GMarker(new GLatLng(34.055415, -118.250055),wIcon); // map.setCenter(new GLatLng(34.055415, -118.250055), 16);
		map.addOverlay(marker);
		marker.bindInfoWindowHtml('<strong>Walt Disney Concert Hall</strong><br />111 South Grand Avenue<br />Los Angeles, CA 90012');

		// icon template for restaurants
		var rIcon = new GIcon();
		rIcon.image = "/media/images/visit/r.png";
		rIcon.iconSize = new GSize(21, 21);
		rIcon.iconAnchor = new GPoint(10, 10);
		rIcon.infoWindowAnchor = new GPoint(11, 11);
		
		// icon template for bars
		var bIcon = new GIcon();
		bIcon.image = "/media/images/visit/b.png";
		bIcon.iconSize = new GSize(21, 21);
		bIcon.iconAnchor = new GPoint(10, 10);
		bIcon.infoWindowAnchor = new GPoint(11, 11);	
		
		// icon template for hotels
		var hIcon = new GIcon();
		hIcon.image = "/media/images/visit/h.png";
		hIcon.iconSize = new GSize(21, 21);
		hIcon.iconAnchor = new GPoint(10, 10);
		hIcon.infoWindowAnchor = new GPoint(11, 11);

		var restaurants =  [
					{ domid: 'Arnie', lat: '34.048888', lon: '-118.260349', notes: '<strong>Arnie Morton\'s - The Steakhouse</strong><br />735 S. Figueroa Street'},
					{ domid: 'Cafe', lat: '34.050892', lon: '-118.255008', notes: '<strong>Caf&eacute; Pinot</strong><br />700 W. 5th Street'},
					{ domid: 'Checkers', lat: '34.049678', lon: '-118.254378', notes: '<strong>Checkers Downtown Restaurant</strong><br />535 S. Grand Avenue'},
					{ domid: 'Ciao', lat: '34.049072', lon: '-118.259343', notes: '<strong>Ciao Trattoria</strong><br />815 W. 7th St.'},
					{ domid: 'Cicada', lat: '34.047815', lon: '-118.254383', notes: '<strong>Cicada</strong><br />617 S. Olive St.'},
					{ domid: 'Ciudad', lat: '34.053448', lon: '-118.256027', notes: '<strong>Ciudad</strong><br />Union Bank Plaza<br />445 S. Figueroa St.'},
					{ domid: 'Engine', lat: '34.049991', lon: '-118.259299', notes: '<strong>Engine Co. No. 28</strong><br />644 S. Figueroa St.'},
					{ domid: 'Kendalls', lat: '34.056189', lon: '-118.248473', notes: '<strong>Kendall\'s Brasserie</strong><br />Dorothy Chandler Pavilion<br />135 N. Grand Ave.'},
					{ domid: 'McCormick', lat: '34.05041', lon: '-118.254272', notes: '<strong>McCormick &amp; Schmick\'s Seafood Restaurant</strong><br />US Bank Tower, 4th level<br />633 W. 5th St.'},
					{ domid: 'Nick', lat: '34.053276', lon: '-118.252706', notes: '<strong>Nick &amp; Stef\'s Steakhouse</strong><br />Wells Fargo Building<br />330 S. Hope St.'},
					{ domid: 'Noe', lat: '34.052926', lon: '-118.249613', notes: '<strong>No&eacute; Restaurant &amp; Bar</strong><br />Omni Los Angeles Hotel<br />251 S. Olive St.'},
					{ domid: 'Patina', lat: '34.05519', lon: '-118.249212', notes: '<strong>Patina</strong><br />Walt Disney Concert Hall<br />141 S. Grand Ave.'},
					{ domid: 'Patinette', lat: '34.054147', lon: '-118.250129', notes: '<strong>Patinette</strong><br />Museum of Contemporary Art<br />250 S. Grand Ave.'},
					{ domid: 'Petes', lat: '34.048091', lon: '-118.247233', notes: '<strong>Pete\'s Cafe And Bar</strong><br />400 S. Main St.'},
					{ domid: 'Sai', lat: '34.049447', lon: '-118.252874', notes: '<strong>Sai Sai</strong><br />Millennium Biltmore Hotel<br />501 S. Olive St.'},
					{ domid: 'Tesoro', lat: '34.053845', lon: '-118.250438', notes: '<strong>Tesoro Trattoria</strong><br />300 S. Grand Ave.'},
					{ domid: 'Restaurant', lat: '34.050866', lon: '-118.256793', notes: '<strong>The Restaurant</strong><br />The Standard<br />550 S. Flower St.'},
					{ domid: 'Thousand', lat: '34.050837', lon: '-118.242846', notes: '<strong>Thousand Cranes</strong><br />Kyoto Grand Hotel and Gardens<br />120 S. Los Angeles St.'},
					{ domid: 'Water', lat: '34.05058', lon: '-118.253553', notes: '<strong>Water Grill</strong><br />544 S. Grand Ave.'}
				];
		var bars =  [
					{ domid: 'Bar', lat: '34.048426', lon: '-118.247679', notes: '<strong>Bar 107</strong><br />107 W. 4th Street'},
					{ domid: 'Broadway', lat: '34.043306', lon: '-118.255153', notes: '<strong>Broadway Bar</strong><br />803 S. Broadway'},
					{ domid: 'Casey', lat: '34.048568', lon: '-118.255407', notes: '<strong>Casey\'s Irish Bar &amp; Grille</strong><br />613 S. Grand Avenue'},
					{ domid: 'Gallery', lat: '34.050856', lon: '-118.2533', notes: '<strong>Gallery Bar</strong><br />Millennium Biltmore Hotel<br />506 S. Grand Ave.'},
					{ domid: 'Golden', lat: '34.044593', lon: '-118.255968', notes: '<strong>Golden Gopher</strong><br />417 W. 8th St.'},
					{ domid: 'J', lat: '34.040591', lon: '-118.261148', notes: '<strong>J Restaurant &amp; Lounge</strong><br />1119 S. Olive St.'},
					{ domid: 'Cita', lat: '34.050868', lon: '-118.249848', notes: '<strong>La Cita</strong><br />336 S. Hill St.'},
					{ domid: 'Library', lat: '34.049327', lon: '-118.256093', notes: '<strong>Library Bar</strong><br />630 W. 6th St. (at Hope)'},
					{ domid: 'Lost', lat: '34.04854', lon: '-118.247854', notes: '<strong>Lost Souls Cafe</strong><br />124 W. 4th St.'},
					{ domid: 'Redwood', lat: '34.052519', lon: '-118.246811', notes: '<strong>Redwood Bar and Grill</strong><br />316 W. 2nd St.'},
					{ domid: 'Rooftop', lat: '34.050866', lon: '-118.256793', notes: '<strong>Rooftop Bar</strong><br />The Standard<br />550 S. Flower St.'},
					{ domid: 'Roy', lat: '34.054719', lon: '-118.250205', notes: '<strong>Roy and Edna Disney/CalArts Theater</strong><br />REDCAT<br />631 W. 2nd St.'},
					{ domid: '626', lat: '34.045575', lon: '-118.25132', notes: '<strong>626 Reserve</strong><br />626 S. Spring St.'},
					{ domid: 'Edison', lat: '34.051184', lon: '-118.24479', notes: '<strong>The Edison</strong><br />108 W. 2nd St., No. 101<br />(in Harlem Place alley)'}
				];
		var hotels =  [
					{ domid: 'Omni', lat: '34.052926', lon: '-118.249613', notes: '<strong>Omni Los Angeles Hotel</strong><br />251 S. Olive Street'},
					{ domid: 'Wilshire', lat: '34.050294', lon: '-118.259637', notes: '<strong>Wilshire Grand Hotel</strong><br />930 Wilshire Boulevard'},
					{ domid: 'Millennium', lat: '34.050856', lon: '-118.2533', notes: '<strong>Millennium Biltmore Hotel</strong><br />506 S. Grand Avenue'},
					{ domid: 'Hilton', lat: '34.049678', lon: '-118.254378', notes: '<strong>Hilton Checkers Hotel</strong><br />535 S. Grand Avenue'},
                    { domid: 'O', lat: '34.046985', lon: '-118.260380', notes: '<strong>O Hotel</strong><br />819 S. Flower Street'},			
                    { domid: 'Kyoto', lat: '34.050517', lon: '-118.243006', notes: '<strong>Kyoto Grand Hotel and Gardens</strong><br />120 S. Los Angeles Street'}					

		];
		

		var markers = new Array();
		var points = new Array();
		
		for (var i = 0; i < restaurants.length; i++) {
			points[i] = new GLatLng( restaurants[i].lat, restaurants[i].lon );
			markers [restaurants[i].domid] = new GMarker(points[i],rIcon);
			map.addOverlay(markers[restaurants[i].domid]);
			markers[restaurants[i].domid].bindInfoWindowHtml(restaurants[i].notes);
		}
		
		for (var i = 0; i < bars.length; i++) {
			points[i] = new GLatLng( bars[i].lat, bars[i].lon );
			markers [bars[i].domid] = new GMarker(points[i],bIcon);
			map.addOverlay(markers[bars[i].domid]);
			markers[bars[i].domid].bindInfoWindowHtml(bars[i].notes);
		}	
		
		for (var i = 0; i < hotels.length; i++) {
			points[i] = new GLatLng( hotels[i].lat, hotels[i].lon );
			markers [hotels[i].domid] = new GMarker(points[i],hIcon);
			map.addOverlay(markers[hotels[i].domid]);
			markers[hotels[i].domid].bindInfoWindowHtml(hotels[i].notes);

		}

	}

}

$(document).unload(GUnload);