/*______________________________________________________________________
|        ______   |
|      /      /   |
|     /    O /    |      ___________________________________________
|    /    / /     |
|   /    / /  /|  |       U I Z E     J A V A S C R I P T     A P I
|  /____/ /__/_|  |      ___________________________________________
|            |__  |
|_________________|
|
|           TITLE : Uize.Widget.ImageSwap.Cycle Object
|         VERSION : 1.0
|            TYPE : Object Definition
|          AUTHOR : Chris van Rensburg (http://www.tomkidding.com)
|       COPYRIGHT : (c)2005 Chris van Rensburg
|     DESCRIPTION : Implements a JavaScript object for automatically cycling through images with dissolve support
|        REQUIRES : Uize.Widget.ImageSwap.js (base class)
|_______________________________________________________________________*/
(function(){var d_a=true,d_b=false;var d_c=Uize.Widget.ImageSwap.Cycle=Uize.Widget.ImageSwap.subclass(function(){var d_d=this;d_d.d_e= -1;d_d.d_f=d_b;d_d.d_g=null;
d_d.fade.addEventHandler('Done',function(){if(d_d.d_f&&(d_d.d_e<d_d.d_h.length-1||d_d.d_i))d_d.d_g=setTimeout(function(){d_d.d_j()},d_d.d_k);});}),d_l=d_c.prototype;d_l.d_m=function(){if(this.d_g!=null){clearTimeout(this.d_g);this.d_g=null;}};d_l.d_j=function(){var d_d=this;d_d.d_m();d_d.d_e=(d_d.d_e+1)%d_d.d_h.length;d_d.set(d_d.d_n[d_d.d_e%d_d.d_n.length]);d_d.set({src:d_d.d_h[d_d.d_e]});};d_l.start=function(){this.d_f=d_a;this.d_j();};d_l.stop=function(){this.d_m();this.d_f=d_b;};d_c.registerProperties({d_h:'images',d_k:'interval',d_i:'loop',d_n:'cycleSettings'});d_c.set({d_h:[],d_k:2000,d_i:d_a,d_n:[]});})();
