var locationsURL = "http://localhost:3000/locations.json"

$(document).ready(function(){
	var newPlots = {
		"<%%= location %>" : {
			latitude: "<%%= latitude %>",
			longitude: "<%%= longitude %>",
			//href: "locations/<% slug %>",
			//tooltip: {content : "<% location %>"}
		}
	};
	$.getJSON(locationsURL).done(function (chapter) { 
		console.log(chapter);
		_.each(chapter, function (plot) {
			console.log(plot);
			//feed coordinates into the variable above

		});
	$(".us_map").trigger("update", newPlots);
	});

 	$(".us_map").mapael({
		map : {
			name : "usa_states",
			cssClass : "map",
			tooltip : {
				cssClass : "mapTooltip" //class name of the tooltip container
			},
			defaultArea : {
				attrs : {
					fill : "#282828",
					stroke: "#9a9a9a",
				},
				attrsHover : {
					fill : "#d8ae64"
				}
			},
			defaultPlot : {
				type : "circle",
				href : "#",
				attrs: {
					fill : "#f95a61"
				}
			},
			eventHandlers: {
				click : function (){
					this.href="locations/26"  
				}
			}
		},
		plots: {
			'nc' : {
				latitude: 35.7806,
				longitude: -78.6389,
				tooltip: {content : "Raleigh-Durham"}
			},	
		}
	});
});


@@ -105,17 +105,16 @@
  %7B%0A%09%09%22%3C%25
-%25
 = locati
@@ -140,17 +140,16 @@
 ude: %22%3C%25
-%25
 = latitu
@@ -173,17 +173,16 @@
 ude: %22%3C%25
-%25
 = longit
@@ -996,10 +996,19 @@
 ons/
-26
+%3C%25= slug %25%3E
 %22  %0A

fix misc typos