$(document).ready(function() {
	display_comparateur();
	affiner_recherche();
});

function display_comparateur (){
	
	$(".sens").click(function () {
				if( $(this).parent().next().is("div.niv2")) {
					//alert ('dddd');			
		var checkElement = $(this).parent().next(".niv2");
		if( checkElement.is(":hidden")) {
			$(this).addClass("top");
			$(this).removeClass("bottom");
			checkElement.slideDown('normal');		
		}
		else {
			$(this).addClass("bottom");
			$(this).removeClass("top");
			checkElement.slideUp('normal');
		}
				} else {}
				
	});
	
}
function affiner_recherche (){	
	$(".div_affiner_recherche").click(function () {
			
					//alert ('dddd');			
		var checkElements = $(this).next();
		if( checkElements.is(":hidden")) {			
			checkElements.slideDown();		
		}
		else {			
			checkElements.slideUp();	
		}
	});
	
}
