þÿ f u n c t i o n   i n i t R o l l o v e r s ( )   { 
 	 i f   ( ! d o c u m e n t . g e t E l e m e n t B y I d )   r e t u r n 
 	 
 	 v a r   a P r e L o a d   =   n e w   A r r a y ( ) ; 
 	 v a r   s T e m p S r c ; 
 	 v a r   a I m a g e s   =   d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( ' i m g ' ) ; 
 
 	 f o r   ( v a r   i   =   0 ;   i   <   a I m a g e s . l e n g t h ;   i + + )   { 	 	 
 	 	 i f   ( a I m a g e s [ i ] . c l a s s N a m e   = =   ' i m g o v e r ' )   { 
 	 	 	 v a r   s r c   =   a I m a g e s [ i ] . g e t A t t r i b u t e ( ' s r c ' ) ; 
 	 	 	 v a r   f t y p e   =   s r c . s u b s t r i n g ( s r c . l a s t I n d e x O f ( ' . ' ) ,   s r c . l e n g t h ) ; 
 	 	 	 v a r   h s r c   =   s r c . r e p l a c e ( f t y p e ,   ' _ r ' + f t y p e ) ; 
 
 	 	 	 a I m a g e s [ i ] . s e t A t t r i b u t e ( ' h s r c ' ,   h s r c ) ; 
 	 	 	 
 	 	 	 a P r e L o a d [ i ]   =   n e w   I m a g e ( ) ; 
 	 	 	 a P r e L o a d [ i ] . s r c   =   h s r c ; 
 	 	 	 
 	 	 	 a I m a g e s [ i ] . o n m o u s e o v e r   =   f u n c t i o n ( )   { 
 	 	 	 	 s T e m p S r c   =   t h i s . g e t A t t r i b u t e ( ' s r c ' ) ; 
 	 	 	 	 t h i s . s e t A t t r i b u t e ( ' s r c ' ,   t h i s . g e t A t t r i b u t e ( ' h s r c ' ) ) ; 
 	 	 	 } 	 
 	 	 	 
 	 	 	 a I m a g e s [ i ] . o n m o u s e o u t   =   f u n c t i o n ( )   { 
 	 	 	 	 i f   ( ! s T e m p S r c )   s T e m p S r c   =   t h i s . g e t A t t r i b u t e ( ' s r c ' ) . r e p l a c e ( ' _ r ' + f t y p e ,   f t y p e ) ; 
 	 	 	 	 t h i s . s e t A t t r i b u t e ( ' s r c ' ,   s T e m p S r c ) ; 
 	 	 	 } 
 	 	 } 
 	 } 
 } 
 f u n c t i o n   W i n d o w O n l o a d ( f )   { 
         v a r   p r e v = w i n d o w . o n l o a d ; 
         w i n d o w . o n l o a d = f u n c t i o n ( ) {   i f ( p r e v ) p r e v ( ) ;   f ( ) ;   } 
     } 
 W i n d o w O n l o a d ( i n i t R o l l o v e r s ) ; 
 
 
 $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   { 
 	 / / o p e n   e x t e r n a l   u r l s   i n   n e w   w i n d o w 
 	 $ ( ' a [ h r e f ^ = " h t t p : / / " ] ' ) . n o t ( ' a [ h r e f * = " t e k s e r v e . c o m " ] ' ) . a d d C l a s s ( ' e x t e r n a l ' ) . a t t r ( ' t a r g e t ' ,   ' _ b l a n k ' ) ; 
 	 
 	 / / c h a n g e   / s t o r e /   l i n k s   w h e n   i n   a   s p e c i a l t y   s t o r e   t o   p r e v e n t   c u s t   f r o m   a c c i d e n t a l l y   l e a v i n g   s t o r e 
 
 	 i f   ( s t o r e _ s c r i p t _ b a s e   ! =   " / s t o r e / " )   { 
 	 	 $ ( ' a [ h r e f ^ = " / s t o r e / " ] , a [ h r e f * = " t e k s e r v e . c o m / s t o r e / " ] ' ) . e a c h ( f u n c t i o n ( ) { 
 	 	 	 $ ( t h i s ) . a t t r ( ' h r e f ' ,   $ ( t h i s ) . a t t r ( ' h r e f ' ) . r e p l a c e ( " / s t o r e / " ,   s t o r e _ s c r i p t _ b a s e ) ) ; 
 	 	 } )   
 	 	 $ ( ' a [ h r e f ^ = " / p r o d u c t s / " ] ,   a [ h r e f * = " t e k s e r v e . c o m / p r o d u c t s / " ] ' ) . e a c h ( f u n c t i o n ( ) { 
 	 	 	 $ ( t h i s ) . a t t r ( ' h r e f ' ,   $ ( t h i s ) . a t t r ( ' h r e f ' ) . r e p l a c e ( " / p r o d u c t s / " ,   s t o r e _ s c r i p t _ b a s e ) ) ; 
 	 	 } ) 
 	 } 
 
 	 / / . o r ( ' a [ h r e f * = " t e k s e r v e . c o m / s t o r e / " ] ' ) 
 	 $ ( ' l i . m a i n i t e m s ' ) . 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 ( ' u l ' ) . s h o w ( ) ;   } , 
 	 	 f u n c t i o n ( )   {   $ ( t h i s ) . c h i l d r e n ( ' u l ' ) . h i d e ( ) ;   } 
 	 	 ) ; 
 	 	 
 	         $ ( " . c o l - p r o d - q t y   d i v " ) . n o t ( " . o n e o f f " ) . a d d C l a s s ( ' j s e n a b l e d ' ) . a p p e n d ( ' < d i v   c l a s s = " d e c i n c - w r a p " > < d i v   c l a s s = " i n c   b u t t o n " > < / d i v > < d i v   c l a s s = " d e c   b u t t o n " > < / d i v > < / d i v > ' ) ; 
 	 
 } ) ; 
 
 
 $ ( f u n c t i o n ( )   { 
 
         $ ( " . d e c i n c - w r a p   . b u t t o n " ) . c l i c k ( f u n c t i o n ( )   { 
                 v a r   $ b u t t o n   =   $ ( t h i s ) ; 
                 v a r   o l d V a l u e   =   $ b u t t o n . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " i n p u t " ) . v a l ( ) ; 
         
                 i f   ( $ b u t t o n . h a s C l a s s ( " i n c " ) )   { 
         	     v a r   n e w V a l   =   p a r s e F l o a t ( o l d V a l u e )   +   1 ; 
         	     / /   A J A X   s a v e   w o u l d   g o   h e r e 
         	 }   e l s e   { 
         	     / /   D o n ' t   a l l o w   d e c r e m e n t i n g   b e l o w   O N E   ( A B F   2 0 0 9 - 1 1 - 1 0 ) 
         	     i f   ( o l d V a l u e   >   1 )   { 
         	             v a r   n e w V a l   =   p a r s e F l o a t ( o l d V a l u e )   -   1 ; 
         	           	 / /   A J A X   s a v e   w o u l d   g o   h e r e 
         	     } 
         	 } 
         	 $ b u t t o n . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " i n p u t " ) . v a l ( n e w V a l ) . c h a n g e ( ) ; 
         } ) ; 
                 
         / / b i n d   f o o t e r   s e a r c h   c l i c k s 
         $ ( ' l i . f o o t e r - s e a r c h   a ' ) . b i n d ( ' c l i c k . t e k . f o o t _ i n a c t i v e ' ,   f u n c t i o n ( e ) { 
             / / I f   w e   a r e   c l i c k i n g   a n   a c t i v e   i t e m ,   d e a c t i v a t e   i t . 
             i f ( $ ( t h i s ) . p a r e n t s ( ' l i ' ) . h a s C l a s s ( ' a c t i v e ' ) ) { 
                 $ ( t h i s ) . p a r e n t s ( ' l i ' ) . r e m o v e C l a s s ( ' a c t i v e ' ) . f i n d ( ' i n p u t [ t y p e = " s e a r c h " ] ' ) . b l u r ( ) ; 
                 r e t u r n   f a l s e ; 
             } 
             / / i f   a   f o o t e r - s e a r c h   l i   i s   a c t i v e ,   m a k e   i t   i n a c t i v e 
             i f ( $ ( ' l i . f o o t e r - s e a r c h . a c t i v e ' ) . l e n g t h   >   0 ) { 
                 $ ( ' l i . f o o t e r - s e a r c h . a c t i v e ' ) . r e m o v e C l a s s ( ' a c t i v e ' ) ; 
             } 
             / / m a k e   t h e   t a r g e t   o f   o u r   c l i c k   a c t i v e   a n d   f o c u s   t h e   i n p u t . 
             $ ( t h i s ) . p a r e n t s ( ' l i ' ) . a d d C l a s s ( ' a c t i v e ' ) . f i n d ( ' i n p u t [ t y p e = " s e a r c h " ] ' ) . f o c u s ( ) ; 
                         
             r e t u r n   f a l s e ; 
         } ) ; 
         
         / / i f   a   f o o t e r   s e a r c h   i t e m   i s   a c t i v e ,   d e a c t i v a t e   i t   i f   c l i c k e d   a n y w h e r e   e l s e . 
         $ ( ' b o d y ' ) . b i n d ( ' c l i c k . t e k . f o o t e r _ g l o b a l ' ,   f u n c t i o n ( e ) { 
             i f ( $ ( e . t a r g e t ) . p a r e n t s ( ' l i ' ) . h a s C l a s s ( ' . f o o t e r - s e a r c h ' )   & &   $ ( e . t a r g e t ) . p a r e n t s ( ' l i ' ) . h a s C l a s s ( ' . a c t i v e ' ) ) { 
                 
             }   e l s e   { 
                 i f ( $ ( ' l i . f o o t e r - s e a r c h . a c t i v e ' ) . l e n g t h   >   0 ) { 
                     $ ( ' l i . f o o t e r - s e a r c h . a c t i v e ' ) . r e m o v e C l a s s ( ' a c t i v e ' ) ; 
                 } 
             } 
         } ) ; 
         
 
 } ) ; 
 

