$(document).ready(function(){


	/*SCROLL*/

	
$('a[href*=#].scrollto').click(function() {
     if ((location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')) && (location.hostname == this.hostname)) {
        var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
              var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
            }
         }
    }); 

	/* CHANGEMENT HOVER BOUTON CREER GRAATUITEMENT UNE ANNONCE

	$("#creer-annonce-button").hover(
		function(){ 
				$('#creer-annonce').stop().fadeTo("slow", 1);
		},
		function(){ 
				$('#creer-annonce').stop().fadeTo("slow", 0);
		}
	); */


	/* ANIMATION MENU 
	
	$(".item-li").hover(
		function(){
			$('ul.sous-menu').hide(); 
			
			$(this).find('ul').slideDown('fast');
			
			
		}, 
		function() {
			$('ul.sous-menu').hide();
		});
		*/
		
	/* ANIMATION PAGINATION */	

	$(".menupage_normal").hover(
		function(){
			$(this).css('backgroundColor','#f4f5f5');
			
			$(this).find('a').css('color','#0969a2');
		}, 
		function() {
			$(this).css('backgroundColor','#0969a2');
			$(this).find('a').css('color','#fff');
		});
		
		
		
	/* ANIMATION AFFINER RECHERCHE */
	

	$("#affiner-button").toggle(
		function() {
			$('#affiner').slideUp();
			$("#affiner-button").css('backgroundPosition', '0 0');
		},
	
		function(){
			$('#affiner').slideDown();
			$("#affiner-button").css('backgroundPosition', '0 -27px');
		} 
		
	);
		
	/* ANIMATION CHOISIR SOUS CAT*/
	

	
	$("#choisir-sous-cat-button").toggle(
	function() {
			$('#affiner').slideUp();
			$("#choisir-sous-cat-button").css('backgroundPosition', '0 0');
		},
		function(){
			$('#affiner').slideDown();
			$("#choisir-sous-cat-button").css('backgroundPosition', '0 -27px');
		} 
		
	);
	


});
