$(document).ready(function() {
	var rd = Math.floor(Math.random() * $(".slice").length);
	setPromotion("s"+rd);
	$(".slice").click(function() {
		if($(this).width() == 50) setPromotion($(this).attr("id"));
	});
});
function setPromotion(nb) {
	$(".slice").each(function() {
		if($(this).attr("id") == nb) {
			$(this).animate({width: "200px"});
		} else {
			$(this).animate({width: "50px"});
		}
	});
	$("#text_promoted").stop();
	$("#text_promoted").css("opacity", 0).animate({opacity: 100}, 10000);
	$("#text_promoted").html($("#"+nb).find(".text").html());
}