(function(customerId,type,expire){
if(typeof JSON!=="object"){JSON={};JSON.parse=JSON.parse||function(o){return eval('('+o+')')};JSON.stringify=JSON.stringify||function(o){var n;var a;var t=typeof(o);var json=[];if(t!='object'||o===null){if(t=="string"){o='"'+o+'"'}return String(o)}else{a=(o&&o.constructor==Array);for(var key in o){n=o[key];t=typeof(n);if(t=="string"){n='"'+n.replace(/["]/g,"\\\"")+'"'}else if(t=="object"&&n!==null){n=JSON.stringify(n)}json.push((a?"":'"'+key+'":')+String(n))}return(a?"[":"{")+String(json)+(a?"]":"}")}}}
function DADB(t){return DADB.inst instanceof DADB?DADB.inst._rs=t(DADB.inst):(this._if=null,this._ok=!1,this._db=(typeof window['_dynad_tag_protocol_']!=='undefined'?window['_dynad_tag_protocol_']:("http:"!=window.location.protocol?"https://":"http://"))+"s.dynad.net",this._pt="/stack/KMA9C2O70iP6CHSgXk0LGaQ8ML9m6vJE4RIi1Rf61p4.html?v69",this._qu=[],this._rq={},this._id=(new Date).getTime()+Math.floor(1e4*Math.random()),this._ls=this._dg()==this._db,this._rs="",DADB.inst=this,void this.init(function(){"function"==typeof t&&(DADB.inst._rs=t(DADB.inst))}))}"object"!=typeof JSON&&(JSON={},JSON.parse=JSON.parse||function(o){return eval("("+o+")")},JSON.stringify=JSON.stringify||function(t){var i,e,s=typeof t,n=[];if("object"!=s||null===t)return"string"==s&&(t='"'+t+'"'),t+"";e=t&&t.constructor==Array;for(var o in t)i=t[o],s=typeof i,"string"==s?i='"'+i.replace(/["]/g,'\\"')+'"':"object"==s&&null!==i&&(i=JSON.stringify(i)),n.push((e?"":'"'+o+'":')+(i+""));return(e?"[":"{")+(n+"")+(e?"]":"}")}),DADB.prototype={constructor:DADB,init:function(t){var i=this;this._ls||this._if||(this._if=document.createElement("iframe"),this._if.style.cssText="position:absolute;width:1px;height:1px;left:-9999px;",(document.body||document.documentElement||document.getElementsByTagName('body')[0]).appendChild(this._if),window.addEventListener?(this._if.addEventListener("load",function(){i._ild()},!1),window.addEventListener("message",function(t){i._hm(t)},!1)):this._if.attachEvent&&(this._if.attachEvent("onload",function(){i._ild()},!1),window.attachEvent("onmessage",function(t){i._hm(t)})),this._if.src=this._db+this._pt),"function"==typeof t&&t()},getResult:function(){return this._rs},getCk:function(t,i){var e={request:{id:++this._id,type:"gc",key:t},callback:i};this._s(e)},setCk:function(t,i,e,s){"function"==typeof e&&(s=e,e=2592e3);var n={request:{id:++this._id,type:"sc",key:t,value:i,ttl:e},callback:s};this._s(n)},setNav:function(t,i,e,s,n){var o={request:{id:++this._id,type:"snav",key:t,value:i+"|"+e+"|"+s},callback:n};this._s(o)},getNav:function(t,i){var e={request:{id:++this._id,type:"nav",key:t},callback:i};this._s(e)},getItem:function(t,i){if(this._ls)return localStorage[t];var e=this,s={request:{id:++e._id,type:"get",key:t},callback:i};e._s(s)},setItem:function(t,i,e){if(this._ls)return void(localStorage[t]=i);var s=this,n={request:{id:++s._id,type:"set",key:t,value:i},callback:e};s._s(n)},delItem:function(t){if(this._ls)return delete localStorage[t];var i={request:{id:++this._id,type:"unset",key:t}};this._s(i)},_s:function(t){this._ok?this._if&&(this._rq[t.request.id]=t,this._if.contentWindow.postMessage(JSON.stringify(t.request),this._db)):this._qu.push(t)},_ild:function(){if(this._ok=!0,this._qu.length){for(var t=0,i=this._qu.length;i>t;t++)this._s(this._qu[t]);this._qu=[]}},_hm:function(t){if(!/\{.*(\"id\")+.*(\"key\")+.*\}/.test(t.data)||!/s.dynad.net/.test(t.origin)) return;try{if(t.origin==this._db){var i=JSON.parse(t.data);void 0!==this._rq[i.id].deferred&&this._rq[i.id].deferred.resolve(i.value);void 0!==this._rq[i.id]&&"function"==typeof this._rq[i.id].callback&&(this._rs=this._rq[i.id].callback(i.key,i.value)),delete this._rq[i.id]}}catch(t){}},_dg:function(){var t=window.location.href,i=document.createElement("a");return i.href=t,i.hostname}};
function loader(e,t,r,n){"string"==typeof e&&(e={url:e,success:t,error:r,timeout:n,method:"GET",disableCachebuster:false}),0==e.url.indexOf("//")&&(e.url=window.location.protocol+e.url);try{if( e.disableCachebuster !== true ){e.url+=(e.url.indexOf("?")>-1?"&":"?")+"cachebuster="+Date.now();}var o=null,s=null;if(function(){try{return parseInt(navigator.userAgent.toLowerCase().split("msie")[1])}catch(e){return 999}}()<10)(o=new XDomainRequest).onload=function(){clearTimeout(s),e.success(o.responseText)},o.onerror=function(){e.error(o.responseText),null!==s&&clearTimeout(s)};else{if("undefined"!=typeof XMLHttpRequest)o=new XMLHttpRequest;else for(var l=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Msxml2.XMLHTTP","Microsoft.XmlHttp"],a=0,i=l.length;a<i;a++)try{o=new ActiveXObject(l[a]);break}catch(e){o=null}if(null==o)return r(u),!1;o.onreadystatechange=function(){if(4===o.readyState)return 200===o.status?(clearTimeout(s),e.success(o.responseText),!0):(e.error({message:"invalid status ["+o.status+"]"}),null!==s&&clearTimeout(s),!1)}}s=setTimeout(function(){e.error({message:"timeout"}),o.abort()},void 0===e.timeout?16e3:n),o.open(e.method,e.url,!0),"GET"===o.method||void 0===e.data?o.send():o.send(JSON.stringify(e.data))}catch(t){return e.error(t),null!==s&&clearTimeout(s),!1}}
function DAFIFO(e,t,n,r,i){this.s=e;this.t=t;this.db=n;this.it=[];this.ttl=r;this._rs="";var s=this;s.db.getItem(s.t,function(e,t){s.init(e,t);if(typeof i=="function"){s._rs=i(s)}})}DAFIFO.prototype={constructor:DAFIFO,init:function(e,t){if(t==null||t==""){this.it={}}else{this.it=JSON.parse(t)}},commit:function(e){var t=this;var n=0;this.db.setItem(this.t,JSON.stringify(this.it));if(typeof e=="function"){e(n)}},getResult:function(){return this._rs},push:function(e,t){var n=0;if(this.it!=null&&typeof e==="string"&&e!=""){this.it=this._vd();var r=[];r[r.length]={v:e,t:parseInt((new Date).getTime()/1e3)};var i=1;for(k in this.it){if(i++<this.s&&typeof this.it[k]==="object"&&typeof this.it[k]["v"]==="string"&&typeof this.it[k]["t"]==="number"&&this.it[k]["v"]!=e&&this.it[k]["v"]!=""){r[r.length]=this.it[k]}}n=1;this.it=r;if(typeof t=="function"){t(n)}}return n},pop:function(e){var t=null;if(this.it!=null){this.it=this._vd();var n=[];var r=0;for(k in this.it){if(r++>0){n[n.length]=this.it[k]}else{t=this.it[k]["v"]}}this.it=n;if(typeof e=="function"){e(t)}}return t},remove:function(e,t){var n=[];if(this.it!=null){var r=0;var i=[];for(k in this.it){if(this._ia(k)&&this.it[k]["v"]!=e){i[r++]=this.it[k]}}this.it=i;if(typeof t=="function"){t(n)}}return n},list:function(e,t,n){var f=[];if("function"==typeof e&&void 0==t&&(n=e,t=!1,e=this.it.length),"function"==typeof t&&void 0==n&&(n=t,t=!1),null!=this.it){var o=-1;for(k in this.it)if(this._ia(k)){if(++o>=this.s||o>=e)break;f[o]=t?this.it[k]:this.it[k].v}"function"==typeof n&&n(f)}return f},clear:function(e){this.it=[];if(typeof e=="function"){e()}},_vd:function(){var e=[];for(k in this.it){if(this._ia(k))e[k]=this.it[k]}return e},_ct:function(){var e=0;for(k in this.it)e++;return e},_ia:function(e){return(new Date).getTime()/1e3-this.it[e]["t"]<this.ttl}};
function DAUtils(n,t,f,o){this.funnel1=null,this.funnel2=null,this.funnel3=null,this.funnel4=null,this._result="";var u=this;u.funnel1=new DAFIFO(1,"d"+n+"c",t,f,function(){u.funnel2=new DAFIFO(10,"d"+n+"p",t,f,function(){u.funnel3=new DAFIFO(20,"d"+n+"C",t,f,function(){u.funnel4=new DAFIFO(100,"d"+n+"s",t,f,function(){"function"==typeof o&&(u._result=o(u))})})})})}DAUtils.prototype={constructor:DAUtils,list:function(n,t,f){var o=this;return"function"==typeof t&&void 0==f&&(f=t,t=10),1==n||"category"==n?o.funnel1.list(t,function(n){"function"==typeof f&&f(n)}):2==n||"product"==n?o.funnel2.list(t,function(n){"function"==typeof f&&f(n)}):3==n||"cart"==n?o.funnel3.list(t,function(n){"function"==typeof f&&f(n)}):4==n||"sold"==n?o.funnel4.list(t,function(n){"function"==typeof f&&f(n)}):null},getResult:function(){return this._result},product:function(n,t){var f=this,o=(""+n).split(",");for(v in o)f.funnel2.push(o[v],function(){"function"==typeof t&&t(f)})},category:function(n,t){var f=this,o=(""+n).split(",");for(v in o)f.funnel1.push(o[v],function(){"function"==typeof t&&t(f)})},cart:function(n,t){var f=this,o=(""+n).split(",");for(v in o)f.funnel3.push(o[v],function(){"function"==typeof t&&t(f)})},sold:function(n,t){var f=this,o=(""+n).split(",");for(v in o)f.funnel4.push(o[v],function(){f.funnel2.remove(o[v],function(){f.funnel3.remove(o[v],function(){"function"==typeof t&&t(f)})})})},commitAll:function(n){var t=this;t.funnel1.commit(function(){t.funnel2.commit(function(){t.funnel3.commit(function(){t.funnel4.commit(function(){"function"==typeof n&&n()})})})})},clear:function(n,t){1==n||"category"==n?this.funnel1.clear(function(){"function"==typeof t&&t()}):2==n||"product"==n?this.funnel2.clear(function(){"function"==typeof t&&t()}):3==n||"cart"==n?this.funnel3.clear(function(){"function"==typeof t&&t()}):(4==n||"sold"==n)&&this.funnel4.clear(function(){"function"==typeof t&&t()})},commit:function(n,t){1==n||"category"==n?this.funnel1.commit(function(){"function"==typeof t&&t()}):2==n||"product"==n?this.funnel2.commit(function(){"function"==typeof t&&t()}):3==n||"cart"==n?this.funnel3.commit(function(){"function"==typeof t&&t()}):(4==n||"sold"==n)&&this.funnel4.commit(function(){"function"==typeof t&&t()})}};
new DADB(function(db){db.getCk('optout',function(k,v){if(v!=='1'){var params={};this.p=function(z){return params[z];}
params['l']='613';params['ord']='';
(function(e){var r=document.createElement("iframe");r.setAttribute("src","https://t.dynad.net/leep?l=613&ord=var i;");r.style.border="none";r.style.position="absolute";r.style.left="-9999px";r.style.overflow="hidden";r.style.width="1px";r.style.height="1px";e.appendChild(r);})(document.body||window)
var _dasku_ = decodeURIComponent(this.p('c'));

try{if( document.getElementById('productid_criteo') ) _dasku_ = document.getElementById('productid_criteo').value;}catch (e){}

var db = new DADB(function(db) { 
   //NAO ALTERAR VARIAVEL "customerId"
   new DAUtils(customerId, db, 2592000, function(e){
       var arr = _dasku_.split(",");
       for(var x = 0 ; x < arr.length; x ++ )
        if( arr[x] != null && arr[x] != '' && typeof arr[x] !== 'undefined') {
            e.product(arr[x], function(l){l.commit('product');});
        }
   });
});}})})})('1559153311192','Detail','30');