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