var snowing = false;

onload = function showWeather(container,location,locale){

$.get( 'proxy.php?weather=' + encodeURI(location) + '&hl='+encodeURI(locale), function(xml) {

var $cc = $(xml).find('current_conditions').find('condition').attr('data');

if ($cc == "Snow Showers" || $cc == "Ice/Snow" || $cc == "Flurries" || $cc == "Rain and Snow" || $cc == "Light Snow" || $cc == "Snow" || $cc == "Scattered Snow Showers")
{
	$('body').addClass('cloudy');
	$().jSnow();
	snowing = true;
}
},'xml');
}

$('body').keypress(function(event) {
	if (event.which == 115 && snowing == false) {
	$('body').addClass('cloudy');
	$().jSnow();
	snowing = true;
	}
});

$('body').keypress(function(event) {
	if (event.which == 113) {
	$('#wrapper').toggle();
	}
});

$('body').keypress(function(event) {
	if (event.which == 45) {
	$('#sky').css("opacity","+=.25");
	}
});

$('body').keypress(function(event) {
	if (event.which == 61) {
	$('#sky').css("opacity","-=.25");
	}
});
