ÿþ/ * *  
   *   J a v a s c r i p t   -   j Q u e r y   e n a b l e d  
   *  
   *   @ p a c k a g e   W P F r a m e w o r k  
   *   @ s u b p a c k a g e   M e d i a  
   * /  
  
 / *   E x a m p l e   j Q u e r y  
 j Q u e r y ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( $ )   {  
                 a l e r t ( ' j Q u e r y   +   s c r e e n . j s   i s   l o a d e d   a n d   r e a d y   t o   g o ! ' ) ;  
 } ) ;  
 * /  
  
 / /   D r o p d o w n   m e n u   u s i n g   s u p e r f i s h 	  
 j Q u e r y ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( $ )   {  
  
         $ ( ' . t a f S u b m i t I m a g e ' ) . c l i c k ( f u n c t i o n ( )   {  
         	 $ ( t h i s ) . c s s ( " o p a c i t y " ,   " . 5 " ) ;  
 	 	 s e t T i m e o u t   (   f u n c t i o n ( )   {  
 	 	 	 $ ( t h i s ) . a t t r ( ' d i s a b l e d ' ,   t r u e ) ;  
 	 	 } , 8 0 0 0 ) ;  
 	  
 	 	 s e t T i m e o u t   (   f u n c t i o n ( )   {  
 	 	 	 $ ( t h i s ) . c s s ( " o p a c i t y " ,   " 1 " ) . a t t r ( ' d i s a b l e d ' ,   f a l s e ) ;  
 	 	 } , 8 0 0 0 ) ;  
         } ) ;  
         	  
  
 	 o V a l i d a t o r   =   $ ( " # t a f F o o t e r F o r m " ) . v a l i d a t e ( { 	 	  
 	 	 / / s e t   t h e   r u l e s   f o r   t h e   f i e l d   n a m e s  
 	 	 r u l e s :   {  
 	 	 	 V i s i t o r N a m e :   {  
 	 	 	 	 r e q u i r e d :   t r u e ,  
 	 	 	 	 m i n l e n g t h :   2  
 	 	 	 } ,  
 	 	 	 V i s i t o r M a i l :   {  
 	 	 	 	 r e q u i r e d :   t r u e ,  
 	 	 	 	 e m a i l :   t r u e  
 	 	 	 } ,  
 	 	 	 F r i e n d N a m e _ 1 :   {  
 	 	 	 	 r e q u i r e d :   t r u e ,  
 	 	 	 	 m i n l e n g t h :   2  
 	 	 	 } ,  
 	 	 	 F r i e n d M a i l _ 1 :   {  
 	 	 	 	 r e q u i r e d :   t r u e ,  
 	 	 	 	 e m a i l :   t r u e  
 	 	 	 }  
 	 	 } ,  
 	 	 / / s e t   m e s s a g e s   t o   a p p e a r   i n l i n e  
 	 	 m e s s a g e s :   {  
 	 	 V i s i t o r N a m e :   " P l e a s e   e n t e r   y o u r   n a m e " ,  
 	 	 V i s i t o r M a i l :   " P l e a s e   e n t e r   a   v a l i d   e m a i l " ,  
 	 	 F r i e n d N a m e _ 1 :   " P l e a s e   e n t e r   y o u   f r i e n d ' s   n a m e " ,  
 	 	 F r i e n d M a i l _ 1 :   " P l e a s e   e n t e r   y o u r   f r i e n d ' s   e m a i l "  
 	 	 }  
 	 } ) ;  
 	 	  
 	 $ ( ' # t a f F o o t e r F o r m ' ) . a j a x F o r m ( {  
 	 	 s u c c e s s :   f u n c t i o n ( d a t a )   {  
 	 	 	 i f   ( d a t a = = 1 ) {  
 	 	 	 	 $ ( ' # t a f F o o t e r F o r m ' ) . r e s e t F o r m ( ) ;  
 	 	 	 	 $ ( ' # r e q u i r e d F i e l d ' ) . f a d e O u t ( " s l o w " ) ;  
 	 	 	 	 $ ( ' # t a f F o o t e r F o r m ' ) . f a d e O u t ( " s l o w " ) ;  
 	 	 	 	 s e t T i m e o u t   (   f u n c t i o n ( )   {  
 	 	 	 	 	 $ ( ' # s u c c e s s ' ) . f a d e I n ( " s l o w " ) ;  
 	 	 	 	 } , 1 0 0 0 ) ;  
 	 	 	 }   e l s e   i f   ( d a t a = = 2 )   {  
 	 	 	 	 $ ( ' # b a d s e r v e r ' ) . f a d e I n ( " s l o w " ) ;  
 	 	 	 }   e l s e   i f   ( d a t a = = 3 )   {  
 	 	 	 	 $ ( ' # b a d e m a i l ' ) . f a d e I n ( " s l o w " ) ;  
 	 	 	 }  
 	 	 } ,  
 	 	 b e f o r e S u b m i t :   f u n c t i o n ( )   {  
 	 	 	 r e t u r n   o V a l i d a t o r . v a l i d ( ) ;   / /   r e t u r n   t h e   v a l i d a t o r ' s   . v a l i d ( )   b o o l e a n  
 	 	 }  
         } ) ;  
          
 } ) ;  
 
