diff --git a/js/jcarousel.js b/js/jcarousel.js
index aa1e042..a892e20 100644
--- a/js/jcarousel.js
+++ b/js/jcarousel.js
@@ -8,13 +8,12 @@
 Drupal.behaviors.jcarousel = {};
 Drupal.behaviors.jcarousel.attach = function(context, settings) {
   var settings = settings || Drupal.settings;
-  for (var key in settings.jcarousel.carousels) {
-    var options = settings.jcarousel.carousels[key];
+  jQuery.each(settings.jcarousel.carousels, function(key, options) {
     var $carousel = $(options.selector + ':not(.jcarousel-processed)', context);
 
     // If this carousel has already been processed or doesn't exist, move on.
     if (!$carousel.length) {
-      continue;
+      return;
     }
 
     // Callbacks need to be converted from a string to an actual function.
@@ -95,7 +94,7 @@ Drupal.behaviors.jcarousel.attach = function(context, settings) {
 
     // Initialize the jcarousel.
     $carousel.addClass('jcarousel-processed').jcarousel(options);
-  }
+  });
 };
 
 Drupal.jcarousel = {};
