function initialize() {
  var latlng = new google.maps.LatLng(43.8391, -120.5859);
  var myOptions = {
    zoom: 6,
    center: latlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
		disableDefaultUI: true,
		draggable: true,
  };

  var map = new google.maps.Map(document.getElementById("map-container"),
      myOptions);


		var stores = [
		  ['Aloha TV Hwy Liquor Store', 45.495881, -122.886761, 1, '20285 SW Tualatin Valley Highway, Aloha, OR 97006', '503-591-9590'],
		  ['Bend East Liquor Store', 44.071314, -121.302398, 2, '2220 NE Highway 20, Ste. 1, Bend, OR 97701', '541-318-2977'],
		  ['Gresham Troutdale Liquor Store', 45.518942, -122.412202, 3, '3030 NE Hogan Dr. #A, Gresham, OR 97030', '503-665-5227'],
		  ['Portland Beaumont Liquor Store', 45.562775, -122.630059, 4, '3334 NE Killingsworth Street, Portland, OR 97211', '503-282-0178'],
		  ['Portland Eastport Liquor Store', 45.491941, -122.578833, 5, '4229 SE 82nd Ave Ste 1, Portland, OR 97266', '503-771-8535'],
		  ['Portland Moreland Liquor Store', 45.472015, -122.648496, 6, '7207 SE Milwaukie Ave, Portland, OR 97202', '503-771-8535'],
		  ['Portland Rose City Liquor Store', 45.548612, -122.588123, 7, '7253 NE Sandy Blvd, Portland, OR 97210', '503-284-7591'],
		  ['Portland Uptown Liquor Store', 45.523640, -122.700007, 8, '1 NW 23rd Pl, Portland, OR 97210', '503-227-0338'],
		  ['Salem Battlecreek Liquor Store', 44.880868, -123.029460, 9, '5107 Commercial St SE, Salem, OR 97306', '503-385-1725'],
		  ['Sandy Liquor Store', 45.396212, -122.264778, 10, '38755 Pioneer Blvd, Sandy, OR 97055', '503-668-4447'],
		  ['Talent Liquor Store', 42.245036, -122.784275, 11, '101 N Pacific Hwy, Talent, OR 97540', '541-535-2522'],
		  ['West Linn North Liquor Store', 45.385118, -122.639199, 12, '19335 SW Willamette Drive, West Linn, OR 97068', '503-697-3504'],
		  ['Wilsonville Liquor Store', 45.303391, -122.772237, 13, '29955 SW Boones Ferry Rd, Ste H2, Wilsonville, OR 97070', '503-682-0323'],
			['Baker City Liquor Store', 44.781684, -117.821283, 14, '1250 Campbell St, Baker City, OR 97814', '541-523-5022'],
			['Beaverton Progress Liquor Store', 45.458221, -122.786444, 15, '8616 SW Hall Blvd, Beaverton, OR 97008', '503-646-2875'],
			['Beaverton Hyland Hills Liquor Store', 45.476362, -122.823974, 16, '14334 SW Allen Blvd, Beaverton, OR 97006', '503-644-2235'],
			['Bend East Liquor Store', 44.071314, -121.302398, 17, '2220 NE Highway 20, Ste. 1, Bend, OR 97701', '541-318-2977'],
			['Hillsboro Liquor Store', 45.520836, -122.980715, 18, '218 SE 6th Ave, Hillsboro, OR 97123', '503-648-4232'],
			['Lake Oswego Mt Park Liquor Store', 45.431969, -122.702902, 19, '4 Monroe Parkway, Lake Oswego, OR 97035', '503-636-0310'],
			['Lincoln City North Liquor Store', 44.949847, -124.014474, 20, '2409 NW Hwy 101, Lincoln City, OR 97367', '541-994-2521'],			
			['Portland Hollywood Liquor Store', 45.533984, -122.624672, 21, '3738 NE Sandy Blvd, Portland, OR 97232', '503-284-0987'],
			['Portland Macadam Liquor Store', 45.479420, -122.672748, 22, '6141 SW Macadam Ave, Portland, OR 97239', '503-246-1466'],
			['Redmond North Liquor Store', 44.285472, -121.175278, 23, '2757 NW 7th, Unit I, Redmond, OR 97756', '541-526-1335'],
			['Redmond South Liquor Store', 44.252539, -121.186100, 24, '1705 Odem Medo Rd, Redmond, OR 97756', '541-548-2722'],
			['Salem South Liquor Store', 44.908048, -123.043505, 25, '3320 Commercial SE, Salem, OR 97302', '503-363-5242'],
			['Tualatin Liquor Store', 45.382353, -122.762859, 26, '8101 SW Nyberg Rd, Ste 101 97062', '503-612-9833'],
			['Woodburn Liquor Store', 45.114476, -122.872022, 27, '1519 N Pacific Hwy, Woodburn, OR 97071', '503-981-1227'],
			['Portland Woodstock Liquor Store', 45.479040, -122.616396, 28, '4324 SE Woodstock Blvd, Portland, OR 97206', '503-777-3058']
		];

		var infowindow = new google.maps.InfoWindow();

		var marker, i;
		
		var image = new google.maps.MarkerImage('/wp-content/themes/Vinn/images/map-marker.png',
			new google.maps.Size(20, 32),
			new google.maps.Point(0,0),
			new google.maps.Point(0, 32));
			
		var shadow = new google.maps.MarkerImage('/wp-content/themes/Vinn/images/map-marker-shadow.png',
			new google.maps.Size(37, 32),
			new google.maps.Point(0,0),
			new google.maps.Point(-3, 32));
		
		var infowindow = null;
		
		var infowindow = new google.maps.InfoWindow({
			content: "blank"
		});
		
		for (var i = 0; i < stores.length; i++) {
			var storeInfo = stores[i];
			var myLatLng = new google.maps.LatLng(storeInfo[1], storeInfo[2]);
			var marker = new google.maps.Marker({
			        position: myLatLng,
			        map: map,
							shadow: shadow,
							icon: image,
			        title: storeInfo[0],
			 				zIndex: storeInfo[3],
							html: "<div class='map-infowindow'>" +
										"<h2>" + storeInfo[0] + "</h2>" +
										"<p>" + storeInfo[4] + "</p>" +
										"<p>" + storeInfo[5] + "</p>" +
										"<p> <a href='http://maps.google.com/maps?q=" + storeInfo[4] + "' target='_blank'>Map this Store</a></p>" +
										"</div>"
		   });
		
			google.maps.event.addListener(marker, 'click', function () {
				// where I have added .html to the marker object.
				infowindow.setContent(this.html);
				infowindow.open(map, this);
			});
			
		}
		
		google.maps.event.addListener(map, 'click', function () {
			infowindow.close(map);
		});
				

}

$(function() {
	
	if ($('body').hasClass('page-id-18')) {
		initialize();
	}

});
