ÿþ/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
  
 	 S c r i p t 	 	 :   O v e r l a y  
 	 V e r s i o n 	 	 :   1 . 2  
 	 A u t h o r s 	 	 :   S a m u e l   b i r c h  
 	 D e s c 	 	 :   C o v e r s   t h e   w i n d o w   w i t h   a   s e m i - t r a n s p a r e n t   l a y e r .  
 	 L i c e n c e 	 	 :   O p e n   S o u r c e   M I T   L i c e n c e  
  
 	 M o d i f i e d :   L e o n a r d o   D i   L e l l a   ( l e o n a r d o @ d i l e l l a . o r g )   -   M o o T o o l s   1 . 2   s u p p o r t  
  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
  
 v a r   O v e r l a y   =   n e w   C l a s s ( {  
 	  
 	 g e t O p t i o n s :   f u n c t i o n ( ) {  
 	 	 r e t u r n   {  
 	 	 	 c o l o u r :   ' # 0 0 0 ' ,  
 	 	 	 o p a c i t y :   0 . 7 ,  
 	 	 	 z I n d e x :   1 ,  
 	 	 	 c o n t a i n e r :   d o c u m e n t . b o d y ,  
 	 	 	 o n C l i c k :   n e w   C l a s s ( )  
 	 	 } ;  
 	 } ,  
  
 	 i n i t i a l i z e :   f u n c t i o n ( o p t i o n s ) {  
 	 	 t h i s . s e t O p t i o n s ( t h i s . g e t O p t i o n s ( ) ,   o p t i o n s ) ;  
 	 	  
 	 	 t h i s . o p t i o n s . c o n t a i n e r   =   $ ( t h i s . o p t i o n s . c o n t a i n e r ) ;  
 	 	  
 	 	 t h i s . c o n t a i n e r   =   n e w   E l e m e n t ( ' d i v ' ) . s e t P r o p e r t y ( ' i d ' ,   ' O v e r l a y C o n t a i n e r ' ) . s e t S t y l e s ( {  
 	 	 	 p o s i t i o n :   ' a b s o l u t e ' ,  
 	 	 	 l e f t :   ' 0 p x ' ,  
 	 	 	 t o p :   ' 0 p x ' ,  
 	 	 	 w i d t h :   ' 1 0 0 % ' ,  
 	 	 	 v i s i b i l i t y :   ' h i d d e n ' ,  
 	 	 	 o v e r f l o w :   ' h i d d e n ' ,  
 	 	 	 z I n d e x :   t h i s . o p t i o n s . z I n d e x  
 	 	 } ) . i n j e c t ( t h i s . o p t i o n s . c o n t a i n e r , ' i n s i d e ' ) ;  
 	 	  
 	 	 t h i s . i f r a m e   =   n e w   E l e m e n t ( ' i f r a m e ' ) . s e t P r o p e r t i e s ( {  
 	 	 	 ' i d ' :   ' O v e r l a y I f r a m e ' ,  
 	 	 	 ' n a m e ' :   ' O v e r l a y I f r a m e ' ,  
 	 	 	 ' s r c ' :   ' j a v a s c r i p t : v o i d ( 0 ) ; ' ,  
 	 	 	 ' f r a m e b o r d e r ' :   1 ,  
 	 	 	 ' s c r o l l i n g ' :   ' n o '  
 	 	 } ) . s e t S t y l e s ( {  
 	 	 	 ' p o s i t i o n ' :   ' a b s o l u t e ' ,  
 	 	 	 ' t o p ' :   0 ,  
 	 	 	 ' l e f t ' :   0 ,  
 	 	 	 ' w i d t h ' :   ' 1 0 0 % ' ,  
 	 	 	 ' h e i g h t ' :   ' 1 0 0 % ' ,  
 	 	 	 ' f i l t e r ' :   ' p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ( s t y l e = 0 , o p a c i t y = 0 ) ' ,  
 	 	 	 ' o p a c i t y ' :   0 ,  
 	 	 	 ' z I n d e x ' :   1  
 	 	 } ) . i n j e c t ( t h i s . c o n t a i n e r , ' i n s i d e ' ) ;  
 	 	  
 	 	 t h i s . o v e r l a y   =   n e w   E l e m e n t ( ' d i v ' ) . s e t P r o p e r t y ( ' i d ' ,   ' O v e r l a y ' ) . s e t S t y l e s ( {  
 	 	 	 p o s i t i o n :   ' a b s o l u t e ' ,  
 	 	 	 l e f t :   ' 0 p x ' ,  
 	 	 	 t o p :   ' 0 p x ' ,  
 	 	 	 w i d t h :   ' 1 0 0 % ' ,  
 	 	 	 h e i g h t :   ' 1 0 0 % ' ,  
 	 	 	 z I n d e x :   2 ,  
 	 	 	 b a c k g r o u n d C o l o r :   t h i s . o p t i o n s . c o l o u r  
 	 	 } ) . i n j e c t ( t h i s . c o n t a i n e r , ' i n s i d e ' ) ;  
 	 	  
 	 	 t h i s . c o n t a i n e r . a d d E v e n t ( ' c l i c k ' ,   f u n c t i o n ( ) {  
 	 	 	 t h i s . o p t i o n s . o n C l i c k ( ) ;  
 	 	 } . b i n d ( t h i s ) ) ;  
 	 	  
 	 	 t h i s . f a d e   =   n e w   F x . M o r p h ( t h i s . c o n t a i n e r ,   ' o p a c i t y ' ) . s e t ( 0 ) ;  
 	 	 t h i s . p o s i t i o n ( ) ;  
 	 	  
 	 	 w i n d o w . a d d E v e n t ( ' r e s i z e ' ,   t h i s . p o s i t i o n . b i n d ( t h i s ) ) ;  
 	 } ,  
 	  
 	 p o s i t i o n :   f u n c t i o n ( ) {    
 	 	 i f ( t h i s . o p t i o n s . c o n t a i n e r   = =   d o c u m e n t . b o d y ) {    
 	 	 	 v a r   h   =   d o c u m e n t . g e t S c r o l l S i z e ( ) . x + ' p x ' ;    
 	 	 	 / / t h i s . c o n t a i n e r . s e t S t y l e s ( { t o p :   ' 0 p x ' ,   h e i g h t :   h } ) ;  
 	 	 	 t h i s . c o n t a i n e r . s e t S t y l e s ( { t o p :   ' 0 p x ' ,   h e i g h t :   ' 1 8 0 5 p x ' } ) ;  
 	 	 } e l s e {    
 	 	 	 v a r   m y C o o r d s   =   t h i s . o p t i o n s . c o n t a i n e r . g e t C o o r d i n a t e s ( ) ;    
 	 	 	 t h i s . c o n t a i n e r . s e t S t y l e s ( {  
 	 	 	 	 t o p :   m y C o o r d s . t o p + ' p x ' ,    
 	 	 	 	 h e i g h t :   m y C o o r d s . h e i g h t + ' p x ' ,    
 	 	 	 	 l e f t :   m y C o o r d s . l e f t + ' p x ' ,    
 	 	 	 	 w i d t h :   m y C o o r d s . w i d t h + ' p x '  
 	 	 	 } ) ;    
 	 	 }    
 	 } ,  
 	  
 	 s h o w :   f u n c t i o n ( ) {  
 	 	 t h i s . f a d e . s t a r t ( { ' o p a c i t y ' : [ 0 , t h i s . o p t i o n s . o p a c i t y ] ,   ' v i s i b i l i t y ' : ' v i s i b l e ' } ) ;  
 	 } ,  
 	  
 	 h i d e :   f u n c t i o n ( ) {  
 	 	 t h i s . f a d e . s t a r t ( { ' o p a c i t y ' : [ 0 , t h i s . o p t i o n s . o p a c i t y ] ,   ' v i s i b i l i t y ' : ' h i d d e n ' } ) ;  
 	 }  
 	  
 } ) ;  
 O v e r l a y . i m p l e m e n t ( n e w   O p t i o n s ) ;  
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
 
