Minor fixes for chrome compatibility
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 2eb7a7c..5d18d45 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -115,13 +115,16 @@
 
 %= javascript begin
 
-$("ol > li:not(.active)").on("click", function () {
+$("#search > ol > li:not(.active)").on("click", function (e) {
   $(this).addClass('active');
+  e.stopPropagation();
 });
 
-function closeSnippet (o) {
-  $(o.parentNode.parentNode).removeClass('active');
-};
+$("#search > ol > li:not(.active) > ul > li.close").on("click", function (e) {
+  $(this.parentNode.parentNode).removeClass('active');
+  e.stopPropagation();
+});
+
 
 function showTable (o) {
   var match = o.parentNode.parentNode;
@@ -137,9 +140,9 @@
   };
 
   var corpusID = match.getAttribute('data-corpus-id');
-  var docID = match.getAttribute('data-doc-id');
-  var matchID = match.getAttribute('data-match-id');
-  var url = '/corpus/' + corpusID + '/' + docID + '/' + matchID;
+  var docID    = match.getAttribute('data-doc-id');
+  var matchID  = match.getAttribute('data-match-id');
+  var url      = '/corpus/' + corpusID + '/' + docID + '/' + matchID;
   var snippet;
 
   jQuery.getJSON(url, function (res) {
@@ -169,7 +172,7 @@
   closeTutorial();
 };
 
-$("code.query.serial,#sidebar").on("click", function () {
+$("code.query.serial, #sidebar").on("click", function () {
   $(this).toggleClass('active');
 });