Index: misc/teaser.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/teaser.js,v
retrieving revision 1.14
diff -u -r1.14 teaser.js
--- misc/teaser.js	29 Oct 2008 10:01:26 -0000	1.14
+++ misc/teaser.js	19 Jan 2009 00:32:17 -0000
@@ -6,7 +6,7 @@
  * Note: depends on resizable textareas.
  */
 Drupal.behaviors.teaser = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // This breaks in Konqueror. Prevent it from running.
     if (/KDE/.test(navigator.vendor)) {
       return;
@@ -16,8 +16,8 @@
       var teaser = $(this).addClass('teaser-processed');
 
       // Move teaser textarea before body, and remove its form-item wrapper.
-      var body = $('#'+ Drupal.settings.teaser[this.id]);
-      var checkbox = $('#'+ Drupal.settings.teaserCheckbox[this.id]).parent();
+      var body = $('#'+ settings.teaser[this.id]);
+      var checkbox = $('#'+ settings.teaserCheckbox[this.id]).parent();
       var checked = $(checkbox).children('input').attr('checked') ? true : false;
       var parent = teaser[0].parentNode;
       $(body).before(teaser);
Index: misc/batch.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/batch.js,v
retrieving revision 1.5
diff -u -r1.5 batch.js
--- misc/batch.js	29 Oct 2008 10:01:26 -0000	1.5
+++ misc/batch.js	19 Jan 2009 00:32:16 -0000
@@ -4,16 +4,16 @@
  * Attaches the batch behavior to progress bars.
  */
 Drupal.behaviors.batch = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // This behavior attaches by ID, so is only valid once on a page.
     if ($('#progress.batch-processed').size()) {
       return;
     }
     $('#progress', context).addClass('batch-processed').each(function () {
       var holder = this;
-      var uri = Drupal.settings.batch.uri;
-      var initMessage = Drupal.settings.batch.initMessage;
-      var errorMessage = Drupal.settings.batch.errorMessage;
+      var uri = settings.batch.uri;
+      var initMessage = settings.batch.initMessage;
+      var errorMessage = settings.batch.errorMessage;
 
       // Success: redirect to the summary.
       var updateCallback = function (progress, status, pb) {
Index: misc/collapse.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/collapse.js,v
retrieving revision 1.18
diff -u -r1.18 collapse.js
--- misc/collapse.js	29 Oct 2008 10:01:26 -0000	1.18
+++ misc/collapse.js	19 Jan 2009 00:32:16 -0000
@@ -51,7 +51,7 @@
 };
 
 Drupal.behaviors.collapse = {
-  attach: function(context) {
+  attach: function(context, settings) {
     $('fieldset.collapsible > legend:not(.collapse-processed)', context).each(function() {
       var fieldset = $(this.parentNode);
       // Expand if there are errors inside
Index: misc/tabledrag.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tabledrag.js,v
retrieving revision 1.22
diff -u -r1.22 tabledrag.js
--- misc/tabledrag.js	30 Dec 2008 16:43:15 -0000	1.22
+++ misc/tabledrag.js	19 Jan 2009 00:32:17 -0000
@@ -12,10 +12,10 @@
  * See blocks.js for an example of adding additional functionality to tableDrag.
  */
 Drupal.behaviors.tableDrag = {
-  attach: function(context) {
-    for (var base in Drupal.settings.tableDrag) {
+  attach: function(context, settings) {
+    for (var base in settings.tableDrag) {
       if (!$('#' + base + '.tabledrag-processed', context).size()) {
-        var tableSettings = Drupal.settings.tableDrag[base];
+        var tableSettings = settings.tableDrag[base];
 
         $('#' + base).filter(':not(.tabledrag-processed)').each(function() {
           // Create the new tableDrag instance. Save in the Drupal variable
Index: misc/ahah.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ahah.js,v
retrieving revision 1.9
diff -u -r1.9 ahah.js
--- misc/ahah.js	29 Oct 2008 10:01:26 -0000	1.9
+++ misc/ahah.js	19 Jan 2009 00:32:16 -0000
@@ -16,10 +16,10 @@
  * Attaches the ahah behavior to each ahah form element.
  */
 Drupal.behaviors.ahah = {
-  attach: function(context) {
-    for (var base in Drupal.settings.ahah) {
+  attach: function(context, settings) {
+    for (var base in settings.ahah) {
       if (!$('#'+ base + '.ahah-processed').size()) {
-        var element_settings = Drupal.settings.ahah[base];
+        var element_settings = settings.ahah[base];
 
         $(element_settings.selector).each(function() {
           element_settings.element = this;
Index: misc/autocomplete.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/autocomplete.js,v
retrieving revision 1.25
diff -u -r1.25 autocomplete.js
--- misc/autocomplete.js	29 Oct 2008 10:01:26 -0000	1.25
+++ misc/autocomplete.js	19 Jan 2009 00:32:16 -0000
@@ -4,7 +4,7 @@
  * Attaches the autocomplete behavior to all required fields.
  */
 Drupal.behaviors.autocomplete = {
-  attach: function(context) {
+  attach: function(context, settings) {
     var acdb = [];
     $('input.autocomplete:not(.autocomplete-processed)', context).each(function () {
       var uri = this.value;
Index: misc/tableselect.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tableselect.js,v
retrieving revision 1.9
diff -u -r1.9 tableselect.js
--- misc/tableselect.js	29 Oct 2008 10:01:26 -0000	1.9
+++ misc/tableselect.js	19 Jan 2009 00:32:17 -0000
@@ -1,7 +1,7 @@
 // $Id: tableselect.js,v 1.9 2008/10/29 10:01:26 dries Exp $
 
 Drupal.behaviors.tableSelect = {
-  attach: function(context) {
+  attach: function(context, settings) {
     $('form table:has(th.select-all):not(.tableSelect-processed)', context).each(Drupal.tableSelect);
   }
 };
Index: misc/tableheader.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tableheader.js,v
retrieving revision 1.20
diff -u -r1.20 tableheader.js
--- misc/tableheader.js	30 Dec 2008 16:43:15 -0000	1.20
+++ misc/tableheader.js	19 Jan 2009 00:32:17 -0000
@@ -7,7 +7,7 @@
 };
 
 Drupal.behaviors.tableHeader = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // This breaks in anything less than IE 7. Prevent it from running.
     if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) {
       return;
Index: misc/drupal.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.js,v
retrieving revision 1.49
diff -u -r1.49 drupal.js
--- misc/drupal.js	6 Jan 2009 13:16:09 -0000	1.49
+++ misc/drupal.js	19 Jan 2009 00:32:17 -0000
@@ -38,13 +38,17 @@
  * @param context
  *   An element to attach behaviors to. If none is given, the document element
  *   is used.
+ * @param settings
+ *  An object containing settings for the current context. If none given, the
+ *  global Drupal.settings object is used.
  */
-Drupal.attachBehaviors = function(context) {
+Drupal.attachBehaviors = function(context, settings) {
   context = context || document;
+  settings = settings || Drupal.settings;
   // Execute all of them.
   jQuery.each(Drupal.behaviors, function() {
     if (jQuery.isFunction(this.attach)) {
-      this.attach(context);
+      this.attach(context, settings);
     }
   });
 };
@@ -65,15 +69,19 @@
  * @param context
  *   An element to detach behaviors from. If none is given, the document element
  *   is used.
+ * @param settings
+ *  An object containing settings for the current context. If none given, the
+ *  global Drupal.settings object is used.
  *
  * @see Drupal.attachBehaviors
  */
-Drupal.detachBehaviors = function(context) {
+Drupal.detachBehaviors = function(context, settings) {
   context = context || document;
+  settings = settings || Drupal.settings;
   // Execute all of them.
   jQuery.each(Drupal.behaviors, function() {
     if (jQuery.isFunction(this.detach)) {
-      this.detach(context);
+      this.detach(context, settings);
     }
   });
 };
@@ -307,7 +315,7 @@
   document.cookie = 'has_js=1; path=/';
   // Attach all behaviors.
   $(document).ready(function() {
-    Drupal.attachBehaviors(this);
+    Drupal.attachBehaviors(this, Drupal.settings);
   });
 }
 
Index: misc/form.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/form.js,v
retrieving revision 1.2
diff -u -r1.2 form.js
--- misc/form.js	29 Oct 2008 10:01:26 -0000	1.2
+++ misc/form.js	19 Jan 2009 00:32:17 -0000
@@ -1,7 +1,7 @@
 // $Id: form.js,v 1.2 2008/10/29 10:01:26 dries Exp $
 
 Drupal.behaviors.multiselectSelector = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // Automatically selects the right radio button in a multiselect control.
     $('.multiselect select:not(.multiselectSelector-processed)', context)
       .addClass('multiselectSelector-processed').change(function() {
Index: misc/timezone.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/timezone.js,v
retrieving revision 1.1
diff -u -r1.1 timezone.js
--- misc/timezone.js	21 Nov 2008 04:33:28 -0000	1.1
+++ misc/timezone.js	19 Jan 2009 00:32:18 -0000
@@ -4,7 +4,7 @@
  * Set the client's system time zone as default values of form fields.
  */
 Drupal.behaviors.setTimezone = {
-  attach: function(context) {
+  attach: function(context, settings) {
     $('select.timezone-detect:not(.timezone-processed)', context).addClass('timezone-processed').each(function() {
       var dateString = Date();
       // In some client environments, date strings include a time zone
@@ -50,7 +50,7 @@
       var element = this;
       $.ajax({
         async: false, 
-        url: Drupal.settings.basePath,
+        url: settings.basePath,
         data: { q: path, date: dateString },
         dataType: 'json',
         success: function (data) {
Index: misc/textarea.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/textarea.js,v
retrieving revision 1.25
diff -u -r1.25 textarea.js
--- misc/textarea.js	20 Dec 2008 18:24:34 -0000	1.25
+++ misc/textarea.js	19 Jan 2009 00:32:18 -0000
@@ -1,7 +1,7 @@
 // $Id: textarea.js,v 1.25 2008/12/20 18:24:34 dries Exp $
 
 Drupal.behaviors.textarea = {
-  attach: function(context) {
+  attach: function(context, settings) {
     $('textarea.resizable:not(.textarea-processed)', context).each(function() {
       // Avoid non-processed teasers.
       if ($(this).is(('textarea.teaser:not(.teaser-processed)'))) {
Index: modules/block/block.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.js,v
retrieving revision 1.4
diff -u -r1.4 block.js
--- modules/block/block.js	29 Oct 2008 10:01:27 -0000	1.4
+++ modules/block/block.js	19 Jan 2009 00:32:18 -0000
@@ -7,7 +7,7 @@
  * objects initialized in that behavior to update the row.
  */
 Drupal.behaviors.blockDrag = {
-  attach: function(context) {
+  attach: function(context, settings) {
     var table = $('table#blocks');
     var tableDrag = Drupal.tableDrag.blocks; // Get the blocks tableDrag object.
 
Index: modules/profile/profile.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.js,v
retrieving revision 1.3
diff -u -r1.3 profile.js
--- modules/profile/profile.js	29 Oct 2008 10:01:27 -0000	1.3
+++ modules/profile/profile.js	19 Jan 2009 00:32:18 -0000
@@ -8,7 +8,7 @@
  * a warning message when removing the last field from a profile category.
  */
 Drupal.behaviors.profileDrag = {
-  attach: function(context) {
+  attach: function(context, settings) {
     var table = $('#profile-fields');
     var tableDrag = Drupal.tableDrag['profile-fields']; // Get the profile tableDrag object.
 
Index: modules/color/color.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.js,v
retrieving revision 1.8
diff -u -r1.8 color.js
--- modules/color/color.js	29 Oct 2008 10:01:27 -0000	1.8
+++ modules/color/color.js	19 Jan 2009 00:32:18 -0000
@@ -1,7 +1,7 @@
 // $Id: color.js,v 1.8 2008/10/29 10:01:27 dries Exp $
 
 Drupal.behaviors.color = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // This behavior attaches by ID, so is only valid once on a page.
     if ($('#color_scheme_form .color-form.color-processed').size()) {
       return;
@@ -17,7 +17,7 @@
     var farb = $.farbtastic('#placeholder');
 
     // Decode reference colors to HSL.
-    var reference = Drupal.settings.color.reference;
+    var reference = settings.color.reference;
     for (i in reference) {
       reference[i] = farb.RGBToHSL(farb.unpack(reference[i]));
     }
Index: modules/comment/comment.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.js,v
retrieving revision 1.7
diff -u -r1.7 comment.js
--- modules/comment/comment.js	29 Oct 2008 10:01:27 -0000	1.7
+++ modules/comment/comment.js	19 Jan 2009 00:32:18 -0000
@@ -1,7 +1,7 @@
 // $Id: comment.js,v 1.7 2008/10/29 10:01:27 dries Exp $
 
 Drupal.behaviors.comment = {
-  attach: function(context) {
+  attach: function(context, settings) {
     var parts = new Array("name", "homepage", "mail");
     var cookie = '';
     for (i=0;i<3;i++) {
Index: modules/simpletest/simpletest.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.js,v
retrieving revision 1.6
diff -u -r1.6 simpletest.js
--- modules/simpletest/simpletest.js	20 Nov 2008 05:51:58 -0000	1.6
+++ modules/simpletest/simpletest.js	19 Jan 2009 00:32:18 -0000
@@ -4,18 +4,18 @@
  * Add the cool table collapsing on the testing overview page.
  */
 Drupal.behaviors.simpleTestMenuCollapse = {
-  attach: function() {
+  attach: function(context, settings) {
     var timeout = null;
     // Adds expand-collapse functionality.
     $('div.simpletest-image').each(function() {
-      direction = Drupal.settings.simpleTest[$(this).attr('id')].imageDirection;
-      $(this).html(Drupal.settings.simpleTest.images[direction]);
+      direction = settings.simpleTest[$(this).attr('id')].imageDirection;
+      $(this).html(settings.simpleTest.images[direction]);
     });
 
     // Adds group toggling functionality to arrow images.
     $('div.simpletest-image').click(function() {
-      var trs = $(this).parents('tbody').children('.' + Drupal.settings.simpleTest[this.id].testClass);
-      var direction = Drupal.settings.simpleTest[this.id].imageDirection;
+      var trs = $(this).parents('tbody').children('.' + settings.simpleTest[this.id].testClass);
+      var direction = settings.simpleTest[this.id].imageDirection;
       var row = direction ? trs.size() - 1 : 0;
 
       // If clicked in the middle of expanding a group, stop so we can switch directions.
@@ -47,8 +47,8 @@
       rowToggle();
 
       // Toggle the arrow image next to the test group title.
-      $(this).html(Drupal.settings.simpleTest.images[(direction ? 0 : 1)]);
-      Drupal.settings.simpleTest[this.id].imageDirection = !direction;
+      $(this).html(settings.simpleTest.images[(direction ? 0 : 1)]);
+      settings.simpleTest[this.id].imageDirection = !direction;
 
     });
   }
@@ -59,9 +59,9 @@
  * selected/deselected.
  */
 Drupal.behaviors.simpleTestSelectAll = {
-  attach: function() {
+  attach: function(context, settings) {
     $('td.simpletest-select-all').each(function() {
-      var checkboxes = Drupal.settings.simpleTest['simpletest-test-group-'+ $(this).attr('id')].testNames, totalCheckboxes = 0,
+      var checkboxes = settings.simpleTest['simpletest-test-group-'+ $(this).attr('id')].testNames, totalCheckboxes = 0,
         checkbox = $('<input type="checkbox" class="form-checkbox" id="'+ $(this).attr('id') +'-select-all" />').change(function() {
         var checked = !!($(this).attr('checked'));
         for (var i = 0; i < checkboxes.length; i++) {
Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.18
diff -u -r1.18 system.js
--- modules/system/system.js	22 Nov 2008 11:54:40 -0000	1.18
+++ modules/system/system.js	19 Jan 2009 00:32:18 -0000
@@ -8,14 +8,14 @@
  * are currently enabled.
  */
 Drupal.behaviors.cleanURLsSettingsCheck = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // This behavior attaches by ID, so is only valid once on a page.
     // Also skip if we are on an install page, as Drupal.cleanURLsInstallCheck will handle
     // the processing.
     if ($("#clean-url.clean-url-processed, #clean-url.install").size()) {
       return;
     }
-    var url = Drupal.settings.basePath +"admin/settings/clean-urls/check";
+    var url = settings.basePath +"admin/settings/clean-urls/check";
     $("#clean-url .description span").html('<div id="testing">'+ Drupal.t('Testing clean URLs...') +"</div>");
     $("#clean-url p").hide();
     $.ajax({
@@ -76,10 +76,10 @@
  * administrator e-mail address with the same value as the site e-mail address.
  */
 Drupal.behaviors.copyFieldValue = {
-  attach: function(context) {
-    for (var sourceId in Drupal.settings.copyFieldValue) {
+  attach: function(context, settings) {
+    for (var sourceId in settings.copyFieldValue) {
       // Get the list of target fields.
-      targetIds = Drupal.settings.copyFieldValue[sourceId];
+      targetIds = settings.copyFieldValue[sourceId];
       if (!$('#'+ sourceId + '.copy-field-values-processed').size(), context) {
         // Add the behavior to update target fields on blur of the primary field.
         sourceField = $('#' + sourceId);
@@ -101,7 +101,7 @@
  * Show/hide custom format sections on the date-time settings page.
  */
 Drupal.behaviors.dateTime = {
-  attach: function(context) {
+  attach: function(context, settings) {
     // Show/hide custom format depending on the select's value.
     $('select.date-format:not(.date-time-processed)', context).change(function() {
       $(this).addClass('date-time-processed').parents("div.date-container").children("div.custom-container")[$(this).val() == "custom" ? "show" : "hide"]();
@@ -110,7 +110,7 @@
     // Attach keyup handler to custom format inputs.
     $('input.custom-format:not(.date-time-processed)', context).addClass('date-time-processed').keyup(function() {
       var input = $(this);
-      var url = Drupal.settings.dateTime.lookup +(Drupal.settings.dateTime.lookup.match(/\?q=/) ? "&format=" : "?format=") + Drupal.encodeURIComponent(input.val());
+      var url = settings.dateTime.lookup +(settings.dateTime.lookup.match(/\?q=/) ? "&format=" : "?format=") + Drupal.encodeURIComponent(input.val());
       $.getJSON(url, function(data) {
         $("div.description span", input.parent()).html(data);
       });
@@ -125,9 +125,9 @@
  * Show the powered by Drupal image preview
  */
 Drupal.behaviors.poweredByPreview = {
-  attach: function(context) {
+  attach: function(context, settings) {
     $('#edit-color, #edit-size').change(function() {
-      var path = Drupal.settings.basePath + 'misc/' + $('#edit-color').val() + '-' + $('#edit-size').val() + '.png';
+      var path = settings.basePath + 'misc/' + $('#edit-color').val() + '-' + $('#edit-size').val() + '.png';
       $('img.powered-by-preview').attr('src', path);
     });
   }
Index: modules/user/user.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.js,v
retrieving revision 1.9
diff -u -r1.9 user.js
--- modules/user/user.js	20 Nov 2008 06:56:17 -0000	1.9
+++ modules/user/user.js	19 Jan 2009 00:32:18 -0000
@@ -5,8 +5,8 @@
  * that its confirmation is correct.
  */
 Drupal.behaviors.password = {
-  attach: function(context) {
-    var translate = Drupal.settings.password;
+  attach: function(context, settings) {
+    var translate = settings.password;
     $("input.password-field:not(.password-processed)", context).each(function() {
       var passwordInput = $(this).addClass('password-processed');
       var innerWrapper = $(this).parent();
@@ -33,7 +33,7 @@
       var passwordCheck = function () {
 
         // Evaluate the password strength.
-        var result = Drupal.evaluatePasswordStrength(passwordInput.val());
+        var result = Drupal.evaluatePasswordStrength(passwordInput.val(), settings.password);
 
         // Update the suggestions for how to improve the password.
         if (passwordDescription.html() != result.message) {
@@ -91,8 +91,8 @@
  *
  * Returns the estimated strength and the relevant output message.
  */
-Drupal.evaluatePasswordStrength = function (password) {
-  var weaknesses = 0, strength = 100, msg = [], translate = Drupal.settings.password;
+Drupal.evaluatePasswordStrength = function (password, translate) {
+  var weaknesses = 0, strength = 100, msg = [];
 
   var hasLowercase = password.match(/[a-z]+/);
   var hasUppercase = password.match(/[A-Z]+/);
@@ -165,7 +165,7 @@
  * "Picture support" radio buttons.
  */
 Drupal.behaviors.userSettings = {
-  attach: function(context) {
+  attach: function(context, settings) {
     $('div.user-admin-picture-radios input[type=radio]:not(.userSettings-processed)', context).addClass('userSettings-processed').click(function () {
       $('div.user-admin-picture-settings', context)[['hide', 'show'][this.value]]();
     });
Index: modules/taxonomy/taxonomy.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.js,v
retrieving revision 1.3
diff -u -r1.3 taxonomy.js
--- modules/taxonomy/taxonomy.js	29 Oct 2008 10:01:27 -0000	1.3
+++ modules/taxonomy/taxonomy.js	19 Jan 2009 00:32:18 -0000
@@ -7,7 +7,7 @@
  * objects initialized in that behavior to update the row.
  */
 Drupal.behaviors.termDrag = {
-  attach: function(context) {
+  attach: function(context, settings) {
     var table = $('#taxonomy', context);
     var tableDrag = Drupal.tableDrag.taxonomy; // Get the blocks tableDrag object.
     var rows = $('tr', table).size();
@@ -18,20 +18,20 @@
       $('tr.taxonomy-term-divider-top', table).removeClass('taxonomy-term-divider-top');
       $('tr.taxonomy-term-divider-bottom', table).removeClass('taxonomy-term-divider-bottom');
 
-      if (Drupal.settings.taxonomy.backPeddle) {
-        for (var n = 0; n < Drupal.settings.taxonomy.backPeddle; n++) {
+      if (settings.taxonomy.backPeddle) {
+        for (var n = 0; n < settings.taxonomy.backPeddle; n++) {
           $(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview');
         }
-        $(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle - 1]).addClass('taxonomy-term-divider-top');
-        $(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle]).addClass('taxonomy-term-divider-bottom');
+        $(table[0].tBodies[0].rows[settings.taxonomy.backPeddle - 1]).addClass('taxonomy-term-divider-top');
+        $(table[0].tBodies[0].rows[settings.taxonomy.backPeddle]).addClass('taxonomy-term-divider-bottom');
       }
 
-      if (Drupal.settings.taxonomy.forwardPeddle) {
-        for (var n = rows - Drupal.settings.taxonomy.forwardPeddle - 1; n < rows - 1; n++) {
+      if (settings.taxonomy.forwardPeddle) {
+        for (var n = rows - settings.taxonomy.forwardPeddle - 1; n < rows - 1; n++) {
           $(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview');
         }
-        $(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 2]).addClass('taxonomy-term-divider-top');
-        $(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 1]).addClass('taxonomy-term-divider-bottom');
+        $(table[0].tBodies[0].rows[rows - settings.taxonomy.forwardPeddle - 2]).addClass('taxonomy-term-divider-top');
+        $(table[0].tBodies[0].rows[rows - settings.taxonomy.forwardPeddle - 1]).addClass('taxonomy-term-divider-bottom');
       }
     };
   }
