ÿþf u n c t i o n   P a n e s ( i d ) 
 { 
 	 t h i s . p a n e s   =   n e w   A r r a y ( ) ; 
 	 t h i s . m a x z I n d e x   =   - 1 ; 
 	 t h i s . i d   =   i d ; 
 	 t h i s . o f f s e t   =   2 0 ; 
 	 t h i s . x   =   1 8 0 ; 
 	 t h i s . y   =   5 0 ; 
 	 t h i s . a n i m a t i o n _ d e l a y   =   5 0 0 ; 
 	 
 	 t h i s . p o s _ c e n t e r   =   f u n c t i o n ( ) 
 	 { 
 	 	 v a r   p w i d t h   =   7 2 7 ; / /   +   t h i s . p a n e s . l e n g t h   *   t h i s . o f f s e t ; 
 	 	 v a r   p h e i g h t   =   4 0 1 ; 
 	 	 
 	 	 t h i s . x   =   M a t h . c e i l ( ( $ ( w i n d o w ) . w i d t h ( ) - p w i d t h ) / 4 ) + 2 0 ; 
 	 	 t h i s . y   =   M a t h . c e i l ( ( $ ( w i n d o w ) . h e i g h t ( ) - p h e i g h t ) / 4 ) ; 
 	 } 
 	 
 	 t h i s . s l i d e _ i n   =   f u n c t i o n ( ) 
 	 { 
 	 	 $ ( ' # ' + t h i s . i d ) . c s s ( ' o p a c i t y ' , 0 ) ; 
 	 	 $ ( ' # ' + t h i s . i d ) . c s s ( ' l e f t ' , t h i s . x ) ; 
 	 	 $ ( ' # ' + t h i s . i d ) . c s s ( ' t o p ' , t h i s . y   +   ' p x ' ) ; 
 	 	 
 	 	 v a r   c   =   { } ; 
 	 	 c [ ' o p a c i t y ' ]   =   1 ; 
 	 	 $ ( ' # ' + t h i s . i d ) . a n i m a t e ( c , t h i s . a n i m a t i o n _ d e l a y + 4 0 0 ) ; 
 	 
 
 	 	 c [ ' t o p ' ]   =     t h i s . y   +   ' p x ' ; 
 
 	 	 	 	 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 { 
 	 	 	 v a r   p i d   =   ' # ' + t h i s . p a n e s [ i ] . i d ; 
 	 	 	 
 	 	 	 v a r   d i r   =   M a t h . f l o o r ( M a t h . r a n d o m ( ) * 5 ) % 2 ; 
 	 	 	 v a r   c h a n g e   =     M a t h . f l o o r ( M a t h . r a n d o m ( ) * 6 0 0 ) ; 
 	 	 	 i f ( d i r   <   0 ) 
 	 	 	 	 c h a n g e   * =   - 1 ; 
 	 	 	 
 	 	 	 $ ( p i d ) . a n i m a t e ( c , t h i s . a n i m a t i o n _ d e l a y + c h a n g e ) ; 
 	 	 	 v a r   l e f t   =   t h i s . x   -   t h i s . o f f s e t   *   t h i s . p a n e s [ i ] . z I n d e x ; 
 	 	 	 $ ( p i d ) . c s s ( ' l e f t ' , l e f t   +   ' p x ' ) ; 
 	 	 	 $ ( p i d ) . c s s ( ' z - i n d e x ' , t h i s . p a n e s [ i ] . z I n d e x ) ; 
 	 	 	 
 	 	 } 
 	 	 
 
 	 } 
 	 
 	 t h i s . d r a w   =   f u n c t i o n ( ) 
 	 { 
 	 	 $ ( ' # ' + t h i s . i d ) . c s s ( ' t o p ' , t h i s . y ) ; 
 	 	 $ ( ' # ' + t h i s . i d ) . c s s ( ' l e f t ' ,   t h i s . x ) ; 
 	 	 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 { 
 	 	 	 v a r   p i d   =   ' # ' + t h i s . p a n e s [ i ] . i d ; 
 	 	 
 	 	 	 $ ( p i d ) . c s s ( ' t o p ' , t h i s . y   +   ' p x ' ) ; 
 	 	 	 v a r   l e f t   =   t h i s . x   -   t h i s . o f f s e t   *   t h i s . p a n e s [ i ] . z I n d e x ; 
 	 	 	 $ ( p i d ) . c s s ( ' l e f t ' , l e f t   +   ' p x ' ) ; 
 	 	 	 $ ( p i d ) . c s s ( ' z - i n d e x ' , t h i s . p a n e s [ i ] . z I n d e x ) ; 
 	 	 	 
 	 	 } 
 	 } 
 	 
 	 t h i s . p a n e _ h t m l   =   f u n c t i o n ( i d , h t m l ) 
 	 { 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 	 i f ( t h i s . p a n e s [ i ] . i d   = =   i d ) 
 	 	 	 	 r e t u r n   t h i s . p a n e s [ i ] . h t m l _ i n n e r   =   h t m l ; 
 	 } 
 	 
 	 t h i s . s w i t c h _ z i n d e x   =   f u n c t i o n ( o n e , t w o ) 
 	 { 
 	 	 t h i s . p a n e s [ o n e ] . z I n d e x   =   t h i s . p a n e s [ t w o ] . z I n d e x ; 
 	 	 t h i s . p a n e s [ t w o ] . z I n d e x   =   t h i s . m a x z I n d e x ; 
 	 	 
 	 	 $ ( ' # ' + t h i s . p a n e s [ o n e ] . i d ) . c s s ( ' z - i n d e x ' , t h i s . p a n e s [ o n e ] . z I n d e x ) ; 
 	 	 $ ( ' # ' + t h i s . p a n e s [ t w o ] . i d ) . c s s ( ' z - i n d e x ' , t h i s . p a n e s [ t w o ] . z I n d e x ) ; 
 	 } 
 
 	 t h i s . p a n e _ c l i c k   =   f u n c t i o n ( i d ) 
 	 { 
 	 	 v a r   p a n e _ t o _ f r o n t ; 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 	 i f ( t h i s . p a n e s [ i ] . i d   = =   i d ) 
 	 	 	 { 
 	 	 	 	 p a n e _ t o _ f r o n t   =   i ; 
 	 	 	 	 b r e a k ; 
 	 	 	 } 
 	 	 	 
 	 	 v a r   p a n e _ t o _ b a c k ; 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 	 i f ( t h i s . p a n e s [ i ] . z I n d e x   = =   t h i s . m a x z I n d e x ) 
 	 	 	 { 
 	 	 	 	 p a n e _ t o _ b a c k   =   i ; 
 	 	 	 	 b r e a k ; 
 	 	 	 } 
 	 	 	 
 	 	 v a r   l e f t _ b a c k   =   t h i s . x   -   t h i s . o f f s e t   *   t h i s . p a n e s [ p a n e _ t o _ b a c k ] . z I n d e x ; 
 	 	 v a r   l e f t _ f r o n t   =   t h i s . x   -   t h i s . o f f s e t   *   t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . z I n d e x ; 
 	 	 	 	 	 
 	 	 t h i s . p a n e s [ p a n e _ t o _ b a c k ] . z I n d e x   =   t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . z I n d e x ; 
 	 	 t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . z I n d e x   =   t h i s . m a x z I n d e x ; 
 	 	 
 	 	 $ ( ' # ' + t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . i d ) . c s s ( ' z - i n d e x ' , t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . z I n d e x ) ; 
 	 	 $ ( ' # ' + t h i s . p a n e s [ p a n e _ t o _ b a c k ] . i d ) . c s s ( ' z - i n d e x ' , t h i s . p a n e s [ p a n e _ t o _ b a c k ] . z I n d e x ) ; 
 	 
 	 	 v a r   c   =   { } ; 
 	 	 c [ ' l e f t ' ]   =     l e f t _ b a c k ; 
 	 / / 	 c [ ' z - i n d e x ' ]   =   t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . z I n d e x ; 
 	 	 $ ( ' # ' + t h i s . p a n e s [ p a n e _ t o _ f r o n t ] . i d ) . a n i m a t e ( c , t h i s . a n i m a t i o n _ d e l a y ) ; 
 	 	 
 	 	 c [ ' l e f t ' ]   =   l e f t _ f r o n t ; 
 	 / / 	 c [ ' z - i n d e x ' ]   =   t h i s . p a n e s [ p a n e _ t o _ b a c k ] . z I n d e x ; 
 	 	 $ ( ' # ' + t h i s . p a n e s [ p a n e _ t o _ b a c k ] . i d ) . a n i m a t e ( c , t h i s . a n i m a t i o n _ d e l a y ) ; 
 	 	 
 
 
 	 } 
 	 
 	 t h i s . p a n e _ c r e a t e   =   f u n c t i o n ( i d ) 
 	 { 
 	 	 i f ( t h i s . p a n e _ e x i s t s ( i d ) ) 
 	 	 	 r e t u r n   f a l s e ; 
 	 	 	 
 	 	 t h i s . m a x z I n d e x + + ; 
 	 	 
 	 	 v a r   p a n e   =   n e w   P a n e ( i d ) ; 
 	 	 p a n e . z I n d e x   =   t h i s . m a x z I n d e x ; 
 	 	 
 	 	 t h i s . p a n e s . p u s h ( p a n e ) ; 
 	 	 
 	 	 r e t u r n   t r u e ; 
 	 } 
 
 	 
 	 t h i s . p a n e _ e x i s t s   =   f u n c t i o n ( i d ) 
 	 { 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 	 i f ( t h i s . p a n e s [ i ] . i d   = =   i d ) 
 	 	 	 	 r e t u r n   t r u e ; 
 	 	 	 	 
 	 	 r e t u r n   f a l s e ; 
 	 } 
 	 
 	 t h i s . p a n e _ r e m o v e   =   f u n c t i o n ( i d ) 
 	 { 
 	 	 / / 
 	 } 
 	 
 	 t h i s . h t m l   =   f u n c t i o n ( ) 
 	 { 
 	 	 v a r   h t m l   =   ' < d i v   i d = " '   +   t h i s . i d   +   ' " > ' ; 
 	 	 f o r ( v a r   i   i n   t h i s . p a n e s ) 
 	 	 	 h t m l   + =   t h i s . p a n e s [ i ] . h t m l ( ) ; 
 	 	 
 	 	 h t m l   + =   ' < / d i v > ' ; 
 	 	 
 	 	 r e t u r n   h t m l ; 
 	 } 
 } 
