$(document).ready(function(){

	$('#pane2').jScrollPane({showArrows:true, scrollbarWidth: 7, arrowSize: 8});
		/*remplacer case mot de passe au chargement*/
		if(jQuery.browser['version']!='7.0') {
			$("#membre_pw").replaceWith("<input type=\"text\" id=\"membre_tmp_pw\" value=\"mot de passe\" />");
		};

	/*zone entière cliquable*/
	$(".case_actu").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});

	$(".magazine").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	
		/*deplier case recherche*/
	$("#btn_recherche").click(function () {
	
		if($(this).attr("src")=="css/fleche_deplier.gif"){
			$(this).attr("src", "css/fleche_replier.gif");
			$("#zone_recherche").slideDown("fast");
		}
		/*replier case recherche*/		
		else if($(this).attr("src")=="css/fleche_replier.gif"){
			$(this).attr("src", "css/fleche_deplier.gif");
			$("#zone_recherche").slideUp("fast");
		}
		
	});
	
		/*recherche dans tout le site*/
	$("#rech_toutlesite").click(function () {
			$("#case_recherche").focus();
			$("#btn_recherche").attr("src", "css/fleche_deplier.gif");
			$("#zone_recherche").slideUp("fast");
			$("#type_recherche").attr("value", "toutlesite");
		});

		/*recherche dans le lexique*/		
	$("#rech_lexique").click(function () {
			$("#case_recherche").focus();
			$("#btn_recherche").attr("src", "css/fleche_deplier.gif");
			$("#zone_recherche").slideUp("fast");
			$("#type_recherche").attr("value", "lexique");
		});

		/*rollover choix recherche*/		
	$(".choix_recherche").mouseover(function () {
			$(this).css("backgroundColor", "#C40072").css("color", "#fff");
	});
		/*rollout choix recherche*/	
	$(".choix_recherche").mouseout(function () {
			$(this).css("backgroundColor", "#fff").css("color", "#C40072");
	});

		/*vider case recherche au focus*/
    $("#case_recherche").focus(function () {
	
		if($(this).attr("value")=="recherche"){
		$(this).attr("value", "");
			}
			
		});
	
		/*vider case identifiant au focus*/
    $("#membre_id").focus(function () {
	
		if($(this).attr("value")=="identifiant"){
		$(this).attr("value", "");
			}
			
		});

		/*changer case mot de passe au focus*/
	$("#membre_tmp_pw").focus(function () {
	
		$(this).replaceWith("<input type=\"password\" id=\"membre_pw\">");
		$("#membre_pw").focus();
		
		});
	
	$("#membre_pw").focus(function () {
		if($(this).attr("value")=="motdepasse"){
			$(this).attr("value", "");
			}
		});
		
});
