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

