derecovecs: start moving javascript to separate file
diff --git a/js/derekovcs.js b/js/derekovcs.js
new file mode 100644
index 0000000..d2ed5b5
--- /dev/null
+++ b/js/derekovcs.js
@@ -0,0 +1,16 @@
+function queryKorAPpoliqarp(query) {
+    window.open('http://korap.ids-mannheim.de/kalamar/?ql=poliqarp&q='+encodeURIComponent(query), 'KorAP');
+}
+
+
+function queryKorAPalternatives(alt1, alt2) {
+    queryKorAPpoliqarp("{1:[orth="+ alt1 +"]} | {2:[orth=" + alt2 +"]}");
+}
+
+function paradigmatorClick(e, target, paradigmator) {
+    if (e.which === 2) {
+        e.preventDefault();
+        queryKorAPalternatives(target, paradigmator);
+        return false;
+    }
+}
diff --git a/templates/index.html.ep b/templates/index.html.ep
index a649811..9acc7a1 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -643,6 +643,7 @@
        color: #999999;
      }
     </style>
+    <script src="/derekovecs/js/derekovcs.js"></script>
     <script>
 
      var opt = {epsilon: <%= $epsilon %>, perplexity: <%= $perplexity %>},