ÿþ( f u n c t i o n ( $ )   { 	 
 	 / / M a i n   M e t h o d 
 	 $ . f n . r e p o r t p r o g r e s s   =   f u n c t i o n ( v a l , m a x V a l )   { 
 	         $ ( ' # i m g P r o g r e s s ' ) . s h o w ( ) ; 
 	         $ ( ' # p r o g r e s s b a r ' ) . s h o w ( ) ; 
 	 	 v a r   m a x = 1 0 0 ; 
 	 	 i f ( m a x V a l ) { 
 	 	 	 m a x = m a x V a l ; 
 	         } 
 	 	 r e t u r n   t h i s . e a c h ( 
 	 	 	 f u n c t i o n ( ) { 	 	 
 	 	 	 	 v a r   d i v = $ ( t h i s ) ; 
 	 	 	 	 v a r   i n n e r d i v = d i v . f i n d ( " . p r o g r e s s " ) ; 
 	 	 	 	 
 	 	 	 	 i f ( i n n e r d i v . l e n g t h ! = 1 ) { 	 	 	 	 	 	 
 	 	 	 	 	 i n n e r d i v = $ ( " < d i v   c l a s s = ' p r o g r e s s ' > < / d i v > " ) ; 	 	 	 	 	 
 	 	 	 	 	 d i v . a p p e n d ( " < d i v   c l a s s = ' t e x t ' > & n b s p ; < / d i v > " ) ; 
 	 	 	 	 	 $ ( " < s p a n   c l a s s = ' t e x t ' > & n b s p ; < / s p a n > " ) . c s s ( " w i d t h " , d i v . w i d t h ( ) ) . a p p e n d T o ( i n n e r d i v ) ; 	 	 	 	 	 
 	 	 	 	 	 d i v . a p p e n d ( i n n e r d i v ) ; 	 	 	 	 	 
 	 	 	 	 } 
 	 	 	 	 v a r   w i d t h = M a t h . r o u n d ( v a l / m a x * 1 0 0 ) ; 
 	 	 	 	 i n n e r d i v . c s s ( " w i d t h " , w i d t h + " % " ) ; 	 
 	 	 	 	 d i v . f i n d ( " . t e x t " ) . h t m l ( w i d t h + "   % " ) ; 
 	 	 	 	 i f ( p a r s e I n t ( w i d t h )   = =   1 0 0 ) { 
 / / 	 	 	 	         $ ( ' # i m g P r o g r e s s ' ) . h i d e ( ) ; 
 / / 	 	 	 	         $ ( ' # p r o g r e s s b a r ' ) . h i d e ( ) ; 
 	 	 	 	 } 
 	 	 	 } 
 	 	 ) ; 
 	 } ; 
 } ) ( j Q u e r y ) ; 
