Index: /trunk/FACT++/www/viewer/index.js
===================================================================
--- /trunk/FACT++/www/viewer/index.js	(revision 17774)
+++ /trunk/FACT++/www/viewer/index.js	(revision 17775)
@@ -311,5 +311,5 @@
 
     setupAccordion('#accordion2', '#cameracontainer');
-    setupAccordion('#accordion7', '#histcontainer');
+    setupAccordion('#accordion7', '#histcontainer', true);
     setupAccordion('#accordion3', '#waveformcontainer');
     setupAccordion('#accordion4', '#helpcontainer', true);
@@ -400,4 +400,21 @@
     plot.draw();
     plot.clearSelection();
+}
+
+function onPlotHover(event, pos, item)
+{
+    if (!item)
+    {
+        $("#tooltip").fadeOut(100);
+        return;
+    }
+
+    var x = item.datapoint[0].toFixed(2);
+    var y = item.datapoint[1].toFixed(2);
+
+    var tooltip = $("#tooltip");
+    tooltip.html(parseInt(x) + " / " + y);
+    tooltip.css({top: item.pageY-20, left: item.pageX+5});
+    tooltip.fadeIn(200);
 }
 
@@ -438,22 +455,5 @@
 
     var hist = $.plot("#hist"+n, [ { data:bins, bars: {show:true} } ], opts);
-    $('#hist'+n).bind("plothover", function (event, pos, item)
-                      {
-                          if (!item)
-                          {
-                              $("#tooltip").fadeOut(100);
-                              return;
-                          }
-
-                          var x = item.datapoint[0].toFixed(2);
-                          var y = item.datapoint[1].toFixed(2);
-
-                          var tooltip = $("#tooltip");
-                          tooltip.html(parseInt(x) + " / " + y);
-                          tooltip.css({top: item.pageY-20, left: item.pageX+5});
-                          tooltip.fadeIn(200);
-                      });
-
-
+    $('#hist'+n).bind("plothover", onPlotHover);
 }
 
@@ -702,22 +702,6 @@
                               setZoom(waveform.xmin-1, waveform.xmax+1, waveform.ymin-5, waveform.ymax+5);
                           });
-        waveform.bind("plothover", function (event, pos, item)
-                      {
-                          if (!item)
-                          {
-                              $("#tooltip").fadeOut(100);
-                              return;
-                          }
-
-                          var x = item.datapoint[0].toFixed(2);
-                          var y = item.datapoint[1].toFixed(2);
-
-                          var tooltip = $("#tooltip");
-                          tooltip.html(parseInt(x) + " / " + y+"  "+item.series.label);
-                          tooltip.css({top: item.pageY-20, left: item.pageX+5});
-                          tooltip.fadeIn(200);
-                      });
-    }
-
+        waveform.bind("plothover", onPlotHover);
+    }
 }
 
