ÿþ$ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   {  
     $ ( " . a r t i c l e C o n t a i n e r " ) . e a c h ( f u n c t i o n ( )   {  
         i f   ( $ ( t h i s ) . f i n d ( " . t a g s " ) . l e n g t h   >   0 )   {  
             $ ( t h i s ) . f i n d ( " . a r t i c l e T a g s " ) . t e x t ( $ ( t h i s ) . f i n d ( " . t a g s " ) . t e x t ( ) ) ;  
         }  
     } ) ;  
     i f   ( $ ( ' . c o m m e n t ' ) . l e n g t h   > =   1 )   {  
         $ ( ' . c o m m e n t   l a b e l : n o t ( . c h e c k b o x g r o u p   l a b e l ) ' ) . l a b e l O v e r ( ' o v e r - a p p l y ' ) ;  
     }  
  
     $ ( ' . t a g s ' ) . t a g i f y ( ) ;  
     i f   ( w i n d o w . l o c a t i o n . h r e f . i n d e x O f ( " p r e v i e w = t r u e " )   ! =   - 1 )   {  
         $ ( " b o d y " ) . a d d C l a s s ( " p r e v i e w " ) ;  
         $ ( " # a d m i n H e a d e r   u l > l i : l a s t " ) . a d d C l a s s ( " u i - t a b s - s e l e c t e d " ) ;  
     }   e l s e   {  
         $ ( " # a d m i n H e a d e r   u l > l i : f i r s t " ) . a d d C l a s s ( " u i - t a b s - s e l e c t e d " ) ;  
     }  
 } ) ;  
  
  
 j Q u e r y . f n . t a g i f y   =   f u n c t i o n ( )   {  
 	 / / o n l y   i n   f r o n t e n d   m o d e   n o t   i n   e d i t m o d e  
 	 i f   ( $ ( ' b o d y . l o g i n M o d e ' ) . l e n g t h   = =   0 )   {  
 	 	 t h i s . e a c h ( f u n c t i o n ( )   {  
 	 	 	 v a r   w o r d s   =   $ ( t h i s ) . t e x t ( ) . s p l i t ( / \ b [ \ s , \ . - : ; ] * / )  
 	 	 	 $ ( t h i s ) . h t m l ( " " ) ;  
 	 	 	 v a r   l e n g t h   =   w o r d s . l e n g t h ;  
 	 	 	 f o r   ( v a r   i   =   0 ;   i   <   l e n g t h ;   i + + )   {  
 	 	 	 	 / / u r l   i s   e v e r y t h i n g   b e f o r e   / c i d ( # )   o r   / t a g ( T A G )  
 	 	 	 	 v a r   u r l   =   d o c u m e n t . l o c a t i o n . h r e f ;  
 	 	 	 	 i f   ( u r l . i n d e x O f ( ' / c i d ( ' )   >   0 )  
 	 	 	 	 	 u r l   =   u r l . s u b s t r ( 0 ,   u r l . i n d e x O f ( ' / c i d ( ' ) ) ;  
 	 	 	 	 i f   ( u r l . i n d e x O f ( ' / t a g ( ' )   >   0 )  
 	 	 	 	 	 u r l   =   u r l . s u b s t r ( 0 ,   u r l . i n d e x O f ( ' / t a g ( ' ) ) ;  
  
 	 	 	 	 v a r   a   =   d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ;  
 	 	 	 	 a . c l a s s N a m e   =   " t a g L i n k " ;  
 	 	 	 	 a . s e t A t t r i b u t e ( " h r e f " ,   u r l   +   " / t a g ( "   +   w o r d s [ i ]   +   " ) " ) ;  
 	 	 	 	 a . i n n e r H T M L   =   w o r d s [ i ] ;  
 	 	 	 	 $ ( t h i s ) . a p p e n d ( a ) ;  
 	 	 	 	 $ ( t h i s ) . a p p e n d ( '   ' ) ;  
 	 	 	 }  
 	 	 } ) ;  
 	 }  
 } ;  
  
 f u n c t i o n   C h e c k R e q u i r e d F i e l d ( s o u r c e ,   a r g s )   {  
 	 i f   ( a r g s . V a l u e . l e n g t h   >   0 )   {  
 	 	 a r g s . I s V a l i d   =   t r u e ;  
 	 }  
 	 e l s e   {  
 	 	 a r g s . I s V a l i d   =   f a l s e ;  
 	 }  
  
 	 S e t E r r o r C l a s s ( s o u r c e . c o n t r o l t o v a l i d a t e ,   a r g s . I s V a l i d ) ;  
 }  
  
 f u n c t i o n   C h e c k E m a i l ( s o u r c e ,   a r g s )   {  
 	 v a r   e l e m   =   d o c u m e n t . g e t E l e m e n t B y I d ( s o u r c e . c o n t r o l t o v a l i d a t e ) ;  
  
 	 i f   ( / \ w + ( [ - + . ' ] \ w + ) * @ \ w + ( [ - . ] \ w + ) * \ . \ w + ( [ - . ] \ w + ) * / i . t e s t ( e l e m . v a l u e ) )   {  
 	 	 a r g s . I s V a l i d   =   t r u e ;  
 	 }  
 	 e l s e   {  
 	 	 a r g s . I s V a l i d   =   f a l s e ;  
 	 }  
  
 	 S e t E r r o r C l a s s ( s o u r c e . c o n t r o l t o v a l i d a t e ,   a r g s . I s V a l i d ) ;  
 }  
  
 f u n c t i o n   S e t E r r o r C l a s s ( i n p u t I d ,   i s V a l i d )   {  
 	 v a r   e l e m e n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( i n p u t I d ) ;  
 	 i f   ( i s V a l i d )   {  
 	 	 e l e m e n t . c l a s s N a m e   =   e l e m e n t . c l a s s N a m e . r e p l a c e ( '   e r r o r ' ,   ' ' ) ;  
 	 	 i f   ( e l e m e n t . c l a s s N a m e   = =   ' e r r o r ' )   {  
 	 	 	 e l e m e n t . c l a s s N a m e   =   ' ' ;  
 	 	 }  
 	 }  
 	 e l s e   {  
 	 	 e l e m e n t . c l a s s N a m e   =   e l e m e n t . c l a s s N a m e . r e p l a c e ( '   e r r o r ' ,   ' ' )   +   '   e r r o r ' ;  
 	 }  
 } 
