if(afficher_gmap)
load();


$(".boutonboutik").click(function(event){
	$("#paniervolant").css("left",(event.pageX+10)+"px");
	$("#paniervolant").css("top",(event.pageY-20)+"px");
	$("#paniervolant").css("display","block");
	
	

	var offsetpanier = $("#paniercold").offset();
	var toppanier = Math.round(offsetpanier.top)+15;
	var leftpanier = Math.round(offsetpanier.left)+10;
	
	
	$('#paniervolant').animate({
		left: leftpanier+'px',
		top: toppanier+'px'
	  }, 500, function() {
		// Animation complete.
		$("#paniervolant").css("display","none");
	  });
	});


var offsetcolD = $("#contColD").offset();
var topcolD = Math.round(offsetcolD.top);

$(document).scroll(function() {
							
		var posScroll = parseInt($(document).scrollTop());	
		WindowHeight = window.innerHeight;
		
		/*
		colD = $("#colD").height();
		PiedHeight = $("#piedpage").height();
		bottompanier = toppanier+PanierandcoHeight;
		bottomliste = topliste + $("#corps").height();
		bottompage = bottomliste + PiedHeight;
		
		solde=(bottompage-posScroll);
		*/

		//$("#infosdev").html('solde:'+(bottompage-posScroll)+'-colG:'+PanierandcoHeight+'-WH:'+WindowHeight+'-pied:'+$("#piedpage").height());

		//listenbre = $("#corps").length;
		if(posScroll>topcolD)
			{
				//alert('oui');
			HcontColD = $("#contColD").height();
			HcolD = $("#colD").height();
			//alert(HcolD+' / '+ HcontColD);
			
			$("#colD").height(HcontColD+Hpied);
			
			$("#contColD").css("position","fixed");
			$("#contColD").css("top","0px");
			//marginTop -= (posScroll-topcolD);
			//$("#colD #pied").css("margin-top",(posScroll>topcolD)+"px");
			/*
			if(solde<(WindowHeight+PiedHeight) && PanierandcoHeight > (WindowHeight-PiedHeight) )
				{
				marge = 0 - (PanierandcoHeight-solde+PiedHeight);
				$("#panierandco").css("margin-top",marge+"px");
	//			$("#piedpage").css("margin-top",((PanierandcoHeight+posScroll+20)-toppied)+"px");
				}
				*/
			}
		else
			$("#contColD").css("position","relative");
			$("#panierandco").css("top","0px");
	   });


Hcontent = $("#content").height();
var Hpied = $("#pied").height();

Top =(Hcontent - Hpied +20+hpa);

$("#colD #pied").css("top",Top+"px");
