ÿþ/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 P o w e r e d   a n d   d e s i g n e d     b y   B l u e C o . i r   |   B l u e S o f t C o . i r   |   W a n a l y s t . n e t   |   A14'/-Ì/1Ì. 'Ì1'F. i r  
 A14'/  -Ì/1Ì 
 ¯1HG  F1E  'A2'1Ì  "(Ì 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * / 
 ( f u n c t i o n ( $ ) { v a r   v e r = " 2 . 9 4 " ; i f ( $ . s u p p o r t = = u n d e f i n e d ) { $ . s u p p o r t = { o p a c i t y : ! ( $ . b r o w s e r . m s i e ) } ; } f u n c t i o n   d e b u g ( s ) { i f ( $ . f n . c y c l e . d e b u g ) { l o g ( s ) ; } } f u n c t i o n   l o g ( ) { i f ( w i n d o w . c o n s o l e & & w i n d o w . c o n s o l e . l o g ) { w i n d o w . c o n s o l e . l o g ( " [ c y c l e ]   " + A r r a y . p r o t o t y p e . j o i n . c a l l ( a r g u m e n t s , "   " ) ) ; } } $ . f n . c y c l e = f u n c t i o n ( o p t i o n s , a r g 2 ) { v a r   o = { s : t h i s . s e l e c t o r , c : t h i s . c o n t e x t } ; i f ( t h i s . l e n g t h = = = 0 & & o p t i o n s ! = " s t o p " ) { i f ( ! $ . i s R e a d y & & o . s ) { l o g ( " D O M   n o t   r e a d y ,   q u e u i n g   s l i d e s h o w " ) ; $ ( f u n c t i o n ( ) { $ ( o . s , o . c ) . c y c l e ( o p t i o n s , a r g 2 ) ; } ) ; r e t u r n   t h i s ; } l o g ( " t e r m i n a t i n g ;   z e r o   e l e m e n t s   f o u n d   b y   s e l e c t o r " + ( $ . i s R e a d y ? " " : "   ( D O M   n o t   r e a d y ) " ) ) ; r e t u r n   t h i s ; } r e t u r n   t h i s . e a c h ( f u n c t i o n ( ) { v a r   o p t s = h a n d l e A r g u m e n t s ( t h i s , o p t i o n s , a r g 2 ) ; i f ( o p t s = = = f a l s e ) { r e t u r n ; } o p t s . u p d a t e A c t i v e P a g e r L i n k = o p t s . u p d a t e A c t i v e P a g e r L i n k | | $ . f n . c y c l e . u p d a t e A c t i v e P a g e r L i n k ; i f ( t h i s . c y c l e T i m e o u t ) { c l e a r T i m e o u t ( t h i s . c y c l e T i m e o u t ) ; } t h i s . c y c l e T i m e o u t = t h i s . c y c l e P a u s e = 0 ; v a r   $ c o n t = $ ( t h i s ) ; v a r   $ s l i d e s = o p t s . s l i d e E x p r ? $ ( o p t s . s l i d e E x p r , t h i s ) : $ c o n t . c h i l d r e n ( ) ; v a r   e l s = $ s l i d e s . g e t ( ) ; i f ( e l s . l e n g t h < 2 ) { l o g ( " t e r m i n a t i n g ;   t o o   f e w   s l i d e s :   " + e l s . l e n g t h ) ; r e t u r n ; } v a r   o p t s 2 = b u i l d O p t i o n s ( $ c o n t , $ s l i d e s , e l s , o p t s , o ) ; i f ( o p t s 2 = = = f a l s e ) { r e t u r n ; } v a r   s t a r t T i m e = o p t s 2 . c o n t i n u o u s ? 1 0 : g e t T i m e o u t ( e l s [ o p t s 2 . c u r r S l i d e ] , e l s [ o p t s 2 . n e x t S l i d e ] , o p t s 2 , ! o p t s 2 . b a c k w a r d s ) ; i f ( s t a r t T i m e ) { s t a r t T i m e + = ( o p t s 2 . d e l a y | | 0 ) ; i f ( s t a r t T i m e < 1 0 ) { s t a r t T i m e = 1 0 ; } d e b u g ( " f i r s t   t i m e o u t :   " + s t a r t T i m e ) ; t h i s . c y c l e T i m e o u t = s e t T i m e o u t ( f u n c t i o n ( ) { g o ( e l s , o p t s 2 , 0 , ! o p t s . b a c k w a r d s ) ; } , s t a r t T i m e ) ; } } ) ; } ; f u n c t i o n   h a n d l e A r g u m e n t s ( c o n t , o p t i o n s , a r g 2 ) { i f ( c o n t . c y c l e S t o p = = u n d e f i n e d ) { c o n t . c y c l e S t o p = 0 ; } i f ( o p t i o n s = = = u n d e f i n e d | | o p t i o n s = = = n u l l ) { o p t i o n s = { } ; } i f ( o p t i o n s . c o n s t r u c t o r = = S t r i n g ) { s w i t c h ( o p t i o n s ) { c a s e " d e s t r o y " : c a s e " s t o p " : v a r   o p t s = $ ( c o n t ) . d a t a ( " c y c l e . o p t s " ) ; i f ( ! o p t s ) { r e t u r n   f a l s e ; } c o n t . c y c l e S t o p + + ; i f ( c o n t . c y c l e T i m e o u t ) { c l e a r T i m e o u t ( c o n t . c y c l e T i m e o u t ) ; } c o n t . c y c l e T i m e o u t = 0 ; $ ( c o n t ) . r e m o v e D a t a ( " c y c l e . o p t s " ) ; i f ( o p t i o n s = = " d e s t r o y " ) { d e s t r o y ( o p t s ) ; } r e t u r n   f a l s e ; c a s e " t o g g l e " : c o n t . c y c l e P a u s e = ( c o n t . c y c l e P a u s e = = = 1 ) ? 0 : 1 ; c h e c k I n s t a n t R e s u m e ( c o n t . c y c l e P a u s e , a r g 2 , c o n t ) ; r e t u r n   f a l s e ; c a s e " p a u s e " : c o n t . c y c l e P a u s e = 1 ; r e t u r n   f a l s e ; c a s e " r e s u m e " : c o n t . c y c l e P a u s e = 0 ; c h e c k I n s t a n t R e s u m e ( f a l s e , a r g 2 , c o n t ) ; r e t u r n   f a l s e ; c a s e " p r e v " : c a s e " n e x t " : v a r   o p t s = $ ( c o n t ) . d a t a ( " c y c l e . o p t s " ) ; i f ( ! o p t s ) { l o g ( ' o p t i o n s   n o t   f o u n d ,   " p r e v / n e x t "   i g n o r e d ' ) ; r e t u r n   f a l s e ; } $ . f n . c y c l e [ o p t i o n s ] ( o p t s ) ; r e t u r n   f a l s e ; d e f a u l t : o p t i o n s = { f x : o p t i o n s } ; } r e t u r n   o p t i o n s ; } e l s e { i f ( o p t i o n s . c o n s t r u c t o r = = N u m b e r ) { v a r   n u m = o p t i o n s ; o p t i o n s = $ ( c o n t ) . d a t a ( " c y c l e . o p t s " ) ; i f ( ! o p t i o n s ) { l o g ( " o p t i o n s   n o t   f o u n d ,   c a n   n o t   a d v a n c e   s l i d e " ) ; r e t u r n   f a l s e ; } i f ( n u m < 0 | | n u m > = o p t i o n s . e l e m e n t s . l e n g t h ) { l o g ( " i n v a l i d   s l i d e   i n d e x :   " + n u m ) ; r e t u r n   f a l s e ; } o p t i o n s . n e x t S l i d e = n u m ; i f ( c o n t . c y c l e T i m e o u t ) { c l e a r T i m e o u t ( c o n t . c y c l e T i m e o u t ) ; c o n t . c y c l e T i m e o u t = 0 ; } i f ( t y p e o f   a r g 2 = = " s t r i n g " ) { o p t i o n s . o n e T i m e F x = a r g 2 ; } g o ( o p t i o n s . e l e m e n t s , o p t i o n s , 1 , n u m > = o p t i o n s . c u r r S l i d e ) ; r e t u r n   f a l s e ; } } r e t u r n   o p t i o n s ; f u n c t i o n   c h e c k I n s t a n t R e s u m e ( i s P a u s e d , a r g 2 , c o n t ) { i f ( ! i s P a u s e d & & a r g 2 = = = t r u e ) { v a r   o p t i o n s = $ ( c o n t ) . d a t a ( " c y c l e . o p t s " ) ; i f ( ! o p t i o n s ) { l o g ( " o p t i o n s   n o t   f o u n d ,   c a n   n o t   r e s u m e " ) ; r e t u r n   f a l s e ; } i f ( c o n t . c y c l e T i m e o u t ) { c l e a r T i m e o u t ( c o n t . c y c l e T i m e o u t ) ; c o n t . c y c l e T i m e o u t = 0 ; } g o ( o p t i o n s . e l e m e n t s , o p t i o n s , 1 , ! o p t i o n s . b a c k w a r d s ) ; } } } f u n c t i o n   r e m o v e F i l t e r ( e l , o p t s ) { i f ( ! $ . s u p p o r t . o p a c i t y & & o p t s . c l e a r t y p e & & e l . s t y l e . f i l t e r ) { t r y { e l . s t y l e . r e m o v e A t t r i b u t e ( " f i l t e r " ) ; } c a t c h ( s m o t h e r ) { } } } f u n c t i o n   d e s t r o y ( o p t s ) { i f ( o p t s . n e x t ) { $ ( o p t s . n e x t ) . u n b i n d ( o p t s . p r e v N e x t E v e n t ) ; } i f ( o p t s . p r e v ) { $ ( o p t s . p r e v ) . u n b i n d ( o p t s . p r e v N e x t E v e n t ) ; } i f ( o p t s . p a g e r | | o p t s . p a g e r A n c h o r B u i l d e r ) { $ . e a c h ( o p t s . p a g e r A n c h o r s | | [ ] , f u n c t i o n ( ) { t h i s . u n b i n d ( ) . r e m o v e ( ) ; } ) ; } o p t s . p a g e r A n c h o r s = n u l l ; i f ( o p t s . d e s t r o y ) { o p t s . d e s t r o y ( o p t s ) ; } } f u n c t i o n   b u i l d O p t i o n s ( $ c o n t , $ s l i d e s , e l s , o p t i o n s , o ) { v a r   o p t s = $ . e x t e n d ( { } , $ . f n . c y c l e . d e f a u l t s , o p t i o n s | | { } , $ . m e t a d a t a ? $ c o n t . m e t a d a t a ( ) : $ . m e t a ? $ c o n t . d a t a ( ) : { } ) ; i f ( o p t s . a u t o s t o p ) { o p t s . c o u n t d o w n = o p t s . a u t o s t o p C o u n t | | e l s . l e n g t h ; } v a r   c o n t = $ c o n t [ 0 ] ; $ c o n t . d a t a ( " c y c l e . o p t s " , o p t s ) ; o p t s . $ c o n t = $ c o n t ; o p t s . s t o p C o u n t = c o n t . c y c l e S t o p ; o p t s . e l e m e n t s = e l s ; o p t s . b e f o r e = o p t s . b e f o r e ? [ o p t s . b e f o r e ] : [ ] ; o p t s . a f t e r = o p t s . a f t e r ? [ o p t s . a f t e r ] : [ ] ; o p t s . a f t e r . u n s h i f t ( f u n c t i o n ( ) { o p t s . b u s y = 0 ; } ) ; i f ( ! $ . s u p p o r t . o p a c i t y & & o p t s . c l e a r t y p e ) { o p t s . a f t e r . p u s h ( f u n c t i o n ( ) { r e m o v e F i l t e r ( t h i s , o p t s ) ; } ) ; } i f ( o p t s . c o n t i n u o u s ) { o p t s . a f t e r . p u s h ( f u n c t i o n ( ) { g o ( e l s , o p t s , 0 , ! o p t s . b a c k w a r d s ) ; } ) ; } s a v e O r i g i n a l O p t s ( o p t s ) ; i f ( ! $ . s u p p o r t . o p a c i t y & & o p t s . c l e a r t y p e & & ! o p t s . c l e a r t y p e N o B g ) { c l e a r T y p e F i x ( $ s l i d e s ) ; } i f ( $ c o n t . c s s ( " p o s i t i o n " ) = = " s t a t i c " ) { $ c o n t . c s s ( " p o s i t i o n " , " r e l a t i v e " ) ; } i f ( o p t s . w i d t h ) { $ c o n t . w i d t h ( o p t s . w i d t h ) ; } i f ( o p t s . h e i g h t & & o p t s . h e i g h t ! = " a u t o " ) { $ c o n t . h e i g h t ( o p t s . h e i g h t ) ; } i f ( o p t s . s t a r t i n g S l i d e ) { o p t s . s t a r t i n g S l i d e = p a r s e I n t ( o p t s . s t a r t i n g S l i d e ) ; } e l s e { i f ( o p t s . b a c k w a r d s ) { o p t s . s t a r t i n g S l i d e = e l s . l e n g t h - 1 ; } } i f ( o p t s . r a n d o m ) { o p t s . r a n d o m M a p = [ ] ; f o r ( v a r   i = 0 ; i < e l s . l e n g t h ; i + + ) { o p t s . r a n d o m M a p . p u s h ( i ) ; } o p t s . r a n d o m M a p . s o r t ( f u n c t i o n ( a , b ) { r e t u r n   M a t h . r a n d o m ( ) - 0 . 5 ; } ) ; o p t s . r a n d o m I n d e x = 1 ; o p t s . s t a r t i n g S l i d e = o p t s . r a n d o m M a p [ 1 ] ; } e l s e { i f ( o p t s . s t a r t i n g S l i d e > = e l s . l e n g t h ) { o p t s . s t a r t i n g S l i d e = 0 ; } } o p t s . c u r r S l i d e = o p t s . s t a r t i n g S l i d e | | 0 ; v a r   f i r s t = o p t s . s t a r t i n g S l i d e ; $ s l i d e s . c s s ( { p o s i t i o n : " a b s o l u t e " , t o p : 0 , l e f t : 0 } ) . h i d e ( ) . e a c h ( f u n c t i o n ( i ) { v a r   z ; i f ( o p t s . b a c k w a r d s ) { z = f i r s t ? i < = f i r s t ? e l s . l e n g t h + ( i - f i r s t ) : f i r s t - i : e l s . l e n g t h - i ; } e l s e { z = f i r s t ? i > = f i r s t ? e l s . l e n g t h - ( i - f i r s t ) : f i r s t - i : e l s . l e n g t h - i ; } $ ( t h i s ) . c s s ( " z - i n d e x " , z ) ; } ) ; $ ( e l s [ f i r s t ] ) . c s s ( " o p a c i t y " , 1 ) . s h o w ( ) ; r e m o v e F i l t e r ( e l s [ f i r s t ] , o p t s ) ; i f ( o p t s . f i t & & o p t s . w i d t h ) { $ s l i d e s . w i d t h ( o p t s . w i d t h ) ; } i f ( o p t s . f i t & & o p t s . h e i g h t & & o p t s . h e i g h t ! = " a u t o " ) { $ s l i d e s . h e i g h t ( o p t s . h e i g h t ) ; } v a r   r e s h a p e = o p t s . c o n t a i n e r R e s i z e & & ! $ c o n t . i n n e r H e i g h t ( ) ; i f ( r e s h a p e ) { v a r   m a x w = 0 , m a x h = 0 ; f o r ( v a r   j = 0 ; j < e l s . l e n g t h ; j + + ) { v a r   $ e = $ ( e l s [ j ] ) , e = $ e [ 0 ] , w = $ e . o u t e r W i d t h ( ) , h = $ e . o u t e r H e i g h t ( ) ; i f ( ! w ) { w = e . o f f s e t W i d t h | | e . w i d t h | | $ e . a t t r ( " w i d t h " ) ; } i f ( ! h ) { h = e . o f f s e t H e i g h t | | e . h e i g h t | | $ e . a t t r ( " h e i g h t " ) ; } m a x w = w > m a x w ? w : m a x w ; m a x h = h > m a x h ? h : m a x h ; } i f ( m a x w > 0 & & m a x h > 0 ) { $ c o n t . c s s ( { w i d t h : m a x w + " p x " , h e i g h t : m a x h + " p x " } ) ; } } i f ( o p t s . p a u s e ) { $ c o n t . h o v e r ( f u n c t i o n ( ) { t h i s . c y c l e P a u s e + + ; } , f u n c t i o n ( ) { t h i s . c y c l e P a u s e - - ; } ) ; } i f ( s u p p o r t M u l t i T r a n s i t i o n s ( o p t s ) = = = f a l s e ) { r e t u r n   f a l s e ; } v a r   r e q u e u e = f a l s e ; o p t i o n s . r e q u e u e A t t e m p t s = o p t i o n s . r e q u e u e A t t e m p t s | | 0 ; $ s l i d e s . e a c h ( f u n c t i o n ( ) { v a r   $ e l = $ ( t h i s ) ; t h i s . c y c l e H = ( o p t s . f i t & & o p t s . h e i g h t ) ? o p t s . h e i g h t : ( $ e l . h e i g h t ( ) | | t h i s . o f f s e t H e i g h t | | t h i s . h e i g h t | | $ e l . a t t r ( " h e i g h t " ) | | 0 ) ; t h i s . c y c l e W = ( o p t s . f i t & & o p t s . w i d t h ) ? o p t s . w i d t h : ( $ e l . w i d t h ( ) | | t h i s . o f f s e t W i d t h | | t h i s . w i d t h | | $ e l . a t t r ( " w i d t h " ) | | 0 ) ; i f ( $ e l . i s ( " i m g " ) ) { v a r   l o a d i n g I E = ( $ . b r o w s e r . m s i e & & t h i s . c y c l e W = = 2 8 & & t h i s . c y c l e H = = 3 0 & & ! t h i s . c o m p l e t e ) ; v a r   l o a d i n g F F = ( $ . b r o w s e r . m o z i l l a & & t h i s . c y c l e W = = 3 4 & & t h i s . c y c l e H = = 1 9 & & ! t h i s . c o m p l e t e ) ; v a r   l o a d i n g O p = ( $ . b r o w s e r . o p e r a & & ( ( t h i s . c y c l e W = = 4 2 & & t h i s . c y c l e H = = 1 9 ) | | ( t h i s . c y c l e W = = 3 7 & & t h i s . c y c l e H = = 1 7 ) ) & & ! t h i s . c o m p l e t e ) ; v a r   l o a d i n g O t h e r = ( t h i s . c y c l e H = = 0 & & t h i s . c y c l e W = = 0 & & ! t h i s . c o m p l e t e ) ; i f ( l o a d i n g I E | | l o a d i n g F F | | l o a d i n g O p | | l o a d i n g O t h e r ) { i f ( o . s & & o p t s . r e q u e u e O n I m a g e N o t L o a d e d & & + + o p t i o n s . r e q u e u e A t t e m p t s < 1 0 0 ) { l o g ( o p t i o n s . r e q u e u e A t t e m p t s , "   -   i m g   s l i d e   n o t   l o a d e d ,   r e q u e u i n g   s l i d e s h o w :   " , t h i s . s r c , t h i s . c y c l e W , t h i s . c y c l e H ) ; s e t T i m e o u t ( f u n c t i o n ( ) { $ ( o . s , o . c ) . c y c l e ( o p t i o n s ) ; } , o p t s . r e q u e u e T i m e o u t ) ; r e q u e u e = t r u e ; r e t u r n   f a l s e ; } e l s e { l o g ( " c o u l d   n o t   d e t e r m i n e   s i z e   o f   i m a g e :   " + t h i s . s r c , t h i s . c y c l e W , t h i s . c y c l e H ) ; } } } r e t u r n   t r u e ; } ) ; i f ( r e q u e u e ) { r e t u r n   f a l s e ; } o p t s . c s s B e f o r e = o p t s . c s s B e f o r e | | { } ; o p t s . a n i m I n = o p t s . a n i m I n | | { } ; o p t s . a n i m O u t = o p t s . a n i m O u t | | { } ; $ s l i d e s . n o t ( " : e q ( " + f i r s t + " ) " ) . c s s ( o p t s . c s s B e f o r e ) ; i f ( o p t s . c s s F i r s t ) { $ ( $ s l i d e s [ f i r s t ] ) . c s s ( o p t s . c s s F i r s t ) ; } i f ( o p t s . t i m e o u t ) { o p t s . t i m e o u t = p a r s e I n t ( o p t s . t i m e o u t ) ; i f ( o p t s . s p e e d . c o n s t r u c t o r = = S t r i n g ) { o p t s . s p e e d = $ . f x . s p e e d s [ o p t s . s p e e d ] | | p a r s e I n t ( o p t s . s p e e d ) ; } i f ( ! o p t s . s y n c ) { o p t s . s p e e d = o p t s . s p e e d / 2 ; } v a r   b u f f e r = o p t s . f x = = " s h u f f l e " ? 5 0 0 : 2 5 0 ; w h i l e ( ( o p t s . t i m e o u t - o p t s . s p e e d ) < b u f f e r ) { o p t s . t i m e o u t + = o p t s . s p e e d ; } } i f ( o p t s . e a s i n g ) { o p t s . e a s e I n = o p t s . e a s e O u t = o p t s . e a s i n g ; } i f ( ! o p t s . s p e e d I n ) { o p t s . s p e e d I n = o p t s . s p e e d ; } i f ( ! o p t s . s p e e d O u t ) { o p t s . s p e e d O u t = o p t s . s p e e d ; } o p t s . s l i d e C o u n t = e l s . l e n g t h ; o p t s . c u r r S l i d e = o p t s . l a s t S l i d e = f i r s t ; i f ( o p t s . r a n d o m ) { i f ( + + o p t s . r a n d o m I n d e x = = e l s . l e n g t h ) { o p t s . r a n d o m I n d e x = 0 ; } o p t s . n e x t S l i d e = o p t s . r a n d o m M a p [ o p t s . r a n d o m I n d e x ] ; } e l s e { i f ( o p t s . b a c k w a r d s ) { o p t s . n e x t S l i d e = o p t s . s t a r t i n g S l i d e = = 0 ? ( e l s . l e n g t h - 1 ) : o p t s . s t a r t i n g S l i d e - 1 ; } e l s e { o p t s . n e x t S l i d e = o p t s . s t a r t i n g S l i d e > = ( e l s . l e n g t h - 1 ) ? 0 : o p t s . s t a r t i n g S l i d e + 1 ; } } i f ( ! o p t s . m u l t i F x ) { v a r   i n i t = $ . f n . c y c l e . t r a n s i t i o n s [ o p t s . f x ] ; i f ( $ . i s F u n c t i o n ( i n i t ) ) { i n i t ( $ c o n t , $ s l i d e s , o p t s ) ; } e l s e { i f ( o p t s . f x ! = " c u s t o m " & & ! o p t s . m u l t i F x ) { l o g ( " u n k n o w n   t r a n s i t i o n :   " + o p t s . f x , " ;   s l i d e s h o w   t e r m i n a t i n g " ) ; r e t u r n   f a l s e ; } } } v a r   e 0 = $ s l i d e s [ f i r s t ] ; i f ( o p t s . b e f o r e . l e n g t h ) { o p t s . b e f o r e [ 0 ] . a p p l y ( e 0 , [ e 0 , e 0 , o p t s , t r u e ] ) ; } i f ( o p t s . a f t e r . l e n g t h > 1 ) { o p t s . a f t e r [ 1 ] . a p p l y ( e 0 , [ e 0 , e 0 , o p t s , t r u e ] ) ; } i f ( o p t s . n e x t ) { $ ( o p t s . n e x t ) . b i n d ( o p t s . p r e v N e x t E v e n t , f u n c t i o n ( ) { r e t u r n   a d v a n c e ( o p t s , 1 ) ; } ) ; } i f ( o p t s . p r e v ) { $ ( o p t s . p r e v ) . b i n d ( o p t s . p r e v N e x t E v e n t , f u n c t i o n ( ) { r e t u r n   a d v a n c e ( o p t s , 0 ) ; } ) ; } i f ( o p t s . p a g e r | | o p t s . p a g e r A n c h o r B u i l d e r ) { b u i l d P a g e r ( e l s , o p t s ) ; } e x p o s e A d d S l i d e ( o p t s , e l s ) ; r e t u r n   o p t s ; } f u n c t i o n   s a v e O r i g i n a l O p t s ( o p t s ) { o p t s . o r i g i n a l = { b e f o r e : [ ] , a f t e r : [ ] } ; o p t s . o r i g i n a l . c s s B e f o r e = $ . e x t e n d ( { } , o p t s . c s s B e f o r e ) ; o p t s . o r i g i n a l . c s s A f t e r = $ . e x t e n d ( { } , o p t s . c s s A f t e r ) ; o p t s . o r i g i n a l . a n i m I n = $ . e x t e n d ( { } , o p t s . a n i m I n ) ; o p t s . o r i g i n a l . a n i m O u t = $ . e x t e n d ( { } , o p t s . a n i m O u t ) ; $ . e a c h ( o p t s . b e f o r e , f u n c t i o n ( ) { o p t s . o r i g i n a l . b e f o r e . p u s h ( t h i s ) ; } ) ; $ . e a c h ( o p t s . a f t e r , f u n c t i o n ( ) { o p t s . o r i g i n a l . a f t e r . p u s h ( t h i s ) ; } ) ; } f u n c t i o n   s u p p o r t M u l t i T r a n s i t i o n s ( o p t s ) { v a r   i , t x , t x s = $ . f n . c y c l e . t r a n s i t i o n s ; i f ( o p t s . f x . i n d e x O f ( " , " ) > 0 ) { o p t s . m u l t i F x = t r u e ; o p t s . f x s = o p t s . f x . r e p l a c e ( / \ s * / g , " " ) . s p l i t ( " , " ) ; f o r ( i = 0 ; i < o p t s . f x s . l e n g t h ; i + + ) { v a r   f x = o p t s . f x s [ i ] ; t x = t x s [ f x ] ; i f ( ! t x | | ! t x s . h a s O w n P r o p e r t y ( f x ) | | ! $ . i s F u n c t i o n ( t x ) ) { l o g ( " d i s c a r d i n g   u n k n o w n   t r a n s i t i o n :   " , f x ) ; o p t s . f x s . s p l i c e ( i , 1 ) ; i - - ; } } i f ( ! o p t s . f x s . l e n g t h ) { l o g ( " N o   v a l i d   t r a n s i t i o n s   n a m e d ;   s l i d e s h o w   t e r m i n a t i n g . " ) ; r e t u r n   f a l s e ; } } e l s e { i f ( o p t s . f x = = " a l l " ) { o p t s . m u l t i F x = t r u e ; o p t s . f x s = [ ] ; f o r ( p   i n   t x s ) { t x = t x s [ p ] ; i f ( t x s . h a s O w n P r o p e r t y ( p ) & & $ . i s F u n c t i o n ( t x ) ) { o p t s . f x s . p u s h ( p ) ; } } } } i f ( o p t s . m u l t i F x & & o p t s . r a n d o m i z e E f f e c t s ) { v a r   r 1 = M a t h . f l o o r ( M a t h . r a n d o m ( ) * 2 0 ) + 3 0 ; f o r ( i = 0 ; i < r 1 ; i + + ) { v a r   r 2 = M a t h . f l o o r ( M a t h . r a n d o m ( ) * o p t s . f x s . l e n g t h ) ; o p t s . f x s . p u s h ( o p t s . f x s . s p l i c e ( r 2 , 1 ) [ 0 ] ) ; } d e b u g ( " r a n d o m i z e d   f x   s e q u e n c e :   " , o p t s . f x s ) ; } r e t u r n   t r u e ; } f u n c t i o n   e x p o s e A d d S l i d e ( o p t s , e l s ) { o p t s . a d d S l i d e = f u n c t i o n ( n e w S l i d e , p r e p e n d ) { v a r   $ s = $ ( n e w S l i d e ) , s = $ s [ 0 ] ; i f ( ! o p t s . a u t o s t o p C o u n t ) { o p t s . c o u n t d o w n + + ; } e l s [ p r e p e n d ? " u n s h i f t " : " p u s h " ] ( s ) ; i f ( o p t s . e l s ) { o p t s . e l s [ p r e p e n d ? " u n s h i f t " : " p u s h " ] ( s ) ; } o p t s . s l i d e C o u n t = e l s . l e n g t h ; $ s . c s s ( " p o s i t i o n " , " a b s o l u t e " ) ; $ s [ p r e p e n d ? " p r e p e n d T o " : " a p p e n d T o " ] ( o p t s . $ c o n t ) ; i f ( p r e p e n d ) { o p t s . c u r r S l i d e + + ; o p t s . n e x t S l i d e + + ; } i f ( ! $ . s u p p o r t . o p a c i t y & & o p t s . c l e a r t y p e & & ! o p t s . c l e a r t y p e N o B g ) { c l e a r T y p e F i x ( $ s ) ; } i f ( o p t s . f i t & & o p t s . w i d t h ) { $ s . w i d t h ( o p t s . w i d t h ) ; } i f ( o p t s . f i t & & o p t s . h e i g h t & & o p t s . h e i g h t ! = " a u t o " ) { $ s . h e i g h t ( o p t s . h e i g h t ) ; } s . c y c l e H = ( o p t s . f i t & & o p t s . h e i g h t ) ? o p t s . h e i g h t : $ s . h e i g h t ( ) ; s . c y c l e W = ( o p t s . f i t & & o p t s . w i d t h ) ? o p t s . w i d t h : $ s . w i d t h ( ) ; $ s . c s s ( o p t s . c s s B e f o r e ) ; i f ( o p t s . p a g e r | | o p t s . p a g e r A n c h o r B u i l d e r ) { $ . f n . c y c l e . c r e a t e P a g e r A n c h o r ( e l s . l e n g t h - 1 , s , $ ( o p t s . p a g e r ) , e l s , o p t s ) ; } i f ( $ . i s F u n c t i o n ( o p t s . o n A d d S l i d e ) ) { o p t s . o n A d d S l i d e ( $ s ) ; } e l s e { $ s . h i d e ( ) ; } } ; } $ . f n . c y c l e . r e s e t S t a t e = f u n c t i o n ( o p t s , f x ) { f x = f x | | o p t s . f x ; o p t s . b e f o r e = [ ] ; o p t s . a f t e r = [ ] ; o p t s . c s s B e f o r e = $ . e x t e n d ( { } , o p t s . o r i g i n a l . c s s B e f o r e ) ; o p t s . c s s A f t e r = $ . e x t e n d ( { } , o p t s . o r i g i n a l . c s s A f t e r ) ; o p t s . a n i m I n = $ . e x t e n d ( { } , o p t s . o r i g i n a l . a n i m I n ) ; o p t s . a n i m O u t = $ . e x t e n d ( { } , o p t s . o r i g i n a l . a n i m O u t ) ; o p t s . f x F n = n u l l ; $ . e a c h ( o p t s . o r i g i n a l . b e f o r e , f u n c t i o n ( ) { o p t s . b e f o r e . p u s h ( t h i s ) ; } ) ; $ . e a c h ( o p t s . o r i g i n a l . a f t e r , f u n c t i o n ( ) { o p t s . a f t e r . p u s h ( t h i s ) ; } ) ; v a r   i n i t = $ . f n . c y c l e . t r a n s i t i o n s [ f x ] ; i f ( $ . i s F u n c t i o n ( i n i t ) ) { i n i t ( o p t s . $ c o n t , $ ( o p t s . e l e m e n t s ) , o p t s ) ; } } ; f u n c t i o n   g o ( e l s , o p t s , m a n u a l , f w d ) { i f ( m a n u a l & & o p t s . b u s y & & o p t s . m a n u a l T r u m p ) { d e b u g ( " m a n u a l T r u m p   i n   g o ( ) ,   s t o p p i n g   a c t i v e   t r a n s i t i o n " ) ; $ ( e l s ) . s t o p ( t r u e , t r u e ) ; o p t s . b u s y = f a l s e ; } i f ( o p t s . b u s y ) { d e b u g ( " t r a n s i t i o n   a c t i v e ,   i g n o r i n g   n e w   t x   r e q u e s t " ) ; r e t u r n ; } v a r   p = o p t s . $ c o n t [ 0 ] , c u r r = e l s [ o p t s . c u r r S l i d e ] , n e x t = e l s [ o p t s . n e x t S l i d e ] ; i f ( p . c y c l e S t o p ! = o p t s . s t o p C o u n t | | p . c y c l e T i m e o u t = = = 0 & & ! m a n u a l ) { r e t u r n ; } i f ( ! m a n u a l & & ! p . c y c l e P a u s e & & ! o p t s . b o u n c e & & ( ( o p t s . a u t o s t o p & & ( - - o p t s . c o u n t d o w n < = 0 ) ) | | ( o p t s . n o w r a p & & ! o p t s . r a n d o m & & o p t s . n e x t S l i d e < o p t s . c u r r S l i d e ) ) ) { i f ( o p t s . e n d ) { o p t s . e n d ( o p t s ) ; } r e t u r n ; } v a r   c h a n g e d = f a l s e ; i f ( ( m a n u a l | | ! p . c y c l e P a u s e ) & & ( o p t s . n e x t S l i d e ! = o p t s . c u r r S l i d e ) ) { c h a n g e d = t r u e ; v a r   f x = o p t s . f x ; c u r r . c y c l e H = c u r r . c y c l e H | | $ ( c u r r ) . h e i g h t ( ) ; c u r r . c y c l e W = c u r r . c y c l e W | | $ ( c u r r ) . w i d t h ( ) ; n e x t . c y c l e H = n e x t . c y c l e H | | $ ( n e x t ) . h e i g h t ( ) ; n e x t . c y c l e W = n e x t . c y c l e W | | $ ( n e x t ) . w i d t h ( ) ; i f ( o p t s . m u l t i F x ) { i f ( o p t s . l a s t F x = = u n d e f i n e d | | + + o p t s . l a s t F x > = o p t s . f x s . l e n g t h ) { o p t s . l a s t F x = 0 ; } f x = o p t s . f x s [ o p t s . l a s t F x ] ; o p t s . c u r r F x = f x ; } i f ( o p t s . o n e T i m e F x ) { f x = o p t s . o n e T i m e F x ; o p t s . o n e T i m e F x = n u l l ; } $ . f n . c y c l e . r e s e t S t a t e ( o p t s , f x ) ; i f ( o p t s . b e f o r e . l e n g t h ) { $ . e a c h ( o p t s . b e f o r e , f u n c t i o n ( i , o ) { i f ( p . c y c l e S t o p ! = o p t s . s t o p C o u n t ) { r e t u r n ; } o . a p p l y ( n e x t , [ c u r r , n e x t , o p t s , f w d ] ) ; } ) ; } v a r   a f t e r = f u n c t i o n ( ) { $ . e a c h ( o p t s . a f t e r , f u n c t i o n ( i , o ) { i f ( p . c y c l e S t o p ! = o p t s . s t o p C o u n t ) { r e t u r n ; } o . a p p l y ( n e x t , [ c u r r , n e x t , o p t s , f w d ] ) ; } ) ; } ; d e b u g ( " t x   f i r i n g ;   c u r r S l i d e :   " + o p t s . c u r r S l i d e + " ;   n e x t S l i d e :   " + o p t s . n e x t S l i d e ) ; o p t s . b u s y = 1 ; i f ( o p t s . f x F n ) { o p t s . f x F n ( c u r r , n e x t , o p t s , a f t e r , f w d , m a n u a l & & o p t s . f a s t O n E v e n t ) ; } e l s e { i f ( $ . i s F u n c t i o n ( $ . f n . c y c l e [ o p t s . f x ] ) ) { $ . f n . c y c l e [ o p t s . f x ] ( c u r r , n e x t , o p t s , a f t e r , f w d , m a n u a l & & o p t s . f a s t O n E v e n t ) ; } e l s e { $ . f n . c y c l e . c u s t o m ( c u r r , n e x t , o p t s , a f t e r , f w d , m a n u a l & & o p t s . f a s t O n E v e n t ) ; } } } i f ( c h a n g e d | | o p t s . n e x t S l i d e = = o p t s . c u r r S l i d e ) { o p t s . l a s t S l i d e = o p t s . c u r r S l i d e ; i f ( o p t s . r a n d o m ) { o p t s . c u r r S l i d e = o p t s . n e x t S l i d e ; i f ( + + o p t s . r a n d o m I n d e x = = e l s . l e n g t h ) { o p t s . r a n d o m I n d e x = 0 ; } o p t s . n e x t S l i d e = o p t s . r a n d o m M a p [ o p t s . r a n d o m I n d e x ] ; i f ( o p t s . n e x t S l i d e = = o p t s . c u r r S l i d e ) { o p t s . n e x t S l i d e = ( o p t s . c u r r S l i d e = = o p t s . s l i d e C o u n t - 1 ) ? 0 : o p t s . c u r r S l i d e + 1 ; } } e l s e { i f ( o p t s . b a c k w a r d s ) { v a r   r o l l = ( o p t s . n e x t S l i d e - 1 ) < 0 ; i f ( r o l l & & o p t s . b o u n c e ) { o p t s . b a c k w a r d s = ! o p t s . b a c k w a r d s ; o p t s . n e x t S l i d e = 1 ; o p t s . c u r r S l i d e = 0 ; } e l s e { o p t s . n e x t S l i d e = r o l l ? ( e l s . l e n g t h - 1 ) : o p t s . n e x t S l i d e - 1 ; o p t s . c u r r S l i d e = r o l l ? 0 : o p t s . n e x t S l i d e + 1 ; } } e l s e { v a r   r o l l = ( o p t s . n e x t S l i d e + 1 ) = = e l s . l e n g t h ; i f ( r o l l & & o p t s . b o u n c e ) { o p t s . b a c k w a r d s = ! o p t s . b a c k w a r d s ; o p t s . n e x t S l i d e = e l s . l e n g t h - 2 ; o p t s . c u r r S l i d e = e l s . l e n g t h - 1 ; } e l s e { o p t s . n e x t S l i d e = r o l l ? 0 : o p t s . n e x t S l i d e + 1 ; o p t s . c u r r S l i d e = r o l l ? e l s . l e n g t h - 1 : o p t s . n e x t S l i d e - 1 ; } } } } i f ( c h a n g e d & & o p t s . p a g e r ) { o p t s . u p d a t e A c t i v e P a g e r L i n k ( o p t s . p a g e r , o p t s . c u r r S l i d e , o p t s . a c t i v e P a g e r C l a s s ) ; } v a r   m s = 0 ; i f ( o p t s . t i m e o u t & & ! o p t s . c o n t i n u o u s ) { m s = g e t T i m e o u t ( e l s [ o p t s . c u r r S l i d e ] , e l s [ o p t s . n e x t S l i d e ] , o p t s , f w d ) ; } e l s e { i f ( o p t s . c o n t i n u o u s & & p . c y c l e P a u s e ) { m s = 1 0 ; } } i f ( m s > 0 ) { p . c y c l e T i m e o u t = s e t T i m e o u t ( f u n c t i o n ( ) { g o ( e l s , o p t s , 0 , ! o p t s . b a c k w a r d s ) ; } , m s ) ; } } $ . f n . c y c l e . u p d a t e A c t i v e P a g e r L i n k = f u n c t i o n ( p a g e r , c u r r S l i d e , c l s N a m e ) { $ ( p a g e r ) . e a c h ( f u n c t i o n ( ) { $ ( t h i s ) . c h i l d r e n ( ) . r e m o v e C l a s s ( c l s N a m e ) . e q ( c u r r S l i d e ) . a d d C l a s s ( c l s N a m e ) ; } ) ; } ; f u n c t i o n   g e t T i m e o u t ( c u r r , n e x t , o p t s , f w d ) { i f ( o p t s . t i m e o u t F n ) { v a r   t = o p t s . t i m e o u t F n . c a l l ( c u r r , c u r r , n e x t , o p t s , f w d ) ; w h i l e ( ( t - o p t s . s p e e d ) < 2 5 0 ) { t + = o p t s . s p e e d ; } d e b u g ( " c a l c u l a t e d   t i m e o u t :   " + t + " ;   s p e e d :   " + o p t s . s p e e d ) ; i f ( t ! = = f a l s e ) { r e t u r n   t ; } } r e t u r n   o p t s . t i m e o u t ; } $ . f n . c y c l e . n e x t = f u n c t i o n ( o p t s ) { a d v a n c e ( o p t s , 1 ) ; } ; $ . f n . c y c l e . p r e v = f u n c t i o n ( o p t s ) { a d v a n c e ( o p t s , 0 ) ; } ; f u n c t i o n   a d v a n c e ( o p t s , m o v e F o r w a r d ) { v a r   v a l = m o v e F o r w a r d ? 1 : - 1 ; v a r   e l s = o p t s . e l e m e n t s ; v a r   p = o p t s . $ c o n t [ 0 ] , t i m e o u t = p . c y c l e T i m e o u t ; i f ( t i m e o u t ) { c l e a r T i m e o u t ( t i m e o u t ) ; p . c y c l e T i m e o u t = 0 ; } i f ( o p t s . r a n d o m & & v a l < 0 ) { o p t s . r a n d o m I n d e x - - ; i f ( - - o p t s . r a n d o m I n d e x = = - 2 ) { o p t s . r a n d o m I n d e x = e l s . l e n g t h - 2 ; } e l s e { i f ( o p t s . r a n d o m I n d e x = = - 1 ) { o p t s . r a n d o m I n d e x = e l s . l e n g t h - 1 ; } } o p t s . n e x t S l i d e = o p t s . r a n d o m M a p [ o p t s . r a n d o m I n d e x ] ; } e l s e { i f ( o p t s . r a n d o m ) { o p t s . n e x t S l i d e = o p t s . r a n d o m M a p [ o p t s . r a n d o m I n d e x ] ; } e l s e { o p t s . n e x t S l i d e = o p t s . c u r r S l i d e + v a l ; i f ( o p t s . n e x t S l i d e < 0 ) { i f ( o p t s . n o w r a p ) { r e t u r n   f a l s e ; } o p t s . n e x t S l i d e = e l s . l e n g t h - 1 ; } e l s e { i f ( o p t s . n e x t S l i d e > = e l s . l e n g t h ) { i f ( o p t s . n o w r a p ) { r e t u r n   f a l s e ; } o p t s . n e x t S l i d e = 0 ; } } } } v a r   c b = o p t s . o n P r e v N e x t E v e n t | | o p t s . p r e v N e x t C l i c k ; i f ( $ . i s F u n c t i o n ( c b ) ) { c b ( v a l > 0 , o p t s . n e x t S l i d e , e l s [ o p t s . n e x t S l i d e ] ) ; } g o ( e l s , o p t s , 1 , m o v e F o r w a r d ) ; r e t u r n   f a l s e ; } f u n c t i o n   b u i l d P a g e r ( e l s , o p t s ) { v a r   $ p = $ ( o p t s . p a g e r ) ; $ . e a c h ( e l s , f u n c t i o n ( i , o ) { $ . f n . c y c l e . c r e a t e P a g e r A n c h o r ( i , o , $ p , e l s , o p t s ) ; } ) ; o p t s . u p d a t e A c t i v e P a g e r L i n k ( o p t s . p a g e r , o p t s . s t a r t i n g S l i d e , o p t s . a c t i v e P a g e r C l a s s ) ; } $ . f n . c y c l e . c r e a t e P a g e r A n c h o r = f u n c t i o n ( i , e l , $ p , e l s , o p t s ) { v a r   a ; i f ( $ . i s F u n c t i o n ( o p t s . p a g e r A n c h o r B u i l d e r ) ) { a = o p t s . p a g e r A n c h o r B u i l d e r ( i , e l ) ; d e b u g ( " p a g e r A n c h o r B u i l d e r ( " + i + " ,   e l )   r e t u r n e d :   " + a ) ; } e l s e { a = ' < a   h r e f = " # " > ' + ( i + 1 ) + " < / a > " ; } i f ( ! a ) { r e t u r n ; } v a r   $ a = $ ( a ) ; i f ( $ a . p a r e n t s ( " b o d y " ) . l e n g t h = = = 0 ) { v a r   a r r = [ ] ; i f ( $ p . l e n g t h > 1 ) { $ p . e a c h ( f u n c t i o n ( ) { v a r   $ c l o n e = $ a . c l o n e ( t r u e ) ; $ ( t h i s ) . a p p e n d ( $ c l o n e ) ; a r r . p u s h ( $ c l o n e [ 0 ] ) ; } ) ; $ a = $ ( a r r ) ; } e l s e { $ a . a p p e n d T o ( $ p ) ; } } o p t s . p a g e r A n c h o r s = o p t s . p a g e r A n c h o r s | | [ ] ; o p t s . p a g e r A n c h o r s . p u s h ( $ a ) ; $ a . b i n d ( o p t s . p a g e r E v e n t , f u n c t i o n ( e ) { e . p r e v e n t D e f a u l t ( ) ; o p t s . n e x t S l i d e = i ; v a r   p = o p t s . $ c o n t [ 0 ] , t i m e o u t = p . c y c l e T i m e o u t ; i f ( t i m e o u t ) { c l e a r T i m e o u t ( t i m e o u t ) ; p . c y c l e T i m e o u t = 0 ; } v a r   c b = o p t s . o n P a g e r E v e n t | | o p t s . p a g e r C l i c k ; i f ( $ . i s F u n c t i o n ( c b ) ) { c b ( o p t s . n e x t S l i d e , e l s [ o p t s . n e x t S l i d e ] ) ; } g o ( e l s , o p t s , 1 , o p t s . c u r r S l i d e < i ) ; } ) ; i f ( ! / ^ c l i c k / . t e s t ( o p t s . p a g e r E v e n t ) & & ! o p t s . a l l o w P a g e r C l i c k B u b b l e ) { $ a . b i n d ( " c l i c k . c y c l e " , f u n c t i o n ( ) { r e t u r n   f a l s e ; } ) ; } i f ( o p t s . p a u s e O n P a g e r H o v e r ) { $ a . h o v e r ( f u n c t i o n ( ) { o p t s . $ c o n t [ 0 ] . c y c l e P a u s e + + ; } , f u n c t i o n ( ) { o p t s . $ c o n t [ 0 ] . c y c l e P a u s e - - ; } ) ; } } ; $ . f n . c y c l e . h o p s F r o m L a s t = f u n c t i o n ( o p t s , f w d ) { v a r   h o p s , l = o p t s . l a s t S l i d e , c = o p t s . c u r r S l i d e ; i f ( f w d ) { h o p s = c > l ? c - l : o p t s . s l i d e C o u n t - l ; } e l s e { h o p s = c < l ? l - c : l + o p t s . s l i d e C o u n t - c ; } r e t u r n   h o p s ; } ; f u n c t i o n   c l e a r T y p e F i x ( $ s l i d e s ) { d e b u g ( " a p p l y i n g   c l e a r T y p e   b a c k g r o u n d - c o l o r   h a c k " ) ; f u n c t i o n   h e x ( s ) { s = p a r s e I n t ( s ) . t o S t r i n g ( 1 6 ) ; r e t u r n   s . l e n g t h < 2 ? " 0 " + s : s ; } f u n c t i o n   g e t B g ( e ) { f o r ( ; e & & e . n o d e N a m e . t o L o w e r C a s e ( ) ! = " h t m l " ; e = e . p a r e n t N o d e ) { v a r   v = $ . c s s ( e , " b a c k g r o u n d - c o l o r " ) ; i f ( v . i n d e x O f ( " r g b " ) > = 0 ) { v a r   r g b = v . m a t c h ( / \ d + / g ) ; r e t u r n " # " + h e x ( r g b [ 0 ] ) + h e x ( r g b [ 1 ] ) + h e x ( r g b [ 2 ] ) ; } i f ( v & & v ! = " t r a n s p a r e n t " ) { r e t u r n   v ; } } r e t u r n " # f f f f f f " ; } $ s l i d e s . e a c h ( f u n c t i o n ( ) { $ ( t h i s ) . c s s ( " b a c k g r o u n d - c o l o r " , g e t B g ( t h i s ) ) ; } ) ; } $ . f n . c y c l e . c o m m o n R e s e t = f u n c t i o n ( c u r r , n e x t , o p t s , w , h , r e v ) { $ ( o p t s . e l e m e n t s ) . n o t ( c u r r ) . h i d e ( ) ; o p t s . c s s B e f o r e . o p a c i t y = 1 ; o p t s . c s s B e f o r e . d i s p l a y = " b l o c k " ; i f ( o p t s . s l i d e R e s i z e & & w ! = = f a l s e & & n e x t . c y c l e W > 0 ) { o p t s . c s s B e f o r e . w i d t h = n e x t . c y c l e W ; } i f ( o p t s . s l i d e R e s i z e & & h ! = = f a l s e & & n e x t . c y c l e H > 0 ) { o p t s . c s s B e f o r e . h e i g h t = n e x t . c y c l e H ; } o p t s . c s s A f t e r = o p t s . c s s A f t e r | | { } ; o p t s . c s s A f t e r . d i s p l a y = " n o n e " ; $ ( c u r r ) . c s s ( " z I n d e x " , o p t s . s l i d e C o u n t + ( r e v = = = t r u e ? 1 : 0 ) ) ; $ ( n e x t ) . c s s ( " z I n d e x " , o p t s . s l i d e C o u n t + ( r e v = = = t r u e ? 0 : 1 ) ) ; } ; $ . f n . c y c l e . c u s t o m = f u n c t i o n ( c u r r , n e x t , o p t s , c b , f w d , s p e e d O v e r r i d e ) { v a r   $ l = $ ( c u r r ) , $ n = $ ( n e x t ) ; v a r   s p e e d I n = o p t s . s p e e d I n , s p e e d O u t = o p t s . s p e e d O u t , e a s e I n = o p t s . e a s e I n , e a s e O u t = o p t s . e a s e O u t ; $ n . c s s ( o p t s . c s s B e f o r e ) ; i f ( s p e e d O v e r r i d e ) { i f ( t y p e o f   s p e e d O v e r r i d e = = " n u m b e r " ) { s p e e d I n = s p e e d O u t = s p e e d O v e r r i d e ; } e l s e { s p e e d I n = s p e e d O u t = 1 ; } e a s e I n = e a s e O u t = n u l l ; } v a r   f n = f u n c t i o n ( ) { $ n . a n i m a t e ( o p t s . a n i m I n , s p e e d I n , e a s e I n , c b ) ; } ; $ l . a n i m a t e ( o p t s . a n i m O u t , s p e e d O u t , e a s e O u t , f u n c t i o n ( ) { i f ( o p t s . c s s A f t e r ) { $ l . c s s ( o p t s . c s s A f t e r ) ; } i f ( ! o p t s . s y n c ) { f n ( ) ; } } ) ; i f ( o p t s . s y n c ) { f n ( ) ; } } ; $ . f n . c y c l e . t r a n s i t i o n s = { f a d e : f u n c t i o n ( $ c o n t , $ s l i d e s , o p t s ) { $ s l i d e s . n o t ( " : e q ( " + o p t s . c u r r S l i d e + " ) " ) . c s s ( " o p a c i t y " , 0 ) ; o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r , n e x t , o p t s ) { $ . f n . c y c l e . c o m m o n R e s e t ( c u r r , n e x t , o p t s ) ; o p t s . c s s B e f o r e . o p a c i t y = 0 ; } ) ; o p t s . a n i m I n = { o p a c i t y : 1 } ; o p t s . a n i m O u t = { o p a c i t y : 0 } ; o p t s . c s s B e f o r e = { t o p : 0 , l e f t : 0 } ; } } ; $ . f n . c y c l e . v e r = f u n c t i o n ( ) { r e t u r n   v e r ; } ; $ . f n . c y c l e . d e f a u l t s = { f x : " f a d e " , t i m e o u t : 4 0 0 0 , t i m e o u t F n : n u l l , c o n t i n u o u s : 0 , s p e e d : 1 0 0 0 , s p e e d I n : n u l l , s p e e d O u t : n u l l , n e x t : n u l l , p r e v : n u l l , o n P r e v N e x t E v e n t : n u l l , p r e v N e x t E v e n t : " c l i c k . c y c l e " , p a g e r : n u l l , o n P a g e r E v e n t : n u l l , p a g e r E v e n t : " c l i c k . c y c l e " , a l l o w P a g e r C l i c k B u b b l e : f a l s e , p a g e r A n c h o r B u i l d e r : n u l l , b e f o r e : n u l l , a f t e r : n u l l , e n d : n u l l , e a s i n g : n u l l , e a s e I n : n u l l , e a s e O u t : n u l l , s h u f f l e : n u l l , a n i m I n : n u l l , a n i m O u t : n u l l , c s s B e f o r e : n u l l , c s s A f t e r : n u l l , f x F n : n u l l , h e i g h t : " a u t o " , s t a r t i n g S l i d e : 0 , s y n c : 1 , r a n d o m : 0 , f i t : 0 , c o n t a i n e r R e s i z e : 1 , s l i d e R e s i z e : 1 , p a u s e : 0 , p a u s e O n P a g e r H o v e r : 0 , a u t o s t o p : 0 , a u t o s t o p C o u n t : 0 , d e l a y : 0 , s l i d e E x p r : n u l l , c l e a r t y p e : ! $ . s u p p o r t . o p a c i t y , c l e a r t y p e N o B g : f a l s e , n o w r a p : 0 , f a s t O n E v e n t : 0 , r a n d o m i z e E f f e c t s : 1 , r e v : 0 , m a n u a l T r u m p : t r u e , r e q u e u e O n I m a g e N o t L o a d e d : t r u e , r e q u e u e T i m e o u t : 2 5 0 , a c t i v e P a g e r C l a s s : " a c t i v e S l i d e " , u p d a t e A c t i v e P a g e r L i n k : n u l l , b a c k w a r d s : f a l s e } ; } ) ( j Q u e r y ) ; 
 / * 
   *   j Q u e r y   C y c l e   P l u g i n   T r a n s i t i o n   D e f i n i t i o n s 
   *   T h i s   s c r i p t   i s   a   p l u g i n   f o r   t h e   j Q u e r y   C y c l e   P l u g i n 
   *   E x a m p l e s   a n d   d o c u m e n t a t i o n   a t :   h t t p : / / m a l s u p . c o m / j q u e r y / c y c l e / 
   *   C o p y r i g h t   ( c )   2 0 0 7 - 2 0 1 0   M .   A l s u p 
   *   V e r s i o n : 	   2 . 7 3 
   *   D u a l   l i c e n s e d   u n d e r   t h e   M I T   a n d   G P L   l i c e n s e s : 
   *   h t t p : / / w w w . o p e n s o u r c e . o r g / l i c e n s e s / m i t - l i c e n s e . p h p 
   *   h t t p : / / w w w . g n u . o r g / l i c e n s e s / g p l . h t m l 
   * /  
 ( f u n c t i o n ( $ )   {   $ . f n . c y c l e . t r a n s i t i o n s . n o n e   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . f x F n   =   f u n c t i o n ( c u r r ,   n e x t ,   o p t s ,   a f t e r )   {   $ ( n e x t ) . s h o w ( ) ;   $ ( c u r r ) . h i d e ( ) ;   a f t e r ( ) ;   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . f a d e o u t   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ s l i d e s . n o t ( " : e q ( "   +   o p t s . c u r r S l i d e   +   " ) " ) . c s s ( {   d i s p l a y :   " b l o c k " ,   o p a c i t y :   1   } ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s ,   w ,   h ,   r e v )   {   $ ( c u r r ) . c s s ( " z I n d e x " ,   o p t s . s l i d e C o u n t   +   ( ! r e v   = = =   t r u e   ?   1   :   0 ) ) ;   $ ( n e x t ) . c s s ( " z I n d e x " ,   o p t s . s l i d e C o u n t   +   ( ! r e v   = = =   t r u e   ?   0   :   1 ) ) ;   } ) ;   o p t s . a n i m I n   =   {   o p a c i t y :   1   } ;   o p t s . a n i m O u t   =   {   o p a c i t y :   0   } ;   o p t s . c s s B e f o r e   =   {   o p a c i t y :   1 ,   d i s p l a y :   " b l o c k "   } ;   o p t s . c s s A f t e r   =   {   z I n d e x :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s c r o l l U p   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) ;   o p t s . b e f o r e . p u s h ( $ . f n . c y c l e . c o m m o n R e s e t ) ;   v a r   h   =   $ c o n t . h e i g h t ( ) ;   o p t s . c s s B e f o r e   =   {   t o p :   h ,   l e f t :   0   } ;   o p t s . c s s F i r s t   =   {   t o p :   0   } ;   o p t s . a n i m I n   =   {   t o p :   0   } ;   o p t s . a n i m O u t   =   {   t o p :   - h   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s c r o l l D o w n   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) ;   o p t s . b e f o r e . p u s h ( $ . f n . c y c l e . c o m m o n R e s e t ) ;   v a r   h   =   $ c o n t . h e i g h t ( ) ;   o p t s . c s s F i r s t   =   {   t o p :   0   } ;   o p t s . c s s B e f o r e   =   {   t o p :   - h ,   l e f t :   0   } ;   o p t s . a n i m I n   =   {   t o p :   0   } ;   o p t s . a n i m O u t   =   {   t o p :   h   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s c r o l l L e f t   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) ;   o p t s . b e f o r e . p u s h ( $ . f n . c y c l e . c o m m o n R e s e t ) ;   v a r   w   =   $ c o n t . w i d t h ( ) ;   o p t s . c s s F i r s t   =   {   l e f t :   0   } ;   o p t s . c s s B e f o r e   =   {   l e f t :   w ,   t o p :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   l e f t :   0   -   w   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s c r o l l R i g h t   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) ;   o p t s . b e f o r e . p u s h ( $ . f n . c y c l e . c o m m o n R e s e t ) ;   v a r   w   =   $ c o n t . w i d t h ( ) ;   o p t s . c s s F i r s t   =   {   l e f t :   0   } ;   o p t s . c s s B e f o r e   =   {   l e f t :   - w ,   t o p :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   l e f t :   w   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s c r o l l H o r z   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . w i d t h ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s ,   f w d )   {   i f   ( o p t s . r e v )   {   f w d   =   ! f w d ;   }   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ) ;   o p t s . c s s B e f o r e . l e f t   =   f w d   ?   ( n e x t . c y c l e W   -   1 )   :   ( 1   -   n e x t . c y c l e W ) ;   o p t s . a n i m O u t . l e f t   =   f w d   ?   - c u r r . c y c l e W   :   c u r r . c y c l e W ;   } ) ;   o p t s . c s s F i r s t   =   {   l e f t :   0   } ;   o p t s . c s s B e f o r e   =   {   t o p :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   t o p :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s c r o l l V e r t   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s ,   f w d )   {   i f   ( o p t s . r e v )   {   f w d   =   ! f w d ;   }   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ) ;   o p t s . c s s B e f o r e . t o p   =   f w d   ?   ( 1   -   n e x t . c y c l e H )   :   ( n e x t . c y c l e H   -   1 ) ;   o p t s . a n i m O u t . t o p   =   f w d   ?   c u r r . c y c l e H   :   - c u r r . c y c l e H ;   } ) ;   o p t s . c s s F i r s t   =   {   t o p :   0   } ;   o p t s . c s s B e f o r e   =   {   l e f t :   0   } ;   o p t s . a n i m I n   =   {   t o p :   0   } ;   o p t s . a n i m O u t   =   {   l e f t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s l i d e X   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ ( o p t s . e l e m e n t s ) . n o t ( c u r r ) . h i d e ( ) ;   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   t r u e ) ;   o p t s . a n i m I n . w i d t h   =   n e x t . c y c l e W ;   } ) ;   o p t s . c s s B e f o r e   =   {   l e f t :   0 ,   t o p :   0 ,   w i d t h :   0   } ;   o p t s . a n i m I n   =   {   w i d t h :   " s h o w "   } ;   o p t s . a n i m O u t   =   {   w i d t h :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s l i d e Y   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ ( o p t s . e l e m e n t s ) . n o t ( c u r r ) . h i d e ( ) ;   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   f a l s e ) ;   o p t s . a n i m I n . h e i g h t   =   n e x t . c y c l e H ;   } ) ;   o p t s . c s s B e f o r e   =   {   l e f t :   0 ,   t o p :   0 ,   h e i g h t :   0   } ;   o p t s . a n i m I n   =   {   h e i g h t :   " s h o w "   } ;   o p t s . a n i m O u t   =   {   h e i g h t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . s h u f f l e   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   i ,   w   =   $ c o n t . c s s ( " o v e r f l o w " ,   " v i s i b l e " ) . w i d t h ( ) ;   $ s l i d e s . c s s ( {   l e f t :   0 ,   t o p :   0   } ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   t r u e ,   t r u e ) ;   } ) ;   i f   ( ! o p t s . s p e e d A d j u s t e d )   {   o p t s . s p e e d   =   o p t s . s p e e d   /   2 ;   o p t s . s p e e d A d j u s t e d   =   t r u e ;   }   o p t s . r a n d o m   =   0 ;   o p t s . s h u f f l e   =   o p t s . s h u f f l e   | |   {   l e f t :   - w ,   t o p :   1 5   } ;   o p t s . e l s   =   [ ] ;   f o r   ( i   =   0 ;   i   <   $ s l i d e s . l e n g t h ;   i + + )   {   o p t s . e l s . p u s h ( $ s l i d e s [ i ] ) ;   }   f o r   ( i   =   0 ;   i   <   o p t s . c u r r S l i d e ;   i + + )   {   o p t s . e l s . p u s h ( o p t s . e l s . s h i f t ( ) ) ;   }   o p t s . f x F n   =   f u n c t i o n ( c u r r ,   n e x t ,   o p t s ,   c b ,   f w d )   {   i f   ( o p t s . r e v )   {   f w d   =   ! f w d ;   }   v a r   $ e l   =   f w d   ?   $ ( c u r r )   :   $ ( n e x t ) ;   $ ( n e x t ) . c s s ( o p t s . c s s B e f o r e ) ;   v a r   c o u n t   =   o p t s . s l i d e C o u n t ;   $ e l . a n i m a t e ( o p t s . s h u f f l e ,   o p t s . s p e e d I n ,   o p t s . e a s e I n ,   f u n c t i o n ( )   {   v a r   h o p s   =   $ . f n . c y c l e . h o p s F r o m L a s t ( o p t s ,   f w d ) ;   f o r   ( v a r   k   =   0 ;   k   <   h o p s ;   k + + )   {   f w d   ?   o p t s . e l s . p u s h ( o p t s . e l s . s h i f t ( ) )   :   o p t s . e l s . u n s h i f t ( o p t s . e l s . p o p ( ) ) ;   }   i f   ( f w d )   {   f o r   ( v a r   i   =   0 ,   l e n   =   o p t s . e l s . l e n g t h ;   i   <   l e n ;   i + + )   {   $ ( o p t s . e l s [ i ] ) . c s s ( " z - i n d e x " ,   l e n   -   i   +   c o u n t ) ;   }   }   e l s e   {   v a r   z   =   $ ( c u r r ) . c s s ( " z - i n d e x " ) ;   $ e l . c s s ( " z - i n d e x " ,   p a r s e I n t ( z )   +   1   +   c o u n t ) ;   }   $ e l . a n i m a t e ( {   l e f t :   0 ,   t o p :   0   } ,   o p t s . s p e e d O u t ,   o p t s . e a s e O u t ,   f u n c t i o n ( )   {   $ ( f w d   ?   t h i s   :   c u r r ) . h i d e ( ) ;   i f   ( c b )   {   c b ( ) ;   }   } ) ;   } ) ;   } ;   o p t s . c s s B e f o r e   =   {   d i s p l a y :   " b l o c k " ,   o p a c i t y :   1 ,   t o p :   0 ,   l e f t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . t u r n U p   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   f a l s e ) ;   o p t s . c s s B e f o r e . t o p   =   n e x t . c y c l e H ;   o p t s . a n i m I n . h e i g h t   =   n e x t . c y c l e H ;   o p t s . a n i m O u t . w i d t h   =   n e x t . c y c l e W ;   } ) ;   o p t s . c s s F i r s t   =   {   t o p :   0   } ;   o p t s . c s s B e f o r e   =   {   l e f t :   0 ,   h e i g h t :   0   } ;   o p t s . a n i m I n   =   {   t o p :   0   } ;   o p t s . a n i m O u t   =   {   h e i g h t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . t u r n D o w n   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   f a l s e ) ;   o p t s . a n i m I n . h e i g h t   =   n e x t . c y c l e H ;   o p t s . a n i m O u t . t o p   =   c u r r . c y c l e H ;   } ) ;   o p t s . c s s F i r s t   =   {   t o p :   0   } ;   o p t s . c s s B e f o r e   =   {   l e f t :   0 ,   t o p :   0 ,   h e i g h t :   0   } ;   o p t s . a n i m O u t   =   {   h e i g h t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . t u r n L e f t   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   t r u e ) ;   o p t s . c s s B e f o r e . l e f t   =   n e x t . c y c l e W ;   o p t s . a n i m I n . w i d t h   =   n e x t . c y c l e W ;   } ) ;   o p t s . c s s B e f o r e   =   {   t o p :   0 ,   w i d t h :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   w i d t h :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . t u r n R i g h t   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   t r u e ) ;   o p t s . a n i m I n . w i d t h   =   n e x t . c y c l e W ;   o p t s . a n i m O u t . l e f t   =   c u r r . c y c l e W ;   } ) ;   o p t s . c s s B e f o r e   =   {   t o p :   0 ,   l e f t :   0 ,   w i d t h :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   w i d t h :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . z o o m   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   f a l s e ,   t r u e ) ;   o p t s . c s s B e f o r e . t o p   =   n e x t . c y c l e H   /   2 ;   o p t s . c s s B e f o r e . l e f t   =   n e x t . c y c l e W   /   2 ;   o p t s . a n i m I n   =   {   t o p :   0 ,   l e f t :   0 ,   w i d t h :   n e x t . c y c l e W ,   h e i g h t :   n e x t . c y c l e H   } ;   o p t s . a n i m O u t   =   {   w i d t h :   0 ,   h e i g h t :   0 ,   t o p :   c u r r . c y c l e H   /   2 ,   l e f t :   c u r r . c y c l e W   /   2   } ;   } ) ;   o p t s . c s s F i r s t   =   {   t o p :   0 ,   l e f t :   0   } ;   o p t s . c s s B e f o r e   =   {   w i d t h :   0 ,   h e i g h t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . f a d e Z o o m   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   f a l s e ) ;   o p t s . c s s B e f o r e . l e f t   =   n e x t . c y c l e W   /   2 ;   o p t s . c s s B e f o r e . t o p   =   n e x t . c y c l e H   /   2 ;   o p t s . a n i m I n   =   {   t o p :   0 ,   l e f t :   0 ,   w i d t h :   n e x t . c y c l e W ,   h e i g h t :   n e x t . c y c l e H   } ;   } ) ;   o p t s . c s s B e f o r e   =   {   w i d t h :   0 ,   h e i g h t :   0   } ;   o p t s . a n i m O u t   =   {   o p a c i t y :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . b l i n d X   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   w   =   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . w i d t h ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ) ;   o p t s . a n i m I n . w i d t h   =   n e x t . c y c l e W ;   o p t s . a n i m O u t . l e f t   =   c u r r . c y c l e W ;   } ) ;   o p t s . c s s B e f o r e   =   {   l e f t :   w ,   t o p :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   l e f t :   w   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . b l i n d Y   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   h   =   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . h e i g h t ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ) ;   o p t s . a n i m I n . h e i g h t   =   n e x t . c y c l e H ;   o p t s . a n i m O u t . t o p   =   c u r r . c y c l e H ;   } ) ;   o p t s . c s s B e f o r e   =   {   t o p :   h ,   l e f t :   0   } ;   o p t s . a n i m I n   =   {   t o p :   0   } ;   o p t s . a n i m O u t   =   {   t o p :   h   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . b l i n d Z   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   h   =   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . h e i g h t ( ) ;   v a r   w   =   $ c o n t . w i d t h ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ) ;   o p t s . a n i m I n . h e i g h t   =   n e x t . c y c l e H ;   o p t s . a n i m O u t . t o p   =   c u r r . c y c l e H ;   } ) ;   o p t s . c s s B e f o r e   =   {   t o p :   h ,   l e f t :   w   } ;   o p t s . a n i m I n   =   {   t o p :   0 ,   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   t o p :   h ,   l e f t :   w   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . g r o w X   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   t r u e ) ;   o p t s . c s s B e f o r e . l e f t   =   t h i s . c y c l e W   /   2 ;   o p t s . a n i m I n   =   {   l e f t :   0 ,   w i d t h :   t h i s . c y c l e W   } ;   o p t s . a n i m O u t   =   {   l e f t :   0   } ;   } ) ;   o p t s . c s s B e f o r e   =   {   w i d t h :   0 ,   t o p :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . g r o w Y   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   f a l s e ) ;   o p t s . c s s B e f o r e . t o p   =   t h i s . c y c l e H   /   2 ;   o p t s . a n i m I n   =   {   t o p :   0 ,   h e i g h t :   t h i s . c y c l e H   } ;   o p t s . a n i m O u t   =   {   t o p :   0   } ;   } ) ;   o p t s . c s s B e f o r e   =   {   h e i g h t :   0 ,   l e f t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . c u r t a i n X   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   f a l s e ,   t r u e ,   t r u e ) ;   o p t s . c s s B e f o r e . l e f t   =   n e x t . c y c l e W   /   2 ;   o p t s . a n i m I n   =   {   l e f t :   0 ,   w i d t h :   t h i s . c y c l e W   } ;   o p t s . a n i m O u t   =   {   l e f t :   c u r r . c y c l e W   /   2 ,   w i d t h :   0   } ;   } ) ;   o p t s . c s s B e f o r e   =   {   t o p :   0 ,   w i d t h :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . c u r t a i n Y   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   f a l s e ,   t r u e ) ;   o p t s . c s s B e f o r e . t o p   =   n e x t . c y c l e H   /   2 ;   o p t s . a n i m I n   =   {   t o p :   0 ,   h e i g h t :   n e x t . c y c l e H   } ;   o p t s . a n i m O u t   =   {   t o p :   c u r r . c y c l e H   /   2 ,   h e i g h t :   0   } ;   } ) ;   o p t s . c s s B e f o r e   =   {   l e f t :   0 ,   h e i g h t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . c o v e r   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   d   =   o p t s . d i r e c t i o n   | |   " l e f t " ;   v a r   w   =   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . w i d t h ( ) ;   v a r   h   =   $ c o n t . h e i g h t ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ) ;   i f   ( d   = =   " r i g h t " )   {   o p t s . c s s B e f o r e . l e f t   =   - w ;   }   e l s e   {   i f   ( d   = =   " u p " )   {   o p t s . c s s B e f o r e . t o p   =   h ;   }   e l s e   {   i f   ( d   = =   " d o w n " )   {   o p t s . c s s B e f o r e . t o p   =   - h ;   }   e l s e   {   o p t s . c s s B e f o r e . l e f t   =   w ;   }   }   }   } ) ;   o p t s . a n i m I n   =   {   l e f t :   0 ,   t o p :   0   } ;   o p t s . a n i m O u t   =   {   o p a c i t y :   1   } ;   o p t s . c s s B e f o r e   =   {   t o p :   0 ,   l e f t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . u n c o v e r   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   d   =   o p t s . d i r e c t i o n   | |   " l e f t " ;   v a r   w   =   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . w i d t h ( ) ;   v a r   h   =   $ c o n t . h e i g h t ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   t r u e ,   t r u e ) ;   i f   ( d   = =   " r i g h t " )   {   o p t s . a n i m O u t . l e f t   =   w ;   }   e l s e   {   i f   ( d   = =   " u p " )   {   o p t s . a n i m O u t . t o p   =   - h ;   }   e l s e   {   i f   ( d   = =   " d o w n " )   {   o p t s . a n i m O u t . t o p   =   h ;   }   e l s e   {   o p t s . a n i m O u t . l e f t   =   - w ;   }   }   }   } ) ;   o p t s . a n i m I n   =   {   l e f t :   0 ,   t o p :   0   } ;   o p t s . a n i m O u t   =   {   o p a c i t y :   1   } ;   o p t s . c s s B e f o r e   =   {   t o p :   0 ,   l e f t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . t o s s   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   w   =   $ c o n t . c s s ( " o v e r f l o w " ,   " v i s i b l e " ) . w i d t h ( ) ;   v a r   h   =   $ c o n t . h e i g h t ( ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   t r u e ,   t r u e ) ;   i f   ( ! o p t s . a n i m O u t . l e f t   & &   ! o p t s . a n i m O u t . t o p )   {   o p t s . a n i m O u t   =   {   l e f t :   w   *   2 ,   t o p :   - h   /   2 ,   o p a c i t y :   0   } ;   }   e l s e   {   o p t s . a n i m O u t . o p a c i t y   =   0 ;   }   } ) ;   o p t s . c s s B e f o r e   =   {   l e f t :   0 ,   t o p :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   } ;   $ . f n . c y c l e . t r a n s i t i o n s . w i p e   =   f u n c t i o n ( $ c o n t ,   $ s l i d e s ,   o p t s )   {   v a r   w   =   $ c o n t . c s s ( " o v e r f l o w " ,   " h i d d e n " ) . w i d t h ( ) ;   v a r   h   =   $ c o n t . h e i g h t ( ) ;   o p t s . c s s B e f o r e   =   o p t s . c s s B e f o r e   | |   { } ;   v a r   c l i p ;   i f   ( o p t s . c l i p )   {   i f   ( / l 2 r / . t e s t ( o p t s . c l i p ) )   {   c l i p   =   " r e c t ( 0 p x   0 p x   "   +   h   +   " p x   0 p x ) " ;   }   e l s e   {   i f   ( / r 2 l / . t e s t ( o p t s . c l i p ) )   {   c l i p   =   " r e c t ( 0 p x   "   +   w   +   " p x   "   +   h   +   " p x   "   +   w   +   " p x ) " ;   }   e l s e   {   i f   ( / t 2 b / . t e s t ( o p t s . c l i p ) )   {   c l i p   =   " r e c t ( 0 p x   "   +   w   +   " p x   0 p x   0 p x ) " ;   }   e l s e   {   i f   ( / b 2 t / . t e s t ( o p t s . c l i p ) )   {   c l i p   =   " r e c t ( "   +   h   +   " p x   "   +   w   +   " p x   "   +   h   +   " p x   0 p x ) " ;   }   e l s e   {   i f   ( / z o o m / . t e s t ( o p t s . c l i p ) )   {   v a r   t o p   =   p a r s e I n t ( h   /   2 ) ;   v a r   l e f t   =   p a r s e I n t ( w   /   2 ) ;   c l i p   =   " r e c t ( "   +   t o p   +   " p x   "   +   l e f t   +   " p x   "   +   t o p   +   " p x   "   +   l e f t   +   " p x ) " ;   }   }   }   }   }   }   o p t s . c s s B e f o r e . c l i p   =   o p t s . c s s B e f o r e . c l i p   | |   c l i p   | |   " r e c t ( 0 p x   0 p x   0 p x   0 p x ) " ;   v a r   d   =   o p t s . c s s B e f o r e . c l i p . m a t c h ( / ( \ d + ) / g ) ;   v a r   t   =   p a r s e I n t ( d [ 0 ] ) ,   r   =   p a r s e I n t ( d [ 1 ] ) ,   b   =   p a r s e I n t ( d [ 2 ] ) ,   l   =   p a r s e I n t ( d [ 3 ] ) ;   o p t s . b e f o r e . p u s h ( f u n c t i o n ( c u r r ,   n e x t ,   o p t s )   {   i f   ( c u r r   = =   n e x t )   {   r e t u r n ;   }   v a r   $ c u r r   =   $ ( c u r r ) ,   $ n e x t   =   $ ( n e x t ) ;   $ . f n . c y c l e . c o m m o n R e s e t ( c u r r ,   n e x t ,   o p t s ,   t r u e ,   t r u e ,   f a l s e ) ;   o p t s . c s s A f t e r . d i s p l a y   =   " b l o c k " ;   v a r   s t e p   =   1 ,   c o u n t   =   p a r s e I n t ( ( o p t s . s p e e d I n   /   1 3 ) )   -   1 ;   ( f u n c t i o n   f ( )   {   v a r   t t   =   t   ?   t   -   p a r s e I n t ( s t e p   *   ( t   /   c o u n t ) )   :   0 ;   v a r   l l   =   l   ?   l   -   p a r s e I n t ( s t e p   *   ( l   /   c o u n t ) )   :   0 ;   v a r   b b   =   b   <   h   ?   b   +   p a r s e I n t ( s t e p   *   ( ( h   -   b )   /   c o u n t   | |   1 ) )   :   h ;   v a r   r r   =   r   <   w   ?   r   +   p a r s e I n t ( s t e p   *   ( ( w   -   r )   /   c o u n t   | |   1 ) )   :   w ;   $ n e x t . c s s ( {   c l i p :   " r e c t ( "   +   t t   +   " p x   "   +   r r   +   " p x   "   +   b b   +   " p x   "   +   l l   +   " p x ) "   } ) ;   ( s t e p + +   < =   c o u n t )   ?   s e t T i m e o u t ( f ,   1 3 )   :   $ c u r r . c s s ( " d i s p l a y " ,   " n o n e " ) ;   } ) ( ) ;   } ) ;   o p t s . c s s B e f o r e   =   {   d i s p l a y :   " b l o c k " ,   o p a c i t y :   1 ,   t o p :   0 ,   l e f t :   0   } ;   o p t s . a n i m I n   =   {   l e f t :   0   } ;   o p t s . a n i m O u t   =   {   l e f t :   0   } ;   } ;   } ) ( j Q u e r y ) ;  
 / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 P o w e r e d   a n d   d e s i g n e d     b y   B l u e C o . i r   |   B l u e S o f t C o . i r   |   W a n a l y s t . n e t   |   A14'/-Ì/1Ì. 'Ì1'F. i r  
 A14'/  -Ì/1Ì 
 ¯1HG  F1E  'A2'1Ì  "(Ì 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * / 
