ÿþ/ *   c o n f i g   * /  
 v a r   M A X _ N E W S _ D I S P L A Y   =   4 ;  
 v a r   N E W S _ F E E D _ U R L   =   " h t t p : / / w w w . g a w d a w i k i . o r g / r s s . x m l " ;  
  
 / *   i n i t i a l i z e   a n d   l o a d   f e e d   * /  
 g o o g l e . l o a d ( " f e e d s " ,   " 1 " ) ;  
 g o o g l e . s e t O n L o a d C a l l b a c k ( f u n c t i o n ( )   {  
         v a r   f e e d   =   n e w   g o o g l e . f e e d s . F e e d ( N E W S _ F E E D _ U R L ) ;  
         f e e d . s e t N u m E n t r i e s ( 1 0 ) ;  
         f e e d . l o a d ( f u n c t i o n ( r e s u l t )   {  
 	         $ ( " # n e w s F e e d L o a d " ) . h i d e ( ) ;  
 	         i f   ( ! r e s u l t . e r r o r )   {  
 	                 v a r   o u t p u t M a r k u p   =   " " ;  
 	                 v a r   c o u n t   =   0 ;  
 	                 o u t p u t M a r k u p   + =   " < u l > " ;  
 	                 f o r   ( v a r   i   =   0 ;   i   <   r e s u l t . f e e d . e n t r i e s . l e n g t h ;   i + + )   {  
 	 	 	         v a r   e n t r y   =   r e s u l t . f e e d . e n t r i e s [ i ] ;  
 	 	 	 	  
 	                         i f ( c o u n t   = =   M A X _ N E W S _ D I S P L A Y )  
 	                                 b r e a k ;  
 	 	                  
                                 o u t p u t M a r k u p   + =   " < l i   c l a s s = \ " n e w s L i s t I t e m \ " > " ;  
                                 o u t p u t M a r k u p   + =   " < a   h r e f = \ " "   +   e n t r y . l i n k   +   " \ "   t i t l e = \ " "   +   e n t r y . t i t l e   +   " \ "   t a r g e t = \ " _ b l a n k \ " > "   +   e n t r y . t i t l e   +   " < / a > " ;  
                                 o u t p u t M a r k u p   + =   " < / l i > " ;  
                                 c o u n t + + ;  
 	                 }  
 	                 o u t p u t M a r k u p   + =   " < / u l > " ;  
 	 	         $ ( " # n e w s Z o n e " ) . s h o w ( ) ;  
 	 	         $ ( " # n e w s Z o n e " ) . h t m l ( o u t p u t M a r k u p ) ;  
 	         }   e l s e   {  
 	 	         $ ( " # n e w s F e e d E r r o r " ) . s h o w ( ) ;  
 	         }  
         } ) ;  
 } ) ; 
