derekovecs: add option to hide details
diff --git a/templates/index.html.ep b/templates/index.html.ep
index cb833ea..d818149 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -233,12 +233,12 @@
              //                      { "data": "pos", width: "7%", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitvec2window(data, row.heat, row.word) }},
              { "data": "llr",  render: function ( data, type, row ) {return data.toFixed(0) }},
              { "data": "lfmd", render: function ( data, type, row ) {return data.toFixed(1) }},
-//             { "data": "fpmi", type: "scientific", render: function ( data, type, row ) {return data.toExponential(2) }  },
+             //             { "data": "fpmi", type: "scientific", render: function ( data, type, row ) {return data.toExponential(2) }  },
              { "data": "npmi", render: function ( data, type, row ) {return data.toFixed(2) }},
-             { "data": "llfmd", render: function ( data, type, row ) {return data.toFixed(1) }},
-             { "data": "rlfmd", render: function ( data, type, row ) {return data.toFixed(1) }},
-             { "data": "lnpmi", render: function ( data, type, row ) {return data.toFixed(2) }},
-             { "data": "rnpmi", render: function ( data, type, row ) {return data.toFixed(2) }},
+             { "data": "llfmd", class: "detail", render: function ( data, type, row ) {return data.toFixed(1) }},
+             { "data": "rlfmd", class: "detail", render: function ( data, type, row ) {return data.toFixed(1) }},
+             { "data": "lnpmi", class: "detail", render: function ( data, type, row ) {return data.toFixed(2) }},
+             { "data": "rnpmi", class: "detail", render: function ( data, type, row ) {return data.toFixed(2) }},
              { "data": "f" },
              { "data": "word",  sClass: "collocator" }
            ],
@@ -257,135 +257,145 @@
            "order": [[ 1, 'desc' ]],
          });
 
-         $("td.collocator").click(function(){
-           queryKorAPCII(this.textContent + " /w5 " + CIIsearchWords);
+
+         $('#show-details').change(function (e) {
+           var columns = classicCollocatorTable.columns(".detail");
+           if(this.checked) {
+             columns.visible(true);
+           } else {
+             columns.visible(false);
+           }
+         } );
+
+           $("td.collocator").click(function(){
+             queryKorAPCII(this.textContent + " /w5 " + CIIsearchWords);
+           });
+
+           collocatorTable.on( 'order.dt search.dt', function () {
+             collocatorTable.column(0, {order:'applied'}).nodes().each( function (cell, i) {
+               cell.innerHTML = i+1;
+             } );
+           }).draw();
+         }
+
+         if (localStorage && !window.location.hash) { // let's not crash if some user has IE7
+           var index = parseInt(localStorage['tab']||'0');
+           $("#tabs").tabs({ active: index });
+         }
+         $("#tabs").css("visibility", "visible"); // now we can show the tabs
+       });
+
+       $(function(){
+         $("#dropdownoptions").dialog({
+           title: "Options",
+           autoOpen: false,
+           modal: false,
+           draggable: false,
+           height: "auto",
+           width: "auto",
+           resizable: false,
+           buttons: {
+             "Cancel": function() {
+               $( this ).dialog( "close" );
+             },
+             "Apply": function() {
+               window.open($(location).attr('pathname')+'?'+$('form').serialize(), "_self");
+             }
+           }
          });
+       });
 
-         collocatorTable.on( 'order.dt search.dt', function () {
-           collocatorTable.column(0, {order:'applied'}).nodes().each( function (cell, i) {
-             cell.innerHTML = i+1;
-           } );
-         }).draw();
-       }
+       $(function(){
+         $("#showoptions").click(function(){
+           $("#dropdownoptions").dialog("open");
+           var target = $(this);
+           $("#dropdownoptions").dialog("widget").position({
+             my: 'left bottom',
+             at: 'left bottom',
+             of: target
+           });
+         });
+       });
 
-       if (localStorage && !window.location.hash) { // let's not crash if some user has IE7
-         var index = parseInt(localStorage['tab']||'0');
-         $("#tabs").tabs({ active: index });
-       }
-       $("#tabs").css("visibility", "visible"); // now we can show the tabs
-     });
+       $( function() {
+         $( "#no_iterations" ).spinner({
+           spin: function( event, ui ) {
+             if ( ui.value < 1000 ) {
+               $( this ).spinner( "value", 1000 );
+               return false;
+             } else if ( ui.value > 10000 ) {
+               $( this ).spinner( "value", 10000 );
+               return false;
+             }
+           }
+         });
+       } );
 
