+ return t;\r
+ };\r
+\r
+ indexdata.Selector.mouseup = function(){\r
+ var text = indexdata.Selector.getSelected();\r
+ if(text != ''){\r
+ if (indexdata.Selector.debug) {\r
+ alert("You selected:\n" + text);\r
+ }\r
+ indexdata.Selector.mkws(text);\r
+ }\r
+ };\r
+\r
+ indexdata.Selector.mkws = function(query) {\r
+ if ( query != "" && ! indexdata.Selector.clicking ) {\r
+ // no recursive calls\r
+ indexdata.Selector.clicking = true;\r
+\r
+ $(".mkws-reference").show();\r
+ $("input.mkws-query").val(query);\r
+ $(".search-query").text(query);\r
+ $("input.mkws-button").trigger("click");\r
+ indexdata.Selector.clicking = false;\r
+ }\r
+ };\r
+\r
+ $(document).ready(function(){\r
+ $(document).bind("mouseup", indexdata.Selector.mouseup);\r
+ });\r
+\r
+ </script>\r