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