

$(document).ready(function(){
     $.bgIndex = 1;
     $.bgCount = 4;
     changeBackground();
          function changeBackground(){
			$("#bgcont").animate({opacity: 0},700,function(){
				$(this).removeClass("fon0"+$.bgIndex);
				$.bgIndex++;
				if($.bgIndex > $.bgCount) $.bgIndex=1;
				$("#bgcont").addClass("fon0"+$.bgIndex);
				$("#bgcont").animate({opacity: 1},700, function(){setTimeout(changeBackground, 5000);});
			});
			}
});
