// Load markers for shopping
if (GBrowserIsCompatible()) {
	var aLocations = [];
	
	window.onload = function loadMap() {
		var map = new GMap2(document.getElementById("map"));

        var longitude = -86.699432;
        var latitude = 36.141421;
		
		// center map on default location
		map.addControl(new GSmallMapControl());
		map.setCenter(new GLatLng(latitude, longitude), 10);
		
		// default location
		var point = new GLatLng(latitude, longitude);	
		var title_main = 'Hotel Preston';
		var address_main = '733 Briley Parkway ';
		var city_main = 'Nashville';
		var state_main = 'Tennesseee';
		var zip_main = '37217';			
		var html = 	"<div class=\"bubble\"><h2>" + title_main + "</h2><p>" + address_main + 
						"<br \/>" + city_main + ", " + state_main + " " + zip_main + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q=" + address_main + "+" + zip_main + "\" target=\"_blank\">Get Directions<\/a><\/div>";
	    marker = createMarker(point, html, 'custom');
	    aLocations.push( marker );
	    map.addOverlay(aLocations[aLocations.length-1]);
	    // open the hotel preston bubble on load
	    marker.openInfoWindowHtml(html);
		
		
		// Shopping markers
		
		var point = new GLatLng(36.20562,-86.696463);
		var title = 'Opry Mills Shopping Center';
		var address = '433 Opry Mills Drive';
		var city = 'Nashville';
		var state = 'Tennessee';
		var zip = '37214';				
		var html = 	"<div class=\"bubble\"><h2>" + title + "</h2><p>" + address + 
						"<br \/>" + city + ", " + state + " " + zip + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q="+ address_main + "+" + zip_main + "+to+" + address + "+" + zip + "\" target=\"_blank\">Get Directions<\/a><\/div>";
		aLocations.push(createMarker(point, html, 1));
		map.addOverlay(aLocations[aLocations.length-1]);	
		
		var point = new GLatLng(36.078005,-86.948633);
		var title = 'Bellevue Center';
		var address = '7620 Hwy 70 S';
		var city = 'Nashville';
		var state = 'Tennessee';
		var zip = '37221';				
		var html = 	"<div class=\"bubble\"><h2>" + title + "</h2><p>" + address + 
						"<br \/>" + city + ", " + state + " " + zip + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q="+ address_main + "+" + zip_main + "+to+" + address + "+" + zip + "\" target=\"_blank\">Get Directions<\/a><\/div>";
		aLocations.push(createMarker(point, html, 2));
		map.addOverlay(aLocations[aLocations.length-1]);		
		
		var point = new GLatLng(36.106217,-86.816679);
		var title = 'Mall at Green Hills';
		var address = '2126 Abbott Martin Rd';
		var city = 'Nashville';
		var state = 'Tennessee';
		var zip = '37215';				
		var html = 	"<div class=\"bubble\"><h2>" + title + "</h2><p>" + address + 
						"<br \/>" + city + ", " + state + " " + zip + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q="+ address_main + "+" + zip_main + "+to+" + address + "+" + zip + "\" target=\"_blank\">Get Directions<\/a><\/div>";
		aLocations.push(createMarker(point, html, 3));
		map.addOverlay(aLocations[aLocations.length-1]);
		
		var point = new GLatLng(36.216934,-86.694821);
		var title = 'Cracker Barrel';
		var address = '2406 Music Valley Drive';
		var city = 'Nashville';
		var state = 'Tennessee';
		var zip = '37214';				
		var html = 	"<div class=\"bubble\"><h2>" + title + "</h2><p>" + address + 
						"<br \/>" + city + ", " + state + " " + zip + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q="+ address_main + "+" + zip_main + "+to+" + address + "+" + zip + "\" target=\"_blank\">Get Directions<\/a><\/div>";
		aLocations.push(createMarker(point, html, 4));
		map.addOverlay(aLocations[aLocations.length-1]);
		
		var point = new GLatLng(36.164254,-86.777755);
		var title = 'Downtown Nashville';
		var address = 'Church St and 3rd Ave. N';
		var city = 'Nashville';
		var state = 'Tennessee';
		var zip = '37212';				
		var html = 	"<div class=\"bubble\"><h2>" + title + "</h2><p>" + address + 
						"<br \/>" + city + ", " + state + " " + zip + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q="+ address_main + "+" + zip_main + "+to+" + address + "+" + zip + "\" target=\"_blank\">Get Directions<\/a><\/div>";
		aLocations.push(createMarker(point, html, 5));
		map.addOverlay(aLocations[aLocations.length-1]);
		
		var point = new GLatLng(36.20562,-86.696463);
		var title = 'Gibson Guitars';
		var address = '433 Opry Mills Drive';
		var city = 'Nashville';
		var state = 'Tennessee';
		var zip = '37214';				
		var html = 	"<div class=\"bubble\"><h2>" + title + "</h2><p>" + address + 
						"<br \/>" + city + ", " + state + " " + zip + "<\/p><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q="+ address_main + "+" + zip_main + "+to+" + address + "+" + zip + "\" target=\"_blank\">Get Directions<\/a><\/div>";
		aLocations.push(createMarker(point, html, 6));
		map.addOverlay(aLocations[aLocations.length-1]);									
	}
}