function atribphotogrand(nom,id)
{
	
	$("#photogrand_"+id).attr("src","./img_article/" + nom);
	$("#photogrand_"+id).css("width","338px");		
	$("#lien_"+id).attr("href","./img_article/" + nom);	
	
}


function changepays()
{
 	
	$.post("./ajax.php",
				   { action:"changepays", id: $("#choixpays").val() },
				   function(data){
						//alert(data);
						//alert("#aff" + modele);
						$("#frais_port").html(data);	
				   });	
	
}


$(document).ready(function() {
	zoombox.init();
	$(".boutonxat").hover(
	function(){
			
		var image = $(this).attr("rev");
		//alert("url(../img_categorie/"+ image +") no-repeat #FFF 20px 0px; width:715px; height:270px");			
		if (image.length > 0 )
		{
			$("#imagecathoer").css("background","url(./img_categorie/"+ image +") no-repeat #FFF 0px 0px");
		}
	},
	function() {
		
		$("#imagecathoer").css("background","transparent");
		
	});
	
	$("#menuVert").hover(
	function(){

		$("#imagecathoer").fadeIn("slow");
	},
	function() {
		$("#imagecathoer").fadeOut("fast");	
		
	});

	







});


function ajouterpanier(idmodele)
{
		
		$.post("./panierajax.php",
		{ idcouleurarticle: idmodele , nomProduit: $("#nomproduit"+idmodele).html()  , qteproduit:1, prixproduit:$("#prixart"+idmodele).html(),tailleProduit:$("#tailleart"+idmodele).val(),fonction:"ajoutarticlepanier" },
				   function(data){
						//alert(data);
						if ( data == 1 )
						{
							document.location.href="panier.html" ;
						}
						else
						{
							alert("Oups! problème avec l'ajout au panier, vueillez reessayer... ");	
						}
				   });	
			
	
}

