most of stage 2
[edumed.git] / edumed / static / catalogue / js / carousel.js
diff --git a/edumed/static/catalogue/js/carousel.js b/edumed/static/catalogue/js/carousel.js
new file mode 100755 (executable)
index 0000000..b2484be
--- /dev/null
@@ -0,0 +1,27 @@
+(function($){
+$(function() {
+
+
+$("#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);
+        });
+    });
+
+});
+
+
+});
+})(jQuery);