Prepared for SP 4-6.
[edumed.git] / catalogue / static / catalogue / js / carousel.js
index 0b61b47..b2484be 100755 (executable)
@@ -2,28 +2,26 @@
 $(function() {
 
 
-$.fn.cycle.transitions.rgrowY = function($cont, $slides, opts) {
-       opts.before.push(function(curr, next, opts) {
-               $.fn.cycle.commonReset(curr,next,opts,true,false,true);
-               opts.cssBefore.top = this.cycleH/2;
-               opts.animIn.top = 0;
-               opts.animIn.height = this.cycleH;
-               opts.animOut.top = this.cycleH/2;
-        opts.animOut.height = 0;
-       });
-       opts.cssBefore.height = 0;
-       opts.cssBefore.left = 0;
-};
+$("#catalogue-carousel-links").each(function() {
+    $slides = $(this); 
+
+    $slides.cycle({
+        fx: 'fade',
+        speed: 1000,
+        timeout: 5000,
+        pager: '#catalogue-carousel-switcher',
+        pagerAnchorBuilder: function() {},
+    });
+
+    $("#catalogue-carousel-switcher li").each(function(i, e) {
+        $("a", e).click(function(ev) {
+            ev.preventDefault();
+            $slides.cycle(i);
+        });
+    });
 
-$("#catalogue-carousel-links").cycle({
-    fx: 'rgrowY',
-    sync:false,
-    easeIn: 'easeInQuad',
-    easeOut: 'easeOutQuad',
-    speed: 1000,
-    
 });
 
 
 });
-})($);
+})(jQuery);