	// equivalent du str_replace PHP
	function str_replace(a, b, str) {
    return str_replace2(str, a, b);
	}
	function str_replace2(SRs, SRt, SRu) {
	  /*
	  **  Replace a token in a string
	  **    s  string to be processed
	  **    t  token to be found and removed
	  **    u  token to be inserted
	  **  returns new String
	  */
	  SRRi = SRs.indexOf(SRt);
	  SRRr = '';
	  if (SRRi == -1) return SRs;
	  SRRr += SRs.substring(0,SRRi) + SRu;
	  if ( SRRi + SRt.length < SRs.length)
		SRRr += str_replace2(SRs.substring(SRRi + SRt.length, SRs.length), SRt, SRu);
	  return SRRr;
	}
	
	$(document).ready(function(){
    $('#menu_bottom').bxSlider({
		
		displaySlideQty: 4,                 // integer - number of slides to display at once
		moveSlideQty: 1, 
		controls: true,                     // true, false - previous and next controls
		speed: 500,
		prevText: ' ',
		nextText: ' '
	});
	
	///////////////////////////////

	$('#logo, .produits .image a img').hover(function() { 
	
		$(this).stop().animate({'opacity':'0.5'});
			},function() {
		$(this).stop().animate({'opacity':'1'});
								  
	});
	
	
	$('#diaporama').cycle({ 
		fx:     'fade', 
		speed:  300,  
		timeout: 3000
	});
	
	///////////////////////
	
	 $('#menu_bottom li, #menu_left li').hover(function() { 
	
		$(this).find('span').stop().animate({'bottom':'0'});
	}, function() {
		$(this).find('span').stop().animate({'bottom':'-30px'});
	});
	 
	 
	 ///////////////////////
	// menu
	
	$('#menu li').hover(function() {
		$(this).find('ul').stop().animate({'height':'175px'});
	},function() {
		$(this).find('ul').stop().animate({'height':'0px'});
	});
	
	///////////////////
	 
	 
	 $('#menu_left').bxSlider({
		mode:'vertical',
		displaySlideQty: 4,                 // integer - number of slides to display at once
		moveSlideQty: 1, 
		controls: true,                     // true, false - previous and next controls
		speed: 500,
		prevText: ' ',
		nextText: ' '
		
	});
	 
	  var bx = $('#menu_left').parent().parent();
	 $(bx).css({'left':'0px','marginTop':'20px','marginBottom':'15px'});
	 
	 $('#menu_left').parent().parent().find('.bx-prev').addClass('precedent_left');
	 $('#menu_left').parent().parent().find('.bx-next').addClass('suivant_left');
	 
	 $('#menu_bottom').parent().parent().find('.bx-prev').addClass('precedent_bottom');
	 $('#menu_bottom').parent().parent().find('.bx-next').addClass('suivant_bottom');
	 
	 
	 /////////////////////// footer 
	 
	 $('#ouvrir').click(function() { 
		$('#frame_btn').stop().animate({'height':'106px','top':'-105px'});
		
		$(this).stop().css({'display':'none'});
		$('#fermer').stop().css({'display':'block'});
	});
	 
	 $('#fermer').click(function() { 
		$('#frame_btn').stop().animate({'height':'11px','top':'-8px'});
		
		$(this).stop().css({'display':'none'});
		$('#ouvrir').stop().css({'display':'block'});
	});
	  
	 
	 
	 
	
	
  });
