$(document).ready(function() {
	$.ajax({
		url: "/incl/news.php",
		beforeSend: requestNews(),
		success: function(msg){
			news(msg);
		}
	});
	
	function requestNews() {
		$('dl.news').html('<dd class="disabled"></dd>');
		$('dl.news dd.disabled').html('<img class="loader" src="/_img/loader.gif" alt="" />');
		$('dl.news dd.disabled img').hide();
		$('dl.news dd.disabled').show();
		$('dl.news dd.disabled img.loader').css("display","block");
		
	} 
	
	function news(msg) {
		$('dl.news dd.disabled').hide();
		$('dl.news dd.disabled img.loader').css("display","none");
		$('dl.news').html(msg);
	}
	
	$.ajax({
		url: "/incl/weather.php",
		beforeSend: requestWeather(),
		success: function(msg){
			weather(msg);
		}
	});
	
	function requestWeather() {

		$('div.weather').html('<div class="disabled"></div>');
		$('div.weather div.disabled').html('<img class="loader" src="/_img/loader.gif" alt="" />');
		$('div.weather div.disabled img').hide();
		$('div.weather div.disabled').show();
		$('div.weather div.disabled img.loader').css("display","block");
		
	} 
	
	function weather(msg) {
		$('div.disabled').hide();
		$('div.weather div.disabled img.loader').css("display","none");
		$('div.weather').html(msg);
	}
});
