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

