function colissimo_widget_loadingPointRetrait(){var e=jQuery("#colissimo_widget_listePays").val();console.log("Pays = "+e),void 0===e||null==e?setTimeout(function(){colissimo_widget_loadingPointRetrait()},200):colissimo_widget_getPointsRetrait()}function populateCountry(e,t){var o=jQuery.noConflict(),n=o("#colissimo_widget_listePays").attr("value");for(null!=n&&""!=n&&null!=n||(n=t),i=0;i<e.length-1;i++)e[i]==n?o("#colissimo_widget_listePays").append("<option value='"+e[i]+"' selected='selected'>"+e[i+1]+"</option>"):o("#colissimo_widget_listePays").append("<option value='"+e[i]+"'>"+e[i+1]+"</option>"),i++}jQuery.extend(jQuery.fn,{frameColissimoOpen:function(e){var t=this,i=jQuery.noConflict(),o=e.URLColissimo,n=e.ceLang,s=e.callBackFrame,a=0;if(null!=e.URLColissimo&&""!=e.URLColissimo||(a=10),null!=e.ceCountryList&&""!=e.ceCountryList||(a=10),null!=e.ceCountry&&""!=e.ceCountry||(a=20),null!=e.ceLang&&""!=e.ceLang||(a=30),null!=e.dyPreparationTime&&""!=e.dyPreparationTime||(a=40),i("<link>",{rel:"stylesheet",type:"text/css",href:o+"/widget-point-retrait/resources/css/bootstrap.colissimo.min.css"}).appendTo("head"),i("head").append("\n"),i("<link>",{rel:"stylesheet",type:"text/css",href:o+"/widget-point-retrait/resources/css/mystyle.css"}).appendTo("head"),i("head").append("\n"),i("<link>",{rel:"stylesheet",type:"text/css",href:o+"/widget-point-retrait/resources/css/jquery-ui.colissimo.min.css"}).appendTo("head"),i("head").append("\n"),void 0===jQuery.ui){var r=document.createElement("script");r.type="text/javascript",r.src=o+"/widget-point-retrait/resources/js/jquery-ui.min-1.11.4.js",i("head").append(r),i("head").append("\n")}var c=document.createElement("script");c.type="text/javascript",c.src="https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.js",c.defer=!0,i("head").append(c),i("head").append("\n"),i("<link>",{rel:"stylesheet",type:"text/css",href:"https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.css"}).appendTo("head"),i("head").append("\n"),i("head").append('<meta http-equiv="X-UA-Compatible" content="IE=edge">'),i("head").append("\n"),i("head").append('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />'),i("head").append("\n"),i("head").append('<meta name="apple-mobile-web-app-capable" content="yes">'),i("head").append("\n");var l=o+"/widget-point-retrait/index.htm",d="h1="+n+"&callBackFrame="+s+"&domain="+o+"&ceCountryList="+e.ceCountryList+"&codeRetour="+a+"&dyPreparationTime="+e.dyPreparationTime+"&dyWeight="+e.dyWeight+"&ceAddress="+e.ceAddress+"&ceCountry="+e.ceCountry+"&ceZipCode="+e.ceZipCode+"&token="+e.token+"&idContainerWidget="+t.attr("id");i.ajax({method:"POST",url:l,data:d,success:function(s){t.html(s),setTimeout(function(){colissimojQuery.ajax({type:"POST",encoding:"UTF-8",contentType:"application/x-www-form-urlencoded; charset=utf-8",url:o+"/widget-point-retrait/GetPays.htm",data:"lang="+n+"&ceCountryList="+e.ceCountryList+"&token="+e.token,success:function(t){populateCountry(t.split(";"),e.ceCountry)},error:function(e,t,i){}}),null!=e.ceAddress&&""!=e.ceAddress&&i("#colissimo_widget_Adresse1").val(e.ceAddress),null!=e.ceZipCode&&""!=e.ceZipCode&&i("#colissimo_widget_CodePostal").val(e.ceZipCode),null!=e.ceTown&&""!=e.ceTown&&(i("#colissimo_widget_Ville").val(e.ceTown),setTimeout(function(){colissimo_widget_loadingPointRetrait()},500))},500)},error:function(e,t,i){console.log(t),console.log(i)}});jQuery.noConflict();return this},frameColissimoClose:function(){return this}});



