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