// JavaScript Document
//alert ("ok");

function a() {
		
	}

function make_blank()
{

	document.form_defi.defi_montant.value ="";

}
/*function bonne_reponse()
{
	event.preventDefault();
		$('.pop_bonne_reponse').show();
}*/

	
/*function limitcp (el) {
var max_len = 5;
if (el.value.length > max_len) {
el.value = el.value.substr(0, max_len);
}
document.getElementById('cp').innerHTML = el.value.length;

return true;
}*/

$(document).ready(function(){
	
/*	$("#a_ami").click(function(event) {
		event.preventDefault();
		$('.pop_ami').show();
	});*/
	
	$("#bonne_reponse").click(function(event) {
		event.preventDefault();
		$('.pop_bonne_reponse').show();
	});
	
	$("#bt_defi").click(function(event) {
		event.preventDefault();
		$('.pop_defi').show();
	});
	$("#mot_passe_oublie").click(function(event) {
		event.preventDefault();
		$('.pop_defi').fadeOut("slow");
		$('.pop_sondage').fadeOut("slow");
		$('.pop_mot_passe_oublie').show();
	});
	
	$("#ressayer").click(function(event) {
		event.preventDefault();
		$('.pop_defi').fadeOut("slow");
		$('.pop_sondage').fadeOut("slow");
	});
	
	$(".fermer").live("click",function(event) {
		event.preventDefault();
		$('.pop_defi').fadeOut("slow");
		$('.pop_sondage').fadeOut("slow");
		$('.pop_mot_passe_oublie').fadeOut("slow");
		$('.pop_newsletter').fadeOut("slow");
		$('.pop_ami_err').fadeOut("slow");
		$('.pop_bonne_reponse').fadeOut("slow");
	});
	
	/*$("#defi_montant").click(function(event) {
		event.preventDefault();
		$('#defi_montant').val()='';
	});*/
	
	/*$("#bt_newsletter").click(function(event) {
		event.preventDefault();
		$('.pop_newsletter').show();
	});*/
	
	
	$(document).keydown(function(event) {
		if(event.which == 27) {  
			event.preventDefault();
			$('.pop_ami').fadeOut("slow");
			$('.pop_defi').fadeOut("slow");
			$('.pop_newsletter').fadeOut("slow");
			$('.pop_sondage').fadeOut("slow");
			$('.pop_mot_passe_oublie').fadeOut("slow");
			$('.pop_bonne_reponse').fadeOut("slow");
		}
	});
	
	$(".question").click(function(event) {
		event.preventDefault();
		$(this).next().children().show();
	});
	
	$(function() {
		$('.scroll-pane').jScrollPane();
	});
	
});


/*function initMenus() {
	$(".menu").mouseover(function() {
		$(this).find(".ssmenu").show();
	});
	
	$(".menu").mouseleave(function() {
		$(this).find(".ssmenu").hide();
	});
}
function initMessage() {
	$(".ouvrir").click(function(event) {
		event.preventDefault();
		$('.commentaire').show();
	});
	
	$(".fermer_message").click(function(event) {
		event.preventDefault();
		$('.commentaire').hide();
	});
}
function tbFermer() {
	$(".tb_fermer").click(function() {
		parent.tb_remove();
	});
}
function initFermerAlert() {
	$(".fermer_alert").click(function(event) {
		event.preventDefault();
		$('.planning_alert').hide();
	});
}

function initAlert_annonce() {
	$(".ajouter").click(function(event) {
		event.preventDefault();
		$(this).parents(".ann_liens").find('.alert_ajout').show();
	});
	
	$(".alert_ajout_close").click(function(event) {
		event.preventDefault();
		$(this).parents(".ann_liens").find('.alert_ajout').hide();
	});
}



function initEnchere() {
	
	$(".enchere").click(function(event) {
		event.preventDefault();
		$('.faire_une_enchere').show();
		$('.historique').hide();
		$(this).parents(".pag_encart_ctr").children('.detail_descriptif,.detail_info').addClass('display_none');
	});
	
	$(".fermer_enchere").click(function(event) {
		event.preventDefault();
		$('.faire_une_enchere').hide();
		$(this).parents(".pag_encart_ctr").children('.detail_descriptif,.detail_info').removeClass('display_none');
	})
}	
function initCommentaireFiche() {
	
	$(".message").click(function(event) {
		event.preventDefault();
		$('.commentaire').show();
	});
	
	$(".fermer_commentaire").click(function(event) {
		event.preventDefault();
		$('.commentaire').hide();
	});
}
*/