b7e5021c0fbae797d41db1400ee2e1454d18f903
[edumed.git] / catalogue / static / catalogue / js / carousel.js
1 (function($){
2 $(function() {
3
4
5 $.fn.cycle.transitions.rgrowY = function($cont, $slides, opts) {
6         opts.before.push(function(curr, next, opts) {
7                 $.fn.cycle.commonReset(curr,next,opts,true,false,true);
8                 opts.cssBefore.top = this.cycleH/2;
9                 opts.animIn.top = 0;
10                 opts.animIn.height = this.cycleH;
11                 opts.animOut.top = this.cycleH/2;
12         opts.animOut.height = 0;
13         });
14         opts.cssBefore.height = 0;
15         opts.cssBefore.left = 0;
16 };
17
18 $("#catalogue-carousel-links").each(function() {
19     $(this).cycle({
20         fx: 'rgrowY',
21         sync:false,
22         easeIn: 'easeInQuad',
23         easeOut: 'easeOutQuad',
24         speed: 1000,
25         pager: '#catalogue-carousel-switcher',
26         pagerAnchorBuilder: function(){},
27     });
28 });
29
30
31 });
32 })($);