﻿<extension>
  <title>AccuWeather Extension</title>
  <label>AccuWeather</label>
  <copyright>Copyright (c) 2006-2009 MindTouch, Inc.</copyright>
  <description>This extension contains functions for embedding AccuWeather widgets.</description>
  <uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/AccuWeather</uri.help>
  <uri.logo>http://scripts.mindtouch.com/logos/accuweather-logo.png</uri.logo>
  <namespace>accuweather</namespace>
  
  <function>
    <name>weather</name>
    <description>Embed the AccuWeather weather widget.</description>
    <param name="zipcode" type="str" optional="true">Zipcode for location. (default: "92101")</param>
    <param name="celsius" type="bool" optional="true">Show temperature in degrees Celsius. (default: false)</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <div style='width: 300px; height: 250px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/blue_300x250_bg.jpg ); background-repeat: no-repeat; background-color: #346797;' >
            <div style='height: 238px;' >
              <script eval:src='"http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2.asp?partner=netweather&amp;tStyle=whteYell&amp;logo=0&amp;zipcode=" .. (args.zipcode ?? 92101) .. "&amp;lang=eng&amp;size=9&amp;theme=&amp;metric=" .. (args.celsius ? 1 : 0) .. "&amp;target=_self"'></script>
            </div>
            <div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 11px; line-height: 12px; color: FFFFFF;' >
              <a style='color: #FFFFFF' href='http://www.accuweather.com/us/MA/CUMMINGTON/01026/city-weather-forecast.asp?partner=accuweather&amp;traveler=0' >Weather Forecast</a> | <a style='color: #FFFFFF' href='http://www.accuweather.com/maps-satellite.asp' >Weather Maps</a> | <a style='color: #FFFFFF' href='http://www.accuweather.com/index-radar.asp' >Weather Radar</a>
            </div>
          </div>
        </body>
      </html>
    </return>
  </function>
</extension>
