$(document).ready(function(){
    
	// GALLERY IMAGE CAROUSEL
    $(function () {
		var tabContainers = $('#Showcase li');
	
		$('#GalleryList li a').click(function () {
			tabContainers.hide().filter(this.hash).fadeIn('slow');
			$('#GalleryList ccc  li a').removeClass('current');
			$(this).addClass('current');
			return false;
		}).filter(':first').click();
	});

	// WEATHER INFORMATION 
    $(function() {
		$.simpleWeather({
			zipcode: '52807',
			unit: 'f',
			success: function(weather) {
				$('#Current').prepend('<h5>'+weather.city+', '+weather.region+'</h5>');
				$('#Current .CurrentWeather').prepend('<img src="'+weather.thumbnail+'" alt="'+weather.currently+'" title="'+weather.currently+'"><p class="HighLow">'+weather.high+'&deg; / '+weather.low+'&deg;' + '</p>');
				$('.CurrentStats').append('<dt>Current:</dt><dd>'+weather.temp+'&deg; '+weather.units.temp+'</dd><dt>Wind:</dt><dd>'+weather.wind.direction+' at '+weather.wind.speed+' '+weather.units.speed+'</dd><dt>Humidity:</dt><dd>'+weather.humidity+'%</dd>');
				
				$('#Today .CurrentWeather').prepend('<img src="'+weather.thumbnail+'" alt="'+weather.forecast+'" title="'+weather.forecast+'"><p class="HighLow">'+weather.high+'&deg; / '+weather.low+'&deg;' + '</p>');
				
				$('#Tomorrow .CurrentWeather').append('<img src="'+weather.tomorrow.image+'" alt="'+weather.tomorrow.forecast+'" title="'+weather.tomorrow.forecast+'"><p class="HighLow">'+weather.tomorrow.high+'&deg; / '+weather.tomorrow.low+'&deg;' + '</p>');
			},
			error: function(error) {
				$("#Weather").html('<li>'+error+'</li>');
			}
		});
	});
	
	//CSS
	$('#GalleryList li:nth-child(even)').css('marginRight', 0);
	$('.kwicks li:last-child').css('border-right', 'none');
	
});

