ÿþv a r   i t e m A n i m E n a b l e d   =   t r u e ;  
 / / l a v a I t e m   i s   s e t   i n   a n y   p a g e   o f   n a v i g a t i o n   m e n u   a c c o r d i n g l y   ( s e r v e r - s i d e )  
 v a r   l a v a I t e m   =   0 ;  
 $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   {  
 i f ( l a v a I t e m   = =   - 1 )  
 	 $ ( ' # l a v a L a m p N a v ' ) . l a v a L a m p ( { f x :   ' s w i n g ' ,   s p e e d :   3 3 3 ,   r e t u r n H o m e : t r u e ,   h o m e L e f t :   8 0 0 ,   h o m e T o p :   0 ,   h o m e W i d t h : 7 0 ,   h o m e H e i g h t : 2 0 } ) ;  
 e l s e  
 	 $ ( ' # l a v a L a m p N a v ' ) . l a v a L a m p ( { f x :   ' s w i n g ' ,   s p e e d :   3 3 3 ,   s t a r t I t e m : l a v a I t e m } ) ;  
 $ ( ) . r e a d y ( f u n c t i o n ( )   {  
  
 	 / / C o d a   S l i d e r   T a b s   ( a k a   R S S T a b s )  
 	 $ ( ' # c o d a - s l i d e r - 1 ' ) . c o d a S l i d e r ( { d y n a m i c A r r o w s : f a l s e ,   d y n a m i c T a b s :   f a l s e ,   f i r s t P a n e l T o L o a d :   1 } ) ; } ) ;  
 	 $ ( ' # g e t L i n k ' ) . c s s ( ' d i s p l a y ' ,   ' b l o c k ' ) ;  
 	 / / A u t o   S u g g e s t i o n  
 	 $ ( ' . s w _ q b o x ' ) . k e y u p ( f u n c t i o n ( ) {  
 	 	 l o o k u p ( $ ( ' . s w _ q b o x ' ) . v a l ( ) ) ;  
 	 } ) ;  
 	 $ ( ' . s w _ q b o x ' ) . b l u r ( f u n c t i o n ( ) {  
 	 s e t T i m e o u t ( " $ ( ' # s u g g e s t i o n s ' ) . h i d e ( ) ; " ,   2 0 0 ) ;  
 	 	 / / f i l l ( ) ;  
 	 } ) ;    
  
 	 / / P a g e   I n i t   p r o c e d u r e  
       / /   $ ( ' . s w _ q b o x ' ) . v a l ( ' ' ) ;  
       / /   v a r   q b o x v a l   =   d o c u m e n t . g e t E l e m e n t B y I d ( " q b o x " ) . v a l u e ;  
       / /   i f   ( q b o x v a l   ! =   ' ' )  
   / /               $ ( " . s w _ q b o x " ) . v a l ( q b o x v a l ) ;  
 / /         c h e c k S e a r c h B o x ( ) ;  
  
 / /         $ ( ' # c a t V a l ' ) . h t m l ( " A9'DÌ*" ) ;  
   / /       $ ( ' # r e g V a l ' ) . h t m l ( " E-/H/G" ) ;  
  
         / / v a r   o d d s C o l o r   =   " # 0 1 B 8 F E " ;  
         / / $ ( " . i t e m : o d d " ) . a d d C l a s s ( " o d d " ) ;  
  
         $ ( ' . s e l e c t e d S u b I t e m ' ) . p a r e n t ( ) . s h o w ( ) . p a r e n t ( ) . a d d C l a s s ( " o p e n I t e m " ) . a d d C l a s s ( " s u b C a t P r e O p e n e d " ) ;  
         $ ( ' . s e l e c t e d I t e m ' ) . c h i l d r e n ( " . s u b C a t s " ) . s h o w ( ) ;  
  
         $ ( ' . c a t I t e m ' ) . n o t ( " . s e l e c t e d I t e m " ) . c l i c k ( f u n c t i o n ( e v e n t )   {  
                 v a r   i s O p e n   =   $ ( t h i s ) . h a s C l a s s ( " o p e n I t e m " ) ;  
                 $ ( " . o p e n I t e m " ) . r e m o v e C l a s s ( " o p e n I t e m " ) . c h i l d r e n ( ) . f i l t e r ( " . s u b C a t s " ) . s l i d e T o g g l e ( ' s l o w ' ) ;  
                 i f   ( ! i s O p e n )   {  
                         $ ( t h i s ) . a d d C l a s s ( " o p e n I t e m " ) ;  
                         $ ( t h i s ) . c h i l d r e n ( ) . f i l t e r ( " . s u b C a t s " ) . s l i d e T o g g l e ( ' s l o w ' ) ;  
                 }  
         } ) ;  
         / / S e a r c h   f o r m   s u b m i t  
         $ ( ' # s e a r c h F o r m ' ) . s u b m i t ( f u n c t i o n ( )   {  
     	 	 i f ( $ ( ' . s w _ q b o x ' ) . h a s C l a s s ( ' b l u r ' ) )  
     	 	 {  
     	 	 	 $ ( " . s w _ q b o x " ) . v a l ( ' ' ) ;  
     	 	 }  
 	 } ) ;  
  
          
         / / F i x   j u m p   b u g  
         / * $ ( " . s u b C a t I t e m " ) . n o t ( " . s e l e c t e d S u b I t e m " ) . h o v e r (  
                 f u n c t i o n ( )   {   $ ( t h i s ) . c h i l d r e n ( " A " ) . c s s ( {   c o l o r :   " # 0 0 0 "   } ) ;   } ,  
                 f u n c t i o n ( )   {   $ ( t h i s ) . c h i l d r e n ( " A " ) . c s s ( {   c o l o r :   " # f f f "   } ) ;   } ) ; * /  
         $ ( " . s u b C a t I t e m " ) . c l i c k (  
                 f u n c t i o n ( e )   {  
                         e . s t o p P r o p a g a t i o n ( ) ;  
                         w i n d o w . l o c a t i o n   =   $ ( t h i s ) . c h i l d r e n ( " a " ) . a t t r ( " h r e f " ) ;  
                 } ) ;  
  
         $ ( " . h e a d e r L i n k s " ) . h o v e r ( f u n c t i o n ( )   {  
                 $ ( t h i s ) . a n i m a t e ( {   h e i g h t :   " 2 0 p x "   } ,   2 0 0 ) ;  
         } ,   f u n c t i o n ( )   {   $ ( t h i s ) . a n i m a t e ( {   h e i g h t :   " 1 4 p x "   } ,   3 0 0 ) ;   } ) ;  
  
         v a r   n a v D u r a t i o n   =   1 5 0 ;   / / t i m e   i n   m i l i s e c o n d s  
         v a r   n a v J u m p H e i g h t   =   " 0 . 4 5 e m " ;  
  
         / / H e a d e r   M e n u  
         / * $ ( ' . h e a d e r M e n u   l i ' ) . h o v e r ( f u n c t i o n ( )   {  
                 $ ( t h i s ) . a n i m a t e ( {   h e i g h t :   " 2 0 " ,   b a c k g r o u n d C o l o r :   " # 0 0 B 3 D F "   } ,   n a v D u r a t i o n ) ;  
         } ,   f u n c t i o n ( )   {  
                 $ ( t h i s ) . a n i m a t e ( {   h e i g h t :   " 1 4 p x " ,   b a c k g r o u n d C o l o r :   " # 3 2 3 9 3 D "   } ,   n a v D u r a t i o n   *   1 . 5 ) ;  
         } ) ; * /  
  
         / / S e a r c h B o x  
         v a r   i s I n F o c u s   =   f a l s e ;  
  
         $ ( " . s w _ q b o x " ) . f o c u s ( f u n c t i o n ( )   {  
                 i f   ( $ ( t h i s ) . h a s C l a s s ( ' b l u r ' ) )   {  
                         $ ( t h i s ) . v a l ( ' ' ) ;  
                         $ ( t h i s ) . r e m o v e C l a s s ( ' b l u r ' ) ;  
                         i s I n F o c u s   =   t r u e ;  
                 }  
         } ) ;  
  
         $ ( " . s w _ q b o x " ) . b l u r ( f u n c t i o n ( )   {  
                 i s I n F o c u s   =   f a l s e ;  
                 $ ( " # q b o x " ) . v a l ( $ ( t h i s ) . v a l ( ) ) ;  
                 c h e c k S e a r c h B o x ( ) ;  
         } ) ;  
  
         $ ( " # s e a r c h F o r m " ) . s u b m i t ( f u n c t i o n ( )   {  
                 i f   ( i s I n F o c u s )  
                         $ ( " # q b o x " ) . v a l ( $ ( " # s w _ q b o x " ) . v a l ( ) ) ;  
         } ) ;  
  
         / / S e a r c h   o p t i o n s  
         $ ( " . s e a r c h S e l e c t o r " ) . c h i l d r e n ( ) . c l i c k ( f u n c t i o n ( e )   {  
                 s w i t c h   ( e . t a r g e t . c l a s s N a m e )   {  
                         c a s e   " p i c O p t i o n " :  
                                 $ ( " # m o d e F i e l d " ) . v a l ( " 1 " ) ;  
                                 $ ( t h i s ) . r e m o v e C l a s s ( " u n s e l e c t e d O p t i o n " ) ;  
                                 $ ( t h i s ) . a d d C l a s s ( " s e l e c t e d O p t i o n " ) ;  
                                 $ ( " # t e x t O p t i o n " ) . r e m o v e C l a s s ( " s e l e c t e d O p t i o n " ) ;  
                                 $ ( " # t e x t O p t i o n " ) . a d d C l a s s ( " u n s e l e c t e d O p t i o n " ) ;  
                                 b r e a k ;  
                         c a s e   " t x t O p t i o n " :  
                                 $ ( " # m o d e F i e l d " ) . v a l ( " 2 " ) ;  
                                 $ ( t h i s ) . r e m o v e C l a s s ( " u n s e l e c t e d O p t i o n " ) ;  
                                 $ ( t h i s ) . a d d C l a s s ( " s e l e c t e d O p t i o n " ) ;  
                                 $ ( " # p i c s O p t i o n " ) . r e m o v e C l a s s ( " s e l e c t e d O p t i o n " ) ;  
                                 $ ( " # p i c s O p t i o n " ) . a d d C l a s s ( " u n s e l e c t e d O p t i o n " ) ;  
                                 i f   ( ! $ . b r o w s e r . m s i e )   {  
                                         $ ( t h i s ) . c s s ( {   m a r g i n T o p :   " - 0 . 5 p x "   } ) ;  
                                 }  
                                 b r e a k ;  
                 }  
         } ) ;  
  
         / / I t e m ' s   h o v e r   a c t i o n  
         v a r   i t e m J u m p H e i g h t   =   " 1 5 p x " ;  
         v a r   o r i g C o l o r ;  
         $ ( ' . i t e m ' ) . h o v e r ( f u n c t i o n ( )   {  
                 i f   ( $ ( t h i s ) . h a s C l a s s ( " f e a t u r e d I t e m " ) )  
                         $ ( t h i s ) . a d d C l a s s ( " f e a t u r e d I t e m H o v e r " ) ;  
                 e l s e  
                         $ ( t h i s ) . a d d C l a s s ( " h o v e r e d I t e m " ) ;  
  
                 i f   ( i t e m A n i m E n a b l e d )   {  
                         $ ( t h i s ) . a n i m a t e ( {   m a r g i n T o p :   " - = "   +   i t e m J u m p H e i g h t  
                         } ,   2 0 0 ) ;  
                         i f   ( j Q u e r y . b r o w s e r . v e r s i o n . s u b s t r ( 0 ,   3 )   = =   " 6 . 0 " )  
                                 $ ( t h i s ) . p a r e n t ( ) . c s s ( {   b o r d e r T o p :   " 1 p x   # 8 3 b c 4 6   s o l i d "   } ) ;  
                 }  
         } ,   f u n c t i o n ( )   {  
                 i f   ( i t e m A n i m E n a b l e d )   {  
                         i f   ( j Q u e r y . b r o w s e r . v e r s i o n . s u b s t r ( 0 ,   3 )   = =   " 6 . 0 " )  
                                 $ ( t h i s ) . p a r e n t ( ) . c s s ( {   b o r d e r T o p :   " 1 p x   # 9 9 9 9 9 9   s o l i d "   } ) ;  
                         $ ( t h i s ) . a n i m a t e ( {   m a r g i n T o p :   " 0 p x "   } ,   3 0 0 ,   n u l l ,   f u n c t i o n ( )   {  
                                 i f   ( j Q u e r y . b r o w s e r . v e r s i o n . s u b s t r ( 0 ,   3 )   = =   " 6 . 0 " )  
                                         $ ( t h i s ) . p a r e n t ( ) . c s s ( {   b o r d e r T o p :   " 1 p x   # f f f   s o l i d "   } ) ;  
                         } ) ;  
                 }  
  
                 i f   ( $ ( t h i s ) . h a s C l a s s ( " f e a t u r e d I t e m " ) )  
                         $ ( t h i s ) . r e m o v e C l a s s ( " f e a t u r e d I t e m H o v e r " ) ;  
                 e l s e  
                         $ ( t h i s ) . r e m o v e C l a s s ( " h o v e r e d I t e m " ) ;  
         } ) ;  
  
         $ ( ' . i t e m ' ) . c l i c k ( f u n c t i o n ( )   {  
                 / / p o p t a s t i c ( $ ( t h i s ) . c h i l d r e n ( " . t i t l e " ) . c h i l d r e n ( " . o u t e r " ) . c h i l d r e n ( " . m i d d l e " ) . c h i l d r e n ( " . i n n e r " ) . c h i l d r e n ( " a " ) . a t t r ( " h r e f " ) ) ;  
                 p o p t a s t i c ( $ ( t h i s ) . c h i l d r e n ( " . t i t l e " ) . c h i l d r e n ( " . t i t l e M i d " ) . c h i l d r e n ( " a " ) . a t t r ( " h r e f " ) ) ;  
         } ) ;  
  
         / / F i l t e r   M e n u s  
         / / C a t e g o r i e s   F i l t e r   M e n u  
         $ ( ' . c a t M e n u   l i ' ) . c l i c k ( f u n c t i o n ( )   {  
                 i f   ( ! $ ( t h i s ) . h a s C l a s s ( ' a c t i v e ' ) )   {  
                         $ ( ' . c a t M e n u   . 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 ' ) ;  
                 }   e l s e  
                         $ ( t h i s ) . r e m o v e C l a s s ( ' a c t i v e ' ) ;  
  
         } ) ;  
         / / R e g i o n s   F i l t e r   M e n u  
         $ ( ' . r e g M e n u   l i ' ) . c l i c k ( f u n c t i o n ( )   {  
                 i f   ( ! $ ( t h i s ) . h a s 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 ' ) ;  
                 e l s e  
                         $ ( t h i s ) . r e m o v e C l a s s ( ' a c t i v e ' ) ;  
         } ) ;  
  
 } ) ;  
  
 f u n c t i o n   C o m m i t F i l t e r s V a l u e s ( )   {  
 	 $ ( ' # c a t e g o r y B o x ' ) . a d d C l a s s ( ' s e l e c t i o n B o x A l t e r e d ' ) ;  
 	 $ ( ' # r e g i o n B o x ' ) . a d d C l a s s ( ' s e l e c t i o n B o x A l t e r e d ' ) ;  
 	  
         / / C l e a r   E v e r y t h i n g  
         / / $ ( ' # c a t V a l ' ) . h t m l ( " " ) ;  
         / / $ ( ' # r e g V a l ' ) . h t m l ( " " ) ;  
         $ ( ' # r e g F i e l d ' ) . v a l ( ' ' ) ;  
         $ ( ' # c a t F i e l d ' ) . v a l ( ' ' ) ;  
  
         / / C a t e g o r i e s   V a l u e  
         / / $ ( ' # c a t V a l ' ) . h t m l ( $ ( ' . c a t M e n u   . a c t i v e ' ) . h t m l ( ) ) ;  
  
         v a r   i   =   0 ;  
         v a r   M A X R e g s   =   1 5 ;  
         / / R e g i o n s   V a l u e s  
         $ ( ' . r e g M e n u   . a c t i v e   . n u m ' ) . e a c h ( f u n c t i o n ( )   {  
                 / * i f   ( i   <   M A X R e g s )   {  
                         $ ( ' # r e g V a l ' ) . h t m l ( $ ( ' # r e g V a l ' ) . h t m l ( )   +   " ,   "   +   $ ( t h i s ) . h t m l ( ) ) ;  
                         i + + ;  
                 } * /  
                 $ ( ' # r e g F i e l d ' ) . v a l ( $ ( ' # r e g F i e l d ' ) . v a l ( )   +   " , "   +   $ ( t h i s ) . n e x t ( ) . h t m l ( ) ) ;  
         } ) ;  
         / / r e m o v e   t h e   l a s t   ' ,   '  
         / * i f   ( i   <   M A X R e g s )  
                 $ ( ' # r e g V a l ' ) . h t m l ( $ ( ' # r e g V a l ' ) . h t m l ( ) . r e p l a c e ( ' ,   ' ,   ' ' ) ) ;  
         e l s e   {  
                 $ ( ' # r e g V a l ' ) . h t m l ( $ ( ' # r e g V a l ' ) . h t m l ( ) . r e p l a c e ( ' ,   ' ,   ' ' ) ) ;  
                 $ ( ' # r e g V a l ' ) . h t m l ( $ ( ' # r e g V a l ' ) . h t m l ( )   +   " , . . . " ) ;  
         } * /  
  
         $ ( ' # r e g F i e l d ' ) . v a l ( $ ( ' # r e g F i e l d ' ) . v a l ( ) . r e p l a c e ( ' , ' ,   ' ' ) ) ;  
         $ ( ' # c a t F i e l d ' ) . v a l ( $ ( ' . c a t M e n u   . a c t i v e ' ) . c h i l d r e n ( " . h i d d e n " ) . h t m l ( ) ) ;  
         / / a l e r t ( $ ( ' # r e g F i e l d ' ) . v a l ( ) ) ;  
         / / a l e r t ( $ ( ' # c a t F i e l d ' ) . v a l ( ) ) ;  
  
         / / C h e c k   i f   n o t h i n g ' s   s e l e c t e d  
         i f   ( j Q u e r y . t r i m ( $ ( ' # c a t V a l ' ) . h t m l ( ) )   = =   " " )  
 	 	 $ ( ' # c a t e g o r y B o x ' ) . r e m o v e C l a s s ( ' s e l e c t i o n B o x A l t e r e d ' ) ;  
         i f   ( j Q u e r y . t r i m ( $ ( ' # r e g V a l ' ) . h t m l ( ) )   = =   " "   | |   $ ( ' . r e g M e n u   . a c t i v e ' ) . s i z e ( )   = =   $ ( ' . r e g M e n u   l i ' ) . s i z e ( ) )  
                 $ ( ' # r e g i o n B o x ' ) . r e m o v e C l a s s ( ' s e l e c t i o n B o x A l t e r e d ' ) ;  
          
 }  
  
 f u n c t i o n   c h e c k S e a r c h B o x ( )   {  
         v a r   p r e d e f i n e d _ t x t   =   " ,3*,H  F'E  Ì'  ¯1HG  "¯GÌ" ;  
         i f   ( $ . t r i m ( $ ( ' . s w _ q b o x ' ) . v a l ( ) )   = =   ' ' )   {  
                 $ ( ' . s w _ q b o x ' ) . v a l ( p r e d e f i n e d _ t x t ) ;  
                 $ ( ' . s w _ q b o x ' ) . a d d C l a s s ( ' b l u r ' ) ;  
         }  
 }  
  
 v a r   n e w w i n d o w ;  
 f u n c t i o n   p o p t a s t i c ( u r l )   {  
         n e w w i n d o w   =   w i n d o w . o p e n ( u r l ,   ' _ b l a n k ' ,   ' h e i g h t = 7 0 0 , w i d t h = 9 0 0 , r e s i z a b l e = n o ' ) ;  
         i f   ( w i n d o w . f o c u s )   {   n e w w i n d o w . f o c u s ( )   }  
 }  
  
 f u n c t i o n   l o o k u p ( i n p u t S t r i n g )   {  
 	 	 i f ( i n p u t S t r i n g . l e n g t h   = =   0 )   {  
 	 	 	 / /   H i d e   t h e   s u g g e s t i o n   b o x .  
 	 	 	 $ ( ' # s u g g e s t i o n s ' ) . h i d e ( ) ;  
 	 	 }   e l s e   {  
 	 	 	 $ . p o s t ( " / a p i / s u g g e s t " ,   { k e y w o r d :   i n p u t S t r i n g } ,   f u n c t i o n ( d a t a ) {  
 	 	 	 	 i f ( d a t a . l e n g t h   > 0 )   {  
 	 	 	 	 	 $ ( ' # s u g g e s t i o n s ' ) . s h o w ( ) ;  
 	 	 	 	 	 $ ( ' # a u t o S u g g e s t i o n s L i s t ' ) . h t m l ( " " ) ;  
 	 	 	 	 	 $ . e a c h ( d a t a ,   f u n c t i o n ( i ,   i t e m ) {  
 	 	 	 	 	 $ ( ' # a u t o S u g g e s t i o n s L i s t ' ) . a p p e n d (  
 	 	 	 	 	 	 " < l i   o n c l i c k = \ " f i l l ( ' " + i t e m + " ' ) \ " > " + i t e m + " < / l i > " ) ;  
 	 	 	 	 	 	 } ) ;  
 	 	 	 	 }  
 	 	 	 } ,   " j s o n " ) ;  
 	 	 }  
 	 }   / /   l o o k u p  
 	  
 	 f u n c t i o n   f i l l ( t h i s V a l u e )   {  
 	 	 $ ( ' . s w _ q b o x ' ) . v a l ( t h i s V a l u e ) ;  
 	 	 s e t T i m e o u t ( " $ ( ' # s u g g e s t i o n s ' ) . h i d e ( ) ; " ,   2 0 0 ) ;  
 	 	 $ ( ' # s e a r c h F o r m ' ) . s u b m i t ( ) ;  
 	 }  
 f u n c t i o n   k e y e n t e r ( f i e l d , e )  
 {  
 v a r   k e y ;  
 i f   ( w i n d o w . e v e n t )  
       k e y   =   w i n d o w . e v e n t . k e y C o d e ;  
 i f   ( k e y > 3 1 )  
     i f   ( k e y < 1 2 8 )  
     {  
         i f   ( w i n d o w . e v e n t )  
             w i n d o w . e v e n t . k e y C o d e = '   ! " # $ % ¯) ( × + H- . / 0 1 2 3 4 5 6 7 8 9 : C, = . @ P0} IOJD'÷ @/  /× N!MA { KR%~ ,˜†^ _ ~402J+(D'G*FE&/.-6B3A9157:8< | > Q' . c h a r C o d e A t ( k e y - 3 2 ) ;  
     }  
 } 
