//>>built
define("dojox/widget/rotator/Pan","dojo/_base/array,dojo/_base/connect,dojo/_base/lang,dojo/dom-style,dojo/_base/fx,dojo/fx".split(","),function(u,r,n,o,k,s){function j(a,b){var h=b.next.node,d=b.rotatorBox,f=a%2,c=f?"left":"top",d=(f?d.w:d.h)*(2>a?-1:1),f={},e={};o.set(h,"display","");f[c]={start:0,end:-d};e[c]={start:d,end:0};return s.combine([k.animateProperty({node:b.current.node,duration:b.duration,properties:f,easing:b.easing}),k.animateProperty({node:h,duration:b.duration,properties:e,easing:b.easing})])}
function t(a,b){o.set(a,"zIndex",b)}var l={pan:function(a){var b=a.wrap,h=a.rotator.panes,d=h.length,f=d,c=a.current.idx,e=a.next.idx,g=Math.abs(e-c),i=Math.abs(d-Math.max(c,e)+Math.min(c,e))%d,p=c<e,m=3,k=[],l=[],q=a.duration;if(!b&&!p||b&&(p&&g>i||!p&&g<i))m=1;if(a.continuous){a.quick&&(q=Math.round(q/(b?Math.min(i,g):g)));t(h[c].node,f--);for(b=3==m;;){g=c;b?++c>=d&&(c=0):0>--c&&(c=d-1);g=h[g];i=h[c];t(i.node,f--);k.push(j(m,n.mixin({easing:function(a){return a}},a,{current:g,next:i,duration:q})));
if(b&&c==e||!b&&c==e)break;l.push(i.node)}var a=s.chain(k),v=r.connect(a,"onEnd",function(){r.disconnect(v);u.forEach(l,function(a){o.set(a,{display:"none",left:0,opacity:1,top:0,zIndex:0})})});return a}return j(m,a)},panDown:function(a){return j(0,a)},panRight:function(a){return j(1,a)},panUp:function(a){return j(2,a)},panLeft:function(a){return j(3,a)}};n.mixin(n.getObject("dojox.widget.rotator"),l);return l});