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