ÿþv a r   S i m p l e S l i d e s h o w   =   n e w   C l a s s ( {  
 	 o p t i o n s :   {  
 	 	 s h o w C o n t r o l s :   f a l s e ,  
 	 	 s h o w D u r a t i o n :   6 0 0 0 ,  
 	 	 s h o w T O C :   f a l s e ,  
 	 	 t o c W i d t h :   2 0 ,  
 	 	 t o c C l a s s :   ' t o c ' ,  
 	 	 t o c A c t i v e C l a s s :   ' t o c - a c t i v e '  
 	 } ,  
 	 I m p l e m e n t s :   [ O p t i o n s , E v e n t s ] ,  
 	 i n i t i a l i z e :   f u n c t i o n ( c o n t a i n e r , e l e m e n t s , o p t i o n s )   {  
 	 	 / / s e t t i n g s  
 	 	 t h i s . c o n t a i n e r   =   $ ( c o n t a i n e r ) ;  
 	 	 t h i s . e l e m e n t s   =   $ $ ( e l e m e n t s ) ;  
 	 	 t h i s . c u r r e n t I n d e x   =   0 ;  
 	 	 t h i s . i n t e r v a l   =   ' ' ;  
 	 	 i f ( t h i s . o p t i o n s . s h o w T O C )   t h i s . t o c   =   [ ] ;  
 	 	  
 	 	 / / a s s i g n  
 	 	 t h i s . e l e m e n t s . e a c h ( f u n c t i o n ( e l , i ) {  
 	 	 	 i f ( t h i s . o p t i o n s . s h o w T O C )   {  
 	 	 	 	 t h i s . t o c . p u s h ( n e w   E l e m e n t ( ' a ' , {  
 	 	 	 	 	 t e x t :   i + 1 ,  
 	 	 	 	 	 h r e f :   ' # ' ,  
 	 	 	 	 	 ' c l a s s ' :   t h i s . o p t i o n s . t o c C l a s s   +   ' '   +   ( i   = =   0   ?   '   '   +   t h i s . o p t i o n s . t o c A c t i v e C l a s s   :   ' ' ) ,  
 	 	 	 	 	 e v e n t s :   {  
 	 	 	 	 	 	 c l i c k :   f u n c t i o n ( e )   {  
 	 	 	 	 	 	 	 i f ( e )   e . s t o p ( ) ;  
 	 	 	 	 	 	 	 t h i s . s t o p ( ) ;  
 	 	 	 	 	 	 	 t h i s . s h o w ( i ) ;  
 	 	 	 	 	 	 } . b i n d ( t h i s )  
 	 	 	 	 	 } ,  
 	 	 	 	 	 s t y l e s :   {  
 	 	 	 	 	 	 l e f t :   ( ( i   +   1 )   *   ( t h i s . o p t i o n s . t o c W i d t h   +   1 0 ) )  
 	 	 	 	 	 }  
 	 	 	 	 } ) . i n j e c t ( t h i s . c o n t a i n e r ) ) ;  
 	 	 	 }  
 	 	 	 i f ( i   >   0 )   e l . s e t ( ' o p a c i t y ' , 0 ) ;  
 	 	 } , t h i s ) ;  
 	 	  
 	 	 / / n e x t , p r e v i o u s   l i n k s  
 	 	 i f ( t h i s . o p t i o n s . s h o w C o n t r o l s )   {  
 	 	 	 t h i s . c r e a t e C o n t r o l s ( ) ;  
 	 	 	  
 	 	 }  
 	 	 / / e v e n t s  
 	 	 t h i s . c o n t a i n e r . a d d E v e n t s ( {  
 	 	 	 / *  
 	 	 	 m o u s e e n t e r :   f u n c t i o n ( )   {   t h i s . s t o p ( ) ;   } . b i n d ( t h i s ) ,  
 	 	 	 m o u s e l e a v e :   f u n c t i o n ( )   {   t h i s . s t a r t ( ) ;   } . b i n d ( t h i s )  
 	 	 	 * /  
 	 	 } ) ;  
  
 	 } ,  
 	 s h o w :   f u n c t i o n ( t o )   {  
 	 	 t h i s . e l e m e n t s [ t h i s . c u r r e n t I n d e x ] . f a d e ( ' o u t ' ) ;  
 	 	 i f ( t h i s . o p t i o n s . s h o w T O C )   t h i s . t o c [ t h i s . c u r r e n t I n d e x ] . r e m o v e C l a s s ( t h i s . o p t i o n s . t o c A c t i v e C l a s s ) ;  
 	 	 t h i s . e l e m e n t s [ t h i s . c u r r e n t I n d e x   =   ( $ d e f i n e d ( t o )   ?   t o   :   ( t h i s . c u r r e n t I n d e x   <   t h i s . e l e m e n t s . l e n g t h   -   1   ?   t h i s . c u r r e n t I n d e x + 1   :   0 ) ) ] . f a d e ( ' i n ' ) ;  
 	 	 i f ( t h i s . o p t i o n s . s h o w T O C )   t h i s . t o c [ t h i s . c u r r e n t I n d e x ] . a d d C l a s s ( t h i s . o p t i o n s . t o c A c t i v e C l a s s ) ;  
 	 } ,  
 	 s t a r t :   f u n c t i o n ( )   {  
 	 	 t h i s . i n t e r v a l   =   t h i s . s h o w . b i n d ( t h i s ) . p e r i o d i c a l ( t h i s . o p t i o n s . s h o w D u r a t i o n ) ;  
 	 } ,  
 	 s t o p :   f u n c t i o n ( )   {  
 	 	 $ c l e a r ( t h i s . i n t e r v a l ) ;  
 	 } ,  
 	 / / " p r i v a t e "  
 	 c r e a t e C o n t r o l s :   f u n c t i o n ( )   {  
 	 	 v a r   n e x t   =   n e w   E l e m e n t ( ' a ' , {  
 	 	 	 h r e f :   ' # ' ,  
 	 	 	 i d :   ' n e x t ' ,  
 	 	 	 t e x t :   ' > > ' ,  
 	 	 	 e v e n t s :   {  
 	 	 	 	 c l i c k :   f u n c t i o n ( e )   {  
 	 	 	 	 	 i f ( e )   e . s t o p ( ) ;  
 	 	 	 	 	 t h i s . s t o p ( ) ;    
 	 	 	 	 	 t h i s . s h o w ( ) ;  
 	 	 	 	 } . b i n d ( t h i s )  
 	 	 	 }  
 	 	 } ) . i n j e c t ( t h i s . c o n t a i n e r ) ;  
 	 	 v a r   p r e v i o u s   =   n e w   E l e m e n t ( ' a ' , {  
 	 	 	 h r e f :   ' # ' ,  
 	 	 	 i d :   ' p r e v i o u s ' ,  
 	 	 	 t e x t :   ' < < ' ,  
 	 	 	 e v e n t s :   {  
 	 	 	 	 c l i c k :   f u n c t i o n ( e )   {  
 	 	 	 	 	 i f ( e )   e . s t o p ( ) ;  
 	 	 	 	 	 t h i s . s t o p ( ) ;    
 	 	 	 	 	 t h i s . s h o w ( t h i s . c u r r e n t I n d e x   ! =   0   ?   t h i s . c u r r e n t I n d e x   - 1   :   t h i s . e l e m e n t s . l e n g t h - 1 ) ;  
 	 	 	 	 } . b i n d ( t h i s )  
 	 	 	 }  
 	 	 } ) . i n j e c t ( t h i s . c o n t a i n e r ) ;  
 	 }  
 } ) ; 
