$.preloadImages = function(){
   for(var i = 0; i<arguments.length; i++){
	$("#body_headers").css('backgroundImage','url('+arguments[i]+')');
   }
}

$(document).ready(function(){
	$.preloadImages("templates/img/header_05.jpg","templates/img/header_04.jpg","templates/img/header.jpg");
	var dore=["templates/img/header_05.jpg","templates/img/header_04.jpg","templates/img/header.jpg"];
	
	var timeInt=10000;
	var bl=0;
	initTimer = function(){
    	return setInterval(function(){
		$("#body_headers").css('backgroundImage','url('+dore[bl]+')');
		bl++;
		if (bl==3) bl=0;
        }, timeInt);
     }
     timer = initTimer();
});

function openMenuTop(sd) {
	$(".toptitle a").removeClass("menu_active");
	$("#menu_"+sd).addClass("menu_active");
	$("#small_texts div").hide();
	$("#div_"+sd).show();
	$(".active").removeClass("active");
	$("#td_"+sd).addClass("active");
	return false;
}

