function text_replacement(){
$('.box_nouveaute .short_product p a').text('En savoir plus');
};

/*
function leftbar_products(){
$(".leftbar_products").before("<div style='float:left; margin:0; padding:0; background:url(/images/fd_top_leftbar_products.jpg) top left no-repeat transparent; height:31px; width:100%; clear:both;'></div>");
};
*/


function rightbar_contact(){
$(".box_contact a").empty();
$(".box_nouveaute a:contains('En savoir plus')").css("display", "none");
};

function legend(){
$("legend").wrap("<div style='width:90%; border-bottom:1px solid #efefef;padding:5px 0; margin-bottom:10px;'></div>");
};


function makeActiveLink(){
	var listLink = $(".shortcuts a");
	var CurrentUrl = document.location.href;
	listLink.each(function (index, domEle) {
		if(CurrentUrl == domEle){
			$(this).css("color","#ff6600");
		}
	});
}

/*function image(){
  var imagePrincipale = $('#productPicture img').attr("src");
	var chaine = imagePrincipale.lastIndexOf("/");
  var imgZoom = imagePrincipale.substring(chaine+1,imagePrincipale.length);
  $('#productPicture a').attr({
   		href: '/media/'+imgZoom
   });
}
*/




function TakePut(sourceURL, sourceZone, destinationZone) {
  var ListElem = $(sourceURL);
	ListElem.each(function (index, domEle) {	
					var source = $(domEle).attr("href")+"getpagecontent";
					var dest = $(domEle).parent().children(destinationZone);
					var cequejeveux = source +" #product #produits_commentaires #toggle_left #star_note";
					$(dest).load(cequejeveux);
	});	
};






function resume() {
	$(".anythingSlider .short_product td p").each(function(){
		var monHTML = $(this).html();
		
		if (monHTML.length > 100) {
			
			monHTML = monHTML.substring(0, 90)+'...';
		}
			
		$(this).html(monHTML);
	});
};

function imageVisusAdd(){
	
	var imgZoom = new Array();
	$('#productPicture img, #visuels_additionnels  img').each(function(i){
			imagePrincipale = $(this).attr("src");
			imgZoom[i] = imagePrincipale;
			chaine = imagePrincipale.split("/");
			newChaine = "/" + chaine[1] + "/thumbnails/" + chaine[2];
			$(this).attr({src:newChaine});
	});
	
	
	$('#productPicture a, #visuels_additionnels a').each(function(i){
			var imgBig = imgZoom[i].replace("thumbnails/", "");
			$(this).attr({
	   		href: imgBig
  	 		});
 	});
};


