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