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