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