ÿþ/ / 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 - 2 0 0 7   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   M o o T o o l s = { v e r s i o n : " 1 . 1 1 " } ; f u n c t i o n   $ d e f i n e d ( A ) { r e t u r n ( A ! = u n d e f i n e d ) ; } f u n c t i o n   $ t y p e ( B ) { i f ( ! $ d e f i n e d ( B ) ) { r e t u r n   f a l s e ; } i f ( B . h t m l E l e m e n t ) { r e t u r n " e l e m e n t " ; 
 } v a r   A = t y p e o f   B ; i f ( A = = " o b j e c t " & & B . n o d e N a m e ) { s w i t c h ( B . n o d e T y p e ) { c a s e   1 : r e t u r n " e l e m e n t " ; c a s e   3 : r e t u r n ( / \ S / ) . t e s t ( B . n o d e V a l u e ) ? " t e x t n o d e " : " w h i t e s p a c e " ; } } i f ( A = = " o b j e c t " | | A = = " f u n c t i o n " ) { s w i t c h ( B . c o n s t r u c t o r ) { c a s e   A r r a y : r e t u r n " a r r a y " ; 
 c a s e   R e g E x p : r e t u r n " r e g e x p " ; c a s e   C l a s s : r e t u r n " c l a s s " ; } i f ( t y p e o f   B . l e n g t h = = " n u m b e r " ) { i f ( B . i t e m ) { r e t u r n " c o l l e c t i o n " ; } i f ( B . c a l l e e ) { r e t u r n " a r g u m e n t s " ; } } } r e t u r n   A ; 
 } f u n c t i o n   $ m e r g e ( ) { v a r   C = { } ; f o r ( v a r   B = 0 ; B < a r g u m e n t s . l e n g t h ; B + + ) { f o r ( v a r   E   i n   a r g u m e n t s [ B ] ) { v a r   A = a r g u m e n t s [ B ] [ E ] ; v a r   D = C [ E ] ; i f ( D & & $ t y p e ( A ) = = " o b j e c t " & & $ t y p e ( D ) = = " o b j e c t " ) { C [ E ] = $ m e r g e ( D , A ) ; 
 } e l s e { C [ E ] = A ; } } } r e t u r n   C ; } v a r   $ e x t e n d = f u n c t i o n ( ) { v a r   A = a r g u m e n t s ; i f ( ! A [ 1 ] ) { A = [ t h i s , A [ 0 ] ] ; } f o r ( v a r   B   i n   A [ 1 ] ) { A [ 0 ] [ B ] = A [ 1 ] [ B ] ; } r e t u r n   A [ 0 ] ; } ; v a r   $ n a t i v e = f u n c t i o n ( ) { f o r ( v a r   B = 0 , A = a r g u m e n t s . l e n g t h ; 
 B < A ; B + + ) { a r g u m e n t s [ B ] . e x t e n d = f u n c t i o n ( C ) { f o r ( v a r   D   i n   C ) { i f ( ! t h i s . p r o t o t y p e [ D ] ) { t h i s . p r o t o t y p e [ D ] = C [ D ] ; } i f ( ! t h i s [ D ] ) { t h i s [ D ] = $ n a t i v e . g e n e r i c ( D ) ; } } } ; } } ; 
 $ n a t i v e . g e n e r i c = f u n c t i o n ( A ) { r e t u r n   f u n c t i o n ( B ) { r e t u r n   t h i s . p r o t o t y p e [ A ] . a p p l y ( B , A r r a y . p r o t o t y p e . s l i c e . c a l l ( a r g u m e n t s , 1 ) ) ; } ; } ; $ 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   $ c h k ( A ) { r e t u r n   ! ! ( A | | A = = = 0 ) ; } f u n c t i o n   $ p i c k ( B , A ) { r e t u r n   $ d e f i n e d ( B ) ? B : A ; } f u n c t i o n   $ r a n d o m ( B , A ) { r e t u r n   M a t h . f l o o r ( M a t h . r a n d o m ( ) * ( A - B + 1 ) + B ) ; } f u n c t i o n   $ t i m e ( ) { r e t u r n   n e w   D a t e ( ) . g e t T i m e ( ) ; 
 } f u n c t i o n   $ c l e a r ( A ) { c l e a r T i m e o u t ( A ) ; c l e a r I n t e r v a l ( A ) ; r e t u r n   n u l l ; } v a r   A b s t r a c t = f u n c t i o n ( A ) { A = A | | { } ; A . e x t e n d = $ e x t e n d ; r e t u r n   A ; } ; v a r   W i n d o w = n e w   A b s t r a c t ( w i n d o w ) ; 
 v a r   D o c u m e n t = n e w   A b s t r a c t ( d o c u m e n t ) ; d o c u m e n t . h e a d = d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " h e a d " ) [ 0 ] ; w i n d o w . x p a t h = ! ! ( d o c u m e n t . e v a l u a t e ) ; i f ( w i n d o w . A c t i v e X O b j e c t ) { w i n d o w . i e = w i n d o w [ w i n d o w . X M L H t t p R e q u e s t ? " i e 7 " : " i e 6 " ] = t r u e ; 
 } e l s e { i f ( 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 ) { w i n d o w . w e b k i t = w i n d o w [ w i n d o w . x p a t h ? " w e b k i t 4 2 0 " : " w e b k i t 4 1 9 " ] = t r u e ; } e l s e { i f ( d o c u m e n t . g e t B o x O b j e c t F o r ! = n u l l ) { w i n d o w . g e c k o = t r u e ; 
 } } } w i n d o w . k h t m l = w i n d o w . w e b k i t ; O b j e c t . e x t e n d = $ e x t e n d ; i f ( t y p e o f   H T M L E l e m e n t = = " u n d e f i n e d " ) { v a r   H T M L E l e m e n t = f u n c t i o n ( ) { } ; i f ( w i n d o w . w e b k i t ) { d o c u m e n t . c r e a t e E l e m e n t ( " i f r a m e " ) ; 
 } H T M L E l e m e n t . p r o t o t y p e = ( w i n d o w . w e b k i t ) ? w i n d o w [ " [ [ D O M E l e m e n t . p r o t o t y p e ] ] " ] : { } ; } H T M L E l e m e n t . p r o t o t y p e . h t m l E l e m e n t = f u n c t i o n ( ) { } ; i f ( w i n d o w . i e 6 ) { t r y { 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 ) ; 
 } c a t c h ( e ) { } } v a r   C l a s s = f u n c t i o n ( B ) { v a r   A = f u n c t i o n ( ) { r e t u r n ( a r g u m e n t s [ 0 ] ! = = n u l l & & t h i s . i n i t i a l i z e & & $ t y p e ( t h i s . i n i t i a l i z e ) = = " f u n c t i o 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 ) : t h i s ; 
 } ; $ e x t e n d ( A , t h i s ) ; A . p r o t o t y p e = B ; A . c o n s t r u c t o r = C l a s s ; r e t u r n   A ; } ; C l a s s . e m p t y = f u n c t i o n ( ) { } ; 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 ( B ) { v a r   C = n e w   t h i s ( n u l l ) ; f o r ( v a r   D   i n   B ) { v a r   A = C [ D ] ; 
 C [ D ] = C l a s s . M e r g e ( A , B [ D ] ) ; } r e t u r n   n e w   C l a s s ( C ) ; } , i m p l e m e n t : f u n c t i o n ( ) { f o r ( v a r   B = 0 , A = a r g u m e n t s . l e n g t h ; B < A ; B + + ) { $ e x t e n d ( t h i s . p r o t o t y p e , a r g u m e n t s [ B ] ) ; } } } ; C l a s s . M e r g e = f u n c t i o n ( C , D ) { i f ( C & & C ! = D ) { v a r   B = $ t y p e ( D ) ; 
 i f ( B ! = $ t y p e ( C ) ) { r e t u r n   D ; } s w i t c h ( B ) { c a s e " f u n c t i o n " : v a r   A = f u n c t i o n ( ) { t h i s . p a r e n t = a r g u m e n t s . c a l l e e . p a r e n t ; r e t u r n   D . a p p l y ( t h i s , a r g u m e n t s ) ; } ; A . p a r e n t = C ; r e t u r n   A ; 
 c a s e " o b j e c t " : r e t u r n   $ m e r g e ( C , D ) ; } } r e t u r n   D ; } ; 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 ( A ) { 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 ( A ) ; 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 h i f t ( ) . 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 = [ ] ; } } ) ; v a r   E v e n t s = n e w   C l a s s ( { a d d E v e n t : f u n c t i o n ( B , A ) { i f ( A ! = C l a s s . e m p t y ) { t h i s . $ e v e n t s = t h i s . $ e v e n t s | | { } ; t h i s . $ e v e n t s [ B ] = t h i s . $ e v e n t s [ B ] | | [ ] ; 
 t h i s . $ e v e n t s [ B ] . i n c l u d e ( A ) ; } r e t u r n   t h i s ; } , f i r e E v e n t : f u n c t i o n ( C , B , A ) { i f ( t h i s . $ e v e n t s & & t h i s . $ e v e n t s [ C ] ) { t h i s . $ e v e n t s [ C ] . e a c h ( f u n c t i o n ( D ) { D . c r e a t e ( { " b i n d " : t h i s , " d e l a y " : A , " a r g u m e n t s " : B } ) ( ) ; 
 } , t h i s ) ; } 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 ( B , A ) { i f ( t h i s . $ e v e n t s & & t h i s . $ e v e n t s [ B ] ) { t h i s . $ e v e n t s [ B ] . r e m o v e ( A ) ; } r e t u r n   t h i s ; } } ) ; v a r   O p t i o n 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 ( ) { t h i s . o p t i o n s = $ m e r g e . a p p l y ( n u l l , [ t h i s . o p t i o n s ] . e x t e n d ( a r g u m e n t s ) ) ; 
 i f ( t h i s . a d d E v e n t ) { f o r ( v a r   A   i n   t h i s . o p t i o n s ) { i f ( $ t y p e ( t h i s . o p t i o n s [ A ] = = " f u n c t i o n " ) & & ( / ^ o n [ A - Z ] / ) . t e s t ( A ) ) { t h i s . a d d E v e n t ( A , t h i s . o p t i o n s [ A ] ) ; } } } r e t u r n   t h i s ; 
 } } ) ; A r r a y . e x t e n d ( { f o r E a c h : f u n c t i o n ( C , D ) { f o r ( v a r   B = 0 , A = t h i s . l e n g t h ; B < A ; B + + ) { C . c a l l ( D , t h i s [ B ] , B , t h i s ) ; } } , f i l t e r : f u n c t i o n ( D , E ) { v a r   C = [ ] ; f o r ( v a r   B = 0 , A = t h i s . l e n g t h ; 
 B < A ; B + + ) { i f ( D . c a l l ( E , t h i s [ B ] , B , t h i s ) ) { C . p u s h ( t h i s [ B ] ) ; } } r e t u r n   C ; } , m a p : f u n c t i o n ( D , E ) { v a r   C = [ ] ; f o r ( v a r   B = 0 , A = t h i s . l e n g t h ; B < A ; B + + ) { C [ B ] = D . c a l l ( E , t h i s [ B ] , B , t h i s ) ; 
 } r e t u r n   C ; } , e v e r y : f u n c t i o n ( C , D ) { f o r ( v a r   B = 0 , A = t h i s . l e n g t h ; B < A ; B + + ) { i f ( ! C . c a l l ( D , t h i s [ B ] , B , t h i s ) ) { r e t u r n   f a l s e ; } } r e t u r n   t r u e ; } , s o m e : f u n c t i o n ( C , D ) { f o r ( v a r   B = 0 , A = t h i s . l e n g t h ; 
 B < A ; B + + ) { i f ( C . c a l l ( D , t h i s [ B ] , B , t h i s ) ) { r e t u r n   t r u e ; } } r e t u r n   f a l s e ; } , i n d e x O f : f u n c t i o n ( C , D ) { v a r   A = t h i s . l e n g t h ; f o r ( v a r   B = ( D < 0 ) ? M a t h . m a x ( 0 , A + D ) : D | | 0 ; B < A ; B + + ) { i f ( t h i s [ B ] = = = C ) { r e t u r n   B ; 
 } } r e t u r n   - 1 ; } , c o p y : f u n c t i o n ( D , C ) { D = D | | 0 ; i f ( D < 0 ) { D = t h i s . l e n g t h + D ; } C = C | | ( t h i s . l e n g t h - D ) ; v a r   A = [ ] ; f o r ( v a r   B = 0 ; B < C ; B + + ) { A [ B ] = t h i s [ D + + ] ; } r e t u r n   A ; } , r e m o v e : f u n c t i o n ( C ) { v a r   B = 0 ; 
 v a r   A = t h i s . l e n g t h ; w h i l e ( B < A ) { i f ( t h i s [ B ] = = = C ) { t h i s . s p l i c e ( B , 1 ) ; A - - ; } e l s e { B + + ; } } r e t u r n   t h i s ; } , c o n t a i n s : f u n c t i o n ( A , B ) { r e t u r n   t h i s . i n d e x O f ( A , B ) ! = - 1 ; } , a s s o c i a t e : f u n c t i o n ( C ) { v a r   D = { } , B = M a t h . m i n ( t h i s . l e n g t h , C . l e n g t h ) ; 
 f o r ( v a r   A = 0 ; A < B ; A + + ) { D [ C [ A ] ] = t h i s [ A ] ; } r e t u r n   D ; } , e x t e n d : f u n c t i o n ( C ) { f o r ( v a r   B = 0 , A = C . l e n g t h ; B < A ; B + + ) { t h i s . p u s h ( C [ B ] ) ; } r e t u r n   t h i s ; } , m e r g e : f u n c t i o n ( C ) { f o r ( v a r   B = 0 , A = C . l e n g t h ; 
 B < A ; B + + ) { t h i s . i n c l u d e ( C [ B ] ) ; } r e t u r n   t h i s ; } , i n c l u d e : f u n c t i o n ( A ) { i f ( ! t h i s . c o n t a i n s ( A ) ) { t h i s . p u s h ( A ) ; } r e t u r n   t h i s ; } , g e t R a n d o m : f u n c t i o n ( ) { r e t u r n   t h i s [ $ r a n d o m ( 0 , t h i s . l e n g t h - 1 ) ] | | n u l l ; 
 } , g e t L a s t : f u n c t i o n ( ) { r e t u r n   t h i s [ t h i s . l e n g t h - 1 ] | | n u l l ; } } ) ; A r r a y . p r o t o t y p e . 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 ; A r r a y . e a c h = A r r a y . f o r E a c h ; f u n c t i o n   $ A ( A ) { r e t u r n   A r r a y . c o p y ( A ) ; 
 } f u n c t i o n   $ e a c h ( C , B , D ) { i f ( C & & t y p e o f   C . l e n g t h = = " n u m b e r " & & $ t y p e ( C ) ! = " o b j e c t " ) { A r r a y . f o r E a c h ( C , B , D ) ; } e l s e { f o r ( v a r   A   i n   C ) { B . c a l l ( D | | C , C [ A ] , A ) ; } } } A r r a y . p r o t o t y p e . t e s t = A r r a y . p r o t o t y p e . c o n t a i n s ; 
 S t r i n g . e x t e n d ( { t e s t : f u n c t i o n ( A , B ) { r e t u r n ( ( $ t y p e ( A ) = = " s t r i n g " ) ? n e w   R e g E x p ( A , B ) : A ) . t e s t ( t h i 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 , 1 0 ) ; } , t o F l o a t : f u n c t i o n ( ) { r e t u r n   p a r s e F l o a 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 , f u n c t i o n ( A ) { r e t u r n   A . c h a r A t ( 1 ) . t o U p p e r C a s e ( ) ; } ) ; } , h y p h e n a t 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 ( / \ w [ A - Z ] / g , f u n c t i o n ( A ) { r e t u r n ( A . c h a r A t ( 0 ) + " - " + A . c h a r A t ( 1 ) . t o L o w 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 . r e p l a c e ( / \ b [ a - z ] / g , f u n c t i o n ( A ) { r e t u r n   A . 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 { 2 , } / g , "   " ) . t r i m ( ) ; } , r g b T o H e x : f u n c t i o n ( B ) { v a r   A = t h i s . m a t c h ( / \ d { 1 , 3 } / g ) ; r e t u r n ( A ) ? A . r g b T o H e x ( B ) : f a l s e ; } , h e x T o R g b : f u n c t i o n ( B ) { v a r   A = t h i s . m a t c h ( / ^ # ? ( \ w { 1 , 2 } ) ( \ w { 1 , 2 } ) ( \ w { 1 , 2 } ) $ / ) ; 
 r e t u r n ( A ) ? A . s l i c e ( 1 ) . h e x T o R g b ( B ) : f a l s e ; } , c o n t a i n s : f u n c t i o n ( A , B ) { r e t u r n ( B ) ? ( B + t h i s + B ) . i n d e x O f ( B + A + B ) > - 1 : t h i s . i n d e x O f ( A ) > - 1 ; } , e s c a p e R e g E x p : 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 ( / ( [ . * + ? ^ $ { } ( ) | [ \ ] \ / \ \ ] ) / g , " \ \ $ 1 " ) ; 
 } } ) ; A r r a y . e x t e n d ( { r g b T o H e x : f u n c t i o n ( D ) { i f ( t h i s . l e n g t h < 3 ) { r e t u r n   f a l s e ; } i f ( t h i s . l e n g t h = = 4 & & t h i s [ 3 ] = = 0 & & ! D ) { r e t u r n " t r a n s p a r e n t " ; } v a r   B = [ ] ; f o r ( v a r   A = 0 ; A < 3 ; 
 A + + ) { v a r   C = ( t h i s [ A ] - 0 ) . t o S t r i n g ( 1 6 ) ; B . p u s h ( ( C . l e n g t h = = 1 ) ? " 0 " + C : C ) ; } r e t u r n   D ? B : " # " + B . j o i n ( " " ) ; } , h e x T o R g b : f u n c t i o n ( C ) { i f ( t h i s . l e n g t h ! = 3 ) { r e t u r n   f a l s e ; } v a r   A = [ ] ; 
 f o r ( v a r   B = 0 ; B < 3 ; B + + ) { A . p u s h ( p a r s e I n t ( ( t h i s [ B ] . l e n g t h = = 1 ) ? t h i s [ B ] + t h i s [ B ] : t h i s [ B ] , 1 6 ) ) ; } r e t u r n   C ? A : " r g b ( " + A . j o i n ( " , " ) + " ) " ; } } ) ; F u n c t i o n . e x t e n d ( { c r e a t e : f u n c t i o n ( A ) { v a r   B = t h i s ; 
 A = $ m e r g e ( { " b i n d " : B , " e v e n t " : f a l s e , " a r g u m e n t s " : n u l l , " d e l a y " : f a l s e , " p e r i o d i c a l " : f a l s e , " a t t e m p t " : f a l s e } , A ) ; i f ( $ c h k ( A . a r g u m e n t s ) & & $ t y p e ( A . a r g u m e n t s ) ! = " a r r a y " ) { A . a r g u m e n t s = [ A . a r g u m e n t s ] ; 
 } r e t u r n   f u n c t i o n ( E ) { v a r   C ; i f ( A . e v e n t ) { E = E | | w i n d o w . e v e n t ; C = [ ( A . e v e n t = = = t r u e ) ? E : n e w   A . e v e n t ( E ) ] ; i f ( A . a r g u m e n t s ) { C . e x t e n d ( A . a r g u m e n t s ) ; } } e l s e { C = A . a r g u m e n t s | | a r g u m e n t s ; 
 } v a r   F = f u n c t i o n ( ) { r e t u r n   B . a p p l y ( $ p i c k ( A . b i n d , B ) , C ) ; } ; i f ( A . d e l a y ) { r e t u r n   s e t T i m e o u t ( F , A . d e l a y ) ; } i f ( A . p e r i o d i c a l ) { r e t u r n   s e t I n t e r v a l ( F , A . p e r i o d i c a l ) ; } i f ( A . a t t e m p t ) { t r y { r e t u r n   F ( ) ; 
 } c a t c h ( D ) { r e t u r n   f a l s e ; } } r e t u r n   F ( ) ; } ; } , p a s s : f u n c t i o n ( A , B ) { r e t u r n   t h i s . c r e a t e ( { " a r g u m e n t s " : A , " b i n d " : B } ) ; } , a t t e m p t : f u n c t i o n ( A , B ) { r e t u r n   t h i s . c r e a t e ( { " a r g u m e n t s " : A , " b i n d " : B , " a t t e m p t " : t r u e } ) ( ) ; 
 } , b i n d : f u n c t i o n ( B , A ) { r e t u r n   t h i s . c r e a t e ( { " b i n d " : B , " a r g u m e n t s " : A } ) ; } , 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 , A ) { r e t u r n   t h i s . c r e a t e ( { " b i n d " : B , " e v e n t " : t r u e , " a r g u m e n t s " : A } ) ; 
 } , d e l a y : f u n c t i o n ( B , C , A ) { r e t u r n   t h i s . c r e a t e ( { " d e l a y " : B , " b i n d " : C , " a r g u m e n t s " : A } ) ( ) ; } , p e r i o d i c a l : f u n c t i o n ( A , C , B ) { r e t u r n   t h i s . c r e a t e ( { " p e r i o d i c a l " : A , " b i n d " : C , " a r g u m e n t s " : B } ) ( ) ; 
 } } ) ; 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   p a r s e I n t ( t h i s ) ; } , t o F l o a t : f u n c t i o n ( ) { r e t u r n   p a r s e F l o a t ( t h i s ) ; } , l i m i t : f u n c t i o n ( B , A ) { r e t u r n   M a t h . m i n ( A , M a t h . m a x ( B , t h i s ) ) ; 
 } , r o u n d : f u n c t i o n ( A ) { A = M a t h . p o w ( 1 0 , A | | 0 ) ; r e t u r n   M a t h . r o u n d ( t h i s * A ) / A ; } , t i m e s : f u n c t i o n ( B ) { f o r ( v a r   A = 0 ; A < t h i s ; A + + ) { B ( A ) ; } } } ) ; 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 ( D , C ) { i f ( $ t y p e ( D ) = = " s t r i n g " ) { i f ( w i n d o w . i e & & C & & ( C . n a m e | | C . t y p e ) ) { v a r   A = ( C . n a m e ) ? '   n a m e = " ' + C . n a m e + ' " ' : " " ; 
 v a r   B = ( C . t y p e ) ? '   t y p e = " ' + C . t y p e + ' " ' : " " ; d e l e t e   C . n a m e ; d e l e t e   C . t y p e ; D = " < " + D + A + B + " > " ; } D = d o c u m e n t . c r e a t e E l e m e n t ( D ) ; } D = $ ( D ) ; r e t u r n ( ! C | | ! D ) ? D : D . s e t ( C ) ; } } ) ; v a r   E l e m e n t s = 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 ( A ) { r e t u r n ( A ) ? $ e x t e n d ( A , t h i s ) : t h i s ; 
 } } ) ; E l e m e n t s . e x t e n d = f u n c t i o n ( A ) { f o r ( v a r   B   i n   A ) { t h i s . p r o t o t y p e [ B ] = A [ B ] ; t h i s [ B ] = $ n a t i v e . g e n e r i c ( B ) ; } } ; f u n c t i o n   $ ( B ) { i f ( ! B ) { r e t u r n   n u l l ; } i f ( B . h t m l E l e m e n t ) { r e t u r n   G a r b a g e . c o l l e c t ( B ) ; 
 } i f ( [ w i n d o w , d o c u m e n t ] . c o n t a i n s ( B ) ) { r e t u r n   B ; } v a r   A = $ t y p e ( B ) ; i f ( A = = " s t r i n g " ) { B = d o c u m e n t . g e t E l e m e n t B y I d ( B ) ; A = ( B ) ? " e l e m e n t " : f a l s e ; } i f ( A ! = " e l e m e n t " ) { r e t u r n   n u l l ; 
 } i f ( B . h t m l E l e m e n t ) { r e t u r n   G a r b a g e . c o l l e c t ( B ) ; } i f ( [ " o b j e c t " , " e m b e d " ] . c o n t a i n s ( B . t a g N a m e . t o L o w e r C a s e ( ) ) ) { r e t u r n   B ; } $ e x t e n d ( B , E l e m e n t . p r o t o t y p e ) ; B . h t m l E l e m e n t = f u n c t i o n ( ) { } ; 
 r e t u r n   G a r b a g e . c o l l e c t ( B ) ; } 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 = d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ; f u n c t i o n   $ $ ( ) { v a r   D = [ ] ; f o r ( v a r   C = 0 , B = a r g u m e n t s . l e n g t h ; C < B ; C + + ) { v a r   A = a r g u m e n t s [ C ] ; 
 s w i t c h ( $ t y p e ( A ) ) { c a s e " e l e m e n t " : D . p u s h ( A ) ; c a s e " b o o l e a n " : b r e a k ; c a s e   f a l s e : b r e a k ; c a s e " s t r i n g " : A = 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 ( A , t r u e ) ; d e f a u l t : D . e x t e n d ( A ) ; 
 } } r e t u r n   $ $ . u n i q u e ( D ) ; } $ $ . u n i q u e = f u n c t i o n ( G ) { v a r   D = [ ] ; f o r ( v a r   C = 0 , A = G . l e n g t h ; C < A ; C + + ) { i f ( G [ C ] . $ i n c l u d e d ) { c o n t i n u e ; } v a r   B = $ ( G [ C ] ) ; i f ( B & & ! B . $ i n c l u d e d ) { B . $ i n c l u d e d = t r u e ; 
 D . p u s h ( B ) ; } } f o r ( v a r   F = 0 , E = D . l e n g t h ; F < E ; F + + ) { D [ F ] . $ i n c l u d e d = n u l l ; } r e t u r n   n e w   E l e m e n t s ( D ) ; } ; E l e m e n t s . M u l t i = f u n c t i o n ( A ) { r e t u r n   f u n c t i o n ( ) { v a r   D = a r g u m e n t s ; 
 v a r   B = [ ] ; v a r   G = t r u e ; f o r ( v a r   E = 0 , C = t h i s . l e n g t h , F ; E < C ; E + + ) { F = t h i s [ E ] [ A ] . a p p l y ( t h i s [ E ] , D ) ; i f ( $ t y p e ( F ) ! = " e l e m e n t " ) { G = f a l s e ; } B . p u s h ( F ) ; } r e t u r n ( G ) ? $ $ . u n i q u e ( B ) : B ; 
 } ; } ; E l e m e n t . e x t e n d = f u n c t i o n ( A ) { f o r ( v a r   B   i n   A ) { H T M L E l e m e n t . p r o t o t y p e [ B ] = A [ B ] ; E l e m e n t . p r o t o t y p e [ B ] = A [ B ] ; E l e m e n t [ B ] = $ n a t i v e . g e n e r i c ( B ) ; v a r   C = ( A r r a y . p r o t o t y p e [ B ] ) ? B + " E l e m e n t s " : B ; 
 E l e m e n t s . p r o t o t y p e [ C ] = E l e m e n t s . M u l t i ( B ) ; } } ; E l e m e n t . e x t e n d ( { s e t : f u n c t i o n ( A ) { f o r ( v a r   C   i n   A ) { v a r   B = A [ C ] ; s w i t c h ( C ) { c a s e " s t y l e s " : t h i s . s e t S t y l e s ( B ) ; b r e a k ; c a s e " e v e n t s " : i f ( t h i s . a d d E v e n t s ) { t h i s . a d d E v e n t s ( B ) ; 
 } b r e a k ; c a s e " p r o p e r t i e s " : t h i s . s e t P r o p e r t i e s ( B ) ; b r e a k ; d e f a u l t : t h i s . s e t P r o p e r t y ( C , B ) ; } } r e t u r n   t h i s ; } , i n j e c t : f u n c t i o n ( C , A ) { C = $ ( C ) ; s w i t c h ( A ) { c a s e " b e f o r e " : C . 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 , C ) ; 
 b r e a k ; c a s e " a f t e r " : v a r   B = C . g e t N e x t ( ) ; i f ( ! B ) { C . 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 { C . 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 , B ) ; } b r e a k ; c a s e " t o p " : v a r   D = C . f i r s t C h i l d ; i f ( D ) { C . i n s e r t B e f o r e ( t h i s , D ) ; 
 b r e a k ; } d e f a u l t : C . a p p e n d C h i l d ( t h i s ) ; } 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 ( A ) { r e t u r n   t h i s . i n j e c t ( A , " 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 ( A ) { r e t u r n   t h i s . i n j e c t ( A , " 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 ( A ) { r e t u r n   t h i s . i n j e c t ( A , " b o t t o m " ) ; } , i n j e c t T o p : f u n c t i o n ( A ) { r e t u r n   t h i s . i n j e c t ( A , " t o p " ) ; } , a d o p t : f u n c t i o n ( ) { v a r   A = [ ] ; $ e a c h ( a r g u m e n t s , f u n c t i o n ( B ) { A = A . c o n c a t ( B ) ; 
 } ) ; $ $ ( A ) . i n j e c t ( t h i s ) ; r e t u r n   t h i s ; } , r e m o v e : f u n c t i o n ( ) { r e t u r 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 ) { v a r   B = $ ( t h i s . c l o n e N o d e ( C ! = = f a l s e ) ) ; i f ( ! B . $ e v e n t s ) { r e t u r n   B ; 
 } B . $ e v e n t s = { } ; f o r ( v a r   A   i n   t h i s . $ e v e n t s ) { B . $ e v e n t s [ A ] = { " k e y s " : $ A ( t h i s . $ e v e n t s [ A ] . k e y s ) , " v a l u e s " : $ A ( t h i s . $ e v e n t s [ A ] . v a l u e s ) } ; } r e t u r n   B . r e m o v e E v e n t s ( ) ; } , r e p l a c e W i t h : f u n c t i o n ( A ) { A = $ ( A ) ; 
 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 ( A , t h i s ) ; r e t u r n   A ; } , a p p e n d T e x t : f u n c t i o n ( A ) { 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 ( A ) ) ; 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 ( A ) { r e t u r n   t h i s . c l a s s N a m e . c o n t a i n s ( A , "   " ) ; 
 } , a d d C l a s s : f u n c t i o n ( A ) { i f ( ! t h i s . h a s C l a s s ( A ) ) { 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 + "   " + A ) . 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 ( A ) { 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 ( n e w   R e g E x p ( " ( ^ | \ \ s ) " + A + " ( ? : \ \ s | $ ) " ) , " $ 1 " ) . 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 ( A ) { r e t u r n   t h i s . h a s C l a s s ( A ) ? t h i s . r e m o v e C l a s s ( A ) : t h i s . a d d C l a s s ( A ) ; } , s e t S t y l e : f u n c t i o n ( B , A ) { s w i t c h ( B ) { c a s e " o p a c i t y " : r e t u r n   t h i s . s e t O p a c i t y ( p a r s e F l o a t ( A ) ) ; 
 c a s e " f l o a t " : B = ( w i n d o w . i e ) ? " s t y l e F l o a t " : " c s s F l o a t " ; } B = B . c a m e l C a s e ( ) ; s w i t c h ( $ t y p e ( A ) ) { c a s e " n u m b e r " : i f ( ! [ " z I n d e x " , " z o o m " ] . c o n t a i n s ( B ) ) { A + = " p x " ; } b r e a k ; c a s e " a r r a y " : A = " r g b ( " + A . j o i n ( " , " ) + " ) " ; 
 } t h i s . s t y l e [ B ] = A ; 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 ( A ) { s w i t c h ( $ t y p e ( A ) ) { c a s e " o b j e c t " : E l e m e n t . s e t M a n y ( t h i s , " s e t S t y l e " , A ) ; b r e a k ; c a s e " s t r i n g " : t h i s . s t y l e . c s s T e x t = A ; 
 } 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 ( A ) { i f ( A = = 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 ( ! t h i s . c u r r e n t S t y l e | | ! t h i s . c u r r e n t S t y l e . h a s L a y o u t ) { t h i s . s t y l e . z o o m = 1 ; } i f ( w i n d o w . i e ) { t h i s . s t y l e . f i l t e r = ( A = = 1 ) ? " " : " a l p h a ( o p a c i t y = " + A * 1 0 0 + " ) " ; } t h i s . s t y l e . o p a c i t y = t h i s . $ t m p . o p a c i t y = A ; 
 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 ( C ) { C = C . c a m e l C a s e ( ) ; v a r   A = t h i s . s t y l e [ C ] ; i f ( ! $ c h k ( A ) ) { i f ( C = = " o p a c i t y " ) { r e t u r n   t h i s . $ t m p . o p a c i t y ; } A = [ ] ; f o r ( v a r   B   i n   E l e m e n t . S t y l e s ) { i f ( C = = B ) { E l e m e n t . S t y l e s [ B ] . e a c h ( f u n c t i o n ( F ) { v a r   E = t h i s . g e t S t y l e ( F ) ; 
 A . p u s h ( p a r s e I n t ( E ) ? E : " 0 p x " ) ; } , t h i s ) ; i f ( C = = " b o r d e r " ) { v a r   D = A . e v e r y ( f u n c t i o n ( E ) { r e t u r n ( E = = A [ 0 ] ) ; } ) ; r e t u r n ( D ) ? A [ 0 ] : f a l s e ; } r e t u r n   A . j o i n ( "   " ) ; } } i f ( C . c o n t a i n s ( " b o r d e r " ) ) { i f ( E l e m e n t . S t y l e s . b o r d e r . c o n t a i n s ( C ) ) { r e t u r n [ " W i d t h " , " S t y l e " , " C o l o r " ] . m a p ( f u n c t i o n ( E ) { r e t u r n   t h i s . g e t S t y l e ( C + E ) ; 
 } , t h i s ) . j o i n ( "   " ) ; } e l s e { i f ( E l e m e n t . b o r d e r S h o r t . c o n t a i n s ( C ) ) { r e t u r n [ " T o p " , " R i g h t " , " B o t t o m " , " L e f t " ] . m a p ( f u n c t i o n ( E ) { r e t u r n   t h i s . g e t S t y l e ( " b o r d e r " + E + C . r e p l a c e ( " b o r d e r " , " " ) ) ; 
 } , t h i s ) . j o i n ( "   " ) ; } } } i f ( d o c u m e n t . d e f a u l t V i e w ) { A = 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 ( C . h y p h e n a t e ( ) ) ; } e l s e { i f ( t h i s . c u r r e n t S t y l e ) { A = t h i s . c u r r e n t S t y l e [ C ] ; 
 } } } i f ( w i n d o w . i e ) { A = E l e m e n t . f i x S t y l e ( C , A , t h i s ) ; } i f ( A & & C . t e s t ( / c o l o r / i ) & & A . c o n t a i n s ( " r g b " ) ) { r e t u r n   A . s p l i t ( " r g b " ) . s p l i c e ( 1 , 4 ) . m a p ( f u n c t i o n ( E ) { r e t u r n   E . r g b T o H e x ( ) ; 
 } ) . j o i n ( "   " ) ; } r e t u r n   A ; } , g e t S t y l e s : f u n c t i o n ( ) { r e t u r n   E l e m e n t . g e t M a n y ( t h i s , " g e t S t y l e " , a r g u m e n t s ) ; } , w a l k : f u n c t i o n ( A , C ) { A + = " S i b l i n g " ; v a r   B = ( C ) ? t h i s [ C ] : t h i s [ A ] ; 
 w h i l e ( B & & $ t y p e ( B ) ! = " e l e m e n t " ) { B = B [ A ] ; } r e t u r n   $ ( B ) ; } , 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 . w a l k ( " 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 . w a l k ( " n e x t " ) ; } , g e t F i r s t : f u n c t i o n ( ) { r e t u r n   t h i s . w a l k ( " n e x t " , " f i r s t C h i l d " ) ; 
 } , g e t L a s t : f u n c t i o n ( ) { r e t u r n   t h i s . w a l k ( " p r e v i o u s " , " l a s t C h i l d " ) ; } , g e t P a r e n t : f u n c t i o n ( ) { r e t u r n   $ ( t h i s . p a r e n t N o d e ) ; } , g e t C h i l d r e n : f u n c t i o n ( ) { r e t u r n   $ $ ( t h i s . c h i l d N o d e s ) ; 
 } , h a s C h i l d : f u n c t i o n ( A ) { r e t u r n   ! ! $ 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 ( " * " ) ) . c o n t a i n s ( A ) ; } , g e t P r o p e r t y : f u n c t i o n ( D ) { v a r   B = E l e m e n t . P r o p e r t i e s [ D ] ; i f ( B ) { r e t u r n   t h i s [ B ] ; 
 } v a r   A = E l e m e n t . P r o p e r t i e s I F l a g [ D ] | | 0 ; i f ( ! w i n d o w . i e | | A ) { r e t u r n   t h i s . g e t A t t r i b u t e ( D , A ) ; } v a r   C = t h i s . a t t r i b u t e s [ D ] ; r e t u r n ( C ) ? C . n o d e V a l u e : n u l l ; } , r e m o v e P r o p e r t y : f u n c t i o n ( B ) { v a r   A = E l e m e n t . P r o p e r t i e s [ B ] ; 
 i f ( A ) { t h i s [ A ] = " " ; } e l s e { t h i s . r e m o v e A t t r i b u t e ( B ) ; } r e t u r n   t h i s ; } , g e t P r o p e r t i e s : f u n c t i o n ( ) { r e t u r n   E l e m e n t . g e t M a n y ( t h i s , " g e t P r o p e r t y " , a r g u m e n t s ) ; } , s e t P r o p e r t y : f u n c t i o n ( C , B ) { v a r   A = E l e m e n t . P r o p e r t i e s [ C ] ; 
 i f ( A ) { t h i s [ A ] = B ; } e l s e { t h i s . s e t A t t r i b u t e ( C , B ) ; } r e t u r n   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 ( A ) { r e t u r n   E l e m e n t . s e t M a n y ( t h i s , " s e t P r o p e r t y " , A ) ; } , s e t H T M L : f u n c t i o n ( ) { t h i s . i n n e r H T M L = $ A ( a r g u m e n t s ) . j o i n ( " " ) ; 
 r e t u r n   t h i s ; } , s e t T e x t : f u n c t i o n ( B ) { v a r   A = t h i s . g e t T a g ( ) ; i f ( [ " s t y l e " , " s c r i p t " ] . c o n t a i n s ( A ) ) { i f ( w i n d o w . i e ) { i f ( A = = " s t y l e " ) { t h i s . s t y l e S h e e t . c s s T e x t = B ; } e l s e { i f ( A = = " s c r i p t " ) { t h i s . s e t P r o p e r t y ( " t e x t " , B ) ; 
 } } r e t u r n   t h i s ; } e l s e { t h i s . r e m o v e C h i l d ( t h i s . f i r s t C h i l d ) ; r e t u r n   t h i s . a p p e n d T e x t ( B ) ; } } t h i s [ $ d e f i n e d ( t h i s . i n n e r T e x t ) ? " i n n e r T e x t " : " t e x t C o n t e n t " ] = B ; r e t u r n   t h i s ; 
 } , g e t T e x t : f u n c t i o n ( ) { v a r   A = t h i s . g e t T a g ( ) ; i f ( [ " s t y l e " , " s c r i p t " ] . c o n t a i n s ( A ) ) { i f ( w i n d o w . i e ) { i f ( A = = " s t y l e " ) { r e t u r n   t h i s . s t y l e S h e e t . c s s T e x t ; } e l s e { i f ( A = = " s c r i p t " ) { r e t u r n   t h i s . g e t P r o p e r t y ( " t e x t " ) ; 
 } } } e l s e { r e t u r n   t h i s . i n n e r H T M L ; } } r e t u r n ( $ p i c k ( t h i s . i n n e r T e x t , t h i s . t e x t C o n t e n t ) ) ; } , 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 ( ) ; } , e m p t y : f u n c t i o n ( ) { G a r b a g e . t r a s h ( t h i s . g e t E l e m e n t s B y T a g N a m e ( " * " ) ) ; 
 r e t u r n   t h i s . s e t H T M L ( " " ) ; } } ) ; E l e m e n t . f i x S t y l e = f u n c t i o n ( E , A , D ) { i f ( $ c h k ( p a r s e I n t ( A ) ) ) { r e t u r n   A ; } i f ( [ " h e i g h t " , " w i d t h " ] . c o n t a i n s ( E ) ) { v a r   B = ( E = = " w i d t h " ) ? [ " l e f t " , " r i g h t " ] : [ " t o p " , " b o t t o m " ] ; 
 v a r   C = 0 ; B . e a c h ( f u n c t i o n ( F ) { C + = D . g e t S t y l e ( " b o r d e r - " + F + " - w i d t h " ) . t o I n t ( ) + D . g e t S t y l e ( " p a d d i n g - " + F ) . t o I n t ( ) ; } ) ; r e t u r n   D [ " o f f s e t " + E . c a p i t a l i z e ( ) ] - C + " p x " ; } e l s e { i f ( E . t e s t ( / b o r d e r ( . + ) W i d t h | m a r g i n | p a d d i n g / ) ) { r e t u r n " 0 p x " ; 
 } } r e t u r n   A ; } ; E l e m e n t . S t y l e s = { " b o r d e r " : [ ] , " p a d d i n g " : [ ] , " m a r g i n " : [ ] } ; [ " T o p " , " R i g h t " , " B o t t o m " , " L e f t " ] . e a c h ( f u n c t i o n ( B ) { f o r ( v a r   A   i n   E l e m e n t . S t y l e s ) { E l e m e n t . S t y l e s [ A ] . p u s h ( A + B ) ; 
 } } ) ; E l e m e n t . b o r d e r S h o r t = [ " b o r d e r W i d t h " , " b o r d e r S t y l e " , " b o r d e r C o l o r " ] ; E l e m e n t . g e t M a n y = f u n c t i o n ( B , D , C ) { v a r   A = { } ; $ e a c h ( C , f u n c t i o n ( E ) { A [ E ] = B [ D ] ( E ) ; } ) ; r e t u r n   A ; 
 } ; E l e m e n t . s e t M a n y = f u n c t i o n ( B , D , C ) { f o r ( v a r   A   i n   C ) { B [ D ] ( A , C [ A ] ) ; } r e t u r n   B ; } ; E l e m e n t . P r o p e r t i e s = n e w   A b s t r a c t ( { " c l a s s " : " c l a s s N a m e " , " f o r " : " h t m l F o r " , " c o l s p a n " : " c o l S p a n " , " r o w s p a n " : " r o w S p a n " , " a c c e s s k e y " : " a c c e s s K e y " , " t a b i n d e x " : " t a b I n d e x " , " m a x l e n g t h " : " m a x L e n g t h " , " r e a d o n l y " : " r e a d O n l y " , " f r a m e b o r d e r " : " f r a m e B o r d e r " , " v a l u e " : " v a l u e " , " d i s a b l e d " : " d i s a b l e d " , " c h e c k e d " : " c h e c k e d " , " m u l t i p l e " : " m u l t i p l e " , " s e l e c t e d " : " s e l e c t e d " } ) ; 
 E l e m e n t . P r o p e r t i e s I F l a g = { " h r e f " : 2 , " s r c " : 2 } ; E l e m e n t . M e t h o d s = { L i s t e n e r s : { a d d L i s t e n e r : f u n c t i o n ( B , A ) { 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 ( B , A , 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 " + B , A ) ; } r e t u r n   t h i s ; } , r e m o v e L i s t e n e r : f u n c t i o n ( B , A ) { 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 ( B , A , 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 " + B , A ) ; 
 } r e t u r n   t h i s ; } } } ; w i n d o w . e x t e n d ( E l e m e n t . M e t h o d s . L i s t e n e r s ) ; d o c u m e n t . e x t e n d ( E l e m e n t . M e t h o d s . L i s t e n e r s ) ; E l e m e n t . e x t e n d ( E l e m e n t . M e t h o d s . L i s t e n e r s ) ; v a r   G a r b a g e = { e l e m e n t s : [ ] , c o l l e c t : f u n c t i o n ( A ) { i f ( ! A . $ t m p ) { G a r b a g e . e l e m e n t s . p u s h ( A ) ; 
 A . $ t m p = { " o p a c i t y " : 1 } ; } r e t u r n   A ; } , t r a s h : f u n c t i o n ( D ) { f o r ( v a r   B = 0 , A = D . l e n g t h , C ; B < A ; B + + ) { i f ( ! ( C = D [ B ] ) | | ! C . $ t m p ) { c o n t i n u e ; } i f ( C . $ e v e n t s ) { C . f i r e E v e n t ( " t r a s h " ) . r e m o v e E v e n t s ( ) ; 
 } f o r ( v a r   E   i n   C . $ t m p ) { C . $ t m p [ E ] = n u l l ; } f o r ( v a r   F   i n   E l e m e n t . p r o t o t y p e ) { C [ F ] = n u l l ; } G a r b a g e . e l e m e n t s [ G a r b a g e . e l e m e n t s . i n d e x O f ( C ) ] = n u l l ; C . h t m l E l e m e n t = C . $ t m p = C = n u l l ; 
 } G a r b a g e . e l e m e n t s . r e m o v e ( n u l l ) ; } , e m p t y : f u n c t i o n ( ) { G a r b a g e . c o l l e c t ( w i n d o w ) ; G a r b a g e . c o l l e c t ( d o c u m e n t ) ; G a r b a g e . t r a s h ( G a r b a g e . e l e m e n t s ) ; } } ; w i n d o w . a d d L i s t e n e r ( " b e f o r e u n l o a d " , f u n c t i o n ( ) { w i n d o w . a d d L i s t e n e r ( " u n l o a d " , G a r b a g e . e m p t y ) ; 
 i f ( w i n d o w . i e ) { w i n d o w . a d d L i s t e n e r ( " u n l o a d " , C o l l e c t G a r b a g e ) ; } } ) ; v a r   E v 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 ( C ) { i f ( C & & C . $ e x t e n d e d ) { r e t u r n   C ; } t h i s . $ e x t e n d e d = t r u e ; 
 C = C | | w i n d o w . e v e n t ; t h i s . e v e n t = C ; t h i s . t y p e = C . t y p e ; t h i s . t a r g e t = C . t a r g e t | | C . s r c E l e m e n t ; i f ( t h i s . t a r g e t . n o d e T y p e = = 3 ) { t h i s . t a r g e t = t h i s . t a r g e t . p a r e n t N o d e ; } t h i s . s h i f t = C . s h i f t K e y ; 
 t h i s . c o n t r o l = C . c t r l K e y ; t h i s . a l t = C . a l t K e y ; t h i s . m e t a = C . m e t a K e y ; i f ( [ " D O M M o u s e S c r o l l " , " m o u s e w h e e l " ] . c o n t a i n s ( t h i s . t y p e ) ) { t h i s . w h e e l = ( C . w h e e l D e l t a ) ? C . w h e e l D e l t a / 1 2 0 : - ( C . d e t a i l | | 0 ) / 3 ; 
 } e l s e { i f ( t h i s . t y p e . c o n t a i n s ( " k e y " ) ) { t h i s . c o d e = C . w h i c h | | C . k e y C o d e ; f o r ( v a r   B   i n   E v e n t . k e y s ) { i f ( E v e n t . k e y s [ B ] = = t h i s . c o d e ) { t h i s . k e y = B ; b r e a k ; } } i f ( t h i s . t y p e = = " k e y d o w n " ) { v a r   A = t h i s . c o d e - 1 1 1 ; 
 i f ( A > 0 & & A < 1 3 ) { t h i s . k e y = " f " + A ; } } t h i s . k e y = t h i s . k e y | | S t r i n g . f r o m C h a r C o d e ( t h i s . c o d e ) . t o L o w e r C a s e ( ) ; } e l s e { i f ( t h i s . t y p e . t e s t ( / ( c l i c k | m o u s e | m e n u ) / ) ) { t h i s . p a g e = { " x " : C . p a g e X | | C . c l i e n t X + 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 , " y " : C . p a g e Y | | C . c l i e n t Y + 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 } ; 
 t h i s . c l i e n t = { " x " : C . p a g e X ? C . p a g e X - w i n d o w . p a g e X O f f s e t : C . c l i e n t X , " y " : C . p a g e Y ? C . p a g e Y - w i n d o w . p a g e Y O f f s e t : C . c l i e n t Y } ; t h i s . r i g h t C l i c k = ( C . w h i c h = = 3 ) | | ( C . b u t t o n = = 2 ) ; 
 s w i t c h ( t h i s . t y p e ) { c a s e " m o u s e o v e r " : t h i s . r e l a t e d T a r g e t = C . r e l a t e d T a r g e t | | C . f r o m E l e m e n t ; b r e a k ; c a s e " m o u s e o u t " : t h i s . r e l a t e d T a r g e t = C . r e l a t e d T a r g e t | | C . t o E l e m e n t ; 
 } t h i s . f i x R e l a t e d T a r g e t ( ) ; } } } r e t u r n   t h i s ; } , s t o p : f u n c t i o n ( ) { r e t u r n   t h i s . s t o p P r o p a g a t i o n ( ) . p r e v e n t D e f a u l t ( ) ; } , s t o p P r o p a g a t i o n : f u n c t i o n ( ) { i f ( t h i s . e v e n t . s t o p P r o p a g a t i o n ) { t h i s . e v e n t . s t o p P r o p a g a t i o n ( ) ; 
 } e l s e { t h i s . e v e n t . c a n c e l B u b b l e = t r u e ; } r e t u r n   t h i s ; } , p r e v e n t D e f a u l t : f u n c t i o n ( ) { i f ( t h i s . e v e n t . p r e v e n t D e f a u l t ) { t h i s . e v e n t . p r e v e n t D e f a u l t ( ) ; } e l s e { t h i s . e v e n t . r e t u r n V a l u e = f a l s e ; 
 } r e t u r n   t h i s ; } } ) ; E v e n t . f i x = { r e l a t e d T a r g e t : f u n c t i o n ( ) { i f ( t h i s . r e l a t e d T a r g e t & & t h i s . r e l a t e d T a r g e t . n o d e T y p e = = 3 ) { t h i s . r e l a t e d T a r g e t = t h i s . r e l a t e d T a r g e t . p a r e n t N o d e ; 
 } } , r e l a t e d T a r g e t G e c k o : f u n c t i o n ( ) { t r y { E v e n t . f i x . r e l a t e d T a r g e t . c a l l ( t h i s ) ; } c a t c h ( A ) { t h i s . r e l a t e d T a r g e t = t h i s . t a r g e t ; } } } ; E v e n t . p r o t o t y p e . f i x R e l a t e d T a r g e t = ( w i n d o w . g e c k o ) ? E v e n t . f i x . r e l a t e d T a r g e t G e c k o : E v e n t . f i x . r e l a t e d T a r g e t ; 
 E v e n t . k e y s = n e w   A b s t r a c t ( { " e n t e r " : 1 3 , " u p " : 3 8 , " d o w n " : 4 0 , " l e f t " : 3 7 , " r i g h t " : 3 9 , " e s c " : 2 7 , " s p a c e " : 3 2 , " b a c k s p a c e " : 8 , " t a b " : 9 , " d e l e t e " : 4 6 } ) ; E l e m e n t . M e t h o d s . E v e n t s = { a d d E v e n t : f u n c t i o n ( C , B ) { t h i s . $ e v e n t s = t h i s . $ e v e n t s | | { } ; 
 t h i s . $ e v e n t s [ C ] = t h i s . $ e v e n t s [ C ] | | { " k e y s " : [ ] , " v a l u e s " : [ ] } ; i f ( t h i s . $ e v e n t s [ C ] . k e y s . c o n t a i n s ( B ) ) { r e t u r n   t h i s ; } t h i s . $ e v e n t s [ C ] . k e y s . p u s h ( B ) ; v a r   A = C ; v a r   D = E l e m e n t . E v e n t s [ C ] ; 
 i f ( D ) { i f ( D . a d d ) { D . a d d . c a l l ( t h i s , B ) ; } i f ( D . m a p ) { B = D . m a p ; } i f ( D . t y p e ) { A = D . t y p e ; } } i f ( ! t h i s . a d d E v e n t L i s t e n e r ) { B = B . c r e a t e ( { " b i n d " : t h i s , " e v e n t " : t r u e } ) ; } t h i s . $ e v e n t s [ C ] . v a l u e s . p u s h ( B ) ; 
 r e t u r n ( E l e m e n t . N a t i v e E v e n t s . c o n t a i n s ( A ) ) ? t h i s . a d d L i s t e n e r ( A , B ) : t h i s ; } , r e m o v e E v e n t : f u n c t i o n ( C , B ) { i f ( ! t h i s . $ e v e n t s | | ! t h i s . $ e v e n t s [ C ] ) { r e t u r n   t h i s ; } v a r   F = t h i s . $ e v e n t s [ C ] . k e y s . i n d e x O f ( B ) ; 
 i f ( F = = - 1 ) { r e t u r n   t h i s ; } v a r   A = t h i s . $ e v e n t s [ C ] . k e y s . s p l i c e ( F , 1 ) [ 0 ] ; v a r   E = t h i s . $ e v e n t s [ C ] . v a l u e s . s p l i c e ( F , 1 ) [ 0 ] ; v a r   D = E l e m e n t . E v e n t s [ C ] ; i f ( D ) { i f ( D . r e m o v e ) { D . r e m o v e . c a l l ( t h i s , B ) ; 
 } i f ( D . t y p e ) { C = D . t y p e ; } } r e t u r n ( E l e m e n t . N a t i v e E v e n t s . c o n t a i n s ( C ) ) ? t h i s . r e m o v e L i s t e n e r ( C , E ) : t h i s ; } , a d d E v e n t s : f u n c t i o n ( A ) { r e t u r n   E l e m e n t . s e t M a n y ( t h i s , " a d d E v e n t " , A ) ; 
 } , r e m o v e E v e n t s : f u n c t i o n ( A ) { i f ( ! t h i s . $ e v e n t s ) { r e t u r n   t h i s ; } i f ( ! A ) { f o r ( v a r   B   i n   t h i s . $ e v e n t s ) { t h i s . r e m o v e E v e n t s ( B ) ; } t h i s . $ e v e n t s = n u l l ; } e l s e { i f ( t h i s . $ e v e n t s [ A ] ) { t h i s . $ e v e n t s [ A ] . k e y s . e a c h ( f u n c t i o n ( C ) { t h i s . r e m o v e E v e n t ( A , C ) ; 
 } , t h i s ) ; t h i s . $ e v e n t s [ A ] = n u l l ; } } r e t u r n   t h i s ; } , f i r e E v e n t : f u n c t i o n ( C , B , A ) { i f ( t h i s . $ e v e n t s & & t h i s . $ e v e n t s [ C ] ) { t h i s . $ e v e n t s [ C ] . k e y s . e a c h ( f u n c t i o n ( D ) { D . c r e a t e ( { " b i n d " : t h i s , " d e l a y " : A , " a r g u m e n t s " : B } ) ( ) ; 
 } , t h i s ) ; } r e t u r n   t h i s ; } , c l o n e E v e n t s : f u n c t i o n ( C , A ) { i f ( ! C . $ e v e n t s ) { r e t u r n   t h i s ; } i f ( ! A ) { f o r ( v a r   B   i n   C . $ e v e n t s ) { t h i s . c l o n e E v e n t s ( C , B ) ; } } e l s e { i f ( C . $ e v e n t s [ A ] ) { C . $ e v e n t s [ A ] . k e y s . e a c h ( f u n c t i o n ( D ) { t h i s . a d d E v e n t ( A , D ) ; 
 } , t h i s ) ; } } r e t u r n   t h i s ; } } ; w i n d o w . e x t e n d ( E l e m e n t . M e t h o d s . E v e n t s ) ; d o c u m e n t . e x t e n d ( E l e m e n t . M e t h o d s . E v e n t s ) ; E l e m e n t . e x t e n d ( E l e m e n t . M e t h o d s . E v e n t s ) ; E l e m e n t . E v e n t s = n e w   A b s t r a c t ( { " m o u s e e n t e r " : { t y p e : " m o u s e o v e r " , m a p : f u n c t i o n ( A ) { A = n e w   E v e n t ( A ) ; 
 i f ( A . r e l a t e d T a r g e t ! = t h i s & & ! t h i s . h a s C h i l d ( A . r e l a t e d T a r g e t ) ) { t h i s . f i r e E v e n t ( " m o u s e e n t e r " , A ) ; } } } , " m o u s e l e a v e " : { t y p e : " m o u s e o u t " , m a p : f u n c t i o n ( A ) { A = n e w   E v e n t ( A ) ; 
 i f ( A . r e l a t e d T a r g e t ! = t h i s & & ! t h i s . h a s C h i l d ( A . r e l a t e d T a r g e t ) ) { t h i s . f i r e E v e n t ( " m o u s e l e a v e " , A ) ; } } } , " m o u s e w h e e l " : { t y p e : ( w i n d o w . g e c k o ) ? " D O M M o u s e S c r o l l " : " m o u s e w h e e l " } } ) ; 
 E l e m e n t . N a t i v e E v e n t s = [ " c l i c k " , " d b l c l i c k " , " m o u s e u p " , " m o u s e d o w n " , " m o u s e w h e e l " , " D O M M o u s e S c r o l l " , " m o u s e o v e r " , " m o u s e o u t " , " m o u s e m o v e " , " k e y d o w n " , " k e y p r e s s " , " k e y u p " , " l o a d " , " u n l o a d " , " b e f o r e u n l o a d " , " r e s i z e " , " m o v e " , " f o c u s " , " b l u r " , " c h a n g e " , " s u b m i t " , " r e s e t " , " s e l e c t " , " e r r o r " , " a b o r t " , " c o n t e x t m e n u " , " s c r o l l " ] ; 
 F u n c t i o n . e x t e n d ( { b i n d W i t h E v e n t : f u n c t i o n ( B , A ) { r e t u r n   t h i s . c r e a t e ( { " b i n d " : B , " a r g u m e n t s " : A , " e v e n t " : E v e n t } ) ; } } ) ; E l e m e n t s . e x t e n d ( { f i l t e r B y T a g : f u n c t i o n ( A ) { r e t u r n   n e w   E l e m e n t s ( t h i s . f i l t e r ( f u n c t i o n ( B ) { r e t u r n ( E l e m e n t . g e t T a g ( B ) = = A ) ; 
 } ) ) ; } , f i l t e r B y C l a s s : f u n c t i o n ( A , C ) { v a r   B = t h i s . f i l t e r ( f u n c t i o n ( D ) { r e t u r n ( D . c l a s s N a m e & & D . c l a s s N a m e . c o n t a i n s ( A , "   " ) ) ; } ) ; r e t u r n ( C ) ? B : n e w   E l e m e n t s ( B ) ; } , f i l t e r B y I d : f u n c t i o n ( C , B ) { v a r   A = t h i s . f i l t e r ( f u n c t i o n ( D ) { r e t u r n ( D . i d = = C ) ; 
 } ) ; r e t u r n ( B ) ? A : n e w   E l e m e n t s ( A ) ; } , 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 ( B , A , D , E ) { v a r   C = t h i s . f i l t e r ( f u n c t i o n ( F ) { v a r   G = E l e m e n t . g e t P r o p e r t y ( F , B ) ; i f ( ! G ) { r e t u r n   f a l s e ; } i f ( ! A ) { r e t u r n   t r u e ; 
 } s w i t c h ( A ) { c a s e " = " : r e t u r n ( G = = D ) ; c a s e " * = " : r e t u r n ( G . c o n t a i n s ( D ) ) ; c a s e " ^ = " : r e t u r n ( G . s u b s t r ( 0 , D . l e n g t h ) = = D ) ; c a s e " $ = " : r e t u r n ( G . s u b s t r ( G . l e n g t h - D . l e n g t h ) = = D ) ; 
 c a s e " ! = " : r e t u r n ( G ! = D ) ; c a s e " ~ = " : r e t u r n   G . c o n t a i n s ( D , "   " ) ; } r e t u r n   f a l s e ; } ) ; r e t u r n ( E ) ? C : n e w   E l e m e n t s ( C ) ; } } ) ; f u n c t i o n   $ E ( A , B ) { r e t u r n ( $ ( B ) | | d o c u m e n t ) . g e t E l e m e n t ( A ) ; 
 } f u n c t i o n   $ E S ( A , B ) { r e t u r n ( $ ( B ) | | 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 ( A ) ; } $ $ . s h a r e d = { " r e g e x p " : / ^ ( \ w * | \ * ) ( ? : # ( [ \ w - ] + ) | \ . ( [ \ w - ] + ) ) ? ( ? : \ [ ( \ w + ) ( ? : ( [ ! * ^ $ ] ? = ) [ " ' ] ? ( [ ^ " ' \ ] ] * ) [ " ' ] ? ) ? ] ) ? $ / , " x p a t h " : { g e t P a r a m : f u n c t i o n ( B , D , E , C ) { v a r   A = [ D . n a m e s p a c e U R I ? " x h t m l : " : " " , E [ 1 ] ] ; 
 i f ( E [ 2 ] ) { A . p u s h ( ' [ @ i d = " ' , E [ 2 ] , ' " ] ' ) ; } i f ( E [ 3 ] ) { A . p u s h ( ' [ c o n t a i n s ( c o n c a t ( "   " ,   @ c l a s s ,   "   " ) ,   "   ' , E [ 3 ] , '   " ) ] ' ) ; } i f ( E [ 4 ] ) { i f ( E [ 5 ] & & E [ 6 ] ) { s w i t c h ( E [ 5 ] ) { c a s e " * = " : A . p u s h ( " [ c o n t a i n s ( @ " , E [ 4 ] , ' ,   " ' , E [ 6 ] , ' " ) ] ' ) ; 
 b r e a k ; c a s e " ^ = " : A . p u s h ( " [ s t a r t s - w i t h ( @ " , E [ 4 ] , ' ,   " ' , E [ 6 ] , ' " ) ] ' ) ; b r e a k ; c a s e " $ = " : A . p u s h ( " [ s u b s t r i n g ( @ " , E [ 4 ] , " ,   s t r i n g - l e n g t h ( @ " , E [ 4 ] , " )   -   " , E [ 6 ] . l e n g t h , '   +   1 )   =   " ' , E [ 6 ] , ' " ] ' ) ; 
 b r e a k ; c a s e " = " : A . p u s h ( " [ @ " , E [ 4 ] , ' = " ' , E [ 6 ] , ' " ] ' ) ; b r e a k ; c a s e " ! = " : A . p u s h ( " [ @ " , E [ 4 ] , ' ! = " ' , E [ 6 ] , ' " ] ' ) ; } } e l s e { A . p u s h ( " [ @ " , E [ 4 ] , " ] " ) ; } } B . p u s h ( A . j o i n ( " " ) ) ; r e t u r n   B ; 
 } , g e t I t e m s : f u n c t i o n ( B , E , G ) { v a r   F = [ ] ; v a r   A = d o c u m e n t . e v a l u a t e ( " . / / " + B . j o i n ( " / / " ) , E , $ $ . s h a r e d . r e s o l v e r , X P a t h R e s u l t . U N O R D E R E D _ N O D E _ S N A P S H O T _ T Y P E , n u l l ) ; f o r ( v a r   D = 0 , C = A . s n a p s h o t L e n g t h ; 
 D < C ; D + + ) { F . p u s h ( A . s n a p s h o t I t e m ( D ) ) ; } r e t u r n ( G ) ? F : n e w   E l e m e n t s ( F . m a p ( $ ) ) ; } } , " n o r m a l " : { g e t P a r a m : f u n c t i o n ( A , C , E , B ) { i f ( B = = 0 ) { i f ( E [ 2 ] ) { v a r   D = C . g e t E l e m e n t B y I d ( E [ 2 ] ) ; 
 i f ( ! D | | ( ( E [ 1 ] ! = " * " ) & & ( E l e m e n t . g e t T a g ( D ) ! = E [ 1 ] ) ) ) { r e t u r n   f a l s e ; } A = [ D ] ; } e l s e { A = $ A ( C . g e t E l e m e n t s B y T a g N a m e ( E [ 1 ] ) ) ; } } e l s e { A = $ $ . s h a r e d . g e t E l e m e n t s B y T a g N a m e ( A , E [ 1 ] ) ; 
 i f ( E [ 2 ] ) { A = E l e m e n t s . f i l t e r B y I d ( A , E [ 2 ] , t r u e ) ; } } i f ( E [ 3 ] ) { A = E l e m e n t s . f i l t e r B y C l a s s ( A , E [ 3 ] , t r u e ) ; } i f ( E [ 4 ] ) { A = E l e m e n t s . f i l t e r B y A t t r i b u t e ( A , E [ 4 ] , E [ 5 ] , E [ 6 ] , t r u e ) ; 
 } r e t u r n   A ; } , g e t I t e m s : f u n c t i o n ( A , B , C ) { r e t u r n ( C ) ? A : $ $ . u n i q u e ( A ) ; } } , r e s o l v e r : f u n c t i o n ( A ) { r e t u r n ( A = = " x h t m l " ) ? " h t t p : / / w w w . w 3 . o r g / 1 9 9 9 / x h t m l " : f a l s e ; } , g e t E l e m e n t s B y T a g N a m e : f u n c t i o n ( D , C ) { v a r   E = [ ] ; 
 f o r ( v a r   B = 0 , A = D . l e n g t h ; B < A ; B + + ) { E . e x t e n d ( D [ B ] . g e t E l e m e n t s B y T a g N a m e ( C ) ) ; } r e t u r n   E ; } } ; $ $ . s h a r e d . m e t h o d = ( w i n d o w . x p a t h ) ? " x p a t h " : " n o r m a l " ; E l e m e n t . M e t h o d s . D o m = { g e t E l e m e n t s : f u n c t i o n ( A , H ) { v a r   C = [ ] ; 
 A = A . t r i m ( ) . s p l i t ( "   " ) ; f o r ( v a r   E = 0 , D = A . l e n g t h ; E < D ; E + + ) { v a r   F = A [ E ] ; v a r   G = F . m a t c h ( $ $ . s h a r e d . r e g e x p ) ; i f ( ! G ) { b r e a k ; } G [ 1 ] = G [ 1 ] | | " * " ; v a r   B = $ $ . s h a r e d [ $ $ . s h a r e d . m e t h o d ] . g e t P a r a m ( C , t h i s , G , E ) ; 
 i f ( ! B ) { b r e a k ; } C = B ; } r e t u r n   $ $ . s h a r e d [ $ $ . s h a r e d . m e t h o d ] . g e t I t e m s ( C , t h i s , H ) ; } , g e t E l e m e n t : f u n c t i o n ( A ) { r e t u r n   $ ( t h i s . g e t E l e m e n t s ( A , t r u e ) [ 0 ] | | f a l s e ) ; } , 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 ( A , E ) { v a r   D = [ ] ; 
 A = A . s p l i t ( " , " ) ; f o r ( v a r   C = 0 , B = A . l e n g t h ; C < B ; C + + ) { D = D . c o n c a t ( t h i s . g e t E l e m e n t s ( A [ C ] , t r u e ) ) ; } r e t u r n ( E ) ? D : $ $ . u n i q u e ( D ) ; } } ; E l e m e n t . e x t e n d ( { g e t E l e m e n t B y I d : f u n c t i o n ( C ) { v a r   B = d o c u m e n t . g e t E l e m e n t B y I d ( C ) ; 
 i f ( ! B ) { r e t u r n   f a l s e ; } f o r ( v a r   A = B . p a r e n t N o d e ; A ! = t h i s ; A = A . p a r e n t N o d e ) { i f ( ! A ) { r e t u r n   f a l s e ; } } r e t u r n   B ; } , 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 ( A ) { r e t u r n   t h i s . g e t E l e m e n t s ( " . " + A ) ; 
 } } ) ; d o c u m e n t . e x t e n d ( E l e m e n t . M e t h o d s . D o m ) ; E l e m e n t . e x t e n d ( E l e m e n t . M e t h o d s . D o m ) ; E l e m e n t . e x t e n d ( { g e t V a l u e : f u n c t i o n ( ) { 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 r   A = [ ] ; 
 $ e a c h ( t h i s . o p t i o n s , f u n c t i o n ( B ) { i f ( B . s e l e c t e d ) { A . p u s h ( $ p i c k ( B . v a l u e , B . t e x t ) ) ; } } ) ; r e t u r n ( t h i s . m u l t i p l e ) ? A : A [ 0 ] ; 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 " ] . c o n t a i n s ( 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 " ] . c o n t a i n s ( t h i s . t y p e ) ) { b r e a k ; 
 } c a s e " t e x t a r e a " : r e t u r n   t h i s . v a l u e ; } r e t u r n   f a l s e ; } , g e t F o r m E l e m e n t s : f u n c t i o n ( ) { r e t u r n   $ $ ( t h i s . g e t E l e m e n t s B y T a g N a m e ( " i n p u t " ) , t h i s . g e t E l e m e n t s B y T a g N a m e ( " s e l e c t " ) , t h i s . g e t E l e m e n t s B y T a g N a m e ( " t e x t a r e a " ) ) ; 
 } , t o Q u e r y S t r i n g : f u n c t i o n ( ) { v a r   A = [ ] ; t h i s . g e t F o r m E l e m e n t s ( ) . e a c h ( f u n c t i o n ( D ) { v a r   C = D . n a m e ; v a r   E = D . g e t V a l u e ( ) ; i f ( E = = = f a l s e | | ! C | | D . d i s a b l e d ) { r e t u r n   ; } v a r   B = f u n c t i o n ( F ) { A . p u s h ( C + " = " + e n c o d e U R I C o m p o n e n t ( F ) ) ; 
 } ; i f ( $ t y p e ( E ) = = " a r r a y " ) { E . e a c h ( B ) ; } e l s e { B ( E ) ; } } ) ; r e t u r n   A . j o i n ( " & " ) ; } } ) ; E l e m e n t . e x t e n d ( { s c r o l l T o : f u n c t i o n ( A , B ) { t h i s . s c r o l l L e f t = A ; t h i s . s c r o l l T o p = B ; } , g e t S i z e : f u n c t i o n ( ) { r e t u r n { " s c r o l l " : { " x " : t h i s . s c r o l l L e f t , " y " : t h i s . s c r o l l T o p } , " s i z e " : { " x " : t h i s . o f f s e t W i d t h , " y " : t h i s . o f f s e t H e i g h t } , " s c r o l l S i z e " : { " x " : t h i s . s c r o l l W i d t h , " y " : t h i s . s c r o l l H e i g h t } } ; 
 } , g e t P o s i t i o n : f u n c t i o n ( A ) { A = A | | [ ] ; v a r   B = t h i s , D = 0 , C = 0 ; d o { D + = B . o f f s e t L e f t | | 0 ; C + = B . o f f s e t T o p | | 0 ; B = B . o f f s e t P a r e n t ; } w h i l e ( B ) ; A . e a c h ( f u n c t i o n ( E ) { D - = E . s c r o l l L e f t | | 0 ; 
 C - = E . s c r o l l T o p | | 0 ; } ) ; r e t u r n { " x " : D , " y " : C } ; } , g e t T o p : f u n c t i o n ( A ) { r e t u r n   t h i s . g e t P o s i t i o n ( A ) . y ; } , g e t L e f t : f u n c t i o n ( A ) { r e t u r n   t h i s . g e t P o s i t i o n ( A ) . x ; } , g e t C o o r d i n a t e s : f u n c t i o n ( B ) { v a r   A = t h i s . g e t P o s i t i o n ( B ) ; 
 v a r   C = { " w i d t h " : t h i s . o f f s e t W i d t h , " h e i g h t " : t h i s . o f f s e t H e i g h t , " l e f t " : A . x , " t o p " : A . y } ; C . r i g h t = C . l e f t + C . w i d t h ; C . b o t t o m = C . t o p + C . h e i g h t ; r e t u r n   C ; } } ) ; E l e m e n t . E v e n t s . d o m r e a d y = { a d d : f u n c t i o n ( B ) { i f ( w i n d o w . l o a d e d ) { B . c a l l ( t h i s ) ; 
 r e t u r n   ; } v a r   A = f u n c t i o n ( ) { i f ( w i n d o w . l o a d e d ) { r e t u r n   ; } w i n d o w . l o a d e d = t r u e ; w i n d o w . t i m e r = $ c l e a r ( w i n d o w . t i m e r ) ; t h i s . f i r e E v e n t ( " d o m r e a d y " ) ; } . b i n d ( t h i s ) ; i f ( d o c u m e n t . r e a d y S t a t e & & w i n d o w . w e b k i t ) { w i n d o w . t i m e r = f u n c t i o n ( ) { i f ( [ " l o a d e d " , " c o m p l e t e " ] . c o n t a i n s ( d o c u m e n t . r e a d y S t a t e ) ) { A ( ) ; 
 } } . p e r i o d i c a l ( 5 0 ) ; } e l s e { i f ( d o c u m e n t . r e a d y S t a t e & & w i n d o w . i e ) { i f ( ! $ ( " i e _ r e a d y " ) ) { v a r   C = ( w i n d o w . l o c a t i o n . p r o t o c o l = = " h t t p s : " ) ? " : / / 0 " : " j a v a s c r i p t : v o i d ( 0 ) " ; 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   s r c = " ' + C + ' " > < \ / s c r i p t > ' ) ; 
 $ ( " i e _ r e a d y " ) . o n 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 " ) { A ( ) ; } } ; } } e l s e { w i n d o w . a d d L i s t e n e r ( " l o a d " , A ) ; d o c u m e n t . a d d L i s t e n e r ( " D O M C o n t e n t L o a d e d " , A ) ; 
 } } } } ; w i n d o w . o n D o m R e a d y = f u n c t i o n ( A ) { r e t u r n   t h i s . a d d E v e n t ( " d o m r e a d y " , A ) ; } ; w i n d o w . e x t e n d ( { g e t W i d t h : f u n c t i o n ( ) { i f ( t h i s . w e b k i t 4 1 9 ) { r e t u r n   t h i s . i n n e r W i d t h ; } i f ( t h i s . o p e r a ) { r e t u r n   d o c u m e n t . b o d y . c l i e n t W i d t h ; 
 } 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 . c l i e n t W i d t h ; } , g e t H e i g h t : f u n c t i o n ( ) { i f ( t h i s . w e b k i t 4 1 9 ) { r e t u r n   t h i s . i n n e r H e i g h t ; } i f ( t h i s . o p e r a ) { r e t u r n   d o c u m e n t . b o d y . c l i e n t H e i g h t ; 
 } 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 . c l i e n t 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 ( ) { i f ( t h i s . i e ) { r e t u r n   M a t h . m a x ( d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t 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 . s c r o l l W i d t h ) ; 
 } i f ( t h i s . w e b k i t ) { r e t u r n   d o c u m e n t . b o d y . s c r o l l W i d t h ; } 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 H e i g h t : f u n c t i o n ( ) { i f ( t h i s . i e ) { r e t u r n   M a t h . m a x ( d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t 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 . s c r o l l H e i g h t ) ; 
 } i f ( t h i s . w e b k i t ) { r e t u r n   d o c u m e n t . b o d y . s c r o l l H e i g h t ; } 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 L e f t : f u n c t i o n ( ) { r e t u r n   t h i s . p a g e X O f f s e t | | 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 ; 
 } , 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   t h i s . p a g e Y O f f s e t | | 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 ; } , g e t S i z e : f u n c t i o n ( ) { r e t u r n { " s i z e " : { " x " : t h i s . g e t W i d t h ( ) , " y " : t h i s . g e t H e i g h t ( ) } , " s c r o l l S i z e " : { " x " : t h i s . g e t S c r o l l W i d t h ( ) , " y " : t h i s . g e t S c r o l l H e i g h t ( ) } , " s c r o l l " : { " x " : t h i s . g e t S c r o l l L e f t ( ) , " y " : t h i s . g e t S c r o l l T o p ( ) } } ; 
 } , g e t P o s i t i o n : f u n c t i o n ( ) { r e t u r n { " x " : 0 , " y " : 0 } ; } } ) ; v a r   F x = { } ; F x . B a s e = n e w   C l a s s ( { o p t i o n s : { 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 C a n c e l : C l a s s . e m p t y , t r a n s i t i o n : f u n c t i o n ( A ) { r e t u r n   - ( M a t h . c o s ( M a t h . P I * A ) - 1 ) / 2 ; 
 } , 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 } , i n i t i a l i z e : f u n c t i o n ( A ) { t h i s . e l e m e n t = t h i s . e l e m e n t | | n u l l ; t h i s . s e t O p t i o n s ( A ) ; i f ( t h i s . o p t i o n s . i n i t i a l i z e ) { t h i s . o p t i o n s . i n i t i a l i z e . c a l l ( t h i s ) ; 
 } } , s t e p : f u n c t i o n ( ) { v a r   A = $ t i m e ( ) ; i f ( A < 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 . d e l t a = t h i s . o p t i o n s . t r a n s i t i o n ( ( A - 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 . s e t N o w ( ) ; 
 t h i s . i n c r e a s e ( ) ; } e l s e { t h i s . s t o p ( t r u e ) ; t h i s . s e t ( t h i s . t o ) ; t h i s . f i r e E v e n t ( " o n C o m p l e t e " , t h i s . e l e m e n t , 1 0 ) ; t h i s . c a l l C h a i n ( ) ; } } , s e t : f u n c t i o n ( A ) { t h i s . n o w = A ; 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 ( B , A ) { r e t u r n ( A - B ) * t h i s . d e l t a + B ; } , s t a r t : f u n c t i o n ( B , A ) { i f ( ! t h i s . o p t i o n s . w a i t ) { t h i s . s t o p ( ) ; 
 } e l s e { i f ( t h i s . t i m e r ) { r e t u r n   t h i s ; } } t h i s . f r o m = B ; t h i s . t o = A ; t h i s . c h a n g e = t h i s . t o - t h i s . f r o m ; t h i s . t i m e = $ 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 ) ; 
 t h i s . f i r e E v e n t ( " o n S t a r t " , t h i s . e l e m e n t ) ; r e t u r n   t h i s ; } , s t o p : f u n c t i o n ( A ) { i f ( ! t h i s . t i m e r ) { r e t u r n   t h i s ; } t h i s . t i m e r = $ c l e a r ( t h i s . t i m e r ) ; i f ( ! A ) { t h i s . f i r e E v e n t ( " o n C a n c e l " , t h i s . e l e m e n t ) ; 
 } r e t u r n   t h i s ; } , c u s t o m : f u n c t i o n ( B , A ) { r e t u r n   t h i s . s t a r t ( B , A ) ; } , c l e a r T i m e r : f u n c t i o n ( A ) { r e t u r n   t h i s . s t o p ( A ) ; } } ) ; F x . B a s e . i m p l e m e n t ( n e w   C h a i n , n e w   E v e n t s , n e w   O p t i o n s ) ; 
 F x . C S S = { s e l e c t : f u n c t i o n ( B , C ) { i f ( B . t e s t ( / c o l o r / i ) ) { r e t u r n   t h i s . C o l o r ; } v a r   A = $ t y p e ( C ) ; i f ( ( A = = " a r r a y " ) | | ( A = = " s t r i n g " & & C . c o n t a i n s ( "   " ) ) ) { r e t u r n   t h i s . M u l t i ; 
 } r e t u r n   t h i s . S i n g l e ; } , p a r s e : f u n c t i o n ( C , D , A ) { i f ( ! A . p u s h ) { A = [ A ] ; } v a r   F = A [ 0 ] , E = A [ 1 ] ; i f ( ! $ c h k ( E ) ) { E = F ; F = C . g e t S t y l e ( D ) ; } v a r   B = t h i s . s e l e c t ( D , E ) ; r e t u r n { " f r o m " : B . p a r s e ( F ) , " t o " : B . p a r s e ( E ) , " c s s " : B } ; 
 } } ; F x . C S S . S i n g l e = { p a r s e : f u n c t i o n ( A ) { r e t u r n   p a r s e F l o a t ( A ) ; } , g e t N o w : f u n c t i o n ( C , B , A ) { r e t u r n   A . c o m p u t e ( C , B ) ; } , g e t V a l u e : f u n c t i o n ( C , A , B ) { i f ( A = = " p x " & & B ! = " o p a c i t y " ) { C = M a t h . r o u n d ( C ) ; 
 } r e t u r n   C + A ; } } ; F x . C S S . M u l t i = { p a r s e : f u n c t i o n ( A ) { r e t u r n   A . p u s h ? A : A . s p l i t ( "   " ) . m a p ( f u n c t i o n ( B ) { r e t u r n   p a r s e F l o a t ( B ) ; } ) ; } , g e t N o w : f u n c t i o n ( E , D , C ) { v a r   A = [ ] ; f o r ( v a r   B = 0 ; 
 B < E . l e n g t h ; B + + ) { A [ B ] = C . c o m p u t e ( E [ B ] , D [ B ] ) ; } r e t u r n   A ; } , g e t V a l u e : f u n c t i o n ( C , A , B ) { i f ( A = = " p x " & & B ! = " o p a c i t y " ) { C = C . m a p ( M a t h . r o u n d ) ; } r e t u r n   C . j o i n ( A + "   " ) + A ; } } ; 
 F x . C S S . C o l o r = { p a r s e : f u n c t i o n ( A ) { r e t u r n   A . p u s h ? A : A . h e x T o R g b ( t r u e ) ; } , g e t N o w : f u n c t i o n ( E , D , C ) { v a r   A = [ ] ; f o r ( v a r   B = 0 ; B < E . l e n g t h ; B + + ) { A [ B ] = M a t h . r o u n d ( C . c o m p u t e ( E [ B ] , D [ B ] ) ) ; 
 } r e t u r n   A ; } , g e t V a l u e : f u n c t i o n ( A ) { r e t u r n " r g b ( " + A . j o 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 ( B , C , A ) { t h i s . e l e m e n t = $ ( B ) ; t h i s . p r o p e r t y = C ; 
 t h i s . p a r e n t ( A ) ; } , 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 ) ; } , 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 s s . g e t N o w ( t h i s . f r o m , t h i s . t o , t h i s ) ; } , s e t : f u n c t i o n ( A ) { t h i s . c s s = F x . C S S . s e l e c t ( t h i s . p r o p e r t y , A ) ; 
 r e t u r n   t h i s . p a r e n t ( t h i s . c s s . p a r s e ( A ) ) ; } , s t a r t : f u n c t i o n ( C , B ) { 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   t h i s ; } v a r   A = F x . C S S . p a r s e ( t h i s . e l e m e n t , t h i s . p r o p e r t y , [ C , B ] ) ; 
 t h i s . c s s = A . c s s ; r e t u r n   t h i s . p a r e n t ( A . f r o m , A . t o ) ; } , 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 , t h i s . c s s . g e t V a l u e ( t h i s . n o w , t h i s . o p t i o n s . u n i t , t h i s . p r o p e r t y ) ) ; 
 } } ) ; 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 ( B , A ) { r e t u r n   n e w   F x . S t y l e ( t h i s , B , A ) ; } } ) ; 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 ( B , A ) { t h i s . e l e m e n t = $ ( B ) ; t h i s . p a r e n t ( A ) ; 
 } , s e t N o w : f u n c t i o n ( ) { f o r ( v a r   A   i n   t h i s . f r o m ) { t h i s . n o w [ A ] = t h i s . c s s [ A ] . g e t N o w ( t h i s . f r o m [ A ] , t h i s . t o [ A ] , t h i s ) ; } } , s e t : f u n c t i o n ( C ) { v a r   A = { } ; t h i s . c s s = { } ; f o r ( v a r   B   i n   C ) { t h i s . c s s [ B ] = F x . C S S . s e l e c t ( B , C [ B ] ) ; 
 A [ B ] = t h i s . c s s [ B ] . p a r s e ( C [ B ] ) ; } r e t u r n   t h i s . p a r e n t ( A ) ; } , s t a r t : f u n c t i o n ( C ) { 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   t h i s ; } t h i s . n o w = { } ; t h i s . c s s = { } ; v a r   E = { } , D = { } ; 
 f o r ( v a r   B   i n   C ) { v a r   A = F x . C S S . p a r s e ( t h i s . e l e m e n t , B , C [ B ] ) ; E [ B ] = A . f r o m ; D [ B ] = A . t o ; t h i s . c s s [ B ] = A . c s s ; } r e t u r n   t h i s . p a r e n t ( E , D ) ; } , i n c r e a s e : f u n c t i o n ( ) { f o r ( v a r   A   i n   t h i s . n o w ) { t h i s . e l e m e n t . s e t S t y l e ( A , t h i s . c s s [ A ] . g e t V a l u e ( t h i s . n o w [ A ] , t h i s . o p t i o n s . u n i t , A ) ) ; 
 } } } ) ; E l e m e n t . e x t e n d ( { e f f e c t s : f u n c t i o n ( A ) { r e t u r n   n e w   F x . S t y l e s ( t h i s , A ) ; } } ) ; 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 ( B , A ) { t h i s . e l e m e n t s = $ $ ( B ) ; t h i s . p a r e n t ( A ) ; 
 } , s e t N o w : f u n c t i o n ( ) { f o r ( v a r   C   i n   t h i s . f r o m ) { v a r   F = t h i s . f r o m [ C ] , E = t h i s . t o [ C ] , B = t h i s . c s s [ C ] , A = t h i s . n o w [ C ] = { } ; f o r ( v a r   D   i n   F ) { A [ D ] = B [ D ] . g e t N o w ( F [ D ] , E [ D ] , t h i s ) ; 
 } } } , s e t : f u n c t i o n ( G ) { v a r   B = { } ; t h i s . c s s = { } ; f o r ( v a r   D   i n   G ) { v a r   F = G [ D ] , C = t h i s . c s s [ D ] = { } , A = B [ D ] = { } ; f o r ( v a r   E   i n   F ) { C [ E ] = F x . C S S . s e l e c t ( E , F [ E ] ) ; A [ E ] = C [ E ] . p a r s e ( F [ E ] ) ; 
 } } r e t u r n   t h i s . p a r e n t ( B ) ; } , s t a r t : f u n c t i o n ( D ) { 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   t h i s ; } t h i s . n o w = { } ; t h i s . c s s = { } ; v a r   I = { } , J = { } ; f o r ( v a r   E   i n   D ) { v a r   G = D [ E ] , A = I [ E ] = { } , H = J [ E ] = { } , C = t h i s . c s s [ E ] = { } ; 
 f o r ( v a r   B   i n   G ) { v a r   F = F x . C S S . p a r s e ( t h i s . e l e m e n t s [ E ] , B , G [ B ] ) ; A [ B ] = F . f r o m ; H [ B ] = F . t o ; C [ B ] = F . c s s ; } } r e t u r n   t h i s . p a r e n t ( I , J ) ; } , i n c r e a s e : f u n c t i o n ( ) { f o r ( v a r   C   i n   t h i s . n o w ) { v a r   A = t h i s . n o w [ C ] , B = t h i s . c s s [ C ] ; 
 f o r ( v a r   D   i n   A ) { t h i s . e l e m e n t s [ C ] . s e t S t y l e ( D , B [ D ] . g e t V a l u e ( A [ D ] , t h i s . o p t i o n s . u n i t , D ) ) ; } } } } ) ; F x . S c r o l l = F x . B a s e . e x t e n d ( { o p t i o n s : { o v e r f l o w n : [ ] , o f f s e t : { " x " : 0 , " y " : 0 } , w h e e l S t o p s : t r u e } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . n o w = [ ] ; 
 t h i s . e l e m e n t = $ ( B ) ; t h i s . b o u n d = { " s t o p " : t h i s . s t o p . b i n d ( t h i s , f a l s e ) } ; t h i s . p a r e n t ( A ) ; i f ( t h i s . o p t i o n s . w h e e l S t o p s ) { t h i s . a d d E v e n t ( " o n S t a r t " , f u n c t i o n ( ) { d o c u m e n t . a d d E v e n t ( " m o u s e w h e e l " , t h i s . b o u n d . s t o p ) ; 
 } . b i n d ( t h i s ) ) ; t h i s . a d d E v e n t ( " o n C o m p l e t e " , f u n c t i o n ( ) { d o c u m e n t . r e m o v e E v e n t ( " m o u s e w h e e l " , t h i s . b o u n d . s t o p ) ; } . b i n d ( t h i s ) ) ; } } , s e t N o w : f u n c t i o n ( ) { f o r ( v a r   A = 0 ; A < 2 ; 
 A + + ) { t h i s . n o w [ A ] = t h i s . c o m p u t e ( t h i s . f r o m [ A ] , t h i s . t o [ A ] ) ; } } , s c r o l l T o : f u n c t i o n ( B , F ) { 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   t h i s ; } v a r   D = t h i s . e l e m e n t . g e t S i z e ( ) ; 
 v a r   C = { " x " : B , " y " : F } ; f o r ( v a r   E   i n   D . s i z e ) { v a r   A = D . s c r o l l S i z e [ E ] - D . s i z e [ E ] ; i f ( $ c h k ( C [ E ] ) ) { C [ E ] = ( $ t y p e ( C [ E ] ) = = " n u m b e r " ) ? C [ E ] . l i m i t ( 0 , A ) : A ; } e l s e { C [ E ] = D . s c r o l l [ E ] ; 
 } C [ E ] + = t h i s . o p t i o n s . o f f s e t [ E ] ; } r e t u r n   t h i s . s t a r t ( [ D . s c r o l l . x , D . s c r o l l . y ] , [ C . x , C . y ] ) ; } , t o T o p : f u n c t i o n ( ) { r e t u r n   t h i s . s c r o l l T o ( f a l s e , 0 ) ; } , t o B o t t o m : f u n c t i o n ( ) { r e t u r n   t h i s . s c r o l l T o ( f a l s e , " f u l l " ) ; 
 } , t o L e f t : f u n c t i o n ( ) { r e t u r n   t h i s . s c r o l l T o ( 0 , f a l s e ) ; } , t o R i g h t : f u n c t i o n ( ) { r e t u r n   t h i s . s c r o l l T o ( " f u l l " , f a l s e ) ; } , t o E l e m e n t : f u n c t i o n ( B ) { v a r   A = t h i s . e l e m e n t . g e t P o s i t i o n ( t h i s . o p t i o n s . o v e r f l o w n ) ; 
 v a r   C = $ ( B ) . g e t P o s i t i o n ( t h i s . o p t i o n s . o v e r f l o w n ) ; r e t u r n   t h i s . s c r o l l T o ( C . x - A . x , C . y - A . y ) ; } , 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 ( t h i s . n o w [ 0 ] , t h i s . n o w [ 1 ] ) ; 
 } } ) ; F x . S l i d e = F x . B a s e . e x t e n d ( { o p t i o n s : { m o d e : " v e r t i c a l " } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . e l e m e n t = $ ( B ) ; t h i s . w r a p p e r = n e w   E l e m e n t ( " d i v " , { " s t y l e s " : $ e x t e n d ( t h i s . e l e m e n t . g e t S t y l e s ( " m a r g i n " ) , { " o v e r f l o w " : " h i d d e n " } ) } ) . i n j e c t A f t e r ( t h i s . e l e m e n t ) . a d o p t ( t h i s . e l e m e n 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 " , 0 ) ; t h i s . s e t O p t i o n s ( A ) ; t h i s . n o w = [ ] ; t h i s . p a r e n t ( t h i s . o p t i o n s ) ; t h i s . o p e n = t r u e ; t h i s . a d d E v e n t ( " o n C o m p l e t e " , f u n c t i o n ( ) { t h i s . o p e n = ( t h i s . n o w [ 0 ] = = = 0 ) ; 
 } ) ; i f ( w i n d o w . w e b k i t 4 1 9 ) { t h i s . a d d E v e n t ( " o n C o m p l e t e " , f u n c t i o n ( ) { i f ( t h i s . o p e n ) { t h i s . e l e m e n t . r e m o v e ( ) . i n j e c t ( t h i s . w r a p p e r ) ; } } ) ; } } , s e t N o w : f u n c t i o n ( ) { f o r ( v a r   A = 0 ; 
 A < 2 ; A + + ) { t h i s . n o w [ A ] = t h i s . c o m p u t e ( t h i s . f r o m [ A ] , t h i s . t o [ A ] ) ; } } , 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 = " 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 . o f f s e t = t h i s . e l e m e n t . o f f s e t H e i g h t ; 
 } , 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 = " 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 . o f f s e t = t h i s . e l e m e n t . o f f s e t W i d t h ; } , s l i d e I n : f u n c t i o n ( A ) { t h i s [ A | | t h i s . o p t i o n s . m o d e ] ( ) ; 
 r e t u r n   t h i s . s t a r t ( [ t h i s . e l e m e n t . g e t S t y l e ( t h i s . m a r g i n ) . t o I n t ( ) , t h i s . w r a p p e r . g e t S t y l e ( t h i s . l a y o u t ) . t o I n t ( ) ] , [ 0 , t h i s . o f f s e t ] ) ; } , s l i d e O u t : f u n c t i o n ( A ) { t h i s [ A | | t h i s . o p t i o n s . m o d e ] ( ) ; 
 r e t u r n   t h i s . s t a r t ( [ t h i s . e l e m e n t . g e t S t y l e ( t h i s . m a r g i n ) . t o I n t ( ) , t h i s . w r a p p e r . g e t S t y l e ( t h i s . l a y o u t ) . t o I n t ( ) ] , [ - t h i s . o f f s e t , 0 ] ) ; } , h i d e : f u n c t i o n ( A ) { t h i s [ A | | t h i s . o p t i o n s . m o d e ] ( ) ; 
 t h i s . o p e n = f a l s e ; r e t u r n   t h i s . s e t ( [ - t h i s . o f f s e t , 0 ] ) ; } , s h o w : f u n c t i o n ( A ) { t h i s [ A | | t h i s . o p t i o n s . m o d e ] ( ) ; t h i s . o p e n = t r u e ; r e t u r n   t h i s . s e t ( [ 0 , t h i s . o f f s e t ] ) ; } , t o g g l e : f u n c t i o n ( A ) { i f ( t h i s . w r a p p e r . o f f s e t H e i g h t = = 0 | | t h i s . w r a p p e r . o f f s e t W i d t h = = 0 ) { r e t u r n   t h i s . s l i d e I n ( A ) ; 
 } r e t u r n   t h i s . s l i d e O u t ( A ) ; } , 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 . m a r g i n , 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 . 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 [ 1 ] + t h i s . o p t i o n s . u n i t ) ; 
 } } ) ; F x . T r a n s i t i o n = f u n c t i o n ( B , A ) { A = A | | [ ] ; i f ( $ t y p e ( A ) ! = " a r r a y " ) { A = [ A ] ; } r e t u r n   $ e x t e n d ( B , { e a s e I n : f u n c t i o n ( C ) { r e t u r n   B ( C , A ) ; } , e a s e O u t : f u n c t i o n ( C ) { r e t u r n   1 - B ( 1 - C , A ) ; 
 } , e a s e I n O u t : f u n c t i o n ( C ) { r e t u r n ( C < = 0 . 5 ) ? B ( 2 * C , A ) / 2 : ( 2 - B ( 2 * ( 1 - C ) , A ) ) / 2 ; } } ) ; } ; F x . T r a n s i t i o n s = n e w   A b s t r a c t ( { l i n e a r : f u n c t i o n ( A ) { r e t u r n   A ; } } ) ; F x . T r a n s i t i o n s . e x t e n d = f u n c t i o n ( A ) { f o r ( v a r   B   i n   A ) { F x . T r a n s i t i o n s [ B ] = n e w   F x . T r a n s i t i o n ( A [ B ] ) ; 
 F x . T r a n s i t i o n s . c o m p a t ( B ) ; } } ; F x . T r a n s i t i o n s . c o m p a t = f u n c t i o n ( A ) { [ " I n " , " O u t " , " I n O u t " ] . e a c h ( f u n c t i o n ( B ) { F x . T r a n s i t i o n s [ A . t o L o w e r C a s e ( ) + B ] = F x . T r a n s i t i o n s [ A ] [ " e a s e " + B ] ; 
 } ) ; } ; F x . T r a n s i t i o n s . e x t e n d ( { P o w : f u n c t i o n ( B , A ) { r e t u r n   M a t h . p o w ( B , A [ 0 ] | | 6 ) ; } , E x p o : f u n c t i o n ( A ) { r e t u r n   M a t h . p o w ( 2 , 8 * ( A - 1 ) ) ; } , C i r c : f u n c t i o n ( A ) { r e t u r n   1 - M a t h . s i n ( M a t h . a c o s ( A ) ) ; 
 } , S i n e : f u n c t i o n ( A ) { r e t u r n   1 - M a t h . s i n ( ( 1 - A ) * M a t h . P I / 2 ) ; } , B a c k : f u n c t i o n ( B , A ) { A = A [ 0 ] | | 1 . 6 1 8 ; r e t u r n   M a t h . p o w ( B , 2 ) * ( ( A + 1 ) * B - A ) ; } , B o u n c e : f u n c t i o n ( D ) { v a r   C ; f o r ( v a r   B = 0 , A = 1 ; 
 1 ; B + = A , A / = 2 ) { i f ( D > = ( 7 - 4 * B ) / 1 1 ) { C = - M a t h . p o w ( ( 1 1 - 6 * B - 1 1 * D ) / 4 , 2 ) + A * A ; b r e a k ; } } r e t u r n   C ; } , E l a s t i c : f u n c t i o n ( B , A ) { r e t u r n   M a t h . p o w ( 2 , 1 0 * - - B ) * M a t h . c o s ( 2 0 * B * M a t h . P I * ( A [ 0 ] | | 1 ) / 3 ) ; 
 } } ) ; [ " Q u a d " , " C u b i c " , " Q u a r t " , " Q u i n t " ] . e a c h ( f u n c t i o n ( B , A ) { F x . T r a n s i t i o n s [ B ] = n e w   F x . T r a n s i t i o n ( f u n c t i o n ( C ) { r e t u r n   M a t h . p o w ( C , [ A + 2 ] ) ; } ) ; F x . T r a n s i t i o n s . c o m p a t ( B ) ; 
 } ) ; v a r   D r a g = { } ; D r a g . B a s e = n e w   C l a s s ( { o p t i o n s : { 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 B e f o r e 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 S n a p : 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 , l i m i t : f a l s e , m o d i f i e r s : { x : " l e f t " , y : " t o p " } , g r i d : f a l s e , s n a p : 6 } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . s e t O p t i o n s ( A ) ; 
 t h i s . e l e m e n t = $ ( B ) ; 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 ; t h i s . m o u s e = { " n o w " : { } , " p o s " : { } } ; t h i s . v a l u e = { " s t a r t " : { } , " n o w " : { } } ; t h i s . b o u n d = { " s t a r t " : t h i s . s t a r t . b i n d W i t h E v e n t ( t h i s ) , " c h e c k " : t h i s . c h e c k . b i n d W i t h E v e n t ( t h i s ) , " d r a g " : t h i s . d r a g . b i n d W i t h E v e n t ( t h i s ) , " s t o p " : t h i s . s t o p . b i n d ( t h i s ) } ; 
 t h i s . a t t a c h ( ) ; i f ( t h i s . o p t i o n s . i n i t i a l i z e ) { t h i s . o p t i o n s . i n i t i a l i z e . c a l l ( t h i s ) ; } } , a t t a c h : f u n c t i o n ( ) { t h i s . h a n d l e . a d d E v e n t ( " m o u s e d o w n " , t h i s . b o u n d . s t a r t ) ; r e t u r n   t h i s ; 
 } , d e t a c h : f u n c t i o n ( ) { t h i s . h a n d l e . r e m o v e E v e n t ( " m o u s e d o w n " , t h i s . b o u n d . s t a r t ) ; r e t u r n   t h i s ; } , s t a r t : f u n c t i o n ( C ) { t h i s . f i r e E v e n t ( " o n B e f o r e S t a r t " , t h i s . e l e m e n t ) ; 
 t h i s . m o u s e . s t a r t = C . p a g e ; v a r   A = t h i s . o p t i o n s . l i m i t ; t h i s . l i m i t = { " x " : [ ] , " y " : [ ] } ; f o r ( v a r   D   i n   t h i s . o p t i o n s . m o d i f i e r s ) { i f ( ! t h i s . o p t i o n s . m o d i f i e r s [ D ] ) { c o n t i n u e ; 
 } t h i s . v a l u e . n o w [ D ] = t h i s . e l e m e n t . g e t S t y l e ( t h i s . o p t i o n s . m o d i f i e r s [ D ] ) . t o I n t ( ) ; t h i s . m o u s e . p o s [ D ] = C . p a g e [ D ] - t h i s . v a l u e . n o w [ D ] ; i f ( A & & A [ D ] ) { f o r ( v a r   B = 0 ; B < 2 ; B + + ) { i f ( $ c h k ( A [ D ] [ B ] ) ) { t h i s . l i m i t [ D ] [ B ] = ( $ t y p e ( A [ D ] [ B ] ) = = " f u n c t i o n " ) ? A [ D ] [ B ] ( ) : A [ D ] [ B ] ; 
 } } } } i f ( $ t y p e ( t h i s . o p t i o n s . g r i d ) = = " n u m b e r " ) { t h i s . o p t i o n s . g r i d = { " x " : t h i s . o p t i o n s . g r i d , " y " : t h i s . o p t i o n s . g r i d } ; } d o c u m e n t . a d d L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . c h e c k ) ; 
 d o c u m e n t . a d d L i s t e n e r ( " m o u s e u p " , t h i s . b o u n d . s t o p ) ; t h i s . f i r e E v e n t ( " o n S t a r t " , t h i s . e l e m e n t ) ; C . s t o p ( ) ; } , c h e c k : f u n c t i o n ( A ) { v a r   B = M a t h . r o u n d ( M a t h . s q r t ( M a t h . p o w ( A . p a g e . x - t h i s . m o u s e . s t a r t . x , 2 ) + M a t h . p o w ( A . p a g e . y - t h i s . m o u s e . s t a r t . y , 2 ) ) ) ; 
 i f ( B > t h i s . o p t i o n s . s n a p ) { d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . c h e c k ) ; d o c u m e n t . a d d L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . d r a g ) ; t h i s . d r a g ( A ) ; t h i s . f i r e E v e n t ( " o n S n a p " , t h i s . e l e m e n t ) ; 
 } A . s t o p ( ) ; } , d r a g : f u n c t i o n ( A ) { t h i s . o u t = f a l s e ; t h i s . m o u s e . n o w = A . p a g e ; f o r ( v a r   B   i n   t h i s . o p t i o n s . m o d i f i e r s ) { i f ( ! t h i s . o p t i o n s . m o d i f i e r s [ B ] ) { c o n t i n u e ; } t h i s . v a l u e . n o w [ B ] = t h i s . m o u s e . n o w [ B ] - t h i s . m o u s e . p o s [ B ] ; 
 i f ( t h i s . l i m i t [ B ] ) { i f ( $ c h k ( t h i s . l i m i t [ B ] [ 1 ] ) & & ( t h i s . v a l u e . n o w [ B ] > t h i s . l i m i t [ B ] [ 1 ] ) ) { t h i s . v a l u e . n o w [ B ] = t h i s . l i m i t [ B ] [ 1 ] ; t h i s . o u t = t r u e ; } e l s e { i f ( $ c h k ( t h i s . l i m i t [ B ] [ 0 ] ) & & ( t h i s . v a l u e . n o w [ B ] < t h i s . l i m i t [ B ] [ 0 ] ) ) { t h i s . v a l u e . n o w [ B ] = t h i s . l i m i t [ B ] [ 0 ] ; 
 t h i s . o u t = t r u e ; } } } i f ( t h i s . o p t i o n s . g r i d [ B ] ) { t h i s . v a l u e . n o w [ B ] - = ( t h i s . v a l u e . n o w [ B ] % t h i s . o p t i o n s . g r i d [ B ] ) ; } t h i s . e l e m e n t . s e t S t y l e ( t h i s . o p t i o n s . m o d i f i e r s [ B ] , t h i s . v a l u e . n o w [ B ] + t h i s . o p t i o n s . u n i t ) ; 
 } t h i s . f i r e E v e n t ( " o n D r a g " , t h i s . e l e m e n t ) ; A . s t o p ( ) ; } , s t o p : f u n c t i o n ( ) { d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . c h e c k ) ; d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . d r a g ) ; 
 d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e u p " , t h i s . b o u n d . s t o p ) ; t h i s . f i r e E v e n t ( " o n C o m p l e t e " , t h i s . e l e m e n t ) ; } } ) ; D r a g . B a s e . i m p l e m e n t ( n e w   E v e n t s , n e w   O p t i o n s ) ; E l e m e n t . e x t e n d ( { m a k e R e s i z a b l e : f u n c t i o n ( A ) { r e t u r n   n e w   D r a g . B a s e ( t h i s , $ m e r g e ( { m o d i f i e r s : { x : " w i d t h " , y : " h e i g h t " } } , A ) ) ; 
 } } ) ; D r a g . M o v e = D r a g . B a s e . e x t e n d ( { o p t i o n s : { d r o p p a b l e s : [ ] , c o n t a i n e r : f a l s e , o v e r f l o w n : [ ] } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . s e t O p t i o n s ( A ) ; t h i s . e l e m e n t = $ ( B ) ; t h i s . d r o p p a b l e s = $ $ ( t h i s . o p t i o n s . d r o p p a b l e 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 o s i t i o n = { " e l e m e n t " : t h i s . e l e m e n t . g e t S t y l e ( " p o s i t i o n " ) , " c o n t a i n e r " : f a l s e } ; i f ( t h i s . c o n t a i n e r ) { t h i s . p o s i t i o n . c o n t a i n e r = t h i s . c o n t a i n e r . g e t S t y l e ( " p o s i t i o n " ) ; 
 } i f ( ! [ " r e l a t i v e " , " a b s o l u t e " , " f i x e d " ] . c o n t a i n s ( t h i s . p o s i t i o n . e l e m e n t ) ) { t h i s . p o s i t i o n . e l e m e n t = " a b s o l u t e " ; } v a r   D = t h i s . e l e m e n t . g e t S t y l e ( " t o p " ) . t o I n t ( ) ; v a r   C = t h i s . e l e m e n t . g e t S t y l e ( " l e f t " ) . t o I n t ( ) ; 
 i f ( t h i s . p o s i t i o n . e l e m e n t = = " a b s o l u t e " & & ! [ " r e l a t i v e " , " a b s o l u t e " , " f i x e d " ] . c o n t a i n s ( t h i s . p o s i t i o n . c o n t a i n e r ) ) { D = $ c h k ( D ) ? D : t h i s . e l e m e n t . g e t T o p ( t h i s . o p t i o n s . o v e r f l o w n ) ; 
 C = $ c h k ( C ) ? C : t h i s . e l e m e n t . g e t L e f t ( t h i s . o p t i o n s . o v e r f l o w n ) ; } e l s e { D = $ c h k ( D ) ? D : 0 ; C = $ c h k ( C ) ? C : 0 ; } t h i s . e l e m e n t . s e t S t y l e s ( { " t o p " : D , " l e f t " : C , " p o s i t i o n " : t h i s . p o s i t i o n . e l e m e n t } ) ; 
 t h i s . p a r e n t ( t h i s . e l e m e n t ) ; } , s t a r t : f u n c t i o n ( C ) { t h i s . o v e r e d = n u l l ; i f ( t h i s . c o n t a i n e r ) { v a r   A = t h i s . c o n t a i n e r . g e t C o o r d i n a t e s ( ) ; v a r   B = t h i s . e l e m e n t . g e t C o o r d i n a t e s ( ) ; 
 i f ( t h i s . p o s i t i o n . e l e m e n t = = " a b s o l u t e " & & ! [ " r e l a t i v e " , " a b s o l u t e " , " f i x e d " ] . c o n t a i n s ( t h i s . p o s i t i o n . c o n t a i n e r ) ) { t h i s . o p t i o n s . l i m i t = { " x " : [ A . l e f t , A . r i g h t - B . w i d t h ] , " y " : [ A . t o p , A . b o t t o m - B . h e i g h t ] } ; 
 } e l s e { t h i s . o p t i o n s . l i m i t = { " y " : [ 0 , A . h e i g h t - B . h e i g h t ] , " x " : [ 0 , A . w i d t h - B . w i d t h ] } ; } } t h i s . p a r e n t ( C ) ; } , d r a g : f u n c t i o n ( A ) { t h i s . p a r e n t ( A ) ; v a r   B = t h i s . o u t ? f a l s e : t h i s . d r o p p a b l e s . f i l t e r ( t h i s . c h e c k A g a i n s t , t h i s ) . g e t L a s t ( ) ; 
 i f ( t h i s . o v e r e d ! = B ) { i f ( t h i s . o v e r e d ) { t h i s . o v e r e d . f i r e E v e n t ( " l e a v e " , [ t h i s . e l e m e n t , t h i s ] ) ; } t h i s . o v e r e d = B ? B . f i r e E v e n t ( " o v e r " , [ t h i s . e l e m e n t , t h i s ] ) : n u l l ; } r e t u r n   t h i s ; 
 } , c h e c k A g a i n s t : f u n c t i o n ( B ) { B = B . g e t C o o r d i n a t e s ( t h i s . o p t i o n s . o v e r f l o w n ) ; v a r   A = t h i s . m o u s e . n o w ; r e t u r n ( A . x > B . l e f t & & A . x < B . r i g h t & & A . y < B . b o t t o m & & A . y > B . t o p ) ; } , s t o p : f u n c t i o n ( ) { i f ( t h i s . o v e r e d & & ! t h i s . o u t ) { t h i s . o v e r e d . f i r e E v e n t ( " d r o p " , [ t h i s . e l e m e n t , t h i s ] ) ; 
 } e l s e { t h i s . e l e m e n t . f i r e E v e n t ( " e m p t y d r o p " , t h i s ) ; } t h i s . p a r e n t ( ) ; r e t u r n   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 ( A ) { r e t u r n   n e w   D r a g . M o v e ( t h i s , A ) ; } } ) ; 
 v a r   X H R = n e w   C l a s s ( { o p t i o n s : { m e t h o d : " p o s t " , a s y n c : t r u e , o n R e q u e s t : C l a s s . e m p t y , o n S u c c e s s : C l a s s . e m p t y , o n F a i l u r e : C l a s s . e m p t y , u r l E n c o d e d : t r u e , e n c o d i n g : " u t f - 8 " , a u t o C a n c e l : f a l s e , h e a d e r s : { } } , s e t T r a n s p o r t : f u n c t i o n ( ) { t h i s . t r a n s p o r t = ( w i n d o w . X M L H t t p R e q u e s t ) ? n e w   X M L H t t p R e q u e s t ( ) : ( w i n d o w . i e ? 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 " ) : f a l s e ) ; 
 r e t u r n   t h i s ; } , i n i t i a l i z e : f u n c t i o n ( A ) { t h i s . s e t T r a n s p o r t ( ) . s e t O p t i o n s ( A ) ; t h i s . o p t i o n s . i s S u c c e s s = t h i s . o p t i o n s . i s S u c c e s s | | t h i s . i s S u c c e s s ; t h i s . h e a d e r s = { } ; i f ( t h i s . o p t i o n s . u r l E n c o d e d & & t h i s . o p t i o n s . m e t h o d = = " p o s t " ) { v a r   B = ( t h i s . o p t i o n s . e n c o d i n g ) ? " ;   c h a r s e t = " + t h i s . o p t i o n s . e n c o d i n g : " " ; 
 t h i s . s e 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 " + B ) ; } i f ( t h i s . o p t i o n s . i n i t i a l i z e ) { t h i s . o p t i o n s . i n i t i a l i z e . c a l l ( 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 ( ) { 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 . r u n n i n g ) { r e t u r n   ; 
 } t h i s . r u n n i n g = f a l s e ; v a r   A = 0 ; t r y { A = t h i s . t r a n s p o r t . s t a t u s ; } c a t c h ( B ) { } i f ( t h i s . o p t i o n s . i s S u c c e s s . c a l l ( t h i s , A ) ) { t h i s . o n S u c c e s s ( ) ; } e l s e { t h i s . o n F a i l u r e ( ) ; } 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 ; 
 } , i s S u c c e s s : f u n c t i o n ( A ) { r e t u r n ( ( A > = 2 0 0 ) & & ( A < 3 0 0 ) ) ; } , o n S u c c e s s : f u n c t i o n ( ) { t h i s . 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 T e x t , " x m l " : 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 . f i r e E v e n t ( " o n S u c c e s s " , [ t h i s . r e s p o n s e . t e x t , t h i s . r e s p o n s e . x m l ] ) ; t h i s . c a l l C h a i n ( ) ; } , o n F a i l u r e : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " o n F a i l u r e " , t h i s . t r a n s p o r t ) ; } , s e t H e a d e r : f u n c t i o n ( A , B ) { t h i s . h e a d e r s [ A ] = B ; 
 r e t u r n   t h i s ; } , s e n d : f u n c t i o n ( A , C ) { i f ( t h i s . o p t i o n s . a u t o C a n c e l ) { t h i s . c a n c e l ( ) ; } e l s e { i f ( t h i s . r u n n i n g ) { r e t u r n   t h i s ; } } t h i s . r u n n i n g = t r u e ; i f ( C & & t h i s . o p t i o n s . m e t h o d = = " g e t " ) { A = A + ( A . c o n t a i n s ( " ? " ) ? " & " : " ? " ) + C ; 
 C = n u l l ; } 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 o U p p e r C a s e ( ) , A , 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 . o v e r r i d e M i m e T y p e ) { t h i s . s e t H e a d e r ( " C o n n e c t i o n " , " c l o s e " ) ; 
 } $ e x t e n d ( t h i s . h e a d e r s , t h i s . o p t i o n s . h e a d e r s ) ; f o r ( v a r   B   i n   t h i s . h e a d e r s ) { t r y { 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 ( B , t h i s . h e a d e r s [ B ] ) ; } c a t c h ( D ) { } } t h i s . f i r e E v e n t ( " o n R e q u e s t " ) ; 
 t h i s . t r a n s p o r t . s e n d ( $ p i c k ( C , n u l l ) ) ; r e t u r n   t h i s ; } , c a n c e l : f u n c t i o n ( ) { i f ( ! t h i s . r u n n i n g ) { r e t u r n   t h i s ; } t h i s . r u n n i n g = f a l s e ; t h i s . t r a n s p o r t . a b o r t ( ) ; 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 . s e t T r a n s p o r t ( ) ; t h i s . f i r e E v e n t ( " o n C a n c e l " ) ; r e t u r n   t h i s ; } } ) ; X H R . i m p l e m e n t ( n e w   C h a i n , n e w   E v e n t s , n e w   O p t i o n s ) ; v a r   A j a x = X H R . e x t e n d ( { o p t i o n s : { d a t a : n u l l , u p d a t e : n u l l , o n C o m p l e t e : C l a s s . e m p t y , e v a l S c r i p t s : f a l s e , e v a l R e s p o n s e : f a l s e } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . a d d E v e n t ( " o n S u c c e s s " , t h i s . o n C o m p l e t e ) ; 
 t h i s . s e t O p t i o n s ( A ) ; t h i s . o p t i o n s . d a t a = t h i s . o p t i o n s . d a t a | | t h i s . o p t i o n s . p o s t B o d y ; i f ( ! [ " p o s t " , " g e t " ] . c o n t a i n s ( t h i s . o p t i o n s . m e t h o d ) ) { t h i s . _ m e t h o d = " _ m e t h o d = " + t h i s . o p t i o n s . m e t h o d ; 
 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 . p a r e n t ( ) ; t h i s . s e t H e a d e r ( " X - R e q u e s t e d - W i t h " , " X M L H t t p R e q u e s t " ) ; t h i s . s e t H e a d e r ( " A c c e p t " , " t e x t / j a v a s c r i p t ,   t e x t / h t m l ,   a p p l i c a t i o n / x m l ,   t e x t / x m l ,   * / * " ) ; 
 t h i s . u r l = B ; } , o n C o m p l e t e : f u n c t i o n ( ) { 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 ) . e m p t y ( ) . s e t H T M L ( t h i s . r e s p o n s e . t e x t ) ; } 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 . o p t i o n s . e v a l R e s p o n s e ) { t h i s . e v a l S c r i p t s ( ) ; 
 } t h i s . f i r e E v e n t ( " o n C o m p l e t e " , [ t h i s . r e s p o n s e . t e x t , t h i s . r e s p o n s e . x m l ] , 2 0 ) ; } , r e q u e s t : f u n c t i o n ( A ) { A = A | | t h i s . o p t i o n s . d a t a ; s w i t c h ( $ t y p e ( A ) ) { c a s e " e l e m e n t " : A = $ ( A ) . 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 " : A = O b j e c t . t o Q u e r y S t r i n g ( A ) ; } i f ( t h i s . _ m e t h o d ) { A = ( A ) ? [ t h i s . _ m e t h o d , A ] . j o i n ( " & " ) : t h i s . _ m e t h o d ; } r e t u r n   t h i s . s e n d ( t h i s . u r l , A ) ; } , e v a l S c r i p t s : f u n c t i o n ( ) { v a r   B , A ; 
 i f ( t h i s . o p t i o n s . e v a l R e s p o n s e | | ( / ( e c m a | j a v a ) s c r i p t / ) . t e s t ( t h i s . g e t H e a d e r ( " C o n t e n t - t y p e " ) ) ) { A = t h i s . r e s p o n s e . t e x t ; } e l s e { A = [ ] ; v a r   C = / < s c r i p t [ ^ > ] * > ( [ \ s \ S ] * ? ) < \ / s c r i p t > / g i ; 
 w h i l e ( ( B = C . e x e c ( t h i s . r e s p o n s e . t e x t ) ) ) { A . p u s h ( B [ 1 ] ) ; } A = A . j o i n ( " \ n " ) ; } i f ( A ) { ( w i n d o w . e x e c S c r i p t ) ? w i n d o w . e x e c S c r i p t ( A ) : w i n d o w . s e t T i m e o u t ( A , 0 ) ; } } , g e t H e a d e r : f u n c t i o n ( A ) { t r y { r e t u r n   t h i s . t r a n s p o r t . g e t R e s p o n s e H e a d e r ( A ) ; 
 } c a t c h ( B ) { } r e t u r n   n u l l ; } } ) ; 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 ( B ) { v a r   C = [ ] ; f o r ( v a r   A   i n   B ) { C . p u s h ( e n c o d e U R I C o m p o n e n t ( A ) + " = " + e n c o d e U R I C o m p o n e n t ( B [ A ] ) ) ; } r e t u r n   C . 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 ( A ) { 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 " ) , $ m e r g e ( { d a t a : t h i s . t o Q u e r y S t r i n g ( ) } , A , { m e t h o d : " p o s t " } ) ) . r e q u e s t ( ) ; } } ) ; v a r   C o o k i e = n e w   A b s t r a c t ( { o p t i o n s : { d o m a i n : f a l s e , p a t h : f a l s e , d u r a t i o n : f a l s e , s e c u r e : f a l s e } , s e t : f u n c t i o n ( C , D , B ) { B = $ m e r g e ( t h i s . o p t i o n s , B ) ; 
 D = e n c o d e U R I C o m p o n e n t ( D ) ; i f ( B . d o m a i n ) { D + = " ;   d o m a i n = " + B . d o m a i n ; } i f ( B . p a t h ) { D + = " ;   p a t h = " + B . p a t h ; } i f ( B . d u r a t i o n ) { v a r   A = n e w   D a t e ( ) ; A . s e t T i m e ( A . g e t T i m e ( ) + B . d u r a t i o n * 2 4 * 6 0 * 6 0 * 1 0 0 0 ) ; 
 D + = " ;   e x p i r e s = " + A . t o G M T S t r i n g ( ) ; } i f ( B . s e c u r e ) { D + = " ;   s e c u r e " ; } d o c u m e n t . c o o k i e = C + " = " + D ; r e t u r n   $ e x t e n d ( B , { " k e y " : C , " v a l u e " : D } ) ; } , g e t : f u n c t i o n ( A ) { v a r   B = d o c u m e n t . c o o k i e . m a t c h ( " ( ? : ^ | ; ) \ \ s * " + A . e s c a p e R e g E x p ( ) + " = ( [ ^ ; ] * ) " ) ; 
 r e t u r n   B ? d e c o d e U R I C o m p o n e n t ( B [ 1 ] ) : f a l s e ; } , r e m o v e : f u n c t i o n ( B , A ) { i f ( $ t y p e ( B ) = = " o b j e c t " ) { t h i s . s e t ( B . k e y , " " , $ m e r g e ( B , { d u r a t i o n : - 1 } ) ) ; } e l s e { t h i s . s e t ( B , " " , $ m e r g e ( A , { d u r a t i o n : - 1 } ) ) ; 
 } } } ) ; v a r   J s o n = { t o S t r i n g : f u n c t i o n ( C ) { s w i t c h ( $ t y p e ( C ) ) { c a s e " s t r i n g " : r e t u r n ' " ' + C . r e p l a c e ( / ( [ " \ \ ] ) / g , " \ \ $ 1 " ) + ' " ' ; c a s e " a r r a y " : r e t u r n " [ " + C . m a p ( J s o n . t o S t r i n g ) . j o i n ( " , " ) + " ] " ; 
 c a s e " o b j e c t " : v a r   A = [ ] ; f o r ( v a r   B   i n   C ) { A . p u s h ( J s o n . t o S t r i n g ( B ) + " : " + J s o n . t o S t r i n g ( C [ B ] ) ) ; } r e t u r n " { " + A . j o i n ( " , " ) + " } " ; c a s e " n u m b e r " : i f ( i s F i n i t e ( C ) ) { b r e a k ; } c a s e   f a l s e : r e t u r n " n u l l " ; 
 } r e t u r n   S t r i n g ( C ) ; } , e v a l u a t e : f u n c t i o n ( s t r , s e c u r e ) { r e t u r n ( ( $ t y p e ( s t r ) ! = " s t r i n g " ) | | ( s e c u r e & & ! s t r . t e s t ( / ^ ( " ( \ \ . | [ ^ " \ \ \ n \ r ] ) * ? " | [ , : { } \ [ \ ] 0 - 9 . \ - + E a e f l n r - u   \ n \ r \ t ] ) + ? $ / ) ) ) ? n u l l : e v a l ( " ( " + s t r + " ) " ) ; 
 } } ; J s o n . R e m o t e = X H R . e x t e n d ( { i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . u r l = B ; t h i s . a d d E v e n t ( " o n S u c c e s s " , t h i s . o n C o m p l e t e ) ; t h i s . p a r e n t ( A ) ; t h i s . s e t H e a d e r ( " X - R e q u e s t " , " J S O N " ) ; 
 } , s e n d : f u n c t i o n ( A ) { r e t u r n   t h i s . p a r e n t ( t h i s . u r l , " j s o n = " + J s o n . t o S t r i n g ( A ) ) ; } , o n C o m p l e t e : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " o n C o m p l e t e " , [ J s o n . e v a l u a t e ( t h i s . r e s p o n s e . t e x t , t h i s . o p t i o n s . s e c u r e ) ] ) ; 
 } } ) ; v a r   A s s e t = n e w   A b s t r a c t ( { j a v a s c r i p t : f u n c t i o n ( C , B ) { B = $ m e r g e ( { " o n l o a d " : C l a s s . e m p t y } , B ) ; v a r   A = n e w   E l e m e n t ( " s c r i p t " , { " s r c " : C } ) . a d d E v e n t s ( { " l o a d " : B . o n l o a d , " 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 " ) { t h i s . f i r e E v e n t ( " l o a d " ) ; 
 } } } ) ; d e l e t e   B . o n l o a d ; r e t u r n   A . s e t P r o p e r t i e s ( B ) . i n j e c t ( d o c u m e n t . h e a d ) ; } , c s s : f u n c t i o n ( B , A ) { r e t u r n   n e w   E l e m e n t ( " l i n k " , $ m e r g e ( { " r e l " : " s t y l e s h e e t " , " m e d i a " : " s c r e e n " , " t y p e " : " t e x t / c s s " , " h r e f " : B } , A ) ) . i n j e c t ( d o c u m e n t . h e a d ) ; 
 } , i m a g e : f u n c t i o n ( C , B ) { B = $ m e r g e ( { " o n l o a d " : C l a s s . e m p t y , " o n a b o r t " : C l a s s . e m p t y , " o n e r r o r " : C l a s s . e m p t y } , B ) ; v a r   D = n e w   I m a g e ( ) ; D . s r c = C ; v a r   A = n e w   E l e m e n t ( " i m g " , { " s r c " : C } ) ; 
 [ " l o a d " , " a b o r t " , " e r r o r " ] . e a c h ( f u n c t i o n ( E ) { v a r   F = B [ " o n " + E ] ; d e l e t e   B [ " o n " + E ] ; A . a d d E v e n t ( E , f u n c t i o n ( ) { t h i s . r e m o v e E v e n t ( E , a r g u m e n t s . c a l l e e ) ; F . c a l l ( t h i s ) ; } ) ; 
 } ) ; i f ( D . w i d t h & & D . h e i g h t ) { A . f i r e E v e n t ( " l o a d " , A , 1 ) ; } r e t u r n   A . s e t P r o p e r t i e s ( B ) ; } , i m a g e s : f u n c t i o n ( D , C ) { C = $ m e r g e ( { o n C o m p l e t e : C l a s s . e m p t y , o n P r o g r e s s : C l a s s . e m p t y } , C ) ; 
 i f ( ! D . p u s h ) { D = [ D ] ; } v a r   A = [ ] ; v a r   B = 0 ; D . e a c h ( f u n c t i o n ( F ) { v a r   E = n e w   A s s e t . i m a g e ( F , { " o n l o a d " : f u n c t i o n ( ) { C . o n P r o g r e s s . c a l l ( t h i s , B ) ; B + + ; i f ( B = = D . l e n g t h ) { C . o n C o m p l e t e ( ) ; 
 } } } ) ; A . p u s h ( E ) ; } ) ; r e t u r n   n e w   E l e m e n t s ( A ) ; } } ) ; v a r   H a s h = n e w   C l a s s ( { l e n g t h : 0 , i n i t i a l i z e : f u n c t i o n ( A ) { t h i s . o b j = A | | { } ; t h i s . s e t L e n g t h ( ) ; } , g e t : f u n c t i o n ( A ) { r e t u r n ( t h i s . h a s K e y ( A ) ) ? t h i s . o b j [ A ] : n u l l ; 
 } , h a s K e y : f u n c t i o n ( A ) { r e t u r n ( A   i n   t h i s . o b j ) ; } , s e t : f u n c t i o n ( A , B ) { i f ( ! t h i s . h a s K e y ( A ) ) { t h i s . l e n g t h + + ; } t h i s . o b j [ A ] = B ; r e t u r n   t h i s ; } , s e t L e n g t h : f u n c t i o n ( ) { t h i s . l e n g t h = 0 ; 
 f o r ( v a r   A   i n   t h i s . o b j ) { t h i s . l e n g t h + + ; } r e t u r n   t h i s ; } , r e m o v e : f u n c t i o n ( A ) { i f ( t h i s . h a s K e y ( A ) ) { d e l e t e   t h i s . o b j [ A ] ; t h i s . l e n g t h - - ; } r e t u r n   t h i s ; } , e a c h : f u n c t i o n ( A , B ) { $ e a c h ( t h i s . o b j , A , B ) ; 
 } , e x t e n d : f u n c t i o n ( A ) { $ e x t e n d ( t h i s . o b j , A ) ; r e t u r n   t h i s . s e t L e n g t h ( ) ; } , m e r g e : f u n c t i o n ( ) { t h i s . o b j = $ m e r g e . a p p l y ( n u l l , [ t h i s . o b j ] . e x t e n d ( a r g u m e n t s ) ) ; r e t u r n   t h i s . s e t L e n g t h ( ) ; 
 } , e m p t y : f u n c t i o n ( ) { t h i s . o b j = { } ; t h i s . l e n g t h = 0 ; r e t u r n   t h i s ; } , k e y s : f u n c t i o n ( ) { v a r   A = [ ] ; f o r ( v a r   B   i n   t h i s . o b j ) { A . p u s h ( B ) ; } r e t u r n   A ; } , v a l u e s : f u n c t i o n ( ) { v a r   A = [ ] ; 
 f o r ( v a r   B   i n   t h i s . o b j ) { A . p u s h ( t h i s . o b j [ B ] ) ; } r e t u r n   A ; } } ) ; f u n c t i o n   $ H ( A ) { r e t u r n   n e w   H a s h ( A ) ; } H a s h . C o o k i e = H a s h . e x t e n d ( { i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . n a m e = B ; 
 t h i s . o p t i o n s = $ e x t e n d ( { " a u t o S a v e " : t r u e } , A | | { } ) ; t h i s . l o a d ( ) ; } , s a v e : f u n c t i o n ( ) { i f ( t h i s . l e n g t h = = 0 ) { C o o k i e . r e m o v e ( t h i s . n a m e , t h i s . o p t i o n s ) ; r e t u r n   t r u e ; } v a r   A = J s o n . t o S t r i n g ( t h i s . o b j ) ; 
 i f ( A . l e n g t h > 4 0 9 6 ) { r e t u r n   f a l s e ; } C o o k i e . s e t ( t h i s . n a m e , A , t h i s . o p t i o n s ) ; r e t u r n   t r u e ; } , l o a d : f u n c t i o n ( ) { t h i s . o b j = J s o n . e v a l u a t e ( C o o k i e . g e t ( t h i s . n a m e ) , t r u e ) | | { } ; 
 t h i s . s e t L e n g t h ( ) ; } } ) ; H a s h . C o o k i e . M e t h o d s = { } ; [ " e x t e n d " , " s e t " , " m e r g e " , " e m p t y " , " r e m o v e " ] . e a c h ( f u n c t i o n ( A ) { H a s h . C o o k i e . M e t h o d s [ A ] = f u n c t i o n ( ) { H a s h . p r o t o t y p e [ A ] . a p p l y ( t h i s , a r g u m e n t s ) ; 
 i f ( t h i s . o p t i o n s . a u t o S a v e ) { t h i s . s a v e ( ) ; } r e t u r n   t h i s ; } ; } ) ; H a s h . C o o k i e . i m p l e m e n t ( H a s h . C o o k i e . M e t h o d s ) ; v a r   C o l o r = 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 ( B , D ) { D = D | | ( B . p u s h ? " r g b " : " h e x " ) ; 
 v a r   C , A ; s w i t c h ( D ) { c a s e " r g b " : C = B ; A = C . r g b T o H s b ( ) ; b r e a k ; c a s e " h s b " : C = B . h s b T o R g b ( ) ; A = B ; b r e a k ; d e f a u l t : C = B . h e x T o R g b ( t r u e ) ; A = C . r g b T o H s b ( ) ; } C . h s b = A ; C . h e x = C . r g b T o H e x ( ) ; 
 r e t u r n   $ e x t e n d ( C , C o l o r . p r o t o t y p e ) ; } , m i x : f u n c t i o n ( ) { v a r   A = $ A ( a r g u m e n t s ) ; v a r   C = ( $ t y p e ( A [ A . l e n g t h - 1 ] ) = = " n u m b e r " ) ? A . p o p ( ) : 5 0 ; v a r   B = t h i s . c o p y ( ) ; A . e a c h ( f u n c t i o n ( D ) { D = n e w   C o l o r ( D ) ; 
 f o r ( v a r   E = 0 ; E < 3 ; E + + ) { B [ E ] = M a t h . r o u n d ( ( B [ E ] / 1 0 0 * ( 1 0 0 - C ) ) + ( D [ E ] / 1 0 0 * C ) ) ; } } ) ; r e t u r n   n e w   C o l o r ( B , " r g b " ) ; } , i n v e r t : f u n c t i o n ( ) { r e t u r n   n e w   C o l o r ( t h i s . m a p ( f u n c t i o n ( A ) { r e t u r n   2 5 5 - A ; 
 } ) ) ; } , s e t H u e : f u n c t i o n ( A ) { r e t u r n   n e w   C o l o r ( [ A , t h i s . h s b [ 1 ] , t h i s . h s b [ 2 ] ] , " h s b " ) ; } , s e t S a t u r a t i o n : f u n c t i o n ( A ) { r e t u r n   n e w   C o l o r ( [ t h i s . h s b [ 0 ] , A , t h i s . h s b [ 2 ] ] , " h s b " ) ; 
 } , s e t B r i g h t n e s s : f u n c t i o n ( A ) { r e t u r n   n e w   C o l o r ( [ t h i s . h s b [ 0 ] , t h i s . h s b [ 1 ] , A ] , " h s b " ) ; } } ) ; f u n c t i o n   $ R G B ( C , B , A ) { r e t u r n   n e w   C o l o r ( [ C , B , A ] , " r g b " ) ; } f u n c t i o n   $ H S B ( C , B , A ) { r e t u r n   n e w   C o l o r ( [ C , B , A ] , " h s b " ) ; 
 } A r r a y . e x t e n d ( { r g b T o H s b : f u n c t i o n ( ) { v a r   B = t h i s [ 0 ] , C = t h i s [ 1 ] , J = t h i s [ 2 ] ; v a r   G , F , H ; v a r   I = M a t h . m a x ( B , C , J ) , E = M a t h . m i n ( B , C , J ) ; v a r   K = I - E ; H = I / 2 5 5 ; F = ( I ! = 0 ) ? K / I : 0 ; 
 i f ( F = = 0 ) { G = 0 ; } e l s e { v a r   D = ( I - B ) / K ; v a r   A = ( I - C ) / K ; v a r   L = ( I - J ) / K ; i f ( B = = I ) { G = L - A ; } e l s e { i f ( C = = I ) { G = 2 + D - L ; } e l s e { G = 4 + A - D ; } } G / = 6 ; i f ( G < 0 ) { G + + ; } } r e t u r n [ M a t h . r o u n d ( G * 3 6 0 ) , M a t h . r o u n d ( F * 1 0 0 ) , M a t h . r o u n d ( H * 1 0 0 ) ] ; 
 } , h s b T o R g b : f u n c t i o n ( ) { v a r   C = M a t h . r o u n d ( t h i s [ 2 ] / 1 0 0 * 2 5 5 ) ; i f ( t h i s [ 1 ] = = 0 ) { r e t u r n [ C , C , C ] ; } e l s e { v a r   A = t h i s [ 0 ] % 3 6 0 ; v a r   E = A % 6 0 ; v a r   F = M a t h . r o u n d ( ( t h i s [ 2 ] * ( 1 0 0 - t h i s [ 1 ] ) ) / 1 0 0 0 0 * 2 5 5 ) ; 
 v a r   D = M a t h . r o u n d ( ( t h i s [ 2 ] * ( 6 0 0 0 - t h i s [ 1 ] * E ) ) / 6 0 0 0 0 0 * 2 5 5 ) ; v a r   B = M a t h . r o u n d ( ( t h i s [ 2 ] * ( 6 0 0 0 - t h i s [ 1 ] * ( 6 0 - E ) ) ) / 6 0 0 0 0 0 * 2 5 5 ) ; s w i t c h ( M a t h . f l o o r ( A / 6 0 ) ) { c a s e   0 : r e t u r n [ C , B , F ] ; 
 c a s e   1 : r e t u r n [ D , C , F ] ; c a s e   2 : r e t u r n [ F , C , B ] ; c a s e   3 : r e t u r n [ F , D , C ] ; c a s e   4 : r e t u r n [ B , F , C ] ; c a s e   5 : r e t u r n [ C , F , D ] ; } } r e t u r n   f a l s e ; } } ) ; v a r   S c r o l l e r = n e w   C l a s s ( { o p t i o n s : { a r e a : 2 0 , v e l o c i t y : 1 , o n C h a n g e : f u n c t i o n ( A , B ) { t h i s . e l e m e n t . s c r o l l T o ( A , B ) ; 
 } } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . s e t O p t i o n s ( A ) ; t h i s . e l e m e n t = $ ( B ) ; t h i s . m o u s e m o v e r = ( [ w i n d o w , d o c u m e n t ] . c o n t a i n s ( B ) ) ? $ ( d o c u m e n t . b o d y ) : t h i s . e l e m e n t ; } , s t a r t : f u n c t i o n ( ) { t h i s . c o o r d = t h i s . g e t C o o r d s . b i n d W i t h E v e n t ( t h i s ) ; 
 t h i s . m o u s e m o v e r . a d d L i s t e n e r ( " m o u s e m o v e " , t h i s . c o o r d ) ; } , s t o p : f u n c t i o n ( ) { t h i s . m o u s e m o v e r . r e m o v e L i s t e n e r ( " m o u s e m o v e " , t h i s . c o o r d ) ; t h i s . t i m e r = $ c l e a r ( t h i s . t i m e r ) ; 
 } , g e t C o o r d s : f u n c t i o n ( A ) { t h i s . p a g e = ( t h i s . e l e m e n t = = w i n d o w ) ? A . c l i e n t : A . p a g e ; i f ( ! t h i s . t i m e r ) { t h i s . t i m e r = t h i s . s c r o l l . p e r i o d i c a l ( 5 0 , t h i s ) ; } } , s c r o l l : f u n c t i o n ( ) { v a r   A = t h i s . e l e m e n t . g e t S i z e ( ) ; 
 v a r   D = t h i s . e l e m e n t . g e t P o s i t i o n ( ) ; v a r   C = { " x " : 0 , " y " : 0 } ; f o r ( v a r   B   i n   t h i s . p a g e ) { i f ( t h i s . p a g e [ B ] < ( t h i s . o p t i o n s . a r e a + D [ B ] ) & & A . s c r o l l [ B ] ! = 0 ) { C [ B ] = ( t h i s . p a g e [ B ] - t h i s . o p t i o n s . a r e a - D [ B ] ) * t h i s . o p t i o n s . v e l o c i t y ; 
 } e l s e { i f ( t h i s . p a g e [ B ] + t h i s . o p t i o n s . a r e a > ( A . s i z e [ B ] + D [ B ] ) & & A . s c r o l l [ B ] + A . s i z e [ B ] ! = A . s c r o l l S i z e [ B ] ) { C [ B ] = ( t h i s . p a g e [ B ] - A . s i z e [ B ] + t h i s . o p t i o n s . a r e a - D [ B ] ) * t h i s . o p t i o n s . v e l o c i t y ; 
 } } } i f ( C . y | | C . x ) { t h i s . f i r e E v e n t ( " o n C h a n g e " , [ A . s c r o l l . x + C . x , A . s c r o l l . y + C . y ] ) ; } } } ) ; S c r o l l e r . i m p l e m e n t ( n e w   E v e n t s , n e w   O p t i o n s ) ; v a r   S l i d e r = n e w   C l a s s ( { o p t i o n s : { o n C h a n g e : 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 T i c k : f u n c t i o n ( A ) { t h i s . k n o b . s e t S t y l e ( t h i s . p , A ) ; 
 } , m o d e : " h o r i z o n t a l " , s t e p s : 1 0 0 , o f f s e t : 0 } , i n i t i a l i z e : f u n c t i o n ( D , A , B ) { t h i s . e l e m e n t = $ ( D ) ; t h i s . k n o b = $ ( A ) ; t h i s . s e t O p t i o n s ( B ) ; t h i s . p r e v i o u s C h a n g e = - 1 ; t h i s . p r e v i o u s E n d = - 1 ; 
 t h i s . s t e p = - 1 ; t h i s . e l e m e n t . a d d E v e n t ( " m o u s e d o w n " , t h i s . c l i c k e d E l e m e n t . b i n d W i t h E v e n t ( t h i s ) ) ; v a r   C , F ; s w i t c h ( t h i s . o p t i o n s . m o d e ) { c a s e " h o r i z o n t a l " : t h i s . z = " x " ; t h i s . p = " l e f t " ; 
 C = { " x " : " l e f t " , " y " : f a l s e } ; F = " o f f s e t W i d t h " ; b r e a k ; c a s e " v e r t i c a l " : t h i s . z = " y " ; t h i s . p = " t o p " ; C = { " x " : f a l s e , " y " : " t o p " } ; F = " o f f s e t H e i g h t " ; } t h i s . m a x = t h i s . e l e m e n t [ F ] - t h i s . k n o b [ F ] + ( t h i s . o p t i o n s . o f f s e t * 2 ) ; 
 t h i s . h a l f = t h i s . k n o b [ F ] / 2 ; t h i s . g e t P o s = t h i s . e l e m e n t [ " g e t " + t h i s . p . c a p i t a l i z e ( ) ] . b i n d ( t h i s . e l e m e n t ) ; t h i s . k n o b . s e t S t y l e ( " p o s i t i o n " , " r e l a t i v e " ) . s e t S t y l e ( t h i s . p , - t h i s . o p t i o n s . o f f s e t ) ; 
 v a r   E = { } ; E [ t h i s . z ] = [ - t h i s . o p t i o n s . o f f s e t , t h i s . m a x - t h i s . o p t i o n s . o f f s e t ] ; t h i s . d r a g = n e w   D r a g . B a s e ( t h i s . k n o b , { l i m i t : E , m o d i f i e r s : C , s n a p : 0 , o n S t a r t : f u n c t i o n ( ) { t h i s . d r a g g e d K n o b ( ) ; 
 } . b i n d ( t h i s ) , o n D r a g : f u n c t i o n ( ) { t h i s . d r a g g e d K n o b ( ) ; } . 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 . d r a g g e d K n o b ( ) ; t h i s . e n d ( ) ; } . b i n d ( t h i s ) } ) ; i f ( t h i s . o p t i o n s . i n i t i a l i z e ) { t h i s . o p t i o n s . i n i t i a l i z e . c a l l ( t h i s ) ; 
 } } , s e t : f u n c t i o n ( A ) { t h i s . s t e p = A . l i m i t ( 0 , t h i s . o p t i o n s . s t e p s ) ; t h i s . c h e c k S t e p ( ) ; t h i s . e n d ( ) ; t h i s . f i r e E v e n t ( " o n T i c k " , t h i s . t o P o s i t i o n ( t h i s . s t e p ) ) ; r e t u r n   t h i s ; 
 } , c l i c k e d E l e m e n t : f u n c t i o n ( B ) { v a r   A = B . p a g e [ t h i s . z ] - t h i s . g e t P o s ( ) - t h i s . h a l f ; A = A . l i m i t ( - t h i s . o p t i o n s . o f f s e t , t h i s . m a x - t h i s . o p t i o n s . o f f s e t ) ; t h i s . s t e p = t h i s . t o S t e p ( A ) ; 
 t h i s . c h e c k S t e p ( ) ; t h i s . e n d ( ) ; t h i s . f i r e E v e n t ( " o n T i c k " , A ) ; } , d r a g g e d K n o b : f u n c t i o n ( ) { t h i s . s t e p = t h i s . t o S t e p ( t h i s . d r a g . v a l u e . n o w [ t h i s . z ] ) ; t h i s . c h e c k S t e p ( ) ; } , c h e c k S t e p : f u n c t i o n ( ) { i f ( t h i s . p r e v i o u s C h a n g e ! = t h i s . s t e p ) { t h i s . p r e v i o u s C h a n g e = t h i s . s t e p ; 
 t h i s . f i r e E v e n t ( " o n C h a n g e " , t h i s . s t e p ) ; } } , e n d : f u n c t i o n ( ) { i f ( t h i s . p r e v i o u s E n d ! = = t h i s . s t e p ) { t h i s . p r e v i o u s E n d = t h i s . s t e p ; t h i s . f i r e E v e n t ( " o n C o m p l e t e " , t h i s . s t e p + " " ) ; 
 } } , t o S t e p : f u n c t i o n ( A ) { r e t u r n   M a t h . r o u n d ( ( A + t h i s . o p t i o n s . o f f s e t ) / t h i s . m a x * t h i s . o p t i o n s . s t e p s ) ; } , t o P o s i t i o n : f u n c t i o n ( A ) { r e t u r n   t h i s . m a x * A / t h i s . o p t i o n s . s t e p s ; 
 } } ) ; S l i d e r . i m p l e m e n t ( n e w   E v e n t s ) ; S l i d e r . i m p l e m e n t ( n e w   O p t i o n s ) ; v a r   S m o o t h S c r o l l = F x . S c r o l l . e x t e n d ( { i n i t i a l i z e : f u n c t i o n ( B ) { t h i s . p a r e n t ( w i n d o w , B ) ; t h i s . l i n k s = ( t h i s . o p t i o n s . l i n k s ) ? $ $ ( t h i s . o p t i o n s . l i n k s ) : $ $ ( d o c u m e n t . l i n k s ) ; 
 v a r   A = w i n d o w . l o c a t i o n . h r e f . m a t c h ( / ^ [ ^ # ] * / ) [ 0 ] + " # " ; t h i s . l i n k s . e a c h ( f u n c t i o n ( D ) { i f ( D . h r e f . i n d e x O f ( A ) ! = 0 ) { r e t u r n   ; } v a r   C = D . h r e f . s u b s t r ( A . l e n g t h ) ; i f ( C & & $ ( C ) ) { t h i s . u s e L i n k ( D , C ) ; 
 } } , t h i s ) ; i f ( ! w i n d o w . w e b k i t 4 1 9 ) { t h i s . a d d E v e n t ( " o n C o m p l e t e " , f u n c t i o n ( ) { w i n d o w . l o c a t i o n . h a s h = t h i s . a n c h o r ; } ) ; } } , u s e L i n k : f u n c t i o n ( B , A ) { B . a d d E v e n t ( " c l i c k " , f u n c t i o n ( C ) { t h i s . a n c h o r = A ; 
 t h i s . t o E l e m e n t ( A ) ; C . s t o p ( ) ; } . b i n d W i t h E v e n t ( t h i s ) ) ; } } ) ; v a r   S o r t a b l e s = n e w   C l a s s ( { o p t i o n s : { h a n d l e s : f a l s e , 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 , g h o s t : t r u e , s n a p : 3 , o n D r a g S t a r t : f u n c t i o n ( A , B ) { B . s e t S t y l e ( " o p a c i t y " , 0 . 7 ) ; 
 A . s e t S t y l e ( " o p a c i t y " , 0 . 7 ) ; } , o n D r a g C o m p l e t e : f u n c t i o n ( A , B ) { A . s e t S t y l e ( " o p a c i t y " , 1 ) ; B . r e m o v e ( ) ; t h i s . t r a s h . r e m o v e ( ) ; } } , i n i t i a l i z e : f u n c t i o n ( D , B ) { t h i s . s e t O p t i o n s ( B ) ; 
 t h i s . l i s t = $ ( D ) ; t h i s . e l e m e n t s = t h i s . l i s t . g e t C h i l d r e n ( ) ; t h i 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 ) ? $ $ ( t h i s . o p t i o n s . h a n d l e s ) : t h i s . e l e m e n t s ; t h i s . b o u n d = { " s t a r t " : [ ] , " m o v e G h o s t " : t h i s . m o v e G h o s t . b i n d W i t h E v e n t ( t h i s ) } ; 
 f o r ( v a r   C = 0 , A = t h i s . h a n d l e s . l e n g t h ; C < A ; C + + ) { t h i s . b o u n d . s t a r t [ C ] = t h i s . s t a r t . b i n d W i t h E v e n t ( t h i s , t h i s . e l e m e n t s [ C ] ) ; } t h i s . a t t a c h ( ) ; i f ( t h i s . o p t i o n s . i n i t i a l i z e ) { t h i s . o p t i o n s . i n i t i a l i z e . c a l l ( t h i s ) ; 
 } t h i s . b o u n d . m o v e = t h i s . m o v e . b i n d W i t h E v e n t ( t h i s ) ; t h i s . b o u n d . e n d = t h i s . e n d . b i n d ( t h i s ) ; } , a t t a c h : f u n c t i o n ( ) { t h i s . h a n d l e s . e a c h ( f u n c t i o n ( B , A ) { B . a d d E v e n t ( " m o u s e d o w n " , t h i s . b o u n d . s t a r t [ A ] ) ; 
 } , t h i s ) ; } , d e t a c h : f u n c t i o n ( ) { t h i s . h a n d l e s . e a c h ( f u n c t i o n ( B , A ) { B . r e m o v e E v e n t ( " m o u s e d o w n " , t h i s . b o u n d . s t a r t [ A ] ) ; } , t h i s ) ; } , s t a r t : f u n c t i o n ( C , B ) { t h i s . a c t i v e = B ; 
 t h i s . c o o r d i n a t e s = t h i s . l i s t . g e t C o o r d i n a t e s ( ) ; i f ( t h i s . o p t i o n s . g h o s t ) { v a r   A = B . g e t P o s i t i o n ( ) ; t h i s . o f f s e t = C . p a g e . y - A . y ; t h i s . t r a s h = n e w   E l e m e n t ( " d i v " ) . i n j e c t ( d o c u m e n t . b o d y ) ; 
 t h i s . g h o s t = B . c l o n e ( ) . i n j e c t ( t h i s . t r a s h ) . 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 " , " l e f t " : A . x , " t o p " : C . p a g e . y - t h i s . o f f s e t } ) ; d o c u m e n t . a d d L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . m o v e G h o s t ) ; 
 t h i s . f i r e E v e n t ( " o n D r a g S t a r t " , [ B , t h i s . g h o s t ] ) ; } d o c u m e n t . a d d L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . m o v e ) ; d o c u m e n t . a d d L i s t e n e r ( " m o u s e u p " , t h i s . b o u n d . e n d ) ; t h i s . f i r e E v e n t ( " o n S t a r t " , B ) ; 
 C . s t o p ( ) ; } , m o v e G h o s t : f u n c t i o n ( A ) { v a r   B = A . p a g e . y - t h i s . o f f s e t ; B = B . l i m i t ( t h i s . c o o r d i n a t e s . t o p , t h i s . c o o r d i n a t e s . b o t t o m - t h i s . g h o s t . o f f s e t H e i g h t ) ; t h i s . g h o s t . s e t S t y l e ( " t o p " , B ) ; 
 A . s t o p ( ) ; } , m o v e : f u n c t i o n ( E ) { v a r   B = E . p a g e . y ; t h i s . p r e v i o u s = t h i s . p r e v i o u s | | B ; v a r   A = ( ( t h i s . p r e v i o u s - B ) > 0 ) ; v a r   D = t h i s . a c t i v e . g e t P r e v i o u s ( ) ; v a r   C = t h i s . a c t i v e . g e t N e x t ( ) ; 
 i f ( D & & A & & B < D . g e t C o o r d i n a t e s ( ) . b o t t o m ) { t h i s . a c t i v e . i n j e c t B e f o r e ( D ) ; } i f ( C & & ! A & & B > C . g e t C o o r d i n a t e s ( ) . t o p ) { t h i s . a c t i v e . i n j e c t A f t e r ( C ) ; } t h i s . p r e v i o u s = B ; } , s e r i a l i z e : f u n c t i o n ( A ) { r e t u r n   t h i s . l i s t . g e t C h i l d r e n ( ) . m a p ( A | | f u n c t i o n ( B ) { r e t u r n   t h i s . e l e m e n t s . i n d e x O f ( B ) ; 
 } , t h i s ) ; } , e n d : f u n c t i o n ( ) { t h i s . p r e v i o u s = n u l l ; d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . m o v e ) ; d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e u p " , t h i s . b o u n d . e n d ) ; i f ( t h i s . o p t i o n s . g h o s t ) { d o c u m e n t . r e m o v e L i s t e n e r ( " m o u s e m o v e " , t h i s . b o u n d . m o v e G h o s t ) ; 
 t h i s . f i r e E v e n t ( " o n D r a g C o m p l e t e " , [ t h i s . a c t i v e , t h i s . g h o s t ] ) ; } t h i s . f i r e E v e n t ( " o n C o m p l e t e " , t h i s . a c t i v e ) ; } } ) ; S o r t a b l e s . i m p l e m e n t ( n e w   E v e n t s , n e w   O p t i o n s ) ; v a r   T i p s = n e w   C l a s s ( { o p t i o n s : { o n S h o w : f u n c t i o n ( A ) { A . s e t S t y l e ( " v i s i b i l i t y " , " v i s i b l e " ) ; 
 } , o n H i d e : f u n c t i o n ( A ) { A . s e t S t y l e ( " v i s i b i l i t y " , " h i d d e n " ) ; } , m a x T i t l e C h a r s : 3 0 , s h o w D e l a y : 1 0 0 , h i d e D e l a y : 1 0 0 , c l a s s N a m e : " t o o l " , o f f s e t s : { " x " : 1 6 , " y " : 1 6 } , f i x e d : f a l s e } , i n i t i a l i z e : f u n c t i o n ( B , A ) { t h i s . s e t O p t i o n s ( A ) ; 
 t h i s . t o o l T i p = n e w   E l e m e n t ( " d i v " , { " c l a s s " : t h i s . o p t i o n s . c l a s s N a m e + " - t i p " , " s t y l e s " : { " p o s i t i o n " : " a b s o l u t e " , " t o p " : " 0 " , " l e f t " : " 0 " , " v i s i b i l i t y " : " h i d d e n " } } ) . i n j e c t ( d o c u m e n t . b o d y ) ; 
 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 ( t h i s . t o o l T i p ) ; $ $ ( B ) . e a c h ( t h i s . b u i l d , t h i s ) ; i f ( t h i s . o p t i o n s . i n i t i a l i z e ) { t h i s . o p t i o n s . i n i t i a l i z e . c a l l ( t h i s ) ; } } , b u i l d : f u n c t i o n ( B ) { B . $ t m p . m y T i t l e = ( B . h r e f & & B . g e t T a g ( ) = = " a " ) ? B . h r e f . r e p l a c e ( " h t t p : / / " , " " ) : ( B . r e l | | f a l s e ) ; 
 i f ( B . t i t l e ) { v a r   C = B . t i t l e . s p l i t ( " : : " ) ; i f ( C . l e n g t h > 1 ) { B . $ t m p . m y T i t l e = C [ 0 ] . t r i m ( ) ; B . $ t m p . m y T e x t = C [ 1 ] . t r i m ( ) ; } e l s e { B . $ t m p . m y T e x t = B . t i t l e ; } B . r e m o v e A t t r i b u t e ( " t i t l e " ) ; 
 } e l s e { B . $ t m p . m y T e x t = f a l s e ; } i f ( B . $ t m p . m y T i t l e & & B . $ t m p . m y T i t l e . 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 ) { B . $ t m p . m y T i t l e = B . $ t m p . m y T i t l e . 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 - 1 ) + " & h e l l i p ; " ; 
 } B . a d d E v e n t ( " m o u s e e n t e r " , f u n c t i o n ( D ) { t h i s . s t a r t ( B ) ; i f ( ! t h i s . o p t i o n s . f i x e d ) { t h i s . l o c a t e ( D ) ; } e l s e { t h i s . p o s i t i o n ( B ) ; } } . b i n d ( t h i s ) ) ; i f ( ! t h i s . o p t i o n s . f i x e d ) { B . a d d E v e n t ( " m o u s e m o v e " , t h i s . l o c a t e . b i n d W i t h E v e n t ( t h i s ) ) ; 
 } v a r   A = t h i s . e n d . b i n d ( t h i s ) ; B . a d d E v e n t ( " m o u s e l e a v e " , A ) ; B . a d d E v e n t ( " t r a s h " , A ) ; } , s t a r t : f u n c t i o n ( A ) { t h i s . w r a p p e r . e m p t y ( ) ; i f ( A . $ t m p . m y T i t l e ) { t h i s . t i t l e = n e w   E l e m e n t ( " s p a n " ) . i n j e c t ( n e w   E l e m e n t ( " d i v " , { " c l a s s " : t h i s . o p t i o n s . c l a s s N a m e + " - t i t l e " } ) . i n j e c t ( t h i s . w r a p p e r ) ) . s e t H T M L ( A . $ t m p . m y T i t l e ) ; 
 } i f ( A . $ t m p . m y T e x t ) { t h i s . t e x t = n e w   E l e m e n t ( " s p a n " ) . i n j e c t ( n e w   E l e m e n t ( " d i v " , { " c l a s s " : t h i s . o p t i o n s . c l a s s N a m e + " - t e x t " } ) . i n j e c t ( t h i s . w r a p p e r ) ) . s e t H T M L ( A . $ t m p . m y T e x t ) ; 
 } $ c l e a r ( t h i s . t i m e r ) ; t h i s . t i m e r = t h i s . s h o w . d e l a y ( t h i s . o p t i o n s . s h o w D e l a y , t h i s ) ; } , e n d : f u n c t i o n ( A ) { $ c l e a r ( t h i s . t i m e r ) ; t h i s . t i m e r = t h i s . h i d e . d e l a y ( t h i s . o p t i o n s . h i d e D e l a y , t h i s ) ; 
 } , p o s i t i o n : f u n c t i o n ( A ) { v a r   B = A . g e t P o s i t i o n ( ) ; t h i s . t o o l T i p . s e t S t y l e s ( { " l e f t " : B . x + t h i s . o p t i o n s . o f f s e t s . x , " t o p " : B . y + t h i s . o p t i o n s . o f f s e t s . y } ) ; } , l o c a t e : f u n c t i o n ( B ) { v a r   D = { " x " : w i n d o w . g e t W i d t h ( ) , " y " : w i n d o w . g e t H e i g h t ( ) } ; 
 v a r   A = { " x " : w i n d o w . g e t S c r o l l L e f t ( ) , " y " : w i n d o w . g e t S c r o l l T o p ( ) } ; v a r   C = { " x " : t h i s . t o o l T i p . o f f s e t W i d t h , " y " : t h i s . t o o l T i p . o f f s e t H e i g h t } ; v a r   G = { " x " : " l e f t " , " y " : " t o p " } ; 
 f o r ( v a r   E   i n   G ) { v a r   F = B . p a g e [ E ] + t h i s . o p t i o n s . o f f s e t s [ E ] ; i f ( ( F + C [ E ] - A [ E ] ) > D [ E ] ) { F = B . p a g e [ E ] - t h i s . o p t i o n s . o f f s e t s [ E ] - C [ E ] ; } t h i s . t o o l T i p . s e t S t y l e ( G [ E ] , F ) ; 
 } } , s h o w : f u n c t i o n ( ) { i f ( t h i s . o p t i o n s . t i m e o u t ) { t h i s . t i m e r = t h i s . h i d e . 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 ) ; } t h i s . f i r e E v e n t ( " o n S h o w " , [ t h i s . t o o l T i p ] ) ; } , h i d e : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " o n H i d e " , [ t h i s . t o o l T i p ] ) ; 
 } } ) ; T i p s . i m p l e m e n t ( n e w   E v e n t s , n e w   O p t i o n s ) ; v a r   G r o u p = 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 ( ) { t h i s . i n s t a n c e s = $ A ( a r g u m e n t s ) ; t h i s . e v e n t s = { } ; t h i s . c h e c k e r = { } ; } , a d d E v e n t : f u n c t i o n ( B , A ) { t h i s . c h e c k e r [ B ] = t h i s . c h e c k e r [ B ] | | { } ; 
 t h i s . e v e n t s [ B ] = t h i s . e v e n t s [ B ] | | [ ] ; i f ( t h i s . e v e n t s [ B ] . c o n t a i n s ( A ) ) { r e t u r n   f a l s e ; } e l s e { t h i s . e v e n t s [ B ] . p u s h ( A ) ; } t h i s . i n s t a n c e s . e a c h ( f u n c t i o n ( C , D ) { C . a d d E v e n t ( B , t h i s . c h e c k . b i n d ( t h i s , [ B , C , D ] ) ) ; 
 } , t h i s ) ; r e t u r n   t h i s ; } , c h e c k : f u n c t i o n ( C , A , B ) { t h i s . c h e c k e r [ C ] [ B ] = t r u e ; v a r   D = t h i s . i n s t a n c e s . e v e r y ( f u n c t i o n ( F , E ) { r e t u r n   t h i s . c h e c k e r [ C ] [ E ] | | f a l s e ; } , t h i s ) ; i f ( ! D ) { r e t u r n   ; 
 } t h i s . c h e c k e r [ C ] = { } ; t h i s . e v e n t s [ C ] . e a c h ( f u n c t i o n ( E ) { E . c a l l ( t h i s , t h i s . i n s t a n c e s , A ) ; } , t h i s ) ; } } ) ; v a r   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 ( { o p t i o n s : { 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 , d i s p l a y : 0 , s h o w : f a l s e , h e i g h t : t r u e , w i d t h : f a l s e , o p a c i t y : t r u 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 , w a i t : f a l s e , a l w a y s H i d e : f a l s e } , i n i t i a l i z e : f u n c t i o n ( ) { v a r   C , E , F , B ; 
 $ e a c h ( a r g u m e n t s , f u n c t i o n ( I , H ) { s w i t c h ( $ t y p e ( I ) ) { c a s e " o b j e c t " : C = I ; b r e a k ; c a s e " e l e m e n t " : B = $ ( I ) ; b r e a k ; d e f a u l t : v a r   G = $ $ ( I ) ; i f ( ! E ) { E = G ; } e l s e { F = G ; } } } ) ; t h i s . t o g g l e r s = E | | [ ] ; 
 t h i s . e l e m e n t s = F | | [ ] ; t h i s . c o n t a i n e r = $ ( B ) ; t h i s . s e t O p t i o n s ( C ) ; t h i s . p r e v i o u s = - 1 ; i f ( 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 . o p t i o n s . w a i t = t r u e ; } i f ( $ c h k ( t h i s . o p t i o n s . s h o w ) ) { t h i s . o p t i o n s . d i s p l a y = f a l s e ; 
 t h i s . p r e v i o u s = t h i s . o p t i o n s . s h o w ; } i f ( t h i s . o p t i o n s . s t a r t ) { t h i s . o p t i o n s . d i s p l a y = f a l s e ; t h i s . o p t i o n s . s h o w = f a l s e ; } t h i s . e f f e c t s = { } ; i f ( t h i s . o p t i o n s . o p a c i t y ) { t h i s . e f f e c t s . o p a c i t y = " f u l l O p a c i t y " ; 
 } i f ( t h i s . o p t i o n s . w i d t h ) { t h i s . e f f e c t s . 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 ? " f u l l W i d t h " : " o f f s e t W i d t h " ; } i f ( t h i s . o p t i o n s . h e i g h t ) { t h i s . e f f e c t s . 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 ? " f u l l H e i g h t " : " s c r o l l H e i g h t " ; 
 } f o r ( v a r   D = 0 , A = t h i s . t o g g l e r s . l e n g t h ; D < A ; D + + ) { t h i s . a d d S e c t i o n ( t h i s . t o g g l e r s [ D ] , t h i s . e l e m e n t s [ D ] ) ; } t h i s . e l e m e n t s . e a c h ( f u n c t i o n ( H , G ) { i f ( t h i s . o p t i o n s . s h o w = = = G ) { t h i s . f i r e E v e n t ( " o n A c t i v e " , [ t h i s . t o g g l e r s [ G ] , H ] ) ; 
 } e l s e { f o r ( v a r   I   i n   t h i s . e f f e c t s ) { H . s e t S t y l e ( I , 0 ) ; } } } , t h i s ) ; t h i s . p a r e n t ( t h i s . e l e m e n t s ) ; i f ( $ c h k ( t h i s . o p t i o n s . d i s p l a y ) ) { t h i s . d i s p l a y ( t h i s . o p t i o n s . d i s p l a y ) ; 
 } } , a d d S e c t i o n : f u n c t i o n ( E , C , G ) { E = $ ( E ) ; C = $ ( C ) ; v a r   F = t h i s . t o g g l e r s . c o n t a i n s ( E ) ; v a r   B = t h i s . t o g g l e r s . l e n g t h ; t h i s . t o g g l e r s . i n c l u d e ( E ) ; t h i s . e l e m e n t s . i n c l u d e ( C ) ; 
 i f ( B & & ( ! F | | G ) ) { G = $ p i c k ( G , B - 1 ) ; E . i n j e c t B e f o r e ( t h i s . t o g g l e r s [ G ] ) ; C . i n j e c t A f t e r ( E ) ; } e l s e { i f ( t h i s . c o n t a i n e r & & ! F ) { E . i n j e c t ( t h i s . c o n t a i n e r ) ; C . i n j e c t ( t h i s . c o n t a i n e r ) ; 
 } } v a r   A = t h i s . t o g g l e r s . i n d e x O f ( E ) ; E . a d d E v e n t ( " c l i c k " , t h i s . d i s p l a y . b i n d ( t h i s , A ) ) ; i f ( t h i s . o p t i o n s . h e i g h t ) { C . s e t S t y l e s ( { " p a d d i n g - t o p " : 0 , " b o r d e r - t o p " : " n o n e " , " p a d d i n g - b o t t o m " : 0 , " b o r d e r - b o t t o m " : " n o n e " } ) ; 
 } i f ( t h i s . o p t i o n s . w i d t h ) { C . s e t S t y l e s ( { " p a d d i n g - l e f t " : 0 , " b o r d e r - l e f t " : " n o n e " , " p a d d i n g - r i g h t " : 0 , " b o r d e r - r i g h t " : " n o n e " } ) ; } C . f u l l O p a c i t y = 1 ; i f ( t h i s . o p t i o n s . f i x e d W i d t h ) { C . f u l l 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 ; 
 } i f ( t h i s . o p t i o n s . f i x e d H e i g h t ) { C . f u l l 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 ; } C . s e t S t y l e ( " o v e r f l o w " , " h i d d e n " ) ; i f ( ! F ) { f o r ( v a r   D   i n   t h i s . e f f e c t s ) { C . s e t S t y l e ( D , 0 ) ; 
 } } r e t u r n   t h i s ; } , d i s p l a y : f u n c t i o n ( A ) { A = ( $ t y p e ( A ) = = " e l e m e n t " ) ? t h i s . e l e m e n t s . i n d e x O f ( A ) : A ; 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 ) | | ( A = = = t h i s . p r e v i o u s & & ! t h i s . o p t i o n s . a l w a y s H i d e ) ) { r e t u r n   t h i s ; 
 } t h i s . p r e v i o u s = A ; v a r   B = { } ; 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 , D ) { B [ D ] = { } ; v a r   C = ( D ! = A ) | | ( t h i s . o p t i o n s . a l w a y s H i d e & & ( E . o f f s e t H e i g h t > 0 ) ) ; t h i s . f i r e E v e n t ( C ? " o n B a c k g r o u n d " : " o n A c t i v e " , [ t h i s . t o g g l e r s [ D ] , E ] ) ; 
 f o r ( v a r   F   i n   t h i s . e f f e c t s ) { B [ D ] [ F ] = C ? 0 : E [ t h i s . e f f e c t s [ F ] ] ; } } , t h i s ) ; r e t u r n   t h i s . s t a r t ( B ) ; } , s h o w T h i s H i d e O p e n : f u n c t i o n ( A ) { r e t u r n   t h i s . d i s p l a y ( A ) ; } } ) ; F x . A c c o r d i o n = A c c o r d i o n ; 
 
