
function getlanguemanuel() {
	$.get(
		BBVars.pagesURL + "ajax/getlanguemanuel.cfm?manuel="+jQuery("#select_manuel_camera").val(),
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function affaddmanuel() {
	if (jQuery("#select_manuel_langue").val() != "")
	{
		jQuery("#admanuel").show();
	}
	else
	{
		jQuery("#admanuel").hide();
	}
	
}


function redirect_manuel() {
	if (jQuery("#select_manuel_camera").val() != "" && jQuery("#select_manuel_langue").val() != "")
	{
		window.location = BBVars.pagesURL + "panier.cfm?frmaction=add&produit_id=1089&manuel_id=" + jQuery("#select_manuel_langue").val();
	}
}

function setShippingMode() {

	if(document.forms['frmModeLivraison'].elements['mode_livraison'].length!=undefined) {
		for (i=0; i<document.forms['frmModeLivraison'].elements['mode_livraison'].length; i++) {
			if (document.forms['frmModeLivraison'].elements['mode_livraison'][i].checked == true) {
				shippingMode = document.forms['frmModeLivraison'].elements['mode_livraison'][i].value;
			}
		}
	} else {
		shippingMode = document.forms['frmModeLivraison'].elements['mode_livraison'].value;
	}
	
	document.forms["frmFacturation"].elements['mode_livraison1'].value	= shippingMode;
	document.forms["frmTravail"].elements['mode_livraison2'].value		= shippingMode;
	document.forms["frmUneAdresse"].elements['mode_livraison3'].value	= shippingMode;

}

function signUpNewsletter() {

	var error = BBTool_checkForm( jQuery("#mailingBlock_form :input[check]"), false, BBSettings.checkFormErrorDsp);
	
	if(!error)
		BBAccount("new", {"newsletter": true, "email": jQuery('#email_newsletter').val()});

}


/*--------------------------------- CALLBACKS ---------------------------------*/

function getAddThis( ajax ) {
	jQuery.get(
		BBVars.pagesURL + "ajax/addthis.cfm",
		function( data ) { 
			if(ajax) jQuery("#shareLayerAjax").html( data );
			else jQuery("#shareLayer").html( data );
			initAddThis(); 
		}
	);
}

function initAddThis() {

	//jQuery("#shareLayer").html("");

	var script = 'http://s7.addthis.com/js/250/addthis_widget.js?domready=1';
	jQuery.getScript( script );
	/*if (window.addthis){
	    window.addthis = null;
	}*/
}

function BBCart_callback( data ) {

	var crossLayer = jQuery("#crossPopLayer"),
		tpList = jQuery("p.label", crossLayer);

	jQuery("#BBTool_msgBoxBody").css("height", "auto");

	tpList.bind("click", function() {
		var item = jQuery(this).parent(),
			height = item.height();
		if(height==40) 
			item.addClass("open").stop().animate({height: 206 });
		else 
			item.removeClass("open").stop().animate({height: 40});
	});
	
	initDetailLayers();

}

function getOptions_callback(data) {
	BBVars.currentProdQty = 1;
	BBCart('setAttrib', 'item'+$(".sizesList", data).attr("prodID")+'_1',1,'', setAttrib_callBack);
}

function setAttrib_callBack(data) {

	$(".sizesList[prodID="+BBVars.currentProdID+"] li").each(function() {
		//alert($(this).attr("optionID")+" "+BBVars.currentOptionID);
		if($(this).attr("optionID")==BBVars.currentOptionID) $(this).addClass("selected");
		else $(this).removeClass();
	});
	//$(this).addClass("selected", $(this).attr("ref")==BBVars.currentProdEAN);
	/*alert(currentAttribIndex);
	if(currentAttribIndex!=-1) $("#sizesList li#item"+currentAttribIndex).addClass("selected");*/
}

function checkClient_callback(data) {}
function checkClient() {
	$.get(
		BBVars.pagesURL + "ajax/login.cfm?formAction=checkClient",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function login_callback(data) {setTimeout("BBTool_closeMsgBox()",2000);}
function BBLogin() {
	$.get(
		BBVars.pagesURL + "ajax/login.cfm?formAction=prompt",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function sendPwd_callback(data) {setTimeout("BBTool_closeMsgBox()",2000);}
function sendPwd() {
	$.get(
		BBVars.pagesURL + "ajax/login.cfm?formAction=promptPwd",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function dspLoginBlock() {
	if(eval(jQuery("input[name='exist']:checked").val())) 
		jQuery("#login_form").slideDown();
	else 
		jQuery("#login_form").slideUp();
}
function closeLoginBlock() {
		jQuery("#login_form").slideUp();
		jQuery("#nExist").attr("checked","checked");
}

function chooseAddress() {
	if(eval(jQuery("input[name='sameAddress']:checked").val())) {
		jQuery("#same_address").slideDown( function() { BBTool_initRTForms("#shippingInfo_form"); });
		jQuery("#same_address input.text[check!=false]").attr("mandatory", "true");
		jQuery("#type_adresse_liv").val(2);
	} else {
		jQuery("#same_address input.text[check!=false]").attr("mandatory", "false");
		jQuery("#same_address").slideUp( function() { BBTool_initRTForms("#shippingInfo_form"); });
		jQuery("#type_adresse_liv").val(1);
	}
}
function dsp_livrLayer() {
	var changeParam = window.location.hash.split("#");
	if (changeParam[1]=="livr_layer") {
		$('html,body').stop().animate({scrollTop: jQuery("#" + changeParam[1]).offset().top-35}, "slow",function(){chooseAddress();});
		jQuery("#diff").attr("checked", "checked");
	}
}

function menuHover( menuItem ) {
	if(BBVars.isMsIE) jQuery('embed, object, select','#allCat_layer').css({ 'visibility' : 'hidden' });
	$("a.sCat_link", menuItem)
		.css("backgroundColor","#2742ab")
		.css("height", 33)
	$("ul.sCat_list", menuItem).css("display","block");
	$("ul.sCat_list", menuItem).stop().animate({height: 182},"fast");
}

function menuOut( menuItem ) {
	var currentCat = $(menuItem);
	var currentSCat = $("ul.sCat_list", menuItem);
	$("ul.sCat_list", menuItem).stop()
		.animate({height: 0}, function() {
				$("a.sCat_link", currentCat).stop().animate({height: 23}, 10, function() {
					$("a.sCat_link", currentCat).css("backgroundColor","transparent");
					currentSCat.css("display","none");
					var allMenuOut = false;
					jQuery("ul.sCat_list").each(function(){
							allMenuOut |= (jQuery(this).css("display") == "block") ? true : false;
						});
					if(BBVars.isMsIE && !allMenuOut) jQuery('embed, object, select','#allCat_layer').css({ 'visibility' : 'visible' });
				});
				
		})
}

function menu() {

	$("#catHeader_list")
		//.css("marginLeft", Math.floor((980-$("#catHeader_list").width())/2)+"px")
		.animate({opacity:1},"slow");
	$("#catHeader_list li.cat")
		.each( function(i) {
			var currentID = i+1;
			//if($("li", this).length>3) {
				$(this)
					.bind("mouseenter", function(e){
						menuHover(this);
					})
					.bind("mouseleave", function(e){ 
						menuOut(this);
					});
				$("ul li a", this).addClass("cat"+($("li", this).length-2));
				$("ul li:eq(1)", this).addClass("first");
				$("ul li[class!='footer']:last", this).addClass("last");
			//} else $("ul.sCat_list", this).remove();
		})

}

function initSearchBlock() {

	jQuery("#header_layer select").bind("mousemove mouseenter", function(e) {
		jQuery(this).attr("hover", "true");
		//e.preventDefault;
		e.stopPropagation();
	}).bind("mouseleave", function(e) {
		jQuery(this).attr("hover", "false");
		//e.preventDefault;
		e.stopPropagation();
	}).bind("change", function(e) {
		//if(!eval(jQuery(this).attr("hover"))) {alert("ho yeah")}
		//jQuery("#mainCat3").trigger('mouseleave');
	});

	jQuery("#header_layer option").bind("click", function(e) {
	
		var value = jQuery(this).attr("value")
		if(value!="") window.location = value;
		//if(eval(jQuery(this).parent().attr("hover")))
		//e.preventDefault;
	//	e.stopPropagation();
	
	})

}

function initCountryBar() {

	jQuery("#currentCountry").bind("click", function(e) {
	
		var newHeight = eval(jQuery(this).height()) + eval(jQuery(this).next().height()) + "px";
		jQuery("#country_list").css("display", "block");
		jQuery("#countryLayer").stop().animate({height: newHeight}, function() {
			jQuery("body").bind("click", function(e) {
				jQuery("#countryLayer").stop().animate({height: "21px"}, function() {
					jQuery("#country_list").css("display", "none");
					jQuery("body").unbind("click");
				});
			});
		});
		e.preventDefault();
	
	});
	
	jQuery("#country_list li a").bind("click", function(e) {
	
			var country = jQuery("#currentCountry");
			
			jQuery("span", country).html(jQuery("span", this).html());
			country.removeClass().addClass(jQuery("span", this).html());
			/*window.location = BBVars.pagesURL + "?" + jQuery(this).attr("rel");*/
			window.location = jQuery(this).attr("rel");
			e.preventDefault();
		
	});

}

/*--------------------------------- INIT FUNCTIONS ---------------------------------*/

$(document).ready(function() {
	
	if(BBVars.currentPageName!="paiement") {
		BBAccount("check");
		if(BBVars.currentPageName=="livraison_compte") {
			$.get(
				BBVars.pagesURL + "ajax/panier.cfm?frmAction=check&isShipping=true",
				function(data) {BBTool_openMsgBox(data, true);}
			);
		} else if(BBVars.currentPageName!="panier") {
			BBCart("check");
		} else if(BBVars.currentPageName=="panier") {
	    	if ($("#" + BBSettings.defaultHintID).length == 0) {
	            $('body').append(
	            $('<div id="' + BBSettings.defaultHintID + '"></div>').css({
	                "position": "absolute",
	                "top": "0",
	                "left": "0",
	                "z-index": 10000,
	                "display": "none"
	            }));
	        }
			var vipMsg = $("#vip_popup").html();
	        $("#vip_help").bind("mouseover", function (e) {TTip_hover(e, vipMsg);})
			.bind("mousemove", function (e) {TTip_hover(e, vipMsg);})
			.bind("mouseleave", function (e) {$("#" + BBSettings.defaultHintID).css("display", "none")});
		}
		BBTool_flash();
	}
	
	BBTool_initRTForms();
	initSearchBlock();
	initCountryBar();
	initCheckBox();
	menu();
	
	$("#footerPageNav_list").html($("#pageNav_list").html());
	
	var BBTool_pageSizes 			= BBTool_getPageSize();
	var BBTool_pageScroll 			= BBTool_getPageScroll();
	
		BBVars.pageWidth 			= BBTool_pageSizes[0];
		BBVars.pageHeight 			= BBTool_pageSizes[1];
		BBVars.windowWidth 			= BBTool_pageSizes[2];
		BBVars.windowHeight 		= BBTool_pageSizes[3];
		BBVars.pageScrollX 			= BBTool_pageScroll[0];
		BBVars.pageScrollY 			= BBTool_pageScroll[1];
		
		BBVars.dataSendContentID	= ($(".dataSend").length>0) ? $(".dataSend").attr("id") : "";
		
	jQuery(window).bind('resize', function() {
	    BBTool_pageSizes 			= BBTool_getPageSize();
		BBVars.pageWidth 			= BBTool_pageSizes[0];
		BBVars.pageHeight 			= BBTool_pageSizes[1];
		BBVars.windowWidth 			= BBTool_pageSizes[2];
		BBVars.windowHeight 		= BBTool_pageSizes[3];
		jQuery('#BBTool_overlay').css("width", BBVars.pageWidth+"px");
	}); 
		
	if(BBVars.currentPageName=="univers" || BBVars.currentPageName=="selection") {
		
	} else if(BBVars.currentPageName=="fiche") {
		/*if(typeof(fiche_mode) != undefined)
			BBCart("getOptions","item"+$("#product_form" + fiche_mode+" input[name='produit_id']").val());*/
		
		//initGallery("BBGallery");
		initInfosLayers();
		initDetailLayers();
		BBTool_toolTip();
		getAddThis();
		//if(jQuery("#cross_list li").length>0) eval(jQuery("#cross_list li:first a").attr("href"));
		
	} else if(BBVars.currentPageName=="livraison_compte") {
/*		var options = {
			header:			'strong', 
			autoheight:		false
		}
		$("#slider").accordion(options);
		setShippingMode();
		if(BBVars.adrType!=0) $("#slider").activate((BBVars.adrType-1));*/
		BBVars.tmpHTML = jQuery("#same_address").html();
		if(BBVars.adrType==1) jQuery("#same").attr("checked", true);
		else jQuery("#diff").attr("checked", true);
		chooseAddress();
		dsp_livrLayer();
		
	} else if(BBVars.currentPageName=="contact") {
	/*	var options = {
			header:			'strong', 
			autoheight:		false
		}
		$("#slider").accordion(options);*/
		jQuery("#order").css({opacity: 0, display: "block"});
    	
    	jQuery("#topic").bind("change", function() {
    	
    		var value = jQuery(this).val();
    		if(value == 4 || value == 5 || value == 9 || value == 12) {
    			jQuery("#order").stop().animate({opacity: 1});
    			jQuery("#numCommand").attr("mandatory", "true");
    		} else {
    			jQuery("#order").stop().animate({opacity: 0});
    			jQuery("#numCommand").attr("mandatory", "false");
    		}
    	
    	}).trigger("change");
		if(!BBVars.isChrome) {
	    	jQuery("#piece_jointe").bind("change", function() {
	    		jQuery("#filenameLayer").html( jQuery(this).val() );
	    	});
	    } else {
	    	jQuery("ul#contact_list li div.position_btn").css("width", "auto");
	    	jQuery("#filenameLayer").css("display", "none");
	    	jQuery("#piece_jointe").css({left: 0, width: 300});
	    }
    	
    	jQuery("#piece_jointe").val("");
	}
	
	if(jQuery(".prodList").length>0) {
	
		var prodList = jQuery(".prodList li");
		
		prodList.each( function() {
		
			var prod = jQuery(this),
				colorList = jQuery(".colorList li", prod),
				colors = jQuery("a", colorList),
				imgLink = jQuery(".prodImg", prod),
				img = jQuery("img", imgLink),
				preview = jQuery(".preview", prod),
				links = jQuery(".prodName, .prodImg, .prodPrice a", prod),
				cartLink = jQuery(".cartBtn", prod),
				price = jQuery(".prodPrice a span", prod),
				prodSpecs = jQuery(".prodSpecs", prod),
				tabs = items = jQuery("li", prodSpecs),
				tabs = tabs.filter(".tab"),
				items = items.not(".tab");
			
			tabs.css({visibility: "visible", opacity: 0});
			colorList.css({visibility: "visible", opacity: 0});
			
			prod.bind("mouseenter", function() {
				tabs.stop().animate({opacity: 1});
				colorList.stop().animate({opacity: 1});
			}).bind("mouseleave", function() {
				tabs.stop().animate({opacity: 0});
				colorList.stop().animate({opacity: 0});
			});
			
			preview.css("left", Math.floor((imgLink.outerWidth() - preview.width() - 16)/2) )
				.bind("click", function(e) {
					e.preventDefault();
					BBCart('getProdSheet', preview.attr("data-pID"));
				});
				
			preview = jQuery(".preview, .preview span", prod);
			preview.css({display: "block", opacity: 0});
			
			img.bind("load", function() {
				img.animate({opacity: 1});
			})
			
			imgLink.bind("mouseenter", function() {
				preview.stop().animate({opacity: 1});
			}).bind("mouseleave", function() {
				preview.stop().animate({opacity: 0});
			});
			
			jQuery(".colorList", prod).css("top",  Math.floor((imgLink.outerHeight() - jQuery(".colorList", prod).height())/2)+30);
			
			colors.bind("click", function(e) {
				e.preventDefault();
				var color = jQuery(this),
					pID = color.attr("rel"),
					price = color.attr("rev"),
					pURL = color.attr("href"),
					imgURL = "/products_images/e" + pID + ".jpg";
				img.stop().animate({opacity:0}, function() { img.attr("src", imgURL); });
				links.attr("href", pURL);
				preview.attr("data-pID", pID);
				if(cartLink.attr("href").indexOf("javascript")!=-1)
					cartLink.attr("href", "javascript: BBCart('add', " + pID + ");");
			});
			
			tabs.bind("click", function() {
				var item = jQuery(this);
				
				tabs.removeClass("open");
				item.addClass("open");

				items.css("display", "none");
				items.filter("." + item.attr("data-type") ).css("display", "list-item");
				
			}).eq(0).trigger("click");
				
		});
	}
	
});

/*----------------------------------------------------------------------------------*/

function initCheckBox() {

	if(jQuery("#requestForm").length>0)  {
	
		jQuery("#requestForm").append("<input type='hidden' id='reasonList' name='reasonList' value='"+jQuery("#requestForm :input[type=checkbox]:checked").length+"'>");
	
		jQuery("#requestForm :input[type=checkbox]").bind("click", function() {
		
			var val = (eval(jQuery(this).attr("checked"))) ? 1 : -1;
				val = eval(jQuery("#reasonList").val()) + val;
			jQuery("#reasonList").val( val );
			
			if(val==3) {
				jQuery("#requestForm :input[type=checkbox]:not(:checked)").attr("disabled","disabled");
			} else {
				jQuery("#requestForm :input[type=checkbox]:not(:checked)").removeAttr("disabled");
			}
		
		});
	
	}

}

function sendRequest() {
 BBTool_formPost('requestForm', false);
	/*if( !BBTool_checkForm( jQuery("#requestForm :input[check]") , false, BBSettings.checkFormErrorDsp) ) {

		var reasonsList = "";
	
		jQuery("#requestForm :checked").each( function(index, value) {
			if(reasonsList=="") reasonsList += jQuery(this).val();
			else reasonsList += "," + jQuery(this).val(); 
		});
	
		jQuery("#reasonList").val(reasonsList);
		
		jQuery("#requestForm").submit();
	
	}*/

}

function dspCross(anchor) {

	$('html,body').animate({scrollTop: $("#cross"+anchor).offset().top-90}, "slow", "swing");

}

function initInfosLayers() {

	jQuery(".infos_layer").each( function( i, el) {
	
		/*if(i==0) 
			jQuery(this).addClass("selected").animate({height: (jQuery(".infos", this).outerHeight() + 29) + "px"});*/
		
		jQuery(this).bind("click", function() {

			if (jQuery(this).hasClass("selected")) jQuery(this).removeClass("selected");
			else jQuery(this).addClass("selected");

			var newHeight = (jQuery(this).height()==29) ? (jQuery(".infos", this).outerHeight() + 29) + "px" : "29px";
			jQuery(this).animate({height: newHeight});

		});
		
		if(jQuery(".crossContener").length==0 && i==0) {
			var newHeight = (jQuery(this).height()==29) ? (jQuery(".infos", this).outerHeight() + 29) + "px" : "29px";
			jQuery(this).animate({height: newHeight});
		}
	
	});
	
	

}

function initDetailLayers() {

	jQuery(".detailProd").each( function( i, el) {
	
		/*if(i==0) 
			jQuery(this).addClass("selected").animate({height: (jQuery(".infos", this).outerHeight() + 29) + "px"});*/
		
		jQuery(this).bind("click", function() {

			if (jQuery(this).hasClass("selected")) jQuery(this).removeClass("selected");
			else jQuery(this).addClass("selected");

			var newHeight = (jQuery(this).height()==20) ? (jQuery(".infos", this).outerHeight() + 20) + "px" : "20px";
			var newzindex = (jQuery(this).height()==20) ? (jQuery(".infos", this).css("display","block")) : (jQuery(".infos", this).css("display","none"));
			jQuery(this).animate({height: newHeight , zIndex : newzindex});

		});	
	});
	
	

}
function getCross( prodID, type ) {
	/*
	$.get(
		BBVars.pagesURL + "fiche/crossselling.cfm"
						+ "?produit_id=" + prodID
						+ "&type_xselling=" + type,
		function(data) {BBTool_openMsgBox(data, true)}
	);
	*/
	$.get(
		BBVars.pagesURL + "fiche/crossselling.cfm"
						+ "?produit_id=" + prodID,
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function getColors( cartLineID, ref ) {

	$.get(
		BBVars.pagesURL + "ajax/change_couleur.cfm"
						+ "?panier_id=" + cartLineID
						+ "&code_fabriquant=" + ref,
		function(data) {BBTool_openMsgBox(data, true)}
	);

}

function colorChg( prodID ) {

	$("#colorChange_form input[name='produit_id']").val( prodID );
	BBTool_formPost("colorChange_form", true);

}

function colorChanged() {

	var prodID = jQuery("#colorChange_form input[name='produit_id']").val();
		var col = eval(jQuery("#prodColor"+prodID).attr("col"));
		var row = eval(jQuery("#prodColor"+prodID).attr("row"));
		var xPos = ((col-1)*315)-7+(col*15) + "px";
		var yPos = ((row-1)*100)-10+(row*20) + "px";
		jQuery("#selectedImg")
				.css({
						top:		yPos,
						left:		xPos,
						opacity:	0,
						display:	"block",
						zIndex:		10000
				}).animate({ opacity: 1 }, function() {
						jQuery(this).animate({ opacity: 0 }, function() {
								location.reload(true);
							});
					});

}

function BBContent( type, isDyn ) {
	// Affichage de contenu dynamique ou pas
	
	// type:	String - Type de contenu statique/dynamique
	//		static:		Le contenu est deja dans le HTML
	//		ajax:		Le contenu est charge a partir d un autre doc
	
	// action:	String - Action declencheuse de l affichage du contenu
	//		over:		Au survol de la souris
	//		load:		Apres chargement de la page
	//		click:		En cliquant sur un element
	//		callback:	En callback d une fonction
	//		show:		Affiche le contenu
	//		hide:		Masque le contenu
	
	// method:	String - Methode d affichage du contenu
}

function getGallery( currentPic ) {
	jQuery.get(
		BBVars.pagesURL + "ajax/photos.cfm"
						+ "?prodID=" + BBVars.BBGallery.currentProdID
						+ "&currentPic=" + currentPic,
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function initGallery( galID, picID ) {

	var zoom = eval(jQuery("#"+galID).attr("zoom"));

	jQuery("#"+galID+" li[class!='nav'] a").each( function(i) {
			
		if(i==0) {
			jQuery("img", this)
				.bind("load", function() {
					jQuery(this).animate({opacity:1});
				}).bind("click", function(e) {
					if(zoom) getGallery(jQuery(this).attr("currentPic"));
					e.preventDefault();
				})				
				.addClass("BBGallery_mainProdImg");
		} else {
			jQuery(this).bind("click", function(e) {
				var newImg = jQuery(this).attr("href");
				jQuery("#"+galID+" li a img.BBGallery_mainProdImg").animate({opacity: 0}, function() {
					jQuery(this).attr("src", newImg);
					jQuery(this).attr("currentPic", i);
				});
				e.preventDefault();
			});
		}
			
	});
	
	picID = (typeof(picID)=="undefined") ? 0 : picID;
	if(picID!=0) {
		jQuery("#"+galID+" li a img.BBGallery_mainProdImg")
				.css({opacity: 0, display: "block"})
				.attr("src", jQuery("#"+galID+" li[class!='nav'] a").eq(picID).attr("href"))
				//.attr("currentPic", picID);
	}

}

function prevImg( galID ) {

	var firstImg = 0;
	var nbImg = jQuery("#"+galID+" li.thumb").length;

	jQuery("#"+galID+" li.thumb").each( function(i) {
	
		if(jQuery(this).css("width")=="0px" && jQuery(this).next().css("width")=="35px") {
			firstImg = i;
			jQuery(this).animate({width: "35px"});
		} else if((jQuery(this).css("width")=="35px" && jQuery(this).next().css("width")=="0px" && firstImg+6<=i) || i==nbImg-1) {
			jQuery(this).animate({width: "0px"});
		} 

	});

}

function nextImg( galID ) {

	var firstImg = 0;
	var nbImg = jQuery("#"+galID+" li.thumb").length;

	jQuery("#"+galID+" li.thumb").each( function(i) {

		if((jQuery(this).css("width")=="35px" && jQuery(this).prev().css("width")=="0px" && i+6<nbImg) || i==0) {
			firstImg = i;
			jQuery(this).animate({width: "0px"});
		} else if(jQuery(this).css("width")=="0px"&&jQuery(this).prev().css("width")=="35px") {
			jQuery(this).animate({width: "35px"});
		}
	});

}

function updatePopup() {
	jQuery("#BBTool_msgBoxCloseBtn").hide();
	jQuery("#continueShop").hide();
}


function changepays_fact() {
	if(eval(jQuery("input[name='sameAddress']:checked").val())) {
		document.getElementById('pays_liv').value=document.getElementById('pays').options[document.getElementById('pays').selectedIndex].value;
		document.getElementById('lib_pays_liv').innerHTML=document.getElementById('pays').options[document.getElementById('pays').selectedIndex].text;
	}
}
