

function getWeather(code){
document.getElementById('today_hi').innerHTML = '-'; 
	//document.getElementById('today_lo').innerHTML = '-'; 
	document.getElementById('tomorrow_hi').innerHTML = '-'; 
	document.getElementById('tomorrow_lo').innerHTML = '-'; 
	document.getElementById('after_tomorrow_hi').innerHTML = '-'; 
	document.getElementById('after_tomorrow_lo').innerHTML = '-'; 
	document.getElementById('today_img').style.backgroundImage = 'url(http://www.easytravel.lt/img/weather/44.png)';
	document.getElementById('tomorrow_img').style.backgroundImage = 'url(http://www.easytravel.lt/img/weather/44.png)';
	document.getElementById('after_tomorrow_img').style.backgroundImage = 'url(http://www.easytravel.lt/img/weather/44.png)';
$.getJSON('/ajax/weather/'+code, function(data) {
	document.getElementById('today_hi').innerHTML = data[0]['hi']+'°'; 
	//document.getElementById('today_lo').innerHTML = data[0]['lo']+'°'; 
	document.getElementById('today_img').style.backgroundImage = 'url(http://www.easytravel.lt/img/weather/'+data[0]['icon']+'.png)';
	
	document.getElementById('tomorrow_hi').innerHTML = data[1]['hi']+'°'; 
	document.getElementById('tomorrow_lo').innerHTML = data[1]['lo']+'°'; 
	document.getElementById('tomorrow_img').style.backgroundImage = 'url(http://www.easytravel.lt/img/weather/'+data[1]['icon']+'.png)';
	document.getElementById('after_tomorrow_hi').innerHTML = data[2]['hi']+'°'; 
	document.getElementById('after_tomorrow_lo').innerHTML = data[2]['lo']+'°'; 
	document.getElementById('after_tomorrow_img').style.backgroundImage = 'url(http://www.easytravel.lt/img/weather/'+data[2]['icon']+'.png)';
	document.getElementById('today_img').style.backgroundSize = '60%';
	document.getElementById('tomorrow_img').style.backgroundSize = '60%';
	document.getElementById('after_tomorrow_img').style.backgroundSize = '60%';
})
}

function parseXml(xml)
{
  //find every Tutorial and print the author
  $(xml).find("Tutorial").each(function()
  {
    $("#output").append($(this).attr("author") + "<br />");
  });

  // Output:
  // The Reddest
  // The Hairiest
  // The Tallest
  // The Fattest
}

function activate_city(new_city_id){
	old_city_id = document.getElementById('active_city').innerHTML;
	document.getElementById(old_city_id).className = '';
	document.getElementById(new_city_id).className = 'act';
	document.getElementById('active_city').innerHTML = new_city_id;

}


