jQuery(document).ready(
function()
{
	/*$("#champ_recherche").autocomplete("autocomplete.php",{
		minChars: 2,
		max: 20, 
		width: 400,
		autoFill: false
		});
*/
/*
  $().click(function(e){
      $(".alerte_panier").attr("x", e.pageX);
      $(".alerte_panier").attr("y", e.pageY);
   }); 
*/

$("form[name='ajoutpanier']").ajaxForm({beforeSubmit: animePanier, success: montrePanier});

$(".image_panier").click( function() {
	$(this).attr("src","img_gen/panier_plein.gif");
 });


});

function montrePanier(reponse, statut)
{
	$("#panier").replaceWith(reponse);

}

function animePanier(data, form, options)
{
	//alert(form.parent().html());
//	form.parent().siblings().css("background-color", "#005499");
/*
form.parent().siblings().andSelf().animate({ 
        opacity: 0.0
      }, 80 ).animate({  opacity: 100.0
      }, 100 ).animate({ 
        opacity: 0.0
      }, 80 ).animate({  opacity: 100.0
      }, 100 );
      
*/
//  $(".alerte_panier").show(); 
/*
p=form.parent().siblings().position();
	$(".alerte_panier").css("top",$(".alerte_panier").attr("y")-20);
	$(".alerte_panier").css("left",$(".alerte_panier").attr("x")-220);
	$(".alerte_panier").animate({ 
        opacity: 0.8
      }, 200 ).animate({ 
        opacity: 0.8
      }, 600 ).animate({  opacity: 0.0
      }, 200 );
	      
*/
	
}



