ÿþ/ /   l i g h t w i n d o w . j s   v 2 . 0  
 / /  
 / /   C o p y r i g h t   ( c )   2 0 0 7   s t i c k m a n l a b s  
 / /   A u t h o r :   K e v i n   P   M i l l e r   |   h t t p : / / w w w . s t i c k m a n l a b s . c o m  
 / /    
 / /   L i g h t W i n d o w   i s   f r e e l y   d i s t r i b u t a b l e   u n d e r   t h e   t e r m s   o f   a n   M I T - s t y l e   l i c e n s e .  
 / /  
 / /   I   d o n ' t   c a r e   w h a t   y o u   t h i n k   a b o u t   t h e   f i l e   s i z e . . .  
 / /       B e   a   p r o :    
 / / 	         h t t p : / / w w w . t h i n k v i t a m i n . c o m / f e a t u r e s / w e b a p p s / s e r v i n g - j a v a s c r i p t - f a s t  
 / /             h t t p : / / r a k a z . n l / i t e m / m a k e _ y o u r _ p a g e s _ l o a d _ f a s t e r _ b y _ c o m b i n i n g _ a n d _ c o m p r e s s i n g _ j a v a s c r i p t _ a n d _ c s s _ f i l e s  
 / /  
  
 / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * /  
  
 i f ( t y p e o f   E f f e c t   = =   ' u n d e f i n e d ' )  
     t h r o w ( " l i g h t w i n d o w . j s   r e q u i r e s   i n c l u d i n g   s c r i p t . a c u l o . u s '   e f f e c t s . j s   l i b r a r y ! " ) ;  
  
 / /   T h i s   w i l l   s t o p   i m a g e   f l i c k e r i n g   i n   I E 6   w h e n   e l e m e n t s   w i t h   i m a g e s   a r e   m o v e d  
 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   l i g h t w i n d o w   =   C l a s s . c r e a t e ( ) ; 	  
 l i g h t w i n d o w . p r o t o t y p e   =   {  
 	 / /  
 	 / / 	 S e t u p   V a r i a b l e s  
 	 / /  
 	 e l e m e n t   :   n u l l ,  
 	 c o n t e n t T o F e t c h   :   n u l l ,  
 	 w i n d o w A c t i v e   :   f a l s e ,  
 	 d a t a E f f e c t s   :   [ ] ,  
 	 d i m e n s i o n s   :   {  
 	 	 c r u f t   :   n u l l ,  
 	 	 c o n t a i n e r   :   n u l l ,  
 	 	 v i e w p o r t   :   {  
 	 	 	 h e i g h t   :   n u l l ,  
 	 	 	 w i d t h   :   n u l l ,  
 	 	 	 o f f s e t T o p   :   n u l l ,  
 	 	 	 o f f s e t L e f t   :   n u l l  
 	 	 }  
 	 } ,  
 	 p a g e P o s i t i o n   :   {  
 	 	 x   :   0 ,  
 	 	 y   :   0  
 	 } ,  
 	 p a g e D i m e n s i o n s   :   {  
 	 	 w i d t h   :   n u l l ,  
 	 	 h e i g h t   :   n u l l  
 	 } ,  
 	 p r e l o a d I m a g e   :   [ ] ,  
 	 p r e l o a d e d I m a g e   :   [ ] ,  
 	 g a l l e r i e s   :   [ ] ,  
 	 r e s i z e T o   :   {  
 	 	 h e i g h t   :   n u l l ,  
 	 	 h e i g h t P e r c e n t   :   n u l l ,  
 	 	 w i d t h   :   n u l l ,  
 	 	 w i d t h P e r c e n t   :   n u l l ,  
 	 	 f i x e d T o p   :   n u l l ,  
 	 	 f i x e d L e f t   :   n u l l  
 	 } ,  
 	 s c r o l l b a r O f f s e t   :   1 8 ,  
 	 n a v i g a t i o n O b s e r v e r s   :   {  
 	 	 p r e v i o u s   :   n u l l ,  
 	 	 n e x t   :   n u l l  
 	 } ,  
 	 c o n t a i n e r C h a n g e   :   {  
 	 	 h e i g h t   :   0 ,  
 	 	 w i d t h   :   0  
 	 } ,  
 	 a c t i v e G a l l e r y   :   f a l s e ,  
 	 g a l l e r y L o c a t i o n   :   {  
 	 	 c u r r e n t   :   0 ,  
 	 	 t o t a l   :   0  
 	 } ,  
 	 / /  
 	 / / 	 I n i t i a l i z e   t h e   l i g h t w i n d o w .  
 	 / /  
 	 i n i t i a l i z e   :   f u n c t i o n ( o p t i o n s )   {  
 	 	 t h i s . o p t i o n s   =   O b j e c t . e x t e n d ( {  
 	 	 	 r e s i z e S p e e d   :   8 ,  
 	 	 	 c o n t e n t O f f s e t   :   {  
 	 	 	 	 h e i g h t   :   2 0 ,  
 	 	 	 	 w i d t h   :   2 0  
 	 	 	 } ,  
 	 	 	 d i m e n s i o n s   :   {  
 	 	 	 	 i m a g e   :   { h e i g h t   :   2 5 0 ,   w i d t h   :   2 5 0 } ,  
 	 	 	 	 p a g e   :   { h e i g h t   :   2 5 0 ,   w i d t h   :   2 5 0 } ,  
 	 	 	 	 i n l i n e   :   { h e i g h t   :   2 5 0 ,   w i d t h   :   2 5 0 } ,  
 	 	 	 	 m e d i a   :   { h e i g h t   :   2 5 0 ,   w i d t h   :   2 5 0 } ,  
 	 	 	 	 e x t e r n a l   :   { h e i g h t   :   2 5 0 ,   w i d t h   :   2 5 0 } ,  
 	 	 	 	 t i t l e H e i g h t   :   2 5  
 	 	 	 } ,  
 	 	 	 c l a s s N a m e s   :   { 	  
 	 	 	 	 s t a n d a r d   :   ' l i g h t w i n d o w ' ,  
 	 	 	 	 a c t i o n   :   ' l i g h t w i n d o w _ a c t i o n '  
 	 	 	 } ,  
 	 	 	 f i l e T y p e s   :   {  
 	 	 	 	 p a g e   :   [ ' a s p ' ,   ' a s p x ' ,   ' c g i ' ,   ' c f m ' ,   ' h t m ' ,   ' h t m l ' ,   ' p l ' ,   ' p h p 4 ' ,   ' p h p 3 ' ,   ' p h p ' ,   ' p h p 5 ' ,   ' p h t m l ' ,   ' r h t m l ' ,   ' s h t m l ' ,   ' t x t ' ,   ' v b s ' ,   ' r b ' ] ,  
 	 	 	 	 m e d i a   :   [ ' a i f ' ,   ' a i f f ' ,   ' a s f ' ,   ' a v i ' ,   ' d i v x ' ,   ' m 1 v ' ,   ' m 2 a ' ,   ' m 2 v ' ,   ' m 3 u ' ,   ' m i d ' ,   ' m i d i ' ,   ' m o v ' ,   ' m o o v ' ,   ' m o v i e ' ,   ' m p 2 ' ,   ' m p 3 ' ,   ' m p a ' ,   ' m p a ' ,   ' m p e ' ,   ' m p e g ' ,   ' m p g ' ,   ' m p g ' ,   ' m p g a ' ,   ' p p s ' ,   ' q t ' ,   ' r m ' ,   ' r a m ' ,   ' s w f ' ,   ' v i v ' ,   ' v i v o ' ,   ' w a v ' ] ,  
 	 	 	 	 i m a g e   :   [ ' b m p ' ,   ' g i f ' ,   ' j p g ' ,   ' p n g ' ,   ' t i f f ' ]  
 	 	 	 } ,  
 	 	 	 m i m e T y p e s   :   {  
 	 	 	 	 a v i   :   ' v i d e o / a v i ' ,  
 	 	 	 	 a i f   :   ' a u d i o / a i f f ' ,  
 	 	 	 	 a i f f   :   ' a u d i o / a i f f ' ,  
 	 	 	 	 g i f   :   ' i m a g e / g i f ' ,  
 	 	 	 	 b m p   :   ' i m a g e / b m p ' ,  
 	 	 	 	 j p e g   :   ' i m a g e / j p e g ' ,  
 	 	 	 	 m 1 v   :   ' v i d e o / m p e g ' ,  
 	 	 	 	 m 2 a   :   ' a u d i o / m p e g ' ,  
 	 	 	 	 m 2 v   :   ' v i d e o / m p e g ' ,  
 	 	 	 	 m 3 u   :   ' a u d i o / x - m p e q u r l ' ,  
 	 	 	 	 m i d   :   ' a u d i o / x - m i d i ' ,  
 	 	 	 	 m i d i   :   ' a u d i o / x - m i d i ' ,  
 	 	 	 	 m j p g   :   ' v i d e o / x - m o t i o n - j p e g ' ,  
 	 	 	 	 m o o v   :   ' v i d e o / q u i c k t i m e ' ,  
 	 	 	 	 m o v   :   ' v i d e o / q u i c k t i m e ' ,  
 	 	 	 	 m o v i e   :   ' v i d e o / x - s g i - m o v i e ' ,  
 	 	 	 	 m p 2   :   ' a u d i o / m p e g ' ,  
 	 	 	 	 m p 3   :   ' a u d i o / m p e g 3 ' ,  
 	 	 	 	 m p a   :   ' a u d i o / m p e g ' ,  
 	 	 	 	 m p a   :   ' v i d e o / m p e g ' ,  
 	 	 	 	 m p e   :   ' v i d e o / m p e g ' ,  
 	 	 	 	 m p e g   :   ' v i d e o / m p e g ' ,  
 	 	 	 	 m p g   :   ' a u d i o / m p e g ' ,  
 	 	 	 	 m p g   :   ' v i d e o / m p e g ' ,  
 	 	 	 	 m p g a   :   ' a u d i o / m p e g ' ,  
 	 	 	 	 p d f   :   ' a p p l i c a t i o n / p d f ' ,  
 	 	 	 	 p n g   :   ' i m a g e / p n g ' ,  
 	 	 	 	 p p s   :   ' a p p l i c a t i o n / m s p o w e r p o i n t ' ,  
 	 	 	 	 q t   :   ' v i d e o / q u i c k t i m e ' ,  
 	 	 	 	 r a m   :   ' a u d i o / x - p n - r e a l a u d i o - p l u g i n ' ,  
 	 	 	 	 r m   :   ' a p p l i c a t i o n / v n d . r n - r e a l m e d i a ' ,  
 	 	 	 	 s w f 	 :   ' a p p l i c a t i o n / x - s h o c k w a v e - f l a s h ' ,  
 	 	 	 	 t i f f   :   ' i m a g e / t i f f ' ,  
 	 	 	 	 v i v   :   ' v i d e o / v i v o ' ,  
 	 	 	 	 v i v o   :   ' v i d e o / v i v o ' ,  
 	 	 	 	 w a v   :   ' a u d i o / w a v ' ,  
 	 	 	 	 w m v   :   ' a p p l i c a t i o n / x - m p l a y e r 2 ' 	 	 	  
 	 	 	 } , 	  
 	 	 	 c l a s s i d s   :   {  
 	 	 	 	 m o v   :   ' c l s i d : 0 2 B F 2 5 D 5 - 8 C 1 7 - 4 B 2 3 - B C 8 0 - D 3 4 8 8 A B D D C 6 B ' ,  
 	 	 	 	 s w f   :   ' c l s i d : D 2 7 C D B 6 E - A E 6 D - 1 1 c f - 9 6 B 8 - 4 4 4 5 5 3 5 4 0 0 0 0 ' ,  
 	 	 	 	 w m v   :   ' c l s i d : 6 B F 5 2 A 5 2 - 3 9 4 A - 1 1 d 3 - B 1 5 3 - 0 0 C 0 4 F 7 9 F A A 6 '  
 	 	 	 } ,  
 	 	 	 c o d e b a s e s   :   {  
 	 	 	 	 m o v   :   ' h t t p : / / w w w . a p p l e . c o m / q t a c t i v e x / q t p l u g i n . c a b # v e r s i o n = 6 , 0 , 2 , 0 ' ,  
 	 	 	 	 s w f   :   ' h t t p : / / f p d o w n l o a d . m a c r o m e d i a . c o m / p u b / s h o c k w a v e / c a b s / f l a s h / s w f l a s h . c a b # v e r s i o n = 7 , 0 , 0 , 0 ' ,  
 	 	 	 	 w m v   :   ' h t t p : / / a c t i v e x . m i c r o s o f t . c o m / a c t i v e x / c o n t r o l s / m p l a y e r / e n / n s m p 2 i n f . c a b # V e r s i o n = 6 , 4 , 5 , 7 1 5 '  
 	 	 	 } , 	  
 	 	 	 v i e w p o r t P a d d i n g   :   1 0 ,  
 	 	 	 E O L A S F i x   :   ' s w f , w m v , f l a , f l v ' ,  
 	 	 	 o v e r l a y   :   {  
 	 	 	 	 o p a c i t y   :   0 . 7 ,  
 	 	 	 	 i m a g e   :   ' i m a g e s / b l a c k . p n g ' ,  
 	 	 	 	 p r e s e t I m a g e   :   ' i m a g e s / b l a c k - 7 0 . p n g '  
 	 	 	 } ,  
 	 	 	 s k i n   :   	 {  
 	 	 	 	 m a i n   :   	 ' < d i v   i d = " l i g h t w i n d o w _ c o n t a i n e r "   > ' +  
 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ t i t l e _ b a r "   > ' +  
 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ t i t l e _ b a r _ i n n e r "   > ' +  
 	 	 	 	 	 	 	 	 	 ' < s p a n   i d = " l i g h t w i n d o w _ t i t l e _ b a r _ t i t l e " > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 ' < a   i d = " l i g h t w i n d o w _ t i t l e _ b a r _ c l o s e _ l i n k "   > ':D'B< / a > ' +  
 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ s t a g e "   > ' +  
 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ c o n t e n t s "   > ' +  
 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ n a v i g a t i o n "   > ' +  
 	 	 	 	 	 	 	 	 	 ' < a   h r e f = " # "   i d = " l i g h t w i n d o w _ p r e v i o u s "   > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < s p a n   i d = " l i g h t w i n d o w _ p r e v i o u s _ t i t l e " > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 ' < / a > ' +  
 	 	 	 	 	 	 	 	 	 ' < a   h r e f = " # "   i d = " l i g h t w i n d o w _ n e x t "   > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < s p a n   i d = " l i g h t w i n d o w _ n e x t _ t i t l e " > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 ' < / a > ' +  
 	 	 	 	 	 	 	 	 	 ' < i f r a m e   n a m e = " l i g h t w i n d o w _ n a v i g a t i o n _ s h i m "   i d = " l i g h t w i n d o w _ n a v i g a t i o n _ s h i m "   s r c = " j a v a s c r i p t : f a l s e ; "   f r a m e B o r d e r = " 0 "   s c r o l l i n g = " n o " > < / i f r a m e > ' +  
 	 	 	 	 	 	 	 	 ' < / d i v > ' + 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ g a l l e r i e s " > ' +  
 	 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ g a l l e r i e s _ t a b _ c o n t a i n e r "   > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < a   h r e f = " # "   i d = " l i g h t w i n d o w _ g a l l e r i e s _ t a b "   > ' +  
 	 	 	 	 	 	 	 	 	 	 	 ' < s p a n   i d = " l i g h t w i n d o w _ g a l l e r i e s _ t a b _ s p a n "   c l a s s = " u p "   > G a l l e r i e s < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < / a > ' +  
 	 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ g a l l e r i e s _ l i s t "   > ' +  
 	 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ d a t a _ s l i d e "   > ' +  
 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ d a t a _ s l i d e _ i n n e r "   > ' +  
 	 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ d a t a _ d e t a i l s "   > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ d a t a _ g a l l e r y _ c o n t a i n e r "   > ' +  
 	 	 	 	 	 	 	 	 	 	 	 ' < s p a n   i d = " l i g h t w i n d o w _ d a t a _ g a l l e r y _ c u r r e n t " > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 	 	 '   o f   ' +  
 	 	 	 	 	 	 	 	 	 	 	 ' < s p a n   i d = " l i g h t w i n d o w _ d a t a _ g a l l e r y _ t o t a l " > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ d a t a _ a u t h o r _ c o n t a i n e r "   > ' +  
 	 	 	 	 	 	 	 	 	 	 	 ' b y   < s p a n   i d = " l i g h t w i n d o w _ d a t a _ a u t h o r " > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 	 ' < d i v   i d = " l i g h t w i n d o w _ d a t a _ c a p t i o n "   > ' +  
 	 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 	 ' < / d i v > ' +  
 	 	 	 	 	 	 ' < / d i v > ' , 	  
 	 	 	 	 l o a d i n g   :   	 ' < d i v   i d = " l i g h t w i n d o w _ l o a d i n g "   > ' +  
 	 	 	 	 	 	 	 	 ' < i m g   s r c = " i m a g e s / a j a x - l o a d i n g . g i f "   a l t = " l o a d i n g "   / > ' +  
 	 	 	 	 	 	 	 	 ' < s p a n > L o a d i n g   o r   < a   h r e f = " j a v a s c r i p t :   m y L i g h t W i n d o w . d e a c t i v a t e ( ) ; " > C a n c e l < / a > < / s p a n > ' +  
 	 	 	 	 	 	 	 	 ' < i f r a m e   n a m e = " l i g h t w i n d o w _ l o a d i n g _ s h i m "   i d = " l i g h t w i n d o w _ l o a d i n g _ s h i m "   s r c = " j a v a s c r i p t : f a l s e ; "   f r a m e B o r d e r = " 0 "   s c r o l l i n g = " n o " > < / i f r a m e > ' +  
 	 	 	 	 	 	 	 ' < / d i v > ' ,  
 	 	 	 	 i f r a m e   :   	 ' < ! D O C T Y P E   h t m l   P U B L I C   " - / / W 3 C / / D T D   X H T M L   1 . 0   S t r i c t / / E N "   " h t t p : / / w w w . w 3 . o r g / T R / x h t m l 1 / D T D / x h t m l 1 - s t r i c t . d t d " > ' +  
 	 	 	 	 	 	 	 ' < h t m l   x m l n s = " h t t p : / / w w w . w 3 . o r g / 1 9 9 9 / x h t m l " > ' +  
 	 	 	 	 	 	 	 	 ' < b o d y > ' +  
 	 	 	 	 	 	 	 	 	 ' { b o d y _ r e p l a c e } ' +  
 	 	 	 	 	 	 	 	 ' < / b o d y > ' +  
 	 	 	 	 	 	 	 ' < / h t m l > ' ,  
 	 	 	 	 g a l l e r y   :   {  
 	 	 	 	 	 t o p   : 	 	 ' < d i v   c l a s s = " l i g h t w i n d o w _ g a l l e r i e s _ l i s t " > ' +  
 	 	 	 	 	 	 	 	 	 ' < h 1 > { g a l l e r y _ t i t l e _ r e p l a c e } < / h 1 > ' +  
 	 	 	 	 	 	 	 	 	 ' < u l > ' ,  
 	 	 	 	 	 m i d d l e   :   	 	 	 ' < l i > ' +  
 	 	 	 	 	 	 	 	 	 	 	 ' { g a l l e r y _ l i n k _ r e p l a c e } ' +  
 	 	 	 	 	 	 	 	 	 	 ' < / l i > ' ,  
 	 	 	 	 	 b o t t o m   :   	 	 ' < / u l > ' +  
 	 	 	 	 	 	 	 	 ' < / d i v > '  
 	 	 	 	 }  
 	 	 	 } ,  
 	 	 	 f o r m M e t h o d   :   ' g e t ' ,  
 	 	 	 h i d e F l a s h   :   f a l s e ,  
 	 	 	 h i d e G a l l e r y T a b   :   f a l s e ,  
 	 	 	 s h o w T i t l e B a r   :   t r u e ,  
 	 	 	 a n i m a t i o n H a n d l e r   :   f a l s e ,  
 	 	 	 n a v i g a t i o n H a n d l e r   :   f a l s e ,  
 	 	 	 t r a n s i t i o n H a n d l e r   :   f a l s e ,  
 	 	 	 f i n a l A n i m a t i o n H a n d l e r   :   f a l s e ,  
 	 	 	 f o r m H a n d l e r   :   f a l s e ,  
 	 	 	 g a l l e r y A n i m a t i o n H a n d l e r   :   f a l s e ,  
 	 	 	 s h o w G a l l e r y C o u n t   :   t r u e  
 	 	 } ,   o p t i o n s   | |   { } ) ;  
 	 	 t h i s . d u r a t i o n   =   ( ( 1 1 - t h i s . o p t i o n s . r e s i z e S p e e d ) * 0 . 1 5 ) ;  
 	 	 t h i s . _ s e t u p L i n k s ( ) ;  
 	 	 t h i s . _ g e t S c r o l l ( ) ;  
 	 	 t h i s . _ g e t P a g e D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ b r o w s e r D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ a d d L i g h t W i n d o w M a r k u p ( f a l s e ) ;  
 	 	 t h i s . _ s e t u p D i m e n s i o n s ( ) ;    
 	 	 t h i s . b u i l d G a l l e r y L i s t ( ) ;  
 	 } ,  
 	 / /  
 	 / / 	 A c t i v a t e   t h e   l i g h t w i n d o w .  
 	 / /  
 	 a c t i v a t e   :   f u n c t i o n ( e ,   l i n k ) { 	 	  
 	 	 / /   C l e a r   o u t   t h e   w i n d o w   C o n t e n t s  
 	 	 t h i s . _ c l e a r W i n d o w C o n t e n t s ( t r u e ) ;  
 	 	 	  
 	 	 / /   A d d   b a c k   i n   o u t   l o a d i n g   p a n e l  
 	 	 t h i s . _ a d d L o a d i n g W i n d o w M a r k u p ( ) ;  
  
 	 	 / /   S e t u p   t h e   e l e m e n t   p r o p e r t i e s  
 	 	 t h i s . _ s e t u p W i n d o w E l e m e n t s ( l i n k ) ;  
 	 	  
 	 	 / /   S e t u p   e v e r y t h i n g  
 	 	 t h i s . _ g e t S c r o l l ( ) ;  
 	 	 t h i s . _ b r o w s e r D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ s e t u p D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ t o g g l e T r o u b l e E l e m e n t s ( ' h i d d e n ' ,   f a l s e ) ;  
 	 	 t h i s . _ d i s p l a y L i g h t W i n d o w ( ' b l o c k ' ,   ' h i d d e n ' ) ;  
 	 	 t h i s . _ s e t S t a t u s ( t r u e ) ;  
 	 	 t h i s . _ m o n i t o r K e y b o a r d ( t r u e ) ;  
 	 	 t h i s . _ p r e p a r e I E ( t r u e ) ;  
 	 	 t h i s . _ l o a d W i n d o w ( ) ;  
 	 } ,  
 	 / /  
 	 / / 	 T u r n   o f f   t h e   w i n d o w  
 	 / /  
 	 d e a c t i v a t e   :   f u n c t i o n ( ) {  
 	 	 / /   T h e   w i n d o w   i s   n o t   a c t i v e  
 	 	 t h i s . w i n d o w A c t i v e   =   f a l s e ;  
 	 	  
 	 	 / /   T h e r e   i s   n o   l o n g e r   a   g a l l e r y   a c t i v e  
 	 	 t h i s . a c t i v e G a l l e r y   =   f a l s e ;  
 	 	 i f   ( ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 t h i s . _ h a n d l e G a l l e r y A n i m a t i o n ( f a l s e ) ;  
 	 	 }  
 	 	  
 	 	 / /   K i l l   t h e   a n i m a t i o n  
 	 	 t h i s . a n i m a t i n g   =   f a l s e ;  
 	 	  
 	 	 / /   C l e a r   o u r   e l e m e n t  
 	 	 t h i s . e l e m e n t   =   n u l l ;  
 	 	  
 	 	 / /   h i d e   t h e   w i n d o w .  
 	 	 t h i s . _ d i s p l a y L i g h t W i n d o w ( ' n o n e ' ,   ' v i s i b l e ' ) ;  
 	 	  
 	 	 / /   C l e a r   o u t   t h e   w i n d o w   C o n t e n t s  
 	 	 t h i s . _ c l e a r W i n d o w C o n t e n t s ( f a l s e ) ;  
 	 	  
 	 	 / /   S t o p   a l l   a n i m a t i o n  
 	 	 v a r   q u e u e   =   E f f e c t . Q u e u e s . g e t ( ' l i g h t w i n d o w A n i m a t i o n ' ) . e a c h ( f u n c t i o n ( e ) { e . c a n c e l ( ) ; } ) ;  
 	 	  
 	 	 / /   U n d o   t h e   s e t u p  
 	 	 t h i s . _ p r e p a r e I E ( f a l s e ) ;  
 	 	 t h i s . _ s e t u p D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ t o g g l e T r o u b l e E l e m e n t s ( ' v i s i b l e ' ,   f a l s e ) ; 	  
 	 	 t h i s . _ m o n i t o r K e y b o a r d ( f a l s e ) ; 	  
 	 } ,  
 	 / /  
 	 / /     I n i t i a l i z e   s p e c i f i c   w i n d o w  
 	 / /  
 	 c r e a t e W i n d o w   :   f u n c t i o n ( e l e m e n t ,   a t t r i b u t e s )   {  
 	 	 t h i s . _ p r o c e s s L i n k ( $ ( e l e m e n t ) ) ;  
 	 } ,  
 	 / /  
 	 / /     O p e n   a   W i n d o w   f r o m   a   h a s h   o f   a t t r i b u t e s  
 	 / /  
 	 a c t i v a t e W i n d o w   :   f u n c t i o n ( o p t i o n s )   {  
 	 	 t h i s . e l e m e n t   =   O b j e c t . e x t e n d ( {  
 	 	 	 h r e f   :   n u l l ,  
 	 	 	 t i t l e   :   n u l l ,  
 	 	 	 a u t h o r   :   n u l l ,  
 	 	 	 c a p t i o n   :   n u l l ,  
 	 	 	 r e l   :   n u l l ,  
 	 	 	 t o p   :   n u l l ,  
 	 	 	 l e f t   :   n u l l ,  
 	 	 	 t y p e   :   n u l l ,  
 	 	 	 s h o w I m a g e s   :   n u l l ,  
 	 	 	 h e i g h t   :   n u l l ,  
 	 	 	 w i d t h   :   n u l l ,  
 	 	 	 l o a d i n g A n i m a t i o n   :   n u l l ,  
 	 	 	 i f r a m e E m b e d   :   n u l l ,  
 	 	 	 f o r m   :   n u l l  
 	 	 } ,   o p t i o n s   | |   { } ) ;  
 	 	  
 	 	 / /   S e t   t h e   w i n d o w   t y p e  
 	 	 t h i s . c o n t e n t T o F e t c h   =   t h i s . e l e m e n t . h r e f ;  
 	 	 t h i s . w i n d o w T y p e   =   t h i s . e l e m e n t . t y p e   ?   t h i s . e l e m e n t . t y p e   :   t h i s . _ f i l e T y p e ( t h i s . e l e m e n t . h r e f ) ; 	  
 	 	  
 	 	 / /   C l e a r   o u t   t h e   w i n d o w   C o n t e n t s  
 	 	 t h i s . _ c l e a r W i n d o w C o n t e n t s ( t r u e ) ;  
 	 	 	  
 	 	 / /   A d d   b a c k   i n   o u t   l o a d i n g   p a n e l  
 	 	 t h i s . _ a d d L o a d i n g W i n d o w M a r k u p ( ) ;  
 	 	  
 	 	 / /   S e t u p   e v e r y t h i n g  
 	 	 t h i s . _ g e t S c r o l l ( ) ;  
 	 	 t h i s . _ b r o w s e r D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ s e t u p D i m e n s i o n s ( ) ;  
 	 	 t h i s . _ t o g g l e T r o u b l e E l e m e n t s ( ' h i d d e n ' ,   f a l s e ) ;  
 	 	 t h i s . _ d i s p l a y L i g h t W i n d o w ( ' b l o c k ' ,   ' h i d d e n ' ) ;  
 	 	 t h i s . _ s e t S t a t u s ( t r u e ) ;  
 	 	 t h i s . _ m o n i t o r K e y b o a r d ( t r u e ) ;  
 	 	 t h i s . _ p r e p a r e I E ( t r u e ) ;  
 	 	 t h i s . _ l o a d W i n d o w ( ) ;  
 	 } ,  
 	 / /  
 	 / /     F i r e   o f f   o u r   F o r m   h a n d l e r  
 	 / /  
 	 s u b m i t F o r m   :   f u n c t i o n ( e )   {  
 	 	 i f   ( t h i s . o p t i o n s . f o r m H a n d l e r )   {  
 	 	 	 t h i s . o p t i o n s . f o r m H a n d l e r ( e ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ d e f a u l t F o r m H a n d l e r ( e ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 R e l o a d   t h e   w i n d o w   w i t h   a n o t h e r   l o c a t i o n  
 	 / /  
 	 o p e n W i n d o w   :   f u n c t i o n ( e l e m e n t )   {  
 	 	 v a r   e l e m e n t   =   $ ( e l e m e n t ) ;  
  
 	 	 / /   T h e   w i n d o w   i s   a c t i v e  
 	 	 t h i s . w i n d o w A c t i v e   =   t r u e ;  
 	 	  
 	 	 / /   C l e a r   o u t   t h e   w i n d o w   C o n t e n t s  
 	 	 t h i s . _ c l e a r W i n d o w C o n t e n t s ( t r u e ) ;  
 	 	  
 	 	 / /   A d d   b a c k   i n   o u t   l o a d i n g   p a n e l  
 	 	 t h i s . _ a d d L o a d i n g W i n d o w M a r k u p ( ) ;  
 	 	  
 	 	 / /   S e t u p   t h e   e l e m e n t   p r o p e r t i e s  
 	 	 t h i s . _ s e t u p W i n d o w E l e m e n t s ( e l e m e n t ) ;  
  
 	 	 t h i s . _ s e t S t a t u s ( t r u e ) ;  
 	 	 t h i s . _ h a n d l e T r a n s i t i o n ( ) ;  
 	 } ,  
 	 / /  
 	 / /     N a v i g a t e   t h e   w i n d o w  
 	 / /  
 	 n a v i g a t e W i n d o w   :   f u n c t i o n ( d i r e c t i o n )   {  
 	 	 t h i s . _ h a n d l e N a v i g a t i o n ( f a l s e ) ;  
 	 	 i f   ( d i r e c t i o n   = =   ' p r e v i o u s ' )   {  
 	 	 	 t h i s . o p e n W i n d o w ( t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s ) ;  
 	 	 }   e l s e   i f   ( d i r e c t i o n   = =   ' n e x t ' ) {    
 	 	 	 t h i s . o p e n W i n d o w ( t h i s . n a v i g a t i o n O b s e r v e r s . n e x t ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     B u i l d   t h e   G a l l e r y   L i s t   a n d   L o a d   i t  
 	 / /  
 	 b u i l d G a l l e r y L i s t   :   f u n c t i o n ( )   {  
 	 	 v a r   o u t p u t   =   ' ' ;  
 	 	 v a r   g a l l e r y L i n k ;  
 	 	 f o r   ( i   i n   t h i s . g a l l e r i e s )   {  
 	 	 	 i f   ( t y p e o f   t h i s . g a l l e r i e s [ i ]   = =   ' o b j e c t ' )   {  
 	 	 	 	 o u t p u t   + =   ( t h i s . o p t i o n s . s k i n . g a l l e r y . t o p ) . r e p l a c e ( ' { g a l l e r y _ t i t l e _ r e p l a c e } ' ,   u n e s c a p e ( i ) ) ;  
 	 	 	 	 f o r   ( j   i n   t h i s . g a l l e r i e s [ i ] )   {  
 	 	 	 	 	 i f   ( t y p e o f   t h i s . g a l l e r i e s [ i ] [ j ]   = =   ' o b j e c t ' )   { 	 	 	 	 	 	  
 	 	 	 	 	 	 g a l l e r y L i n k   =   ' < a   h r e f = " # "   i d = " l i g h t w i n d o w _ g a l l e r y _ ' + i + ' _ ' + j + ' "   > ' + u n e s c a p e ( j ) + ' < / a > ' ;  
 	 	 	 	 	 	 o u t p u t   + =   ( t h i s . o p t i o n s . s k i n . g a l l e r y . m i d d l e ) . r e p l a c e ( ' { g a l l e r y _ l i n k _ r e p l a c e } ' ,   g a l l e r y L i n k ) ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 	 o u t p u t   + =   t h i s . o p t i o n s . s k i n . g a l l e r y . b o t t o m ;  
 	 	 	 }  
 	 	 }  
 	 	 n e w   I n s e r t i o n . T o p ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ,   o u t p u t ) ;  
 	 	  
 	 	 / /   A t t a c h   E v e n t s  
 	 	 f o r   ( i   i n   t h i s . g a l l e r i e s )   {  
 	 	 	 i f   ( t y p e o f   t h i s . g a l l e r i e s [ i ]   = =   ' o b j e c t ' )   {  
 	 	 	 	 f o r   ( j   i n   t h i s . g a l l e r i e s [ i ] )   {  
 	 	 	 	 	 i f   ( t y p e o f   t h i s . g a l l e r i e s [ i ] [ j ]   = =   ' o b j e c t ' )   {  
 	 	 	 	 	 	 E v e n t . o b s e r v e ( $ ( ' l i g h t w i n d o w _ g a l l e r y _ ' + i + ' _ ' + j ) ,   ' c l i c k ' ,   t h i s . o p e n W i n d o w . b i n d ( t h i s ,   t h i s . g a l l e r i e s [ i ] [ j ] [ 0 ] ) ,   f a l s e ) ;  
 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r y _ ' + i + ' _ ' + j ) . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ; 	  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 } ,  
 	 / /    
 	 / /     S e t   L i n k s   U p  
 	 / /  
 	 _ s e t u p L i n k s   :   f u n c t i o n ( )   {  
 	 	 v a r   l i n k s   =   $ $ ( ' . ' + t h i s . o p t i o n s . c l a s s N a m e s . s t a n d a r d ) ;  
 	 	 l i n k s . e a c h ( f u n c t i o n ( l i n k )   {  
 	 	 	 t h i s . _ p r o c e s s L i n k ( l i n k ) ;  
 	 	 } . b i n d ( t h i s ) ) ; 	  
 	 } ,  
 	 / /  
 	 / /     P r o c e s s   a   L i n k  
 	 / /  
 	 _ p r o c e s s L i n k   :   f u n c t i o n ( l i n k )   {  
 	 	 i f   ( ( t h i s . _ f i l e T y p e ( l i n k . g e t A t t r i b u t e ( ' h r e f ' ) )   = =   ' i m a g e '   | |   t h i s . _ f i l e T y p e ( l i n k . g e t A t t r i b u t e ( ' h r e f ' ) )   = =   ' m e d i a ' ) )   {  
 	 	 	 i f   ( g a l l e r y   =   t h i s . _ g e t G a l l e r y I n f o ( l i n k . r e l ) )   {  
 	 	 	 	 i f   ( ! t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] )   {  
 	 	 	 	 	 t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ]   =   n e w   A r r a y ( ) ;  
 	 	 	 	 }  
 	 	 	 	 i f   ( ! t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] )   {  
 	 	 	 	 	 t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ]   =   n e w   A r r a y ( ) ;  
 	 	 	 	 }  
 	 	 	 	 t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] . p u s h ( l i n k ) ;  
 	 	 	 }  
 	 	 }  
 	 	  
 	 	 / /   T a k e   c a r e   o f   o u r   i n l i n e   c o n t e n t  
 	 	 v a r   u r l   =   l i n k . g e t A t t r i b u t e ( ' h r e f ' ) ;  
 	 	 i f   ( u r l . i n d e x O f ( ' ? ' )   >   - 1 )   {  
 	 	 	 u r l   =   u r l . s u b s t r i n g ( 0 ,   u r l . i n d e x O f ( ' ? ' ) ) ;  
 	 	 }  
 	 	  
 	 	 v a r   c o n t a i n e r   =   u r l . s u b s t r i n g ( u r l . i n d e x O f ( ' # ' ) + 1 ) ;  
 	 	 i f ( $ ( c o n t a i n e r ) )   {  
 	 	 	 $ ( c o n t a i n e r ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y   :   ' n o n e '  
 	 	 	 } ) ;  
 	 	 }  
 	 	  
 	 	 E v e n t . o b s e r v e ( l i n k ,   ' c l i c k ' ,   t h i s . a c t i v a t e . b i n d A s E v e n t L i s t e n e r ( t h i s ,   l i n k ) ,   f a l s e ) ;  
 	 	 l i n k . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ; 	 	  
 	 } ,  
 	 / /  
 	 / / 	 S e t u p   o u r   a c t i o n s  
 	 / /  
 	 _ s e t u p A c t i o n s   :   f u n c t i o n ( )   {  
 	 	 v a r   l i n k s   =   $ $ ( ' # l i g h t w i n d o w _ c o n t a i n e r   . ' + t h i s . o p t i o n s . c l a s s N a m e s . a c t i o n ) ;  
 	 	 l i n k s . e a c h ( f u n c t i o n ( l i n k )   {  
 	 	 	 E v e n t . o b s e r v e ( l i n k ,   ' c l i c k ' ,   t h i s [ l i n k . g e t A t t r i b u t e ( ' r e l ' ) ] . b i n d A s E v e n t L i s t e n e r ( t h i s ,   l i n k ) ,   f a l s e ) ;  
 	 	 	 l i n k . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ;  
 	 	 } . b i n d ( t h i s ) ) ;  
 	 } ,  
 	 / /  
 	 / / 	 A d d   t h e   m a r k u p   t o   t h e   p a g e .  
 	 / /  
 	 _ a d d L i g h t W i n d o w M a r k u p   :   f u n c t i o n ( r e b u i l d )   {  
 	 	 v a r   o v e r l a y   =   E l e m e n t . e x t e n d ( d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ) ;  
 	 	 o v e r l a y . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ o v e r l a y ' ) ; 	 	  
 	 	 / /   F F   M a c   h a s   a   p r o b l e m   w i t h   p u t t i n g   F l a s h   a b o v e   a   l a y e r   w i t h o u t   a   1 0 0 %   o p a c i t y   b a c k g r o u n d ,   s o   w e   n e e d   t o   u s e   a   p r e - m a d e  
 	 	 i f   ( P r o t o t y p e . B r o w s e r . G e c k o )   {  
 	 	 	 o v e r l a y . s e t S t y l e ( {  
 	 	 	 	 b a c k g r o u n d I m a g e :   ' u r l ( ' + t h i s . o p t i o n s . o v e r l a y . p r e s e t I m a g e + ' ) ' ,  
 	 	 	 	 b a c k g r o u n d R e p e a t :   ' r e p e a t ' ,  
 	 	 	 	 h e i g h t :   t h i s . p a g e D i m e n s i o n s . h e i g h t + ' p x '  
 	 	 	 } ) ; 	 	 	  
 	 	 }   e l s e   {  
 	 	 	 o v e r l a y . s e t S t y l e ( {  
 	 	 	 	 o p a c i t y :   t h i s . o p t i o n s . o v e r l a y . o p a c i t y ,  
 	 	 	 	 b a c k g r o u n d I m a g e :   ' u r l ( ' + t h i s . o p t i o n s . o v e r l a y . i m a g e + ' ) ' ,  
 	 	 	 	 b a c k g r o u n d R e p e a t :   ' r e p e a t ' ,  
 	 	 	 	 h e i g h t :   t h i s . p a g e D i m e n s i o n s . h e i g h t + ' p x '  
 	 	 	 } ) ;  
 	 	 }  
 	 	  
 	 	 v a r   l w   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 	 l w . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w ' ) ;  
 	 	 l w . i n n e r H T M L   =   t h i s . o p t i o n s . s k i n . m a i n ;  
 	 	  
 	 	 v a r   b o d y   =   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 ( ' b o d y ' ) [ 0 ] ;  
 	 	 b o d y . a p p e n d C h i l d ( o v e r l a y ) ;  
 	 	 b o d y . a p p e n d C h i l d ( l w ) ; 	  
 	 	 	 	  
 	 	 i f   ( $ ( ' l i g h t w i n d o w _ t i t l e _ b a r _ c l o s e _ l i n k ' ) )   {  
 	 	 	 E v e n t . o b s e r v e ( ' l i g h t w i n d o w _ t i t l e _ b a r _ c l o s e _ l i n k ' ,   ' c l i c k ' ,   t h i s . d e a c t i v a t e . b i n d A s E v e n t L i s t e n e r ( t h i s ) ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ t i t l e _ b a r _ c l o s e _ l i n k ' ) . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ;  
 	 	 }  
 	 	 	  
 	 	 E v e n t . o b s e r v e ( $ ( ' l i g h t w i n d o w _ p r e v i o u s ' ) ,   ' c l i c k ' ,   t h i s . n a v i g a t e W i n d o w . b i n d ( t h i s ,   ' p r e v i o u s ' ) ,   f a l s e ) ;  
 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s ' ) . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ; 	 	  
 	 	 E v e n t . o b s e r v e ( $ ( ' l i g h t w i n d o w _ n e x t ' ) ,   ' c l i c k ' ,   t h i s . n a v i g a t e W i n d o w . b i n d ( t h i s ,   ' n e x t ' ) ,   f a l s e ) ;  
 	 	 $ ( ' l i g h t w i n d o w _ n e x t ' ) . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ;  
  
 	 	 i f   ( ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 E v e n t . o b s e r v e ( $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b ' ) ,   ' c l i c k ' ,   t h i s . _ h a n d l e G a l l e r y A n i m a t i o n . b i n d ( t h i s ,   t r u e ) ,   f a l s e ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b ' ) . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ;  
 	 	 }  
 	 	  
 	 	 / /   B e c a u s e   w e   u s e   p o s i t i o n   a b s o l u t e ,   k i l l   t h e   s c r o l l   W h e e l   o n   a n i m a t i o n s  
 	 	 i f   ( P r o t o t y p e . B r o w s e r . I E )   {  
 	 	 	 E v e n t . o b s e r v e ( d o c u m e n t ,   ' m o u s e w h e e l ' ,   t h i s . _ s t o p S c r o l l i n g . b i n d A s E v e n t L i s t e n e r ( t h i s ) ,   f a l s e ) ;  
 	 	 }   e l s e   {  
 	 	 	 E v e n t . o b s e r v e ( w i n d o w ,   ' D O M M o u s e S c r o l l ' ,   t h i s . _ s t o p S c r o l l i n g . b i n d A s E v e n t L i s t e n e r ( t h i s ) ,   f a l s e ) ;  
 	 	 }  
 	 	 	 	  
 	 	 E v e n t . o b s e r v e ( o v e r l a y ,   ' c l i c k ' ,   t h i s . d e a c t i v a t e . b i n d A s E v e n t L i s t e n e r ( t h i s ) ,   f a l s e ) ;  
 	 	 o v e r l a y . o n c l i c k   =   f u n c t i o n ( )   { r e t u r n   f a l s e ; } ;  
 	 } ,  
 	 / /  
 	 / /     A d d   l o a d i n g   w i n d o w   m a r k u p  
 	 / /  
 	 _ a d d L o a d i n g W i n d o w M a r k u p   :   f u n c t i o n ( )   {  
 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . i n n e r H T M L   + =   t h i s . o p t i o n s . s k i n . l o a d i n g ;  
 	 } ,  
 	 / /  
 	 / /     S e t u p   t h e   w i n d o w   e l e m e n t s  
 	 / /  
 	 _ s e t u p W i n d o w E l e m e n t s   :   f u n c t i o n ( l i n k )   {  
 	 	 t h i s . e l e m e n t   =   l i n k ;  
 	 	 t h i s . e l e m e n t . t i t l e   =   n u l l   ?   ' '   :   l i n k . g e t A t t r i b u t e ( ' t i t l e ' ) ;  
 	 	 t h i s . e l e m e n t . a u t h o r   =   n u l l   ?   ' '   :   l i n k . g e t A t t r i b u t e ( ' a u t h o r ' ) ;  
 	 	 t h i s . e l e m e n t . c a p t i o n   =   n u l l   ?   ' '   :   l i n k . g e t A t t r i b u t e ( ' c a p t i o n ' ) ;  
 	 	 t h i s . e l e m e n t . r e l   =   n u l l   ?   ' '   :   l i n k . g e t A t t r i b u t e ( ' r e l ' ) ;  
 	 	 t h i s . e l e m e n t . p a r a m s   =   n u l l   ?   ' '   :   l i n k . g e t A t t r i b u t e ( ' p a r a m s ' ) ;  
  
 	 	 / /   S e t   t h e   w i n d o w   t y p e  
 	 	 t h i s . c o n t e n t T o F e t c h   =   t h i s . e l e m e n t . h r e f ;  
 	 	 t h i s . w i n d o w T y p e   =   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ t y p e ' )   ?   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ t y p e ' )   :   t h i s . _ f i l e T y p e ( t h i s . c o n t e n t T o F e t c h ) ; 	  
 	 } ,  
 	 / /  
 	 / /     C l e a r   t h e   w i n d o w   c o n t e n t s   o u t  
 	 / /  
 	 _ c l e a r W i n d o w C o n t e n t s   :   f u n c t i o n ( c o n t e n t s )   {  
 	 	 / /   I f   t h e r e   i s   a n   i f r a m e ,   i t s   g o t   t o   g o  
 	 	 i f   ( $ ( ' l i g h t w i n d o w _ i f r a m e ' ) )   {  
 	 	 	 E l e m e n t . r e m o v e ( $ ( ' l i g h t w i n d o w _ i f r a m e ' ) ) ;  
 	 	 }  
  
 	 	 / /   S t o p   p l a y i n g   a n   o b j e c t   i f   i t s   s t i l l   a r o u n d  
 	 	 i f   ( $ ( ' l i g h t w i n d o w _ m e d i a _ p r i m a r y ' ) )   {  
 	 	 	 t r y   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ m e d i a _ p r i m a r y ' ) . S t o p ( ) ;  
 	 	 	 }   c a t c h ( e )   { }  
 	 	 	 E l e m e n t . r e m o v e ( $ ( ' l i g h t w i n d o w _ m e d i a _ p r i m a r y ' ) ) ;  
 	 	 }  
  
 	 	 / /   S t o p   p l a y i n g   a n   o b j e c t   i f   i t s   s t i l l   a r o u n d 	 	  
 	 	 i f   ( $ ( ' l i g h t w i n d o w _ m e d i a _ s e c o n d a r y ' ) )   {  
 	 	 	 t r y   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ m e d i a _ s e c o n d a r y ' ) . S t o p ( ) ;  
 	 	 	 }   c a t c h ( e )   { }  
 	 	 	 E l e m e n t . r e m o v e ( $ ( ' l i g h t w i n d o w _ m e d i a _ s e c o n d a r y ' ) ) ;  
 	 	 }  
 	 	  
 	 	 t h i s . a c t i v e G a l l e r y   =   f a l s e ;  
 	 	 t h i s . _ h a n d l e N a v i g a t i o n ( t h i s . a c t i v e G a l l e r y ) ;  
 	 	  
 	 	 i f   ( c o n t e n t s )   {  
 	 	 	 / /   E m p t y   t h e   c o n t e n t s  
 	 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . i n n e r H T M L   =   ' ' ;  
 	 	 	  
 	 	 	 / /   R e s e t   t h e   s c r o l l   b a r s  
 	 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s e t S t y l e ( {  
 	 	 	 	 o v e r f l o w :   ' h i d d e n '  
 	 	 	 } ) ; 	 	  
 	 	 	  
 	 	 	 i f   ( ! t h i s . w i n d o w A c t i v e )   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e _ i n n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 } ) ;  
  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ t i t l e _ b a r _ t i t l e ' ) . i n n e r H T M L   =   ' ' ;  
 	 	 	 }  
  
 	 	 	 / /   B e c a u s e   o f   b r o w s e r   d i f f e r e n c e s   a n d   t o   m a i n t a i n   f l e x i b l e   c a p t i o n s   w e   n e e d   t o   r e s e t   t h i s   h e i g h t   a t   c l o s e  
 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . s e t S t y l e ( {  
 	 	 	 	 h e i g h t :   ' a u t o '  
 	 	 	 } ) ;  
 	 	 }  
 	 	  
 	 	 t h i s . r e s i z e T o . h e i g h t   =   n u l l ;  
 	 	 t h i s . r e s i z e T o . w i d t h   =   n u l l ;  
 	 } ,  
 	 / /  
 	 / / 	 S e t   t h e   s t a t u s   o f   o u r   a n i m a t i o n   t o   k e e p   t h i n g s   f r o m   g e t t i n g   c l u n k y  
 	 / /  
 	 _ s e t S t a t u s   :   f u n c t i o n ( s t a t u s )   {  
 	 	 t h i s . a n i m a t i n g   =   s t a t u s ;  
 	 	 i f   ( s t a t u s )   {  
 	 	 	 E l e m e n t . s h o w ( ' l i g h t w i n d o w _ l o a d i n g ' ) ;  
 	 	 }  
 	 	 i f   ( ! ( / M S I E   6 . / i . t e s t ( n a v i g a t o r . u s e r A g e n t ) ) )   {  
 	 	 	 t h i s . _ f i x e d W i n d o w ( s t a t u s ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     M a k e   t h i s   w i n d o w   F i x e d  
 	 / /  
 	 _ f i x e d W i n d o w   :   f u n c t i o n ( s t a t u s )   {  
 	 	 i f   ( s t a t u s )   {  
 	 	 	 i f   ( t h i s . w i n d o w A c t i v e )   {  
 	 	 	 	 t h i s . _ g e t S c r o l l ( ) ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w ' ) . s e t S t y l e ( {  
 	 	 	 	 	 p o s i t i o n :   ' a b s o l u t e ' ,  
 	 	 	 	 	 / / t o p :   p a r s e F l o a t ( $ ( ' l i g h t w i n d o w ' ) . g e t S t y l e ( ' t o p ' ) ) + t h i s . p a g e P o s i t i o n . y + ' p x ' ,  
 	 	 	 	 	 t o p :   3 0 0 + ' p x ' ,  
 	 	 	 	 	  
 	 	 	 	 	 l e f t :   p a r s e F l o a t ( $ ( ' l i g h t w i n d o w ' ) . g e t S t y l e ( ' l e f t ' ) ) + t h i s . p a g e P o s i t i o n . x + ' p x '  
 	 	 	 	 } ) ; 	 	  
 	 	 	 	  
 	 	 	 }   e l s e   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w ' ) . s e t S t y l e ( {  
 	 	 	 	 	 p o s i t i o n :   ' a b s o l u t e '  
 	 	 	 	 } ) ; 	 	 	 	 	 	  
 	 	 	 }  
 	 	 }   e l s e   {  
 	 	 	 i f   ( t h i s . w i n d o w A c t i v e )   {  
 	 	 	 	 t h i s . _ g e t S c r o l l ( ) ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w ' ) . s e t S t y l e ( {  
 	 	 	 	 	 p o s i t i o n :   ' f i x e d ' ,  
 	 	 	 	 	 / / t o p :   p a r s e F l o a t ( $ ( ' l i g h t w i n d o w ' ) . g e t S t y l e ( ' t o p ' ) ) - t h i s . p a g e P o s i t i o n . y + ' p x ' ,  
 	 	 	 	 	 t o p :   3 0 0 + ' p x ' ,  
 	 	 	 	 	 l e f t :   p a r s e F l o a t ( $ ( ' l i g h t w i n d o w ' ) . g e t S t y l e ( ' l e f t ' ) ) - t h i s . p a g e P o s i t i o n . x + ' p x '  
 	 	 	 	 } ) ; 	 	  
 	 	 	 }   e l s e   {  
 	 	 	 	 i f   ( $ ( ' l i g h t w i n d o w _ i f r a m e ' ) )   {  
 	 	 	 	 	 / /   I d e a l l y   h e r e   w e   w o u l d   s e t   a   5 0 %   v a l u e   f o r   t o p   a n d   l e f t ,   b u t   S a f a r i   r e a r s   i t   u g l y   h e a d   a g a i n   a n d   w e   n e e d   t o   d o   i t   b y   p i x e l s  
 	 	 	 	 	 t h i s . _ b r o w s e r D i m e n s i o n s ( ) ;  
 	 	 	 	 }  
 	 	 	 	 $ ( ' l i g h t w i n d o w ' ) . s e t S t y l e ( {  
 	 	 	 	 	 p o s i t i o n :   ' f i x e d ' ,  
 	 	 	 	 	 / / t o p :   ( p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ t o p ' ) )   ?   p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ t o p ' ) ) + ' p x '   :   t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t / 2 + ' p x ' ) ,  
 	 	 	 	 	 t o p :   3 0 0 + ' p x ' ,  
 	 	 	 	 	 l e f t :   ( p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ l e f t ' ) )   ?   p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ l e f t ' ) ) + ' p x '   :   t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h / 2 + ' p x ' )  
 	 	 	 	 } ) ;  
 	 	 	 	  
 	 	 	 }  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 P r e p a r e   t h e   w i n d o w   f o r   I E .  
 	 / /  
 	 _ p r e p a r e I E   :   f u n c t i o n ( s e t u p )   {  
 	 	 i f   ( P r o t o t y p e . B r o w s e r . I E )   {  
 	 	 	 v a r   h e i g h t ,   o v e r f l o w X ,   o v e r f l o w Y ;  
 	 	 	 i f   ( s e t u p )   {    
 	 	 	 	 v a r   h e i g h t   =   ' 1 0 0 % ' ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 v a r   h e i g h t   =   ' a u t o ' ;  
 	 	 	 }  
 	 	 	 v a r   b o d y   =   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 ( ' b o d y ' ) [ 0 ] ;  
 	 	 	 v a r   h t m l   =   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 t m l ' ) [ 0 ] ;  
 	 	 	 h t m l . s t y l e . h e i g h t   =   b o d y . s t y l e . h e i g h t   =   h e i g h t ;  
 	 	 }  
 	 } ,  
 	 _ s t o p S c r o l l i n g   :   f u n c t i o n ( e )   {  
 	 	 i f   ( t h i s . a n i m a t i n g )   {  
 	 	 	 i f   ( e . p r e v e n t D e f a u l t )   {  
 	 	 	 	 e . p r e v e n t D e f a u l t ( ) ;  
 	 	 	 }  
 	 	 	 e . r e t u r n V a l u e   =   f a l s e ; 	 	  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 G e t   t h e   s c r o l l   f o r   t h e   p a g e .  
 	 / /  
 	 _ g e t S c r o l l   :   f u n c t i o n ( ) {  
             	 i f ( t y p e o f ( w i n d o w . p a g e Y O f f s e t )   = =   ' n u m b e r ' )   {  
                 	 t h i s . p a g e P o s i t i o n . x   =   w i n d o w . p a g e X O f f s e t ;  
                 	 t h i s . p a g e P o s i t i o n . y   =   w i n d o w . p a g e Y O f f s e t ;  
             	 }   e l s e   i f ( d o c u m e n t . b o d y   & &   ( d o c u m e n t . b o d y . 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 T o p ) )   {  
 	               	 t h i s . p a g e P o s i t i o n . x   =   d o c u m e n t . b o d y . s c r o l l L e f t ;  
                 	 t h i s . p a g e P o s i t i o n . y   =   d o c u m e n t . b o d y . s c r o l l T o p ;  
 	 	 }   e l s e   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 )   {  
                 	 t h i s . p a g e P o s i t i o n . 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 ;  
                 	 t h i s . p a g e P o s i t i o n . 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 ;  
             	 }  
 	 } ,  
 	 / /  
 	 / / 	 R e s e t   t h e   s c r o l l .  
 	 / /  
 	 _ s e t S c r o l l   :   f u n c t i o n ( x ,   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 L e f 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 T o p   =   y ;    
 	 } ,  
 	 / /  
 	 / / 	 H i d e   S e l e c t s   f r o m   t h e   p a g e   b e c a u s e   o f   I E .  
 	 / /           W e   c o u l d   u s e   i f r a m e   s h i m s   i n s t e a d   h e r e   b u t   w h y   a d d   a l l   t h e   e x t r a   m a r k u p   f o r   o n e   b r o w s e r   w h e n   t h i s   i s   m u c h   e a s i e r   a n d   c l e a n e r  
 	 / /  
 	 _ t o g g l e T r o u b l e E l e m e n t s   :   f u n c t i o n ( v i s i b i l i t y ,   c o n t e n t ) {  
 	 	  
 	 	 i f   ( c o n t e n t )   {  
 	 	 	 v a r   s e l e c t s   =   $ ( ' l i g h t w i n d o w _ c o n t e n t 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 ' ) ;  
 	 	 }   e l s e   {  
 	 	 	 v a r   s e l e c t s   =   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 e l e c t ' ) ;  
 	 	 }  
 	 	  
 	 	 f o r ( v a r   i   =   0 ;   i   <   s e l e c t s . l e n g t h ;   i + + )   {  
 	 	 	 s e l e c t s [ i ] . s t y l e . v i s i b i l i t y   =   v i s i b i l i t y ;  
 	 	 }  
 	 	  
 	 	 i f   ( ! c o n t e n t )   {  
 	 	 	 i f   ( t h i s . o p t i o n s . h i d e F l a s h ) {  
 	 	 	 	 v a r   o b j e c t s   =   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 ( ' o b j e c t ' ) ;  
 	 	 	 	 f o r   ( i   =   0 ;   i   ! =   o b j e c t s . l e n g t h ;   i + + )   {  
 	 	 	 	 	 o b j e c t s [ i ] . s t y l e . v i s i b i l i t y   =   v i s i b i l i t y ;  
 	 	 	 	 }  
 	 	 	 	 v a r   e m b e d s   =   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 ( ' e m b e d ' ) ;  
 	 	 	 	 f o r   ( i   =   0 ;   i   ! =   e m b e d s . l e n g t h ;   i + + )   {  
 	 	 	 	 	 e m b e d s [ i ] . s t y l e . v i s i b i l i t y   =   v i s i b i l i t y ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 v a r   i f r a m e s   =   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 ( ' i f r a m e ' ) ;  
 	 	 	 f o r   ( i   =   0 ;   i   ! =   i f r a m e s . l e n g t h ;   i + + )   {  
 	 	 	 	 i f r a m e s [ i ] . s t y l e . v i s i b i l i t y   =   v i s i b i l i t y ;  
 	 	 	 }  
 	 	 }  
 	 } ,  
 	 / /    
 	 / /     G e t   t h e   a c t u a l   p a g e   s i z e  
 	 / /  
 	 _ g e t P a g e D i m e n s i o n s   :   f u n c t i o n ( )   {  
 	 	 v a r   x S c r o l l ,   y S c r o l l ;  
 	 	 i f   ( w i n d o w . i n n e r H e i g h t   & &   w i n d o w . s c r o l l M a x Y )   { 	  
 	 	 	 x S c r o l l   =   d o c u m e n t . b o d y . s c r o l l W i d t h ;  
 	 	 	 y S c r o l l   =   w i n d o w . i n n e r H e i g h t   +   w i n d o w . s c r o l l M a x Y ;  
 	 	 }   e l s e   i f   ( d o c u m e n t . b o d y . s c r o l l H e i g h t   >   d o c u m e n t . b o d y . o f f s e t H e i g h t ) {    
 	 	 	 x S c r o l l   =   d o c u m e n t . b o d y . s c r o l l W i d t h ;  
 	 	 	 y S c r o l l   =   d o c u m e n t . b o d y . s c r o l l H e i g h t ;  
 	 	 }   e l s e   {    
 	 	 	 x S c r o l l   =   d o c u m e n t . b o d y . o f f s e t W i d t h ;  
 	 	 	 y S c r o l l   =   d o c u m e n t . b o d y . o f f s e t H e i g h t ;  
 	 	 }  
  
 	 	 v a r   w i n d o w W i d t h ,   w i n d o w H e i g h t ;  
 	 	 i f   ( s e l f . i n n e r H e i g h t )   { 	  
 	 	 	 w i n d o w W i d t h   =   s e l f . i n n e r W i d t h ;  
 	 	 	 w i n d o w H e i g h t   =   s e l f . i n n e r H e i g h t ;  
 	 	 }   e l s e   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 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 )   {    
 	 	 	 w i n d o w W i d t h   =   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ;  
 	 	 	 w i n d o w H e i g h t   =   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ;  
 	 	 }   e l s e   i f   ( d o c u m e n t . b o d y )   {    
 	 	 	 w i n d o w W i d t h   =   d o c u m e n t . b o d y . c l i e n t W i d t h ;  
 	 	 	 w i n d o w H e i g h t   =   d o c u m e n t . b o d y . c l i e n t H e i g h t ;  
 	 	 } 	  
  
 	 	 i f ( y S c r o l l   <   w i n d o w H e i g h t ) {  
 	 	 	 t h i s . p a g e D i m e n s i o n s . h e i g h t   =   w i n d o w H e i g h t ;  
 	 	 }   e l s e   {    
 	 	 	 t h i s . p a g e D i m e n s i o n s . h e i g h t   =   y S c r o l l ;  
 	 	 }  
  
 	 	 i f ( x S c r o l l   <   w i n d o w W i d t h ) { 	  
 	 	 	 t h i s . p a g e D i m e n s i o n s . w i d t h   =   w i n d o w W i d t h ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . p a g e D i m e n s i o n s . w i d t h   =   x S c r o l l ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 D i s p l a y   t h e   l i g h t W i n d o w .  
 	 / /  
 	 _ d i s p l a y L i g h t W i n d o w   :   f u n c t i o n ( d i s p l a y ,   v i s i b i l i t y )   {  
 	 	 $ ( ' l i g h t w i n d o w _ o v e r l a y ' ) . s t y l e . d i s p l a y   =   $ ( ' l i g h t w i n d o w ' ) . s t y l e . d i s p l a y   =   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . s t y l e . d i s p l a y   =   d i s p l a y ; 	  
 	 	 $ ( ' l i g h t w i n d o w _ o v e r l a y ' ) . s t y l e . v i s i b i l i t y   =   $ ( ' l i g h t w i n d o w ' ) . s t y l e . v i s i b i l i t y   =   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . s t y l e . v i s i b i l i t y   =   v i s i b i l i t y ;  
 	 } ,  
 	 / /  
 	 / / 	 S e t u p   D i m e n s i o n s   o f   l i g h t w i n d o w .  
  
 	 / /  
 	 _ s e t u p D i m e n s i o n s   :   f u n c t i o n ( )   {  
  
 	 	 v a r   o r i g i n a l H e i g h t ,   o r i g i n a l W i d t h ;  
 	 	 s w i t c h   ( t h i s . w i n d o w T y p e )   {  
 	 	 	 c a s e   ' p a g e '   :  
 	 	 	 	 o r i g i n a l H e i g h t   =   t h i s . o p t i o n s . d i m e n s i o n s . p a g e . h e i g h t ;  
 	 	 	 	 o r i g i n a l W i d t h   =   t h i s . o p t i o n s . d i m e n s i o n s . p a g e . w i d t h ;  
 	 	 	 	 b r e a k ;  
  
 	 	 	 c a s e   ' i m a g e '   :  
 	 	 	 	 o r i g i n a l H e i g h t   =   t h i s . o p t i o n s . d i m e n s i o n s . i m a g e . h e i g h t ;  
 	 	 	 	 o r i g i n a l W i d t h   =   t h i s . o p t i o n s . d i m e n s i o n s . i m a g e . w i d t h ;  
 	 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 	 c a s e   ' m e d i a '   :  
 	 	 	 	 o r i g i n a l H e i g h t   =   t h i s . o p t i o n s . d i m e n s i o n s . m e d i a . h e i g h t ;  
 	 	 	 	 o r i g i n a l W i d t h   =   t h i s . o p t i o n s . d i m e n s i o n s . m e d i a . w i d t h ;  
 	 	 	 	 b r e a k ;  
 	 	 	  
 	 	 	 c a s e   ' e x t e r n a l '   :    
 	 	 	 	 o r i g i n a l H e i g h t   =   t h i s . o p t i o n s . d i m e n s i o n s . e x t e r n a l . h e i g h t ;  
 	 	 	 	 o r i g i n a l W i d t h   =   t h i s . o p t i o n s . d i m e n s i o n s . e x t e r n a l . w i d t h ;  
 	 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 	 c a s e   ' i n l i n e '   :  
 	 	 	 	 o r i g i n a l H e i g h t   =   t h i s . o p t i o n s . d i m e n s i o n s . i n l i n e . h e i g h t ;  
 	 	 	 	 o r i g i n a l W i d t h   =   t h i s . o p t i o n s . d i m e n s i o n s . i n l i n e . w i d t h ;  
 	 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 	 d e f a u l t   :  
 	 	 	 	 o r i g i n a l H e i g h t   =   t h i s . o p t i o n s . d i m e n s i o n s . p a g e . h e i g h t ;  
 	 	 	 	 o r i g i n a l W i d t h   =   t h i s . o p t i o n s . d i m e n s i o n s . p a g e . w i d t h ;  
 	 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 }  
  
 	 	 v a r   o f f s e t H e i g h t   =   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ t o p ' )   ?   p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ t o p ' ) ) + t h i s . p a g e P o s i t i o n . y   :   t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t / 2 + t h i s . p a g e P o s i t i o n . y ;  
 	 	 v a r   o f f s e t W i d t h   =   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ l e f t ' )   ?   p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ l e f t ' ) ) + t h i s . p a g e P o s i t i o n . x   :   t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h / 2 + t h i s . p a g e P o s i t i o n . x ;  
 	 	  
 	 	 / /   S o   i f   a   t h e m e   h a s   s a y   s h a d o w e d   e d g e s ,   t h e y   s h o u l d   b e   c o n s i s t a n t   a n d   t a k e   c a r e   o f   i n   t h e   c o n t e n t O f f s e t  
 	 	 $ ( ' l i g h t w i n d o w ' ) . s e t S t y l e ( {  
 	 	 	 t o p :   o f f s e t H e i g h t + ' p x ' ,  
 	 	 	 l e f t :   o f f s e t W i d t h + ' p x '  
 	 	 } ) ;  
 	 	  
 	 	 $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 h e i g h t :   o r i g i n a l H e i g h t + ' p x ' ,  
 	 	 	 w i d t h :   o r i g i n a l W i d t h + ' p x ' ,  
 	 	 	 l e f t :   - ( o r i g i n a l W i d t h / 2 ) + ' p x ' ,  
 	 	 	 t o p :   - ( o r i g i n a l H e i g h t / 2 ) + ' p x '  
 	 	 } ) ;  
  
 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s e t S t y l e ( {  
 	 	 	 h e i g h t :   o r i g i n a l H e i g h t + ' p x ' ,  
 	 	 	 w i d t h :   o r i g i n a l W i d t h + ' p x '  
 	 	 } ) ;  
 	 } ,  
 	 / /  
 	 / / 	 G e t   t h e   t y p e   o f   f i l e .  
 	 / /  
 	 _ f i l e T y p e   :   f u n c t i o n ( u r l )   {  
 	 	 v a r   i m a g e   =   n e w   R e g E x p ( " [ ^ \ . ] \ . ( " + t h i s . o p t i o n s . f i l e T y p e s . i m a g e . j o i n ( ' | ' ) + " ) \ s * $ " ,   " i " ) ;  
 	 	 i f   ( i m a g e . t e s t ( u r l ) )   r e t u r n   ' i m a g e ' ;  
 	 	 i f   ( u r l . i n d e x O f ( ' # ' )   >   - 1   & &   ( d o c u m e n t . d o m a i n   = =   t h i s . _ g e t D o m a i n ( u r l ) ) )   r e t u r n   ' i n l i n e ' ; 	 	  
 	 	 i f   ( u r l . i n d e x O f ( ' ? ' )   >   - 1 )   u r l   =   u r l . s u b s t r i n g ( 0 ,   u r l . i n d e x O f ( ' ? ' ) ) ;  
 	 	 v a r   t y p e   =   ' u n k n o w n ' ;  
 	 	 v a r   p a g e   =   n e w   R e g E x p ( " [ ^ \ . ] \ . ( " + t h i s . o p t i o n s . f i l e T y p e s . p a g e . j o i n ( ' | ' ) + " ) \ s * $ " ,   " i " ) ;  
 	 	 v a r   m e d i a   =   n e w   R e g E x p ( " [ ^ \ . ] \ . ( " + t h i s . o p t i o n s . f i l e T y p e s . m e d i a . j o i n ( ' | ' ) + " ) \ s * $ " ,   " i " ) ;  
 	 	 i f   ( d o c u m e n t . d o m a i n   ! =   t h i s . _ g e t D o m a i n ( u r l ) )   t y p e   =   ' e x t e r n a l ' ;  
 	     	 i f   ( m e d i a . t e s t ( u r l ) )   t y p e   =   ' m e d i a ' ;  
 	 	 i f   ( t y p e   = =   ' e x t e r n a l '   | |   t y p e   = =   ' m e d i a ' )   r e t u r n   t y p e ;  
 	     	 i f   ( p a g e . t e s t ( u r l )   | |   u r l . s u b s t r ( ( u r l . l e n g t h - 1 ) ,   u r l . l e n g t h )   = =   ' / ' )   t y p e   =   ' p a g e ' ;  
 	 	 r e t u r n   t y p e ;  
 	 } ,  
 	 / /  
 	 / /     G e t   f i l e   E x t e n s i o n  
 	 / /  
 	 _ f i l e E x t e n s i o n   :   f u n c t i o n ( u r l )   {  
 	 	 i f   ( u r l . i n d e x O f ( ' ? ' )   >   - 1 )   {  
 	 	 	 u r l   =   u r l . s u b s t r i n g ( 0 ,   u r l . i n d e x O f ( ' ? ' ) ) ;  
 	 	 }  
 	 	 v a r   e x t e n s t i o n   =   ' ' ;  
 	 	 f o r   ( v a r   x   =   ( u r l . l e n g t h - 1 ) ;   x   >   - 1 ;   x - - )   {  
 	 	 	 i f   ( u r l . c h a r A t ( x )   = =   ' . ' )   {  
 	 	 	 	 r e t u r n   e x t e n s t i o n ;  
 	 	 	 }  
 	 	 	 e x t e n s t i o n   =   u r l . c h a r A t ( x ) + e x t e n s t i o n ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 M o n i t o r   t h e   k e y b o a r d   w h i l e   t h i s   l i g h t w i n d o w   i s   u p  
 	 / /  
 	 _ m o n i t o r K e y b o a r d   :   f u n c t i o n ( s t a t u s )   {  
 	 	 i f   ( s t a t u s )   d o c u m e n t . o n k e y d o w n   =   t h i s . _ e v e n t K e y p r e s s . b i n d ( t h i s ) ;    
 	 	 e l s e   d o c u m e n t . o n k e y d o w n   =   ' ' ;  
 	 } ,  
 	 / /  
 	 / /     P e r f o r m   k e y b o a r d   a c t i o n s  
 	 / /  
 	 _ e v e n t K e y p r e s s   :   f u n c t i o n ( e )   {  
 	 	 i f   ( e   = =   n u l l )   {  
 	 	 	 v a r   k e y c o d e   =   e v e n t . k e y C o d e ;  
 	 	 }   e l s e   {  
 	 	 	 v a r   k e y c o d e   =   e . w h i c h ;  
 	 	 }  
 	 	  
 	 	 s w i t c h   ( k e y c o d e )   {    
 	 	 	 c a s e   2 7 :    
 	 	 	 	 t h i s . d e a c t i v a t e ( ) ;    
 	 	 	 	 b r e a k ;  
 	 	 	  
 	 	 	 c a s e   1 3 :  
 	 	 	 	 r e t u r n ;  
 	 	 	 	  
 	 	 	 d e f a u l t :  
 	 	 	 	 b r e a k ;  
 	 	 }  
 	  
 	 	 / /   G o t t a   s t o p   t h o s e   q u i c k   f i n g e r s  
 	 	 i f   ( t h i s . a n i m a t i n g )   {  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 	  
 	 	 s w i t c h   ( S t r i n g . f r o m C h a r C o d e ( k e y c o d e ) . t o L o w e r C a s e ( ) )   {  
 	 	 	 c a s e   ' p ' :  
 	 	 	 	 i f   ( t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s )   {  
 	 	 	 	 	 t h i s . n a v i g a t e W i n d o w ( ' p r e v i o u s ' ) ;  
 	 	 	 	 }  
 	 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 	 c a s e   ' n ' :  
 	 	 	 	 i f   ( t h i s . n a v i g a t i o n O b s e r v e r s . n e x t )   {  
 	 	 	 	 	 t h i s . n a v i g a t e W i n d o w ( ' n e x t ' ) ;  
 	 	 	 	 }  
 	 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 	 d e f a u l t :  
 	 	 	 	 b r e a k ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 G e t   G a l l e r y   I n f o r m a t i o n  
 	 / /  
 	 _ g e t G a l l e r y I n f o   :   f u n c t i o n ( r e l )   {  
 	 	 i f   ( ! r e l )   r e t u r n   f a l s e ;  
 	 	 i f   ( r e l . i n d e x O f ( ' [ ' )   >   - 1 )   {  
 	 	 	 r e t u r n   n e w   A r r a y ( e s c a p e ( r e l . s u b s t r i n g ( 0 ,   r e l . i n d e x O f ( ' [ ' ) ) ) ,   e s c a p e ( r e l . s u b s t r i n g ( r e l . i n d e x O f ( ' [ ' ) + 1 ,   r e l . i n d e x O f ( ' ] ' ) ) ) ) ;  
 	 	 }   e l s e   {  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / / 	 G e t   t h e   d o m a i n   f r o m   a   s t r i n g .  
 	 / /  
 	 _ g e t D o m a i n   :   f u n c t i o n ( u r l )   {          
                 v a r   l e a d S l a s h e s   =   u r l . i n d e x O f ( ' / / ' ) ;  
                 v a r   d o m a i n S t a r t   =   l e a d S l a s h e s + 2 ;  
                 v a r   w i t h o u t R e s o u r c e   =   u r l . s u b s t r i n g ( d o m a i n S t a r t ,   u r l . l e n g t h ) ;  
                 v a r   n e x t S l a s h   =   w i t h o u t R e s o u r c e . i n d e x O f ( ' / ' ) ;  
                 v a r   d o m a i n   =   w i t h o u t R e s o u r c e . s u b s t r i n g ( 0 ,   n e x t S l a s h ) ;  
 	 	 i f   ( d o m a i n . i n d e x O f ( ' : ' )   >   - 1 ) {  
 	 	 	 v a r   p o r t C o l o n   =   d o m a i n . i n d e x O f ( ' : ' ) ;  
 	 	 	 d o m a i n   =   d o m a i n . s u b s t r i n g ( 0 ,   p o r t C o l o n ) ;  
               	 }  
 	 	 r e t u r n   d o m a i n ;  
         } ,  
 	 / /  
 	 / / 	 G e t   t h e   v a l u e   f r o m   t h e   p a r a m s   a t t r i b u t e   s t r i n g .  
 	 / /  
 	 _ g e t P a r a m e t e r   :   f u n c t i o n ( p a r a m e t e r ,   p a r a m e t e r s )   {  
 	 	 i f   ( ! t h i s . e l e m e n t )   r e t u r n   f a l s e ;  
 	 	 i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ t o p '   & &   t h i s . e l e m e n t . t o p )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . t o p ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ l e f t '   & &   t h i s . e l e m e n t . l e f t )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . l e f t ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ t y p e '   & &   t h i s . e l e m e n t . t y p e )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . t y p e ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ s h o w _ i m a g e s '   & &   t h i s . e l e m e n t . s h o w I m a g e s )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . s h o w I m a g e s ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ h e i g h t '   & &   t h i s . e l e m e n t . h e i g h t )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . h e i g h t ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ w i d t h '   & &   t h i s . e l e m e n t . w i d t h )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . w i d t h ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ l o a d i n g _ a n i m a t i o n '   & &   t h i s . e l e m e n t . l o a d i n g A n i m a t i o n )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . l o a d i n g A n i m a t i o n ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ i f r a m e _ e m b e d '   & &   t h i s . e l e m e n t . i f r a m e E m b e d )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . i f r a m e E m b e d ) ;  
 	 	 }   e l s e   i f   ( p a r a m e t e r   = =   ' l i g h t w i n d o w _ f o r m '   & &   t h i s . e l e m e n t . f o r m )   {  
 	 	 	 r e t u r n   u n e s c a p e ( t h i s . e l e m e n t . f o r m ) ;  
 	 	 }   e l s e   {  
 	 	 	 i f   ( ! p a r a m e t e r s )   {  
 	 	 	 	 i f   ( t h i s . e l e m e n t . p a r a m s )   p a r a m e t e r s   =   t h i s . e l e m e n t . p a r a m s ;  
 	 	 	 	 e l s e   r e t u r n ;  
 	 	 	 }  
 	 	 	 v a r   v a l u e ;  
 	 	 	 v a r   p a r a m e t e r A r r a y   =   p a r a m e t e r s . s p l i t ( ' , ' ) ;  
 	 	 	 v a r   c o m p a r e S t r i n g   =   p a r a m e t e r + ' = ' ;  
 	 	 	 v a r   c o m p a r e L e n g t h   =   c o m p a r e S t r i n g . l e n g t h ;  
 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   p a r a m e t e r A r r a y . l e n g t h ;   i + + )   {  
 	 	 	 	 i f   ( p a r a m e t e r A r r a y [ i ] . s u b s t r ( 0 ,   c o m p a r e L e n g t h )   = =   c o m p a r e S t r i n g )   {  
 	 	 	 	 	 v a r   c u r r e n t P a r a m e t e r   =   p a r a m e t e r A r r a y [ i ] . s p l i t ( ' = ' ) ;  
 	 	 	 	 	 v a l u e   =   c u r r e n t P a r a m e t e r [ 1 ] ;  
 	 	 	 	 	 b r e a k ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 i f   ( ! v a l u e )   r e t u r n   f a l s e ;  
 	 	 	 e l s e   r e t u r n   u n e s c a p e ( v a l u e ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     G e t   t h e   B r o w s e r   V i e w p o r t   D i m e n s i o n s  
 	 / /  
 	 _ b r o w s e r D i m e n s i o n s   :   f u n c t i o n ( )   {  
 	 	 i f   ( P r o t o t y p e . B r o w s e r . I E )   {  
                         t h i s . d i m e n s i o n s . v i e w p o r 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 . c l i e n t H e i g h t ;  
                         t h i s . d i m e n s i o n s . v i e w p o r 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 . c l i e n t W i d t h ;        
                 }   e l s e   {  
                         t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t   =   w i n d o w . i n n e r H e i g h t ;  
                         t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h   =   d o c u m e n t . w i d t h   | |   d o c u m e n t . b o d y . o f f s e t W i d t h ;  
                 }  
 	 } ,  
 	 / /  
 	 / /     G e t   t h e   s c r o l l b a r   o f f s e t ,   I   d o n ' t   l i k e   t h i s   m e t h o d   b u t   t h e r e   i s   r e a l l y   n o   o t h e r   w a y   I   c a n   f i n d .  
 	 / /  
 	 _ g e t S c r o l l e r W i d t h   :   f u n c t i o n ( )   {  
 	         v a r   s c r o l l D i v   =   E l e m e n t . e x t e n d ( 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 c r o l l D i v . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ s c r o l l _ d i v ' ) ;  
 	 	 s c r o l l D i v . s e t S t y l e ( {  
 	 	 	 p o s i t i o n :   ' a b s o l u t e ' ,  
 	 	 	 t o p :   ' - 1 0 0 0 0 p x ' ,  
 	 	 	 l e f t :   ' - 1 0 0 0 0 p x ' ,  
 	 	 	 w i d t h :   ' 1 0 0 p x ' ,  
 	 	 	 h e i g h t :   ' 1 0 0 p x ' ,  
 	 	 	 o v e r f l o w :   ' h i d d e n '  
 	 	 } ) ;  
  
  
  
 	         v a r   c o n t e n t D i v   =   E l e m e n t . e x t e n d ( d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ) ;  
 	 	 c o n t e n t D i v . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ c o n t e n t _ s c r o l l _ d i v ' ) ;  
 	 	 c o n t e n t D i v . s e t S t y l e ( {  
 	 	 	 w i d t h :   ' 1 0 0 % ' ,  
 	 	 	 h e i g h t :   ' 2 0 0 p x '  
 	 	 } ) ;  
  
 	         s c r o l l D i v . a p p e n d C h i l d ( c o n t e n t D i v ) ;  
  
 	 	 v a r   b o d y   =   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 ( ' b o d y ' ) [ 0 ] ;  
 	 	 b o d y . a p p e n d C h i l d ( s c r o l l D i v ) ;  
  
 	         v a r   n o S c r o l l   =   $ ( ' l i g h t w i n d o w _ c o n t e n t _ s c r o l l _ d i v ' ) . o f f s e t W i d t h ;  
 	         s c r o l l D i v . s t y l e . o v e r f l o w   =   ' a u t o ' ;  
         	 v a r   w i t h S c r o l l   =   $ ( ' l i g h t w i n d o w _ c o n t e n t _ s c r o l l _ d i v ' ) . o f f s e t W i d t h ;  
  
 	       	 E l e m e n t . r e m o v e ( $ ( ' l i g h t w i n d o w _ s c r o l l _ d i v ' ) ) ;  
  
 	         t h i s . s c r o l l b a r O f f s e t   =   n o S c r o l l - w i t h S c r o l l ;  
 	 } ,  
 	  
  
 	 / /  
 	 / /     A d d   a   p a r a m   t o   a n   o b j e c t   d y n a m i c a l l y   c r e a t e d  
 	 / /  
 	 _ a d d P a r a m T o O b j e c t   :   f u n c t i o n ( n a m e ,   v a l u e ,   o b j e c t ,   i d )   {  
 	 	 v a r   p a r a m   =   d o c u m e n t . c r e a t e E l e m e n t ( ' p a r a m ' ) ;  
 	 	 p a r a m . s e t A t t r i b u t e ( ' v a l u e ' ,   v a l u e ) ;  
 	 	 p a r a m . s e t A t t r i b u t e ( ' n a m e ' ,   n a m e ) ;  
 	 	 i f   ( i d )   {  
 	 	 	 p a r a m . s e t A t t r i b u t e ( ' i d ' ,   i d ) ;  
 	 	 }  
 	 	 o b j e c t . a p p e n d C h i l d ( p a r a m ) ;  
 	 	 r e t u r n   o b j e c t ;  
 	 } ,  
 	 / /  
 	 / /     G e t   t h e   o u t e r   H T M L   o f   a n   o b j e c t   C R O S S   B R O W S E R  
 	 / /  
 	 _ o u t e r H T M L   :   f u n c t i o n ( o b j e c t )   {  
   	 	 i f   ( P r o t o t y p e . B r o w s e r . I E )   {  
 	 	 	 r e t u r n   o b j e c t . o u t e r H T M L ;  
 	 	 }   e l s e   {  
 	 	 	 v a r   c l o n e   =   o b j e c t . c l o n e N o d e ( t r u e ) ;  
 	 	 	 v a r   c l o n e D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 	 	 c l o n e D i v . a p p e n d C h i l d ( c l o n e ) ;  
 	 	 	 r e t u r n   c l o n e D i v . i n n e r H T M L ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     C o n v e r t   a n   o b j e c t   t o   m a r k u p  
 	 / /  
 	 _ c o n v e r t T o M a r k u p   :   f u n c t i o n ( o b j e c t ,   c l o s e T a g )   {  
 	 	 v a r   m a r k u p   =   t h i s . _ o u t e r H T M L ( o b j e c t ) . r e p l a c e ( ' < / ' + c l o s e T a g + ' > ' ,   ' ' ) ;  
 	 	 i f   ( P r o t o t y p e . B r o w s e r . I E )   {  
 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   o b j e c t . c h i l d N o d e s . l e n g t h ;   i + + ) {  
 	 	 	 	 m a r k u p   + =   t h i s . _ o u t e r H T M L ( o b j e c t . c h i l d N o d e s [ i ] ) ;  
 	 	 	 }  
 	 	 	 m a r k u p   + =   ' < / ' + c l o s e T a g + ' > ' ;  
 	 	 }  
 	 	 r e t u r n   m a r k u p ;  
 	 } ,  
 	 / /  
 	 / /     D e p e n d i n g   w h a t   t y p e   o f   b r o w s e r   i t   i s   w e   h a v e   t o   a p p e n d   t h e   o b j e c t   d i f f e r e n t l y . . .   D A M N   Y O U   I E ! !  
 	 / /  
 	 _ a p p e n d O b j e c t   :   f u n c t i o n ( o b j e c t ,   c l o s e T a g ,   a p p e n d T o )   {  
 	 	 i f   ( P r o t o t y p e . B r o w s e r . I E )   {  
 	 	 	 a p p e n d T o . i n n e r H T M L   + =   t h i s . _ c o n v e r t T o M a r k u p ( o b j e c t ,   c l o s e T a g ) ;  
 	 	 	  
 	 	 	 / /   F i x   t h e   E o l a s   a c t i v a t e   t h i n g   b u t   o n l y   f o r   s p e c i f i e d   m e d i a ,   f o r   e x a m p l e   d o i n g   t h i s   t o   a   q u i c k t i m e   f i l m   b r e a k s   i t .  
 	 	 	 i f   ( t h i s . o p t i o n s . E O L A S F i x . i n d e x O f ( t h i s . _ f i l e T y p e ( t h i s . e l e m e n t . h r e f ) )   >   - 1 )   {  
 	 	 	 	 v a r   o b j e c t E l e m e n t s   =   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 ( ' o b j e c t ' ) ;  
 	 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   o b j e c t E l e m e n t s . l e n g t h ;   i + + )   {  
 	 	 	 	 	 i f   ( o b j e c t E l e m e n t s [ i ] . g e t A t t r i b u t e ( " d a t a " ) )   o b j e c t E l e m e n t s [ i ] . r e m o v e A t t r i b u t e ( ' d a t a ' ) ;  
 	 	 	 	 	 o b j e c t E l e m e n t s [ i ] . o u t e r H T M L   =   o b j e c t E l e m e n t s [ i ] . o u t e r H T M L ;  
 	 	 	 	 	 o b j e c t E l e m e n t s [ i ] . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }   e l s e   {  
 	 	 	 a p p e n d T o . a p p e n d C h i l d ( o b j e c t ) ; 	  
 	 	 } 	  
 	 } ,  
 	 / /  
 	 / /     A d d   i n   i f r a m e  
 	 / /  
 	 _ a p p e n d I f r a m e   :   f u n c t i o n ( s c r o l l )   {  
 	 	 v a r   i f r a m e   =   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 ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ i f r a m e ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' n a m e ' ,   ' l i g h t w i n d o w _ i f r a m e ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' s r c ' ,   ' a b o u t : b l a n k ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' h e i g h t ' ,   ' 1 0 0 % ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' w i d t h ' ,   ' 1 0 0 % ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' f r a m e b o r d e r ' ,   ' 0 ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' m a r g i n w i d t h ' ,   ' 0 ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' m a r g i n h e i g h t ' ,   ' 0 ' ) ;  
 	 	 i f r a m e . s e t A t t r i b u t e ( ' s c r o l l i n g ' ,   s c r o l l ) ; 	  
 	 	  
 	 	 t h i s . _ a p p e n d O b j e c t ( i f r a m e ,   ' i f r a m e ' ,   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) ) ;  
 	 } ,  
 	 / /  
 	 / /     W r i t e   C o n t e n t   t o   t h e   i f r a m e   u s i n g   t h e   s k i n  
 	 / /  
 	 _ w r i t e T o I f r a m e   :   f u n c t i o n ( c o n t e n t )   {  
 	 	 v a r   t e m p l a t e   =   t h i s . o p t i o n s . s k i n . i f r a m e ;  
 	 	 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( ' { b o d y _ r e p l a c e } ' ,   c o n t e n t ) ;    
 	 	 i f   ( $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t W i n d o w ) {  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t W i n d o w . d o c u m e n t . o p e n ( ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t W i n d o w . d o c u m e n t . w r i t e ( t e m p l a t e ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t W i n d o w . d o c u m e n t . c l o s e ( ) ;  
 	 	 }   e l s e   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t D o c u m e n t . o p e n ( ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t D o c u m e n t . w r i t e ( t e m p l a t e ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . c o n t e n t D o c u m e n t . c l o s e ( ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     L o a d   t h e   w i n d o w   I n f o r m a t i o n  
 	 / /      
 	 _ l o a d W i n d o w   :   f u n c t i o n ( )   {  
 	 	 s w i t c h   ( t h i s . w i n d o w T y p e )   {  
 	 	 	 c a s e   ' i m a g e '   :  
  
 	 	 	 	 v a r   c u r r e n t   =   0 ;  
 	 	 	 	 v a r   i m a g e s   =   [ ] ;  
 	 	 	 	 t h i s . c h e c k I m a g e   =   [ ] ;  
 	 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . r e s i z e T o . w i d t h   =   0 ;  
 	 	 	 	 t h i s . i m a g e C o u n t   =   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ s h o w _ i m a g e s ' )   ?   p a r s e I n t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ s h o w _ i m a g e s ' ) )   :   1 ;  
  
 	 	 	 	 / /   I f   t h e r e   i s   a   g a l l e r y   g e t   i t  
 	 	 	 	 i f   ( g a l l e r y   =   t h i s . _ g e t G a l l e r y I n f o ( t h i s . e l e m e n t . r e l ) )   { 	  
 	 	 	 	 	 f o r   ( c u r r e n t   =   0 ;   c u r r e n t   <   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] . l e n g t h ;   c u r r e n t + + )   {  
 	 	 	 	 	 	 i f   ( t h i s . c o n t e n t T o F e t c h . i n d e x O f ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t ] . h r e f )   >   - 1 )   {  
 	 	 	 	 	 	 	 b r e a k ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }  
 	 	 	 	 	 i f   ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t - t h i s . i m a g e C o u n t ] )   {  
 	 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t - t h i s . i m a g e C o u n t ] ;  
 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s   =   f a l s e ;  
 	 	 	 	 	 }  
 	 	 	 	 	 i f   ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t + t h i s . i m a g e C o u n t ] )   {  
 	 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . n e x t   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t + t h i s . i m a g e C o u n t ] ;  
 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . n e x t   =   f a l s e ;  
 	 	 	 	 	 }  
 	 	 	 	 	  
 	 	 	 	 	 t h i s . a c t i v e G a l l e r y   =   t r u e ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s   =   f a l s e ;  
 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . n e x t   =   f a l s e ; 	 	 	 	 	  
  
 	 	 	 	 	 t h i s . a c t i v e G a l l e r y   =   f a l s e ;  
 	 	 	 	 }  
 	 	 	 	  
 	 	 	 	 f o r   ( v a r   i   =   c u r r e n t ;   i   <   ( c u r r e n t + t h i s . i m a g e C o u n t ) ;   i + + )   {  
 	 	  
 	 	 	 	 	 i f   ( g a l l e r y   & &   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ i ] )   {  
 	 	 	 	 	 	 t h i s . c o n t e n t T o F e t c h   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ i ] . h r e f ;  
 	 	 	 	 	 	  
 	 	 	 	 	 	 t h i s . g a l l e r y L o c a t i o n   =   { c u r r e n t :   ( i + 1 ) / t h i s . i m a g e C o u n t ,   t o t a l :   ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] . l e n g t h ) / t h i s . i m a g e C o u n t } ;  
 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 i f   ( ! t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ i + t h i s . i m a g e C o u n t ] )   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ n e x t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ n e x t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ n e x t _ t i t l e ' ) . i n n e r H T M L   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ i + t h i s . i m a g e C o u n t ] . t i t l e ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 	  
 	 	 	 	 	 	 i f   ( ! t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ i - t h i s . i m a g e C o u n t ] )   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s _ t i t l e ' ) . i n n e r H T M L   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ i - t h i s . i m a g e C o u n t ] . t i t l e ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }  
  
 	 	 	 	 	 i m a g e s [ i ]   =   d o c u m e n t . c r e a t e E l e m e n t ( ' i m g ' ) ;  
 	 	 	 	 	 i m a g e s [ i ] . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ i m a g e _ ' + i ) ;  
 	 	 	 	 	 i m a g e s [ i ] . s e t A t t r i b u t e ( ' b o r d e r ' ,   ' 0 ' ) ;  
 	 	 	 	 	 i m a g e s [ i ] . s e t A t t r i b u t e ( ' s r c ' ,   t h i s . c o n t e n t T o F e t c h ) ;  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . a p p e n d C h i l d ( i m a g e s [ i ] ) ;  
  
 	 	 	 	 	 / /   W e   h a v e   t o   d o   t h i s   i n s t e a d   o f   . o n l o a d    
 	 	 	 	 	 t h i s . c h e c k I m a g e [ i ]   =   n e w   P e r i o d i c a l E x e c u t e r ( f u n c t i o n ( i )   {  
 	 	 	 	 	 	 i f   ( ! ( t y p e o f   $ ( ' l i g h t w i n d o w _ i m a g e _ ' + i ) . n a t u r a l W i d t h   ! =   " u n d e f i n e d "   & &   $ ( ' l i g h t w i n d o w _ i m a g e _ ' + i ) . n a t u r a l W i d t h   = =   0 ) )   {  
 	  
 	 	 	 	 	 	 	 t h i s . c h e c k I m a g e [ i ] . s t o p ( ) ;  
 	  
 	 	 	 	 	 	 	 v a r   i m a g e H e i g h t   =   $ ( ' l i g h t w i n d o w _ i m a g e _ ' + i ) . g e t H e i g h t ( ) ;  
 	 	 	 	 	 	 	 i f   ( i m a g e H e i g h t   >   t h i s . r e s i z e T o . h e i g h t )   {  
 	 	 	 	 	 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   i m a g e H e i g h t ;  
 	 	 	 	 	 	 	 }  
 	 	 	 	 	 	 	 t h i s . r e s i z e T o . w i d t h   + =   $ ( ' l i g h t w i n d o w _ i m a g e _ ' + i ) . g e t W i d t h ( ) ;  
 	 	 	 	 	 	 	 t h i s . i m a g e C o u n t - - ;  
 	  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ i m a g e _ ' + i ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 h e i g h t :   ' 1 0 0 % '  
 	 	 	 	 	 	 	 } ) ;  
 	  
 	 	 	 	 	 	   	 i f   ( t h i s . i m a g e C o u n t   = =   0 )   {  
 	 	 	 	 	 	 	 	 t h i s . _ p r o c e s s W i n d o w ( ) ;  
 	 	 	 	 	 	   	 }  
 	 	 	 	 	 	 }  
 	 	 	 	 	  
 	 	 	 	 	 } . b i n d ( t h i s ,   i ) ,   1 ) ; 	 	 	  
 	 	 	 	 }  
  
  
 	 	 	 b r e a k ;  
 	 	  
 	 	 c a s e   ' m e d i a '   : 	 	 	  
 	 	  
 	 	 	 v a r   c u r r e n t   =   0 ;  
 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . r e s i z e T o . w i d t h   =   0 ;  
  
 	 	 	 / /   I f   t h e r e   i s   a   g a l l e r y   g e t   i t  
 	 	 	 i f   ( g a l l e r y   =   t h i s . _ g e t G a l l e r y I n f o ( t h i s . e l e m e n t . r e l ) )   { 	  
 	 	 	 	 f o r   ( c u r r e n t   =   0 ;   c u r r e n t   <   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] . l e n g t h ;   c u r r e n t + + )   {  
 	 	 	 	 	 i f   ( t h i s . c o n t e n t T o F e t c h . i n d e x O f ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t ] . h r e f )   >   - 1 )   {  
 	 	 	 	 	 	 b r e a k ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 	  
 	 	 	 	 i f   ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t - 1 ] )   {  
 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t - 1 ] ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s   =   f a l s e ;  
 	 	 	 	 }  
 	 	 	 	 i f   ( t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t + 1 ] )   {  
 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . n e x t   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t + 1 ] ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . n e x t   =   f a l s e ;  
 	 	 	 	 }  
 	 	  
 	 	 	 	 t h i s . a c t i v e G a l l e r y   =   t r u e ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . p r e v i o u s   =   f a l s e ;  
 	 	 	 	 t h i s . n a v i g a t i o n O b s e r v e r s . n e x t   =   f a l s e ;  
 	 	 	 	  
 	 	 	 	 t h i s . a c t i v e G a l l e r y   =   f a l s e ;  
 	 	 	 }  
 	 	  
  
 	 	 	 i f   ( g a l l e r y   & &   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t ] )   {  
 	 	 	 	 t h i s . c o n t e n t T o F e t c h   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t ] . h r e f ;  
  
 	 	 	 	 t h i s . g a l l e r y L o c a t i o n   =   { c u r r e n t :   c u r r e n t + 1 ,   t o t a l :   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] . l e n g t h } ;  
 	 	 	 	  
 	 	 	 	 i f   ( ! t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t + 1 ] )   {  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ n e x t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 	 } ) ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ n e x t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 	 } ) ;  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ n e x t _ t i t l e ' ) . i n n e r H T M L   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t + 1 ] . t i t l e ;  
 	 	 	 	 }  
 	 	 	 	  
 	 	 	 	 i f   ( ! t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t - 1 ] )   {  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 	 } ) ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 	 } ) ;  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ p r e v i o u s _ t i t l e ' ) . i n n e r H T M L   =   t h i s . g a l l e r i e s [ g a l l e r y [ 0 ] ] [ g a l l e r y [ 1 ] ] [ c u r r e n t - 1 ] . t i t l e ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	  
 	 	 	 i f   ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ i f r a m e _ e m b e d ' ) )   {  
 	 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t ;  
 	 	 	 	 t h i s . r e s i z e T o . w i d t h   =   t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h ; 	  
 	 	 	 }   e l s e   {  
 	 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ h e i g h t ' ) ;  
 	 	 	 	 t h i s . r e s i z e T o . w i d t h   =   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ w i d t h ' ) ; 	 	 	 	  
 	 	 	 }  
 	 	 	  
 	 	 	 t h i s . _ p r o c e s s W i n d o w ( ) ;  
 	 	 	  
 	 	 	 b r e a k ;  
  
 	 	 c a s e   ' e x t e r n a l '   : 	 	  
  
 	 	 	 t h i s . _ a p p e n d I f r a m e ( ' a u t o ' ) ;  
  
 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t ;  
 	 	 	 t h i s . r e s i z e T o . w i d t h   =   t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h ;  
 	 	 	 	 	 	  
 	 	 	 t h i s . _ p r o c e s s W i n d o w ( ) ;  
  
 	 	 	 b r e a k ;  
 	 	 	 	  
 	 	 c a s e   ' p a g e '   : 	  
 	 	 	  
 	 	 	 v a r   n e w A J A X   =   n e w   A j a x . R e q u e s t (  
 	 	 	 	 t h i s . c o n t e n t T o F e t c h ,   {  
 	 	 	 	 	 m e t h o d :   ' g e t ' ,    
 	 	 	 	 	 p a r a m e t e r s :   ' ' ,    
 	 	 	 	 	 o n C o m p l e t e :   f u n c t i o n ( r e s p o n s e )   {  
 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . i n n e r H T M L   + =   r e s p o n s e . r e s p o n s e T e x t ;  
 	 	 	 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s c r o l l H e i g h t + ( t h i s . o p t i o n s . c o n t e n t O f f s e t . h e i g h t ) ;  
 	 	 	 	 	 	 t h i s . r e s i z e T o . w i d t h   =   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s c r o l l W i d t h + ( t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h ) ;  
 	 	 	 	 	 	 t h i s . _ p r o c e s s W i n d o w ( ) ;  
 	 	 	 	 	 } . b i n d ( t h i s )  
 	 	 	 	 }  
 	 	 	 ) ;  
 	 	 	  
 	 	 	 b r e a k ;  
 	 	 	  
 	 	 c a s e   ' i n l i n e '   :    
 	 	  
 	 	 	 v a r   c o n t e n t   =   t h i s . c o n t e n t T o F e t c h ;  
 	 	 	 i f   ( c o n t e n t . i n d e x O f ( ' ? ' )   >   - 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 ,   c o n t e n t . i n d e x O f ( ' ? ' ) ) ;  
 	 	 	 }  
 	 	 	 c o n t e n t   =   c o n t e n t . s u b s t r i n g ( c o n t e n t . i n d e x O f ( ' # ' ) + 1 ) ;  
 	 	 	  
 	 	 	 n e w   I n s e r t i o n . T o p ( $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) ,   $ ( c o n t e n t ) . i n n e r H T M L ) ;  
 	 	 	  
 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s c r o l l H e i g h t + ( t h i s . o p t i o n s . c o n t e n t O f f s e t . h e i g h t ) ;  
 	 	 	 t h i s . r e s i z e T o . w i d t h   =   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s c r o l l W i d t h + ( t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h ) ;  
 	 	 	  
 	 	 	 t h i s . _ t o g g l e T r o u b l e E l e m e n t s ( ' h i d d e n ' ,   t r u e ) ;   	 	 	  
 	 	 	 t h i s . _ p r o c e s s W i n d o w ( ) ;  
 	 	 	  
 	 	 	 b r e a k ;  
 	 	 	  
 	 	 d e f a u l t   :    
 	 	 	 t h r o w ( " P a g e   T y p e   c o u l d   n o t   b e   d e t e r m i n e d ,   p l e a s e   a m e n d   t h i s   l i g h t w i n d o w   U R L   " + t h i s . c o n t e n t T o F e t c h ) ;  
 	 	 	 b r e a k ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     R e s i z e   t h e   W i n d o w   t o   f i t   t h e   v i e w p o r t   i f   n e c e s s a r y  
 	 / /  
 	 _ r e s i z e W i n d o w T o F i t   :   f u n c t i o n ( )   {  
 	 	 i f   ( t h i s . r e s i z e T o . h e i g h t + t h i s . d i m e n s i o n s . c r u f t . h e i g h t   >   t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t )   {  
 	 	 	 v a r   h e i g h t R a t i o   =   t h i s . r e s i z e T o . h e i g h t / t h i s . r e s i z e T o . w i d t h ;  
 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . d i m e n s i o n s . v i e w p o r t . h e i g h t - t h i s . d i m e n s i o n s . c r u f t . h e i g h t - ( 2 * t h i s . o p t i o n s . v i e w p o r t P a d d i n g ) ;  
 	 	 	 / /   W e   o n l y   c a r e   a b o u t   r a t i o ' s   w i t h   t h i s   w i n d o w   t y p e 	 	 	  
 	 	 	 i f   ( t h i s . w i n d o w T y p e   = =   ' i m a g e '   | |   ( t h i s . w i n d o w T y p e   = =   ' m e d i a '   & &   ! t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ i f r a m e _ e m b e d ' ) ) )   {  
 	 	 	 	 t h i s . r e s i z e T o . w i d t h   =   t h i s . r e s i z e T o . h e i g h t / h e i g h t R a t i o ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e _ i n n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 w i d t h :   t h i s . r e s i z e T o . w i d t h + ' p x '  
 	 	 	 	 } ) ; 	 	 	  
 	 	 	 }  
 	 	 }    
 	 	 i f   ( t h i s . r e s i z e T o . w i d t h + t h i s . d i m e n s i o n s . c r u f t . w i d t h   >   t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h )   {  
 	 	 	 v a r   w i d t h R a t i o   =   t h i s . r e s i z e T o . w i d t h / t h i s . r e s i z e T o . h e i g h t ;  
 	 	 	 t h i s . r e s i z e T o . w i d t h   =   t h i s . d i m e n s i o n s . v i e w p o r t . w i d t h - 2 * t h i s . d i m e n s i o n s . c r u f t . w i d t h - ( 2 * t h i s . o p t i o n s . v i e w p o r t P a d d i n g ) ;  
 	 	 	 / /   W e   o n l y   c a r e   a b o u t   r a t i o ' s   w i t h   t h i s   w i n d o w   t y p e  
 	 	 	 i f   ( t h i s . w i n d o w T y p e   = =   ' i m a g e '   | |   ( t h i s . w i n d o w T y p e   = =   ' m e d i a '   & &   ! t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ i f r a m e _ e m b e d ' ) ) )   {  
 	 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   t h i s . r e s i z e T o . w i d t h / w i d t h R a t i o ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e _ i n n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 h e i g h t :   t h i s . r e s i z e T o . h e i g h t + ' p x '  
 	 	 	 	 } ) ;  
 	 	 	 }  
 	 	 }  
 	 	 	  
 	 } ,  
 	 / /  
 	 / /     S e t   t h e   W i n d o w   t o   a   p r e s e t   s i z e  
 	 / /  
 	 _ p r e s e t W i n d o w S i z e   :   f u n c t i o n ( )   {  
 	 	 i f   ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ h e i g h t ' ) )   {  
 	 	 	 t h i s . r e s i z e T o . h e i g h t   =   p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ h e i g h t ' ) ) ;  
 	 	 }  
 	 	 i f   ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ w i d t h ' ) )   {  
 	 	 	 t h i s . r e s i z e T o . w i d t h   =   p a r s e F l o a t ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ w i d t h ' ) ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     P r o c e s s   t h e   W i n d o w  
 	 / /  
 	 _ p r o c e s s W i n d o w   :   f u n c t i o n ( )   {  
 	 	 / /   C l e a n   o u t   o u r   e f f e c t s  
 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s   =   [ ] ;  
  
 	 	 / /   S e t   u p   t h e   d a t a - s l i d e   i f   w e   h a v e   c a p t i o n   i n f o r m a t i o n  
 	 	 i f   ( t h i s . e l e m e n t . c a p t i o n   | |   t h i s . e l e m e n t . a u t h o r   | |   ( t h i s . a c t i v e G a l l e r y   & &   t h i s . o p t i o n s . s h o w G a l l e r y C o u n t ) )   {  
 	 	 	 i f   ( t h i s . e l e m e n t . c a p t i o n )   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ c a p t i o n ' ) . i n n e r H T M L   =   t h i s . e l e m e n t . c a p t i o n ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ c a p t i o n ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 } ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ c a p t i o n ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 } ) ; 	 	 	 	  
 	 	 	 }  
 	 	 	 i f   ( t h i s . e l e m e n t . a u t h o r )   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ a u t h o r ' ) . i n n e r H T M L   =   t h i s . e l e m e n t . a u t h o r ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ a u t h o r _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 } ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ a u t h o r _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 } ) ; 	 	 	 	  
 	 	 	 }  
 	 	 	 i f   ( t h i s . a c t i v e G a l l e r y   & &   t h i s . o p t i o n s . s h o w G a l l e r y C o u n t )   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ g a l l e r y _ c u r r e n t ' ) . i n n e r H T M L   =   t h i s . g a l l e r y L o c a t i o n . c u r r e n t ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ g a l l e r y _ t o t a l ' ) . i n n e r H T M L   =   t h i s . g a l l e r y L o c a t i o n . t o t a l ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ g a l l e r y _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 	 } ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ g a l l e r y _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 	 } ) ; 	 	 	 	  
 	 	 	 }  
  
 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e _ i n n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 w i d t h :   t h i s . r e s i z e T o . w i d t h + ' p x ' ,  
 	 	 	 	 h e i g h t :   ' a u t o ' ,  
 	 	 	 	 v i s i b i l i t y :   ' v i s i b l e ' ,  
 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 } ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . s e t S t y l e ( {  
 	 	 	 	 h e i g h t :   $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . g e t H e i g h t ( ) + ' p x ' ,  
 	 	 	 	 w i d t h :   ' 1 p x ' ,  
 	 	 	 	 o v e r f l o w :   ' h i d d e n ' ,  
 	 	 	 	 d i s p l a y :   ' b l o c k '  
 	 	 	 } ) ;  
 	 	 }   e l s e   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' n o n e ' ,  
 	 	 	 	 w i d t h :   ' a u t o '  
 	 	 	 } ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e _ i n n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' n o n e ' ,  
 	 	 	 	 v i s i b i l i t y :   ' h i d d e n ' ,  
 	 	 	 	 w i d t h :   t h i s . r e s i z e T o . w i d t h + ' p x ' ,  
 	 	 	 	 h e i g h t :   ' 0 p x '  
 	 	 	 } ) ;  
 	 	 }  
 	 	 	 	  
 	 	 i f   ( t h i s . e l e m e n t . t i t l e   ! =   ' n u l l ' )   { 	 	  
 	 	 	 $ ( ' l i g h t w i n d o w _ t i t l e _ b a r _ t i t l e ' ) . i n n e r H T M L   =   t h i s . e l e m e n t . t i t l e ;  
 	 	 }   e l s e   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ t i t l e _ b a r _ t i t l e ' ) . i n n e r H T M L   =   ' ' ;  
 	 	 }  
 	 	  
 	 	 v a r   o r i g i n a l C o n t a i n e r D i m e n s i o n s   =   { h e i g h t :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t H e i g h t ( ) ,   w i d t h :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t W i d t h ( ) } ;  
 	 	 / /   P o s i t i o n   t h e   w i n d o w  
         	 $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 h e i g h t :   ' a u t o ' ,  
 	 	 	 / /   W e   n e e d   t o   s e t   t h e   w i d t h   t o   a   p x   n o t   a u t o   a s   o p e r a   h a s   p r o b l e m s   w i t h   i t  
 	 	 	 w i d t h :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t W i d t h ( ) + t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h - ( t h i s . w i n d o w A c t i v e   ?   t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h   :   0 ) + ' p x '  
 	 	 } ) ;  
 	 	 v a r   n e w C o n t a i n e r D i m e n s i o n s   =   { h e i g h t :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t H e i g h t ( ) ,   w i d t h :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t W i d t h ( ) } ;  
   	 	  
 	 	 / /   W e   n e e d   t o   r e c o r d   t h e   c o n t a i n e r   d i m e n s i o n   c h a n g e s  
 	 	 t h i s . c o n t a i n e r C h a n g e   =   { h e i g h t :   o r i g i n a l C o n t a i n e r D i m e n s i o n s . h e i g h t - n e w C o n t a i n e r D i m e n s i o n s . h e i g h t ,   w i d t h :   o r i g i n a l C o n t a i n e r D i m e n s i o n s . w i d t h - n e w C o n t a i n e r D i m e n s i o n s . w i d t h } ;  
  
 	 	 / /   G e t   o u t   g e n e r a l   d i m e n s i o n s  
 	 	 t h i s . d i m e n s i o n s . c o n t a i n e r   =   { h e i g h t :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t H e i g h t ( ) ,   w i d t h :   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t W i d t h ( ) } ;  
 	 	 t h i s . d i m e n s i o n s . c r u f t   =   { h e i g h t :   t h i s . d i m e n s i o n s . c o n t a i n e r . h e i g h t - $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) + t h i s . o p t i o n s . c o n t e n t O f f s e t . h e i g h t ,   w i d t h :   t h i s . d i m e n s i o n s . c o n t a i n e r . w i d t h - $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t W i d t h ( ) + t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h } ;  
 	 	  
 	 	 / /   S e t   S i z e s   i f   w e   n e e d   t o o  
 	 	 t h i s . _ p r e s e t W i n d o w S i z e ( ) ;  
 	 	 t h i s . _ r e s i z e W i n d o w T o F i t ( ) ;   / /   E v e n   i f   t h e   w i n d o w   i s   p r e s e t   w e   s t i l l   d o n ' t   w a n t   i t   t o   g o   o u t s i d e   o f   t h e   v i e w p o r t  
  
 	 	 i f   ( ! t h i s . w i n d o w A c t i v e )   {  
 	 	 	 / /   P o s i t i o n   t h e   w i n d o w  
 	 	       	 $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 l e f t :   - ( t h i s . d i m e n s i o n s . c o n t a i n e r . w i d t h / 2 ) + ' p x ' ,  
 	 	 	 	 t o p :   - ( t h i s . d i m e n s i o n s . c o n t a i n e r . h e i g h t / 2 ) + ' p x '  
 	 	 	 } ) ;  
 	 	 }  
 	       	 $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 h e i g h t :   t h i s . d i m e n s i o n s . c o n t a i n e r . h e i g h t + ' p x ' ,  
 	 	 	 w i d t h :   t h i s . d i m e n s i o n s . c o n t a i n e r . w i d t h + ' p x '  
 	 	 } ) ;  
 	 	  
 	 	 / /   W e   a r e   r e a d y ,   l e t s   s h o w   t h i s   p u p p y   o f f !  
 	 	 t h i s . _ d i s p l a y L i g h t W i n d o w ( ' b l o c k ' ,   ' v i s i b l e ' ) ;  
 	 	 t h i s . _ a n i m a t e L i g h t W i n d o w ( ) ;  
 	 } ,  
 	 / /  
 	 / /     F i r e   o f f   o u r   a n i m a t i o n   h a n d l e r  
 	 / /  
 	 _ a n i m a t e L i g h t W i n d o w   :   f u n c t i o n ( )   {  
 	 	 i f   ( t h i s . o p t i o n s . a n i m a t i o n H a n d l e r )   {  
 	 	 	 t h i s . o p t i o n s . a n i m a t i o n H a n d l e r ( ) . b i n d ( t h i s ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ d e f a u l t A n i m a t i o n H a n d l e r ( ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     F i r e   o f f   o u r   t r a n s i t i o n   h a n d l e r  
 	 / /  
 	 _ h a n d l e N a v i g a t i o n   :   f u n c t i o n ( d i s p l a y )   {  
 	 	 i f   ( t h i s . o p t i o n s . n a v i g a t i o n H a n d l e r )   {  
 	 	 	 t h i s . o p t i o n s . n a v i g a t i o n H a n d l e r ( ) . b i n d ( t h i s ,   d i s p l a y ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ d e f a u l t D i s p l a y N a v i g a t i o n ( d i s p l a y ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     F i r e   o f f   o u r   t r a n s i t i o n   h a n d l e r  
 	 / /  
 	 _ h a n d l e T r a n s i t i o n   :   f u n c t i o n ( )   {  
 	 	 i f   ( t h i s . o p t i o n s . t r a n s i t i o n H a n d l e r )   {  
 	 	 	 t h i s . o p t i o n s . t r a n s i t i o n H a n d l e r ( ) . b i n d ( t h i s ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ d e f a u l t T r a n s i t i o n H a n d l e r ( ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     H a n d l e   t h e   f i n i s h   o f   t h e   w i n d o w   a n i m a t i o n  
 	 / /    
 	 _ h a n d l e F i n a l W i n d o w A n i m a t i o n   :   f u n c t i o n ( d e l a y )   {  
 	 	 i f   ( t h i s . o p t i o n s . f i n a l A n i m a t i o n H a n d l e r )   {  
 	 	 	 t h i s . o p t i o n s . f i n a l A n i m a t i o n H a n d l e r ( ) . b i n d ( t h i s ,   d e l a y ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ d e f a u l t f i n a l W i n d o w A n i m a t i o n H a n d l e r ( d e l a y ) ;  
 	 	 } 	 	  
 	 } ,  
 	 / /  
 	 / /     H a n d l e   t h e   g a l l e r y   A n i m a t i o n  
 	 / /    
 	 _ h a n d l e G a l l e r y A n i m a t i o n   :   f u n c t i o n ( l i s t )   {  
 	 	 i f   ( t h i s . o p t i o n s . g a l l e r y A n i m a t i o n H a n d l e r )   {  
 	 	 	 t h i s . o p t i o n s . g a l l e r y A n i m a t i o n H a n d l e r ( ) . b i n d ( t h i s ,   l i s t ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ d e f a u l t G a l l e r y A n i m a t i o n H a n d l e r ( l i s t ) ;  
 	 	 } 	 	  
 	 } ,  
 	 / /  
 	 / /     D i s p l a y   t h e   n a v i g a t i o n    
 	 / /  
 	 _ d e f a u l t D i s p l a y N a v i g a t i o n   :   f u n c t i o n ( d i s p l a y )   {  
 	 	 i f   ( d i s p l a y )   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ n a v i g a t i o n ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' b l o c k ' ,  
 	 	 	 	 h e i g h t :   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) + ' p x ' ,  
 	 	 	 	 w i d t h :   ' 1 0 0 % ' ,  
 	 	 	 	 m a r g i n T o p :   t h i s . o p t i o n s . d i m e n s i o n s . t i t l e H e i g h t + ' p x '  
 	 	 	 } ) ; 	 	 	  
 	 	 }   e l s e   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ n a v i g a t i o n ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' n o n e ' ,  
 	 	 	 	 h e i g h t :   ' a u t o ' ,  
 	 	 	 	 w i d t h :   ' a u t o '  
 	 	 	 } ) ; 	 	 	  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     T h i s   i s   t h e   d e f a u l t   a n i m a t i o n   h a n d l e r   f o r   L i g h t W i n d o w  
 	 / /  
 	 _ d e f a u l t A n i m a t i o n H a n d l e r   :   f u n c t i o n ( )   { 	  
 	 	 / /   N o w   t h a t   w e   h a v e   f i g u r e s   o u t   t h e   c r u f t   l e t s   m a k e   t h e   c a p t i o n   g o   a w a y   a n d   a d d   i t s   e f f e c t s  
 	 	 i f   ( t h i s . e l e m e n t . c a p t i o n   | |   t h i s . e l e m e n t . a u t h o r   | |   ( t h i s . a c t i v e G a l l e r y   & &   t h i s . o p t i o n s . s h o w G a l l e r y C o u n t ) )   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' n o n e ' ,  
 	 	 	 	 w i d t h :   ' a u t o '  
 	 	 	 } ) ;  
 	 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 	 n e w   E f f e c t . S l i d e D o w n ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ,   { s y n c :   t r u e } ) ,  
 	 	 	 	 n e w   E f f e c t . A p p e a r ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ,   { s y n c :   t r u e ,   f r o m :   0 . 0 ,   t o :   1 . 0 } )  
 	 	 	 ) ;  
 	 	 }  
  
 	 	 / /   S e t   u p   t h e   T i t l e   i f   w e   h a v e   o n e  
 	 	 $ ( ' l i g h t w i n d o w _ t i t l e _ b a r _ i n n e r ' ) . s e t S t y l e ( {  
 	 	 	 h e i g h t :   ' 0 p x ' ,  
 	 	 	 m a r g i n T o p :   t h i s . o p t i o n s . d i m e n s i o n s . t i t l e H e i g h t + ' p x '  
 	 	 } ) ;  
 	 	  
 	 	 / /   W e   a l w a y s   w a n t   t h e   t i t l e   b a r   a s   w e l l  
 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 n e w   E f f e c t . M o r p h ( ' l i g h t w i n d o w _ t i t l e _ b a r _ i n n e r ' ,   { s y n c :   t r u e ,   s t y l e :   { h e i g h t :   t h i s . o p t i o n s . d i m e n s i o n s . t i t l e H e i g h t + ' p x ' ,   m a r g i n T o p :   ' 0 p x ' } } ) ,  
 	 	   	 n e w   E f f e c t . A p p e a r ( ' l i g h t w i n d o w _ t i t l e _ b a r _ i n n e r ' ,   { s y n c :   t r u e ,   f r o m :   0 . 0 ,   t o :   1 . 0 } )  
 	 	 ) ; 	 	  
 	 	  
 	 	 i f   ( ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 t h i s . _ h a n d l e G a l l e r y A n i m a t i o n ( f a l s e ) ;  
 	 	 	 i f   ( $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ c o n t a i n e r ' ) . g e t H e i g h t ( )   = =   0 )   {  
 	 	 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 	 	 n e w   E f f e c t . M o r p h ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ c o n t a i n e r ' ,   { s y n c :   t r u e ,   s t y l e :   { h e i g h t :   ' 2 0 p x ' ,   m a r g i n T o p :   ' 0 p x ' } } )  
 	 	 	 	 ) ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 w i d t h :   ' 0 p x '  
 	 	 	 	 } ) ;  
 	 	 	 }  
 	 	 }  
 	 	  
 	 	 v a r   r e s i z e d   =   f a l s e ;  
 	 	 v a r   r a t i o   =   t h i s . d i m e n s i o n s . c o n t a i n e r . w i d t h - $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t W i d t h ( ) + t h i s . r e s i z e T o . w i d t h + t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h ;  
 	 	 i f   ( r a t i o   ! =   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t W i d t h ( ) )   {  
 	 	 	 n e w   E f f e c t . P a r a l l e l ( [  
 	 	 	 	 	 n e w   E f f e c t . S c a l e ( ' l i g h t w i n d o w _ c o n t e n t s ' ,   1 0 0 * ( t h i s . r e s i z e T o . w i d t h / $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t W i d t h ( ) ) ,   { s c a l e F r o m :   1 0 0 * ( $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t W i d t h ( ) / ( $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t W i d t h ( ) + ( t h i s . o p t i o n s . c o n t e n t O f f s e t . w i d t h ) ) ) ,   s y n c :   t r u e ,     s c a l e Y :   f a l s e ,   s c a l e C o n t e n t :   f a l s e } ) ,  
 	 	 	 	 	 n e w   E f f e c t . S c a l e ( ' l i g h t w i n d o w _ c o n t a i n e r ' ,   1 0 0 * ( r a t i o / ( t h i s . d i m e n s i o n s . c o n t a i n e r . w i d t h ) ) ,   { s y n c :   t r u e ,   s c a l e Y :   f a l s e ,   s c a l e F r o m C e n t e r :   t r u e ,   s c a l e C o n t e n t :   f a l s e } )  
 	 	 	 	 ] ,   {  
 	 	 	 	 	 d u r a t i o n :   t h i s . d u r a t i o n ,    
 	 	 	 	 	 d e l a y :   0 . 2 5 ,  
 	 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }  
 	 	 	 	 }  
 	 	 	 ) ; 	 	  
 	 	 }  
 	 	  
 	 	 r a t i o   =   t h i s . d i m e n s i o n s . c o n t a i n e r . h e i g h t - $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) + t h i s . r e s i z e T o . h e i g h t + t h i s . o p t i o n s . c o n t e n t O f f s e t . h e i g h t ;  
 	 	 i f   ( r a t i o   ! =   $ ( ' l i g h t w i n d o w _ c o n t a i n e r ' ) . g e t H e i g h t ( ) )   {  
 	 	 	 n e w   E f f e c t . P a r a l l e l ( [  
 	 	 	 	 	 n e w   E f f e c t . S c a l e ( ' l i g h t w i n d o w _ c o n t e n t s ' ,   1 0 0 * ( t h i s . r e s i z e T o . h e i g h t / $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) ) ,   { s c a l e F r o m :   1 0 0 * ( $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) / ( $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) + ( t h i s . o p t i o n s . c o n t e n t O f f s e t . h e i g h t ) ) ) ,   s y n c :   t r u e ,   s c a l e X :   f a l s e ,   s c a l e C o n t e n t :   f a l s e } ) ,  
 	 	 	 	 	 n e w   E f f e c t . S c a l e ( ' l i g h t w i n d o w _ c o n t a i n e r ' ,   1 0 0 * ( r a t i o / ( t h i s . d i m e n s i o n s . c o n t a i n e r . h e i g h t ) ) ,   { s y n c :   t r u e ,   s c a l e X :   f a l s e ,   s c a l e F r o m C e n t e r :   t r u e ,   s c a l e C o n t e n t :   f a l s e } )  
 	 	 	 	 ] ,   {  
 	 	 	 	 	 d u r a t i o n :   t h i s . d u r a t i o n ,    
 	 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   { 	 	 	 	  
 	 	 	 	 	 	 i f   ( t h i s . d i m e n s i o n s . d a t a E f f e c t s . l e n g t h   >   0 )   {  
 	 	 	 	 	 	 	 i f   ( ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 	 w i d t h :   t h i s . r e s i z e T o . w i d t h + ' p x '  
 	 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 	 }  
 	 	 	 	 	 	 	 n e w   E f f e c t . P a r a l l e l ( t h i s . d i m e n s i o n s . d a t a E f f e c t s ,   {  
 	 	 	 	 	 	 	 	 	 d u r a t i o n :   t h i s . d u r a t i o n ,  
 	 	 	 	 	 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 	 	 	 	 t h i s . _ f i n i s h W i n d o w ( ) ;  
 	 	 	 	 	 	 	 	 	 } . b i n d ( t h i s ) ,  
 	 	 	 	 	 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }    
 	 	 	 	 	 	 	 	 }  
 	 	 	 	 	 	 	 ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 } . b i n d ( t h i s ) ,    
 	 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }    
 	 	 	 	 }  
 	 	 	 ) ;  
 	 	 	 r e s i z e d   =   t r u e ;  
 	 	 }  
 	 	  
 	 	 / /   W e   n e e d   t o   d o   o u r   d a t a   e f f e c t   s i n c e   t h e r e   w a s   n o   r e s i z i n g  
 	 	 i f   ( ! r e s i z e d   & &   t h i s . d i m e n s i o n s . d a t a E f f e c t s . l e n g t h   >   0 )   { 	  
 	 	 	 n e w   E f f e c t . P a r a l l e l ( t h i s . d i m e n s i o n s . d a t a E f f e c t s ,   {  
 	 	 	 	 	 d u r a t i o n :   t h i s . d u r a t i o n ,  
 	 	 	 	 	 b e f o r e S t a r t :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 i f   ( ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 w i d t h :   t h i s . r e s i z e T o . w i d t h + ' p x '  
 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 	 i f   ( t h i s . c o n t a i n e r C h a n g e . h e i g h t   ! =   0   | |   t h i s . c o n t a i n e r C h a n g e . w i d t h   ! =   0 )   {  
 	 	 	 	 	 	 	 n e w   E f f e c t . M o v e B y ( ' l i g h t w i n d o w _ c o n t a i n e r ' ,   t h i s . c o n t a i n e r C h a n g e . h e i g h t ,   t h i s . c o n t a i n e r C h a n g e . w i d t h ,   { t r a n s i t i o n :   E f f e c t . T r a n s i t i o n s . s i n o i d a l } ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 } . b i n d ( t h i s ) , 	 	 	  
 	 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 t h i s . _ f i n i s h W i n d o w ( ) ;  
 	 	 	 	 	 } . b i n d ( t h i s ) ,  
 	 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }    
 	 	 	 	 }  
 	 	 	 ) ;  
 	 	 } 	 	 	  
 	 	  
 	 } ,  
 	 / /  
 	 / /     F i n i s h   u p   W i n d o w   A n i m a t i o n  
 	 / /  
 	 _ d e f a u l t f i n a l W i n d o w A n i m a t i o n H a n d l e r   :   f u n c t i o n ( d e l a y )   {  
 	 	 i f   ( t h i s . w i n d o w T y p e   = =   ' m e d i a '   | |   t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ l o a d i n g _ a n i m a t i o n ' ) )   { 	  
 	 	 	 / /   B e c a u s e   o f   m a j o r   f l i c k e r i n g   w i t h   t h e   o v e r l a y   w e   j u s t   h i d e   i t   i n   t h i s   c a s e  
 	 	 	 E l e m e n t . h i d e ( ' l i g h t w i n d o w _ l o a d i n g ' ) ;  
 	 	 	 t h i s . _ h a n d l e N a v i g a t i o n ( t h i s . a c t i v e G a l l e r y ) ;  
 	 	 	 t h i s . _ s e t S t a t u s ( f a l s e ) ;  
 	 	 }   e l s e   {  
 	 	 	 E f f e c t . F a d e ( ' l i g h t w i n d o w _ l o a d i n g ' ,   {  
 	 	 	 	 d u r a t i o n :   0 . 7 5 ,  
 	 	 	 	 d e l a y :   1 . 0 ,    
 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   {  
 	 	 	 	 	 / /   J u s t   i n   c a s e   w e   n e e d   s o m e   s c r o l l   g o o d n e s s   ( t h i s   a l s o   a v o i d s   t h e   s w i s s   c h e e s e   e f f e c t )  
 	 	 	 	 	 i f   ( t h i s . w i n d o w T y p e   ! =   ' i m a g e '   & &   t h i s . w i n d o w T y p e   ! =   ' m e d i a '   & &   t h i s . w i n d o w T y p e   ! =   ' e x t e r n a l ' )   {  
 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 o v e r f l o w :   ' a u t o '  
 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 }  
 	 	 	 	 	 t h i s . _ h a n d l e N a v i g a t i o n ( t h i s . a c t i v e G a l l e r y ) ;  
 	 	 	 	 	 t h i s . _ d e f a u l t G a l l e r y A n i m a t i o n H a n d l e r ( ) ;  
 	 	 	 	 	 t h i s . _ s e t S t a t u s ( f a l s e ) ;  
 	 	 	 	 } . b i n d ( t h i s ) ,  
 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }  
 	 	 	 } ) ;  
 	 	 }  
 	 } ,  
 	 / /  
 	 / /     H a n d l e   t h e   g a l l e r y   A n i m a t i o n  
 	 / /  
 	 _ d e f a u l t G a l l e r y A n i m a t i o n H a n d l e r   :   f u n c t i o n ( l i s t )   {  
 	 	 i f   ( t h i s . a c t i v e G a l l e r y )   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' b l o c k ' ,  
 	 	 	 	 m a r g i n B o t t o m :   $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . g e t H e i g h t ( ) + t h i s . o p t i o n s . c o n t e n t O f f s e t . h e i g h t / 2 + ' p x '  
 	 	 	 } ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ n a v i g a t i o n ' ) . s e t S t y l e ( {  
 	 	 	 	 h e i g h t :   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) - 2 0 + ' p x '  
 	 	 	 } ) ;  
 	 	 }   e l s e   {  
 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s ' ) . s e t S t y l e ( {  
 	 	 	 	 d i s p l a y :   ' n o n e '  
 	 	 	 } ) ; 	  
 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ c o n t a i n e r ' ) . s e t S t y l e ( {  
 	 	 	 	 h e i g h t :   ' 0 p x ' ,  
 	 	 	 	 m a r g i n T o p :   ' 2 0 p x '  
 	 	 	 } ) ;  
 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . s e t S t y l e ( {  
 	 	 	 	 h e i g h t :   ' 0 p x '  
 	 	 	 } ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 	  
 	 	 i f   ( l i s t )   {  
 	 	 	 i f   ( $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . g e t H e i g h t ( )   = =   0 )   {  
 	 	 	 	 v a r   h e i g h t   =   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) . g e t H e i g h t ( ) * 0 . 8 0 ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ s p a n ' ) . c l a s s N a m e   =   ' d o w n ' ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 v a r   h e i g h t   =   0 ;  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ s p a n ' ) . c l a s s N a m e   =   ' u p ' ;  
 	 	 	 }  
  
 	 	 	 n e w   E f f e c t . M o r p h ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ,   {  
 	 	 	 	 d u r a t i o n :   t h i s . d u r a t i o n ,  
 	 	 	 	 t r a n s i t i o n :   E f f e c t . T r a n s i t i o n s . s i n o i d a l ,  
 	 	 	 	 s t y l e :   { h e i g h t :   h e i g h t + ' p x ' } ,  
 	 	 	 	 b e f o r e S t a r t :   f u n c t i o n ( )   {  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 o v e r f l o w :   ' h i d d e n '  
 	 	 	 	 	 } ) ; 	 	 	 	 	  
 	 	 	 	 } ,  
 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   {  
 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 o v e r f l o w :   ' a u t o '  
 	 	 	 	 	 } ) ;  
 	 	 	 	 } ,  
 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }  
 	 	 	 } ) ; 	  
 	 	 }  
 	 	  
 	 	  
 	 } ,  
 	 / /  
 	 / /     D e f a u l t   T r a n s i t i o n   H a n d l e r  
 	 / /  
 	 _ d e f a u l t T r a n s i t i o n H a n d l e r   :   f u n c t i o n ( )   {  
 	 	 / /   C l e a n   o u t   o u r   e f f e c t s  
 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s   =   [ ] ;  
  
 	 	 / /   N o w   t h a t   w e   h a v e   f i g u r e s   o u t   t h e   c r u f t   l e t s   m a k e   t h e   c a p t i o n   g o   a w a y   a n d   a d d   i t s   e f f e c t s  
 	 	 i f   ( $ ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ) . g e t S t y l e ( ' d i s p l a y ' )   ! =   ' n o n e ' )   {  
 	 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 	 n e w   E f f e c t . S l i d e U p ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ,   { s y n c :   t r u e } ) ,  
 	 	 	 	 n e w   E f f e c t . F a d e ( ' l i g h t w i n d o w _ d a t a _ s l i d e ' ,   { s y n c :   t r u e ,   f r o m :   1 . 0 ,   t o :   0 . 0 } )  
 	 	 	 ) ;  
 	 	 }  
 	 	  
 	 	 i f   ( ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 i f   ( $ ( ' l i g h t w i n d o w _ g a l l e r i e s ' ) . g e t H e i g h t ( )   ! =   0   & &   ! t h i s . o p t i o n s . h i d e G a l l e r y T a b )   {  
 	 	 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 	 	 n e w   E f f e c t . M o r p h ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ c o n t a i n e r ' ,   { s y n c :   t r u e ,   s t y l e :   { h e i g h t :   ' 0 p x ' ,   m a r g i n T o p :   ' 2 0 p x ' } } )  
 	 	 	 	 ) ;  
 	 	 	 }  
 	 	 	  
 	 	 	 i f   ( $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . g e t H e i g h t ( )   ! =   0 )   {  
 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ t a b _ s p a n ' ) . c l a s s N a m e   =   ' u p ' ;  
 	 	 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 	 	 n e w   E f f e c t . M o r p h ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ,   {  
 	 	 	 	 	 	 s y n c :   t r u e ,    
 	 	 	 	 	 	 s t y l e :   { h e i g h t :   ' 0 p x ' } ,  
 	 	 	 	 	 	 t r a n s i t i o n :   E f f e c t . T r a n s i t i o n s . s i n o i d a l ,  
 	 	 	 	 	 	 b e f o r e S t a r t :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 o v e r f l o w :   ' h i d d e n '  
 	 	 	 	 	 	 	 } ) ; 	 	 	 	 	  
 	 	 	 	 	 	 } ,  
 	 	 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 	 $ ( ' l i g h t w i n d o w _ g a l l e r i e s _ l i s t ' ) . s e t S t y l e ( {  
 	 	 	 	 	 	 	 	 o v e r f l o w :   ' a u t o '  
 	 	 	 	 	 	 	 } ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 } )  
 	 	 	 	 ) ;  
 	 	 	 }  
 	 	 }  
 	 	  
 	 	 / /   W e   a l w a y s   w a n t   t h e   t i t l e   b a r   a s   w e l l  
 	 	 t h i s . d i m e n s i o n s . d a t a E f f e c t s . p u s h (  
 	 	 	 n e w   E f f e c t . M o r p h ( ' l i g h t w i n d o w _ t i t l e _ b a r _ i n n e r ' ,   { s y n c :   t r u e ,   s t y l e :   { h e i g h t :   ' 0 p x ' ,   m a r g i n T o p :   t h i s . o p t i o n s . d i m e n s i o n s . t i t l e H e i g h t + ' p x ' } } ) ,  
 	 	   	 n e w   E f f e c t . F a d e ( ' l i g h t w i n d o w _ t i t l e _ b a r _ i n n e r ' ,   { s y n c :   t r u e ,   f r o m :   1 . 0 ,   t o :   0 . 0 } )  
 	 	 ) ;  
  
 	 	 n e w   E f f e c t . P a r a l l e l ( t h i s . d i m e n s i o n s . d a t a E f f e c t s ,   {  
 	 	 	 	 d u r a t i o n :   t h i s . d u r a t i o n ,  
 	 	 	 	 a f t e r F i n i s h :   f u n c t i o n ( )   {  
 	 	 	 	 	 t h i s . _ l o a d W i n d o w ( ) ;  
 	 	 	 	 } . b i n d ( t h i s ) ,  
 	 	 	 	 q u e u e :   { p o s i t i o n :   ' e n d ' ,   s c o p e :   ' l i g h t w i n d o w A n i m a t i o n ' }    
 	 	 	 }  
 	 	 ) ; 	  
 	 } ,  
 	 / /  
 	 / / 	 D e f a u l t   F o r m   h a n d l e r   f o r   L i g h t W i n d o w  
 	 / /  
 	 _ d e f a u l t F o r m H a n d l e r   :   f u n c t i o n ( e )   {  
 	 	 v a r   e l e m e n t   =   E v e n t . e l e m e n t ( e ) . p a r e n t N o d e ;  
 	 	 v a r   p a r a m e t e r S t r i n g   =   F o r m . s e r i a l i z e ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ f o r m ' ,   e l e m e n t . g e t A t t r i b u t e ( ' p a r a m s ' ) ) ) ;  
 	 	 i f   ( t h i s . o p t i o n s . f o r m M e t h o d   = =   ' p o s t ' )   {  
 	 	 	 v a r   n e w A J A X   =   n e w   A j a x . R e q u e s t ( e l e m e n t . h r e f ,   {    
 	 	 	 	 m e t h o d :   ' p o s t ' ,    
 	 	 	 	 p o s t B o d y :   p a r a m e t e r S t r i n g ,    
 	 	 	 	 o n C o m p l e t e :   t h i s . o p e n W i n d o w . b i n d ( t h i s ,   e l e m e n t )  
 	 	 	 } ) ;  
 	 	 }   e l s e   i f   ( t h i s . o p t i o n s . f o r m M e t h o d   = =   ' g e t ' )   {  
 	 	 	 v a r   n e w A J A X   =   n e w   A j a x . R e q u e s t ( e l e m e n t . h r e f ,   {    
 	 	 	 	 m e t h o d :   ' g e t ' ,    
 	 	 	 	 p a r a m e t e r s :   p a r a m e t e r S t r i n g ,    
 	 	 	 	 o n C o m p l e t e :   t h i s . o p e n W i n d o w . b i n d ( t h i s ,   e l e m e n t )  
 	 	 	 } ) ;  
 	 	 }  
 	 } ,  
 	 / /    
 	 / /     W r a p   e v e r y t h i n g   u p  
 	 / /  
 	 _ f i n i s h W i n d o w   :   f u n c t i o n ( )   {  
 	 	 i f   ( t h i s . w i n d o w T y p e   = =   ' e x t e r n a l ' )   {  
 	 	 	 / /   W e   s e t   t h e   e x t e r n a l s   s o u r c e   h e r e   b e c a u s e   i t   a l l o w s   f o r   a   m u c h   s m o o t h e r   a n i m a t i o n  
 	 	 	 $ ( ' l i g h t w i n d o w _ i f r a m e ' ) . s e t A t t r i b u t e ( ' s r c ' ,   t h i s . e l e m e n t . h r e f ) ;  
 	 	 	 t h i s . _ h a n d l e F i n a l W i n d o w A n i m a t i o n ( 1 ) ; 	  
 	 	 }   e l s e   i f   ( t h i s . w i n d o w T y p e   = =   ' m e d i a ' )   {  
  
 	 	 	 v a r   o u t e r O b j e c t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' o b j e c t ' ) ;  
 	 	 	 o u t e r O b j e c t . s e t A t t r i b u t e ( ' c l a s s i d ' ,   t h i s . o p t i o n s . c l a s s i d s [ t h i s . _ f i l e E x t e n s i o n ( t h i s . c o n t e n t T o F e t c h ) ] ) ;  
 	 	 	 o u t e r O b j e c t . s e t A t t r i b u t e ( ' c o d e b a s e ' ,   t h i s . o p t i o n s . c o d e b a s e s [ t h i s . _ f i l e E x t e n s i o n ( t h i s . c o n t e n t T o F e t c h ) ] ) ;  
 	 	 	 o u t e r O b j e c t . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ m e d i a _ p r i m a r y ' ) ;  
 	 	 	 o u t e r O b j e c t . s e t A t t r i b u t e ( ' n a m e ' ,   ' l i g h t w i n d o w _ m e d i a _ p r i m a r y ' ) ;  
 	 	 	 o u t e r O b j e c t . s e t A t t r i b u t e ( ' w i d t h ' ,   t h i s . r e s i z e T o . w i d t h ) ;  
 	 	 	 o u t e r O b j e c t . s e t A t t r i b u t e ( ' h e i g h t ' ,   t h i s . r e s i z e T o . h e i g h t ) ;  
 	 	 	 o u t e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' m o v i e ' ,   t h i s . c o n t e n t T o F e t c h ,   o u t e r O b j e c t ) ;  
 	 	 	 o u t e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' s r c ' ,   t h i s . c o n t e n t T o F e t c h ,   o u t e r O b j e c t ) ;  
 	 	 	 o u t e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' c o n t r o l l e r ' ,   ' t r u e ' ,   o u t e r O b j e c t ) ;  
 	 	 	 o u t e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' w m o d e ' ,   ' t r a n s p a r e n t ' ,   o u t e r O b j e c t ) ;  
 	 	 	 o u t e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' c a c h e ' ,   ' f a l s e ' ,   o u t e r O b j e c t ) ;  
 	 	 	 o u t e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' q u a l i t y ' ,   ' h i g h ' ,   o u t e r O b j e c t ) ;  
  
 	 	 	 i f   ( ! P r o t o t y p e . B r o w s e r . I E )   {  
 	 	 	 	 v a r   i n n e r O b j e c t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' o b j e c t ' ) ;  
 	 	 	 	 i n n e r O b j e c t . s e t A t t r i b u t e ( ' t y p e ' ,   t h i s . o p t i o n s . m i m e T y p e s [ t h i s . _ f i l e E x t e n s i o n ( t h i s . c o n t e n t T o F e t c h ) ] ) ;  
 	 	 	 	 i n n e r O b j e c t . s e t A t t r i b u t e ( ' d a t a ' ,   t h i s . c o n t e n t T o F e t c h ) ;  
 	 	 	 	 i n n e r O b j e c t . s e t A t t r i b u t e ( ' i d ' ,   ' l i g h t w i n d o w _ m e d i a _ s e c o n d a r y ' ) ;  
 	 	 	 	 i n n e r O b j e c t . s e t A t t r i b u t e ( ' n a m e ' ,   ' l i g h t w i n d o w _ m e d i a _ s e c o n d a r y ' ) ;  
 	 	 	 	 i n n e r O b j e c t . s e t A t t r i b u t e ( ' w i d t h ' ,   t h i s . r e s i z e T o . w i d t h ) ;  
 	 	 	 	 i n n e r O b j e c t . s e t A t t r i b u t e ( ' h e i g h t ' ,   t h i s . r e s i z e T o . h e i g h t ) ;  
 	 	 	 	 i n n e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' c o n t r o l l e r ' ,   ' t r u e ' ,   i n n e r O b j e c t ) ;  
 	 	 	 	 i n n e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' w m o d e ' ,   ' t r a n s p a r e n t ' ,   i n n e r O b j e c t ) ;  
 	 	 	 	 i n n e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' c a c h e ' ,   ' f a l s e ' ,   i n n e r O b j e c t ) ;  
 	 	 	 	 i n n e r O b j e c t   =   t h i s . _ a d d P a r a m T o O b j e c t ( ' q u a l i t y ' ,   ' h i g h ' ,   i n n e r O b j e c t ) ;  
 	 	 	  
 	 	 	 	 o u t e r O b j e c t . a p p e n d C h i l d ( i n n e r O b j e c t ) ;  
 	 	 	 } 	  
 	 	 	  
 	 	 	 i f   ( t h i s . _ g e t P a r a m e t e r ( ' l i g h t w i n d o w _ i f r a m e _ e m b e d ' ) )   {  
 	 	 	 	 t h i s . _ a p p e n d I f r a m e ( ' n o ' ) ;  
 	 	 	 	 t h i s . _ w r i t e T o I f r a m e ( t h i s . _ c o n v e r t T o M a r k u p ( o u t e r O b j e c t ,   ' o b j e c t ' ) ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 t h i s . _ a p p e n d O b j e c t ( o u t e r O b j e c t ,   ' o b j e c t ' ,   $ ( ' l i g h t w i n d o w _ c o n t e n t s ' ) ) ;  
 	 	 	 }  
  
 	 	 	 t h i s . _ h a n d l e F i n a l W i n d o w A n i m a t i o n ( 0 ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . _ h a n d l e F i n a l W i n d o w A n i m a t i o n ( 0 ) ;  
 	 	 }  
  
 	 	 / /   I n i t i a l i z e   a n y   a c t i o n s  
 	 	 t h i s . _ s e t u p A c t i o n s ( ) ;  
 	 }  
 }  
  
 / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * /  
  
 E v e n t . o b s e r v e ( w i n d o w ,   ' l o a d ' ,   l i g h t w i n d o w I n i t ,   f a l s e ) ;  
  
 / /  
 / / 	 S e t   u p   a l l   o f   o u r   l i n k s  
 / /  
 v a r   m y L i g h t W i n d o w   =   n u l l ;  
 f u n c t i o n   l i g h t w i n d o w I n i t ( )   {  
 	 m y L i g h t W i n d o w   =   n e w   l i g h t w i n d o w ( ) ;  
 } 
