Tweak CSS, fix search block.
[mkdru-moved-to-drupal.org.git] / mkdru.client.js
index 216ad20..03f9507 100644 (file)
@@ -39,6 +39,9 @@ var mkdru = {
 
 
 
+// Wrapper for jQuery
+(function ($) {
+
 // So we can use jQuery BBQ with Drupal 6 and its 1.2.6 jQuery
 if (!$.isArray) $.isArray = function(obj) {
   return Object.prototype.toString.call(obj) === "[object Array]";
@@ -193,7 +196,7 @@ mkdru.hashChange = function () {
   else {
     // may need to run search again to limit targets
     for (key in mkdru.state) {
-      if (key.substring(0,5) === 'limit') {
+      if (key.substring(0,5) === 'limit' && mkdru.state[key]) {
         mkdru.search();
         break;
       }
@@ -362,3 +365,4 @@ $(document).ready(function () {
     );
   }
 });
+})(jQuery);
\ No newline at end of file