
jQuery(window).ready(function(){  

	//  Initialize Backgound Stretcher
	jQuery(document).bgStretcher({
	images: ['http://nicolas-le-tutour.laouran.net/wp-content/themes/nicolas/img/fond_ciel.jpg'], imageWidth: 1181, imageHeight: 886 });
	
	
	/* Menu droite primaire */
	jQuery("#menu-menu-primaire li a").hover(function() {
		jQuery(this).animate({
		"left": "+=3px" 
		},'fast');
		

	}, function() {	
		jQuery(this).animate({ 
		"left": "-=3px" 
		});
		
	},'fast');
			
	/*  rendre les div liens  */ 
	jQuery("div.front-block").click( function(){
			window.location = jQuery(this).find( "a.more-link" ).attr("href");
		});
		
		/* animation devis lettres  */ 
	/*9	jQuery(".passercommande a").hover(function() {
				jQuery(this).find('img').animate({ 
				"marginBottom": "5px" 
				}, '500' );
		}, function() {	
				jQuery(this).animate({
				"marginBottom": "0" 

				} );
		});
	*/
		/* remplacement des titres en images */ 
	  jQuery(".front-block h2").each(function (i) {
			var imgtitle =  jQuery( this ).text().toLowerCase().replace( /[\350-\353]/g ,"e");
			jQuery( this ).html( '<img src="/wp-content/themes/nicolas/img/' + imgtitle + '.png" title="' + imgtitle + '" class="blockfront-title" />'  );
      });

	

	
//	jQuery(".front-block").css("border", "2px solid #EEEEEE");
	jQuery(".front-block").hover(function() {
		jQuery(this).animate({ 
		"marginTop": "-=3px" ,
		"borderColor": "#c5cfd0"
		},'fast' );
		
		jQuery(this).find('img.blockfront-title').animate({
		"opacity": "0.99" 
		},'fast');
		
		jQuery( this ).find( ".more-link.page-front a" ).addClass('ahover' );
		
	}, function() {	
		jQuery(this).animate({
		"marginTop": "+=3px" ,
		"borderColor": "#EEEEEE"
		},'fast');
		
		jQuery( this ) .find( ".more-link.page-front a" ).removeClass('ahover' );
		
		jQuery(this).find('img.blockfront-title').animate({
		"opacity": "0.8" 
		},'fast');
	});
	
	
});
