Integration fixes for result panel and initialization

Change-Id: Iab18de4e8268aaac001f6d8fa12a6e74552dfc8f
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index f7a136c..21887f3 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -116,7 +116,7 @@
     var matchCount = 0;
 
     for (matchCount = 0; matchCount < inactiveLi.length; matchCount++) {
-      inactiveLi[i].addEventListener('click', function (e) {
+      inactiveLi[matchCount].addEventListener('click', function (e) {
         if (this._match !== undefined)
           this._match.open();
         else {