

$(function(){
	
	if ($("#m ul:first li:first a").hasClass("msel")) { $("#c h1").remove(); }
	
	$("#bp").remove();
	dinapic();
});















dinapici=1;
function dinapic() {
	dinapici = myrnd(1,4);
	tmpimg = document.createElement("img");
	
	$(tmpimg).load(function(){
		
		img = "background-image: url('/sdf/files/bp"+dinapici+".jpg'); display:none;";
		$("#m").before('<div class="bpim" style="'+img+'"></div>');
		$(".bpim:hidden").fadeIn(1000,function(){
			$(".showed_bp").remove();
			$(this).addClass("showed_bp");
		});
	});
	
	tmpimg.src = '/sdf/files/bp'+dinapici+'.jpg';
	tid = setTimeout(dinapic,7000);
	
}



function myrnd(x,y) { return Math.floor( Math.random( ) * (y - x + 1) ) + x; }
