 
$j=jQuery.noConflict();

$j(document).ready(function () { 
				
				/* BOUTON DU FORMULAIRE DE CONTACT */
				$j("#bouton-contact").hover(
					  function () {
					   $j(this).css('background-position', 'bottom').css('cursor', 'pointer');
					  }, 
					  function () {
					    $j(this).css('background-position', 'top');
					  }
					);
				$j('#bouton-contact').click(function (){
					$j('.wpcf7-form').submit();
				});
				
				
			/* GESTION DE L'AFFICHAGE DU FORMULAIRE QUAND IL Y A DES ERREURS */
			if( window.location.hash == '#wpcf7-f435-p443-o1'){
				$j('.contact').hide();
				$j('#content-form').fadeTo(300, 0);
				$j('#content-form').show(300);
	 			$j('#content-form').fadeTo(300, 1);
	 			$j('#formulaire').hide(300);
	 			$j('#carte').show(300);
			}
				
				/* HACK CSS FIREFOX SUR MACOS */
				 if(navigator.userAgent.indexOf('Mac') > 0 && navigator.userAgent.indexOf('Firefox') > 0){	
				 	$j('.liste').css('paddingBottom', 30);
				 }
				
				
				 
				
				
				/* SCROLLBARE */	
				$j('#content-scroll').tinyscrollbar();
		
				/* BORDURES SUR LES PHOTOS DANS LA GALLERIE */
				/*$j('.attachment-thumbnail').each(
					function() {
						$j(this).css('border', '4px solid #444444');
			    });
				
				$j('.attachment-thumbnail').hover(
			  		function () {
			  			$j(this).css('border', '4px solid #2D841A');
			  		},
			  		function () {
			   			$j(this).css('border', '4px solid #444444');
			  	});*/
	
				/* MENU */
				$j("#menu-menu_pages li").hover(
				  function () {
				    $j(this).stop().animate({ 
		        		marginTop: "26px"
		      		}, "fast" );
				  }, 
				  function () {
				    $j(this).stop().animate({ 
		        		marginTop: "30px"
		      		}, "fast" );
				  }
				);
				
				/* GESTION DE L'AFFICHAGE DES CONTENEURS */
				
				$j('.suite').click(function() {
		 		 	var id = $j(this).attr('id');
		 		 	
			 		$j('#content1').fadeOut(100);
			 		$j('#content2').fadeOut(100);
			 		$j('#content-scroll').fadeOut(100);
			 		$j('#content-form').fadeOut(100);
			 			
			 			switch (id){
							 	 		case "post1":
							 	 			
							 		 		$j('#content1').fadeTo(300, 1);
										break;
										case "post2":
											
						 		 			$j('#content2').fadeTo(300, 1);
										break;
										case "toutesactus":
										
						 		 			$j('#content-scroll').fadeTo(300, 1);
										break;
										case "carte":
											
						 		 			$j('#content-scroll').fadeTo(300, 1);
						 		 			$j('#carte').hide(300);
						 		 			$j('#formulaire').show(300);
						 		 			
										break;
										case "formulaire":
						 		 			$j('#content-form').fadeTo(300, 1);
						 		 			$j('#formulaire').hide(300);
						 		 			$j('#carte').show(300);
						 		 			
										break;
							 	 	}	
      			
				});
				
				/* HOVER SUR SUITE */
				$j('.suite').hover(
				  function () {
				    $j(this).css("color", '#222');
				  },
				  function () {
				    $j(this).css("color", '#333');
				  }
				);
				
				/* FERMETURE DES CONTENEURS */
				$j('.close').click(function() {
					$j(this).parent().hide(300, 0);
				});
				
			}); 