-     $(function(){
-       $("#dropdownoptions").dialog({
-         title: "Options",
-         autoOpen: false,
-         modal: false,
-         draggable: false,
-         height: "auto",
-         width: "auto",
-         resizable: false,
-         buttons: {
-           "Cancel": function() {
-             $( this ).dialog( "close" );
+       $( function() {
+         $( "#neighbours" ).spinner({
+           spin: function( event, ui ) {
+             if ( ui.value < 0 ) {
+               $( this ).spinner( "value", 0 );
+               return false;
+             } else if ( ui.value > 200 ) {
+               $( this ).spinner( "value", 200 );
+               return false;
+             }
+           }
+         });
+       } );
+
+       $( function() {
+         $( "#cutoff" ).spinner({
+           spin: function( event, ui ) {
+             if ( ui.value < 100000 ) {
+               $( this ).spinner( "value", 100000 );
+               return false;
+             } else if ( ui.value > 2000000 ) {
+               $( this ).spinner( "value", 2000000 );
+               return false;
+             }
+           }
+         });
+       } );
+
+       $( function() {
+         $( "#tabs" ).tabs().addClass('tabs-min');
+       } );
+
+       $( function() {
+         $( ".controlgroup-vertical" ).controlgroup({
+           "direction": "vertical"
+         });
+       } );
+
+       $(function() {
+         $( document ).tooltip({
+           content: function() {
+             return $(this).attr('title');
+           }}
+         )
+       });
+
+       $(function () {
+         $(document).tooltip({
+           content: function () {
+             return $(this).prop('title');
            },
-           "Apply": function() {
-             window.open($(location).attr('pathname')+'?'+$('form').serialize(), "_self");
+           show: null, 
+           close: function (event, ui) {
+             ui.tooltip.hover(
+               function () {
+                 $(this).stop(true).fadeTo(400, 1);
+               },    
+               function () {
+                 $(this).fadeOut("400", function () {
+                   $(this).remove();
+                 })
+               });
            }
-         }
-       });
-     });
-
-     $(function(){
-       $("#showoptions").click(function(){
-         $("#dropdownoptions").dialog("open");
-         var target = $(this);
-         $("#dropdownoptions").dialog("widget").position({
-           my: 'left bottom',
-           at: 'left bottom',
-           of: target
          });
        });
-     });
-
-     $( function() {
-       $( "#no_iterations" ).spinner({
-         spin: function( event, ui ) {
-           if ( ui.value < 1000 ) {
-             $( this ).spinner( "value", 1000 );
-             return false;
-           } else if ( ui.value > 10000 ) {
-             $( this ).spinner( "value", 10000 );
-             return false;
-           }
-         }
-       });
-     } );
-
-     $( function() {
-       $( "#neighbours" ).spinner({
-         spin: function( event, ui ) {
-           if ( ui.value < 0 ) {
-             $( this ).spinner( "value", 0 );
-             return false;
-           } else if ( ui.value > 200 ) {
-             $( this ).spinner( "value", 200 );
-             return false;
-           }
-         }
-       });
-     } );
-
-     $( function() {
-       $( "#cutoff" ).spinner({
-         spin: function( event, ui ) {
-           if ( ui.value < 100000 ) {
-             $( this ).spinner( "value", 100000 );
-             return false;
-           } else if ( ui.value > 2000000 ) {
-             $( this ).spinner( "value", 2000000 );
-             return false;
-           }
-         }
-       });
-     } );
-
-     $( function() {
-       $( "#tabs" ).tabs().addClass('tabs-min');
-     } );
-
-     $( function() {
-       $( ".controlgroup-vertical" ).controlgroup({
-         "direction": "vertical"
-       });
-     } );
-
-     $(function() {
-       $( document ).tooltip({
-         content: function() {
-           return $(this).attr('title');
-         }}
-       )
-     });
-
-     $(function () {
-       $(document).tooltip({
-         content: function () {
-           return $(this).prop('title');
-         },
-         show: null, 
-         close: function (event, ui) {
-           ui.tooltip.hover(
-             function () {
-               $(this).stop(true).fadeTo(400, 1);
-             },    
-             function () {
-               $(this).fadeOut("400", function () {
-                 $(this).remove();
-               })
-             });
-         }
-       });
-     });
     </script>
     <script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
     <script src="/derekovecs/js/tsne.js"></script>
@@ -642,8 +652,8 @@
             T.Y[i][0] = (d.x - mapWidth/2 - tx)/ss/20;
             T.Y[i][1] = (d.y - mapHeight/2 - ty)/ss/20;
             return "translate(" +
-                                                      (d.x) + "," +
-                                                      (d.y) + ")";
+                                                        (d.x) + "," +
+                                                        (d.y) + ")";
           });
      }
 
@@ -653,8 +663,8 @@
           .data(data.words)
           .attr("transform", function(d, i) {
             return "translate(" +
-                                                       ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
-                                                       ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
+                                                         ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
+                                                         ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
      }
 
      var svg;
@@ -891,6 +901,10 @@
                 </select>
               % }
               <input type="button" value="→ KorAP" onclick="queryKorAP();" title="query word with KorAP"/>
+              <input id="show-details" type="checkbox" name="show-details" value="1" >
+              <label for="show-details">
+                Show details
+              </label>
             </div>
           </form>
         </div>
@@ -1018,7 +1032,7 @@
                     <th title="raw max frequency of collocation within window">raw</th>
                     <th>collocator</th>
                   </tr>
-                  % }
+                % }
               </thead>
               <tbody>
                 <tr>