w2v-server: use vcs for KorAP queries
diff --git a/templates/index.html.ep b/templates/index.html.ep
index 139ada8..c5d993c 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -34,6 +34,12 @@
      if (plainTitle.match(/-en/)) {
        korapPath="/instance/english";
      }
+     var korapVC="";
+     if (plainTitle.match(/WUDD/i)) {
+       korapVC="&collection=corpusSigle+%3D+%2FW%5BDU%5DD17%2F";
+       korapPath="/instance/test";
+     }
+     
      $(document).ready(function() {
 
        $('#firstable').hide();
@@ -99,7 +105,7 @@
          for (var i=0, l=txt.length; i<l; i++) {
            newText += (i == 5 ? txt.charAt(i) : '<a href="http://korap.ids-mannheim.de' + korapPath + '/?ql=cosmas2&q=' +
                                                 CIIsearchWords + ' /' +  (i > 5? '%2B' : '-') + 'w' +
-                                                Math.abs(i-5) + ':' +  Math.abs(i-5) + ' ' + word +
+                                                Math.abs(i-5) + ':' +  Math.abs(i-5) + ' ' + word + korapVC +
                                                 '" target="korap"><span style="background-color:' +
                                                 getHeatColor(heat[i]/maxHeat)+'">'+txt.charAt(i)+'</span></a>');
          }
@@ -182,7 +188,9 @@
        var collocatorData = <%= b(Mojo::JSON::to_json($collocators)) %>;
        var maxHeat; // = Math.max.apply(Math,collocatorData.map(function(o){return o.cprob;}))
 
-       vocabDistanceTable = makeVocabDistanceTable("#vocabdistt", baseURL);
+       if(data.mergedEnd > 0) {
+          vocabDistanceTable = makeVocabDistanceTable("#vocabdistt", baseURL);
+       }
 
        if (collocatorData != null) {
          maxHeat = Math.max.apply(Math,collocatorData.map(function(o){return Math.max.apply(Math,o.heat);}))
@@ -445,8 +453,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) + ")";
           });
      }
 
@@ -456,8 +464,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;
@@ -665,11 +673,11 @@
      }
 
      function queryKorAP() {
-       window.open('http://korap.ids-mannheim.de' + korapPath + '?q='+queryword.value, 'KorAP');
+       window.open('http://korap.ids-mannheim.de' + korapPath + '?q='+queryword.value+korapVC, 'KorAP');
      }
 
      function queryKorAPCII(query) {
-       window.open('http://korap.ids-mannheim.de' +korapPath + '?ql=cosmas2&q='+query, 'KorAP');
+       window.open('http://korap.ids-mannheim.de' +korapPath + '?ql=cosmas2&q='+query+korapVC, 'KorAP');
      }
     </script>
   </head>