function popupWindow(a){window.open(a,"popupWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,copyhistory=no,width=680,height=550,screenX=150,screenY=150,top="+(screen.height?(screen.height-550)/2:0)+",left="+(screen.width?(screen.width-680)/2:0))}
$(document).ready(function(){$(".yoxview").yoxview({lang:"fr"});jQuery("#mycarousel").jcarousel();$("#cart_add").click(function(){$("#cart_quantity").val(parseInt($("#cart_quantity").val())+1)});$("#cart_del").click(function(){var a=parseInt($("#cart_quantity").val())-1;if(a<1)a=1;$("#cart_quantity").val(a)});$("#opt_selector").change(function(){$("#opt_selector option:selected").val()==""?$("#opt_selector").css("border","1px solid #F00"):$("#opt_selector").css("border","1px solid #000")});$("#cart_submit").click(function(){if($("#opt_selector").length)if($("#opt_selector option:selected").val()==
""){$("#opt_selector").css("border","1px solid #F00");$("#option-error").overlay({expose:{color:"#000",loadSpeed:200,opacity:0.5},api:true}).load();return false}$("#cart_quantity_frm").submit()});$("#stock_alert").tooltip({position:"center right",offset:[-10,+10],effect:"fade",opacity:0.95,tip:"#option_tooltip"});$(function(){window.api=$("#pricealert").overlay({expose:{color:"#100F39",loadSpeed:200,zIndex:5E3,opacity:0.9},closeOnClick:true,api:true,onBeforeLoad:function(){this.getContent().find(".contentWrap").load("receiveandpay.php?montant="+
$("#flash_credit").attr("value").replace("montant=",""))}});$("#conso a[rel]").overlay({expose:{color:"#100F39",loadSpeed:200,zIndex:5E3,opacity:0.9},closeOnClick:true,onBeforeLoad:function(){this.getContent().find(".contentWrap").load(this.getTrigger().attr("href"),function(){$("#close").click(function(){$("#conso a[rel]").overlay({target:".wrap:first"}).close()});$("#sendalert").click(function(){$("#price_alert .error").hide();var a=false,b=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/,c=$("#mail").val();
if(c==""){$("#mail").after('<span class="error">Erreur !</span>');a=true}else if(!b.test(c)){$("#mail").after('<span class="error">Erreur !</span>');a=true}b=$("#price").val();if(b==""||b<0){$("#price").after('<span class="error">Erreur !</span>');a=true}var d=$("#price_alert input[@name='dure']:checked").val();a||$.post("price_alert.php",{action:"submit",mail:c,dure:d,price:b,products_id:$("#products_id").val()},function(){$("#conso a[rel]").overlay({target:".wrap:first"}).close()})})})}})});$(function(){$("#prod_assoc table tbody tr").mouseover(function(){var a=
$("#prod_assoc img[rel$='"+$("td:first a",this).attr("rel")+"']").attr("src");$("#prod_assoc #assoc_img").css("display","none");$("#prod_assoc #assoc_img").attr("src",a);$("#prod_assoc #assoc_img").fadeIn();$(this).addClass("selectedRow")}).mouseout(function(){$(this).removeClass("selectedRow")}).click(function(){})});$("#qty_price_link").length>0&&$("#qty_price_link").tooltip({position:"bottom center",offset:[+10,0],effect:"fade",opacity:0.95,tip:"#qty_price_tooltip"});$("#dispo_tooltip").length>
0&&$("#dispo_icon img").tooltip({position:"bottom center",offset:[+10,0],effect:"fade",opacity:0.95,tip:"#dispo_tooltip"})});
