ÿþ$ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( ) {  
 	 v a r   u r l   =   " h t t p s : / / e - s e r v i c e s . d e w a . g o v . a e / D e w a W e a t h e r S e r v i c e / S e r v i c e . a s m x / G e t W e a t h e r ? C i t y = D u b a i " ;  
 	 v a r   e n c u r l   =   " h t t p : / / q u e r y . y a h o o a p i s . c o m / v 1 / p u b l i c / y q l ? " + " q = s e l e c t % 2 0 * % 2 0 f r o m % 2 0 x m l % 2 0 w h e r e % 2 0 u r l % 3 D % 2 2 " + e n c o d e U R I C o m p o n e n t ( u r l ) + " % 2 2 & f o r m a t = x m l ' & c a l l b a c k = ? " ;  
 	 / / v a r   e n c u r l   =   " h t t p : / / q u e r y . y a h o o a p i s . c o m / v 1 / p u b l i c / y q l ? q = s e l e c t % 2 0 * % 2 0 f r o m % 2 0 x m l % 2 0 w h e r e % 2 0 u r l % 2 0 % 3 D % 2 0 % 2 2 h t t p s % 3 A % 2 F % 2 F e - s e r v i c e s . d e w a . g o v . a e % 2 F D e w a W e a t h e r S e r v i c e % 2 F S e r v i c e . a s m x % 2 F G e t W e a t h e r % 3 F C i t y % 3 D D u b a i % 2 2 & f o r m a t = j s o n & d i a g n o s t i c s = t r u e & c a l l b a c k = d a t a "  
 	 $ . g e t J S O N ( e n c u r l ,   f u n c t i o n ( d a t a ) {  
 	 	 i f ( d a t a . r e s u l t s [ 0 ] ) {  
 	 	 v a r   d a t a   =   f i l t e r D a t a ( d a t a . r e s u l t s [ 0 ] ) ;  
 	 	   g e t W e a t h e r ( d a t a ) ;  
 	 	 }   e l s e   {  
 	 	  
 	 	 }  
  
 	 	    
 	 } ) ;  
    
 } ) ;  
  
 f u n c t i o n   f i l t e r D a t a ( d a t a ) {    
       d a t a   =   d a t a . r e p l a c e ( / < ? \ / b o d y [ ^ > ] * > / g , ' ' ) ;          
       d a t a   =   d a t a . r e p l a c e ( / [ \ r | \ n ] + / g , ' ' ) ;  
       d a t a   =   d a t a . r e p l a c e ( / < - - [ \ S \ s ] * ? - - > / g , ' ' ) ;  
       d a t a   =   d a t a . r e p l a c e ( / < n o s c r i p t [ ^ > ] * > [ \ S \ s ] * ? < \ / n o s c r i p t > / g , ' ' ) ;  
       d a t a   =   d a t a . r e p l a c e ( / < s c r i p t [ ^ > ] * > [ \ S \ s ] * ? < \ / s c r i p t > / g , ' ' ) ;  
       d a t a   =   d a t a . r e p l a c e ( / < s c r i p t . * \ / > / , ' ' ) ;  
       r e t u r n   d a t a ;  
   }  
  
 f u n c t i o n   g e t W e a t h e r ( d a t a )   {  
 	 	 i f   ( w i n d o w . D O M P a r s e r )  
 	 	     {  
 	 	     p a r s e r = n e w   D O M P a r s e r ( ) ;  
 	 	     x m l D o c = p a r s e r . p a r s e F r o m S t r i n g ( d a t a , " t e x t / x m l " ) ;  
 	 	     }  
 	 	 e l s e   / /   I n t e r n e t   E x p l o r e r  
 	 	     {  
 	 	     x m l D o c = n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L D O M " ) ;  
 	 	     x m l D o c . a s y n c = " f a l s e " ;  
 	 	     x m l D o c . l o a d X M L ( d a t a ) ;  
 	 	     }    
 	 	 v a r   c o n d i t i o n   =   x m l D o c . g e t E l e m e n t s B y T a g N a m e ( " c o n d i t i o n " ) [ 0 ] . c h i l d N o d e s [ 0 ] . n o d e V a l u e ;  
 	 	 v a r   t e m p   =   x m l D o c . g e t E l e m e n t s B y T a g N a m e ( " t e m p " ) [ 0 ] . c h i l d N o d e s [ 0 ] . n o d e V a l u e ;  
 	 	 v a r   h u m i d i t y   =   x m l D o c . g e t E l e m e n t s B y T a g N a m e ( " h u m i d i t y " ) [ 0 ] . c h i l d N o d e s [ 0 ] . n o d e V a l u e ;  
 	 	 v a r   c o n d i t i o n s _ i m g   =   x m l D o c . g e t E l e m e n t s B y T a g N a m e ( " i c o n " ) [ 0 ] . c h i l d N o d e s [ 0 ] . n o d e V a l u e ;  
 	 	 v a r   c o n d i t i o n   =   c o n d i t i o n s _ i m g . r e p l a c e ( ' _ ' , '   ' ) ;    
 	 	 c o n d i t i o n   =   c o n d i t i o n . r e p l a c e ( ' . g i f ' , ' ' ) ;  
 	 	 s e t C o n d i t i o n s ( c o n d i t i o n ,   c o n d i t i o n s _ i m g ,   t e m p ,   h u m i d i t y ) ;  
 }  
  
  
 f u n c t i o n   s e t C o n d i t i o n s ( c o n d i t i o n ,   c o n d i t i o n s _ i m g ,   t e m p ,   h u m i d i t y )   {  
 s w i t c h ( c o n d i t i o n )   {  
 	 	 	 c a s e   ' c h a n c e   o f   r a i n ' :  
 	 	 	 	 c o n d i t i o n a r =   ' *HB9  G7HD  'D#E7'1' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' c h a n c e   o f   s n o w ' :  
 	 	 	 	 c o n d i t i o n a r = ' *HB9  *3'B7  'D+DH,' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' c h a n c e   o f   s t r o m ' :  
 	 	 	 	 c o n d i t i o n a r = ' *HB9  G(H(  9'5A)' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' c l o u d y ' :  
 	 	 	 	 c o n d i t i o n a r = ' :'&E' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' d u s t ' :  
 	 	 	 	 c o n d i t i o n a r = ' E:(1' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' f l u r r i e s ' :  
 	 	 	 	 c o n d i t i o n a r = ' +DH,' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' f o g ' :  
 	 	 	 	 c o n d i t i o n a r = ' 6('(' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' h a z e ' :  
 	 	 	 	 c o n d i t i o n a r = ' 6('(' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' i c y ' :  
 	 	 	 	 c o n d i t i o n a r = ' *,E/' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' m i s t ' :  
 	 	 	 	 c o n d i t i o n a r = ' 6('(' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' m o s t l y   c l o u d y ' :  
 	 	 	 	 c o n d i t i o n a r = ' :'&E  ,2&J'' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' m o s t l y   s u n n y ' :  
 	 	 	 	 c o n d i t i o n a r = ' E4E3  AJ  'D:'D(' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' p a r t l y   c l o u d y ' :  
 	 	 	 	 c o n d i t i o n a r = ' :'&E  ,2&J'' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' r a i n ' :  
 	 	 	 	 c o n d i t i o n a r = ' E71' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' s l e e t ' :  
 	 	 	 	 c o n d i t i o n a r = ' E71  E*,E/' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' s m o k e ' :  
 	 	 	 	 c o n d i t i o n a r = ' /.'F' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' s n o w ' :  
 	 	 	 	 c o n d i t i o n a r = ' +DH,' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' s t r o m ' :  
 	 	 	 	 c o n d i t i o n a r = ' 9'5A)' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' s u n n y ' :  
 	 	 	 	 c o n d i t i o n a r = ' E4E3' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' t h u n d e r s t o r m ' :  
 	 	 	 	 c o n d i t i o n a r = ' 9'5A)  19/J)' ;  
 	 	 	 	 b r e a k ;  
 	 	 	 d e f a u l t :  
 	 	 	 	 c o n d i t i o n a r = ' E4E3' ;  
 	 	 	 }  
 	 	 t e m p _ t y p e   =   " C " ;  
 	 	 c i t y = " D u b a i " ;  
 	 	 c i t y a r a b i c = " /(J" ;  
 	 	  
 / * 	 $ ( " # w e a t h e r _ w i d g e t " ) . a p p e n d ( " < i m g   i d = ' w e a t h e r _ i m g '   s r c = ' h t t p : / / w w w . g o o g l e . c o m / i m a g e s / w e a t h e r / "   +   c o n d i t i o n s _ i m g   +   " '   / > " ) ;   * /  
 / * 	 $ ( " # w e a t h e r _ w i d g e t " ) . a p p e n d ( " & n b s p ; & n b s p ; < i m g   s r c = ' / i m a g e s / w e a t h e r / "   +   c o n d i t i o n s _ i m g   +   " '   / >   "   +   c i t y   +   "     "   +   t e m p   +   " & d e g ;   "   +   t e m p _ t y p e       ) ;   * /  
 	 $ ( " # w e a t h e r _ w i d g e t " ) . a p p e n d ( " & n b s p ; < i m g   a l t = ' "   +   c o n d i t i o n   +   " '   t i t l e = ' "   +   c o n d i t i o n   +   " '   s r c = ' / i m a g e s / w e a t h e r / "   +   c o n d i t i o n s _ i m g   +   " '   s t y l e = ' v e r t i c a l - a l i g n : m i d d l e ; ' /   / >   "   +   c i t y   +   "     "   +   t e m p   +   " & d e g ;   "   +   t e m p _ t y p e       ) ;    
 	 $ ( " # w e a t h e r _ w i d g e t _ a r a b i c " ) . a p p e n d (     t e m p   +   " & d e g ;   "   +   t e m p _ t y p e   +   " & n b s p ; "   +   c i t y a r a b i c   +   " & n b s p ; < i m g   a l t = ' "   +   c o n d i t i o n a r   +   " '   t i t l e = ' "   +   c o n d i t i o n a r   +   " '   s r c = ' / i m a g e s / w e a t h e r / "   +   c o n d i t i o n s _ i m g   +   " '   s t y l e = ' v e r t i c a l - a l i g n : m i d d l e ; ' /   / >   "     ) ;  
 } 
