ÿþv a r   S L _ S l i d e r   =   n e w   C l a s s ( {  
  
 	 / / i m p l e m e n t s  
 	 I m p l e m e n t s :   [ O p t i o n s ] , 	  
 	  
 	 / / v a r i a b l e s   s e t u p  
 	 n u m N a v :   n e w   A r r a y ( ) , 	 	         / / w i l l   s t o r e   n u m b e r   n a v   e l e m e n t s   ( i f   u s e d )  
 	 t i m e r :   n u l l , 	 	 	 	 	 / / p e r i o d i c a l   f u n c t i o n   v a r i a b l e   h o l d e r  
 	 i s S l i d i n g :   1 , 	 	 	 	 	 / / f l a g   f o r   a n i m a t i o n / c l i c k   p r e v e n t i o n  
 	 d i r e c t i o n :   1 , 	 	 	 	 	 / / f l a g   f o r   d i r e c t i o n   ( f o r w a r d / r e v e r s e )  
 	  
 	 / / o p t i o n s  
 	 o p t i o n s :   {  
 	 s l i d e T i m e r :   8 0 0 0 ,     	 	 	         / / T i m e   b e t w e e n   s l i d e s   ( 1   s e c o n d   =   1 0 0 0 ) ,   a . k . a .   t h e   i n t e r v a l   d u r a t i o n  
 	 o r i e n t a t i o n :   ' h o r i z o n t a l ' ,             / / v e r t i c a l ,   h o r i z o n t a l ,   o r   n o n e :   N o n e   w i l l   c r e a t e   a   f a d i n g   i n / o u t   t r a n s i t i o n .  
 	 f a d e :   f a l s e ,                                         / / i f   t r u e   w i l l   f a d e   t h e   o u t g o i n g   s l i d e   -   o n l y   u s e d   i f   o r i e n t a t i o n   i s   ! =   N o n e  
 	 i s P a u s e d :   t r u e , 	 	 	 	 / / f l a g   f o r   p a u s e d   s t a t e   f a l s e  
 	 t r a n s i t i o n T i m e :   1 1 0 0 ,   	 	         / / T r a n s i t i o n   t i m e   ( 1   s e c o n d   =   1 0 0 0 )  
 	 t r a n s i t i o n T y p e :   ' c u b i c : o u t ' , 	 / / T r a n s i t i o n   t y p e  
 	 c o n t a i n e r :   n u l l , 	 	 	 	 / / c o n t a i n e r   e l e m e n t  
 	 i t e m s :     n u l l ,   	 	 	 	 	 / / A r r a y   o f   e l e m e n t s   f o r   s l i d i n g  
 	 i t e m N u m :   0 , 	 	 	 	 	 	 / / C u r r e n t   i t e m   n u m b e r  
 	 n u m N a v A c t i v e :   f a l s e , 	 	 	 / / W h e t h e r   o r   n o t   t h e   n u m b e r   n a v i g a t i o n   w i l l   b e   u s e d  
 	 n u m N a v H o l d e r :   n u l l , 	 	 	         / / E l e m e n t   t h a t   h o l d s   t h e   n u m b e r   n a v i g a t i o n  
 	 p l a y B t n :   n u l l , 	 	 	 	 	 / / P l a y   ( a n d   p a u s e )   b u t t o n   e l e m e n t  
 	 p r e v B t n :   n u l l , 	 	 	 	 	 / / P r e v i o u s   b u t t o n   e l e m e n t  
 	 n e x t B t n :   n u l l 	 	 	 	 	 / / N e x t   b u t t o n   e l e m e n t  
 	 } ,  
  
 	 / / i n i t i a l i z a t i o n  
 	 i n i t i a l i z e :   f u n c t i o n ( o p t i o n s )   {  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	  
 	 	 / / s e t   o p t i o n s  
 	 	 t h i s . s e t O p t i o n s ( o p t i o n s ) ;  
 	 	  
 	 	 / / r e m o v e   a n y   s c r o l l b a r ( s )   o n   t h e   c o n t a i n e r  
 	 	 s e l f . o p t i o n s . c o n t a i n e r . s e t S t y l e ( ' o v e r f l o w ' ,   " h i d d e n " ) ;      
 	 	  
 	 	 / / i f   t h e r e   i s   a   p l a y / p a u s e   b u t t o n ,   s e t   u p   f u n c t i o n a l i t y   f o r   i t  
 	 	 i f ( s e l f . o p t i o n s . p l a y B t n   ! =   n u l l )   {  
 	 	 	 / / s e l f . p a u s e I t ( ) ;      
 	 	 	 s e l f . o p t i o n s . p l a y B t n . s e t ( ' t e x t ' ,   ' |     | ' ) ;  
 	 	 	  
 	 	 	 s e l f . o p t i o n s . p l a y B t n . a d d E v e n t s ( {  
 	 	 	 	 ' c l i c k ' :   f u n c t i o n ( )   {  
 	 	 	 	 	 s e l f . p a u s e I t ( ) ;  
 	 	 	 	 } , 	 	 	 	  
 	 	 	 	 ' m o u s e e n t e r '   :   f u n c t i o n ( )   {  
 	 	 	 	 	 t h i s . s e t S t y l e ( ' c u r s o r ' ,   ' p o i n t e r ' ) ;  
 	 	 	 	 } ,  
 	 	 	 	 ' m o u s e l e a v e '   :   f u n c t i o n ( )   {  
 	 	 	 	 	  
 	 	 	 	 }  
 	 	 	 } ) ;  
 	 	 }  
 	 	  
 	 	 / / i f   t h e r e   i s   a   p r e v   &   n e x t   b u t t o n ,   s e t   u p   f u n c t i o n a l i t y   f o r   t h e m  
 	 	 i f ( s e l f . o p t i o n s . p r e v B t n   & &   s e l f . o p t i o n s . n e x t B t n ) {  
 	 	 	  
 	 	 	 s e l f . o p t i o n s . p r e v B t n . a d d E v e n t s ( {    
 	 	 	 	 ' c l i c k '   :   f u n c t i o n ( )   {  
 	 	 	 	 	 i f ( s e l f . i s S l i d i n g   = =   0 ) {  
 	 	 	 	 	 	 i f ( s e l f . o p t i o n s . i s P a u s e d   = =   f a l s e ) {  
 	 	 	 	 	 	 	 $ c l e a r ( s e l f . t i m e r ) ;  
 	 	 	 	 	 	 	 s e l f . t i m e r   =   s e l f . s l i d e I t . p e r i o d i c a l ( s e l f . o p t i o n s . s l i d e T i m e r ,   s e l f ,   n u l l ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 	 s e l f . d i r e c t i o n   =   0 ;  
 	 	 	 	 	 	 s e l f . s l i d e I t ( ) ;  
 	 	 	 	 	 }  
 	 	 	 	 } ,  
 	 	 	 	 ' m o u s e e n t e r '   :   f u n c t i o n ( )   {  
 	 	 	 	 	 t h i s . s e t S t y l e ( ' c u r s o r ' ,   ' p o i n t e r ' ) ;  
 	 	 	 	 } ,  
 	 	 	 	 ' m o u s e l e a v e '   :   f u n c t i o n ( )   {  
 	 	 	 	  
 	 	 	 	 }  
 	 	 	 } ) ; 	  
 	 	 	  
 	 	 	 t h i s . o p t i o n s . n e x t B t n . a d d E v e n t s ( {    
 	 	 	 	 ' c l i c k '   :   f u n c t i o n ( )   {  
 	 	 	 	 	 i f ( s e l f . i s S l i d i n g   = =   0 ) {  
 	 	 	 	 	 	 i f ( s e l f . o p t i o n s . i s P a u s e d   = =   f a l s e ) {  
 	 	 	 	 	 	 	 $ c l e a r ( s e l f . t i m e r ) ;  
 	 	 	 	 	 	 	 s e l f . t i m e r   =   s e l f . s l i d e I t . p e r i o d i c a l ( s e l f . o p t i o n s . s l i d e T i m e r ,   s e l f ,   n u l l ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 	 s e l f . d i r e c t i o n   =   1 ;  
 	 	 	 	 	 	 s e l f . s l i d e I t ( ) ;  
 	 	 	 	 	 }  
 	 	 	 	 } ,  
 	 	 	 	 ' m o u s e e n t e r '   :   f u n c t i o n ( )   {  
 	 	 	 	 	 t h i s . s e t S t y l e ( ' c u r s o r ' ,   ' p o i n t e r ' ) ;  
 	 	 	 	 } ,  
 	 	 	 	 ' m o u s e l e a v e '   :   f u n c t i o n ( )   {  
 	 	 	 	 	  
 	 	 	 	 }  
 	 	 	 } ) ; 	  
 	 	 }  
 	 	  
 	 	 / / s e t u p   i t e m s   ( a . k . a .   s l i d e s )   f r o m   l i s t  
 	 	 s e l f . o p t i o n s . i t e m s . e a c h ( f u n c t i o n ( e l ,   i ) {  
 	 	 	      
 	 	 	 / / f . y . i .     e l   =   t h e   e l e m e n t ,   i   =   t h e   i n d e x  
 	 	 	 e l . s e t S t y l e ( ' p o s i t i o n ' ,   " a b s o l u t e " ) ;  
 	 	 	 v a r   i t e m H   =   e l . g e t S i z e ( ) . y ;  
 	 	 	 v a r   i t e m W   =   e l . g e t S i z e ( ) . x ;  
 	 	 	 i f ( s e l f . o p t i o n s . o r i e n t a t i o n   = =   ' v e r t i c a l ' ) {    
                                 e l . s e t S t y l e ( ' t o p ' ,   ( - 1   *   i t e m H ) ) ;  
                                 e l . s e t S t y l e ( ' l e f t ' ,   0 ) ;  
                         } e l s e   i f ( s e l f . o p t i o n s . o r i e n t a t i o n   = =   ' n o n e ' )   {  
                                 e l . s e t S t y l e ( ' l e f t ' ,   0 ) ;  
                                 e l . s e t S t y l e ( ' t o p ' ,   0 ) ;  
                                 e l . s e t ( ' o p a c i t y ' ,   0 ) ;  
 	 	 	 } e l s e {  
                                 e l . s e t S t y l e ( ' l e f t ' ,   ( - 1   *   i t e m W ) ) ;  
                         }  
 	 	 	 / /   - -   N u m b e r   n a v   s e t u p  
 	 	 	 i f ( s e l f . o p t i o n s . n u m N a v A c t i v e   = =   t r u e ) {  
 	 	 	 	 / / c r e a t e   n u m b e r e d   n a v i g a t i o n   b o x e s ,   a n d   i n s e r t   i n t o   t h e   ' n u m _ n a v '   u l )  
 	 	 	 	 v a r   n u m I t e m   =   n e w   E l e m e n t ( ' l i ' ,   { i d :   ' n u m ' + i } ) ;  
 	 	 	 	 v a r   n u m L i n k   =   n e w   E l e m e n t ( ' a ' ,   {  
 	 	 	 	 	 ' c l a s s ' :   ' n u m b t n ' ,  
 	 	 	 	 	 ' h t m l ' :   ( i + 1 )  
 	 	 	 	 } ) ;  
 	 	 	 	 n u m I t e m . a d o p t ( n u m L i n k ) ;  
 	 	 	 	 s e l f . o p t i o n s . n u m N a v H o l d e r . a d o p t ( n u m I t e m ) ;  
 	 	 	 	 s e l f . n u m N a v . p u s h ( n u m L i n k ) ;  
 	 	 	 	 n u m L i n k . s e t ( ' m o r p h ' ,   { d u r a t i o n :   1 0 0 ,   t r a n s i t i o n :   F x . T r a n s i t i o n s . l i n e a r ,   l i n k :   ' i g n o r e ' } ) ;  
 	 	 	 	  
 	 	 	 	 n u m L i n k . a d d E v e n t s ( {  
 	 	 	 	 	 ' c l i c k '   :   f u n c t i o n ( ) {  
 	 	 	 	 	 	 s e l f . n u m P r e s s ( i ) ;  
 	 	 	 	 	 } ,  
 	 	 	 	 	 ' m o u s e e n t e r '   :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 t h i s . s e t S t y l e ( ' c u r s o r ' ,   ' p o i n t e r ' ) ;  
 	 	 	 	 	 	 	 s e l f . n u m P r e s s ( i ) ;  
 	 	 	 	 	 }  
 	 	 	 	 } ) ;  
 	 	 	 	  
 	 	 	 	 / / s e t   i n i t i a l   n u m b e r   t o   a c t i v e   s t a t e  
 	 	 	 	 i f ( i   = =   s e l f . o p t i o n s . i t e m N u m ) {  
 	 	 	 	 	 v a r   i n i t N u m   =   s e l f . n u m N a v [ i ] ;  
 	 	 	 	 	 i n i t N u m . a d d C l a s s ( ' a c t i v e ' ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 / / e n d   i f   n u m   n a v   ' a c t i v e '  
 	 	  
 	 	   } ) ;  
 	  
 	 } ,  
  
 	 / / s t a r t u p   m e t h o d  
 	 s t a r t :   f u n c t i o n ( )   {  
 	 	  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	  
 	 	 s e l f . s l i d e I t ( s e l f . o p t i o n s . i t e m N u m ) ;     / / i n i t i a l i z e   f i r s t   s l i d e  
 	 	  
 	 	 i f ( s e l f . o p t i o n s . i s P a u s e d   = =   f a l s e ) {  
 	 	 	 s e l f . t i m e r   =   s e l f . s l i d e I t . p e r i o d i c a l ( s e l f . o p t i o n s . s l i d e T i m e r ,   s e l f ,   n u l l ) ;  
 	 	 	 i f ( s e l f . o p t i o n s . p l a y B t n )   s e l f . o p t i o n s . p l a y B t n . s e t ( ' t e x t ' ,   ' |     | ' ) ;  
 	 	 }  
 	 	 e l s e {  
 	 	 	 / / s e l f . p a u s e I t ( ) ;  
 	 	 	 i f ( s e l f . o p t i o n s . p l a y B t n )   s e l f . o p t i o n s . p l a y B t n . s e t ( ' t e x t ' ,   ' > > ' ) ;  
 	 	 }  
 	 	  
 	 } ,  
 	  
 	  
 	 s l i d e I t :   f u n c t i o n ( p a s s e d I D )   {  
 	 	  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	  
 	 	 / / g e t   i t e m   t o   s l i d e   o u t  
 	 	 v a r   c u r I t e m   =   s e l f . o p t i o n s . i t e m s [ s e l f . o p t i o n s . i t e m N u m ] ;    
 	 	 i f ( s e l f . o p t i o n s . n u m N a v A c t i v e   = =   t r u e ) {  
 	 	 	 v a r   c u r N u m I t e m   =     s e l f . n u m N a v [ s e l f . o p t i o n s . i t e m N u m ] ;  
 	 	 }  
 	 	  
 	 	 / / c h e c k   f o r   p a s s e d I D   p r e s e n c e  
 	 	 i f ( p a s s e d I D   ! =   n u l l )   {  
 	 	 	 i f ( s e l f . o p t i o n s . i t e m N u m   ! =   p a s s e d I D ) {  
 	 	 	 	 i f ( s e l f . o p t i o n s . i t e m N u m   >   p a s s e d I D )   {    
 	 	 	 	 	 s e l f . d i r e c t i o n   =   0 ;    
 	 	 	 	 }   e l s e   {    
 	 	 	 	 	 s e l f . d i r e c t i o n   =   1 ;  
 	 	 	 	 }  
 	 	 	 	 s e l f . o p t i o n s . i t e m N u m   =   p a s s e d I D ;  
 	 	 	 }  
 	 	 }  
 	 	 e l s e {  
 	 	 	 s e l f . c h a n g e I n d e x ( ) ; 	  
 	 	 }  
 	 	  
 	 	  
 	 	 / / n o w   g e t   i t e m   t o   s l i d e   i n   u s i n g   n e w   i n d e x  
 	 	 v a r   n e w I t e m   =   s e l f . o p t i o n s . i t e m s [ s e l f . o p t i o n s . i t e m N u m ] ;  
 	 	 i f ( s e l f . d i r e c t i o n   = =   0 ) {  
 	 	 	 v a r   c u r X   =   s e l f . o p t i o n s . c o n t a i n e r . g e t S i z e ( ) . x ;  
 	 	 	 v a r   n e w X   =   ( - 1   *   n e w I t e m . g e t S i z e ( ) . x ) ;  
                         v a r   c u r Y   =   s e l f . o p t i o n s . c o n t a i n e r . g e t S i z e ( ) . y ;  
                         v a r   n e w Y   =   ( - 1   *   n e w I t e m . g e t S i z e ( ) . y ) ;  
 	 	 }  
 	 	 e l s e {  
 	 	 	 v a r   c u r X   =   ( - 1   *   s e l f . o p t i o n s . c o n t a i n e r . g e t S i z e ( ) . x ) ; 	  
 	 	 	 v a r   n e w X   =   n e w I t e m . g e t S i z e ( ) . x ;  
                         v a r   c u r Y   =   ( - 1   *   s e l f . o p t i o n s . c o n t a i n e r . g e t S i z e ( ) . y ) ;  
                         v a r   n e w Y   =   n e w I t e m . g e t S i z e ( ) . y ;  
 	 	 }  
 	 	  
 	 	  
 	 	 / / a d d / r e m o v e   a c t i v e   n u m b e r ' s   h i g h l i g h t  
 	 	 i f ( s e l f . o p t i o n s . n u m N a v A c t i v e   = =   t r u e ) {  
 	 	 	 v a r   n e w N u m I t e m   =     s e l f . n u m N a v [ s e l f . o p t i o n s . i t e m N u m ] ;  
 	 	 	 n e w N u m I t e m . a d d C l a s s ( ' a c t i v e ' ) ;  
 	 	 }  
 	 	  
 	 	  
 	 	 / / s e t   u p   o u r   a n i m a t i o n   s t y l i n g s  
 	 	 v a r   i t e m _ i n   =   n e w   F x . M o r p h ( n e w I t e m ,   {  
 	 	           d u r a t i o n :   s e l f . o p t i o n s . t r a n s i t i o n T i m e ,    
 	 	           t r a n s i t i o n :   s e l f . o p t i o n s . t r a n s i t i o n T y p e ,  
 	 	           l i n k :   ' i g n o r e ' ,  
 	 	            
 	 	           o n S t a r t :   f u n c t i o n ( ) {  
 	 	 	 	 s e l f . i s S l i d i n g   =   1 ;     / / p r e v e n t s   e x t r a   c l i c k s  
 	 	 	 } ,  
 	 	            
 	 	           o n C o m p l e t e :   f u n c t i o n ( ) {  
 	 	 	 	 s e l f . i s S l i d i n g   =   0 ;     / / p r e v e n t s   e x t r a   c l i c k s  
 	 	 	 }  
 	 	            
 	 	 } ) ;  
 	 	  
 	 	  
 	 	  
                 i f ( s e l f . o p t i o n s . o r i e n t a t i o n   = =   ' v e r t i c a l ' ) {  
                         i f ( s e l f . o p t i o n s . f a d e   = =   t r u e ) { i t e m _ i n . s t a r t ( { ' o p a c i t y ' : [ 0 , 1 ] , ' t o p '   :   [ n e w Y ,   0 ] } ) ; }  
                         e l s e { i t e m _ i n . s t a r t ( { ' t o p '   :   [ n e w Y ,   0 ] } ) ; }  
                 } e l s e   i f ( s e l f . o p t i o n s . o r i e n t a t i o n   = =   ' n o n e ' )   {  
                         i t e m _ i n . s t a r t ( { ' o p a c i t y ' : [ 0 , 1 ] } ) ;  
                 } e l s e {  
                         i f ( s e l f . o p t i o n s . f a d e   = =   t r u e ) { i t e m _ i n . s t a r t ( { ' o p a c i t y ' : [ 0 , 1 ] , ' l e f t '   :   [ n e w X ,   0 ] } ) ; }  
                         e l s e { i t e m _ i n . s t a r t ( { ' l e f t '   :   [ n e w X ,   0 ] } ) ; }  
                 }  
                  
 	 	  
 	 	 i f ( c u r I t e m   ! =   n e w I t e m ) {  
 	 	 	 v a r   i t e m _ o u t   =   n e w   F x . M o r p h ( c u r I t e m ,   {  
 	 	 	 	           d u r a t i o n :   s e l f . o p t i o n s . t r a n s i t i o n T i m e ,    
 	 	 	 	           t r a n s i t i o n :   s e l f . o p t i o n s . t r a n s i t i o n T y p e ,  
 	 	 	 	           l i n k :   ' i g n o r e '  
 	 	 	 } ) ;  
 	 	 	  
 	 	 	 i f ( s e l f . o p t i o n s . n u m N a v A c t i v e   = =   t r u e ) {  
 	 	 	 	 c u r N u m I t e m . r e m o v e C l a s s ( ' a c t i v e ' ) ;  
 	 	 	 }  
 	 	 	  
                         i f ( s e l f . o p t i o n s . o r i e n t a t i o n   = =   ' v e r t i c a l ' ) {  
                                 i f ( s e l f . o p t i o n s . f a d e   = =   t r u e ) { i t e m _ o u t . s t a r t ( { ' o p a c i t y ' : [ 0 ] , ' t o p '   :   [ ( c u r Y ) ] } ) ; }  
                                 e l s e { i t e m _ o u t . s t a r t ( { ' t o p '   :   [ ( c u r Y ) ] } ) ; }  
                         } e l s e   i f ( s e l f . o p t i o n s . o r i e n t a t i o n   = =   ' n o n e ' )   {  
                                 i t e m _ o u t . s t a r t ( { ' o p a c i t y ' : [ 1 , 0 ] } ) ;  
                         } e l s e {  
                                 i f ( s e l f . o p t i o n s . f a d e   = =   t r u e ) { i t e m _ o u t . s t a r t ( { ' o p a c i t y ' : [ 0 ] , ' l e f t '   :   [ ( c u r X ) ] } ) ; }  
                                 e l s e { i t e m _ o u t . s t a r t ( { ' l e f t '   :   [ ( c u r X ) ] } ) ; }  
                         }  
 	 	 }  
 	 } ,  
 	  
 	  
 	 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 	 / / s u p p l e m e n t a r y   f u n c t i o n s     ( m i n i - f u n c t i o n s )  
 	 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 	 p a u s e I t :   f u n c t i o n   ( )   {  
 	 	  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	  
 	 	 / / o n l y   m o v e   i f   n o t   c u r r e n t l y   m o v i n g  
 	 	 i f ( s e l f . i s S l i d i n g   = =   0 ) {  
 	 	 	 i f ( s e l f . o p t i o n s . i s P a u s e d   = =   f a l s e ) {  
 	 	 	 	 s e l f . o p t i o n s . i s P a u s e d   =   t r u e ;  
 	 	 	 	 $ c l e a r ( s e l f . t i m e r ) ;  
 	 	 	 	 s e l f . o p t i o n s . p l a y B t n . s e t ( ' t e x t ' ,   ' > > ' ) ; 	 	 	 	  
 	 	 	 }  
 	 	 	 e l s e {  
 	 	 	 	 s e l f . o p t i o n s . i s P a u s e d   =   f a l s e ;  
 	 	 	 	 s e l f . s l i d e I t ( ) ;  
 	 	 	 	 s e l f . t i m e r   =   s e l f . s l i d e I t . p e r i o d i c a l ( s e l f . o p t i o n s . s l i d e T i m e r ,   t h i s ,   n u l l ) ;    
 	 	 	 	 s e l f . o p t i o n s . p l a y B t n . s e t ( ' t e x t ' ,   ' |     | ' ) ;  
 	 	 	 }  
 	 	 	  
 	 	 }   / / e n d   i f   n o t   s l i d i n g  
 	 	  
 	 } ,  
 	  
 	 c h a n g e I n d e x :   f u n c t i o n ( )   {  
 	 	 v a r   s e l f   =   t h i s ;    
 	 	  
 	 	 v a r   n u m I t e m s   =   s e l f . o p t i o n s . i t e m s . l e n g t h ;     / / g e t   n u m b e r   o f   s l i d e r   i t e m s  
 	 	  
 	 	 / / c h a n g e   i n d e x   b a s e d   o n   v a l u e   o f   ' d i r e c t i o n '   p a r a m e t e r  
 	 	 i f ( s e l f . d i r e c t i o n   = =   1 ) {  
 	 	 	 i f ( s e l f . o p t i o n s . i t e m N u m   <   ( n u m I t e m s   -   1 ) ) {  
 	 	 	 	 s e l f . o p t i o n s . i t e m N u m + + ;    
 	 	 	 }  
 	 	 	 e l s e {  
 	 	 	 	 s e l f . o p t i o n s . i t e m N u m   =   0 ;  
 	 	 	 }  
 	 	 }  
 	 	 e l s e   i f ( s e l f . d i r e c t i o n   = =   0 ) {  
 	 	 	 i f ( s e l f . o p t i o n s . i t e m N u m   >   0 ) {  
 	 	 	 	 s e l f . o p t i o n s . i t e m N u m - - ;    
 	 	 	 }  
 	 	 	 e l s e {  
 	 	 	 	 s e l f . o p t i o n s . i t e m N u m   =   ( n u m I t e m s   -   1 ) ;  
 	 	 	 }  
 	 	 } 	  
 	 	  
 	 } ,  
 	  
 	 n u m P r e s s :   f u n c t i o n   ( t h e I n d e x )   {  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	  
 	 	 i f ( ( s e l f . i s S l i d i n g   = =   0 )   & &   ( s e l f . o p t i o n s . i t e m N u m   ! =   t h e I n d e x ) ) {  
 	 	 	 i f ( s e l f . o p t i o n s . i s P a u s e d   = =   f a l s e ) {  
 	 	 	 	 $ c l e a r ( s e l f . t i m e r ) ;  
 	 	 	 	 s e l f . t i m e r   =   s e l f . s l i d e I t . p e r i o d i c a l ( s e l f . o p t i o n s . s l i d e T i m e r ,   t h i s ,   n u l l ) ;  
 	 	 	 }  
 	 	 	 s e l f . s l i d e I t ( t h e I n d e x ) ;  
 	 	 }  
 	 }  
 	 / / - - - - - - - - - - - - - - - - - - - - - - - -     e n d   s u p p .   f u n c t i o n s   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / /  
  
 } ) ; 
