-// Set up namespace and some state.
-var mkws = {
- sort: 'relevance',
- authenticated: false,
- filters: []
-};
-
-// Define empty mkws_config for simple applications that don't define it.
-if (!mkws_config)
- var mkws_config = {};
-
-// wrapper for jQuery lib
-function _mkws($) {
- // if (console && console.log) console.log("run _mkws()");
-
- // call this function only once
- if (mkws.init) return;
-
-mkws.locale_lang = {
- "de": {
- "Authors": "Autoren",
- "Subjects": "Schlagwörter",
- "Sources": "Daten und Quellen",
- "Termlists": "Termlisten",
- "Next": "Weiter",
- "Prev": "Zurück",
- "Search": "Suche",
- "Sort by": "Sortieren nach",
- "and show": "und zeige",
- "per page": "pro Seite",
- "Displaying": "Zeige",
- "to": "von",
- "of": "aus",
- "found": "gefunden",
- "Title": "Titel",
- "Author": "Autor",
- "Date": "Datum",
- "Subject": "Schlagwort",
- "Location": "Ort",
- // ### to add: Records, Targets
-
- "dummy": "dummy"
- },
-
- "da": {
- "Authors": "Forfattere",
- "Subjects": "Emner",
- "Sources": "Kilder",
- "Termlists": "Termlists",
- "Next": "Næste",
- "Prev": "Forrige",
- "Search": "Søg",
- "Sort by": "Sorter efter",
- "and show": "og vis",
- "per page": "per side",
- "Displaying": "Viser",
- "to": "til",
- "of": "ud af",
- "found": "fandt",
- "Title": "Title",
- "Author": "Forfatter",
- "Date": "Dato",
- "Subject": "Emneord",
- "Location": "Lokation",
- // ### to add: Records, Targets
-
- "dummy": "dummy"
- }
-};
-
-// keep time state for debugging
-mkws.debug_time = {
- "start": $.now(),
- "last": $.now()
-};
-
-mkws.debug_function = function (string) {
- if (!mkws.debug_level)
- return;
-
- if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */
- return;
- }
-
- var now = $.now();
- var timestamp = (now - mkws.debug_time.start)/1000 + " (+" + (now - mkws.debug_time.last)/1000 + ") "
- mkws.debug_time.last = now;
-
- // you need to disable use strict at the top of the file!!!
- if (mkws.debug_level >= 3) {
- console.log(timestamp + arguments.callee.caller);
- } else if (mkws.debug_level >= 2) {
- console.log(timestamp + ">>> called from function " + arguments.callee.caller.name + ' <<<');
- }
- console.log(timestamp + string);
-}
-var debug = mkws.debug_function; // local alias
-debug("start running MKWS");
-