//>>built
define("dojox/widget/rotator/Controller","dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/_base/event dojo/_base/array dojo/_base/connect dojo/query".split(" "),function(l,m,f,n,p,k,e){return l("dojox.widget.rotator.Controller",null,{rotator:null,commands:"prev,play/pause,info,next",constructor:function(a,b){m.mixin(this,a);var d=this.rotator;if(d){for(;b.firstChild;)b.removeChild(b.firstChild);var h=this._domNode=f.create("ul",null,b),g=function(a,b,c){f.create("li",{className:b,innerHTML:'\x3ca href\x3d"#"\x3e\x3cspan\x3e'+
a+"\x3c/span\x3e\x3c/a\x3e",onclick:function(a){n.stop(a);d&&d.control.apply(d,c)}},h)};p.forEach(this.commands.split(","),function(a,b){switch(a){case "prev":g("Prev","dojoxRotatorPrev dojoxRotatorIcon",["prev"]);break;case "play/pause":g("Play","dojoxRotatorPlay dojoxRotatorIcon",["play"]);g("Pause","dojoxRotatorPause dojoxRotatorIcon",["pause"]);break;case "info":this._info=f.create("li",{className:"dojoxRotatorInfo",innerHTML:this._buildInfo(d)},h);break;case "next":g("Next","dojoxRotatorNext dojoxRotatorIcon",
["next"]);break;case "#":case "titles":for(var c=0;c<d.panes.length;c++)g("#"==a?c+1:d.panes[c].title||"Tab "+(c+1),("#"==a?"dojoxRotatorNumber":"dojoxRotatorTab")+" "+(c==d.idx?"dojoxRotatorSelected":"")+" dojoxRotatorPane"+c,["go",c])}},this);e("li:first-child",h).addClass("dojoxRotatorFirst");e("li:last-child",h).addClass("dojoxRotatorLast");this._togglePlay();this._con=k.connect(d,"onUpdate",this,"_onUpdate")}},destroy:function(){k.disconnect(this._con);f.destroy(this._domNode)},_togglePlay:function(a){a=
this.rotator.playing;e(".dojoxRotatorPlay",this._domNode).style("display",a?"none":"");e(".dojoxRotatorPause",this._domNode).style("display",a?"":"none")},_buildInfo:function(a){return"\x3cspan\x3e"+(a.idx+1)+" / "+a.panes.length+"\x3c/span\x3e"},_onUpdate:function(a){var b=this.rotator;switch(a){case "play":case "pause":this._togglePlay();break;case "onAfterTransition":this._info&&(this._info.innerHTML=this._buildInfo(b)),a=function(a){b.idx<a.length&&f.addClass(a[b.idx],"dojoxRotatorSelected")},
a(e(".dojoxRotatorNumber",this._domNode).removeClass("dojoxRotatorSelected")),a(e(".dojoxRotatorTab",this._domNode).removeClass("dojoxRotatorSelected"))}}})});