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