$('#popupajouterpanier').click(function(event){event.preventDefault();$.fancybox({href:'#inlinepopupajouterpanier',openEffect:'elastic',openSpeed:100,closeEffect:'elastic',closeSpeed:150,width:600,height:300,scrolling:'no'});var $data=[];var $form=$(this).parent().parent().find('form');$data.push({name:'appearance',value:$form.find('input[name=color]').val()},{name:'view',value:$form.find('input[name=view]').val()},{name:'article',value:$form.find('#articleId').val()},{name:'design',value:$form.find('#designId').val()},{name:'quantity',value:$form.find('#quantity').val()},{name:'size',value:$form.find('input[name=size]:checked').val()});$.post('/shop-ajax.php?l=&shop=',$data,function(json){if(json.error){$('#inlinepopupajouterpanier').text("An error occured!We are having technical difficulties,please try again later or contact us.");$.ajax({type:"POST",url:"error_log.php",data:"log="+window.location.href,success:function(msg){},error:function(XMLHttpRequest,textStatus,errorThrown){alert("some error");}});}else{$('a.basketUrlHolder').attr('href','http://www.ni-dieu-ni-maitre2.com/basket.php?'+json.c.l);$('.basket-counter').text(json.c.q);}},'json');return false;});$.get('/shop-ajax.php?l=&shop=&basket',function(json){$('a.basketUrlHolder').attr('href','http://www.ni-dieu-ni-maitre2.com/basket.php?'+json.c.l);$('.basket-counter').text(json.c.q);$('#tablomat').attr('href','http://www.ni-dieu-ni-maitre2.com/custom_tshirt.php?noheader=1&'+json.c.l);$('#tablomat-new-window').attr('href','http://www.ni-dieu-ni-maitre2.com/custom_tshirt.php?producttype=&'+json.c.l);$('#tablomat-index').attr('href','http://www.ni-dieu-ni-maitre2.com/custom_tshirt.php?producttype=&'+json.c.l);$('#customize-this-product').attr('href','http://www.ni-dieu-ni-maitre2.com/custom_tshirt.php?productcolor=&noheader=1&p=&'+json.c.l);$('#customize-this-product-type').attr('href','http://www.ni-dieu-ni-maitre2.com/custom_tshirt.php?noheader=1&producttype=&'+json.c.l);},'json');