ÿþf u n c t i o n   i n i t T a b s ( )  
 {  
 	 v a r   s e t s   =   d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " u l " ) ;  
 	 f o r   ( v a r   i   =   0 ;   i   <   s e t s . l e n g t h ;   i + + )  
 	 {  
 	 	 i f   ( s e t s [ i ] . c l a s s N a m e . i n d e x O f ( " t a b s e t " )   ! =   - 1 )  
 	 	 {  
 	 	 	 v a r   t a b s   =   [ ] ;  
 	 	 	 v a r   l i n k s   =   s e t s [ i ] . g e t E l e m e n t s B y T a g N a m e ( " a " ) ;  
 	 	 	 f o r   ( v a r   j   =   0 ;   j   <   l i n k s . l e n g t h ;   j + + )  
 	 	 	 {  
 	 	 	 	 i f   ( l i n k s [ j ] . c l a s s N a m e . i n d e x O f ( " t a b " )   ! =   - 1 )  
 	 	 	 	 {  
 	 	 	 	 	 t a b s . p u s h ( l i n k s [ j ] ) ;  
 	 	 	 	 	 l i n k s [ j ] . t a b s   =   t a b s ;  
 	 	 	 	 	 v a r   c   =   d o c u m e n t . g e t E l e m e n t B y I d ( l i n k s [ j ] . h r e f . s u b s t r ( l i n k s [ j ] . h r e f . i n d e x O f ( " # " )   +   1 ) ) ;  
  
 	 	 	 	 	 / / r e s e t   a l l   t a b s   o n   s t a r t  
 	 	 	 	 	 i f   ( c )   i f   ( l i n k s [ j ] . c l a s s N a m e . i n d e x O f ( " a c t i v e " )   ! =   - 1 )   c . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 	 e l s e   c . s t y l e . d i s p l a y   =   " n o n e " ;  
    
 	 	 	 	 	 l i n k s [ j ] . o n c l i c k   =   f u n c t i o n   ( )  
 	 	 	 	 	 {  
 	 	 	 	 	 	 $ ( d o c u m e n t ) . s t o p T i m e ( ' t a b s ' ) ;  
 	 	 	 	 	 	 v a r   c   =   d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . h r e f . s u b s t r ( t h i s . h r e f . i n d e x O f ( " # " )   +   1 ) ) ;  
 	 	 	 	 	 	 i f   ( c )  
 	 	 	 	 	 	 {  
 	 	 	 	 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   t h i s . t a b s . l e n g t h ;   i + + )  
 	 	 	 	 	 	 	 {  
 	 	 	 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . t a b s [ i ] . h r e f . s u b s t r ( t h i s . t a b s [ i ] . h r e f . i n d e x O f ( " # " )   +   1 ) ) . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 	 	 	 	 	 t h i s . t a b s [ i ] . c l a s s N a m e   =   t h i s . t a b s [ i ] . c l a s s N a m e . r e p l a c e ( " a c t i v e " ,   " " ) ;  
 	 	 	 	 	 	 	 }  
 	 	 	 	 	 	 	 t h i s . c l a s s N a m e   + =   "   a c t i v e " ;  
 	 	 	 	 	 	 	 c . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 	 	 	 	 	 C u f o n . r e p l a c e ( ' . t a b s - t w o   . t a b s   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	 	 	 	 	 	 C u f o n . r e p l a c e ( ' . t o p - n a v   a   e m ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	 	 	 	 	 	 C u f o n . r e p l a c e ( ' . t o p - n a v   a   s t r o n g ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	 	 	 	 	 	 C u f o n . r e p l a c e ( ' . t o p - n a v   u l   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	 	 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 }  
 }  
 i f   ( w i n d o w . a d d E v e n t L i s t e n e r )   w i n d o w . a d d E v e n t L i s t e n e r ( " l o a d " ,   i n i t T a b s ,   f a l s e ) ;  
 e l s e   i f   ( w i n d o w . a t t a c h E v e n t )   w i n d o w . a t t a c h E v e n t ( " o n l o a d " ,   i n i t T a b s ) ;  
  
 $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   {  
 	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 $ ( " . t a b L i n k s C o n t a i n e r   l i   a " ) . c l i c k ( f u n c t i o n ( ) {    
 	 	 $ ( " . a c t i v e " ) . r e m o v e C l a s s ( " a c t i v e " ) ;  
 	 	 $ ( t h i s ) . a d d C l a s s ( " a c t i v e " ) ;    
 	 	 $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " e m " ) . c s s ( " c o l o r " ,   " w h i t e " ) ;  
 	 	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	  
 	 	 $ ( t h i s ) . f i n d ( " e m " ) . c s s ( " c o l o r " ,   " # F F F " ) ;  
 	 	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	 C u f o n . n o w ( ) ;  
 	 	  
 	 	 $ ( " . t a b s - h o l d e r   . t a b - c o n t e n t " ) . h i d e ( ) ;  
 	 	 $ ( $ ( t h i s ) . a t t r ( " h r e f " ) ) . s h o w ( ) ;  
 	 } ) ;  
 	  
 	 $ ( " . t a b L i n k s C o n t a i n e r   l i   a " ) . h o v e r ( f u n c t i o n ( ) {  
 	 	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ; 	  
                 $ ( t h i s ) . f i n d ( " e m " ) . c s s ( " c o l o r " ,   " # F F F " ) ;  
                 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
                 C u f o n . n o w ( )  
         } ,  
         	 f u n c t i o n ( ) {  
         	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
         	 i f ( $ ( t h i s ) . h a s C l a s s ( " a c t i v e " ) )  
         	 	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
         	 e l s e  
         	 	 $ ( t h i s ) . f i n d ( " e m " ) . c s s ( " c o l o r " ,   " w h i t e " ) ;  
         	  
         	 C u f o n . r e p l a c e ( ' . t a b L i n k s C o n t a i n e r   l i   a ' ,   {   f o n t F a m i l y :   ' D i n   M e d i u m ' ,   h o v e r :   t r u e   } ) ;  
 	 	 C u f o n . n o w ( )  
         } ) ;  
  
 	  
 	 s   =   t r u e ;  
 	 $ ( d o c u m e n t ) . e v e r y T i m e ( 1 4 0 0 0 ,   ' t a b s ' ,   f u n c t i o n ( )   {  
 	 	 i   =   0 ;  
 	 	 $ ( ' d i v . t a b s - o n e   u l . t a b s e t   l i   a ' ) . e a c h ( f u n c t i o n ( e )   {  
 	 	 	 i f ( $ ( t h i s ) . h a s C l a s s ( ' a c t i v e ' ) )   {    
 	 	 	 	 $ ( t h i s ) . r e m o v e C l a s s ( ' a c t i v e ' ) ;    
 	 	 	 	 s   =   t r u e ;  
 	 	 	 	 $ ( $ ( t h i s ) . a t t r ( ' h r e f ' ) ) . r e m o v e C l a s s ( ' a c t i v e ' ) . c s s ( ' d i s p l a y ' ,   ' n o n e ' ) ;  
 	 	 	 	 i f ( $ ( t h i s ) . a t t r ( ' h r e f ' )   = =   ' # '   +   $ ( ' d i v . t a b s - c o n t e n t   d i v . t a b - c o n t e n t : l a s t ' ) . a t t r ( ' i d ' ) )   {  
 	 	 	 	 	 $ ( ' d i v . t a b s - c o n t e n t   d i v . t a b - c o n t e n t : f i r s t ' ) . a d d C l a s s ( ' a c t i v e ' ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
 	 	 	 	 	 $ ( ' d i v . t a b s - o n e   u l . t a b s e t   l i   a : f i r s t ' ) . a d d C l a s s ( ' a c t i v e ' ) ;  
 	 	 	 	 	 s   =   f a l s e ;  
 	 	 	 	 	  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 e l s e   i f ( ! $ ( t h i s ) . h a s C l a s s ( ' a c t i v e ' )   & &   s   = =   t r u e )   {  
 	 	 	 	 $ ( t h i s ) . a d d C l a s s ( ' a c t i v e ' ) ;    
 	 	 	 	 s   =   f a l s e ;  
 	 	 	 	 $ ( $ ( t h i s ) . a t t r ( ' h r e f ' ) ) . a d d C l a s s ( ' a c t i v e ' ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
 	 	 	 	  
 	 	 	 }  
 	 	 } ) ;  
 	 } ) ;  
 } ) ;  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
