? viewsRotatorOnce.js
Index: views-rotator.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_rotator/views-rotator.js,v
retrieving revision 1.6
diff -u -p -r1.6 views-rotator.js
--- views-rotator.js	16 Dec 2008 02:19:20 -0000	1.6
+++ views-rotator.js	14 Apr 2010 03:36:48 -0000
@@ -12,27 +12,33 @@
 ;(function($) {
 Drupal.behaviors.views_rotator = function(context) {
   $.each(Drupal.settings.views_rotator, function(id) {
-    $('#' + id).cycle(this);
-    if (this.next != undefined || this.prev != undefined) {
-      var settings = this;
-      $(settings.prev).addClass('views-rotator-prev');
-      $(settings.next).addClass('views-rotator-next');
-      $('.' + id).hover(function() {
-        $(settings.prev).addClass('views-rotator-prev-hover');
-        $(settings.next).addClass('views-rotator-next-hover');
-      }, function() {
-        $(settings.prev).removeClass('views-rotator-prev-hover');
-        $(settings.next).removeClass('views-rotator-next-hover');
-      });
-    }
-    if (this.auto_height == 1) {
-      var height = null;
-      $('#' + id + ' .views-rotator-item').each(function() {
-        var item_height = $(this).height();
-        if (item_height > height) height = item_height;
-      });
-      $('#' + id).height(height);
-    }
+    var settings = this;
+    $('#' + id + ':not(.views-rotator-processed)').each(function() {
+      $(this)
+        .cycle(settings)
+        .addClass('views-rotator-processed');
+      if (settings.next !== undefined || settings.prev !== undefined) {
+        $(settings.prev).addClass('views-rotator-prev');
+        $(settings.next).addClass('views-rotator-next');
+        $('.' + id).hover(function() {
+          $(settings.prev).addClass('views-rotator-prev-hover');
+          $(settings.next).addClass('views-rotator-next-hover');
+        }, function() {
+          $(settings.prev).removeClass('views-rotator-prev-hover');
+          $(settings.next).removeClass('views-rotator-next-hover');
+        });
+      }
+      if (settings.auto_height == 1) {
+        var height = null;
+        $('#' + id + ' .views-rotator-item').each(function() {
+          var item_height = $(this).height();
+          if (item_height > height) {
+            height = item_height;
+          }
+        });
+        $('#' + id).height(height);
+      }
+    });
   });
 };
-})(jQuery);
\ No newline at end of file
+})(jQuery);
