diff --git a/js/autocomplete.js b/js/autocomplete.js
index 351c786..4c32827 100644
--- a/js/autocomplete.js
+++ b/js/autocomplete.js
@@ -46,20 +46,53 @@
 					case "search":
 					  // Move camera to desired node
 						cameraGoto(obj[n].x, obj[n].y);
+					  // Close the search box
+					  var searchBox = document.getElementById('searchBox');
+					  searchBox.style.display = "none";
+					  
+					  // Empty the input bar
+					  var searchInput = document.getElementById('searchInput');
+					  searchInput.value = "";
 						break;
-					case "addEdge":
+					case "addEdge":					
 					  // Add an edge between A and B
-					  alert(obj[n].name);
+					  var sourceID = document.getElementById("node-id").innerText.substr(1);
+					  var edgeName = Math.min(sourceID, n) + "_" + Math.max(sourceID, n);
+					  if (!graf.edges[edgeName]) {
+						  graf.edges[edgeName] = {
+							  a: Math.min(sourceID, n),
+							  b: Math.max(sourceID, n),
+							  votes: 1
+						  };
+						  
+						  // Temporary fix, just for testing
+						  s.graph.addEdge({
+							  id: edgeName,
+							  source: sourceID,
+							  target: n,
+							  size: 0.5
+							});
+							
+						  clickNode(s, sourceID, s.graph.neighbors(sourceID));
+						  dialog.max();
+						  
+						  // Give a message of validation
+						  var edgeMSG = document.querySelector("#addedge-msg");
+						  addedEdgeMSG(edgeMSG);
+
+					  } else {
+						  alert("Edge already exists");
+					  }
+									  
+					  // Empty the input bar
+					  var addEdgeInput = document.getElementById('addedge-input');
+					  addEdgeInput.value = "";
+					  
+					  // Return to default view
+					  document.querySelector("#addedge-input").style.display = "none";  
+					  document.querySelector("#edge-list").style.display = "block";
 					  break;
 				  }
-			  
-				  // Close the search box
-				  var searchBox = document.getElementById('searchBox');
-				  searchBox.style.display = "none";
-				  
-				  // Empty the input bar
-				  var searchInput = document.getElementById('searchInput');
-				  searchInput.value = "";
 				  
 				  /*close the list of autocompleted values,
 				  (or any other open lists of autocompleted values:*/
@@ -145,3 +178,22 @@
       closeAllLists(e.target);
   });
 }
+
+function addedEdgeMSG(edgeMSG) {
+  var opacity = 8;
+  edgeMSG.style.display = "block";
+  
+  var opacityChange = window.setInterval(function() {
+	  edgeMSG.style.color = "rgba(0,0,0, "+ opacity/10 +")";
+	  var edgeList = document.querySelector("#edge-list ul");
+	  edgeList.style.backgroundColor = "rgba(0,200,0, "+ opacity/10 +")";
+	  --opacity;
+	  console.log(opacity);
+	}, 100);
+	
+  var backToDef = window.setTimeout(function() {
+	  edgeMSG.style.display = "none";
+	  edgeMSG.style.color = "black";
+	  window.clearInterval(opacityChange);
+	}, 1000);
+}
\ No newline at end of file
diff --git a/js/modal.js b/js/modal.js
index 4138fde..179e936 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -9,6 +9,7 @@
 
 // When the user clicks the button, open the box 
 searchButton.onclick = function() {
+	dialog.close();
     searchBox.style.display = "block";
 	// Focus on the search input bar
 	document.getElementById("searchInput").focus();
diff --git a/js/script.js b/js/script.js
index 5d7a5e4..6fcf868 100644
--- a/js/script.js
+++ b/js/script.js
@@ -63,6 +63,7 @@
 
     s.graph.nodes().forEach(function(n) {
       n.color = n.originalColor;
+	  n.label = n.originalLabel;
     });
 
     s.graph.edges().forEach(function(e) {
@@ -78,6 +79,13 @@
   min: function() {
     document.querySelector("#dialog").style.display = "none";
     document.querySelector("#summary-dialog").style.display = "block";
+  },
+  addEdge: function() {
+	document.querySelector("#addedge-input").style.display = "block";  
+	document.querySelector("#edge-list").style.display = "none";
+	autocomplete(document.getElementById("addedge-input"), graf.nodes, "addEdge");
+	// Focus on the addEdge input bar
+	document.getElementById("addedge-input").focus();
   }
 };
 
@@ -122,6 +130,7 @@
         s.graph.addNode({
           id: graf.nodes[i].id,
           label: graf.nodes[i].name,
+		  originalLabel: graf.nodes[i].name,
           x: graf.nodes[i].x,
           y: graf.nodes[i].y,
           size: 10,
@@ -143,32 +152,14 @@
         var nodeId = e.data.node.id,
             toKeep = s.graph.neighbors(nodeId);
         //toKeep[nodeId] = e.data.node;
-
-        s.graph.nodes().forEach(function(n) {
-          if (toKeep[n.id] || n.id == nodeId) {
-            n.color = n.originalColor;
-          } else {
-            n.color = '#333';
-          }
-        });
-
-        s.graph.edges().forEach(function(e) {
-          if ((e.source == nodeId || e.target == nodeId) && (toKeep[e.source] || toKeep[e.target])) {
-            e.color = '#fff';
-          } else {
-            e.color = '#333';
-          }
-        });
-
-        s.refresh();
-
-        dialog.show(nodeId, toKeep);
+		clickNode(s, nodeId, toKeep);
       });
 
       document.querySelector("#quit-dialog").addEventListener("click", dialog.close);
       document.querySelector("#quit2-dialog").addEventListener("click", dialog.close);
       document.querySelector("#max-dialog").addEventListener("click", dialog.max);
       document.querySelector("#min-dialog").addEventListener("click", dialog.min);
+	  document.querySelector("#addedge-button").addEventListener("click", dialog.addEdge);
 
       document.querySelector("#zoomin").addEventListener("click", function() {
         s.camera.goTo({
@@ -194,4 +185,29 @@
 	);
 }
 
+function clickNode(s, nodeId, toKeep) {
+	s.graph.nodes().forEach(function(n) {
+          if (toKeep[n.id] || n.id == nodeId) {
+            n.color = n.originalColor;
+			n.label = n.originalLabel;
+			console.log("Hola");
+          } else {
+            n.color = '#333';
+			n.label = '';
+          }
+        });
+
+        s.graph.edges().forEach(function(e) {
+          if ((e.source == nodeId || e.target == nodeId) && (toKeep[e.source] || toKeep[e.target])) {
+            e.color = '#fff';
+          } else {
+            e.color = '#333';
+          }
+        });
+
+        s.refresh();
+
+        dialog.show(nodeId, toKeep);
+}
+
 window.addEventListener("load", init);
