// JavaScript Document
				
		var geocoder = new GClientGeocoder();
		function displayPoint(map, markers, marker, index){
			if ($('#map_message').is(':hidden')) {//Allow toggling of markers
				$('#map_message').fadeIn();
			}
			else{//Remove all .active classes and hide markers
				$('#map_message').hide();
				$(".active").removeClass();
			}
			//$("#map_message").hide();//Default behaviour, doesn't allow toggling
			
			var moveEnd = GEvent.addListener(map, "moveend", function(){
				var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
				$("#map_message")
					.html('<div class="xbtn"></div>' + markers[index][0])//Use information from array
					.fadeIn()
					.css({ top:markerOffset.y, left:markerOffset.x });
			GEvent.removeListener(moveEnd);
			});
			map.panTo(marker.getLatLng());
		}	
		
		function setActive(el){
			$(".active").removeClass();//Remove all .active classes
			$("#map_list").find('li').eq(el).addClass('active');//Find list element equal to index number and set active
			$(el).addClass('active');//Set active if list element clicked directly
		}
		
		function configureOverlays($this, map, markers, mark, i, delayTime)
		{
			//setTimeout(function(){ 
				map.addOverlay(mark);
		/*==========================================================
						configureOverlays-List Setup
		==========================================================*/
		
				//Declared variables of the array. Label:property name, Statelabel:State
				var label = markers[i][1];
				var stateLabel = markers[i][3];
				
				//var orderingByState = typeof(markers[i][2]);
					
					//if(orderingByState == "object")
					//{
						// Populate state using variable
						
						// hide blank entrie function
						if(stateLabel == ""){
							$("<li />")
							.html(stateLabel)//Use list item label from array
							.css({'display' : 'none'})
							.appendTo("#map_list");
						}
						else
						{
							$("<li />")
								.html(stateLabel)//Use list item label from array
								.css({ 'color' : '#3b73a9', 'background' : '#f5f5f5', 'font-weight' : 'bold', 'cursor' : 'default', 'display' : 'block', 'width' : '510px'})
								.appendTo("#map_list");	
						}
						
						// Populate property using variables
						$("<li />")
							.html(label)//Use list item label from array
							.css({ 'width' : '162px', 'padding-bottom' : '10px' , 'padding-top' : '10px'})
							.click(function(){
								displayPoint(map, markers, mark, i);
								setActive(this);//Show active state
								
							})
						.appendTo("#map_list");
					//}
					//else
					//{
						//alert('The city of ');
											 
					//}
				
						
											 
					
					
		/* ======================================================== 
					//configureOverlays-Overlay Events
		   ========================================================	*/		
			
				GEvent.addListener(mark, "click", function(){
					displayPoint(map, markers, mark, i);
					setActive(i);//Show active location
				});
				
				displayPoint(map, markers, mark, i);
				setActive(i);//Show active location
				if (i == (markers.length - 1)) {//If last item in array
					//setTimeout(function(){//Remove active class and fade marker after delay
					$("#map_message").fadeOut(3500);
						//setActive();
					//}, 3500);
				}
			//}, delayTime); 		
		}
		$(document).ready(function(){ //Start script when ready
				   
			if (document.getElementById("map_canvas")) {//Checks to see that the page element exists and to prevent conflict with other maps
				
				//Default map center location
				var defaultLat = 39.57182223734374;
				var defaultLon = -100.01953125;
				
				var markers = new Array();
markers[0] = ["<strong>Alabama Sands</strong><br/>1117 W Lagoon Avenue, Gulf Shores, Alabama, United States, 36542 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/AlabamaSands.aspx\">View Property</a>", "Alabama Sands", (new GMarker(new GLatLng(30.245644,-87.7162422)))," Alabama"];
markers[1] = ["<strong>Gulf Shores Plantation</strong><br/>805 Plantation Road, Gulf Shores, Alabama 36542 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/GulfShoresPlantation.aspx\">View Property</a>", "Gulf Shores Plantation", (new GMarker(new GLatLng(30.2353418,-87.888357))),""];

markers[2] = ["<strong>Turtle Reef Club</strong><br/>10800 South Ocean Drive, Jensen Beach, Florida, United States, 34957 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/TurtleReefClub.aspx\">View Property</a>", "Turtle Reef Club", (new GMarker(new GLatLng(27.269749,-80.203383)))," Florida"];

markers[3] = [/* "<strong>Riverside Club</strong><br/>1085 Bald Eagle Dr., Marco Island, FL 34145 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/RiversideClub.aspx\">View Property</a>", "Riverside Club", (new GMarker(new GLatLng(25.970908,-81.7272799))),"" */];

markers[4] = ["<strong>Tarpon Woods</strong><br/>1200 Tarpon Woods Blvd., Palm Harbor, FL 34684 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/TarponWoods.aspx\">View Property</a>", "Tarpon Woods", (new GMarker(new GLatLng(28.087311,-82.698198))),""];
markers[5] = ["<strong>South Palm Suites</strong><br/>1401 South Federal Highway, Lake Worth, Florida, United States, 33460 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/SouthPalmSuites.aspx\">View Property</a>", "South Palm Suites", (new GMarker(new GLatLng(26.59848,-80.052761))),""];
markers[6] = ["<strong>Dunedin's Beso Del Sol</strong><br/>1420 Bayshore Blvd, Dunedin, Florida, United States, 34698 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/DunedinsBesoDelSol.aspx\">View Property</a>", "Dunedin's Beso Del Sol", (new GMarker(new GLatLng(28.0242598,-82.7897963))),""];

markers[7] = [/*"<strong>Barefoot Beach Resort</strong><br/>19417 Gulf Blvd, Indian Shores, Florida, United States, 33785  <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/BarefootBeachResort.aspx\">View Property</a>", "Barefoot Beach Resort", (new GMarker(new GLatLng(27.84945,-82.843006))),""*/];

markers[8] = [/* "<strong>203 Caddy Road</strong><br/>203 Caddy Rd, Rotonda West, Florida, United States, 33947-2223 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/203CaddyRoad.aspx\">View Property</a>", "203 Caddy Road", (new GMarker(new GLatLng(26.890583,-82.287575))),"" */];

markers[9] = ["<strong>Summerspell</strong><br/>2396 Scenic Highway 98 South, Destin, Florida, United States, 32550 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/Summerspell.aspx\">View Property</a>", "Summerspell", (new GMarker(new GLatLng(30.384195,-86.4571217))),""];
markers[10] = ["<strong>Perennial Vacation Club at Daytona</strong><br/>2525 S Atlantic Ave, Daytona Beach Shores, Florida, United States, 32118-5502 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/PerennialVacationClubatDaytona.aspx\">View Property</a>", "Perennial Vacation Club at Daytona", (new GMarker(new GLatLng(29.185949,-80.98734))),""];

markers[11] = ["<strong>Gulfview II</strong><br/>2830 Scenic Gulf Drive Miramar Beach, FL 32550<br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/GulfviewII.aspx\">View Property</a>", "Gulfview II", (new GMarker(new GLatLng(30.379916,-86.394936))),""];

markers[12] = ["<strong>Anglers Cove</strong><br/>291 S. Collier Blvd., Marco Island, FL 34145 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/AnglersCove.aspx\">View Property</a>", "Anglers Cove", (new GMarker(new GLatLng(25.931015,-81.728457))),""];

markers[13] = ["<strong>Sandy Pointe at Destin West</strong><br/>312 Bream Avenue, Fort Walton Beach, Florida, United States, 32548 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/SandyPointeatDestinWest.aspx\">View Property</a>", "Sandy Pointe at Destin West", (new GMarker(new GLatLng(30.397512,-86.6035179))),""];
markers[14] = ["<strong>Summer Lake</strong><br/>340 Scenic Highway 98, Destin, FL 32550 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/SummerLake.aspx\">View Property</a>", "Summer Lake", (new GMarker(new GLatLng(30.377577,-86.379111))),""];
markers[15] = ["<strong>The Resort at Marina Village Inn</strong><br/>5951 Silver King Blvd., Cape Coral, FL 33914 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/TheResortatMarinaVillageInn.aspx\">View Property</a>", "The Resort at Marina Village Inn", (new GMarker(new GLatLng(26.540933,-81.998958))),""];
markers[16] = ["<strong>GreenLinks Resort</strong><br/>7990 Mahogony Run Lane, Naples, Florida, United States, 34113 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/GreenlinksResort.aspx\">View Property</a>", "GreenLinks Resort", (new GMarker(new GLatLng(26.084902,-81.698578))),""];
markers[17] = ["<strong>Grand Palm</strong><br/>8807-B Grand Palms Circle, Kissimmee, Florida, United States, 34747 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/GrandPalm.aspx\">View Property</a>", "Grand Palm", (new GMarker(new GLatLng(28.342395,-81.6400759))),""];
markers[18] = ["<strong>Laguna Bay Villas</strong><br/>5005 Laguna Bay Cir, Kissimmee, Florida, United States, 34746-5403 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/LagunaBayVillas.aspx\">View Property</a>", "Laguna Bay Villas", (new GMarker(new GLatLng(28.312121,-81.484458))),""];
markers[19] = ["<strong>Starfish Villas</strong><br/>119 El Reposo Place, Panama City Beach , Florida, United States, 32413-1703 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/StarfishVillas.aspx\">View Property</a>", "Starfish Villas", (new GMarker(new GLatLng(30.2390718,-85.9199306))),""];
markers[20] = ["<strong>Sweetwater Club</strong><br/>2494 Sweetwater Club Circle, Kissimmee, Florida, United States, 34746 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/SweetwaterClub.aspx\">View Property</a>", "Sweetwater Club", (new GMarker(new GLatLng(28.318221,-81.477057))),""];
markers[21] = ["<strong>The Resort and Club at Little Harbor</strong><br/>611 Destiny Drive, Ruskin, Florida, United States, 33570 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/TheResortandClubatLittleHarbor.aspx\">View Property</a>", "The Resort and Club at Little Harbor", (new GMarker(new GLatLng(27.729509,-82.475992))),""];
markers[22] = ["<strong>Villas at Island Club</strong><br/>3139 Britannia Blvd, Kissimmee, Florida, United States, 34747-1429 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/VillasatIslandClub.aspx\">View Property</a>", "Villas at Island Club", (new GMarker(new GLatLng(28.342498,-81.636481))),""];
markers[23] = ["<strong>Royal Palm Bay</strong><br/>2928 Royal Bay Blvd., Kissimmee, FL 34746<br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/royalpalmbay.aspx\">View Property</a>", "Royal Palm Bay", (new GMarker(new GLatLng(28.311638,-81.480879))),""];
markers[24] = ["<strong>Villas at Somerset</strong><br/>2725 N Poinciana Blvd, Kissimmee, Florida, United States, 34746-5259 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/VillasatSomerset.aspx\">View Property</a>", "Villas at Somerset", (new GMarker(new GLatLng(28.326427,-81.488641))),""];


markers[25] = ["<strong>Perfect Drive Golf Villa at PGA Village</strong><br/>8316 Mulligan Circle, Port St. Lucie, FL 34986<br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/perfectdrivegolfvillasatpgavillage.aspx\">View Property</a>", "Perfect Drive Golf Villa at PGA Village", (new GMarker(new GLatLng(27.317279,-80.417839))),""];

markers[26] = ["<strong>Maroz</strong><br/>102 E Capricorn Dr, South Padre Island, Texas, United States, 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/Maroz.aspx\">View Property</a>", "Maroz", (new GMarker(new GLatLng(26.1214011,-97.1702608))),"Texas"];
markers[27] = ["<strong>Vista Del Mar</strong><br/>102 E. Pompano, South Padre Island, Texas, United States, 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/VistaDelMar.aspx\">View Property</a>", "Vista Del Mar", (new GMarker(new GLatLng(26.0996506,-97.166175))),""];

markers[28] = [ "<strong>Fiesta Sol</strong><br/>115 E. Amberjack St., South Padre Island, Texas, United States, 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/FiestaSol.aspx\">View Property</a>", "Fiesta Sol", (new GMarker(new GLatLng(26.1033871,-97.1660387))),"" ];

markers[29] = ["<strong>Mar Y Sol II</strong><br/>120 E Campeche Street, South Padre Island, Texas, United States, 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/MarYSolII.aspx\">View Property</a>", "Mar Y Sol II", (new GMarker(new GLatLng(26.108423,-97.1667028))),""];
//markers[28] = ["<strong>Marbella</strong><br/>131 E. Mars, South Padre Island, Texas, United States, 78597 <br/><a //href=\"/Properties/PropertiesbyRegion/GulfCoast/Marbella.aspx\">View Property</a>", "Marbella", (new GMarker(new GLatLng(26.1199647,-97.1671385))),""];
markers[30] = ["<strong>Aqua Del Mar</strong><br/>200 West Esperanza Street, South Padre, Texas, United States, 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/AquaDelMar.aspx\">View Property</a>", "Aqua Del Mar", (new GMarker(new GLatLng(26.116313,-97.1708688))),""];

markers[31] = [/* "<strong>Beachview Condominiums</strong><br/>2401 Gulf Blvd, South Padre Island, Texas, United States, 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/BeachviewCondominiums.aspx\">View Property</a>", "Beachview Condominiums", (new GMarker(new GLatLng(26.102462,-97.165135))),""*/];

markers[32] = [/*"<strong>Acushnet Place</strong><br/>4521 Acushnet Drive, Corpus Christi, Texas, United States, 78413 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/AcushnetPlace.aspx\">View Property</a>", "Acushnet Place", (new GMarker(new GLatLng(27.692136,-97.404783))),""*/];

markers[33] = ["<strong>Bandera Homestead</strong><br/>Bandera, Texas, United States, 78003 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/BanderaHomestead.aspx\">View Property</a>", "Bandera Homestead", (new GMarker(new GLatLng(29.7098738,-99.0571089))),""];

markers[34] = ["<strong>Cloud Dancer</strong><br/>106 East A 101 South Padre, TX 78597 <br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/CloudDancer.aspx\">View Property</a>", "Cloud Dancer", (new GMarker(new GLatLng(26.0829392,-97.1642543))),""];

markers[35] = ["<strong>Silverleaf</strong><br/>Route 4 FM 2661, Flint, Texas, United States, 75762<br/><a href=\"/Properties/PropertiesbyRegion/GulfCoast/Silverleaf.aspx\">View Property</a>", "Silverleaf", (new GMarker(new GLatLng(32.20035,-95.455746))),""];


				var map = new google.maps.Map2($("#map_canvas").get(0));//Initialise google maps
				map.setCenter(new GLatLng(defaultLat, defaultLon), 4);//Set location to the default and zoom level to 8
				//map.disableDoubleClickZoom();//Disable zooming
				
				//=============================
					//Zoom Functionality
				//=============================
				var customUI = map.getDefaultUI();
        		customUI.maptypes.hybrid = false; // Remove MapType.G_HYBRID_MAP
        		map.setUI(customUI);
				map.setMapType(G_PHYSICAL_MAP);
				
				

				//=============================
				      //Functions Called
				//=============================
				$.each(markers,function(i,marker){
					var delayTime = ((i * 0) / (0.5 * markers.length));//Delay time decreases as number of markers increases
					var mark;
					
					var location = typeof(marker[2]);
					
					if(location == "object") //Only for Get Lat String (not in use anymore)
					{
						var mark = marker[2];
						configureOverlays(this, map, markers, mark, i, delayTime);
					}
					else
					{
						
						//geocoder.getLatLng(
						//	 marker[0]
						//	,function(point) {
						//		mark = new GMarker(point);
						//		configureOverlays(this, map, markers, mark, i, delayTime);
						//	}
						//);							 
					}
					
					
				});
			
				$("#map_list").css("opacity","0.2").animate({opacity: 1}, 1100);//Fade in menu
				$("#map_message").appendTo(map.getPane(G_MAP_FLOAT_SHADOW_PANE));
			}//End if map_canvas exists
			
			
				/* 
			================================
			  X hide #map_message config 
			================================
			*/	
			$("#map_message").click(function () { 
				$("#map_message").hide(); 
			});	
			
			
		}); //End onReady
		
		
