var g = {
	nodes: [
		 {
		   "id": "n0",
		   "label": "CTPs",
		   "x": -1,
		   "y": 0,
		   "size": 2
		 },
		 {
		   "id": "n1",
		   "label": "Community/NFIP/Mayor",
		   "x": 1,
		   "y": 0,
		   "size": 2
		 },
		 {
		   "id": "n2",
		   "label": "FEMA",
		   "x": 0,
		   "y": 1,
		   "size": 2
		 },
		 {
		   "id": "n3",
		   "label": "PMR",
		   "x": 0,
		   "y": 2,
		   "size": 2
		 },
		 {
		   "id": "n4",
		   "label": "LOMR",
		   "x": 1,
		   "y": 1,
		   "size": 2
		 },
		 {
		   "id": "n5",
		   "label": "Report",
		   "x": 1,
		   "y": 2,
		   "size": 2
		 },
		 {
		   "id": "n6",
		   "label": "Community input",
		   "x": -2,
		   "y": 2.5,
		   "size": 2
		 },
		 {
		   "id": "n7",
		   "label": "Revised map",
		   "x": 0,
		   "y": 3,
		   "size": 2
		 },
		 {
		   "id": "n8",
		   "label": "Data viewer",
		   "x": 0,
		   "y": 4,
		   "size": 2
		 }
		],
	edges:
		[
		 {
		   "id": "e0",
		   "source": "n0",
		   "target": "n2",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "Community Technical Partners (CTPs) - for example, private firms or universities with the technical capability to undertake flood risk modelling - can initiate a map revision process. In such cases, FEMA awards the CTP a grant to undertake the modelling. The CTP then turns over the results to FEMA."
		 },
		 {
		   "id": "e1",
		   "source": "n1",
		   "target": "n2",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "The CEO of a community (i.e., a city's mayor) can initiate a map revision process by petitioning FEMA. FEMA then evaluates if the requested revision is necessary."
		 },
		 {
		   "id": "e2",
		   "source": "n2",
		   "target": "n2",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "FEMA initiatives map revision processes on a regular basis around the country. However, what \"regular basis\" means is not defined and some communities have flood maps that are decades old."
		 },
		 {
		   "id": "e3",
		   "source": "n2",
		   "target": "n3",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "After receiving a request, FEMA can undertake a Physical Map Revision (PMR), a revision of the map panel -- the official map document showing flood risk."
		 },
		 {
		   "id": "e4",
		   "source": "n2",
		   "target": "n4",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "After receiving a request, FEMA can choose not to revise the map panel with a Physical Map Revision and instead modify the accompanying notes through a Letter of Map Revision (LOMR). In this case, the map panel does not reflect FEMA's flood risk assessment or who is required to purchase insurance until the next Physical Map Revision."
		 },
		 {
		   "id": "e5",
		   "source": "n4",
		   "target": "n5",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "The LOMR process results in a report of alterations that accompanies the map panels."
		 },
		 {
		   "id": "e6",
		   "source": "n5",
		   "target": "n3",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "A LOMR report is used to modify the map panel during the subsequent Physical Map Revision process."
		 },
		 {
		   "id": "e7",
		   "source": "n3",
		   "target": "n7",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "A Physical Map Revision (PMR) produces a new map panel of flood risk in the area."
		 },
		 {
		   "id": "e8",
		   "source": "n6",
		   "target": "n7",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "The PMR process takes longer than LOMR because it includes a process to solicit community input on the new map."
		 },
		 {
		   "id": "e9",
		   "source": "n7",
		   "target": "n8",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "FEMA map panels are accessible through their online data viewer as well as other data providers such as MassGIS."
		 }]
	};
	
var s = new sigma({
  graph: g,
  renderer: {
    container: document.getElementById('sigma-fema-container'),
    type: 'canvas'
  },
  settings: {   
      minEdgeSize: 0.5,
		maxEdgeSize: 4,
	  enableEdgeHovering: true,
	  defaultEdgeHoverColor: '#ff0000',
	  edgeHoverColor: 'edge',
	  edgeHoverSizeRatio: 1.5,
	  edgeHoverExtremities: true,
	  nodeHoverColor: 'node',
	  enableCamera:false,
	  sideMargin: 1,
	  minZoom: 3,
	  mouseWheelEnabled: false
 
	}
});

	
s.bind('overEdge outEdge', function(e) {
  document.getElementById("fema-caption").innerHTML = e.data.edge.caption;
  });