$(document).ready(function() {

		
	$('div.Searchbox1 label a').click(function() {
	
		var $this = $(this);
	
		$('div.Searchbox1 label').removeClass('selected');
		
		$this.parent('label').attr('class','selected');
	
	});


	$('li.weatherCon span.weatherDescription').each(function() {
	
		var $this = $(this);
		var path = 'images/'; 
		
		var sunny = 'Sunny';
		var mostly_sunny = 'Mostly Cloudy';
		var cloudy = 'Cloudy';
		var partly_cloudy = 'Partly Cloudy';
		var partly_cloudy_and_windy = 'Partly Cloudy  and  Windy';
		var mostly_cloudy = 'Mostly Cloudy';
		var showers_early = 'Showers Early';
		var few_showers = 'Few Showers';
		var scattered_showers = 'Scattered Showers';
		var am_showers = 'AM Showers';
		var showers = 'Showers';
		var rain_early = 'Rain Early';
		var rain_wind = 'Rain / Wind';
		var rain_shower = 'Rain Shower';
		var thunder_in_the_vincinity = 'Thunder in the Vincinity';
		var scattered_tstorms = 'Scattered T-Storms';
		var isolated_tstorms = 'Isolated T-Storms';
		var pm_tstorms = 'PM T-storms';
		var haze = 'Haze';
		var fair = 'Fair';
		var na = 'N/A';
		
		
		if ($this.html() == sunny) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_sunny.png');
		} 
		else if ($this.html() == mostly_sunny) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_mostlysunny.png');
		}
		else if ($this.html() == cloudy) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_cloudy.png');
		}
		else if ($this.html() == partly_cloudy) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_partlycloudy.png');
		}
		else if ($this.html() == partly_cloudy_and_windy) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_partlycloudy.png');
		}
		else if ($this.html() == mostly_cloudy) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_mostlycloudy.png');
		}
		else if ($this.html() == showers_early) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_showersearly.png');
		}
		else if ($this.html() == few_showers) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_fewshowers.png');
		}
		else if ($this.html() == scattered_showers) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_scatteredshowers.png');
		}
		else if ($this.html() == scattered_showers) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_scatteredshowers.png');
		}
		else if ($this.html() == am_showers) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_showers.png');
		}
		else if ($this.html() == showers) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_showers.png');
		}
		else if ($this.html() == rain_early) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_rainearly.png');
		}
		else if ($this.html() == rain_wind) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_rainwind.png');
		}
		else if ($this.html() == rain_shower) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_rainshower.png');
		}
		else if ($this.html() == thunder_in_the_vincinity) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_thunder.png');
		}
		else if ($this.html() == scattered_tstorms) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_thunder.png');
		}
		else if ($this.html() == isolated_tstorms) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_thunder.png');
		}
		else if ($this.html() == pm_tstorms) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_thunder.png');
		}
		else if ($this.html() == haze) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_haze.png');
		}
		else if ($this.html() == fair) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_fair.png');
		}
		else if ($this.html() == na) {
			$this.siblings('.weatherIcon').children('img').attr('src', path + 'weather_sunny.png');
		}
	
	});
	
	/*
	xx//Sunny
	xx//Mostly Sunny
	xx//Cloudy
	xx//Partly Cloudy
	xx//Partly Cloudy and Windy
	xx//Mostly Cloudy
	xx//Fair
	xx//Showers Early
	xx//Few Showers
	xx//Scattered Showers
	xx//AM Showers
	xx//Showers
	xx//Rain / Wind
	xx//Rain Shower
	xx//Rain Early
	xx//Thunder in the Vincinity
	xx//Scattered T-Storms
	xx//Isolated T-Storms
	xx//PM T-Storms
	xx//Haze
	*/
});