$(document).ready(function(){$('#slideshow').appendTo('#sub-head');$('#links').prependTo('#min-window');$('#slideshow').cycle({fx:'scrollRight',delay:5000,speed:300});});$(document).ready(function(){var place="wilmington,nc";weatherforecast(place);$('#change').click(function(){$('#changecity').slideToggle();return false;});$('#goweather').click(function(){weatherforecast($('#cityname').val());});function weatherforecast(place){$('#days').html('');$.ajax({type:"GET",url:"/CommonAssets/WebRequests.aspx?u=http%3a%2f%2fwww.google.com%2fig%2fapi&p=weather%3d"+place,dataType:"xml",success:function(xml){var current;var icon;var icons=new Array();icons=[["/sunny.gif","/sun.png"],["/partly_cloudy.gif","/partly_cloudy.png"],["/mostly_sunny.gif","/partly_cloudy.png"],["/mostly_cloudy.gif","/partly_cloudy.png"],["/rain.gif","/rain.png"],["/chance_of_snow.gif","/light_snow.png"],["/cloudy.gif","/cloudy.png"],["/snow.gif","/snow.png"],["/fog.gif","/fog.png"],["/thunderstorm.gif","/tstorms.png"]];$('weather',xml).each(function(i){$(this).find("forecast_conditions").each(function(){for(var x=0;x<icons.length;x++){if($(this).find("icon").attr('data').search(icons[x][0])>-1){icon=icons[x][1];}}
$('#days').append('<div style="line-height:231%" class="left">'+$(this).find("day_of_week").attr('data')+'<br/><img width="35" height="35" border="0" style="margin-right:3px;vertical-align:top;margin:0 12px" alt="Clear" title="Clear" src="http://ssl.gstatic.com/onebox/weather/35'+icon+'"><br/><strong>'+$(this).find("high").attr('data')+'&deg;</strong>&nbsp;&nbsp;'+$(this).find("low").attr('data')+'&deg;</div>');});current=$(this).find("current_conditions");for(var x=0;x<icons.length;x++){if(current.find("icon").attr('data').search(icons[x][0])>-1){icon=icons[x][1];}}
$('#currentpic').html('<img style="margin-right:3px;" src="http://ssl.gstatic.com/onebox/weather/60'+icon+'" border="0" height="60" width="60">');$('#current').html('<p><b>'+current.find("temp_f").attr('data')+'&deg;F</b><br>'+current.find("condition").attr('data')+'<br>'+current.find("wind_condition").attr('data')+'<br>'+current.find("humidity").attr('data')+'</p><p><a href="http://www.weather.com/weather/tenday/34.225726,-77.944710" target="_blank">10 day forecast</a></p>');var city=$(this).find("forecast_information");$('.r').html('<b>Weather</b> for <b>'+city.find("city").attr('data')+'</b>');});}});}}); 
