diff --git a/includes/jquery.drilldown.js b/includes/jquery.drilldown.js
index cdac64d361d3d8613ea137754bbfb6906ed0822f..be5b5d5fd3f99af7aef0bc68bface03f65a1c709 100644
--- a/includes/jquery.drilldown.js
+++ b/includes/jquery.drilldown.js
@@ -85,11 +85,16 @@
               // We don't use the $().clone() method here because of an
               // IE & jQuery 1.2 bug.
               var clone = $('<a></a>')
-                .attr('href', $(breadcrumb[key]).attr('href'))
-                .attr('class', $(breadcrumb[key]).attr('class'))
-                .html($(breadcrumb[key]).html())
-                .addClass('depth-'+key)
-                .appendTo(trail);
+                .html($(breadcrumb[key]).html());
+
+                // We don't chain $().attr() method since it may return
+                // undefined in jQuery 1.6+.
+                clone.attr({
+                  'href': $(breadcrumb[key]).attr('href'),
+                  'class': (('depth-'+key)+' '+$(breadcrumb[key]).attr('class'))
+                });
+
+                trail.append(clone);
 
               // We add a reference to the original link and a click handler
               // that traces back to that instance to set as the active link.
@@ -122,9 +127,9 @@
           // Set initial active menu state.
           var activeLink;
           $('ul.menu a', menu).removeClass('active');
-          if (settings.activePath && $('ul.menu a[href='+settings.activePath+']', menu).size() > 0) {
+          if (settings.activePath && $('ul.menu a[href="'+settings.activePath+'"]', menu).size() > 0) {
             this.activePath = settings.activePath;
-            activeLink = $('ul.menu a[href='+settings.activePath+']', menu).addClass('active');
+            activeLink = $('ul.menu a[href="'+settings.activePath+'"]', menu).addClass('active');
           }
           if (!activeLink) {
             activeLink = $('ul.menu a.active', menu).size() ? $('ul.menu a.active', menu) : $('ul.menu > li > a', menu);
@@ -145,7 +150,7 @@
               }
               else {
                 var url = $(this).children('a').attr('href');
-                var activeLink = $('ul.menu a[href='+url+']', menu);
+                var activeLink = $('ul.menu a[href="'+url+'"]', menu);
                 menu.drilldown('setActive', {
                   activeLink: activeLink,
                   trail: settings.trail,
