
$(document).ready(function(){

	$(".tip").hover(function(){
		$("#tip-box").html($(this).attr("rel"));
		$("#tip-box").show();
	},
	function(){
		$("#tip-box").hide();
	});
	
	$(".help-text").hide();
	
	$(".show-help").click(function() {
		helpBox = $(this).attr("rel");
		if($("#"+helpBox).hasClass("show")) { // the help is already displayed
			$("#"+helpBox).removeClass("show").slideUp("fast");
			$(this).text("Afficher l'aide");
		} else {
			$("#"+helpBox).addClass("show").slideDown("fast");
			$(this).text("Masquer l'aide");
		}
		return false;
	});
	
	$(".show-help-tip").click(function() {
		helpBox = $(this).attr("rel");
		if($("#"+helpBox).hasClass("show")) { // the help is already displayed
			$("#"+helpBox).removeClass("show").slideUp("fast");
		} else {
			$("#"+helpBox).addClass("show").slideDown("fast");
		}
		return false;
	});
	
});